-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuser-baru.php
More file actions
92 lines (84 loc) · 2.44 KB
/
user-baru.php
File metadata and controls
92 lines (84 loc) · 2.44 KB
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
<?php
include_once 'header.php';
if($_POST){
include_once 'includes/user.inc.php';
$eks = new User($db);
$eks->nl = $_POST['nl'];
$eks->un = $_POST['un'];
$eks->pw = md5($_POST['pw']);
if($eks->pw == md5($_POST['up'])){
if($eks->insert()){
?>
<script type="text/javascript">
window.onload=function(){
showStickySuccessToast();
};
</script>
<?php
}
else{
?>
<script type="text/javascript">
window.onload=function(){
showStickyErrorToast();
};
</script>
<?php
}
} else{
?>
<script type="text/javascript">
window.onload=function(){
showStickyWarningToast();
};
</script>
<?php
}
}
?>
<!-- Main content -->
<div class="main-content">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-2"></div>
<div class="col-xs-12 col-sm-12 col-md-8">
<div class="panel panel-default">
<div class="panel-body">
<div class="row">
<div class="col-md-6 text-left">
<h3>Tambah Pengguna</h3>
</div>
<div class="col-md-6 text-right">
<h3>
<button type="button" onclick="location.href='user.php'" class="btn btn-success">Kembali</button>
</h3>
</div>
</div>
<form method="post">
<div class="form-group">
<label for="nl">Nama Lengkap</label>
<input type="text" class="form-control" id="nl" name="nl" required>
</div>
<div class="form-group">
<label for="un">Username</label>
<input type="text" class="form-control" id="un" name="un" required>
</div>
<div class="form-group">
<label for="pw">Password</label>
<input type="password" class="form-control" id="pw" name="pw" required>
</div>
<div class="form-group">
<label for="up">Ulangi Password</label>
<input type="password" class="form-control" id="up" name="up" required>
</div>
<button type="submit" class="btn btn-primary">Simpan</button>
</form>
</div></div></div>
<div class="col-xs-12 col-sm-12 col-md-2">
</div>
</div>
</section>
</div>
</div>
<?php
include_once 'footer.php';
?>