-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdaftar.php
162 lines (138 loc) · 6.82 KB
/
daftar.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Title -->
<title>Daftar | Aplikasi Surat</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<meta charset="UTF-8">
<meta name="description" content="Responsive Admin Dashboard Template" />
<meta name="keywords" content="admin,dashboard" />
<meta name="author" content="Steelcoders" />
<!-- Styles -->
<link type="text/css" rel="stylesheet" href="assets/plugins/materialize/css/materialize.min.css"/>
<link href="assets/css/icon.css" rel="stylesheet">
<link href="assets/plugins/material-preloader/css/materialPreloader.min.css" rel="stylesheet">
<link rel="shortcut icon" href="assets/images/icon.ico">
<!-- Theme Styles -->
<link href="assets/css/alpha.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/animate.css" rel="stylesheet" type="text/css"/>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="http://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="http://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body style="
height: 100%;
width: 100%;
background: url('assets/images/profile_bg.png') no-repeat;
background-size: cover;">
<center class="animated fadeInDown" style="padding-top: 30px;"><h3>Aplikasi Surat</h3>
Pengarsipan Surat Masuk Dan Keluar </center>
<div class="row animated fadeInLeft" style="padding-top: 20px;">
<div class="col s12 m6 l4 offset-l4 offset-m3">
<div class="card white darken-1">
<div class="card-content ">
<span class="card-title">Daftar</span>
<div class="row">
<form class="col s12" method="post">
<div class="input-field col s11">
<input id="username" type="text" name="username">
<label for="username">Username</label>
</div><i class="material-icons" style="padding-top: 25px;">perm_identity</i><br><br>
<div class="input-field col s11">
<input id="password" type="password" name="password">
<label for="password">Password</label>
</div><i class="material-icons" style="padding-top: 30px;">vpn_key</i><br>
<div class="input-field col s11">
<input id="fullname" type="text" name="fullname">
<label for="fullname">Fullname</label>
</div><i class="material-icons" style="padding-top: 40px;">picture_in_picture</i><br>
<div class="col s12 right-align m-t-sm">
<a href="login.php" class="waves-effect waves-light orange btn">Masuk</a>
<button type="submit" class="waves-effect waves-light blue btn">Daftar</button>
</div>
</form>
</div>
</div>
</div>
<center>Copyright © <a class="waves-effect waves-light text modal-trigger" href="#tentang"> Rizki Setiawan </a> 2018 </center>
</div>
</div>
<!-- Modal Structure -->
<div id="tentang" class="modal">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="myModalLabel">Tentang</h4>
</div>
<div class="modal-body">
HRMS (Human Resource Management System) Merupakan Aplikasi Management Karyawan Berbasis Web, Aplikasi Ini Masih dalam Pengembangan
Untuk info bisa menghubungi Hakko Bio Richard di :
<table >
<tr>
<td>No Telepon</td>
<td>:</td>
<td style="color: #2386C0;">0856 949 848 03</td>
</tr>
<br />
<tr>
<td>E-mail</td>
<td>:</td>
<td style="color: #2386C0;">[email protected]</td>
</tr>
<br />
<tr>
<td>Facebook</td>
<td>:</td>
<td style="color: #2386C0;">Rizki Setiawan</td>
</tr>
<br />
<tr>
<td>Instagram</td>
<td>:</td>
<td style="color: #2386C0;"> rzsetiawan17</td>
</tr>
</table>
</div>
<div class="modal-footer">
<a href="#!" class=" modal-action modal-close waves-effect waves-green btn teal">Ok</a>
</div>
</div>
</div>
<?php
require_once 'db.php';
if($_POST){
$username = $_POST ['username'];
$password = $_POST ['password'];
$fullname = $_POST ['fullname'];
if($username =='' || $password =='' || $fullname == '' ){
?>
<script language="javascript" type="text/javascript">
alert("Maaf! field tidak boleh ada yang kosong.");
document.location='daftar.php';
</script>" ;<?php
} else {
$sql = "INSERT INTO `user_rs_23` (`username`, `password`, `fullname`, `level`) VALUES ('$username', md5('$password'), '$fullname', 'admin');";
if($con->query($sql) === TRUE) {
?>
<script language="javascript" type="text/javascript">
alert("Selamat! data berhasil di input. Anda Harus Login Dulu!");
document.location='login.php';
</script>" ;
<?php
} else {
echo "Error " . $sql . ' ' . $connect->connect_error;
}
$connect->close();
}
}
?>
<!-- Javascripts -->
<script src="assets/plugins/jquery/jquery-2.2.0.min.js"></script>
<script src="assets/plugins/materialize/js/materialize.min.js"></script>
<script src="assets/plugins/material-preloader/js/materialPreloader.min.js"></script>
<script src="assets/plugins/jquery-blockui/jquery.blockui.js"></script>
<script src="assets/js/alpha.min.js"></script>
</body>
</html>