-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
executable file
·235 lines (193 loc) · 7.77 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
<?php
session_start();
require "models/class.php";
include "libs/path.php";
include "libs/init.php";
$url = isset($_GET['p']) ? $_GET['p'] : null;
$url = rtrim($url, '/');
$url = filter_var($url, FILTER_SANITIZE_URL);
$url = explode('/', $url);
#config dasar
$model = $url[0];
$method = !empty($url[1])?$url[1]:'';
$parameter = !empty($url[2])?$url[2]:null;
if (!isset($_SESSION['login'])) {
header("location:".ROOT."login");
}
$desa = $pengaturan->getDataById(1);
?>
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<link rel="shortcut icon" href="<?php echo ROOT; ?>favicon.png" />
<meta charset="utf-8">
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="<?php echo ROOT; ?>assets/fonts/OpenSans-Regular.ttf">
<link rel="stylesheet" href="<?php echo ROOT; ?>assets/fonts/Oswald-Regular.ttf">
<link rel="stylesheet" href="<?php echo ROOT; ?>assets/css/font-awesome.min.css">
<link rel="stylesheet" href="<?php echo ROOT; ?>assets/js/libs/css/ui-lightness/jquery-ui-1.9.2.custom.min.css">
<link rel="stylesheet" href="<?php echo ROOT; ?>assets/css/bootstrap.min.css">
<!-- Plugin CSS -->
<link rel="stylesheet" href="<?php echo ROOT; ?>assets/js/plugins/icheck/skins/minimal/blue.css">
<link rel="stylesheet" href="<?php echo ROOT; ?>assets/js/plugins/select2/select2.css">
<link rel="stylesheet" href="<?php echo ROOT; ?>assets/js/plugins/datepicker/datepicker.css">
<link rel="stylesheet" href="<?php echo ROOT; ?>assets/js/plugins/fileupload/bootstrap-fileupload.css">
<link rel="stylesheet" href="<?php echo ROOT; ?>assets/css/demos/ui-notifications.css">
<!-- App CSS -->
<link rel="stylesheet" href="<?php echo ROOT; ?>assets/css/target-admin.css">
<link rel="stylesheet" href="<?php echo ROOT; ?>assets/css/custom.css">
<link rel="stylesheet" href="<?php echo ROOT; ?>assets/css/laporan.css">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
<!-- jQuery -->
<script src="<?php echo ROOT; ?>assets/js/libs/jquery-1.10.1.min.js"></script>
<script src="<?php echo ROOT; ?>assets/js/libs/jquery-ui-1.9.2.custom.min.js"></script>
<script src="<?php echo ROOT; ?>assets/js/libs/bootstrap.min.js"></script>
<!--[if lt IE 9]>
<script src="./js/libs/excanvas.compiled.js"></script>
<![endif]-->
<!-- Plugin JS -->
<script src="<?php echo ROOT; ?>assets/js/plugins/icheck/jquery.icheck.js"></script>
<script src="<?php echo ROOT; ?>assets/js/plugins/select2/select2.js"></script>
<script src="<?php echo ROOT; ?>assets/js/libs/raphael-2.1.2.min.js"></script>
<script src="<?php echo ROOT; ?>assets/js/plugins/morris/morris.min.js"></script>
<script src="<?php echo ROOT; ?>assets/js/plugins/sparkline/jquery.sparkline.min.js"></script>
<script src="<?php echo ROOT; ?>assets/js/plugins/nicescroll/jquery.nicescroll.min.js"></script>
<script id="c-dp" src="<?php echo ROOT; ?>assets/js/plugins/datepicker/bootstrap-datepicker.js"></script>
<script src="<?php echo ROOT; ?>assets/js/plugins/timepicker/bootstrap-timepicker.js"></script>
<script src="<?php echo ROOT; ?>assets/js/plugins/simplecolorpicker/jquery.simplecolorpicker.js"></script>
<script src="<?php echo ROOT; ?>assets/js/plugins/autosize/jquery.autosize.min.js"></script>
<script src="<?php echo ROOT; ?>assets/js/plugins/textarea-counter/jquery.textarea-counter.js"></script>
<script src="<?php echo ROOT; ?>assets/js/plugins/fileupload/bootstrap-fileupload.js"></script>
<!-- <script src="assets/js/plugins/howl/howl.js"></script> -->
<!-- App JS -->
<script id="c-ta" src="<?php echo ROOT; ?>assets/js/target-admin.js"></script>
<!-- Plugin JS -->
<script src="<?php echo ROOT; ?>assets/js/demos/dashboard.js"></script>
<script src="<?php echo ROOT; ?>assets/js/demos/ui-notifications.js"></script>
<script id="c-fe" src="<?php echo ROOT; ?>assets/js/demos/form-extended.js"></script>
<script src="<?php echo ROOT; ?>assets/js/statistik.js"></script>
<!-- Script for AJAX -->
<script src="<?php echo ROOT; ?>assets/js/edit-ajax.js"></script>
<script id="c-jbs" src="<?php echo ROOT; ?>assets/js/jenis-barang-selector.js"></script>
</head>
<body>
<?php
include "components/header.php";
include "components/navbar.php";
?>
<div class="container">
<div class="content">
<div class="content-container">
<?php
switch ($model) {
default:
$model_name = "Halaman Error";
include "views/404.php";
break;
case '':
$model_name = "Beranda";
include "views/home_view.php";
break;
case 'input':
$model_name = "Input";
include "views/input_view.php";
break;
case 'inventaris':
$model_name = "Inventaris";
include "views/inventaris_view.php";
break;
case 'penyusutan':
$model_name = "Penyusutan";
include "views/penyusutan_view.php";
break;
case 'ekstra':
$model_name = "Aset Ekstra";
include "views/ekstra_view.php";
break;
case 'neraca':
$model_name = "Neraca";
include "views/neraca_view.php";
break;
case 'rekap':
$model_name = "Rekap";
include "views/rekap_view.php";
break;
case 'kirim':
$model_name = "Kirim";
include "views/kirim_view.php";
break;
case 'profile':
$model_name = "Profil Admin";
include "views/profile_view.php";
break;
case 'pengaturan':
$model_name = "Pengaturan Desa";
include "views/pengaturan_view.php";
break;
case 'logout':
include "login/logout.php";
break;
}
?>
</div> <!-- /.content-container -->
</div> <!-- /.content -->
</div> <!-- /.container -->
<title><?php echo $model_name; ?> - Aset Desa</title>
<?php
if ($model == 'inventaris') {
echo '
<div id="edit-data" class="modal modal-styled fade">
<div class="modal-dialog" style="width: 750px;">
<div id="edit-ajax" class="modal-content">
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
';
}
include "components/footer.php";
?>
<script type='text/javascript'>
function hapusData(tab, id) {
var conBox = confirm("Anda yakin ingin menghapus data ini?");
if (conBox){
switch (tab) {
case "tanah":
document.getElementById("hapustanahId").value = id;
document.getElementById("hapustanahSubmit").submit();
break;
case "peralatan":
document.getElementById("hapusperalatanId").value = id;
document.getElementById("hapusperalatanSubmit").submit();
break;
case "gedung":
document.getElementById("hapusgedungId").value = id;
document.getElementById("hapusgedungSubmit").submit();
break;
case "jalan":
document.getElementById("hapusjalanId").value = id;
document.getElementById("hapusjalanSubmit").submit();
break;
case "asetlain":
document.getElementById("hapusasetlainId").value = id;
document.getElementById("hapusasetlainSubmit").submit();
break;
case "konstruksi":
document.getElementById("hapuskonstruksiId").value = id;
document.getElementById("hapuskonstruksiSubmit").submit();
break;
}
} else {
return false;
}
};
</script>
</body>
</html>