Database class integration. Create order_by() and limit_offset() functions.

This commit is contained in:
Nate
2019-07-01 17:30:03 -06:00
parent 32b04431f7
commit d075a083cf
11 changed files with 232 additions and 387 deletions
+16 -14
View File
@@ -32,26 +32,28 @@
$language = new text;
$text = $language->get();
//delete the message
message::add($text['message-delete']);
//delete the data
if (isset($_GET["id"]) && is_uuid($_GET["id"]) && permission_exists('bridge_delete')) {
if (is_uuid($_GET["id"]) && permission_exists('bridge_delete')) {
//get the id
$id = check_str($_GET["id"]);
$bridge_uuid = $_GET["id"];
//delete bridge
$sql = "delete from v_bridges ";
$sql .= "where bridge_uuid = '$id' ";
$sql .= "and domain_uuid = '$domain_uuid' ";
$prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute();
unset($sql);
$array['bridges'][0]['bridge_uuid'] = $bridge_uuid;
$array['bridges'][0]['domain_uuid'] = $_SESSION['domain_uuid'];
$database = new database;
$database->app_name = 'bridges';
$database->app_uuid = 'a6a7c4c5-340a-43ce-bcbc-2ed9bab8659d';
$database->delete($array);
unset($array);
//add the message
message::add($text['message-delete']);
//redirect the user
header('Location: bridges.php');
}
//redirect the user
header('Location: bridges.php');
?>