From 73069cac7f429834b7bb037e5148944c26f2aee8 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Tue, 9 Sep 2014 05:43:09 +0000 Subject: [PATCH] Add App -> Fax Logs --- app/fax_logs/app_config.php | 129 +++++++++ app/fax_logs/app_languages.php | 163 +++++++++++ app/fax_logs/fax_log_delete.php | 39 +++ app/fax_logs/fax_log_edit.php | 475 ++++++++++++++++++++++++++++++++ app/fax_logs/fax_logs.php | 184 +++++++++++++ app/fax_logs/root.php | 50 ++++ 6 files changed, 1040 insertions(+) create mode 100755 app/fax_logs/app_config.php create mode 100755 app/fax_logs/app_languages.php create mode 100755 app/fax_logs/fax_log_delete.php create mode 100755 app/fax_logs/fax_log_edit.php create mode 100755 app/fax_logs/fax_logs.php create mode 100755 app/fax_logs/root.php diff --git a/app/fax_logs/app_config.php b/app/fax_logs/app_config.php new file mode 100755 index 0000000000..ca73f06fcb --- /dev/null +++ b/app/fax_logs/app_config.php @@ -0,0 +1,129 @@ + \ No newline at end of file diff --git a/app/fax_logs/app_languages.php b/app/fax_logs/app_languages.php new file mode 100755 index 0000000000..22972946cc --- /dev/null +++ b/app/fax_logs/app_languages.php @@ -0,0 +1,163 @@ + \ No newline at end of file diff --git a/app/fax_logs/fax_log_delete.php b/app/fax_logs/fax_log_delete.php new file mode 100755 index 0000000000..f6c143cae9 --- /dev/null +++ b/app/fax_logs/fax_log_delete.php @@ -0,0 +1,39 @@ + $value) { + $text[$key] = $value[$_SESSION['domain']['language']['code']]; + } + +//get the id + if (count($_GET)>0) { + $id = check_str($_GET["id"]); + } + +if (strlen($id)>0) { + //delete fax_log + $sql = "delete from v_fax_logs "; + $sql .= "where domain_uuid = '$domain_uuid' "; + $sql .= "and fax_log_uuid = '$id' "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + unset($sql); +} + +//redirect the user + $_SESSION['message'] = $text['message-delete']; + header('Location: fax_logs.php'); + + +?> \ No newline at end of file diff --git a/app/fax_logs/fax_log_edit.php b/app/fax_logs/fax_log_edit.php new file mode 100755 index 0000000000..ece5177cf9 --- /dev/null +++ b/app/fax_logs/fax_log_edit.php @@ -0,0 +1,475 @@ + $value) { + $text[$key] = $value[$_SESSION['domain']['language']['code']]; + } + +//action add or update + if (isset($_REQUEST["id"])) { + $action = "update"; + $fax_log_uuid = check_str($_REQUEST["id"]); + } + else { + $action = "add"; + } + +//get http post variables and set them to php variables + if (count($_POST)>0) { + $fax_log_uuid = check_str($_POST["fax_log_uuid"]); + $fax_success = check_str($_POST["fax_success"]); + $fax_result_code = check_str($_POST["fax_result_code"]); + $fax_result_text = check_str($_POST["fax_result_text"]); + $fax_file = check_str($_POST["fax_file"]); + $fax_ecm_used = check_str($_POST["fax_ecm_used"]); + $fax_local_station_id = check_str($_POST["fax_local_station_id"]); + $fax_document_transferred_pages = check_str($_POST["fax_document_transferred_pages"]); + $fax_document_total_pages = check_str($_POST["fax_document_total_pages"]); + $fax_image_resolution = check_str($_POST["fax_image_resolution"]); + $fax_image_size = check_str($_POST["fax_image_size"]); + $fax_bad_rows = check_str($_POST["fax_bad_rows"]); + $fax_transfer_rate = check_str($_POST["fax_transfer_rate"]); + $fax_retry_attempts = check_str($_POST["fax_retry_attempts"]); + $fax_retry_limit = check_str($_POST["fax_retry_limit"]); + $fax_retry_sleep = check_str($_POST["fax_retry_sleep"]); + $fax_uri = check_str($_POST["fax_uri"]); + $fax_date = check_str($_POST["fax_date"]); + $fax_epoch = check_str($_POST["fax_epoch"]); + } + +if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { + + $msg = ''; + if ($action == "update") { + $fax_log_uuid = check_str($_POST["fax_log_uuid"]); + } + + //check for all required data + if (strlen($fax_log_uuid) == 0) { $msg .= $text['message-required']." ".$text['label-fax_log_uuid']."
\n"; } + if (strlen($domain_uuid) == 0) { $msg .= $text['message-required']." ".$text['label-domain_uuid']."
\n"; } + if (strlen($fax_success) == 0) { $msg .= $text['message-required']." ".$text['label-fax_success']."
\n"; } + if (strlen($fax_result_code) == 0) { $msg .= $text['message-required']." ".$text['label-fax_result_code']."
\n"; } + if (strlen($fax_result_text) == 0) { $msg .= $text['message-required']." ".$text['label-fax_result_text']."
\n"; } + if (strlen($fax_file) == 0) { $msg .= $text['message-required']." ".$text['label-fax_file']."
\n"; } + if (strlen($fax_ecm_used) == 0) { $msg .= $text['message-required']." ".$text['label-fax_ecm_used']."
\n"; } + if (strlen($fax_local_station_id) == 0) { $msg .= $text['message-required']." ".$text['label-fax_local_station_id']."
\n"; } + if (strlen($fax_document_transferred_pages) == 0) { $msg .= $text['message-required']." ".$text['label-fax_document_transferred_pages']."
\n"; } + if (strlen($fax_document_total_pages) == 0) { $msg .= $text['message-required']." ".$text['label-fax_document_total_pages']."
\n"; } + if (strlen($fax_image_resolution) == 0) { $msg .= $text['message-required']." ".$text['label-fax_image_resolution']."
\n"; } + if (strlen($fax_image_size) == 0) { $msg .= $text['message-required']." ".$text['label-fax_image_size']."
\n"; } + if (strlen($fax_bad_rows) == 0) { $msg .= $text['message-required']." ".$text['label-fax_bad_rows']."
\n"; } + if (strlen($fax_transfer_rate) == 0) { $msg .= $text['message-required']." ".$text['label-fax_transfer_rate']."
\n"; } + if (strlen($fax_retry_attempts) == 0) { $msg .= $text['message-required']." ".$text['label-fax_retry_attempts']."
\n"; } + if (strlen($fax_retry_limit) == 0) { $msg .= $text['message-required']." ".$text['label-fax_retry_limit']."
\n"; } + if (strlen($fax_retry_sleep) == 0) { $msg .= $text['message-required']." ".$text['label-fax_retry_sleep']."
\n"; } + if (strlen($fax_uri) == 0) { $msg .= $text['message-required']." ".$text['label-fax_uri']."
\n"; } + if (strlen($fax_date) == 0) { $msg .= $text['message-required']." ".$text['label-fax_date']."
\n"; } + if (strlen($fax_epoch) == 0) { $msg .= $text['message-required']." ".$text['label-fax_epoch']."
\n"; } + if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) { + require_once "resources/header.php"; + require_once "resources/persistformvar.php"; + echo "
\n"; + echo "
\n"; + echo $msg."
"; + echo "
\n"; + persistformvar($_POST); + echo "
\n"; + require_once "resources/footer.php"; + return; + } + + //add or update the database + if ($_POST["persistformvar"] != "true") { + if ($action == "add" && permission_exists('fax_log_add')) { + $sql = "insert into v_fax_logs "; + $sql .= "("; + $sql .= "domain_uuid, "; + $sql .= "fax_log_uuid, "; + $sql .= "fax_log_uuid, "; + $sql .= "domain_uuid, "; + $sql .= "fax_success, "; + $sql .= "fax_result_code, "; + $sql .= "fax_result_text, "; + $sql .= "fax_file, "; + $sql .= "fax_ecm_used, "; + $sql .= "fax_local_station_id, "; + $sql .= "fax_document_transferred_pages, "; + $sql .= "fax_document_total_pages, "; + $sql .= "fax_image_resolution, "; + $sql .= "fax_image_size, "; + $sql .= "fax_bad_rows, "; + $sql .= "fax_transfer_rate, "; + $sql .= "fax_retry_attempts, "; + $sql .= "fax_retry_limit, "; + $sql .= "fax_retry_sleep, "; + $sql .= "fax_uri, "; + $sql .= "fax_date, "; + $sql .= "fax_epoch "; + $sql .= ")"; + $sql .= "values "; + $sql .= "("; + $sql .= "'$domain_uuid', "; + $sql .= "'".uuid()."', "; + $sql .= "'$fax_log_uuid', "; + $sql .= "'$domain_uuid', "; + $sql .= "'$fax_success', "; + $sql .= "'$fax_result_code', "; + $sql .= "'$fax_result_text', "; + $sql .= "'$fax_file', "; + $sql .= "'$fax_ecm_used', "; + $sql .= "'$fax_local_station_id', "; + $sql .= "'$fax_document_transferred_pages', "; + $sql .= "'$fax_document_total_pages', "; + $sql .= "'$fax_image_resolution', "; + $sql .= "'$fax_image_size', "; + $sql .= "'$fax_bad_rows', "; + $sql .= "'$fax_transfer_rate', "; + $sql .= "'$fax_retry_attempts', "; + $sql .= "'$fax_retry_limit', "; + $sql .= "'$fax_retry_sleep', "; + $sql .= "'$fax_uri', "; + $sql .= "'$fax_date', "; + $sql .= "'$fax_epoch' "; + $sql .= ")"; + $db->exec(check_sql($sql)); + unset($sql); + + $_SESSION['message'] = $text['message-add']; + header('Location: fax_logs.php'); + return; + + } //if ($action == "add") + + if ($action == "update" && permission_exists('fax_log_edit')) { + $sql = "update v_fax_logs set "; + $sql .= "fax_log_uuid = '$fax_log_uuid', "; + $sql .= "domain_uuid = '$domain_uuid', "; + $sql .= "fax_success = '$fax_success', "; + $sql .= "fax_result_code = '$fax_result_code', "; + $sql .= "fax_result_text = '$fax_result_text', "; + $sql .= "fax_file = '$fax_file', "; + $sql .= "fax_ecm_used = '$fax_ecm_used', "; + $sql .= "fax_local_station_id = '$fax_local_station_id', "; + $sql .= "fax_document_transferred_pages = '$fax_document_transferred_pages', "; + $sql .= "fax_document_total_pages = '$fax_document_total_pages', "; + $sql .= "fax_image_resolution = '$fax_image_resolution', "; + $sql .= "fax_image_size = '$fax_image_size', "; + $sql .= "fax_bad_rows = '$fax_bad_rows', "; + $sql .= "fax_transfer_rate = '$fax_transfer_rate', "; + $sql .= "fax_retry_attempts = '$fax_retry_attempts', "; + $sql .= "fax_retry_limit = '$fax_retry_limit', "; + $sql .= "fax_retry_sleep = '$fax_retry_sleep', "; + $sql .= "fax_uri = '$fax_uri', "; + $sql .= "fax_date = '$fax_date', "; + $sql .= "fax_epoch = '$fax_epoch' "; + $sql .= "where domain_uuid = '$domain_uuid' "; + $sql .= "and fax_log_uuid = '$fax_log_uuid'"; + $db->exec(check_sql($sql)); + unset($sql); + + $_SESSION['message'] = $text['message-update']; + header('Location: fax_logs.php'); + return; + + } //if ($action == "update") + } //if ($_POST["persistformvar"] != "true") +} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) + +//pre-populate the form + if (count($_GET)>0 && $_POST["persistformvar"] != "true") { + $fax_log_uuid = check_str($_GET["id"]); + $sql = "select * from v_fax_logs "; + $sql .= "where domain_uuid = '$domain_uuid' "; + $sql .= "and fax_log_uuid = '$fax_log_uuid' "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); + foreach ($result as &$row) { + $fax_log_uuid = $row["fax_log_uuid"]; + $fax_success = $row["fax_success"]; + $fax_result_code = $row["fax_result_code"]; + $fax_result_text = $row["fax_result_text"]; + $fax_file = $row["fax_file"]; + $fax_ecm_used = $row["fax_ecm_used"]; + $fax_local_station_id = $row["fax_local_station_id"]; + $fax_document_transferred_pages = $row["fax_document_transferred_pages"]; + $fax_document_total_pages = $row["fax_document_total_pages"]; + $fax_image_resolution = $row["fax_image_resolution"]; + $fax_image_size = $row["fax_image_size"]; + $fax_bad_rows = $row["fax_bad_rows"]; + $fax_transfer_rate = $row["fax_transfer_rate"]; + $fax_retry_attempts = $row["fax_retry_attempts"]; + $fax_retry_limit = $row["fax_retry_limit"]; + $fax_retry_sleep = $row["fax_retry_sleep"]; + $fax_uri = $row["fax_uri"]; + $fax_date = $row["fax_date"]; + $fax_epoch = $row["fax_epoch"]; + break; //limit to 1 row + } + unset ($prep_statement); + } + +//show the header + require_once "resources/header.php"; + +//show the content + echo "
"; + echo "\n"; + echo "\n"; + echo " "; + echo " "; + echo "
\n"; + echo "
"; + + echo "
\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + //echo "\n"; + //echo "\n"; + //echo "\n"; + //echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo " \n"; + echo " \n"; + echo " "; + echo "
".$text['title-fax_log']."\n"; + echo " "; + echo " "; + echo "
\n"; + //echo " ".$text['label-fax_log_uuid']."\n"; + //echo "\n"; + //echo " \n"; + //echo "
\n"; + //echo $text['description-fax_log_uuid']."\n"; + //echo "
\n"; + echo " ".$text['label-fax_success']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-fax_success']."\n"; + echo "
\n"; + echo " ".$text['label-fax_result_code']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-fax_result_code']."\n"; + echo "
\n"; + echo " ".$text['label-fax_result_text']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-fax_result_text']."\n"; + echo "
\n"; + echo " ".$text['label-fax_file']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-fax_file']."\n"; + echo "
\n"; + echo " ".$text['label-fax_ecm_used']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-fax_ecm_used']."\n"; + echo "
\n"; + echo " ".$text['label-fax_local_station_id']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-fax_local_station_id']."\n"; + echo "
\n"; + echo " ".$text['label-fax_document_transferred_pages']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-fax_document_transferred_pages']."\n"; + echo "
\n"; + echo " ".$text['label-fax_document_total_pages']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-fax_document_total_pages']."\n"; + echo "
\n"; + echo " ".$text['label-fax_image_resolution']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-fax_image_resolution']."\n"; + echo "
\n"; + echo " ".$text['label-fax_image_size']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-fax_image_size']."\n"; + echo "
\n"; + echo " ".$text['label-fax_bad_rows']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-fax_bad_rows']."\n"; + echo "
\n"; + echo " ".$text['label-fax_transfer_rate']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-fax_transfer_rate']."\n"; + echo "
\n"; + echo " ".$text['label-fax_retry_attempts']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-fax_retry_attempts']."\n"; + echo "
\n"; + echo " ".$text['label-fax_retry_limit']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-fax_retry_limit']."\n"; + echo "
\n"; + echo " ".$text['label-fax_retry_sleep']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-fax_retry_sleep']."\n"; + echo "
\n"; + echo " ".$text['label-fax_uri']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-fax_uri']."\n"; + echo "
\n"; + echo " ".$text['label-fax_date']."\n"; + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
\n"; + echo "
\n"; + echo $text['description-fax_date']."\n"; + echo "
\n"; + echo " ".$text['label-fax_epoch']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-fax_epoch']."\n"; + echo "
\n"; + if ($action == "update") { + echo " \n"; + } + echo " \n"; + echo "
"; + echo ""; + + echo "
"; + echo "
"; + +//include the footer + require_once "resources/footer.php"; +?> \ No newline at end of file diff --git a/app/fax_logs/fax_logs.php b/app/fax_logs/fax_logs.php new file mode 100755 index 0000000000..097cf0b6f5 --- /dev/null +++ b/app/fax_logs/fax_logs.php @@ -0,0 +1,184 @@ + $value) { + $text[$key] = $value[$_SESSION['domain']['language']['code']]; + } + +//get variables used to control the order + $order_by = $_GET["order_by"]; + $order = $_GET["order"]; + +//additional includes + require_once "resources/header.php"; + require_once "resources/paging.php"; + +//show the content + echo "
"; + echo "\n"; + echo "\n"; + echo " "; + echo ""; + echo "
\n"; + echo "
"; + + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
".$text['title-fax_logs']." 
\n"; + echo " ".$text['description-fax_log']."

