-
Notifications
You must be signed in to change notification settings - Fork 0
/
update.php
114 lines (112 loc) · 5.84 KB
/
update.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<?php
include("updateUserConf.php");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://cdn.tailwindcss.com"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Serif:ital,wght@0,400;0,500;0,600;1,400;1,500;1,600&family=Roboto:wght@400;500;700&display=swap"
rel="stylesheet">
<script>
tailwind.config = {
theme: {
extend: {
colors: {
danger: '#EA3D76',
warning: '#F6E069',
success: '#33D685',
primary: '#61ADDB',
kuro: '#212121',
},
fontFamily: {
inter: ['Inter'],
roboto: ['roboto'],
noto: ['Noto Serif']
}
}
}
}
</script>
<title>Update Data</title>
</head>
<body>
<div class="h-screen py-4 bg-slate-50">
<div class="container p-6 px-8 m-auto flex lg:flex-row flex-col gap-8 justify-center items-center h-full">
<div class="my-auto p-6 rounded-lg shadow-lg bg-white flex flex-col gap-4">
<div>
<p class="text-2xl font-inter font-semibold">Update Username: </p>
</div>
<div class="container">
<form class="flex flex-col gap-2" action="updateUSerConf.php" method="POST">
<div class="mb-3 flex flex-col gap-2">
<label class="text-lg font-inter font-medium">Old Username :</label>
<input class="border-2 border-[#9AA2B1] rounded-md w-64 py-1 px-3 placeholder:text-[#9AA2B1]" placeholder="Username yang ingin diubah..." type="text" id="Username" name="username" autocomplete="off" />
</div>
<div class="mb-3 flex flex-col gap-2">
<label class="text-lg font-inter font-medium">New Username :</label>
<input class="border-2 border-[#9AA2B1] rounded-md w-64 py-1 px-3 placeholder:text-[#9AA2B1]" placeholder="username baru..." type="text" id="Username" name="usernameNew" autocomplete="off" />
</div>
<div class="my-3 flex flex-col gap-2">
<button class="py-2 px-6 bg-success rounded-xl shadow-xl justify-center text-kuro font-inter text-sm font-semibold w-24 duration-75 ease-in-out hover:-translate-y-1" type="submit" name="change">
UPDATE
</button>
<p style="display: none; color: #FF2709;" id="cek1">Please fill the form</p>
<p style="display: none; color: #FF2709;" id="cek3">User does not exist</p>
</div>
</form>
</div>
</div>
<div class="py-2 px-6 bg-green-300 rounded-xl shadow-lg text-kuro font-inter text-sm font-semibold cursor-pointer transition-all ease-in-out duration-100 hover:-translate-y-1" onclick="window.location.href='input.php'">
<p>BACK</p>
</div>
<div class="my-auto p-6 rounded-lg shadow-lg bg-white flex flex-col gap-4">
<div>
<p class="text-2xl font-inter font-semibold">Update Email: </p>
</div>
<div class="container">
<form class="flex flex-col gap-2" action="updateEmailConf.php" method="POST">
<div class="mb-3 flex flex-col gap-2">
<label class="text-lg font-inter font-medium">Old Email :</label>
<input class="border-2 border-[#9AA2B1] rounded-md w-64 py-1 px-3 placeholder:text-[#9AA2B1]" placeholder="Email yang ingin diubah..." type="text" id="Email" name="email" autocomplete="off" />
</div>
<div class="mb-3 flex flex-col gap-2">
<label class="text-lg font-inter font-medium">New Email :</label>
<input class="border-2 border-[#9AA2B1] rounded-md w-64 py-1 px-3 placeholder:text-[#9AA2B1]" placeholder="Email baru..." type="text" id="Email" name="emailNew" autocomplete="off" />
</div>
<div class="my-3 flex flex-col gap-2">
<button class="py-2 px-6 bg-success rounded-xl justify-center shadow-xl text-kuro font-inter text-sm font-semibold w-24 duration-75 ease-in-out hover:-translate-y-1" type="submit" name="change">
UPDATE
</button>
<p style="display: none; color: #FF2709;" id="cek2">Please fill the form</p>
<p style="display: none; color: #FF2709;" id="cek4">Email does not exist</p>
</div>
</form>
</div>
</div>
</div>
</div>
<script>
let a = document.getElementById("cek1");
let b = document.getElementById("cek2");
let c = document.getElementById("cek3");
let d = document.getElementById("cek4");
if (window.location.href.indexOf("empty1") > -1) {
a.style.display = "block";
}
if (window.location.href.indexOf("empty2") > -1) {
b.style.display = "block";
}
if (window.location.href.indexOf("usernoexist") > -1) {
c.style.display = "block";
}
if (window.location.href.indexOf("emailnoexist") > -1) {
d.style.display = "block";
}
</script>
</body>
</html>