Remove the v_ inside php code in preparation to rename the php files.

This commit is contained in:
Mark Crane
2012-07-27 15:22:11 +00:00
parent c3d2423dbc
commit 0ea5f9e1ee
5 changed files with 60 additions and 60 deletions

View File

@@ -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';

View File

@@ -122,7 +122,7 @@ require_once "includes/paging.php";
echo th_order_by('fax_description', 'Description', $order_by, $order);
echo "<td align='right' width='42'>\n";
if (permission_exists('fax_extension_add')) {
echo " <a href='v_fax_edit.php' alt='add'>$v_link_label_add</a>\n";
echo " <a href='fax_edit.php' alt='add'>$v_link_label_add</a>\n";
}
echo "</td>\n";
echo "<tr>\n";
@@ -136,10 +136,10 @@ require_once "includes/paging.php";
echo " <td valign='top' class='row_stylebg' width='35%'>".$row['fax_description']."&nbsp;</td>\n";
echo " <td valign='top' align='right'>\n";
if (permission_exists('fax_extension_edit')) {
echo " <a href='v_fax_view.php?id=".$row['fax_uuid']."' alt='edit'>$v_link_label_edit</a>\n";
echo " <a href='fax_view.php?id=".$row['fax_uuid']."' alt='edit'>$v_link_label_edit</a>\n";
}
if (permission_exists('fax_extension_delete')) {
echo " <a href='v_fax_delete.php?id=".$row['fax_uuid']."' alt='delete' onclick=\"return confirm('Do you really want to delete this?')\">$v_link_label_delete</a>\n";
echo " <a href='fax_delete.php?id=".$row['fax_uuid']."' alt='delete' onclick=\"return confirm('Do you really want to delete this?')\">$v_link_label_delete</a>\n";
}
echo " </td>\n";
echo "</tr>\n";
@@ -156,7 +156,7 @@ require_once "includes/paging.php";
echo " <td width='33.3%' align='center' nowrap>$paging_controls</td>\n";
echo " <td width='33.3%' align='right'>\n";
if (permission_exists('fax_extension_add')) {
echo " <a href='v_fax_edit.php' alt='add'>$v_link_label_add</a>\n";
echo " <a href='fax_edit.php' alt='add'>$v_link_label_add</a>\n";
}
echo " </td>\n";
echo " </tr>\n";

View File

@@ -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."<br>\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."<br>\n";
@@ -87,7 +84,7 @@ else {
//redirect the user
require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=v_fax.php\">\n";
echo "<meta http-equiv=\"refresh\" content=\"2;url=fax.php\">\n";
echo "<div align='center'>\n";
echo "Delete Complete\n";
echo "</div>\n";

View File

@@ -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 "<meta http-equiv=\"refresh\" content=\"2;url=v_fax_edit.php?id=$fax_uuid\">\n";
echo "<meta http-equiv=\"refresh\" content=\"2;url=fax_edit.php?id=$fax_uuid\">\n";
echo "<div align='center'>Delete Complete</div>";
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 "<meta http-equiv=\"refresh\" content=\"2;url=v_fax_edit.php?id=$fax_uuid\">\n";
echo "<meta http-equiv=\"refresh\" content=\"2;url=fax_edit.php?id=$fax_uuid\">\n";
echo "<div align='center'>Add Complete</div>";
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 "<meta http-equiv=\"refresh\" content=\"2;url=v_fax.php\">\n";
echo "<meta http-equiv=\"refresh\" content=\"2;url=fax.php\">\n";
echo "<div align='center'>\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 "<td align='left' width='30%' nowrap><b>Fax Edit</b></td>\n";
}
echo "<td width='70%' align='right'><input type='button' class='btn' name='' alt='back' onclick=\"window.location='v_fax.php'\" value='Back'></td>\n";
echo "<td width='70%' align='right'>\n";
echo " <input type='button' class='btn' name='' alt='copy' onclick=\"if (confirm('Do you really want to copy this?')){window.location='fax_copy.php?id=".$fax_uuid."';}\" value='Copy'>\n";
echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='fax.php'\" value='Back'>\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
@@ -592,7 +595,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo " <tr>\n";
echo " <td class='vtable'>".$field['username']."</td>\n";
echo " <td>\n";
echo " <a href='v_fax_edit.php?id=".$fax_uuid."&domain_uuid=".$_SESSION['domain_uuid']."&user_uuid=".$field['user_uuid']."&a=delete' alt='delete' onclick=\"return confirm('Do you really want to delete this?')\">$v_link_label_delete</a>\n";
echo " <a href='fax_edit.php?id=".$fax_uuid."&domain_uuid=".$_SESSION['domain_uuid']."&user_uuid=".$field['user_uuid']."&a=delete' alt='delete' onclick=\"return confirm('Do you really want to delete this?')\">$v_link_label_delete</a>\n";
echo " </td>\n";
echo " </tr>\n";
}

View File

