-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathindex.php
executable file
·142 lines (87 loc) · 2.87 KB
/
index.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
<?php
//////////////////////////////////////////////////////////////////////
// SISFO-SPPD, Sistem Informasi Surat Perintah Perjalanan Dinas. //
// Cocok untuk kantor - kantor yang membutuhkan pengarsipan surat //
// perintah tugas perjalanan dinas. //
//////////////////////////////////////////////////////////////////////
// Dikembangkan oleh : Agus Muhajir //
// E-Mail : [email protected] //
// HP/SMS/WA : 081-829-88-54 //
// source code : http://github.com/hajirodeon //
//////////////////////////////////////////////////////////////////////
session_start();
//ambil nilai
require("inc/config.php");
require("inc/fungsi.php");
require("inc/koneksi.php");
$tpl = LoadTpl("template/login_admin.html");
nocache;
//nilai
$filenya = "$sumber/index.php";
$filenyax = "$sumber/i_login.php";
$filenya_ke = $sumber;
$judul = "LOGIN ADMIN";
$judulku = $judul;
//netralkan semua, jam sebelumnya
mysqli_query($koneksi, "UPDATE user_login SET online = 'false' ".
"WHERE round(DATE_FORMAT(postdate, '%H')) < '$jam' ".
"AND round(DATE_FORMAT(postdate, '%d')) = '$tanggal' ".
"AND round(DATE_FORMAT(postdate, '%m')) = '$bulan' ".
"AND round(DATE_FORMAT(postdate, '%Y')) = '$tahun'");
//isi *START
ob_start();
?>
<script language='javascript'>
//membuat document jquery
$(document).ready(function(){
$("#btnOK").on('click', function(){
$("#formx").submit(function(){
$.ajax({
url: "<?php echo $filenyax;?>?aksi=simpan",
type:$(this).attr("method"),
data:$(this).serialize(),
success:function(data){
$("#ihasil").html(data);
}
});
return false;
});
});
});
</script>
<?php
//view //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
echo '<form name="formx" id="formx">
<p>
Tipe User :
<br>
<select name="e_tipe" id="e_tipe" class="btn btn-warning btn-block" required>
<option value="" selected></option>
<option value="tp09">PEGAWAI</option>
<option value="tp06">ADMINISTRATOR</option>
</select>
</p>
<p>
Username :
<br>
<input name="usernamex" id="usernamex" type="text" size="15" class="btn btn-warning btn-block" required>
</p>
<p>
Password :
<br>
<input name="passwordx" id="passwordx" type="password" size="15" class="btn btn-warning btn-block" required>
</p>
<p>
<input name="btnOK" id="btnOK" type="submit" value="SIGN IN >>>" class="btn btn-danger">
</p>
<div id="ihasil"></div>
</form>';
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//isi
$isi = ob_get_contents();
ob_end_clean();
require("inc/niltpl.php");
//diskonek
xclose($koneksi);
exit();
?>