DasErsteDE: handle rating attribute, ignore end times for now, leads to DataStore...
[nonametv.git] / web-admin / viewepg.php
blob68837f253efa1e1519716c6b2069043b7c2e9a78
1 <?php
3 require "config.php";
4 require "common.php";
5 require "mysql.php";
6 require "epgservers.php";
7 require "networks.php";
8 require "transportstreams.php";
9 require "services.php";
10 require "language.php";
12 $debug=false;
14 if( $debug ){
15 dbg( "NonameTV" , $dconf );
19 // connect to main database
21 switch( $dconf['dbtype'] ){
22 case 'mysql':
23 $myc = sql_doconnect();
24 if( !$myc ) exit;
25 break;
28 $lngstr = loadlanguage( 'viewepg' );
29 if( $debug ) dbg("language strings" , $lngstr );
32 <html>
33 <head>
34 <title>List EPG servers</title>
35 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
36 <link href="css/nonametv.css" rel=stylesheet>
37 <link href="css/viewepg.css" rel=stylesheet>
38 </head>
40 <body bgcolor="#FFFFFF" text="#000000">
42 <?php
45 // main
48 print "<h1>" . $lngstr['title'] . "</h1>\n";
50 $edb = sql_loadEPGservers( $myc , '' , '' );
51 if( $debug ) dbg( "epgservers" , $edb );
53 if( $edb ){
54 print "<table width=\"80%\" border=\"0\" cellpadding=\"4\" cellspacing=\"0\">\n";
55 print "<tr class=\"tableTitle\">\n";
56 print " <td>" . $lngstr['name'] . "</td>\n";
57 print " <td>" . $lngstr['description'] . "</td>\n";
58 print "</tr>\n";
60 $rowstyle = 0;
62 reset( $edb );
63 while( list( $ek , $ev ) = each( $edb ) ){
65 print "<tr class=\"tableEPGServer\">\n";
66 print " <td>" . $ev['name'] . "</td>\n";
67 print " <td>" . $ev['description'] . "</td>\n";
68 print "</tr>\n";
70 $ndb = sql_loadNetworks( $myc , 'epgserver' , $ev['id'] );
71 reset( $ndb );
72 while( list( $nk , $nv ) = each( $ndb ) ){
73 print "<tr class=\"tableNetwork\">\n";
74 print " <td>&nbsp;&nbsp;" . $nv['nid'] . " - " . $nv['name'] . "</td>\n";
75 print " <td>" . $nv['description'] . "</td>\n";
76 print "</tr>\n";
78 $tdb = sql_loadTSs( $myc , 'network' , $nv['id'] );
79 if( ! $tdb ) continue;
80 reset( $tdb );
81 while( list( $tk , $tv ) = each( $tdb ) ){
82 print "<tr class=\"tableTS\">\n";
83 print " <td>&nbsp;&nbsp;&nbsp;&nbsp;" . $tv['tsid'] . "</td>\n";
84 print " <td>" . $tv['description'] . "</td>\n";
85 print "</tr>\n";
88 $rowstyle = 0;
90 $sdb = sql_loadServices( $myc , 'transportstream' , $tv['id'] );
91 if( ! $sdb ) continue;
92 reset( $sdb );
93 while( list( $sk , $sv ) = each( $sdb ) ){
94 print "<tr class=\"tableService_rowstyle" . $rowstyle . "\">\n";
95 print " <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" . $sv['serviceid'] . "</td>\n";
96 print " <td>" . $sv['description'] . "</td>\n";
97 print "</tr>\n";
98 $rowstyle = 1 - $rowstyle;
103 $rowstyle = 1 - $rowstyle;
106 print "</table>\n";
110 // disconnect from main database
112 switch( $dconf['dbtype'] ){
113 case 'mysql':
114 sql_dodisconnect( $myc );
115 break;
120 </body>
121 </html>