@@ -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 " </td>\n";
echo " <td width='70%' align='right'>\n";
if (permission_exists('fax_extension_add') || permission_exists('fax_extension_edit')) {
echo " <input type='button' class='btn' name='' alt='settings' onclick=\"window.location='v_fax_edit.php?id=$fax_uuid'\" value='Settings'>\n";
echo " <input type='button' class='btn' name='' alt='settings' onclick=\"window.location='fax_edit.php?id=$fax_uuid'\" value='Settings'>\n";
}
echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='v_fax.php'\" value='Back'>\n";
echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='fax.php'\" value='Back'>\n";
echo " </td>\n";
echo "</tr>\n";
echo "</table>\n";
@@ -521,14 +521,14 @@ else {
//}
echo "<tr>\n";
echo " <td class='".$row_style[$c]."' ondblclick=\"\">\n";
echo " <a href=\"v_fax_view.php?id=".$fax_uuid."&a=download&type=fax_inbox&t=bin&ext=".urlencode($fax_extension)."&filename=".urlencode($file)."\">\n";
echo " <a href=\"fax_view.php?id=".$fax_uuid."&a=download&type=fax_inbox&t=bin&ext=".urlencode($fax_extension)."&filename=".urlencode($file)."\">\n";
echo " $file_name";
echo " </a>";
echo " </td>\n";
echo " <td class='".$row_style[$c]."' ondblclick=\"\">\n";
if (file_exists($dir_fax_inbox.'/'.$file_name.".pdf")) {
echo " <a href=\"v_fax_view.php?id=".$fax_uuid."&a=download&type=fax_inbox&t=bin&ext=".urlencode($fax_extension)."&filename=".urlencode($file_name).".pdf\">\n";
echo " <a href=\"fax_view.php?id=".$fax_uuid."&a=download&type=fax_inbox&t=bin&ext=".urlencode($fax_extension)."&filename=".urlencode($file_name).".pdf\">\n";
echo " PDF";
echo " </a>";
}
@@ -539,7 +539,7 @@ else {
//echo " <td class='".$row_style[$c]."' ondblclick=\"\">\n";
//if (file_exists($dir_fax_inbox.'/'.$file_name.".jpg")) {
// echo " <a href=\"v_fax_view.php?id=".$fax_uuid."&a=download&type=fax_inbox&t=jpg&ext=".$fax_extension."&filename=".$file_name.".jpg\" target=\"_blank\">\n";
// echo " <a href=\"fax_view.php?id=".$fax_uuid."&a=download&type=fax_inbox&t=jpg&ext=".$fax_extension."&filename=".$file_name.".jpg\" target=\"_blank\">\n";
// echo " jpg";
// echo " </a>";
//}
@@ -560,7 +560,7 @@ else {
echo " <table border=\"0\" cellspacing=\"0\" cellpadding=\"1\">\n";
echo " <tr>\n";
if (permission_exists('fax_inbox_delete')) {
echo " <td><a href=\"v_fax_view.php?id=".$fax_uuid."&type=fax_inbox&a=del&fax_extension=".urlencode($fax_extension)."&filename=".urlencode($file)."\" onclick=\"return confirm('Do you really want to delete this file?')\">$v_link_label_delete</a></td>\n";
echo " <td><a href=\"fax_view.php?id=".$fax_uuid."&type=fax_inbox&a=del&fax_extension=".urlencode($fax_extension)."&filename=".urlencode($file)."\" onclick=\"return confirm('Do you really want to delete this file?')\">$v_link_label_delete</a></td>\n";
}
echo " </tr>\n";
echo " </table>\n";
@@ -658,13 +658,13 @@ else {
}
echo "<tr>\n";
echo " <td class='".$row_style[$c]."' ondblclick=\"\">\n";
echo " <a href=\"v_fax_view.php?id=".$fax_uuid."&a=download&type=fax_sent&t=bin&ext=".urlencode($fax_extension)."&filename=".urlencode($file)."\">\n";
echo " <a href=\"fax_view.php?id=".$fax_uuid."&a=download&type=fax_sent&t=bin&ext=".urlencode($fax_extension)."&filename=".urlencode($file)."\">\n";
echo " $file";
echo " </a>";
echo " </td>\n";
echo " <td class='".$row_style[$c]."' ondblclick=\"\">\n";
if (file_exists($dir_fax_sent.'/'.$file_name.".pdf")) {
echo " <a href=\"v_fax_view.php?id=".$fax_uuid."&a=download&type=fax_sent&t=bin&ext=".urlencode($fax_extension)."&filename=".urlencode($file_name).".pdf\">\n";
echo " <a href=\"fax_view.php?id=".$fax_uuid."&a=download&type=fax_sent&t=bin&ext=".urlencode($fax_extension)."&filename=".urlencode($file_name).".pdf\">\n";
echo " PDF";
echo " </a>";
}
@@ -674,7 +674,7 @@ else {
echo " </td>\n";
//echo " <td class='".$row_style[$c]."' ondblclick=\"\">\n";
//if (file_exists($dir_fax_sent.'/'.$file_name.".jpg")) {
// echo " <a href=\"v_fax_view.php?id=".$fax_uuid."&a=download&type=fax_sent&t=jpg&ext=".$fax_extension."&filename=".$file_name.".jpg\" target=\"_blank\">\n";
// echo " <a href=\"fax_view.php?id=".$fax_uuid."&a=download&type=fax_sent&t=jpg&ext=".$fax_extension."&filename=".$file_name.".jpg\" target=\"_blank\">\n";
// echo " jpg";
// echo " </a>";
//}
@@ -694,7 +694,7 @@ else {
echo " <table border=\"0\" cellspacing=\"0\" cellpadding=\"1\">\n";
echo " <tr>\n";
if (permission_exists('fax_sent_delete')) {
echo " <td><a href=\"v_fax_view.php?id=".$fax_uuid."&type=fax_sent&a=del&fax_extension=".urlencode($fax_extension)."&filename=".urlencode($file)."\" onclick=\"return confirm('Do you really want to delete this file?')\">$v_link_label_delete</a></td>\n";
echo " <td><a href=\"fax_view.php?id=".$fax_uuid."&type=fax_sent&a=del&fax_extension=".urlencode($fax_extension)."&filename=".urlencode($file)."\" onclick=\"return confirm('Do you really want to delete this file?')\">$v_link_label_delete</a></td>\n";
}
echo " </tr>\n";
echo " </table>\n";