2014-09-09 07:43:09 +02:00
|
|
|
<?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
|
2015-01-18 11:06:08 +01:00
|
|
|
$language = new text;
|
|
|
|
|
$text = $language->get();
|
2014-09-09 07:43:09 +02:00
|
|
|
|
|
|
|
|
//get the id
|
2014-09-09 18:49:58 +02:00
|
|
|
if (count($_GET) > 0) {
|
2014-09-09 07:43:09 +02:00
|
|
|
$id = check_str($_GET["id"]);
|
2014-09-09 19:51:18 +02:00
|
|
|
$fax_uuid = check_str($_GET["fax_uuid"]);
|
2014-09-09 07:43:09 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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'];
|
2014-09-09 20:41:03 +02:00
|
|
|
header('Location: fax_logs.php?id='.$fax_uuid);
|
2014-09-09 07:43:09 +02:00
|
|
|
|
|
|
|
|
?>
|