Remove label and use the name instead.

This commit is contained in:
markjcrane
2016-07-31 19:12:41 -06:00
parent acaf5cfcc6
commit 4ca991fafe
4 changed files with 54 additions and 55 deletions

View File

@@ -609,10 +609,10 @@
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = 'v_device_vendor';
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = 'device_vendor_uuid';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'label';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the label.';
$z++;
//$apps[$x]['db'][$y]['fields'][$z]['name'] = 'label';
//$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
//$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the label.';
//$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'name';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the name.';
@@ -829,7 +829,7 @@
$vendors[$y]['functions'][$z]['value'] = "none";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-url";
$vendors[$y]['functions'][$z]['name'] = "action_url";
$vendors[$y]['functions'][$z]['name'] = "url";
$vendors[$y]['functions'][$z]['value'] = "action_url";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-auto_answer";
@@ -857,7 +857,7 @@
$vendors[$y]['functions'][$z]['value'] = "dtmf";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-extension";
$vendors[$y]['functions'][$z]['name'] = "dest";
$vendors[$y]['functions'][$z]['name'] = "extension";
$vendors[$y]['functions'][$z]['value'] = "dest";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-redirect";
@@ -865,7 +865,7 @@
$vendors[$y]['functions'][$z]['value'] = "redirect";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-intercom";
$vendors[$y]['functions'][$z]['name'] = "icom";
$vendors[$y]['functions'][$z]['name'] = "intercom";
$vendors[$y]['functions'][$z]['value'] = "icom";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-ivr";
@@ -873,7 +873,7 @@
$vendors[$y]['functions'][$z]['value'] = "ivr";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-key_event";
$vendors[$y]['functions'][$z]['name'] = "keyevent";
$vendors[$y]['functions'][$z]['name'] = "key_event";
$vendors[$y]['functions'][$z]['value'] = "keyevent";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-line";
@@ -881,7 +881,7 @@
$vendors[$y]['functions'][$z]['value'] = "line";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-multicast_page";
$vendors[$y]['functions'][$z]['name'] = "multicast";
$vendors[$y]['functions'][$z]['name'] = "multicast_page";
$vendors[$y]['functions'][$z]['value'] = "multicast";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-orbit";
@@ -897,11 +897,11 @@
$vendors[$y]['functions'][$z]['value'] = "p2t";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-shared_line";
$vendors[$y]['functions'][$z]['name'] = "mult";
$vendors[$y]['functions'][$z]['name'] = "shared_line";
$vendors[$y]['functions'][$z]['value'] = "mult";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-speed_dial";
$vendors[$y]['functions'][$z]['name'] = "speed";
$vendors[$y]['functions'][$z]['name'] = "speed_dial";
$vendors[$y]['functions'][$z]['value'] = "speed";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-transfer";
@@ -909,7 +909,7 @@
$vendors[$y]['functions'][$z]['value'] = "transfer";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-record";
$vendors[$y]['functions'][$z]['name'] = "recorder";
$vendors[$y]['functions'][$z]['name'] = "record";
$vendors[$y]['functions'][$z]['value'] = "recorder";
$z++;
@@ -929,27 +929,27 @@
$vendors[$y]['functions'][$z]['value'] = "normal";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-messages";
$vendors[$y]['functions'][$z]['name'] = "Messages";
$vendors[$y]['functions'][$z]['name'] = "messages";
$vendors[$y]['functions'][$z]['value'] = "Messages";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-micmute";
$vendors[$y]['functions'][$z]['name'] = "MicMute";
$vendors[$y]['functions'][$z]['name'] = "micmute";
$vendors[$y]['functions'][$z]['value'] = "MicMute";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-redial";
$vendors[$y]['functions'][$z]['name'] = "Redial";
$vendors[$y]['functions'][$z]['name'] = "redial";
$vendors[$y]['functions'][$z]['value'] = "Redial";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-null";
$vendors[$y]['functions'][$z]['name'] = "Null";
$vendors[$y]['functions'][$z]['name'] = "null";
$vendors[$y]['functions'][$z]['value'] = "Null";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-speeddial";
$vendors[$y]['functions'][$z]['name'] = "SpeedDial";
$vendors[$y]['functions'][$z]['name'] = "speeddial";
$vendors[$y]['functions'][$z]['value'] = "SpeedDial";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-speeddialmenu";
$vendors[$y]['functions'][$z]['name'] = "SpeedDialMenu";
$vendors[$y]['functions'][$z]['name'] = "speeddialmenu";
$vendors[$y]['functions'][$z]['value'] = "SpeedDialMenu";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-url";
@@ -964,7 +964,7 @@
$vendors[$y]['functions'][$z]['value'] = "blf";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-blf_xfer";
$vendors[$y]['functions'][$z]['name'] = "blfxfer";
$vendors[$y]['functions'][$z]['name'] = "blf_xfer";
$vendors[$y]['functions'][$z]['value'] = "blfxfer";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-callers";
@@ -976,7 +976,7 @@
$vendors[$y]['functions'][$z]['value'] = "dnd";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-speed_dial";
$vendors[$y]['functions'][$z]['name'] = "speeddial";
$vendors[$y]['functions'][$z]['name'] = "speed_dial";
$vendors[$y]['functions'][$z]['value'] = "speeddial";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-xfer";
@@ -1128,7 +1128,7 @@
$vendors[$y]['functions'][$z]['description'] = "Enable/Disable SIP Account";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-xml_browser";
$vendors[$y]['functions'][$z]['name'] = "xml browser";
$vendors[$y]['functions'][$z]['name'] = "xml_browser";
$vendors[$y]['functions'][$z]['value'] = "18";
$vendors[$y]['functions'][$z]['enabled'] = "false";
$vendors[$y]['functions'][$z]['description'] = "XML Browser";
@@ -1152,7 +1152,7 @@
$vendors[$y]['functions'][$z]['value'] = "line";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-shared_line";
$vendors[$y]['functions'][$z]['name'] = "shared line";
$vendors[$y]['functions'][$z]['name'] = "shared_line";
$vendors[$y]['functions'][$z]['value'] = "shared line";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-speed_dial";
@@ -1164,19 +1164,19 @@
$vendors[$y]['functions'][$z]['value'] = "blf";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-presence_watcher";
$vendors[$y]['functions'][$z]['name'] = "presence watcher";
$vendors[$y]['functions'][$z]['name'] = "presence_watcher";
$vendors[$y]['functions'][$z]['value'] = "presence watcher";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-eventlist_blf";
$vendors[$y]['functions'][$z]['name'] = "eventlist blf";
$vendors[$y]['functions'][$z]['name'] = "eventlist_blf";
$vendors[$y]['functions'][$z]['value'] = "eventlist blf";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-speed_dial_active";
$vendors[$y]['functions'][$z]['name'] = "speed dial active";
$vendors[$y]['functions'][$z]['name'] = "speed_dial_active";
$vendors[$y]['functions'][$z]['value'] = "speed dial active";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-dial_dtmf";
$vendors[$y]['functions'][$z]['name'] = "dial dtmf";
$vendors[$y]['functions'][$z]['name'] = "dial_dtmf";
$vendors[$y]['functions'][$z]['value'] = "dial dtmf";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-voicemail";
@@ -1184,7 +1184,7 @@
$vendors[$y]['functions'][$z]['value'] = "voicemail";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-call_return";
$vendors[$y]['functions'][$z]['name'] = "call return";
$vendors[$y]['functions'][$z]['name'] = "call_return";
$vendors[$y]['functions'][$z]['value'] = "call return";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-transfer";
@@ -1192,7 +1192,7 @@
$vendors[$y]['functions'][$z]['value'] = "transfer";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-call_park";
$vendors[$y]['functions'][$z]['name'] = "call park";
$vendors[$y]['functions'][$z]['name'] = "call_park";
$vendors[$y]['functions'][$z]['value'] = "call park";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-intercom";
@@ -1200,7 +1200,7 @@
$vendors[$y]['functions'][$z]['value'] = "intercom";
$z++;
$vendors[$y]['functions'][$z]['label'] = "label-ldap_search";
$vendors[$y]['functions'][$z]['name'] = "ldap search";
$vendors[$y]['functions'][$z]['name'] = "ldap_search";
$vendors[$y]['functions'][$z]['value'] = "ldap search";
$y++; //vendors array index

