Uncomment and fix the follow me caller id prefix but only show it for people with the follow_me_cid_name_prefix. Add follow me to the app menu.

This commit is contained in:
Mark Crane
2013-05-01 17:05:53 +00:00
parent 9b9c0429a6
commit 928c03f347
6 changed files with 76 additions and 66 deletions
+17 -13
View File
@@ -93,6 +93,7 @@ else {
else {
foreach ($result as &$row) {
$extension = $row["extension"];
$accountcode = $row["accountcode"];
$effective_caller_id_name = $row["effective_caller_id_name"];
$effective_caller_id_number = $row["effective_caller_id_number"];
$outbound_caller_id_name = $row["outbound_caller_id_name"];
@@ -117,7 +118,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
if (count($_POST)>0) {
$forward_all_enabled = check_str($_POST["forward_all_enabled"]);
$forward_all_destination = check_str($_POST["forward_all_destination"]);
//$cid_name_prefix = check_str($_POST["cid_name_prefix"]);
$cid_name_prefix = check_str($_POST["cid_name_prefix"]);
$call_prompt = check_str($_POST["call_prompt"]);
$follow_me_enabled = check_str($_POST["follow_me_enabled"]);
@@ -217,6 +218,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$call_forward->domain_uuid = $_SESSION['domain_uuid'];
$call_forward->domain_name = $_SESSION['domain_name'];
$call_forward->extension_uuid = $extension_uuid;
$call_forward->accountcode = $accountcode;
$call_forward->forward_all_destination = $forward_all_destination;
$call_forward->forward_all_enabled = $forward_all_enabled;
//$call_forward->set();
@@ -253,7 +255,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$follow_me->domain_name = $_SESSION['domain_name'];
$follow_me->extension_uuid = $extension_uuid;
$follow_me->db_type = $db_type;
//$follow_me->cid_name_prefix = $cid_name_prefix;
$follow_me->cid_name_prefix = $cid_name_prefix;
$follow_me->call_prompt = $call_prompt;
$follow_me->follow_me_enabled = $follow_me_enabled;
@@ -365,7 +367,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$prep_statement->execute();
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
foreach ($result as &$row) {
//$cid_name_prefix = $row["cid_name_prefix"];
$cid_name_prefix = $row["cid_name_prefix"];
$call_prompt = $row["call_prompt"];
$follow_me_enabled = $row["follow_me_enabled"];
@@ -624,16 +626,18 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "</td>\n";
echo "</tr>\n";
//echo "<tr>\n";
//echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
//echo " ".$text['label-cid-prefix'].":\n";
//echo "</td>\n";
//echo "<td class='vtable' align='left'>\n";
//echo " <input class='formfld' type='text' name='cid_name_prefix' maxlength='255' value='$cid_name_prefix'>\n";
//echo "<br />\n";
//echo $text['description-cid-prefix']." \n";
//echo "</td>\n";
//echo "</tr>\n";
if (permission_exists('follow_me_cid_name_prefix')) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-cid-name-prefix'].":\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='cid_name_prefix' maxlength='255' value='$cid_name_prefix'>\n";
echo "<br />\n";
echo $text['description-cid-name-prefix']." \n";
echo "</td>\n";
echo "</tr>\n";
}
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";