\n"; + echo "
\n"; + + //prepare to page the results + $sql = "select count(*) as num_rows from v_fax_logs "; + $sql .= "where domain_uuid = '$domain_uuid' "; + if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; } + $prep_statement = $db->prepare($sql); + if ($prep_statement) { + $prep_statement->execute(); + $row = $prep_statement->fetch(PDO::FETCH_ASSOC); + if ($row['num_rows'] > 0) { + $num_rows = $row['num_rows']; + } + else { + $num_rows = '0'; + } + } + + //prepare to page the results + $rows_per_page = 100; + $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; + + //get the list + $sql = "select * from v_fax_logs "; + $sql .= "where domain_uuid = '$domain_uuid' "; + if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; } + $sql .= "limit $rows_per_page offset $offset "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); + $result_count = count($result); + unset ($prep_statement, $sql); + + $c = 0; + $row_style["0"] = "row_style0"; + $row_style["1"] = "row_style1"; + + echo "
\n"; + echo "\n"; + echo "\n"; + echo th_order_by('fax_success', $text['label-fax_success'], $order_by, $order); + echo th_order_by('fax_result_code', $text['label-fax_result_code'], $order_by, $order); + echo th_order_by('fax_result_text', $text['label-fax_result_text'], $order_by, $order); + echo th_order_by('fax_file', $text['label-fax_file'], $order_by, $order); + echo th_order_by('fax_ecm_used', $text['label-fax_ecm_used'], $order_by, $order); + echo th_order_by('fax_local_station_id', $text['label-fax_local_station_id'], $order_by, $order); + //echo th_order_by('fax_document_transferred_pages', $text['label-fax_document_transferred_pages'], $order_by, $order); + //echo th_order_by('fax_document_total_pages', $text['label-fax_document_total_pages'], $order_by, $order); + //echo th_order_by('fax_image_resolution', $text['label-fax_image_resolution'], $order_by, $order); + //echo th_order_by('fax_image_size', $text['label-fax_image_size'], $order_by, $order); + echo th_order_by('fax_bad_rows', $text['label-fax_bad_rows'], $order_by, $order); + echo th_order_by('fax_transfer_rate', $text['label-fax_transfer_rate'], $order_by, $order); + echo th_order_by('fax_retry_attempts', $text['label-fax_retry_attempts'], $order_by, $order); + //echo th_order_by('fax_retry_limit', $text['label-fax_retry_limit'], $order_by, $order); + //echo th_order_by('fax_retry_sleep', $text['label-fax_retry_sleep'], $order_by, $order); + echo th_order_by('fax_uri', $text['label-fax_destination'], $order_by, $order); + echo th_order_by('fax_date', $text['label-fax_date'], $order_by, $order); + //echo th_order_by('fax_epoch', $text['label-fax_epoch'], $order_by, $order); + echo "\n"; + echo "\n"; + + if ($result_count > 0) { + foreach($result as $row) { + if (permission_exists('fax_log_edit')) { + $tr_link = "href='fax_log_edit.php?id=".$row['fax_log_uuid']."'"; + } + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + //echo " \n"; + //echo " \n"; + //echo " \n"; + //echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + //echo " \n"; + //echo " \n"; + echo " \n"; + echo " \n"; + //echo " \n"; + echo " \n"; + echo "\n"; + if ($c==0) { $c=1; } else { $c=0; } + } //end foreach + unset($sql, $result, $row_count); + } //end if results + + echo "\n"; + echo "\n"; + echo "\n"; + + echo "
"; + if (permission_exists('fax_log_add')) { + echo "$v_link_label_add"; + } + else { + echo " \n"; + } + echo "
".$row['fax_success']." ".$row['fax_result_code']." ".$row['fax_result_text']." ".basename($row['fax_file'])." ".$row['fax_ecm_used']." ".$row['fax_local_station_id']." ".$row['fax_document_transferred_pages']." ".$row['fax_document_total_pages']." ".$row['fax_image_resolution']." ".$row['fax_image_size']." ".$row['fax_bad_rows']." ".$row['fax_transfer_rate']." ".$row['fax_retry_attempts']." ".$row['fax_retry_limit']." ".$row['fax_retry_sleep']." ".basename($row['fax_uri'])." ".$row['fax_date']." ".$row['fax_epoch']." "; + if (permission_exists('fax_log_edit')) { + echo "$v_link_label_edit"; + } + if (permission_exists('fax_log_delete')) { + echo "$v_link_label_delete"; + } + echo "
\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
 $paging_controls"; + if (permission_exists('fax_log_add')) { + echo "$v_link_label_add"; + } + else { + echo " "; + } + echo "
