Response message updates.
This commit is contained in:
parent
79c7ecadf7
commit
107efa90c9
|
|
@ -107,6 +107,11 @@
|
|||
$text['label-edit-add']['pt-pt'] = "Adicionar Bloqueio de Chamadas";
|
||||
$text['label-edit-add']['fr-fr'] = "Ajouter bloquage d'appel";
|
||||
|
||||
$text['label-edit-add-recent']['en-us'] = "Recent Calls";
|
||||
$text['label-edit-add-recent']['es-cl'] = "Llamadas Recientes";
|
||||
$text['label-edit-add-recent']['pt-pt'] = "Chamadas Recentes";
|
||||
$text['label-edit-add-recent']['fr-fr'] = "Appels Récents";
|
||||
|
||||
$text['label-edit-edit']['en-us'] = "Call Block Edit";
|
||||
$text['label-edit-edit']['es-cl'] = "Editar bloqueo de llamada";
|
||||
$text['label-edit-edit']['pt-pt'] = "Editar Bloqueio de Chamadas";
|
||||
|
|
|
|||
|
|
@ -89,9 +89,9 @@ else {
|
|||
$rows_per_page = 10;
|
||||
$param = "";
|
||||
$page = $_GET['page'];
|
||||
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
||||
list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page);
|
||||
$offset = $rows_per_page * $page;
|
||||
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
||||
list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page);
|
||||
$offset = $rows_per_page * $page;
|
||||
|
||||
//get the list
|
||||
$sql = " select * from v_call_block ";
|
||||
|
|
@ -142,7 +142,7 @@ else {
|
|||
echo " <a href='call_block_edit.php?id=".$row['call_block_uuid']."' alt='".$text['button-edit']."'>$v_link_label_edit</a>\n";
|
||||
}
|
||||
if (permission_exists('call_block_delete')) {
|
||||
echo " <a href='call_block_delete.php?id=".$row['call_block_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm(".$text['confirm-delete'].")\">$v_link_label_delete</a>\n";
|
||||
echo " <a href='call_block_delete.php?id=".$row['call_block_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>\n";
|
||||
};
|
||||
echo "</tr>\n";
|
||||
if ($c==0) { $c=1; } else { $c=0; }
|
||||
|
|
|
|||
|
|
@ -87,12 +87,7 @@ else {
|
|||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
require_once "resources/header.php";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=call_block.php\">\n";
|
||||
echo "<div align='center'>\n";
|
||||
echo $text['label-add-complete']."\n";
|
||||
echo "</div>\n";
|
||||
require_once "resources/footer.php";
|
||||
return;
|
||||
|
||||
$_SESSION["message"] = $text['label-add-complete'];
|
||||
header("Location: call_block.php");
|
||||
?>
|
||||
|
|
@ -57,22 +57,9 @@ else {
|
|||
unset($prep_statement, $sql);
|
||||
}
|
||||
|
||||
//redirect the user
|
||||
require_once "resources/header.php";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=call_block.php\">\n";
|
||||
echo "<br />\n";
|
||||
echo "<div align='center'>\n";
|
||||
echo " <table width='40%'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <th align='left'>".$text['label-message']."</th>\n";
|
||||
echo " </tr>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td class='row_style1'><strong>".$text['label-delete-complete']."</strong></td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " </table>\n";
|
||||
echo " <br />\n";
|
||||
echo "</div>\n";
|
||||
require_once "resources/footer.php";
|
||||
|
||||
$_SESSION["message"] = $text['label-delete-complete'];
|
||||
header("Location: call_block.php");
|
||||
return;
|
||||
|
||||
?>
|
||||
|
|
@ -91,10 +91,10 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
if ($action == "update") {
|
||||
//$call_block_uuid = check_str($_POST["call_block_uuid"]);
|
||||
}
|
||||
|
||||
|
||||
//check for all required data
|
||||
if (strlen($call_block_name) == 0) { $msg .= $text['label-provide-name']."<br>\n"; }
|
||||
if ($action == "add") {
|
||||
if ($action == "add") {
|
||||
if (strlen($call_block_number) == 0) { $msg .= $text['label-provide-number']."<br>\n"; }
|
||||
}
|
||||
if (strlen($call_block_enabled) == 0) { $msg .= $text['label-provide-enabled']."<br>\n"; }
|
||||
|
|
@ -139,12 +139,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
require_once "resources/header.php";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=call_block.php\">\n";
|
||||
echo "<div align='center'>\n";
|
||||
echo $text['label-add-complete']."\n";
|
||||
echo "</div>\n";
|
||||
require_once "resources/footer.php";
|
||||
$_SESSION["message"] = $text['label-add-complete'];
|
||||
header("Location: call_block.php");
|
||||
return;
|
||||
} //if ($action == "add")
|
||||
|
||||
|
|
@ -159,15 +155,11 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
require_once "resources/header.php";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=call_block.php\">\n";
|
||||
echo "<div align='center'>\n";
|
||||
echo $text['label-update-complete']."\n";
|
||||
echo "</div>\n";
|
||||
require_once "resources/footer.php";
|
||||
$_SESSION["message"] = $text['label-update-complete'];
|
||||
header("Location: call_block.php");
|
||||
return;
|
||||
} //if ($action == "update")
|
||||
} //if ($_POST["persistformvar"] != "true")
|
||||
} //if ($_POST["persistformvar"] != "true")
|
||||
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
||||
|
||||
//pre-populate the form
|
||||
|
|
@ -197,63 +189,6 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
echo "<div align='center'>";
|
||||
// Show last 5-10 calls first, with add button
|
||||
|
||||
//get the results from the db
|
||||
$sql = "select caller_id_number, caller_id_name, start_epoch, uuid from v_xml_cdr ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "and direction != 'outbound' ";
|
||||
$sql .= "order by start_stamp DESC ";
|
||||
$sql .= "limit 20 ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll();
|
||||
$result_count = count($result);
|
||||
unset ($prep_statement);
|
||||
|
||||
echo "<table width='100%' cellpadding='0' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
echo th_order_by('caller_id_name', $text['label-name'], $order_by, $order);
|
||||
echo th_order_by('caller_id_number', $text['label-number'], $order_by, $order);
|
||||
echo th_order_by('start_stamp', $text['label-called-on'], $order_by, $order);
|
||||
|
||||
$c = 0;
|
||||
$row_style["0"] = "row_style0";
|
||||
$row_style["1"] = "row_style1";
|
||||
|
||||
if ($result_count > 0) {
|
||||
foreach($result as $row) {
|
||||
if (strlen($row['caller_id_number']) >= 7) {
|
||||
if (defined('TIME_24HR') && TIME_24HR == 1) {
|
||||
$tmp_start_epoch = date("j M Y H:i:s", $row['start_epoch']);
|
||||
} else {
|
||||
$tmp_start_epoch = date("j M Y h:i:sa", $row['start_epoch']);
|
||||
}
|
||||
echo "<tr >\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>";
|
||||
echo $row['caller_id_name'].' ';
|
||||
echo " </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>";
|
||||
if (is_numeric($row['caller_id_number'])) {
|
||||
echo format_phone($row['caller_id_number']).' ';
|
||||
}
|
||||
else {
|
||||
echo $row['caller_id_number'].' ';
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$tmp_start_epoch."</td>\n";
|
||||
echo " <td valign='top' align='right'>\n";
|
||||
echo " <a href='call_block_cdr_add.php?cdr_id=".$row['uuid']."' alt='add'>$v_link_label_add</a>\n";
|
||||
echo "</tr>\n";
|
||||
if ($c==0) { $c=1; } else { $c=0; }
|
||||
}
|
||||
} //end foreach
|
||||
unset($sql, $result, $row_count);
|
||||
} //end if results
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "</tr>\n";
|
||||
echo "</table>";
|
||||
// end of Display Last 5-10 Calls
|
||||
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing=''>\n";
|
||||
echo "<tr class='border'>\n";
|
||||
echo " <td align=\"left\">\n";
|
||||
|
|
@ -343,11 +278,11 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='call_block_enabled'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
if ($call_block_enabled == "true") {
|
||||
if ($call_block_enabled == "true") {
|
||||
echo " <option value='true' SELECTED >".$text['label-true']."</option>\n";
|
||||
echo " <option value='false'>".$text['label-false']."</option>\n";
|
||||
}
|
||||
if ($call_block_enabled == "false") {
|
||||
if ($call_block_enabled == "false") {
|
||||
echo " <option value='false' SELECTED >".$text['label-false']."</option>\n";
|
||||
echo " <option value='true'>".$text['label-true']."</option>\n";
|
||||
}
|
||||
|
|
@ -372,7 +307,70 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
echo " </td>";
|
||||
echo " </tr>";
|
||||
echo "</table>";
|
||||
echo "</div>";
|
||||
echo "</div><br><br>";
|
||||
|
||||
|
||||
//get recent calls from the db (if not editing an existing call block record)
|
||||
if (!isset($_REQUEST["id"])) {
|
||||
$sql = "select caller_id_number, caller_id_name, start_epoch, uuid from v_xml_cdr ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "and direction != 'outbound' ";
|
||||
$sql .= "order by start_stamp DESC ";
|
||||
$sql .= "limit 20 ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll();
|
||||
$result_count = count($result);
|
||||
unset ($prep_statement);
|
||||
|
||||
echo "<b>".$text['label-edit-add-recent']."</b>";
|
||||
echo "<br><br>";
|
||||
echo "<table width='100%' cellpadding='0' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
echo th_order_by('caller_id_name', $text['label-name'], $order_by, $order);
|
||||
echo th_order_by('caller_id_number', $text['label-number'], $order_by, $order);
|
||||
echo th_order_by('start_stamp', $text['label-called-on'], $order_by, $order);
|
||||
|
||||
$c = 0;
|
||||
$row_style["0"] = "row_style0";
|
||||
$row_style["1"] = "row_style1";
|
||||
|
||||
if ($result_count > 0) {
|
||||
foreach($result as $row) {
|
||||
if (strlen($row['caller_id_number']) >= 7) {
|
||||
if (defined('TIME_24HR') && TIME_24HR == 1) {
|
||||
$tmp_start_epoch = date("j M Y H:i:s", $row['start_epoch']);
|
||||
} else {
|
||||
$tmp_start_epoch = date("j M Y h:i:sa", $row['start_epoch']);
|
||||
}
|
||||
echo "<tr >\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>";
|
||||
echo $row['caller_id_name'].' ';
|
||||
echo " </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>";
|
||||
if (is_numeric($row['caller_id_number'])) {
|
||||
echo format_phone($row['caller_id_number']).' ';
|
||||
}
|
||||
else {
|
||||
echo $row['caller_id_number'].' ';
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$tmp_start_epoch."</td>\n";
|
||||
echo " <td valign='top' align='right'>\n";
|
||||
echo " <a href='call_block_cdr_add.php?cdr_id=".$row['uuid']."' alt='add'>$v_link_label_add</a>\n";
|
||||
echo "</tr>\n";
|
||||
if ($c==0) { $c=1; } else { $c=0; }
|
||||
}
|
||||
} //end foreach
|
||||
unset($sql, $result, $row_count);
|
||||
} //end if results
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "</tr>\n";
|
||||
echo "</table>";
|
||||
}
|
||||
// end of Display Last 5-10 Calls
|
||||
|
||||
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ else {
|
|||
|
||||
//add multi-lingual support
|
||||
foreach($text as $key => $value) {
|
||||
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||
}
|
||||
|
||||
//define the destination_select function
|
||||
|
|
@ -348,12 +348,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
}
|
||||
|
||||
//redirect the user
|
||||
require_once "resources/header.php";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"3;url=".PROJECT_PATH."/core/user_settings/user_dashboard.php\">\n";
|
||||
echo "<div align='center'>\n";
|
||||
echo "".$text['confirm-update']."<br />\n";
|
||||
echo "</div>\n";
|
||||
require_once "resources/footer.php";
|
||||
$_SESSION["message"] = $text['confirm-update'];
|
||||
header("Location: ".PROJECT_PATH."/core/user_settings/user_dashboard.php");
|
||||
return;
|
||||
|
||||
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
||||
|
|
@ -560,9 +556,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
|
||||
echo " <input class='formfld' type='text' name='destination_data_1' id='destination_data_1' maxlength='255' value=\"$destination_data_1\">\n";
|
||||
|
||||
echo " ".$text['label-ring-delay']."\n";
|
||||
echo " ".$text['label-ring-delay']."\n";
|
||||
destination_select('destination_delay_1', $destination_delay_1, '0');
|
||||
echo " ".$text['label-ring-timeout']."\n";
|
||||
echo " ".$text['label-ring-timeout']."\n";
|
||||
destination_select('destination_timeout_1', $destination_timeout_1, '30');
|
||||
//echo "<br />\n";
|
||||
//echo "This number rings first.\n";
|
||||
|
|
@ -575,9 +571,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='destination_data_2' id='destination_data_2' maxlength='255' value=\"$destination_data_2\">\n";
|
||||
echo " ".$text['label-ring-delay']."\n";
|
||||
echo " ".$text['label-ring-delay']."\n";
|
||||
destination_select('destination_delay_2', $destination_delay_2, '0');
|
||||
echo " ".$text['label-ring-timeout']."\n";
|
||||
echo " ".$text['label-ring-timeout']."\n";
|
||||
destination_select('destination_timeout_2', $destination_timeout_2, '30');
|
||||
//echo "<br />\n";
|
||||
//echo "Enter the destination number.\n";
|
||||
|
|
@ -590,9 +586,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='destination_data_3' id='destination_data_3' maxlength='255' value=\"$destination_data_3\">\n";
|
||||
echo " ".$text['label-ring-delay']."\n";
|
||||
echo " ".$text['label-ring-delay']."\n";
|
||||
destination_select('destination_delay_3', $destination_delay_3, '0');
|
||||
echo " ".$text['label-ring-timeout']."\n";
|
||||
echo " ".$text['label-ring-timeout']."\n";
|
||||
destination_select('destination_timeout_3', $destination_timeout_3, '30');
|
||||
//echo "<br />\n";
|
||||
//echo "Enter the destination number.\n";
|
||||
|
|
@ -605,9 +601,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='destination_data_4' id='destination_data_4' maxlength='255' value=\"$destination_data_4\">\n";
|
||||
echo " ".$text['label-ring-delay']."\n";
|
||||
echo " ".$text['label-ring-delay']."\n";
|
||||
destination_select('destination_delay_4', $destination_delay_4, '0');
|
||||
echo " ".$text['label-ring-timeout']."\n";
|
||||
echo " ".$text['label-ring-timeout']."\n";
|
||||
destination_select('destination_timeout_4', $destination_timeout_4, '30');
|
||||
//echo "<br />\n";
|
||||
//echo "Enter the destination number.\n";
|
||||
|
|
@ -620,9 +616,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='destination_data_5' id='destination_data_5' maxlength='255' value=\"$destination_data_5\">\n";
|
||||
echo " ".$text['label-ring-delay']."\n";
|
||||
echo " ".$text['label-ring-delay']."\n";
|
||||
destination_select('destination_delay_5', $destination_delay_5, '0');
|
||||
echo " ".$text['label-ring-timeout']."\n";
|
||||
echo " ".$text['label-ring-timeout']."\n";
|
||||
destination_select('destination_timeout_5', $destination_timeout_5, '30');
|
||||
//echo "<br />\n";
|
||||
//echo "Enter the destination number.\n";
|
||||
|
|
|
|||
Loading…
Reference in New Issue