View File

@@ -88,7 +88,7 @@ if ($domains_processed == 1) {
$sql .= "(";
$sql .= "device_vendor_uuid, ";
$sql .= "device_vendor_function_uuid, ";
$sql .= "label, ";
//$sql .= "label, ";
$sql .= "name, ";
$sql .= "value, ";
$sql .= "enabled, ";
@@ -98,7 +98,7 @@ if ($domains_processed == 1) {
$sql .= "( ";
$sql .= "'".$device_vendor_uuid."', ";
$sql .= "'".$device_vendor_function_uuid."', ";
$sql .= "'".$function['label']."', ";
//$sql .= "'".$function['label']."', ";
$sql .= "'".$function['name']."', ";
$sql .= "'".$function['value']."', ";
$sql .= "'true', ";

View File

@@ -58,7 +58,7 @@
//get http post variables and set them to php variables
if (count($_POST)>0) {
$label = check_str($_POST["label"]);
//$label = check_str($_POST["label"]);
$name = check_str($_POST["name"]);
$value = check_str($_POST["value"]);
$enabled = check_str($_POST["enabled"]);
@@ -73,7 +73,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
}
//check for all required data
if (strlen($label) == 0) { $msg .= $text['message-required']." ".$text['label-label']."<br>\n"; }
//if (strlen($label) == 0) { $msg .= $text['message-required']." ".$text['label-label']."<br>\n"; }
if (strlen($name) == 0) { $msg .= $text['message-required']." ".$text['label-name']."<br>\n"; }
if (strlen($value) == 0) { $msg .= $text['message-required']." ".$text['label-value']."<br>\n"; }
if (strlen($enabled) == 0) { $msg .= $text['message-required']." ".$text['label-enabled']."<br>\n"; }
@@ -98,7 +98,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$sql .= "(";
$sql .= "device_vendor_function_uuid, ";
$sql .= "device_vendor_uuid, ";
$sql .= "label, ";
//$sql .= "label, ";
$sql .= "name, ";
$sql .= "value, ";
$sql .= "enabled, ";
@@ -108,7 +108,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$sql .= "(";
$sql .= "'".uuid()."', ";
$sql .= "'$device_vendor_uuid', ";
$sql .= "'$label', ";
//$sql .= "'$label', ";
$sql .= "'$name', ";
$sql .= "'$value', ";
$sql .= "'$enabled', ";
@@ -126,7 +126,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
if ($action == "update" && permission_exists('device_vendor_function_edit')) {
$sql = "update v_device_vendor_functions set ";
$sql .= "device_vendor_uuid = '$device_vendor_uuid', ";
$sql .= "label = '$label', ";
//$sql .= "label = '$label', ";
$sql .= "name = '$name', ";
$sql .= "value = '$value', ";
$sql .= "enabled = '$enabled', ";
@@ -152,7 +152,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$prep_statement->execute();
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
foreach ($result as &$row) {
$label = $row["label"];
//$label = $row["label"];
$name = $row["name"];
$value = $row["value"];
$enabled = $row["enabled"];
@@ -175,16 +175,16 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-label']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='label' maxlength='255' value=\"$label\">\n";
echo "<br />\n";
echo $text['description-label']."\n";
echo "</td>\n";
echo "</tr>\n";
//echo "<tr>\n";
//echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
//echo " ".$text['label-label']."\n";
//echo "</td>\n";
//echo "<td class='vtable' align='left'>\n";
//echo " <input class='formfld' type='text' name='label' maxlength='255' value=\"$label\">\n";
//echo "<br />\n";
//echo $text['description-label']."\n";
//echo "</td>\n";
//echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";

View File

@@ -83,18 +83,17 @@
echo "<table width='100%' border='0'>\n";
echo " <tr>\n";
echo " <td width='50%' align='left' nowrap='nowrap'><b>".$text['title-device_vendor_functions']."</b></td>\n";
echo " <form method='get' action=''>\n";
echo " <td width='50%' style='vertical-align: top; text-align: right; white-space: nowrap;'>\n";
echo " <input type='text' class='txt' style='width: 150px' name='search' id='search' value='".$search."'>\n";
echo " <input type='submit' class='btn' name='submit' value='".$text['button-search']."'>\n";
echo " </td>\n";
echo " </form>\n";
//echo " <form method='get' action=''>\n";
//echo " <td width='50%' style='vertical-align: top; text-align: right; white-space: nowrap;'>\n";
//echo " <input type='text' class='txt' style='width: 150px' name='search' id='search' value='".$search."'>\n";
//echo " <input type='submit' class='btn' name='submit' value='".$text['button-search']."'>\n";
//echo " </td>\n";
//echo " </form>\n";
echo " </tr>\n";
echo "</table>\n";
echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
echo th_order_by('label', $text['label-label'], $order_by, $order);
echo th_order_by('name', $text['label-name'], $order_by, $order);
echo th_order_by('value', $text['label-value'], $order_by, $order);
echo th_order_by('enabled', $text['label-enabled'], $order_by, $order);
@@ -115,7 +114,7 @@
$tr_link = "href='device_vendor_function_edit.php?device_vendor_uuid=".$row['device_vendor_uuid']."&id=".$row['device_vendor_function_uuid']."'";
}
echo "<tr ".$tr_link.">\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['label']."&nbsp;</td>\n";
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['label']."&nbsp;</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['name']."&nbsp;</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['value']."&nbsp;</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['enabled']."&nbsp;</td>\n";