Add a fax server count.
This commit is contained in:
+19
-17
@@ -33,8 +33,10 @@ else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/paging.php";
|
||||
|
||||
//additional includes
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/paging.php";
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
@@ -44,18 +46,7 @@ require_once "resources/paging.php";
|
||||
$order_by = check_str($_GET["order_by"]);
|
||||
$order = check_str($_GET["order"]);
|
||||
|
||||
//show the content
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td align='left'>\n";
|
||||
echo " <span class=\"title\">".$text['title-fax']."</span>";
|
||||
echo " <br /><br />\n";
|
||||
echo " ".$text['description']."\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo "</table>\n";
|
||||
echo "<br />\n";
|
||||
|
||||
//get the fax extensions
|
||||
if (if_group("superadmin") || if_group("admin")) {
|
||||
//show all fax extensions
|
||||
$sql = "select count(*) as num_rows from v_fax ";
|
||||
@@ -109,9 +100,20 @@ require_once "resources/paging.php";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_ASSOC);
|
||||
$result_count = count($result);
|
||||
unset ($prep_statement, $sql);
|
||||
|
||||
//show the content
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td align='left'>\n";
|
||||
echo " <span class=\"title\">".$text['title-fax']." (".$num_rows.")</span>";
|
||||
echo " <br /><br />\n";
|
||||
echo " ".$text['description']."\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo "</table>\n";
|
||||
echo "<br />\n";
|
||||
|
||||
$c = 0;
|
||||
$row_style["0"] = "row_style0";
|
||||
$row_style["1"] = "row_style1";
|
||||
@@ -130,7 +132,7 @@ require_once "resources/paging.php";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
if ($result_count > 0) {
|
||||
if ($num_rows > 0) {
|
||||
foreach($result as $row) {
|
||||
//remove the backslash
|
||||
$row['fax_email'] = str_replace("\\", "", $row['fax_email']);
|
||||
@@ -182,7 +184,7 @@ require_once "resources/paging.php";
|
||||
//alternate the CSS class
|
||||
if ($c==0) { $c=1; } else { $c=0; }
|
||||
} //end foreach
|
||||
unset($sql, $result, $row_count);
|
||||
unset($sql, $result);
|
||||
} //end if results
|
||||
|
||||
echo "<tr>\n";
|
||||
|
||||
Reference in New Issue
Block a user