Work on the fax log redirect and links

This commit is contained in:
Mark Crane
2014-09-09 17:51:18 +00:00
parent 22514af68d
commit 2a615f2be6
2 changed files with 9 additions and 6 deletions
+2 -2
View File
@@ -19,6 +19,7 @@ else {
//get the id //get the id
if (count($_GET) > 0) { if (count($_GET) > 0) {
$id = check_str($_GET["id"]); $id = check_str($_GET["id"]);
$fax_uuid = check_str($_GET["fax_uuid"]);
} }
if (strlen($id)>0) { if (strlen($id)>0) {
@@ -33,7 +34,6 @@ if (strlen($id)>0) {
//redirect the user //redirect the user
$_SESSION['message'] = $text['message-delete']; $_SESSION['message'] = $text['message-delete'];
header('Location: fax_logs.php'); header('Location: fax_logs.php?id=$fax_uuid');
?> ?>
+7 -4
View File
@@ -20,13 +20,14 @@ else {
if (isset($_REQUEST["id"])) { if (isset($_REQUEST["id"])) {
$action = "update"; $action = "update";
$fax_log_uuid = check_str($_REQUEST["id"]); $fax_log_uuid = check_str($_REQUEST["id"]);
$fax_uuid = check_str($_REQUEST["fax_uuid"]);
} }
else { else {
$action = "add"; $action = "add";
} }
//get http post variables and set them to php variables //get http post variables and set them to php variables
if (count($_POST)>0) { if (count($_POST) > 0) {
$fax_log_uuid = check_str($_POST["fax_log_uuid"]); $fax_log_uuid = check_str($_POST["fax_log_uuid"]);
$fax_success = check_str($_POST["fax_success"]); $fax_success = check_str($_POST["fax_success"]);
$fax_result_code = check_str($_POST["fax_result_code"]); $fax_result_code = check_str($_POST["fax_result_code"]);
@@ -91,6 +92,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//add or update the database //add or update the database
if ($_POST["persistformvar"] != "true") { if ($_POST["persistformvar"] != "true") {
/*
if ($action == "add" && permission_exists('fax_log_add')) { if ($action == "add" && permission_exists('fax_log_add')) {
$sql = "insert into v_fax_logs "; $sql = "insert into v_fax_logs ";
$sql .= "("; $sql .= "(";
@@ -150,6 +152,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
return; return;
} //if ($action == "add") } //if ($action == "add")
*/
if ($action == "update" && permission_exists('fax_log_edit')) { if ($action == "update" && permission_exists('fax_log_edit')) {
$sql = "update v_fax_logs set "; $sql = "update v_fax_logs set ";
@@ -236,8 +239,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "<tr>\n"; echo "<tr>\n";
echo "<td align='left' width='30%' nowrap='nowrap'><b>".$text['title-fax_log']."</b></td>\n"; echo "<td align='left' width='30%' nowrap='nowrap'><b>".$text['title-fax_log']."</b></td>\n";
echo "<td width='70%' align='right'>\n"; echo "<td width='70%' align='right'>\n";
echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='fax_logs.php'\" value='".$text['button-back']."'>"; echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='fax_logs.php?id=$fax_uuid'\" value='".$text['button-back']."'>";
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>"; //echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>";
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
@@ -459,7 +462,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
if ($action == "update") { if ($action == "update") {
echo " <input type='hidden' name='fax_log_uuid' value='$fax_log_uuid'>\n"; echo " <input type='hidden' name='fax_log_uuid' value='$fax_log_uuid'>\n";
} }
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n"; //echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
echo " </td>\n"; echo " </td>\n";
echo " </tr>"; echo " </tr>";
echo "</table>"; echo "</table>";