From 0ea5f9e1eedc108c9bd6d7dac0055b3c6dc50c5e Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Fri, 27 Jul 2012 15:22:11 +0000 Subject: [PATCH] Remove the v_ inside php code in preparation to rename the php files. --- app/fax/app_config.php | 2 +- app/fax/v_fax.php | 8 ++--- app/fax/v_fax_delete.php | 11 +++---- app/fax/v_fax_edit.php | 33 +++++++++++--------- app/fax/v_fax_view.php | 66 ++++++++++++++++++++-------------------- 5 files changed, 60 insertions(+), 60 deletions(-) diff --git a/app/fax/app_config.php b/app/fax/app_config.php index 4e282a4b13..f99ce0ec59 100644 --- a/app/fax/app_config.php +++ b/app/fax/app_config.php @@ -14,7 +14,7 @@ $apps[$x]['menu'][0]['uuid'] = '9c9642e4-2b9b-2785-18d0-6c0a4ede2b2f'; $apps[$x]['menu'][0]['parent_uuid'] = 'fd29e39c-c936-f5fc-8e2b-611681b266b5'; $apps[$x]['menu'][0]['category'] = 'internal'; - $apps[$x]['menu'][0]['path'] = '/app/fax/v_fax.php'; + $apps[$x]['menu'][0]['path'] = '/app/fax/fax.php'; $apps[$x]['menu'][0]['groups'][] = 'user'; $apps[$x]['menu'][0]['groups'][] = 'admin'; $apps[$x]['menu'][0]['groups'][] = 'superadmin'; diff --git a/app/fax/v_fax.php b/app/fax/v_fax.php index bb0aebdae9..e60cd927da 100644 --- a/app/fax/v_fax.php +++ b/app/fax/v_fax.php @@ -122,7 +122,7 @@ require_once "includes/paging.php"; echo th_order_by('fax_description', 'Description', $order_by, $order); echo "\n"; if (permission_exists('fax_extension_add')) { - echo " $v_link_label_add\n"; + echo " $v_link_label_add\n"; } echo "\n"; echo "\n"; @@ -136,10 +136,10 @@ require_once "includes/paging.php"; echo " ".$row['fax_description']." \n"; echo " \n"; if (permission_exists('fax_extension_edit')) { - echo " $v_link_label_edit\n"; + echo " $v_link_label_edit\n"; } if (permission_exists('fax_extension_delete')) { - echo " $v_link_label_delete\n"; + echo " $v_link_label_delete\n"; } echo " \n"; echo "\n"; @@ -156,7 +156,7 @@ require_once "includes/paging.php"; echo " $paging_controls\n"; echo " \n"; if (permission_exists('fax_extension_add')) { - echo " $v_link_label_add\n"; + echo " $v_link_label_add\n"; } echo " \n"; echo " \n"; diff --git a/app/fax/v_fax_delete.php b/app/fax/v_fax_delete.php index 1cf8a126cc..d11cc78a83 100644 --- a/app/fax/v_fax_delete.php +++ b/app/fax/v_fax_delete.php @@ -53,16 +53,14 @@ else { } //delete the fax entry - $sql = ""; - $sql .= "delete from v_fax "; + $sql = "delete from v_fax "; $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; $sql .= "and fax_uuid = '$fax_uuid' "; $db->query($sql); unset($sql); //delete the dialplan entry - $sql = ""; - $sql .= "delete from v_dialplans "; + $sql = "delete from v_dialplans "; $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; $sql .= "and dialplan_uuid = '$dialplan_uuid' "; //echo $sql."
\n"; @@ -70,8 +68,7 @@ else { unset($sql); //delete the dialplan details - $sql = ""; - $sql .= "delete from v_dialplan_details "; + $sql = "delete from v_dialplan_details "; $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; $sql .= "and dialplan_uuid = '$dialplan_uuid' "; //echo $sql."
\n"; @@ -87,7 +84,7 @@ else { //redirect the user require_once "includes/header.php"; - echo "\n"; + echo "\n"; echo "
\n"; echo "Delete Complete\n"; echo "
\n"; diff --git a/app/fax/v_fax_edit.php b/app/fax/v_fax_edit.php index 9291b60042..c31e0474ef 100644 --- a/app/fax/v_fax_edit.php +++ b/app/fax/v_fax_edit.php @@ -41,27 +41,27 @@ else { //set the fax directory if (count($_SESSION["domains"]) > 1) { - $v_fax_dir = $_SESSION['switch']['storage']['dir'].'/fax/'.$_SESSION['domain_name']; + $fax_dir = $_SESSION['switch']['storage']['dir'].'/fax/'.$_SESSION['domain_name']; } else { - $v_fax_dir = $_SESSION['switch']['storage']['dir'].'/fax'; + $fax_dir = $_SESSION['switch']['storage']['dir'].'/fax'; } //get the fax extension if (strlen($fax_extension) > 0) { //set the fax directories. example /usr/local/freeswitch/storage/fax/329/inbox - $dir_fax_inbox = $v_fax_dir.'/'.$fax_extension.'/inbox'; - $dir_fax_sent = $v_fax_dir.'/'.$fax_extension.'/sent'; - $dir_fax_temp = $v_fax_dir.'/'.$fax_extension.'/temp'; + $dir_fax_inbox = $fax_dir.'/'.$fax_extension.'/inbox'; + $dir_fax_sent = $fax_dir.'/'.$fax_extension.'/sent'; + $dir_fax_temp = $fax_dir.'/'.$fax_extension.'/temp'; //make sure the directories exist if (!is_dir($_SESSION['switch']['storage']['dir'])) { mkdir($_SESSION['switch']['storage']['dir']); chmod($dir_fax_sent,0774); } - if (!is_dir($v_fax_dir.'/'.$fax_extension)) { - mkdir($v_fax_dir.'/'.$fax_extension,0774,true); - chmod($v_fax_dir.'/'.$fax_extension,0774); + if (!is_dir($fax_dir.'/'.$fax_extension)) { + mkdir($fax_dir.'/'.$fax_extension,0774,true); + chmod($fax_dir.'/'.$fax_extension,0774); } if (!is_dir($dir_fax_inbox)) { mkdir($dir_fax_inbox,0774,true); @@ -101,7 +101,7 @@ else { $fax_description = check_str($_POST["fax_description"]); } -//delete the user from the v_fax_users +//delete the user from the fax users if ($_GET["a"] == "delete" && permission_exists("fax_extension_delete")) { //set the variables $user_uuid = check_str($_REQUEST["user_uuid"]); @@ -114,13 +114,13 @@ else { $db->exec(check_sql($sql)); //redirect the browser require_once "includes/header.php"; - echo "\n"; + echo "\n"; echo "
Delete Complete
"; require_once "includes/footer.php"; return; } -//add the user to the v_fax_users +//add the user to the fax users if (strlen($_REQUEST["user_uuid"]) > 0 && strlen($_REQUEST["id"]) > 0 && $_GET["a"] != "delete") { //set the variables $user_uuid = check_str($_REQUEST["user_uuid"]); @@ -143,7 +143,7 @@ else { $db->exec($sql_insert); //redirect the browser require_once "includes/header.php"; - echo "\n"; + echo "\n"; echo "
Add Complete
"; require_once "includes/footer.php"; return; @@ -432,7 +432,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { //redirect the browser require_once "includes/header.php"; - echo "\n"; + echo "\n"; echo "
\n"; if ($action == "update" && permission_exists('fax_extension_edit')) { echo "Update Complete\n"; @@ -493,7 +493,10 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { if ($action == "update") { echo "Fax Edit\n"; } - echo "\n"; + echo "\n"; + echo " \n"; + echo " \n"; + echo "\n"; echo "\n"; echo "\n"; @@ -592,7 +595,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " \n"; echo " ".$field['username']."\n"; echo " \n"; - echo " $v_link_label_delete\n"; + echo " $v_link_label_delete\n"; echo " \n"; echo " \n"; } diff --git a/app/fax/v_fax_view.php b/app/fax/v_fax_view.php index 2bc36fa9f9..12a2232005 100644 --- a/app/fax/v_fax_view.php +++ b/app/fax/v_fax_view.php @@ -86,10 +86,10 @@ else { //set the fax directory if (count($_SESSION["domains"]) > 1) { - $v_fax_dir = $_SESSION['switch']['storage']['dir'].'/fax/'.$_SESSION['domain_name']; + $fax_dir = $_SESSION['switch']['storage']['dir'].'/fax/'.$_SESSION['domain_name']; } else { - $v_fax_dir = $_SESSION['switch']['storage']['dir'].'/fax'; + $fax_dir = $_SESSION['switch']['storage']['dir'].'/fax'; } //delete a fax @@ -97,12 +97,12 @@ else { $file_name = substr(check_str($_GET['filename']), 0, -4); $file_ext = substr(check_str($_GET['filename']), -3); if ($_GET['type'] == "fax_inbox") { - unlink($v_fax_dir.'/'.$fax_extension.'/inbox/'.$file_name.".tif"); - unlink($v_fax_dir.'/'.$fax_extension.'/inbox/'.$file_name.".pdf"); + unlink($fax_dir.'/'.$fax_extension.'/inbox/'.$file_name.".tif"); + unlink($fax_dir.'/'.$fax_extension.'/inbox/'.$file_name.".pdf"); } if ($_GET['type'] == "fax_sent") { - unlink($v_fax_dir.'/'.$fax_extension.'/sent/'.$file_name.".tif"); - unlink($v_fax_dir.'/'.$fax_extension.'/sent/'.$file_name.".pdf"); + unlink($fax_dir.'/'.$fax_extension.'/sent/'.$file_name.".tif"); + unlink($fax_dir.'/'.$fax_extension.'/sent/'.$file_name.".pdf"); } unset($file_name); unset($file_ext); @@ -113,13 +113,13 @@ else { session_cache_limiter('public'); //test to see if it is in the inbox or sent directory. if ($_GET['type'] == "fax_inbox") { - if (file_exists($v_fax_dir.'/'.check_str($_GET['ext']).'/inbox/'.check_str($_GET['filename']))) { - $tmp_faxdownload_file = "".$v_fax_dir.'/'.check_str($_GET['ext']).'/inbox/'.check_str($_GET['filename']); + if (file_exists($fax_dir.'/'.check_str($_GET['ext']).'/inbox/'.check_str($_GET['filename']))) { + $tmp_faxdownload_file = "".$fax_dir.'/'.check_str($_GET['ext']).'/inbox/'.check_str($_GET['filename']); } } else if ($_GET['type'] == "fax_sent") { - if (file_exists($v_fax_dir.'/'.check_str($_GET['ext']).'/sent/'.check_str($_GET['filename']))) { - $tmp_faxdownload_file = "".$v_fax_dir.'/'.check_str($_GET['ext']).'/sent/'.check_str($_GET['filename']); + if (file_exists($fax_dir.'/'.check_str($_GET['ext']).'/sent/'.check_str($_GET['filename']))) { + $tmp_faxdownload_file = "".$fax_dir.'/'.check_str($_GET['ext']).'/sent/'.check_str($_GET['filename']); } } //let's see if we found it. @@ -162,18 +162,18 @@ else { //get the fax extension if (strlen($fax_extension) > 0) { //set the fax directories. example /usr/local/freeswitch/storage/fax/329/inbox - $dir_fax_inbox = $v_fax_dir.'/'.$fax_extension.'/inbox'; - $dir_fax_sent = $v_fax_dir.'/'.$fax_extension.'/sent'; - $dir_fax_temp = $v_fax_dir.'/'.$fax_extension.'/temp'; + $dir_fax_inbox = $fax_dir.'/'.$fax_extension.'/inbox'; + $dir_fax_sent = $fax_dir.'/'.$fax_extension.'/sent'; + $dir_fax_temp = $fax_dir.'/'.$fax_extension.'/temp'; //make sure the directories exist if (!is_dir($_SESSION['switch']['storage']['dir'])) { mkdir($_SESSION['switch']['storage']['dir']); chmod($dir_fax_sent,0774); } - if (!is_dir($v_fax_dir.'/'.$fax_extension)) { - mkdir($v_fax_dir.'/'.$fax_extension,0774,true); - chmod($v_fax_dir.'/'.$fax_extension,0774); + if (!is_dir($fax_dir.'/'.$fax_extension)) { + mkdir($fax_dir.'/'.$fax_extension,0774,true); + chmod($fax_dir.'/'.$fax_extension,0774); } if (!is_dir($dir_fax_inbox)) { mkdir($dir_fax_inbox,0774,true); @@ -295,7 +295,7 @@ else { exec($_SESSION['switch']['bin']['dir']."/tiff2pdf -f -o ".$fax_name.".pdf ".$dir_fax_sent.$fax_name.".tif"); } - header("Location: v_fax_view.php?id=".$fax_uuid."&msg=".$response); + header("Location: fax_view.php?id=".$fax_uuid."&msg=".$response); exit; } //end upload and send fax @@ -303,10 +303,10 @@ else { if ($_GET['a'] == "del") { $fax_extension = check_str($_GET["fax_extension"]); if ($_GET['type'] == "fax_inbox" && permission_exists('fax_inbox_delete')) { - unlink($v_fax_dir.'/'.$fax_extension.'/inbox/'.check_str($_GET['filename'])); + unlink($fax_dir.'/'.$fax_extension.'/inbox/'.check_str($_GET['filename'])); } if ($_GET['type'] == "fax_sent" && permission_exists('fax_sent_delete')) { - unlink($v_fax_dir.'/'.$fax_extension.'/sent/'.check_str($_GET['filename'])); + unlink($fax_dir.'/'.$fax_extension.'/sent/'.check_str($_GET['filename'])); } } @@ -315,12 +315,12 @@ else { session_cache_limiter('public'); //test to see if it is in the inbox or sent directory. if ($_GET['type'] == "fax_inbox" && permission_exists('fax_inbox_view')) { - if (file_exists($v_fax_dir.'/'.check_str($_GET['ext']).'/inbox/'.check_str($_GET['filename']))) { - $tmp_faxdownload_file = "".$v_fax_dir.'/'.check_str($_GET['ext']).'/inbox/'.check_str($_GET['filename']); + if (file_exists($fax_dir.'/'.check_str($_GET['ext']).'/inbox/'.check_str($_GET['filename']))) { + $tmp_faxdownload_file = "".$fax_dir.'/'.check_str($_GET['ext']).'/inbox/'.check_str($_GET['filename']); } }else if ($_GET['type'] == "fax_sent" && permission_exists('fax_sent_view')) { - if (file_exists($v_fax_dir.'/'.check_str($_GET['ext']).'/sent/'.check_str($_GET['filename']))) { - $tmp_faxdownload_file = "".$v_fax_dir.'/'.check_str($_GET['ext']).'/sent/'.check_str($_GET['filename']); + if (file_exists($fax_dir.'/'.check_str($_GET['ext']).'/sent/'.check_str($_GET['filename']))) { + $tmp_faxdownload_file = "".$fax_dir.'/'.check_str($_GET['ext']).'/sent/'.check_str($_GET['filename']); } } //check to see if it was found. @@ -376,9 +376,9 @@ else { echo " \n"; echo " \n"; if (permission_exists('fax_extension_add') || permission_exists('fax_extension_edit')) { - echo " \n"; + echo " \n"; } - echo " \n"; + echo " \n"; echo " \n"; echo "\n"; echo "\n"; @@ -521,14 +521,14 @@ else { //} echo "\n"; echo " \n"; - echo " \n"; + echo " \n"; echo " $file_name"; echo " "; echo " \n"; echo " \n"; if (file_exists($dir_fax_inbox.'/'.$file_name.".pdf")) { - echo " \n"; + echo " \n"; echo " PDF"; echo " "; } @@ -539,7 +539,7 @@ else { //echo " \n"; //if (file_exists($dir_fax_inbox.'/'.$file_name.".jpg")) { - // echo " \n"; + // echo " \n"; // echo " jpg"; // echo " "; //} @@ -560,7 +560,7 @@ else { echo " \n"; echo " \n"; if (permission_exists('fax_inbox_delete')) { - echo " \n"; + echo " \n"; } echo " \n"; echo "
$v_link_label_delete$v_link_label_delete
\n"; @@ -658,13 +658,13 @@ else { } echo "\n"; echo " \n"; - echo " \n"; + echo " \n"; echo " $file"; echo " "; echo " \n"; echo " \n"; if (file_exists($dir_fax_sent.'/'.$file_name.".pdf")) { - echo " \n"; + echo " \n"; echo " PDF"; echo " "; } @@ -674,7 +674,7 @@ else { echo " \n"; //echo " \n"; //if (file_exists($dir_fax_sent.'/'.$file_name.".jpg")) { - // echo " \n"; + // echo " \n"; // echo " jpg"; // echo " "; //} @@ -694,7 +694,7 @@ else { echo " \n"; echo " \n"; if (permission_exists('fax_sent_delete')) { - echo " \n"; + echo " \n"; } echo " \n"; echo "
$v_link_label_delete$v_link_label_delete
\n";