From 1ecfae71fe7dc9c069089f8d6d75b7978fbb94e1 Mon Sep 17 00:00:00 2001 From: Britney Fransen Date: Fri, 30 Dec 2022 16:06:31 -0500 Subject: linhes-web: initial inclusion --- linhes/linhes-web/.gitignore | 1 + linhes/linhes-web/PKGBUILD | 17 + linhes/linhes-web/mp_preflight | 3 + .../linhes-web/website/contents/ajaxloader.min.js | 1 + linhes/linhes-web/website/contents/back.png | Bin 0 -> 3133 bytes linhes/linhes-web/website/contents/calllog.py | 66 +++ linhes/linhes-web/website/contents/calllog.shtml | 19 + linhes/linhes-web/website/contents/cardmap.shtml | 13 + linhes/linhes-web/website/contents/count.py | 100 +++++ linhes/linhes-web/website/contents/docs.html | 58 +++ .../linhes-web/website/contents/error-handler.html | 9 + .../website/contents/error/call_log.html | 11 + .../linhes-web/website/contents/error/hobbit.html | 11 + .../website/contents/error/mythbackend.html | 11 + .../website/contents/error/mythexport.html | 22 + .../website/contents/error/mythexpress.html | 20 + .../linhes-web/website/contents/error/mythweb.html | 16 + .../website/contents/error/phpadmin.html | 26 ++ .../linhes-web/website/contents/error/remyth.html | 22 + .../website/contents/error/status-404.html | 9 + .../website/contents/error/zoneminder.html | 20 + linhes/linhes-web/website/contents/exports.shtml | 14 + linhes/linhes-web/website/contents/favicon.ico | Bin 0 -> 1150 bytes linhes/linhes-web/website/contents/fe_status.py | 144 +++++++ linhes/linhes-web/website/contents/fe_status.shtml | 18 + .../website/contents/fe_status_load.shtml | 41 ++ linhes/linhes-web/website/contents/frame.css | 229 +++++++++++ linhes/linhes-web/website/contents/go.png | Bin 0 -> 2471 bytes linhes/linhes-web/website/contents/header.html | 97 +++++ linhes/linhes-web/website/contents/home.shtml | 17 + .../website/contents/images/classic-menugraph.png | Bin 0 -> 144106 bytes .../website/contents/images/dvr_menugraph.png | Bin 0 -> 207288 bytes .../website/contents/images/menu_diagram_color.png | Bin 0 -> 193264 bytes linhes/linhes-web/website/contents/index.html | 16 + .../linhes-web/website/contents/linhes_header.png | Bin 0 -> 57259 bytes linhes/linhes-web/website/contents/links.html | 27 ++ linhes/linhes-web/website/contents/list_cardmap.py | 156 +++++++ linhes/linhes-web/website/contents/list_exports.py | 85 ++++ linhes/linhes-web/website/contents/mv.css | 100 +++++ linhes/linhes-web/website/contents/mvp_process.py | 195 +++++++++ linhes/linhes-web/website/contents/mvp_select.py | 146 +++++++ linhes/linhes-web/website/contents/mvpmc.shtml | 21 + linhes/linhes-web/website/contents/mythweb.html | 16 + .../website/contents/page_background.jpg | Bin 0 -> 740 bytes linhes/linhes-web/website/contents/process.py | 447 +++++++++++++++++++++ linhes/linhes-web/website/contents/skeleton.css | 105 +++++ 46 files changed, 2329 insertions(+) create mode 100644 linhes/linhes-web/.gitignore create mode 100644 linhes/linhes-web/PKGBUILD create mode 100755 linhes/linhes-web/mp_preflight create mode 100755 linhes/linhes-web/website/contents/ajaxloader.min.js create mode 100644 linhes/linhes-web/website/contents/back.png create mode 100644 linhes/linhes-web/website/contents/calllog.py create mode 100644 linhes/linhes-web/website/contents/calllog.shtml create mode 100755 linhes/linhes-web/website/contents/cardmap.shtml create mode 100644 linhes/linhes-web/website/contents/count.py create mode 100644 linhes/linhes-web/website/contents/docs.html create mode 100644 linhes/linhes-web/website/contents/error-handler.html create mode 100644 linhes/linhes-web/website/contents/error/call_log.html create mode 100644 linhes/linhes-web/website/contents/error/hobbit.html create mode 100644 linhes/linhes-web/website/contents/error/mythbackend.html create mode 100644 linhes/linhes-web/website/contents/error/mythexport.html create mode 100644 linhes/linhes-web/website/contents/error/mythexpress.html create mode 100644 linhes/linhes-web/website/contents/error/mythweb.html create mode 100644 linhes/linhes-web/website/contents/error/phpadmin.html create mode 100644 linhes/linhes-web/website/contents/error/remyth.html create mode 100644 linhes/linhes-web/website/contents/error/status-404.html create mode 100644 linhes/linhes-web/website/contents/error/zoneminder.html create mode 100755 linhes/linhes-web/website/contents/exports.shtml create mode 100644 linhes/linhes-web/website/contents/favicon.ico create mode 100644 linhes/linhes-web/website/contents/fe_status.py create mode 100644 linhes/linhes-web/website/contents/fe_status.shtml create mode 100755 linhes/linhes-web/website/contents/fe_status_load.shtml create mode 100644 linhes/linhes-web/website/contents/frame.css create mode 100644 linhes/linhes-web/website/contents/go.png create mode 100644 linhes/linhes-web/website/contents/header.html create mode 100644 linhes/linhes-web/website/contents/home.shtml create mode 100644 linhes/linhes-web/website/contents/images/classic-menugraph.png create mode 100644 linhes/linhes-web/website/contents/images/dvr_menugraph.png create mode 100644 linhes/linhes-web/website/contents/images/menu_diagram_color.png create mode 100644 linhes/linhes-web/website/contents/index.html create mode 100644 linhes/linhes-web/website/contents/linhes_header.png create mode 100644 linhes/linhes-web/website/contents/links.html create mode 100755 linhes/linhes-web/website/contents/list_cardmap.py create mode 100755 linhes/linhes-web/website/contents/list_exports.py create mode 100644 linhes/linhes-web/website/contents/mv.css create mode 100644 linhes/linhes-web/website/contents/mvp_process.py create mode 100644 linhes/linhes-web/website/contents/mvp_select.py create mode 100644 linhes/linhes-web/website/contents/mvpmc.shtml create mode 100644 linhes/linhes-web/website/contents/mythweb.html create mode 100644 linhes/linhes-web/website/contents/page_background.jpg create mode 100755 linhes/linhes-web/website/contents/process.py create mode 100644 linhes/linhes-web/website/contents/skeleton.css diff --git a/linhes/linhes-web/.gitignore b/linhes/linhes-web/.gitignore new file mode 100644 index 0000000..073b364 --- /dev/null +++ b/linhes/linhes-web/.gitignore @@ -0,0 +1 @@ +website.tar.gz diff --git a/linhes/linhes-web/PKGBUILD b/linhes/linhes-web/PKGBUILD new file mode 100644 index 0000000..7cde68f --- /dev/null +++ b/linhes/linhes-web/PKGBUILD @@ -0,0 +1,17 @@ +pkgname=linhes-web +pkgver=9.0.0 +pkgrel=1 +conflicts=() +pkgdesc="LinHES local website" +depends=() +makedepends=() +arch=('x86_64') +license=('GPL') +source=(website.tar.gz) +sha256sums=('6ff99589d225826d86bd1911aa0223f3c9668c02ff15e7bc607e52d90cca20ae') + +package() { + mkdir -p $pkgdir/data/srv/httpd/htdocs/ + cp -rp $srcdir/website/contents/* $pkgdir/data/srv/httpd/htdocs + chmod -R 755 $pkgdir/data/srv/httpd/htdocs +} diff --git a/linhes/linhes-web/mp_preflight b/linhes/linhes-web/mp_preflight new file mode 100755 index 0000000..037054f --- /dev/null +++ b/linhes/linhes-web/mp_preflight @@ -0,0 +1,3 @@ +#!/usr/bin/bash +echo " Starting mp_preflight" +tar -czvf website.tar.gz ./website diff --git a/linhes/linhes-web/website/contents/ajaxloader.min.js b/linhes/linhes-web/website/contents/ajaxloader.min.js new file mode 100755 index 0000000..11c14ba --- /dev/null +++ b/linhes/linhes-web/website/contents/ajaxloader.min.js @@ -0,0 +1 @@ +function AjaxLoader(e,t){function n(e){var t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;e=e.replace(t,function(e,t,n,r){return t+t+n+n+r+r});var n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return n?{r:parseInt(n[1],16),g:parseInt(n[2],16),b:parseInt(n[3],16)}:null}function r(e,t,n){return"#"+((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)}function b(){p=s>=32?s>=128?72:36:18,d=.5*s*o,v=2*Math.PI/p;h=a/m;if(f){h=-h}g.width=s;g.height=s}function w(e){var t=2*Math.PI*e;var n=Math.cos(t),r=Math.sin(t),i=.5*s*(1+n),o=.5*s*(1-r),a=i-d*n,l=o+d*r;y.clearRect(0,0,s,s);for(var c=0;c

' + print '

' + print '' + print "Top 20 callers" + searchstring=''' ''' + cursor.execute("select name,number,count(number) from cid group by number,name order by count(number) DESC limit 20;") + result = cursor.fetchall() + for row in result: + print " " + #print " " + print searchstring % (row[0], row [0]) + print " " + #print " " + print searchstring % (row[1], row [1]) + print " " + #print "%40s %26s %10s" %(row[0],row[2],row[1]) + print "
%s
",row[0],"",row[2],"",row[1],"
" + print "
" + + + #last 20 calls + print '
' + print '
' + #print '

' + print '

' + print '' + print "Last 20 calls" + print '
' + cursor.execute("select date,time,name,number from cid order by date(ts) DESC ,time DESC limit 20 ;" ) + result = cursor.fetchall() + for row in result: + print " " + print " " %(row[0]) + print " " + #print " " + print searchstring % (row[2], row [2]) + #print " " + print searchstring % (row[3], row [3]) + print " " +# print "%26s %26s %26s %26s " %(row[0],row[1],row[2],row[3]) + print "
%s ",row[1],"",row[2],"",row[3],"
" + print "
" + +if __name__ == "__main__": + main(sys.argv[1:]) diff --git a/linhes/linhes-web/website/contents/calllog.shtml b/linhes/linhes-web/website/contents/calllog.shtml new file mode 100644 index 0000000..5b64dc3 --- /dev/null +++ b/linhes/linhes-web/website/contents/calllog.shtml @@ -0,0 +1,19 @@ + + + + + + + + + + +
+
+ + + + diff --git a/linhes/linhes-web/website/contents/cardmap.shtml b/linhes/linhes-web/website/contents/cardmap.shtml new file mode 100755 index 0000000..d98a4e9 --- /dev/null +++ b/linhes/linhes-web/website/contents/cardmap.shtml @@ -0,0 +1,13 @@ + + + + + + + + + + diff --git a/linhes/linhes-web/website/contents/count.py b/linhes/linhes-web/website/contents/count.py new file mode 100644 index 0000000..76d18e8 --- /dev/null +++ b/linhes/linhes-web/website/contents/count.py @@ -0,0 +1,100 @@ +#!/usr/bin/python2 +# import MySQL module + +import MySQLdb +import sys +import getopt +import socket + + +def main(argv): + #get LinHES version + verfile = open('/etc/LinHES-release', 'r') + verLH = verfile.read() + verfile.close() + + grandtotal=0 + grandtotal_current=0 + db = MySQLdb.connect(host="localhost", user="mythtv", passwd="mythtv", db="mythconverg") + # create a cursor + cursor = db.cursor() + # execute SQL statement + cursor.execute("SELECT unix_timestamp(starttime),unix_timestamp(endtime),title FROM oldrecorded where oldrecorded.recstatus = -3 ORDER by starttime;") + result = cursor.fetchall() + + for row in result: + # print row[0], row[1] ,row [2] + start=row[0] + end=row[1] + if ( end > start ): + total = (end - start) /60 + grandtotal+=total + hours = grandtotal / 60.0 + days = hours / 24.0 + + cursor.execute("SELECT unix_timestamp(starttime),unix_timestamp(endtime),title FROM recorded where not (recgroup=(%s)) ORDER by starttime",("LiveTV")) + result_current = cursor.fetchall() + for row in result_current: + start=row[0] + end=row[1] + if ( end > start ): + total = (end - start) /60 + grandtotal_current+=total + hours_current = grandtotal_current / 60.0 + days_current = hours_current / 24.0 + + print '' + print "

" +#Top shows + print '

' + print '' + print "Top 20 Shows" + cursor.execute("select title,count(title),category as numtitle from oldrecorded where oldrecorded.recstatus = -3 group by title having (COUNT(title) > 0 ) order by (COUNT(title)) DESC limit 20;" ) + result = cursor.fetchall() + for row in result: + print " " + print " " + print " " + print " " + print " " + # print "%40s %26s %10s" %(row[0],row[2],row[1]) + print "
",row[0],"",row[2],"",row[1],"
" + print "
" +#Top categories + + print '
' + print '' + print "Top 20 Categories" + cursor.execute("select category,count(category) as numtitle from oldrecorded where oldrecorded.recstatus = -3 group by category having (COUNT(category) > 0 ) order by (COUNT(category)) DESC limit 20; " ) + result = cursor.fetchall() + for row in result: + category = row[0] + if category == "": + category = "Unknown" + print " " + print " " + print " " + print " " + #print "%16s %16s" %(row[0],row[1]) + print "
",category,"",row[1],"
" + print "
" + +if __name__ == "__main__": + main(sys.argv[1:]) diff --git a/linhes/linhes-web/website/contents/docs.html b/linhes/linhes-web/website/contents/docs.html new file mode 100644 index 0000000..dc3a936 --- /dev/null +++ b/linhes/linhes-web/website/contents/docs.html @@ -0,0 +1,58 @@ + + + + + + + + +

Package Management

+ +
+ +

Starting and Stopping Services

+ + +

Other Notes

+ +
+ +

MythFrontend Menu Navigation

+