-
Notifications
You must be signed in to change notification settings - Fork 1
/
dropTables.php
41 lines (30 loc) · 1.1 KB
/
dropTables.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
include 'includes/session.php';
include 'includes/dbConnect.php';
$query = "SELECT * FROM users WHERE user_id='$user_id'";
$result = mysqli_query($connection, $query);
$row = mysqli_fetch_array($result, MYSQLI_ASSOC);
if (!$result || $row['access_level'] < 2){
header("Location: error.php");
exit;
}
$query = "DROP TABLE users";
$result1 = mysqli_query($connection, $query);
$query = "DROP TABLE meetings";
$result2 = mysqli_query($connection, $query);
$query = "DROP TABLE meeting_users";
$result3 = mysqli_query($connection, $query);
$query = "DROP TABLE meeting_locations";
$result4 = mysqli_query($connection, $query);
$query = "DROP TABLE locations";
$result5 = mysqli_query($connection, $query);
$query = "DROP TABLE mu_date_time";
$result6 = mysqli_query($connection, $query);
$query = "DROP TABLE feedbacks";
$result7 = mysqli_query($connection, $query);
$query = "DROP TABLE friendships";
$result8 = mysqli_query($connection, $query);
$query = "DROP TABLE notifications";
$result9 = mysqli_query($connection, $query);
echo "Dropped all tables succesfully";
?>