diff --git a/mysql_replication_status.phtml b/mysql_replication_status.phtml index cc624cc..a07ebf5 100644 --- a/mysql_replication_status.phtml +++ b/mysql_replication_status.phtml @@ -1,35 +1,38 @@ "CDRTool_Session", - "auth" => "CDRTool_Auth", - "perm" => "CDRTool_Perm")); + array( + "sess" => "CDRTool_Session", + "auth" => "CDRTool_Auth", + "perm" => "CDRTool_Perm" + ) +); $perm->check("admin"); -$title="MySQL replication status"; +$title = "MySQL replication status"; if (is_readable("/etc/cdrtool/local/header.phtml")) { include("/etc/cdrtool/local/header.phtml"); } else { include("header.phtml"); } $layout = new pageLayoutLocal(); $layout->showTopMenu($title); require("mysql_replication.php"); $ReplicationOverview = new ReplicationOverview($replicated_databases); $ReplicationOverview->showOverview(); - + $layout->showFooter(); print " - + "; page_close(); ?> diff --git a/prepaid_cards.phtml b/prepaid_cards.phtml index 45dd691..aea161a 100644 --- a/prepaid_cards.phtml +++ b/prepaid_cards.phtml @@ -1,61 +1,63 @@ "CDRTool_Session", - "auth" => "CDRTool_Auth", - "perm" => "CDRTool_Perm") - ); +page_open( + array( + "sess" => "CDRTool_Session", + "auth" => "CDRTool_Auth", + "perm" => "CDRTool_Perm" + ) +); require("prepaid.php"); -$loginname=$auth->auth["uname"]; +$loginname = $auth->auth["uname"]; $perm->check("rates"); -$title="Prepaid card generator"; +$title = "Prepaid card generator"; $action = $_REQUEST['action']; $batch = $_REQUEST['batch']; $confirm = $_REQUEST['confirm']; if ($action != "export") { if (is_readable("/etc/cdrtool/local/header.phtml")) { include("/etc/cdrtool/local/header.phtml"); } else { include("header.phtml"); } $layout = new pageLayoutLocal(); - $layout->showTopMenu($title); + $layout->showTopMenu($title); } else { Header("Content-type: text/plain"); Header("Content-Disposition: inline; filename=$batch.txt"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Pragma: no-cache"); } $PrepaidCards = new PrepaidCards(); if ($action == "generate") { - $PrepaidCards->generate(); - $PrepaidCards->showGenerateForm(); - $PrepaidCards->showBatches(); + $PrepaidCards->generate(); + $PrepaidCards->showGenerateForm(); + $PrepaidCards->showBatches(); } elseif ($action == "delete") { - $PrepaidCards->showGenerateForm(); - $PrepaidCards->deleteBatch($batch,$confirm); - $PrepaidCards->showBatches(); + $PrepaidCards->showGenerateForm(); + $PrepaidCards->deleteBatch($batch, $confirm); + $PrepaidCards->showBatches(); } elseif ($action == "export") { - $PrepaidCards->export($batch); + $PrepaidCards->export($batch); } else { - $PrepaidCards->showGenerateForm(); - $PrepaidCards->showBatches(); + $PrepaidCards->showGenerateForm(); + $PrepaidCards->showBatches(); } if ($action != "export") { print " - - "; +"; } page_close(); ?>