-
Notifications
You must be signed in to change notification settings - Fork 0
/
proses.php
69 lines (66 loc) · 2.05 KB
/
proses.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
session_start();
include('koneksi.php');
$koneksi = new database();
$action = $_GET['action'];
if ($action == "add_user")
{
$id =$_GET['id'];
$koneksi->tambah_data_user($_POST['username'],$_POST['password'],$_POST['level_user'],$_POST['name'],$_POST['address'],$_POST['email'],$_POST['tgl_lahir']);
header('location:login.php');
}
if ($action == "add_data_user")
{
$id =$_GET['id'];
$koneksi->tambah_data_user($_POST['username'],$_POST['password'],$_POST['level_user'],$_POST['name'],$_POST['address'],$_POST['email'],$_POST['tgl_lahir']);
header('location:home_admin.php');
}
if ($action == "add_masukan")
{
$id =$_GET['id'];
$koneksi->tambah_data_masukan($_POST['id'],$_POST['masukan']);
header('location:../towisfix/home_user/v_homeuser.php');
}
if ($action == "add_user_adm")
{
$id =$_GET['id'];
$koneksi->tambah_data_user($_POST['name'],$_POST['address'],$_POST['email'],$_POST['homepage'],$_POST['username'],$_POST['password'],$_POST['level_user']);
header('location:data_user.php');
}
elseif ($action == "edit_user")
{
$koneksi->edit_data_user($_POST['id'],$_POST['name'],$_POST['address'],$_POST['email'],$_POST['homepage'],$_POST['username'],$_POST['password'],$_POST['level_user']);
header('location:data_user.php');
}
elseif ($action == "edit_user_admin")
{
$koneksi->edit_data_user_admin($_POST['id'],$_POST['username'],$_POST['password'],$_POST['level_user'],$_POST['name'],$_POST['address'],$_POST['email'],$_POST['tgl_lahir']);
header('location:data_user.php');
}
elseif ($action == "logout")
{
$koneksi->logout();
}
else if ($action == "delete_user")
{
$id =$_GET['id'];
$koneksi->delete_data($id);
header('location:data_user.php');
}
else if ($action == "delete_gb")
{
$id =$_GET['id'];
$koneksi->delete_data_gb($id);
header('location:data_guestbook.php');
}
else if ($action == "delete_gb2")
{
$id =$_GET['id'];
$koneksi->delete_data_gb($id);
header('location:data_guestbook_gb.php');
}
elseif ($action == "login")
{
$koneksi->login($_POST['username'],$_POST['password']);
}
?>