Update sip_profile_delete.php

Delete data from the sip profile domains table.
This commit is contained in:
FusionPBX 2017-01-24 04:10:35 -07:00 committed by GitHub
parent 033a03400f
commit faf7bfd86d
1 changed files with 23 additions and 12 deletions

View File

@ -17,22 +17,26 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2015
Portions created by the Initial Developer are Copyright (C) 2008-2016
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
require_once "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
if (permission_exists('sip_profile_delete')) {
//access granted
}
else {
echo "access denied";
exit;
}
//includes
require_once "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
//check permissions
if (permission_exists('sip_profile_delete')) {
//access granted
}
else {
echo "access denied";
exit;
}
//add multi-lingual support
$language = new text;
@ -59,6 +63,13 @@ else {
}
unset ($prep_statement);
//delete the sip profile domains
$sql = "delete from v_sip_profile_domains ";
$sql .= "where sip_profile_uuid = '$id' ";
$prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute();
unset($sql);
//delete the sip profile settings
$sql = "delete from v_sip_profile_settings ";
$sql .= "where sip_profile_uuid = '$id' ";
@ -102,4 +113,4 @@ else {
header("Location: sip_profiles.php");
return;
?>
?>