Update devices.php

Correct the layout of the device description.
This commit is contained in:
FusionPBX
2016-07-26 09:37:54 -06:00
committed by GitHub
parent 5c0d1326f2
commit 32ef5c7203
+21 -13
View File
@@ -22,16 +22,20 @@
Contributor(s): Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
*/ */
require_once "root.php";
require_once "resources/require.php"; //includes
require_once "resources/check_auth.php"; require_once "root.php";
if (permission_exists('device_view')) { require_once "resources/require.php";
//access granted require_once "resources/check_auth.php";
}
else { //check permissions
echo "access denied"; if (permission_exists('device_view')) {
exit; //access granted
} }
else {
echo "access denied";
exit;
}
//additional includes //additional includes
require_once "resources/header.php"; require_once "resources/header.php";
@@ -49,7 +53,8 @@ else {
} }
//get total devices count from the database //get total devices count from the database
$sql = "select count(*) as num_rows from v_devices where domain_uuid = '".$_SESSION['domain_uuid']."' "; $sql = "select count(*) as num_rows from v_devices ";
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
$prep_statement = $db->prepare($sql); $prep_statement = $db->prepare($sql);
if ($prep_statement) { if ($prep_statement) {
$prep_statement->execute(); $prep_statement->execute();
@@ -162,8 +167,6 @@ else {
echo " <tr>\n"; echo " <tr>\n";
echo " <td width='100%' align='left' valign='top'>"; echo " <td width='100%' align='left' valign='top'>";
echo " <b>".$text['header-devices']." (".$num_rows.")</b>"; echo " <b>".$text['header-devices']." (".$num_rows.")</b>";
echo " <br /><br />";
echo " ".$text['description-devices'];
echo " </td>\n"; echo " </td>\n";
echo " <td align='right' nowrap='nowrap' valign='top'>\n"; echo " <td align='right' nowrap='nowrap' valign='top'>\n";
echo " <form method='get' action=''>\n"; echo " <form method='get' action=''>\n";
@@ -183,6 +186,11 @@ else {
echo " </form>\n"; echo " </form>\n";
echo " </td>\n"; echo " </td>\n";
echo " </tr>\n"; echo " </tr>\n";
echo " <tr>\n";
echo " <td colspan='2'>\n";
echo " ".$text['description-devices'];
echo " </td>\n";
echo " </tr>\n";
echo "</table>\n"; echo "</table>\n";
echo "<br />"; echo "<br />";