Update fax_file_delete.php
This commit is contained in:
+17
-13
@@ -17,22 +17,26 @@
|
|||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2015
|
Portions created by the Initial Developer are Copyright (C) 2015 - 2018
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
require_once "root.php";
|
|
||||||
require_once "resources/require.php";
|
//includes
|
||||||
require_once "resources/check_auth.php";
|
require_once "root.php";
|
||||||
if (permission_exists('fax_file_delete')) {
|
require_once "resources/require.php";
|
||||||
//access granted
|
require_once "resources/check_auth.php";
|
||||||
}
|
|
||||||
else {
|
//check permissions
|
||||||
echo "access denied";
|
if (permission_exists('fax_file_delete')) {
|
||||||
exit;
|
//access granted
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
echo "access denied";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
require_once "app_languages.php";
|
require_once "app_languages.php";
|
||||||
@@ -46,7 +50,7 @@ else {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//validate the id
|
//validate the id
|
||||||
if (strlen($fax_file_uuid) > 0) {
|
if (is_uuid($fax_file_uuid)) {
|
||||||
//get the fax file data
|
//get the fax file data
|
||||||
$sql = "select * from v_fax_files ";
|
$sql = "select * from v_fax_files ";
|
||||||
$sql .= "where fax_file_uuid = '".$fax_file_uuid."' ";
|
$sql .= "where fax_file_uuid = '".$fax_file_uuid."' ";
|
||||||
@@ -100,4 +104,4 @@ else {
|
|||||||
//redirect the user
|
//redirect the user
|
||||||
header('Location: fax_files.php?id='.$fax_uuid.'&box='.$type);
|
header('Location: fax_files.php?id='.$fax_uuid.'&box='.$type);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user