-
Notifications
You must be signed in to change notification settings - Fork 13
/
simpanData.php
80 lines (68 loc) · 2.01 KB
/
simpanData.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
<?php
require_once "core/init.php";
if( isset($_POST['submit']) ){
$kecamatan = strtoupper($_POST['kecamatan']); //fungsi convert to uppercase
$tps = $_POST['tps'];
$desa = strtoupper($_POST['desa']);
$tondi = $_POST['tondi'];
$tso = $_POST['tso'];
$rahmad = $_POST['rahmad'];
if(!empty(trim($kecamatan)) && !empty(trim($tps)) && !empty(trim($desa))){
if (register_cek_tps($kecamatan,$tps, $desa) ){
if ( register_user($kecamatan, $tps, $desa, $tondi, $tso, $rahmad)){
echo "
<script type='text/javascript'>
$(document).ready(function(){
$('.modal').modal({
dismissible: true,
opacity: .4,
in_duration: 400,
out_duration: 100,
});
$('#modal3').modal('open');
});
</script>"; //BERHASIL
}else {
echo "
<script type='text/javascript'>
$(document).ready(function(){
$('.modal').modal({
dismissible: true,
opacity: .7,
in_duration: 400,
out_duration: 100,
});
$('#modal4').modal('open');
});
</script>"; //GAGAL DATABASE
}
}else {
echo "
<script type='text/javascript'>
$(document).ready(function(){
$('.modal').modal({
dismissible: true,
opacity: .8,
in_duration: 400,
out_duration: 100,
});
$('#modal1').modal('open');
});
</script>";//NIM SUDAH TERDAFTAR
}
} else {
echo "
<script type='text/javascript'>
$(document).ready(function(){
$('.modal').modal({
dismissible: true,
opacity: .8,
in_duration: 400,
out_duration: 100,
});
$('#modal2').modal('open');
});
</script>";//FORM TIDAK BOLEH KOSONG
}
}
?>