mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 19:53:56 +00:00
Add links to certain column text in a list view.
Add ability to edit Call Block number.
This commit is contained in:
@@ -127,10 +127,15 @@
|
||||
$text['label-edit-note']['pt-pt'] = "Bloquear chamadas a partir de um número. Edite o nome e active/desactive.";
|
||||
$text['label-edit-note']['fr-fr'] = "Bloquer les appels à partir d'un numéro. Editer le nom et activer/désactiver ci-dessous.";
|
||||
|
||||
$text['label-exact-number']['en-us'] = "Enter the exact number.";
|
||||
$text['label-exact-number']['es-cl'] = "Ingrese el nú exacto.";
|
||||
$text['label-exact-number']['pt-pt'] = "Introduza o número exacto.";
|
||||
$text['label-exact-number']['fr-fr'] = "Entrer le numéro exact.";
|
||||
$text['description-number']['en-us'] = "Enter the exact number.";
|
||||
$text['description-number']['es-cl'] = "Ingrese el nú exacto.";
|
||||
$text['description-number']['pt-pt'] = "Introduza o número exacto.";
|
||||
$text['description-number']['fr-fr'] = "Entrer le numéro exact.";
|
||||
|
||||
$text['description-name']['en-us'] = "Enter the name.";
|
||||
$text['description-name']['es-cl'] = "Introduzca el nombre.";
|
||||
$text['description-name']['pt-pt'] = "Digite o nome.";
|
||||
$text['description-name']['fr-fr'] = "Entrez le nom.";
|
||||
|
||||
$text['label-reject']['en-us'] = "Reject";
|
||||
$text['label-reject']['es-cl'] = "Rechazar";
|
||||
@@ -142,10 +147,10 @@
|
||||
$text['label-busy']['pt-pt'] = "Ocupado";
|
||||
$text['label-busy']['fr-fr'] = "Occupé";
|
||||
|
||||
$text['label-action-message']['en-us'] = "Set an action for calls from this number.";
|
||||
$text['label-action-message']['es-cl'] = "Configurar una acción para llamadas desde este número.";
|
||||
$text['label-action-message']['pt-pt'] = "Escolha uma acção para chamadas com origem neste número.";
|
||||
$text['label-action-message']['fr-fr'] = "Choisir une action pour les appels venant de ce numéro.";
|
||||
$text['description-action']['en-us'] = "Set an action for calls from this number.";
|
||||
$text['description-action']['es-cl'] = "Configurar una acción para llamadas desde este número.";
|
||||
$text['description-action']['pt-pt'] = "Escolha uma acção para chamadas com origem neste número.";
|
||||
$text['description-action']['fr-fr'] = "Choisir une action pour les appels venant de ce numéro.";
|
||||
|
||||
$text['label-true']['en-us'] = "True";
|
||||
$text['label-true']['es-cl'] = "Verdadero";
|
||||
@@ -157,10 +162,10 @@
|
||||
$text['label-false']['pt-pt'] = "Não";
|
||||
$text['label-false']['fr-fr'] = "Non";
|
||||
|
||||
$text['label-enable-message']['en-us'] = "Set to true to enable call blocking for this number.";
|
||||
$text['label-enable-message']['es-cl'] = "Seleccione verdadero para activar el bloqueo de llamadas desde este número.";
|
||||
$text['label-enable-message']['pt-pt'] = "Escolha 'sim' para activar o bloqueio de chamadas para este número.";
|
||||
$text['label-enable-message']['fr-fr'] = "Choisir Oui pour activer le bloquage d'appel. ";
|
||||
$text['description-enable']['en-us'] = "Set to true to enable call blocking for this number.";
|
||||
$text['description-enable']['es-cl'] = "Seleccione verdadero para activar el bloqueo de llamadas desde este número.";
|
||||
$text['description-enable']['pt-pt'] = "Escolha 'sim' para activar o bloqueio de chamadas para este número.";
|
||||
$text['description-enable']['fr-fr'] = "Choisir Oui pour activer le bloquage d'appel. ";
|
||||
|
||||
$text['button-save']['en-us'] = "Save";
|
||||
$text['button-save']['es-cl'] = "Guardar";
|
||||
|
||||
@@ -112,7 +112,7 @@ else {
|
||||
echo "<tr>\n";
|
||||
echo th_order_by('call_block_number', $text['label-number'], $order_by, $order);
|
||||
echo th_order_by('call_block_name', $text['label-name'], $order_by, $order);
|
||||
echo th_order_by('call_block_count', $text['label-count'], $order_by, $order);
|
||||
echo th_order_by('call_block_count', $text['label-count'], $order_by, $order, '', "style='text-align: center;'");
|
||||
echo th_order_by('date_added', $text['label-date-added'], $order_by, $order);
|
||||
echo th_order_by('call_block_action', $text['label-action'], $order_by, $order);
|
||||
echo th_order_by('call_block_enabled', $text['label-enabled'], $order_by, $order);
|
||||
@@ -125,18 +125,25 @@ else {
|
||||
|
||||
if ($result_count > 0) {
|
||||
foreach($result as $row) {
|
||||
echo "<tr >\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['call_block_number']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['call_block_name']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['call_block_count']." </td>\n";
|
||||
echo "<tr>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>";
|
||||
if (permission_exists('call_block_edit')) {
|
||||
echo "<a href='call_block_edit.php?id=".$row['call_block_uuid']."'>".$row['call_block_number']."</a>";
|
||||
}
|
||||
else {
|
||||
echo $row['call_block_number'];
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['call_block_name']."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."' style='text-align: center;'>".$row['call_block_count']."</td>\n";
|
||||
if (defined('TIME_24HR') && TIME_24HR == 1) {
|
||||
$tmp_date_added = date("j M Y H:i:s", $row['date_added']);
|
||||
} else {
|
||||
$tmp_date_added = date("j M Y h:i:sa", $row['date_added']);
|
||||
}
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$tmp_date_added." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['call_block_action']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['call_block_enabled']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$tmp_date_added."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['call_block_action']."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".ucwords($row['call_block_enabled'])."</td>\n";
|
||||
echo " <td class='list_control_icons'>";
|
||||
if (permission_exists('call_block_edit')) {
|
||||
echo "<a href='call_block_edit.php?id=".$row['call_block_uuid']."' alt='".$text['button-edit']."'>$v_link_label_edit</a>";
|
||||
|
||||
@@ -147,7 +147,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
if ($action == "update") {
|
||||
$sql = "update v_call_block set ";
|
||||
$sql .= "call_block_name = '$call_block_name', ";
|
||||
//$sql .= "call_block_number = '$call_block_number', ";
|
||||
$sql .= "call_block_number = '$call_block_number', ";
|
||||
$sql .= "call_block_action = '$call_block_action', ";
|
||||
$sql .= "call_block_enabled = '$call_block_enabled' ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
@@ -221,40 +221,34 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " Number:\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-number'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
if ($action == "add") {
|
||||
echo " <input class='formfld' type='text' name='call_block_number' maxlength='255' value=\"$call_block_number\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['label-exact-number']."\n";
|
||||
}
|
||||
else {
|
||||
echo $call_block_number;
|
||||
}
|
||||
echo " <input class='formfld' type='text' name='call_block_number' maxlength='255' value=\"$call_block_number\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-number']."\n";
|
||||
echo "<br />\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " Name:\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-name'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='call_block_name' maxlength='255' value=\"$call_block_name\">\n";
|
||||
echo "<br />\n";
|
||||
echo "Enter the name.\n";
|
||||
echo $text['description-name']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " Action:\n";
|
||||
echo " ".$text['label-action'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='call_block_action'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
$pieces = explode(" ", $call_block_action);
|
||||
$action = $pieces[0];
|
||||
$extension = $pieces[2];
|
||||
@@ -273,14 +267,14 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
call_block_get_extensions($extension);
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['label-action-message']."\n";
|
||||
echo $text['description-action']."\n";
|
||||
echo "\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " Enabled:\n";
|
||||
echo " ".$text['label-enabled'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='call_block_enabled'>\n";
|
||||
@@ -288,7 +282,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo " <option value='false' ".(($call_block_enabled == "false") ? "selected" : null).">".$text['label-false']."</option>\n";
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['label-enable-message']."\n";
|
||||
echo $text['description-enable']."\n";
|
||||
echo "\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
@@ -114,8 +114,8 @@ $order = $_GET["order"];
|
||||
//echo "<td valign='top'><a href='rssupdate.php?rss_uuid=".$row[rss_uuid]."'>".$row[rss_uuid]."</a></td>";
|
||||
//echo "<td valign='top'>".$row[rss_category]."</td>";
|
||||
|
||||
echo "<td valign='top' nowrap class='".$row_style[$c]."'> ".$row[rss_title]." </td>";
|
||||
echo "<td valign='top' nowrap class='".$row_style[$c]."'> <a href='/index.php?c=".$row[rss_link]."'>".$row[rss_link]."</a> </td>";
|
||||
echo "<td valign='top' nowrap class='".$row_style[$c]."'><a href='rssupdate.php?rss_uuid=".$row[rss_uuid]."'>".$row[rss_title]."</a></td>";
|
||||
echo "<td valign='top' nowrap class='".$row_style[$c]."'><a href='/index.php?c=".$row[rss_link]."'>".$row[rss_link]."</a></td>";
|
||||
//echo "<td valign='top' class='".$row_style[$c]."'>".$row[rss_sub_category]." </td>";
|
||||
if (strlen($row[rss_group]) > 0) {
|
||||
echo "<td valign='top' class='".$row_style[$c]."'>".$row[rss_group]."</td>";
|
||||
@@ -140,7 +140,7 @@ $order = $_GET["order"];
|
||||
//echo "<td valign='top'>".$row[rss_optional_3]."</td>";
|
||||
//echo "<td valign='top'>".$row[rss_optional_4]."</td>";
|
||||
//echo "<td valign='top'>".$row[rss_optional_5]."</td>";
|
||||
echo "<td valign='top' class='".$row_style[$c]."'>".$row[rss_order]." </td>";
|
||||
echo "<td valign='top' class='".$row_style[$c]."'>".$row[rss_order]."</td>";
|
||||
|
||||
//echo "<td valign='top' align='center'>";
|
||||
//echo " <input type='button' class='btn' name='' onclick=\"window.location='rssmoveup.php?menuparentid=".$row[menuparentid]."&rss_uuid=".$row[rss_uuid]."&rss_order=".$row[rss_order]."'\" value='<' title='".$row[rss_order].". Move Up'>";
|
||||
|
||||
@@ -379,7 +379,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-destination_number'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
|
||||
@@ -148,11 +148,11 @@ require_once "resources/paging.php";
|
||||
if ($result_count > 0) {
|
||||
foreach($result as $row) {
|
||||
echo "<tr >\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['destination_type']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['destination_number']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['destination_context']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['destination_enabled']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['destination_description']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".ucwords($row['destination_type'])."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'><a href='destination_edit.php?id=".$row['destination_uuid']."'>".$row['destination_number']."</a></td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['destination_context']."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".ucwords($row['destination_enabled'])."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['destination_description']."</td>\n";
|
||||
echo " <td class='list_control_icons'>";
|
||||
echo "<a href='destination_edit.php?id=".$row['destination_uuid']."' alt='".$text['button-edit']."'>$v_link_label_edit</a>";
|
||||
echo "<a href='destination_delete.php?id=".$row['destination_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>";
|
||||
|
||||
@@ -166,7 +166,14 @@ else {
|
||||
|
||||
echo "<tr >\n";
|
||||
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['device_uuid']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['device_mac_address']." </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>";
|
||||
}
|
||||
else {
|
||||
echo $row['device_mac_address'];
|
||||
}
|
||||
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";
|
||||
|
||||
@@ -198,30 +198,20 @@ else {
|
||||
echo th_order_by('dialplan_enabled', $text['label-enabled'], $order_by, $order, $app_uuid);
|
||||
echo th_order_by('dialplan_description', $text['label-description'], $order_by, $order, $app_uuid);
|
||||
echo "<td class='list_control_icons'>";
|
||||
if ($app_uuid == "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4") {
|
||||
if (permission_exists('inbound_route_add')) {
|
||||
echo "<a href='".PROJECT_PATH."/app/dialplan_inbound/dialplan_inbound_add.php' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||
}
|
||||
if ($app_uuid == "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4" && permission_exists('inbound_route_add')) {
|
||||
echo "<a href='".PROJECT_PATH."/app/dialplan_inbound/dialplan_inbound_add.php' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||
}
|
||||
elseif ($app_uuid == "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3") {
|
||||
if (permission_exists('outbound_route_add')) {
|
||||
echo "<a href='".PROJECT_PATH."/app/dialplan_outbound/dialplan_outbound_add.php' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||
}
|
||||
elseif ($app_uuid == "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3" && permission_exists('outbound_route_add')) {
|
||||
echo "<a href='".PROJECT_PATH."/app/dialplan_outbound/dialplan_outbound_add.php' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||
}
|
||||
elseif ($app_uuid == "16589224-c876-aeb3-f59f-523a1c0801f7") {
|
||||
if (permission_exists('fifo_add')) {
|
||||
echo "<a href='".PROJECT_PATH."/app/fifo/fifo_add.php' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||
}
|
||||
elseif ($app_uuid == "16589224-c876-aeb3-f59f-523a1c0801f7" && permission_exists('fifo_add')) {
|
||||
echo "<a href='".PROJECT_PATH."/app/fifo/fifo_add.php' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||
}
|
||||
elseif ($app_uuid == "4b821450-926b-175a-af93-a03c441818b1") {
|
||||
if (permission_exists('time_condition_add')) {
|
||||
echo "<a href='".PROJECT_PATH."/app/time_conditions/time_condition_add.php' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||
}
|
||||
elseif ($app_uuid == "4b821450-926b-175a-af93-a03c441818b1" && permission_exists('time_condition_add')) {
|
||||
echo "<a href='".PROJECT_PATH."/app/time_conditions/time_condition_add.php' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||
}
|
||||
else {
|
||||
if (permission_exists('dialplan_add')) {
|
||||
echo "<a href='dialplan_add.php' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||
}
|
||||
elseif (permission_exists('dialplan_add')) {
|
||||
echo "<a href='dialplan_add.php' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||
}
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
@@ -255,54 +245,45 @@ else {
|
||||
unset ($prep_statement);
|
||||
}
|
||||
echo "<tr >\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['dialplan_name']."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".((strlen($row['dialplan_number']) > 0) ? $row['dialplan_number'] : " ")."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['dialplan_context']."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['dialplan_order']."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['dialplan_enabled']."</td>\n";
|
||||
echo " <td valign='top' class='row_stylebg' width='30%'>".((strlen($row['dialplan_description']) > 0) ? $row['dialplan_description'] : " ")."</td>\n";
|
||||
echo " <td class='list_control_icons'>\n";
|
||||
if ($app_uuid == "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4") {
|
||||
if (permission_exists('inbound_route_edit')) {
|
||||
echo "<a href='dialplan_edit.php?id=".$row['dialplan_uuid']."&app_uuid=$app_uuid' alt='".$text['button-edit']."'>$v_link_label_edit</a>";
|
||||
}
|
||||
if (permission_exists('inbound_route_delete')) {
|
||||
echo "<a href='dialplan_delete.php?id=".$row['dialplan_uuid']."&app_uuid=$app_uuid' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>";
|
||||
}
|
||||
}
|
||||
elseif ($app_uuid == "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3") {
|
||||
if (permission_exists('outbound_route_edit')) {
|
||||
echo "<a href='dialplan_edit.php?id=".$row['dialplan_uuid']."&app_uuid=$app_uuid' alt='".$text['button-edit']."'>$v_link_label_edit</a>";
|
||||
}
|
||||
if (permission_exists('outbound_route_delete')) {
|
||||
echo "<a href='dialplan_delete.php?id=".$row['dialplan_uuid']."&app_uuid=$app_uuid' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>";
|
||||
}
|
||||
}
|
||||
elseif ($app_uuid == "16589224-c876-aeb3-f59f-523a1c0801f7") {
|
||||
if (permission_exists('fifo_edit')) {
|
||||
echo "<a href='dialplan_edit.php?id=".$row['dialplan_uuid']."&app_uuid=$app_uuid' alt='".$text['button-edit']."'>$v_link_label_edit</a>";
|
||||
}
|
||||
if (permission_exists('fifo_delete')) {
|
||||
echo "<a href='dialplan_delete.php?id=".$row['dialplan_uuid']."&app_uuid=$app_uuid' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>";
|
||||
}
|
||||
}
|
||||
elseif ($app_uuid == "4b821450-926b-175a-af93-a03c441818b1") {
|
||||
if (permission_exists('time_condition_edit')) {
|
||||
echo "<a href='dialplan_edit.php?id=".$row['dialplan_uuid']."&app_uuid=$app_uuid' alt='".$text['button-edit']."'>$v_link_label_edit</a>";
|
||||
}
|
||||
if (permission_exists('time_condition_delete')) {
|
||||
echo "<a href='dialplan_delete.php?id=".$row['dialplan_uuid']."&app_uuid=$app_uuid' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>";
|
||||
}
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>";
|
||||
if (
|
||||
($app_uuid == "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4" && permission_exists('inbound_route_edit')) ||
|
||||
($app_uuid == "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3" && permission_exists('outbound_route_edit')) ||
|
||||
($app_uuid == "16589224-c876-aeb3-f59f-523a1c0801f7" && permission_exists('fifo_edit')) ||
|
||||
($app_uuid == "4b821450-926b-175a-af93-a03c441818b1" && permission_exists('time_condition_edit')) ||
|
||||
permission_exists('dialplan_edit')
|
||||
) {
|
||||
echo "<a href='dialplan_edit.php?id=".$row['dialplan_uuid']."&app_uuid=$app_uuid'>".$row['dialplan_name']."</a>";
|
||||
}
|
||||
else {
|
||||
if (permission_exists('dialplan_edit')) {
|
||||
echo "<a href='dialplan_edit.php?id=".$row['dialplan_uuid']."&app_uuid=$app_uuid' alt='".$text['button-edit']."'>$v_link_label_edit</a>";
|
||||
}
|
||||
if (permission_exists('dialplan_delete')) {
|
||||
echo "<a href='dialplan_delete.php?id=".$row['dialplan_uuid']."&app_uuid=$app_uuid' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>";
|
||||
}
|
||||
echo $row['dialplan_name'];
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".((strlen($row['dialplan_number']) > 0) ? $row['dialplan_number'] : " ")."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['dialplan_context']."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['dialplan_order']."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['dialplan_enabled']."</td>\n";
|
||||
echo " <td valign='top' class='row_stylebg' width='30%'>".((strlen($row['dialplan_description']) > 0) ? $row['dialplan_description'] : " ")."</td>\n";
|
||||
echo " <td class='list_control_icons'>\n";
|
||||
if (
|
||||
($app_uuid == "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4" && permission_exists('inbound_route_edit')) ||
|
||||
($app_uuid == "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3" && permission_exists('outbound_route_edit')) ||
|
||||
($app_uuid == "16589224-c876-aeb3-f59f-523a1c0801f7" && permission_exists('fifo_edit')) ||
|
||||
($app_uuid == "4b821450-926b-175a-af93-a03c441818b1" && permission_exists('time_condition_edit')) ||
|
||||
permission_exists('dialplan_edit')
|
||||
) {
|
||||
echo "<a href='dialplan_edit.php?id=".$row['dialplan_uuid']."&app_uuid=$app_uuid' alt='".$text['button-edit']."'>$v_link_label_edit</a>";
|
||||
}
|
||||
if (
|
||||
($app_uuid == "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4" && permission_exists('inbound_route_delete')) ||
|
||||
($app_uuid == "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3" && permission_exists('outbound_route_delete')) ||
|
||||
($app_uuid == "16589224-c876-aeb3-f59f-523a1c0801f7" && permission_exists('fifo_delete')) ||
|
||||
($app_uuid == "4b821450-926b-175a-af93-a03c441818b1" && permission_exists('time_condition_delete')) ||
|
||||
permission_exists('dialplan_delete')
|
||||
) {
|
||||
echo "<a href='dialplan_delete.php?id=".$row['dialplan_uuid']."&app_uuid=$app_uuid' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>";
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
if ($c==0) { $c=1; } else { $c=0; }
|
||||
} //end foreach
|
||||
@@ -316,32 +297,21 @@ else {
|
||||
echo " <td width='33.3%' nowrap> </td>\n";
|
||||
echo " <td width='33.3%' align='center' nowrap>".$paging_controls."</td>\n";
|
||||
echo " <td class='list_control_icons'>";
|
||||
if ($app_uuid == "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4") {
|
||||
if (permission_exists('inbound_route_add')) {
|
||||
echo "<a href='".PROJECT_PATH."/app/dialplan_inbound/dialplan_inbound_add.php' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||
}
|
||||
if ($app_uuid == "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4" && permission_exists('inbound_route_add')) {
|
||||
echo "<a href='".PROJECT_PATH."/app/dialplan_inbound/dialplan_inbound_add.php' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||
}
|
||||
elseif ($app_uuid == "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3") {
|
||||
if (permission_exists('outbound_route_add')) {
|
||||
echo "<a href='".PROJECT_PATH."/app/dialplan_outbound/dialplan_outbound_add.php' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||
}
|
||||
elseif ($app_uuid == "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3" && permission_exists('outbound_route_add')) {
|
||||
echo "<a href='".PROJECT_PATH."/app/dialplan_outbound/dialplan_outbound_add.php' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||
}
|
||||
elseif ($app_uuid == "16589224-c876-aeb3-f59f-523a1c0801f7") {
|
||||
if (permission_exists('fifo_add')) {
|
||||
echo "<a href='".PROJECT_PATH."/app/fifo/fifo_add.php' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||
}
|
||||
elseif ($app_uuid == "16589224-c876-aeb3-f59f-523a1c0801f7" && permission_exists('fifo_add')) {
|
||||
echo "<a href='".PROJECT_PATH."/app/fifo/fifo_add.php' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||
}
|
||||
elseif ($app_uuid == "4b821450-926b-175a-af93-a03c441818b1") {
|
||||
if (permission_exists('time_condition_add')) {
|
||||
echo "<a href='".PROJECT_PATH."/app/time_conditions/time_condition_add.php' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||
}
|
||||
elseif ($app_uuid == "4b821450-926b-175a-af93-a03c441818b1" && permission_exists('time_condition_add')) {
|
||||
echo "<a href='".PROJECT_PATH."/app/time_conditions/time_condition_add.php' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||
}
|
||||
else {
|
||||
if (permission_exists('dialplan_add')) {
|
||||
echo "<a href='dialplan_add.php' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||
}
|
||||
elseif (permission_exists('dialplan_add')) {
|
||||
echo "<a href='dialplan_add.php' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||
}
|
||||
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " </table>\n";
|
||||
|
||||
@@ -152,8 +152,16 @@ require_once "resources/paging.php";
|
||||
|
||||
if ($result_count > 0) {
|
||||
foreach($result as $row) {
|
||||
echo "<tr >\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['extension']."</td>\n";
|
||||
$tr_link = (permission_exists('extension_edit')) ? "style='cursor: pointer;' onclick=\"document.location.href='extension_edit.php?id=".$row['extension_uuid']."';\"" : null;
|
||||
echo "<tr ".$tr_link.">\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>";
|
||||
if (permission_exists('extension_edit')) {
|
||||
echo "<a href='extension_edit.php?id=".$row['extension_uuid']."'>".$row['extension']."</a>";
|
||||
}
|
||||
else {
|
||||
echo $row['extension'];
|
||||
}
|
||||
echo "</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['call_group']." </td>\n";
|
||||
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['voicemail_mail_to']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['enabled']."</td>\n";
|
||||
|
||||
@@ -165,7 +165,14 @@ else {
|
||||
if ($num_rows > 0) {
|
||||
foreach($result as $row) {
|
||||
echo "<tr >\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row["gateway"]."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>";
|
||||
if (permission_exists('gateway_edit')) {
|
||||
echo "<a href='gateway_edit.php?id=".$row['gateway_uuid']."'>".$row["gateway"]."</a>";
|
||||
}
|
||||
else {
|
||||
echo $row["gateway"];
|
||||
}
|
||||
echo "</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row["context"]."</td>\n";
|
||||
if ($fp) {
|
||||
if ($row["enabled"] == "true") {
|
||||
|
||||
@@ -157,8 +157,15 @@ if (strlen($_GET["a"]) > 0) {
|
||||
}
|
||||
|
||||
echo "<tr >\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row["module_label"]."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row["module_description"]." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>";
|
||||
if (permission_exists('module_edit')) {
|
||||
echo "<a href='module_edit.php?id=".$row["module_uuid"]."'>".$row["module_label"]."</a>";
|
||||
}
|
||||
else {
|
||||
echo $row["module_label"];
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row["module_description"]." </td>\n";
|
||||
if ($mod->active($row["module_name"])) {
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$text['label-running']."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'><a href='modules.php?a=stop&m=".$row["module_name"]."' alt='".$text['label-stop']."'>".$text['label-stop']."</a></td>\n";
|
||||
|
||||
@@ -128,8 +128,15 @@ else {
|
||||
}
|
||||
|
||||
echo "<tr >\n";
|
||||
echo " <td valign='top' align='left' class='".$row_style[$c]."'>".substr($row['var_name'],0,32)." </td>\n";
|
||||
echo " <td valign='top' align='left' class='".$row_style[$c]."'>".substr($var_value,0,30)." </td>\n";
|
||||
echo " <td valign='top' align='left' class='".$row_style[$c]."'>";
|
||||
if (permission_exists('var_edit')) {
|
||||
echo "<a href='var_edit.php?id=".$row['var_uuid']."'>".substr($row['var_name'],0,32)."</a>";
|
||||
}
|
||||
else {
|
||||
echo substr($row['var_name'],0,32);
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " <td valign='top' align='left' class='".$row_style[$c]."'>".substr($var_value,0,30)."</td>\n";
|
||||
echo " <td valign='top' align='left' class='".$row_style[$c]."'>";
|
||||
if ($row['var_enabled'] == "true") {
|
||||
echo $text['option-true'];
|
||||
|
||||
Reference in New Issue
Block a user