mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Devices: Added GUI for new Key Profiles feature.
Destinations: Fixed missing label.
This commit is contained in:
@@ -49,24 +49,23 @@ else {
|
||||
require_once "resources/paging.php";
|
||||
|
||||
//show the content
|
||||
echo "<br />";
|
||||
echo "<div align='center'>";
|
||||
echo "<table width='100%' border='0'>\n";
|
||||
echo "<table width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td width='50%' align='left' nowrap='nowrap'><b>".$text['header-devices']."</b></td>\n";
|
||||
echo " <form method='get' action=''>\n";
|
||||
echo " <td width='30%' align='right'>\n";
|
||||
echo " <input type='text' class='txt' style='width: 150px' name='search' value='$search'>";
|
||||
echo " <input type='submit' class='btn' name='submit' value='".$text['button-search']."'>";
|
||||
echo " </td>\n";
|
||||
echo " </form>\n";
|
||||
echo " </tr>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td align='left' colspan='2'>\n";
|
||||
echo " ".$text['description-devices']."<br /><br />\n";
|
||||
echo " <td width='100%' align='left' valign='top'>";
|
||||
echo " <b>".$text['header-devices']."</b>";
|
||||
echo " <br /><br />";
|
||||
echo " ".$text['description-devices'];
|
||||
echo " </td>\n";
|
||||
echo " <td align='right' nowrap='nowrap' valign='top'>\n";
|
||||
echo " <form method='get' action=''>\n";
|
||||
echo " <input type='button' class='btn' value='".$text['button-profiles']."' onclick=\"document.location.href='device_profiles.php';\">";
|
||||
echo " <input type='text' class='txt' style='width: 150px' name='search' value='$search'>";
|
||||
echo " <input type='submit' class='btn' name='submit' value='".$text['button-search']."'>";
|
||||
echo " </form>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo "</table>\n";
|
||||
echo "<br />";
|
||||
|
||||
//prepare to page the results
|
||||
$sql = "select count(*) as num_rows from v_devices ";
|
||||
@@ -81,7 +80,6 @@ else {
|
||||
$sql .= " or device_description like '%".$search."%' ";
|
||||
$sql .= ") ";
|
||||
}
|
||||
//if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; }
|
||||
$prep_statement = $db->prepare($sql);
|
||||
if ($prep_statement) {
|
||||
$prep_statement->execute();
|
||||
@@ -132,22 +130,15 @@ else {
|
||||
$row_style["0"] = "row_style0";
|
||||
$row_style["1"] = "row_style1";
|
||||
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
//echo th_order_by('device_uuid', $text['label-device_uuid'], $order_by, $order);
|
||||
echo th_order_by('device_mac_address', $text['label-device_mac_address'], $order_by, $order);
|
||||
echo th_order_by('device_label', $text['label-device_label'], $order_by, $order);
|
||||
echo th_order_by('device_vendor', $text['label-device_vendor'], $order_by, $order);
|
||||
//echo th_order_by('device_model', $text['label-device_model'], $order_by, $order);
|
||||
//echo th_order_by('device_firmware_version', $text['label-device_firmware_version'], $order_by, $order);
|
||||
echo th_order_by('device_provision_enable', $text['label-device_provision_enable'], $order_by, $order);
|
||||
echo th_order_by('device_template', $text['label-device_template'], $order_by, $order);
|
||||
//echo th_order_by('device_username', $text['label-device_username'], $order_by, $order);
|
||||
//echo th_order_by('device_password', $text['label-device_password'], $order_by, $order);
|
||||
//echo th_order_by('device_time_zone', $text['label-device_time_zone'], $order_by, $order);
|
||||
echo th_order_by('device_description', $text['label-device_description'], $order_by, $order);
|
||||
echo "<td align='right' width='42'>\n";
|
||||
echo "<td class='list_control_icons'>\n";
|
||||
if (permission_exists('device_add')) {
|
||||
echo " <a href='device_edit.php' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
|
||||
}
|
||||
@@ -164,7 +155,6 @@ else {
|
||||
|
||||
$tr_link = (permission_exists('device_edit')) ? "href='device_edit.php?id=".$row['device_uuid']."'" : null;
|
||||
echo "<tr ".$tr_link.">\n";
|
||||
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['device_uuid']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>";
|
||||
if (permission_exists('device_edit')) {
|
||||
echo "<a href='device_edit.php?id=".$row['device_uuid']."'>".$row['device_mac_address']."</a>";
|
||||
@@ -175,13 +165,8 @@ else {
|
||||
echo " </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['device_label']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['device_vendor']." </td>\n";
|
||||
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['device_model']." </td>\n";
|
||||
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['device_firmware_version']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['device_provision_enable']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$text['label-'.$row['device_provision_enable']]." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['device_template']." </td>\n";
|
||||
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['device_username']." </td>\n";
|
||||
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['device_password']." </td>\n";
|
||||
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['device_time_zone']." </td>\n";
|
||||
echo " <td valign='top' class='row_stylebg'>".$row['device_description']." </td>\n";
|
||||
echo " <td class='list_control_icons'>";
|
||||
if (permission_exists('device_edit')) {
|
||||
@@ -198,19 +183,14 @@ else {
|
||||
} //end if results
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td colspan='8' align='left'>\n";
|
||||
echo "<td colspan='8'>\n";
|
||||
echo " <table width='100%' cellpadding='0' cellspacing='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td width='33.3%' nowrap='nowrap'> </td>\n";
|
||||
echo " <td width='33.3%' nowrap='nowrap'> </td>\n";
|
||||
echo " <td width='33.3%' nowrap='nowrap'> </td>\n";
|
||||
echo " <td width='33.3%' align='center' nowrap='nowrap'>$paging_controls</td>\n";
|
||||
echo " <td width='33.3%' align='center' nowrap='nowrap'>".$paging_controls."</td>\n";
|
||||
echo " <td class='list_control_icons'>";
|
||||
if (permission_exists('device_add')) {
|
||||
echo "<a href='device_edit.php' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||
}
|
||||
else {
|
||||
echo " ";
|
||||
echo " <a href='device_edit.php' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
@@ -218,7 +198,6 @@ else {
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "</table>";
|
||||
echo "</div>";
|
||||
echo "<br /><br />";
|
||||
|
||||
//include the footer
|
||||
|
||||
Reference in New Issue
Block a user