Add App -> Fax Logs
This commit is contained in:
parent
1920209c1c
commit
2ae3017b75
|
|
@ -0,0 +1,129 @@
|
|||
<?php
|
||||
//application details
|
||||
$apps[$x]['name'] = 'FAX Logs';
|
||||
$apps[$x]['uuid'] = '02ffd6e8-c7d5-4f56-812e-5c1b4fd3fe02';
|
||||
$apps[$x]['category'] = '';
|
||||
$apps[$x]['subcategory'] = '';
|
||||
$apps[$x]['version'] = '';
|
||||
$apps[$x]['license'] = 'Mozilla Public License 1.1';
|
||||
$apps[$x]['url'] = 'http://www.fusionpbx.com';
|
||||
$apps[$x]['description']['en-us'] = '';
|
||||
|
||||
//menu details
|
||||
$apps[$x]['menu'][0]['title']['en-us'] = 'FAX Logs';
|
||||
$apps[$x]['menu'][0]['uuid'] = 'f91b1476-e7e9-40f5-a181-2f3e1e5bc16b';
|
||||
$apps[$x]['menu'][0]['parent_uuid'] = 'fd29e39c-c936-f5fc-8e2b-611681b266b5';
|
||||
$apps[$x]['menu'][0]['category'] = 'internal';
|
||||
$apps[$x]['menu'][0]['path'] = '/app/fax_logs/fax_logs.php';
|
||||
//$apps[$x]['menu'][0]['groups'][] = 'user';
|
||||
//$apps[$x]['menu'][0]['groups'][] = 'admin';
|
||||
$apps[$x]['menu'][0]['groups'][] = 'superadmin';
|
||||
|
||||
//permission details
|
||||
$y = 0;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'fax_log_view';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
//$apps[$x]['permissions'][$y]['groups'][] = 'user';
|
||||
//$apps[$x]['permissions'][$y]['groups'][] = 'admin';
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'fax_log_edit';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
//$apps[$x]['permissions'][$y]['groups'][] = 'admin';
|
||||
//$apps[$x]['permissions'][$y]['groups'][] = 'user';
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'fax_log_delete';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
//$apps[$x]['permissions'][$y]['groups'][] = 'admin';
|
||||
$y++;
|
||||
|
||||
//schema details
|
||||
$y = 0; //table array index
|
||||
$z = 0; //field array index
|
||||
$apps[$x]['db'][$y]['table'] = 'v_fax_logs';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'domain_uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'foreign';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = 'v_domains';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = 'domain_uuid';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'fax_log_uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'primary';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'fax_success';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'fax_success';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'fax_result_code';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'fax_result_code';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'fax_result_text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'fax_result_text';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'fax_file';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'fax_file';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'fax_ecm_used';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'fax_ecm_used';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'fax_local_station_id';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'fax_local_station_id';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'fax_document_transferred_pages';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'fax_document_transferred_pages';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'fax_document_total_pages';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'fax_document_total_pages';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'fax_image_resolution';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'fax_image_resolution';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'fax_image_size';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'fax_image_size';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'fax_bad_rows';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'fax_bad_rows';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'fax_transfer_rate';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'fax_transfer_rate';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'fax_retry_attempts';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'fax_retry_attempts';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'fax_retry_limit';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'fax_retry_limit';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'fax_retry_sleep';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'fax_retry_sleep';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'fax_uri';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'fax_uri';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'fax_date';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'timestamp';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'fax_date';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'fax_epoch';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'fax_epoch';
|
||||
$z++;
|
||||
?>
|
||||
|
|
@ -0,0 +1,163 @@
|
|||
<?php
|
||||
|
||||
//FAX Logs
|
||||
$text['title-fax_logs']['en-us'] = 'FAX Logs';
|
||||
$text['title-fax_logs']['pt-pt'] = '';
|
||||
|
||||
$text['title-fax_log']['en-us'] = 'Fax Log';
|
||||
$text['title-fax_log']['pt-pt'] = '';
|
||||
|
||||
$text['description-fax_log']['en-us'] = 'The details for sending and receiving a fax included are whether fax was successful, ECM (Error Correction Mode), number of retries, destination number, date, etc. ';
|
||||
$text['description-fax_log']['pt-pt'] = '';
|
||||
|
||||
$text['label-fax_success']['en-us'] = 'Success';
|
||||
$text['label-fax_success']['pt-pt'] = '';
|
||||
|
||||
$text['description-fax_success']['en-us'] = '';
|
||||
$text['description-fax_success']['pt-pt'] = '';
|
||||
|
||||
$text['label-fax_result_code']['en-us'] = 'Code';
|
||||
$text['label-fax_result_code']['pt-pt'] = '';
|
||||
|
||||
$text['description-fax_result_code']['en-us'] = '';
|
||||
$text['description-fax_result_code']['pt-pt'] = '';
|
||||
|
||||
$text['label-fax_result_text']['en-us'] = 'Result';
|
||||
$text['label-fax_result_text']['pt-pt'] = '';
|
||||
|
||||
$text['description-fax_result_text']['en-us'] = '';
|
||||
$text['description-fax_result_text']['pt-pt'] = '';
|
||||
|
||||
$text['label-fax_file']['en-us'] = 'File';
|
||||
$text['label-fax_file']['pt-pt'] = '';
|
||||
|
||||
$text['description-fax_file']['en-us'] = '';
|
||||
$text['description-fax_file']['pt-pt'] = '';
|
||||
|
||||
$text['label-fax_ecm_used']['en-us'] = 'ECM';
|
||||
$text['label-fax_ecm_used']['pt-pt'] = '';
|
||||
|
||||
$text['description-fax_ecm_used']['en-us'] = '';
|
||||
$text['description-fax_ecm_used']['pt-pt'] = '';
|
||||
|
||||
$text['label-fax_local_station_id']['en-us'] = 'Local Station ID';
|
||||
$text['label-fax_local_station_id']['pt-pt'] = '';
|
||||
|
||||
$text['description-fax_local_station_id']['en-us'] = '';
|
||||
$text['description-fax_local_station_id']['pt-pt'] = '';
|
||||
|
||||
$text['label-fax_document_transferred_pages']['en-us'] = 'Document Transferred Pages';
|
||||
$text['label-fax_document_transferred_pages']['pt-pt'] = '';
|
||||
|
||||
$text['description-fax_document_transferred_pages']['en-us'] = '';
|
||||
$text['description-fax_document_transferred_pages']['pt-pt'] = '';
|
||||
|
||||
$text['label-fax_document_total_pages']['en-us'] = 'Document Total Pages';
|
||||
$text['label-fax_document_total_pages']['pt-pt'] = '';
|
||||
|
||||
$text['description-fax_document_total_pages']['en-us'] = '';
|
||||
$text['description-fax_document_total_pages']['pt-pt'] = '';
|
||||
|
||||
$text['label-fax_image_resolution']['en-us'] = 'Image Resolution';
|
||||
$text['label-fax_image_resolution']['pt-pt'] = '';
|
||||
|
||||
$text['description-fax_image_resolution']['en-us'] = '';
|
||||
$text['description-fax_image_resolution']['pt-pt'] = '';
|
||||
|
||||
$text['label-fax_image_size']['en-us'] = 'Image Size';
|
||||
$text['label-fax_image_size']['pt-pt'] = '';
|
||||
|
||||
$text['description-fax_image_size']['en-us'] = '';
|
||||
$text['description-fax_image_size']['pt-pt'] = '';
|
||||
|
||||
$text['label-fax_bad_rows']['en-us'] = 'Bad Rows';
|
||||
$text['label-fax_bad_rows']['pt-pt'] = '';
|
||||
|
||||
$text['description-fax_bad_rows']['en-us'] = '';
|
||||
$text['description-fax_bad_rows']['pt-pt'] = '';
|
||||
|
||||
$text['label-fax_transfer_rate']['en-us'] = 'Transfer Rate';
|
||||
$text['label-fax_transfer_rate']['pt-pt'] = '';
|
||||
|
||||
$text['description-fax_transfer_rate']['en-us'] = '';
|
||||
$text['description-fax_transfer_rate']['pt-pt'] = '';
|
||||
|
||||
$text['label-fax_retry_attempts']['en-us'] = 'Retry';
|
||||
$text['label-fax_retry_attempts']['pt-pt'] = '';
|
||||
|
||||
$text['description-fax_retry_attempts']['en-us'] = '';
|
||||
$text['description-fax_retry_attempts']['pt-pt'] = '';
|
||||
|
||||
$text['label-fax_retry_limit']['en-us'] = 'Retry Limit';
|
||||
$text['label-fax_retry_limit']['pt-pt'] = '';
|
||||
|
||||
$text['description-fax_retry_limit']['en-us'] = '';
|
||||
$text['description-fax_retry_limit']['pt-pt'] = '';
|
||||
|
||||
$text['label-fax_retry_sleep']['en-us'] = 'Retry Sleep';
|
||||
$text['label-fax_retry_sleep']['pt-pt'] = '';
|
||||
|
||||
$text['description-fax_retry_sleep']['en-us'] = '';
|
||||
$text['description-fax_retry_sleep']['pt-pt'] = '';
|
||||
|
||||
$text['label-fax_destination']['en-us'] = 'Destination';
|
||||
$text['label-fax_destination']['pt-pt'] = '';
|
||||
|
||||
$text['label-fax_uri']['en-us'] = 'URI';
|
||||
$text['label-fax_uri']['pt-pt'] = '';
|
||||
|
||||
$text['description-fax_uri']['en-us'] = '';
|
||||
$text['description-fax_uri']['pt-pt'] = '';
|
||||
|
||||
$text['label-fax_date']['en-us'] = 'Date';
|
||||
$text['label-fax_date']['pt-pt'] = '';
|
||||
|
||||
$text['description-fax_date']['en-us'] = '';
|
||||
$text['description-fax_date']['pt-pt'] = '';
|
||||
|
||||
$text['label-fax_epoch']['en-us'] = 'Epoch';
|
||||
$text['label-fax_epoch']['pt-pt'] = '';
|
||||
|
||||
$text['description-fax_epoch']['en-us'] = '';
|
||||
$text['description-fax_epoch']['pt-pt'] = '';
|
||||
|
||||
$text['label-true']['en-us'] = 'true';
|
||||
$text['label-true']['pt-pt'] = '';
|
||||
|
||||
$text['label-false']['en-us'] = 'false';
|
||||
$text['label-false']['pt-pt'] = 'falso';
|
||||
|
||||
$text['button-add']['en-us'] = 'Add';
|
||||
$text['button-add']['pt-pt'] = '';
|
||||
|
||||
$text['button-edit']['en-us'] = 'Edit';
|
||||
$text['button-edit']['pt-pt'] = '';
|
||||
|
||||
$text['button-delete']['en-us'] = 'Delete';
|
||||
$text['button-delete']['pt-pt'] = '';
|
||||
|
||||
$text['button-save']['en-us'] = 'Save';
|
||||
$text['button-save']['pt-pt'] = 'Guardar';
|
||||
|
||||
$text['button-view']['en-us'] = 'View';
|
||||
$text['button-view']['pt-pt'] = '';
|
||||
|
||||
$text['button-back']['en-us'] = 'Back';
|
||||
$text['button-back']['pt-pt'] = 'Voltar';
|
||||
|
||||
$text['confirm-delete']['en-us'] = 'Do you really want to delete this?';
|
||||
$text['confirm-delete']['pt-pt'] = '';
|
||||
|
||||
$text['message-add']['en-us'] = 'Add Completed';
|
||||
$text['message-add']['pt-pt'] = '';
|
||||
|
||||
$text['message-update']['en-us'] = 'Update Completed';
|
||||
$text['message-update']['pt-pt'] = '';
|
||||
|
||||
$text['message-delete']['en-us'] = 'Delete Completed';
|
||||
$text['message-delete']['pt-pt'] = '';
|
||||
|
||||
$text['message-required']['en-us'] = 'Please provide: ';
|
||||
$text['message-required']['pt-pt'] = '';
|
||||
|
||||
?>
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
if (permission_exists('fax_log_delete')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
require_once "app_languages.php";
|
||||
foreach($text as $key => $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');
|
||||
|
||||
|
||||
?>
|
||||
|
|
@ -0,0 +1,475 @@
|
|||
<?php
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
if (permission_exists('fax_log_add') || permission_exists('fax_log_edit')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
require_once "app_languages.php";
|
||||
foreach($text as $key => $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']."<br>\n"; }
|
||||
if (strlen($domain_uuid) == 0) { $msg .= $text['message-required']." ".$text['label-domain_uuid']."<br>\n"; }
|
||||
if (strlen($fax_success) == 0) { $msg .= $text['message-required']." ".$text['label-fax_success']."<br>\n"; }
|
||||
if (strlen($fax_result_code) == 0) { $msg .= $text['message-required']." ".$text['label-fax_result_code']."<br>\n"; }
|
||||
if (strlen($fax_result_text) == 0) { $msg .= $text['message-required']." ".$text['label-fax_result_text']."<br>\n"; }
|
||||
if (strlen($fax_file) == 0) { $msg .= $text['message-required']." ".$text['label-fax_file']."<br>\n"; }
|
||||
if (strlen($fax_ecm_used) == 0) { $msg .= $text['message-required']." ".$text['label-fax_ecm_used']."<br>\n"; }
|
||||
if (strlen($fax_local_station_id) == 0) { $msg .= $text['message-required']." ".$text['label-fax_local_station_id']."<br>\n"; }
|
||||
if (strlen($fax_document_transferred_pages) == 0) { $msg .= $text['message-required']." ".$text['label-fax_document_transferred_pages']."<br>\n"; }
|
||||
if (strlen($fax_document_total_pages) == 0) { $msg .= $text['message-required']." ".$text['label-fax_document_total_pages']."<br>\n"; }
|
||||
if (strlen($fax_image_resolution) == 0) { $msg .= $text['message-required']." ".$text['label-fax_image_resolution']."<br>\n"; }
|
||||
if (strlen($fax_image_size) == 0) { $msg .= $text['message-required']." ".$text['label-fax_image_size']."<br>\n"; }
|
||||
if (strlen($fax_bad_rows) == 0) { $msg .= $text['message-required']." ".$text['label-fax_bad_rows']."<br>\n"; }
|
||||
if (strlen($fax_transfer_rate) == 0) { $msg .= $text['message-required']." ".$text['label-fax_transfer_rate']."<br>\n"; }
|
||||
if (strlen($fax_retry_attempts) == 0) { $msg .= $text['message-required']." ".$text['label-fax_retry_attempts']."<br>\n"; }
|
||||
if (strlen($fax_retry_limit) == 0) { $msg .= $text['message-required']." ".$text['label-fax_retry_limit']."<br>\n"; }
|
||||
if (strlen($fax_retry_sleep) == 0) { $msg .= $text['message-required']." ".$text['label-fax_retry_sleep']."<br>\n"; }
|
||||
if (strlen($fax_uri) == 0) { $msg .= $text['message-required']." ".$text['label-fax_uri']."<br>\n"; }
|
||||
if (strlen($fax_date) == 0) { $msg .= $text['message-required']." ".$text['label-fax_date']."<br>\n"; }
|
||||
if (strlen($fax_epoch) == 0) { $msg .= $text['message-required']." ".$text['label-fax_epoch']."<br>\n"; }
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/persistformvar.php";
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table><tr><td>\n";
|
||||
echo $msg."<br />";
|
||||
echo "</td></tr></table>\n";
|
||||
persistformvar($_POST);
|
||||
echo "</div>\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 "<div align='center'>";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing=''>\n";
|
||||
echo "<tr class='border'>\n";
|
||||
echo " <td align=\"left\">\n";
|
||||
echo " <br>";
|
||||
|
||||
echo "<form method='post' name='frm' action=''>\n";
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='6' cellspacing='0'>\n";
|
||||
echo "<tr>\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 " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='fax_logs.php'\" value='".$text['button-back']."'>";
|
||||
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
//echo "<tr>\n";
|
||||
//echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
//echo " ".$text['label-fax_log_uuid']."\n";
|
||||
//echo "</td>\n";
|
||||
//echo "<td class='vtable' align='left'>\n";
|
||||
//echo " <input class='formfld' type='text' name='fax_log_uuid' maxlength='255' value='$fax_log_uuid'>\n";
|
||||
//echo "<br />\n";
|
||||
//echo $text['description-fax_log_uuid']."\n";
|
||||
//echo "</td>\n";
|
||||
//echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-fax_success']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='fax_success' maxlength='255' value='$fax_success'>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-fax_success']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-fax_result_code']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='fax_result_code' maxlength='255' value='$fax_result_code'>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-fax_result_code']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-fax_result_text']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='fax_result_text' maxlength='255' value=\"$fax_result_text\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-fax_result_text']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-fax_file']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='fax_file' maxlength='255' value=\"$fax_file\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-fax_file']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-fax_ecm_used']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='fax_ecm_used' maxlength='255' value=\"$fax_ecm_used\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-fax_ecm_used']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-fax_local_station_id']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='fax_local_station_id' maxlength='255' value=\"$fax_local_station_id\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-fax_local_station_id']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-fax_document_transferred_pages']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='fax_document_transferred_pages' maxlength='255' value='$fax_document_transferred_pages'>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-fax_document_transferred_pages']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-fax_document_total_pages']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='fax_document_total_pages' maxlength='255' value='$fax_document_total_pages'>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-fax_document_total_pages']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-fax_image_resolution']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='fax_image_resolution' maxlength='255' value=\"$fax_image_resolution\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-fax_image_resolution']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-fax_image_size']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='fax_image_size' maxlength='255' value=\"$fax_image_size\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-fax_image_size']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-fax_bad_rows']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='fax_bad_rows' maxlength='255' value='$fax_bad_rows'>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-fax_bad_rows']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-fax_transfer_rate']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='fax_transfer_rate' maxlength='255' value='$fax_transfer_rate'>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-fax_transfer_rate']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-fax_retry_attempts']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='fax_retry_attempts' maxlength='255' value='$fax_retry_attempts'>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-fax_retry_attempts']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-fax_retry_limit']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='fax_retry_limit' maxlength='255' value='$fax_retry_limit'>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-fax_retry_limit']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-fax_retry_sleep']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='fax_retry_sleep' maxlength='255' value='$fax_retry_sleep'>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-fax_retry_sleep']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-fax_uri']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='fax_uri' maxlength='255' value=\"$fax_uri\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-fax_uri']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-fax_date']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <table border='0' width='100%' cellpadding='0' cellspacing='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td valign='top' align='top'><input name='fax_date' readonly class='formfld' value='$fax_date' type='text' class='formfld' onclick='popUpCalendar(this, this, \"mm/dd/yyyy\");'></td>\n";
|
||||
echo " <td valign='middle' align='top' width='20' align='right'><img src='/images/icon_calendar.gif' onclick='popUpCalendar(this, frm.fax_date, \"mm/dd/yyyy\");'></td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " </table>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-fax_date']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-fax_epoch']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='fax_epoch' maxlength='255' value='$fax_epoch'>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-fax_epoch']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td colspan='2' align='right'>\n";
|
||||
if ($action == "update") {
|
||||
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 " </td>\n";
|
||||
echo " </tr>";
|
||||
echo "</table>";
|
||||
echo "</form>";
|
||||
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
echo "</table>";
|
||||
echo "</div>";
|
||||
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
?>
|
||||
|
|
@ -0,0 +1,184 @@
|
|||
<?php
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
if (permission_exists('fax_log_view')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
//add multi-lingual support
|
||||
require_once "app_languages.php";
|
||||
foreach($text as $key => $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 "<div align='center'>";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='2'>\n";
|
||||
echo "<tr class='border'>\n";
|
||||
echo " <td align=\"center\">\n";
|
||||
echo " <br />";
|
||||
|
||||
echo "<table width='100%' border='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td width='50%' align='left' nowrap='nowrap'><b>".$text['title-fax_logs']."</b></td>\n";
|
||||
echo " <td width='50%' align='right'> </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td align='left' colspan='2'>\n";
|
||||
echo " ".$text['description-fax_log']."<br /><br />\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo "</table>\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 "<div align='center'>\n";
|
||||
echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo "<tr>\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 "<td class='list_control_icons'>";
|
||||
if (permission_exists('fax_log_add')) {
|
||||
echo "<a href='fax_log_edit.php' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||
}
|
||||
else {
|
||||
echo " \n";
|
||||
}
|
||||
echo "</td>\n";
|
||||
echo "<tr>\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 "<tr ".$tr_link.">\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['fax_success']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['fax_result_code']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['fax_result_text']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".basename($row['fax_file'])." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['fax_ecm_used']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['fax_local_station_id']." </td>\n";
|
||||
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['fax_document_transferred_pages']." </td>\n";
|
||||
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['fax_document_total_pages']." </td>\n";
|
||||
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['fax_image_resolution']." </td>\n";
|
||||
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['fax_image_size']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['fax_bad_rows']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['fax_transfer_rate']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['fax_retry_attempts']." </td>\n";
|
||||
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['fax_retry_limit']." </td>\n";
|
||||
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['fax_retry_sleep']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".basename($row['fax_uri'])." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['fax_date']." </td>\n";
|
||||
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['fax_epoch']." </td>\n";
|
||||
echo " <td class='list_control_icons'>";
|
||||
if (permission_exists('fax_log_edit')) {
|
||||
echo "<a href='fax_log_edit.php?id=".$row['fax_log_uuid']."' alt='".$text['button-edit']."'>$v_link_label_edit</a>";
|
||||
}
|
||||
if (permission_exists('fax_log_delete')) {
|
||||
echo "<a href='fax_log_delete.php?id=".$row['fax_log_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>";
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
if ($c==0) { $c=1; } else { $c=0; }
|
||||
} //end foreach
|
||||
unset($sql, $result, $row_count);
|
||||
} //end if results
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td colspan='21' align='left'>\n";
|
||||
echo " <table width='100%' cellpadding='0' cellspacing='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td width='33.3%' nowrap='nowrap'> </td>\n";
|
||||
echo " <td width='33.3%' align='center' nowrap='nowrap'>$paging_controls</td>\n";
|
||||
echo " <td class='list_control_icons'>";
|
||||
if (permission_exists('fax_log_add')) {
|
||||
echo "<a href='fax_log_edit.php' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||
}
|
||||
else {
|
||||
echo " ";
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " </table>\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "</table>";
|
||||
echo "</div>";
|
||||
echo "<br /><br />";
|
||||
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
echo "</table>";
|
||||
echo "</div>";
|
||||
echo "<br /><br />";
|
||||
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
?>
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
<?php
|
||||
/*
|
||||
FusionPBX
|
||||
Version: MPL 1.1
|
||||
|
||||
The contents of this file are subject to the Mozilla Public License Version
|
||||
1.1 (the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
The Original Code is FusionPBX
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
// 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"]."<br />\n";
|
||||
//echo "PHP_SELF: ".$_SERVER["PHP_SELF"]."<br />\n";
|
||||
//echo "SCRIPT_FILENAME: ".$_SERVER["SCRIPT_FILENAME"]."<br />\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'] );
|
||||
}
|
||||
|
||||
?>
|
||||
Loading…
Reference in New Issue