diff --git a/rating_tables.phtml b/rating_tables.phtml index c70b3e2..a8ccf0d 100644 --- a/rating_tables.phtml +++ b/rating_tables.phtml @@ -1,54 +1,54 @@ "CDRTool_Session", "auth" => "CDRTool_Auth", "perm" => "CDRTool_Perm" ) ); $perm->check("rates"); include("rating.php"); if ($perm->have_perm("readonly")) { $RatingTables = new RatingTables('readonly'); } else { $RatingTables = new RatingTables(); } if (!$_REQUEST['export']) { $title="Rating tables"; if (is_readable("/etc/cdrtool/local/header.phtml")) { - include("/etc/cdrtool/local/header.phtml"); + include '/etc/cdrtool/local/header.phtml'; } else { - include("header.phtml"); + include 'header.phtml'; } $layout = new pageLayoutLocal(); $layout->showTopMenu($title); } else { print $RatingTables->table_to_csv_name[$_REQUEST['table']]; Header("Content-type: text/csv"); $h = sprintf("Content-Disposition: inline; filename=%s", $RatingTables->csv_export[$_REQUEST['table']]); Header($h); } if ($_REQUEST['import'] && $_REQUEST['table']) { $RatingTables->importTable($_REQUEST['table']); } $RatingTables->updateTable(); $RatingTables->showTable(); if (!$_REQUEST['export']) { $layout->showFooter(); print " "; } page_close(); ?> diff --git a/sip_enrollment.phtml b/sip_enrollment.phtml index 5e68b17..539ac11 100644 --- a/sip_enrollment.phtml +++ b/sip_enrollment.phtml @@ -1,20 +1,20 @@ createAccount(); ?> diff --git a/sip_login.phtml b/sip_login.phtml index aec7b15..ab0f25f 100644 --- a/sip_login.phtml +++ b/sip_login.phtml @@ -1,155 +1,155 @@

"; print _("Login"); print "

"; ?> "; print _("Either your SIP account or password are invalid"); print "

$login_msg

"; } ?>
"; ?>
auth["uname"]; } else if (isset($_REQUEST['username'])) { print $_REQUEST['username']; } ?>" placeholder="Example: " size=35 maxlength=50 class='span11'>
"; ?>
>
"; } else { print '

'; print _("SIP address or password forgotten?"); print "

"; } $sess->hidden_session(); ?>

SIP address or password forgotten?

diff --git a/sip_usage.phtml b/sip_usage.phtml index 86309dc..0edf825 100644 --- a/sip_usage.phtml +++ b/sip_usage.phtml @@ -1,277 +1,278 @@ "CDRTool_Session", "auth" => "CDRTool_Auth", "perm" => "CDRTool_Perm" - )); + ) +); -$loginname=$auth->auth["uname"]; +$loginname = $auth->auth["uname"]; $perm->check("statistics"); $start_date = isset($_REQUEST['start_date']) ? new DateTime($_REQUEST['start_date']) : new DateTime('-1 days'); $stop_date = isset($_REQUEST['stop_date']) ? new DateTime($_REQUEST['stop_date']) : new DateTime('now'); if ($start_date == $stop_date){ $start_date = $start_date->setTime(00, 00, 00); $stop_date = $stop_date->setTime(00, 00, 00); $stop_date->add(new DateInterval('P1D')); } global $CDRTool; -require("sip_statistics.php"); +require 'sip_statistics.php'; // trap AJAX requests if (isset($_POST['action'])) { switch ($_POST['action']) { case 'log': $layout = new pageLayoutLocal(); try { $entity = new MRTGEntity($_POST['entity']); $json = $entity->retrieveLog(); } catch (Exception $e) { $json = json_encode(array('error' => "entity not found")); } - break; + break; } // return data and terminate print $json; exit; } // setup $mrtggraphs = new MRTGGraphs(); ?> var start_date_set=\"".$start_date->format('Y-m-d H:i:s')."\";var stop_date_set=\"".$stop_date->format('Y-m-d H:i:s')."\";";?>
format('F j, Y H:i:s')." - ".$stop_date->format('F j, Y H:i:s')?>

entities) ; foreach ($mrtggraphs->entities as $entity) : if (strstr($entity->name,'total')) { ?>

title; ?> (MRTG)


entities) ; foreach ($mrtggraphs->entities as $entity) : if (!strstr($entity->name,'total')) { if ($counter == 3){ $counter = 0; print "
"; } $counter++; ?>

title; ?> (MRTG)

layout->showFooter(); ?>