diff --git a/rating_tables.phtml b/rating_tables.phtml index d7d28a5..c70b3e2 100644 --- a/rating_tables.phtml +++ b/rating_tables.phtml @@ -1,52 +1,54 @@ "CDRTool_Session", - "auth" => "CDRTool_Auth", - "perm" => "CDRTool_Perm")); + array( + "sess" => "CDRTool_Session", + "auth" => "CDRTool_Auth", + "perm" => "CDRTool_Perm" + ) +); $perm->check("rates"); include("rating.php"); if ($perm->have_perm("readonly")) { - $RatingTables=new RatingTables('readonly'); + $RatingTables = new RatingTables('readonly'); } else { - $RatingTables=new RatingTables(); + $RatingTables = new RatingTables(); } if (!$_REQUEST['export']) { $title="Rating tables"; 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 = 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']]); + $h = sprintf("Content-Disposition: inline; filename=%s", $RatingTables->csv_export[$_REQUEST['table']]); Header($h); } if ($_REQUEST['import'] && $_REQUEST['table']) { - $RatingTables->importTable($_REQUEST['table']); + $RatingTables->importTable($_REQUEST['table']); } $RatingTables->updateTable(); $RatingTables->showTable(); if (!$_REQUEST['export']) { - $layout->showFooter(); + $layout->showFooter(); print " "; } page_close(); ?>