Portions created by the Initial Developer are Copyright (C) 2008-2020 the Initial Developer. All Rights Reserved. Contributor(s): Mark J Crane */ //includes require_once "root.php"; require_once "resources/require.php"; require_once "resources/check_auth.php"; //check permissions if (permission_exists('fax_log_view')) { //access granted } else { echo "access denied"; exit; } //add multi-lingual support $language = new text; $text = $language->get(); //validate the uuids if (is_uuid($_REQUEST["id"])) { $fax_log_uuid = $_REQUEST["id"]; } if (is_uuid($_REQUEST["fax_uuid"])) { $fax_uuid = $_REQUEST["fax_uuid"]; } //process the http post data by submitted action if ($_POST['action'] != '' && is_uuid($fax_log_uuid) && is_uuid($fax_uuid)) { $array[0]['checked'] = 'true'; $array[0]['uuid'] = $fax_log_uuid; switch ($_POST['action']) { case 'delete': if (permission_exists('fax_log_delete')) { $obj = new fax; $obj->fax_uuid = $fax_uuid; $obj->delete_logs($array); } break; } header('Location: fax_logs.php?id='.urlencode($fax_uuid)); exit; } //pre-populate the form if (is_uuid($fax_log_uuid) && is_uuid($fax_uuid)) { $sql = "select * from v_fax_logs "; $sql .= "where domain_uuid = :domain_uuid "; $sql .= "and fax_log_uuid = :fax_log_uuid "; $parameters['domain_uuid'] = $domain_uuid; $parameters['fax_log_uuid'] = $fax_log_uuid; $database = new database; $row = $database->select($sql, $parameters, 'row'); if (is_array($row) && @sizeof($row) != 0) { $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"]; } unset($sql, $parameters, $row); } //create token $object = new token; $token = $object->create($_SERVER['PHP_SELF']); //show the header $document['title'] = $text['title-fax_logs']; require_once "resources/header.php"; //show the content echo "
\n"; echo "
\n"; echo "
".$text['title-fax_log']."
\n"; echo "
\n"; echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','link'=>'fax_logs.php?id='.urlencode($fax_uuid)]); if (permission_exists('fax_log_delete')) { echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'name'=>'btn_delete','style'=>'margin-left: 15px;','onclick'=>"modal_open('modal-delete','btn_delete');"]); } echo "
\n"; echo "
\n"; echo "
\n"; if (permission_exists('fax_log_delete')) { echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'submit','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','name'=>'action','value'=>'delete','onclick'=>"modal_close();"])]); } 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 "
".$text['label-fax_success']."".escape($fax_success)."
".$text['label-fax_result_code']."".escape($fax_result_code)."
".$text['label-fax_result_text']."".escape($fax_result_text)."
".$text['label-fax_file']."".escape($fax_file)."
".$text['label-fax_ecm_used']."".escape($fax_ecm_used)."
".$text['label-fax_local_station_id']."".escape($fax_local_station_id)."
".$text['label-fax_document_transferred_pages']."".$fax_document_transferred_pages."
".$text['label-fax_document_total_pages']."".escape($fax_document_total_pages)."
".$text['label-fax_image_resolution']."".escape($fax_image_resolution)."
".$text['label-fax_image_size']."".escape($fax_image_size)."
".$text['label-fax_bad_rows']."".escape($fax_bad_rows)."
".$text['label-fax_transfer_rate']."".escape($fax_transfer_rate)."
".$text['label-fax_retry_attempts']."".escape($fax_retry_attempts)."
".$text['label-fax_retry_limit']."".escape($fax_retry_limit)."
".$text['label-fax_retry_sleep']."".escape($fax_retry_sleep)."
".$text['label-fax_uri']."".escape($fax_uri)."
".$text['label-fax_date']."".escape($fax_date)."
".$text['label-fax_epoch']."".escape($fax_epoch)."
"; echo "

"; echo "\n"; echo "\n"; echo "\n"; echo "
"; //include the footer require_once "resources/footer.php"; ?>