@ -6,8 +6,16 @@
* The dashboard is based of the Bootstrap dashboard template.
* The dashboard is based of the Bootstrap dashboard template.
*/
*/
if (file_exists("./pgs/functions.php")) { require_once("./pgs/functions.php"); } else { die("functions.php does not exist."); }
if (file_exists("./pgs/functions.php")) {
if (file_exists("./pgs/config.inc.php")) { require_once("./pgs/config.inc.php"); } else { die("config.inc.php does not exist."); }
require_once("./pgs/functions.php");
} else {
die("functions.php does not exist.");
}
if (file_exists("./pgs/config.inc.php")) {
require_once("./pgs/config.inc.php");
} else {
die("config.inc.php does not exist.");
}
if (!class_exists('ParseXML')) require_once("./pgs/class.parsexml.php");
if (!class_exists('ParseXML')) require_once("./pgs/class.parsexml.php");
if (!class_exists('Node')) require_once("./pgs/class.node.php");
if (!class_exists('Node')) require_once("./pgs/class.node.php");
@ -39,8 +47,7 @@ if ($CallingHome['Active']) {
@exec("chmod 777 " . $CallingHome['HashFile']);
@exec("chmod 777 " . $CallingHome['HashFile']);
$CallHomeNow = true;
$CallHomeNow = true;
}
}
}
} else {
else {
include($CallingHome['HashFile']);
include($CallingHome['HashFile']);
if ($LastSync < (time() - $CallingHome['PushDelay'])) {
if ($LastSync < (time() - $CallingHome['PushDelay'])) {
$Ressource = @fopen($CallingHome['HashFile'], "w");
$Ressource = @fopen($CallingHome['HashFile'], "w");
@ -62,8 +69,7 @@ if ($CallingHome['Active']) {
$Reflector->PrepareReflectorXML();
$Reflector->PrepareReflectorXML();
$Reflector->CallHome();
$Reflector->CallHome();
}
}
}
} else {
else {
$Hash = "";
$Hash = "";
}
}
?>
?>
@ -79,8 +85,9 @@ else {
< meta name = "revisit" content = " <?php echo $PageOptions [ 'MetaRevisit' ]; ?> " />
< meta name = "revisit" content = " <?php echo $PageOptions [ 'MetaRevisit' ]; ?> " />
< meta name = "robots" content = " <?php echo $PageOptions [ 'MetaAuthor' ]; ?> " />
< meta name = "robots" content = " <?php echo $PageOptions [ 'MetaAuthor' ]; ?> " />
< link rel = "icon" href = "./favicon.ico" type = "image/vnd.microsoft.icon" >
< meta http-equiv = "content-type" content = "text/html; charset=utf-8" / >
< title > <?php echo $Reflector -> GetReflectorName (); ?> Reflector Dashboard</ title >
< title > <?php echo $Reflector -> GetReflectorName (); ?> Reflector Dashboard</ title >
< link rel = "icon" href = "./favicon.ico" type = "image/vnd.microsoft.icon" >
<!-- Bootstrap core CSS -->
<!-- Bootstrap core CSS -->
< link href = "css/bootstrap.min.css" rel = "stylesheet" >
< link href = "css/bootstrap.min.css" rel = "stylesheet" >
@ -121,11 +128,14 @@ else {
?>
?>
< / head >
< / head >
< body >
< body >
<?php if ( file_exists ( "./tracking.php" )) { include_once ( "tracking.php" ); } ?>
<?php if ( file_exists ( "./tracking.php" )) {
include_once("tracking.php");
} ?>
< nav class = "navbar navbar-inverse navbar-fixed-top" >
< nav class = "navbar navbar-inverse navbar-fixed-top" >
< div class = "container-fluid" >
< div class = "container-fluid" >
< div class = "navbar-header" >
< div class = "navbar-header" >
< button type = "button" class = "navbar-toggle collapsed" data-toggle = "collapse" data-target = "#navbar" aria-expanded = "false" aria-controls = "navbar" >
< button type = "button" class = "navbar-toggle collapsed" data-toggle = "collapse" data-target = "#navbar"
aria-expanded="false" aria-controls="navbar">
< span class = "sr-only" > Toggle navigation< / span >
< span class = "sr-only" > Toggle navigation< / span >
< span class = "icon-bar" > < / span >
< span class = "icon-bar" > < / span >
< span class = "icon-bar" > < / span >
< span class = "icon-bar" > < / span >
@ -135,8 +145,10 @@ else {
< / div >
< / div >
< div id = "navbar" class = "navbar-collapse collapse" >
< div id = "navbar" class = "navbar-collapse collapse" >
< ul class = "nav navbar-nav navbar-right" >
< ul class = "nav navbar-nav navbar-right" >
< li class = "navbar-info" > <?php echo $Reflector -> GetVersion (); ?> - Dashboard v<?php echo $PageOptions [ 'DashboardVersion' ]; ?> </ li >
< li class = "navbar-info" > <?php echo $Reflector -> GetVersion (); ?> - Dashboard
< li class = "navbar-info" > Service uptime: <?php echo FormatSeconds ( $Reflector -> GetServiceUptime ()); ?> </ li >
v<?php echo $PageOptions [ 'DashboardVersion' ]; ?> </ li >
< li class = "navbar-info" > Service
uptime: <?php echo FormatSeconds ( $Reflector -> GetServiceUptime ()); ?> </ li >
< / ul >
< / ul >
< / div >
< / div >
< / div >
< / div >
@ -146,11 +158,17 @@ else {
< div class = "row" >
< div class = "row" >
< div class = "col-sm-3 col-md-2 sidebar" >
< div class = "col-sm-3 col-md-2 sidebar" >
< ul class = "nav nav-sidebar" >
< ul class = "nav nav-sidebar" >
< li <?php echo (( $_GET [ 'show' ] == "users" ) || ( $_GET [ 'show' ] == "" )) ? ' class="active"' : '' ; ?> >< a href = "./index.php" > Users / Modules</ a ></ li >
< li <?php echo (( $_GET [ 'show' ] == "users" ) || ( $_GET [ 'show' ] == "" )) ? ' class="active"' : '' ; ?> >< a
< li <?php echo ( $_GET [ 'show' ] == "repeaters" ) ? ' class="active"' : '' ; ?> >< a href = "./index.php?show=repeaters" > Repeaters / Nodes (<?php echo $Reflector -> NodeCount (); ?> )</ a ></ li >
href="./index.php">Users / Modules< / a > < / li >
< li <?php echo ( $_GET [ 'show' ] == "peers" ) ? ' class="active"' : '' ; ?> >< a href = "./index.php?show=peers" > Peers (<?php echo $Reflector -> PeerCount (); ?> )</ a ></ li >
< li <?php echo ( $_GET [ 'show' ] == "repeaters" ) ? ' class="active"' : '' ; ?> >< a
< li <?php echo ( $_GET [ 'show' ] == "reflectors" ) ? ' class="active"' : '' ; ?> >< a href = "./index.php?show=reflectors" > Reflectorlist</ a ></ li >
href="./index.php?show=repeaters">Repeaters / Nodes (<?php echo $Reflector -> NodeCount (); ?>
< li <?php echo ( $_GET [ 'show' ] == "liveircddb" ) ? ' class="active"' : '' ; ?> >< a href = "./index.php?show=liveircddb" > D-Star live</ a ></ li >
)< / a > < / li >
< li <?php echo ( $_GET [ 'show' ] == "peers" ) ? ' class="active"' : '' ; ?> >< a href = "./index.php?show=peers" > Peers
(<?php echo $Reflector -> PeerCount (); ?> )</ a ></ li >
< li <?php echo ( $_GET [ 'show' ] == "reflectors" ) ? ' class="active"' : '' ; ?> >< a
href="./index.php?show=reflectors">Reflectorlist< / a > < / li >
< li <?php echo ( $_GET [ 'show' ] == "liveircddb" ) ? ' class="active"' : '' ; ?> >< a
href="./index.php?show=liveircddb">D-Star live< / a > < / li >
< / ul >
< / ul >
< / div >
< / div >
< div class = "col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main" >
< div class = "col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main" >
@ -166,12 +184,23 @@ else {
}
}
switch ($_GET['show']) {
switch ($_GET['show']) {
case 'users' : require_once("./pgs/users.php"); break;
case 'users' :
case 'repeaters' : require_once("./pgs/repeaters.php"); break;
require_once("./pgs/users.php");
case 'liveircddb' : require_once("./pgs/liveircddb.php"); break;
break;
case 'peers' : require_once("./pgs/peers.php"); break;
case 'repeaters' :
case 'reflectors' : require_once("./pgs/reflectors.php"); break;
require_once("./pgs/repeaters.php");
default : require_once("./pgs/users.php");
break;
case 'liveircddb' :
require_once("./pgs/liveircddb.php");
break;
case 'peers' :
require_once("./pgs/peers.php");
break;
case 'reflectors' :
require_once("./pgs/reflectors.php");
break;
default :
require_once("./pgs/users.php");
}
}
?>
?>
@ -182,7 +211,8 @@ else {
< footer class = "footer" >
< footer class = "footer" >
< div class = "container" >
< div class = "container" >
< p >< a href = "mailto: <?php echo $PageOptions [ 'ContactEmail' ]; ?> " > <?php echo $PageOptions [ 'ContactEmail' ]; ?> </ a ></ p >
< p >< a href = "mailto: <?php echo $PageOptions [ 'ContactEmail' ]; ?> " > <?php echo $PageOptions [ 'ContactEmail' ]; ?> </ a >
< / p >
< / div >
< / div >
< / footer >
< / footer >