Database class integration.

This commit is contained in:
Nate
2019-07-06 17:27:36 -06:00
parent fd6a62cc3a
commit eef66c8848
7 changed files with 135 additions and 233 deletions
@@ -18,32 +18,27 @@
$language = new text;
$text = $language->get();
//get the id
if (count($_GET) > 0) {
$id = check_str($_GET["id"]);
}
//delete the data
if (strlen($id) > 0) {
//delete the conference_profile_params
$sql = "delete from v_conference_profile_params ";
$sql .= "where conference_profile_uuid = '$id' ";
//$sql .= "and domain_uuid = '$domain_uuid' ";
$prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute();
unset($sql);
if (is_uuid($_GET["id"])) {
//delete conference_profile
$sql = "delete from v_conference_profiles ";
$sql .= "where conference_profile_uuid = '$id' ";
//$sql .= "and domain_uuid = '$domain_uuid' ";
$prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute();
unset($sql);
$conference_profile_uuid = $_GET["id"];
//delete the conference profile params
$array['conference_profile_params'][0]['conference_profile_uuid'] = $conference_profile_uuid;
//delete conference profile
$array['conference_profiles'][0]['conference_profile_uuid'] = $conference_profile_uuid;
$database = new database;
$database->app_name = 'conference_profiles';
$database->app_uuid = 'c33e2c2a-847f-44c1-8c0d-310df5d65ba9';
$database->delete($array);
unset($array);
//set message
message::add($text['message-delete']);
}
//redirect the user
message::add($text['message-delete']);
header('Location: conference_profiles.php');
?>