\n"; + echo "
"; + echo "
"; + echo "

"; + + echo "
"; + echo "
"; + echo "

"; + +//include the footer + require_once "resources/footer.php"; +?> \ No newline at end of file diff --git a/app/fax_logs/root.php b/app/fax_logs/root.php new file mode 100755 index 0000000000..7b882438ea --- /dev/null +++ b/app/fax_logs/root.php @@ -0,0 +1,50 @@ + + Portions created by the Initial Developer are Copyright (C) 2008-2012 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane +*/ + +// make sure the PATH_SEPARATOR is defined + if (!defined("PATH_SEPARATOR")) { + if ( strpos( $_ENV[ "OS" ], "Win" ) !== false ) { define("PATH_SEPARATOR", ";"); } else { define("PATH_SEPARATOR", ":"); } + } + +// make sure the document_root is set + $_SERVER["SCRIPT_FILENAME"] = str_replace("\\", "/", $_SERVER["SCRIPT_FILENAME"]); + $_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]); + $_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]); + //echo "DOCUMENT_ROOT: ".$_SERVER["DOCUMENT_ROOT"]."
\n"; + //echo "PHP_SELF: ".$_SERVER["PHP_SELF"]."
\n"; + //echo "SCRIPT_FILENAME: ".$_SERVER["SCRIPT_FILENAME"]."
\n"; + +// if the project directory exists then add it to the include path otherwise add the document root to the include path + if (is_dir($_SERVER["DOCUMENT_ROOT"].'/fusionpbx')){ + if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', '/fusionpbx'); } + set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER["DOCUMENT_ROOT"].'/fusionpbx' ); + } + else { + if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', ''); } + set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] ); + } + +?> \ No newline at end of file