@@ -1,29 +1,29 @@ discard block |
||
1 | -<?php |
|
2 | -session_start(); |
|
3 | -if (empty($_SESSION['username']) and empty($_SESSION['password'])) { |
|
4 | - echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>"; |
|
1 | + <?php |
|
2 | + session_start(); |
|
3 | + if (empty($_SESSION['username']) and empty($_SESSION['password'])) { |
|
4 | + echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>"; |
|
5 | 5 | } else { |
6 | - include './../../config/koneksi.php'; |
|
7 | - include './../../config/fungsi_thumb.php'; |
|
6 | + include './../../config/koneksi.php'; |
|
7 | + include './../../config/fungsi_thumb.php'; |
|
8 | 8 | |
9 | - $module = $_GET[module]; |
|
10 | - $act = $_GET[act]; |
|
9 | + $module = $_GET[module]; |
|
10 | + $act = $_GET[act]; |
|
11 | 11 | |
12 | - $date = date('d/m/Y'); |
|
13 | - $idate = date('Y-m-d'); |
|
14 | - $hour = time() - (1 * 1 * 60 * 60); |
|
15 | - $datetime = date('Y-m-d G:i:s', $hour); |
|
16 | - $userid = $_SESSION['userid']; |
|
17 | - $business_type = $_SESSION['business_type']; |
|
12 | + $date = date('d/m/Y'); |
|
13 | + $idate = date('Y-m-d'); |
|
14 | + $hour = time() - (1 * 1 * 60 * 60); |
|
15 | + $datetime = date('Y-m-d G:i:s', $hour); |
|
16 | + $userid = $_SESSION['userid']; |
|
17 | + $business_type = $_SESSION['business_type']; |
|
18 | 18 | |
19 | - // Hapus modul |
|
20 | - if ($module == 'pasien' and $act == 'hapus') { |
|
21 | - $id = $_GET['id']; |
|
22 | - $id_module = $_GET['id_module']; |
|
19 | + // Hapus modul |
|
20 | + if ($module == 'pasien' and $act == 'hapus') { |
|
21 | + $id = $_GET['id']; |
|
22 | + $id_module = $_GET['id_module']; |
|
23 | 23 | |
24 | - mysql_query('DELETE FROM '.$module.' WHERE id_'.$module." = $id"); |
|
24 | + mysql_query('DELETE FROM '.$module.' WHERE id_'.$module." = $id"); |
|
25 | 25 | |
26 | - //header('location:../../main.php?module='.$module.'&id_module='.$id_module);?> |
|
26 | + //header('location:../../main.php?module='.$module.'&id_module='.$id_module);?> |
|
27 | 27 | |
28 | 28 | <script language="javascript"> |
29 | 29 | window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>"; |
@@ -31,14 +31,14 @@ discard block |
||
31 | 31 | </script> |
32 | 32 | |
33 | 33 | <?php |
34 | - } |
|
34 | + } |
|
35 | 35 | |
36 | - // Input group |
|
37 | - elseif ($module == 'pasien' and $act == 'input') { |
|
38 | - $id_module = $_POST['id_module']; |
|
36 | + // Input group |
|
37 | + elseif ($module == 'pasien' and $act == 'input') { |
|
38 | + $id_module = $_POST['id_module']; |
|
39 | 39 | |
40 | - if ($_POST['ID']) { |
|
41 | - mysql_query("UPDATE pasien SET ktp = '$_POST[ktp]' |
|
40 | + if ($_POST['ID']) { |
|
41 | + mysql_query("UPDATE pasien SET ktp = '$_POST[ktp]' |
|
42 | 42 | ,nama = '$_POST[nama]' |
43 | 43 | ,gender = '$_POST[gender]' |
44 | 44 | ,tgl_lahir = '$_POST[tgl_lahir]' |
@@ -50,8 +50,8 @@ discard block |
||
50 | 50 | ,updby = '$userid' |
51 | 51 | ,aktif = '$_POST[aktif]' |
52 | 52 | WHERE id_pasien = '$_POST[ID]'"); |
53 | - } else { |
|
54 | - mysql_query("INSERT INTO pasien(ktp |
|
53 | + } else { |
|
54 | + mysql_query("INSERT INTO pasien(ktp |
|
55 | 55 | ,nama |
56 | 56 | ,gender |
57 | 57 | ,tgl_lahir |
@@ -77,9 +77,9 @@ discard block |
||
77 | 77 | ,'$datetime' |
78 | 78 | ,'$userid' |
79 | 79 | ,'$_POST[aktif]')"); |
80 | - } |
|
80 | + } |
|
81 | 81 | |
82 | - //header('location:../../main.php?module='.$module.'&id_module='.$id_module);?> |
|
82 | + //header('location:../../main.php?module='.$module.'&id_module='.$id_module);?> |
|
83 | 83 | |
84 | 84 | <script language="javascript"> |
85 | 85 | window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>"; |
@@ -87,6 +87,6 @@ discard block |
||
87 | 87 | </script> |
88 | 88 | |
89 | 89 | <?php |
90 | - } |
|
90 | + } |
|
91 | 91 | } |
92 | -?> |
|
92 | + ?> |
@@ -1,41 +1,41 @@ discard block |
||
1 | -<?php |
|
1 | + <?php |
|
2 | 2 | |
3 | -session_start(); |
|
3 | + session_start(); |
|
4 | 4 | |
5 | -include './../../config/koneksi.php'; |
|
6 | -include './../../config/fungsi_indobulan.php'; |
|
7 | -include './../../config/barcode_gen.php'; |
|
8 | -include './../../config/qrcode/qrlib.php'; |
|
5 | + include './../../config/koneksi.php'; |
|
6 | + include './../../config/fungsi_indobulan.php'; |
|
7 | + include './../../config/barcode_gen.php'; |
|
8 | + include './../../config/qrcode/qrlib.php'; |
|
9 | 9 | |
10 | -$tampil = mysql_query("SELECT * FROM modul WHERE id_modul ='".$_GET[report_id]."'"); |
|
10 | + $tampil = mysql_query("SELECT * FROM modul WHERE id_modul ='".$_GET[report_id]."'"); |
|
11 | 11 | |
12 | -$r = mysql_fetch_array($tampil); |
|
12 | + $r = mysql_fetch_array($tampil); |
|
13 | 13 | |
14 | -$module = $_GET['module']; |
|
14 | + $module = $_GET['module']; |
|
15 | 15 | |
16 | -$imodule = ucwords($r['nama_modul']); |
|
16 | + $imodule = ucwords($r['nama_modul']); |
|
17 | 17 | |
18 | -$nmmodule = ucwords($r['nama_modul']); |
|
18 | + $nmmodule = ucwords($r['nama_modul']); |
|
19 | 19 | |
20 | -$id = $r['id_modul']; |
|
20 | + $id = $r['id_modul']; |
|
21 | 21 | |
22 | -$fa_icon = $r['fa_icon']; |
|
22 | + $fa_icon = $r['fa_icon']; |
|
23 | 23 | |
24 | -// if($r[orientation] == 'P') { |
|
24 | + // if($r[orientation] == 'P') { |
|
25 | 25 | |
26 | -// $orientation = 'portrait'; |
|
26 | + // $orientation = 'portrait'; |
|
27 | 27 | |
28 | -// } else { |
|
28 | + // } else { |
|
29 | 29 | |
30 | -// $orientation = 'landscape'; |
|
30 | + // $orientation = 'landscape'; |
|
31 | 31 | |
32 | -// } |
|
32 | + // } |
|
33 | 33 | |
34 | -$orientation = 'portrait'; |
|
34 | + $orientation = 'portrait'; |
|
35 | 35 | |
36 | -$status = $_GET['status']; |
|
36 | + $status = $_GET['status']; |
|
37 | 37 | |
38 | -?> |
|
38 | + ?> |
|
39 | 39 | |
40 | 40 | |
41 | 41 | |
@@ -337,27 +337,27 @@ discard block |
||
337 | 337 | |
338 | 338 | <?php |
339 | 339 | |
340 | -$time = time() - (1 * 1 * 60 * 60); |
|
340 | + $time = time() - (1 * 1 * 60 * 60); |
|
341 | 341 | |
342 | -$datetime = date('d/m/Y G:i:s', $time); |
|
342 | + $datetime = date('d/m/Y G:i:s', $time); |
|
343 | 343 | |
344 | -$tgl = tgl_indo(date('Y-m-d', $time)); |
|
344 | + $tgl = tgl_indo(date('Y-m-d', $time)); |
|
345 | 345 | |
346 | -$id_pasien = $_GET['id_pasien']; |
|
346 | + $id_pasien = $_GET['id_pasien']; |
|
347 | 347 | |
348 | - $gtampil = mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'"); |
|
348 | + $gtampil = mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'"); |
|
349 | 349 | |
350 | - $g = mysql_fetch_array($gtampil); |
|
350 | + $g = mysql_fetch_array($gtampil); |
|
351 | 351 | |
352 | -if ($g['pict']) { |
|
353 | - $pict = $g['pict']; |
|
352 | + if ($g['pict']) { |
|
353 | + $pict = $g['pict']; |
|
354 | 354 | } else { |
355 | - $pict = ''; |
|
355 | + $pict = ''; |
|
356 | 356 | } |
357 | 357 | |
358 | -$company = ucwords($g['company']); |
|
358 | + $company = ucwords($g['company']); |
|
359 | 359 | |
360 | - ?> |
|
360 | + ?> |
|
361 | 361 | |
362 | 362 | <div style='border:1px solid black;'> |
363 | 363 | |
@@ -376,23 +376,23 @@ discard block |
||
376 | 376 | |
377 | 377 | |
378 | 378 | <?php |
379 | - $tampil = mysql_query("SELECT a.*,b.agama,c.kategori |
|
379 | + $tampil = mysql_query("SELECT a.*,b.agama,c.kategori |
|
380 | 380 | FROM pasien a left join agama b |
381 | 381 | ON a.id_agama = b.id_agama |
382 | 382 | left join kategori c |
383 | 383 | ON a.id_kategori = c.id_kategori |
384 | 384 | WHERE a.id_pasien = '$id_pasien' "); |
385 | 385 | |
386 | -$r = mysql_fetch_array($tampil); |
|
386 | + $r = mysql_fetch_array($tampil); |
|
387 | 387 | |
388 | -$tgl_lahir = date('d/m/Y', strtotime($r[tgl_lahir])); |
|
388 | + $tgl_lahir = date('d/m/Y', strtotime($r[tgl_lahir])); |
|
389 | 389 | |
390 | -if ($r['gender'] == 'L') { |
|
391 | - $gender = 'Laki-laki'; |
|
390 | + if ($r['gender'] == 'L') { |
|
391 | + $gender = 'Laki-laki'; |
|
392 | 392 | } else { |
393 | - $gender = 'Perempuan'; |
|
393 | + $gender = 'Perempuan'; |
|
394 | 394 | } |
395 | -?> |
|
395 | + ?> |
|
396 | 396 | <table> |
397 | 397 | |
398 | 398 | <table width='100%' border='0'> |
@@ -1,28 +1,28 @@ discard block |
||
1 | -<?php |
|
2 | -session_start(); |
|
3 | -if (empty($_SESSION['username']) and empty($_SESSION['password'])) { |
|
4 | - echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>"; |
|
1 | + <?php |
|
2 | + session_start(); |
|
3 | + if (empty($_SESSION['username']) and empty($_SESSION['password'])) { |
|
4 | + echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>"; |
|
5 | 5 | } else { |
6 | - include './../../config/koneksi.php'; |
|
7 | - include './../../config/fungsi_thumb.php'; |
|
6 | + include './../../config/koneksi.php'; |
|
7 | + include './../../config/fungsi_thumb.php'; |
|
8 | 8 | |
9 | - $module = $_GET[module]; |
|
10 | - $act = $_GET[act]; |
|
9 | + $module = $_GET[module]; |
|
10 | + $act = $_GET[act]; |
|
11 | 11 | |
12 | - $date = date('d/m/Y'); |
|
13 | - $idate = date('Y-m-d'); |
|
14 | - $hour = time() - (1 * 1 * 60 * 60); |
|
15 | - $datetime = date('Y-m-d G:i:s', $hour); |
|
16 | - $userid = $_SESSION['userid']; |
|
12 | + $date = date('d/m/Y'); |
|
13 | + $idate = date('Y-m-d'); |
|
14 | + $hour = time() - (1 * 1 * 60 * 60); |
|
15 | + $datetime = date('Y-m-d G:i:s', $hour); |
|
16 | + $userid = $_SESSION['userid']; |
|
17 | 17 | |
18 | - // Hapus modul |
|
19 | - if ($module == 'rujukan' and $act == 'hapus') { |
|
20 | - $id = $_GET['id']; |
|
21 | - $id_module = $_GET['id_module']; |
|
18 | + // Hapus modul |
|
19 | + if ($module == 'rujukan' and $act == 'hapus') { |
|
20 | + $id = $_GET['id']; |
|
21 | + $id_module = $_GET['id_module']; |
|
22 | 22 | |
23 | - mysql_query('DELETE FROM '.$module.' WHERE id_'.$module." = $id"); |
|
23 | + mysql_query('DELETE FROM '.$module.' WHERE id_'.$module." = $id"); |
|
24 | 24 | |
25 | - //header('location:../../main.php?module='.$module.'&id_module='.$id_module);?> |
|
25 | + //header('location:../../main.php?module='.$module.'&id_module='.$id_module);?> |
|
26 | 26 | |
27 | 27 | <script language="javascript"> |
28 | 28 | window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>"; |
@@ -30,21 +30,21 @@ discard block |
||
30 | 30 | </script> |
31 | 31 | |
32 | 32 | <?php |
33 | - } |
|
33 | + } |
|
34 | 34 | |
35 | - // Input group |
|
36 | - elseif ($module == 'rujukan' and $act == 'input') { |
|
37 | - $id_module = $_POST['id_module']; |
|
35 | + // Input group |
|
36 | + elseif ($module == 'rujukan' and $act == 'input') { |
|
37 | + $id_module = $_POST['id_module']; |
|
38 | 38 | |
39 | - if ($_POST['ID']) { |
|
40 | - mysql_query("UPDATE rujukan SET tipe = '$_POST[tipe]' |
|
39 | + if ($_POST['ID']) { |
|
40 | + mysql_query("UPDATE rujukan SET tipe = '$_POST[tipe]' |
|
41 | 41 | ,rujukan = '$_POST[rujukan]' |
42 | 42 | ,upddt = '$datetime' |
43 | 43 | ,updby = '$userid' |
44 | 44 | ,aktif = '$_POST[aktif]' |
45 | 45 | WHERE id_rujukan = '$_POST[ID]'"); |
46 | - } else { |
|
47 | - mysql_query("INSERT INTO rujukan(tipe |
|
46 | + } else { |
|
47 | + mysql_query("INSERT INTO rujukan(tipe |
|
48 | 48 | ,rujukan |
49 | 49 | ,crtdt |
50 | 50 | ,crtby |
@@ -58,9 +58,9 @@ discard block |
||
58 | 58 | ,'$datetime' |
59 | 59 | ,'$userid' |
60 | 60 | ,'$_POST[aktif]')"); |
61 | - } |
|
61 | + } |
|
62 | 62 | |
63 | - //header('location:../../main.php?module='.$module.'&id_module='.$id_module);?> |
|
63 | + //header('location:../../main.php?module='.$module.'&id_module='.$id_module);?> |
|
64 | 64 | |
65 | 65 | <script language="javascript"> |
66 | 66 | window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>"; |
@@ -68,6 +68,6 @@ discard block |
||
68 | 68 | </script> |
69 | 69 | |
70 | 70 | <?php |
71 | - } |
|
71 | + } |
|
72 | 72 | } |
73 | -?> |
|
73 | + ?> |
@@ -1,9 +1,9 @@ discard block |
||
1 | - |
|
2 | -<?php |
|
1 | + |
|
2 | + <?php |
|
3 | 3 | switch ($_GET[act]) { |
4 | 4 | |
5 | -default: |
|
6 | - ?> |
|
5 | + default: |
|
6 | + ?> |
|
7 | 7 | |
8 | 8 | <div class=""> |
9 | 9 | |
@@ -44,35 +44,35 @@ discard block |
||
44 | 44 | |
45 | 45 | <?php |
46 | 46 | |
47 | - $tampil = mysql_query('SELECT * FROM rujukan ORDER BY id_rujukan'); |
|
47 | + $tampil = mysql_query('SELECT * FROM rujukan ORDER BY id_rujukan'); |
|
48 | 48 | |
49 | - $no = 1; |
|
49 | + $no = 1; |
|
50 | 50 | |
51 | - while ($r = mysql_fetch_array($tampil)) { |
|
52 | - if ($r[tipe] == 'R') { |
|
53 | - $tipe = 'RS/Klinik'; |
|
54 | - } else { |
|
55 | - $tipe = 'Lab'; |
|
56 | - } |
|
51 | + while ($r = mysql_fetch_array($tampil)) { |
|
52 | + if ($r[tipe] == 'R') { |
|
53 | + $tipe = 'RS/Klinik'; |
|
54 | + } else { |
|
55 | + $tipe = 'Lab'; |
|
56 | + } |
|
57 | 57 | |
58 | - echo'<tr>'; |
|
59 | - echo"<td>$tipe</td>"; |
|
60 | - echo"<td>$r[rujukan]</td>"; |
|
61 | - echo"<td style='text-align:center;'>$r[aktif]</td>"; |
|
62 | - echo" <td style='text-align:center;'>"; |
|
58 | + echo'<tr>'; |
|
59 | + echo"<td>$tipe</td>"; |
|
60 | + echo"<td>$r[rujukan]</td>"; |
|
61 | + echo"<td style='text-align:center;'>$r[aktif]</td>"; |
|
62 | + echo" <td style='text-align:center;'>"; |
|
63 | 63 | |
64 | - if ($r_edit == 'Y') { |
|
65 | - echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_rujukan=$r[id_rujukan]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>"; |
|
66 | - } |
|
64 | + if ($r_edit == 'Y') { |
|
65 | + echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_rujukan=$r[id_rujukan]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>"; |
|
66 | + } |
|
67 | 67 | |
68 | - // if($r_delete == 'Y') { |
|
69 | - // echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_rujukan]&id_module=$id' onClick=\"return confirm('Hapus data ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>"; |
|
70 | - // } |
|
71 | - echo'</td>'; |
|
72 | - echo'</tr>'; |
|
73 | - $no++; |
|
74 | - } |
|
75 | - ?> |
|
68 | + // if($r_delete == 'Y') { |
|
69 | + // echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_rujukan]&id_module=$id' onClick=\"return confirm('Hapus data ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>"; |
|
70 | + // } |
|
71 | + echo'</td>'; |
|
72 | + echo'</tr>'; |
|
73 | + $no++; |
|
74 | + } |
|
75 | + ?> |
|
76 | 76 | </tbody> |
77 | 77 | </table> |
78 | 78 | </div> |
@@ -139,5 +139,5 @@ |
||
139 | 139 | |
140 | 140 | <?php |
141 | 141 | } |
142 | -?> |
|
143 | - |
|
142 | + ?> |
|
143 | + |
@@ -1,56 +1,56 @@ discard block |
||
1 | -<?php |
|
2 | -session_start(); |
|
3 | -if (empty($_SESSION['username']) and empty($_SESSION['password'])) { |
|
4 | - echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>"; |
|
1 | + <?php |
|
2 | + session_start(); |
|
3 | + if (empty($_SESSION['username']) and empty($_SESSION['password'])) { |
|
4 | + echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>"; |
|
5 | 5 | } else { |
6 | - include './../../config/koneksi.php'; |
|
7 | - include './../../config/fungsi_thumb.php'; |
|
8 | - |
|
9 | - $module = $_GET[module]; |
|
10 | - $act = $_GET[act]; |
|
11 | - |
|
12 | - $date = date('d/m/Y'); |
|
13 | - $idate = date('Y-m-d'); |
|
14 | - $hour = time() - (1 * 1 * 60 * 60); |
|
15 | - $datetime = date('Y-m-d G:i:s', $hour); |
|
16 | - $userid = $_SESSION['userid']; |
|
17 | - |
|
18 | - // Hapus modul |
|
19 | - if ($module == 'modul' and $act == 'hapus') { |
|
20 | - $id_module = $_GET['id_module']; |
|
21 | - $id = $_GET['id']; |
|
22 | - |
|
23 | - mysql_query('DELETE FROM '.$module.' WHERE id_'.$module." = $id"); |
|
24 | - |
|
25 | - header('location:../../main.php?module='.$module.'&id_module='.$id_module); |
|
26 | - } |
|
27 | - |
|
28 | - // Input modul |
|
29 | - elseif ($module == 'modul' and $act == 'input') { |
|
30 | - if ($_POST['is_form'] == 'Y') { |
|
31 | - $link = $_POST['link']; |
|
32 | - } else { |
|
33 | - if ($_POST['link']) { |
|
34 | - $link = '?module='.$_POST['link']; |
|
6 | + include './../../config/koneksi.php'; |
|
7 | + include './../../config/fungsi_thumb.php'; |
|
8 | + |
|
9 | + $module = $_GET[module]; |
|
10 | + $act = $_GET[act]; |
|
11 | + |
|
12 | + $date = date('d/m/Y'); |
|
13 | + $idate = date('Y-m-d'); |
|
14 | + $hour = time() - (1 * 1 * 60 * 60); |
|
15 | + $datetime = date('Y-m-d G:i:s', $hour); |
|
16 | + $userid = $_SESSION['userid']; |
|
17 | + |
|
18 | + // Hapus modul |
|
19 | + if ($module == 'modul' and $act == 'hapus') { |
|
20 | + $id_module = $_GET['id_module']; |
|
21 | + $id = $_GET['id']; |
|
22 | + |
|
23 | + mysql_query('DELETE FROM '.$module.' WHERE id_'.$module." = $id"); |
|
24 | + |
|
25 | + header('location:../../main.php?module='.$module.'&id_module='.$id_module); |
|
26 | + } |
|
27 | + |
|
28 | + // Input modul |
|
29 | + elseif ($module == 'modul' and $act == 'input') { |
|
30 | + if ($_POST['is_form'] == 'Y') { |
|
31 | + $link = $_POST['link']; |
|
35 | 32 | } else { |
36 | - $link = ''; |
|
33 | + if ($_POST['link']) { |
|
34 | + $link = '?module='.$_POST['link']; |
|
35 | + } else { |
|
36 | + $link = ''; |
|
37 | + } |
|
37 | 38 | } |
38 | - } |
|
39 | 39 | |
40 | - $icon = $_POST['icon']; |
|
40 | + $icon = $_POST['icon']; |
|
41 | 41 | |
42 | - $id_module = $_POST['id_module']; |
|
42 | + $id_module = $_POST['id_module']; |
|
43 | 43 | |
44 | - if ($_POST['ID']) { |
|
45 | - mysql_query("UPDATE modul SET nama_modul = '$_POST[nama_modul]', |
|
44 | + if ($_POST['ID']) { |
|
45 | + mysql_query("UPDATE modul SET nama_modul = '$_POST[nama_modul]', |
|
46 | 46 | is_form = '$_POST[is_form]', |
47 | 47 | link = '$_POST[link]', |
48 | 48 | icon = '$_POST[icon]', |
49 | 49 | aktif = '$_POST[aktif]', |
50 | 50 | urutan = '$_POST[urutan]' |
51 | 51 | WHERE id_modul = '$_POST[ID]'"); |
52 | - } else { |
|
53 | - mysql_query("INSERT INTO modul(nama_modul, |
|
52 | + } else { |
|
53 | + mysql_query("INSERT INTO modul(nama_modul, |
|
54 | 54 | link, |
55 | 55 | status_menu, |
56 | 56 | parentid, |
@@ -70,9 +70,9 @@ discard block |
||
70 | 70 | '$_POST[icon]', |
71 | 71 | '$_POST[aktif]', |
72 | 72 | '$_POST[urutan]')"); |
73 | - } |
|
73 | + } |
|
74 | 74 | |
75 | - //header('location:../../main.php?module='.$module.'&id_module='.$id_module);?> |
|
75 | + //header('location:../../main.php?module='.$module.'&id_module='.$id_module);?> |
|
76 | 76 | |
77 | 77 | <script language="javascript"> |
78 | 78 | window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>"; |
@@ -80,22 +80,22 @@ discard block |
||
80 | 80 | </script> |
81 | 81 | |
82 | 82 | <?php |
83 | - } elseif ($module == 'modul' and $act == 'hapusmod') { |
|
84 | - // membaca ID dari data yang akan dihapus |
|
85 | - $id = $_GET['id']; |
|
86 | - $id_module = $_GET['id_module']; |
|
83 | + } elseif ($module == 'modul' and $act == 'hapusmod') { |
|
84 | + // membaca ID dari data yang akan dihapus |
|
85 | + $id = $_GET['id']; |
|
86 | + $id_module = $_GET['id_module']; |
|
87 | 87 | |
88 | - mysql_query("DELETE a |
|
88 | + mysql_query("DELETE a |
|
89 | 89 | FROM business_group a LEFT JOIN modul b |
90 | 90 | ON a.id_source = b.id_modul |
91 | 91 | WHERE a.id_modul = '$id_module' |
92 | 92 | AND b.parentid = '$id'"); |
93 | - mysql_query("DELETE FROM business_group WHERE id_modul = '$id_module' AND id_source = '$id'"); |
|
93 | + mysql_query("DELETE FROM business_group WHERE id_modul = '$id_module' AND id_source = '$id'"); |
|
94 | 94 | |
95 | - mysql_query("DELETE FROM modul WHERE id_modul = '$id'"); |
|
96 | - mysql_query("DELETE FROM modul WHERE parentid = $id"); |
|
95 | + mysql_query("DELETE FROM modul WHERE id_modul = '$id'"); |
|
96 | + mysql_query("DELETE FROM modul WHERE parentid = $id"); |
|
97 | 97 | |
98 | - //header('location:../../main.php?module='.$module.'&id_module='.$id_module);?> |
|
98 | + //header('location:../../main.php?module='.$module.'&id_module='.$id_module);?> |
|
99 | 99 | |
100 | 100 | <script language="javascript"> |
101 | 101 | window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>"; |
@@ -103,23 +103,23 @@ discard block |
||
103 | 103 | </script> |
104 | 104 | |
105 | 105 | <?php |
106 | - } elseif ($module == 'modul' and $act == 'subinput') { |
|
107 | - if ($_POST['is_form'] == 'Y') { |
|
108 | - $link = $_POST['link']; |
|
109 | - } else { |
|
110 | - if ($_POST['link']) { |
|
111 | - $link = '?module='.$_POST['link']; |
|
106 | + } elseif ($module == 'modul' and $act == 'subinput') { |
|
107 | + if ($_POST['is_form'] == 'Y') { |
|
108 | + $link = $_POST['link']; |
|
112 | 109 | } else { |
113 | - $link = ''; |
|
110 | + if ($_POST['link']) { |
|
111 | + $link = '?module='.$_POST['link']; |
|
112 | + } else { |
|
113 | + $link = ''; |
|
114 | + } |
|
114 | 115 | } |
115 | - } |
|
116 | 116 | |
117 | - $icon = $_POST['icon']; |
|
117 | + $icon = $_POST['icon']; |
|
118 | 118 | |
119 | - $id_module = $_POST['id_module']; |
|
119 | + $id_module = $_POST['id_module']; |
|
120 | 120 | |
121 | - if ($_POST['ID']) { |
|
122 | - mysql_query("UPDATE modul SET nama_modul = '$_POST[nama_modul]', |
|
121 | + if ($_POST['ID']) { |
|
122 | + mysql_query("UPDATE modul SET nama_modul = '$_POST[nama_modul]', |
|
123 | 123 | link = '$_POST[link]', |
124 | 124 | is_form = '$_POST[is_form]', |
125 | 125 | is_report = '$_POST[is_report]', |
@@ -128,8 +128,8 @@ discard block |
||
128 | 128 | aktif = '$_POST[aktif]', |
129 | 129 | urutan = '$_POST[urutan]' |
130 | 130 | WHERE id_modul = '$_POST[ID]'"); |
131 | - } else { |
|
132 | - mysql_query("INSERT INTO modul(nama_modul, |
|
131 | + } else { |
|
132 | + mysql_query("INSERT INTO modul(nama_modul, |
|
133 | 133 | link, |
134 | 134 | status_menu, |
135 | 135 | parentid, |
@@ -149,9 +149,9 @@ discard block |
||
149 | 149 | '$icon', |
150 | 150 | '$_POST[aktif]', |
151 | 151 | '$_POST[urutan]')"); |
152 | - } |
|
152 | + } |
|
153 | 153 | |
154 | - //header('location:../../main.php?module='.$module.'&id_module='.$id_module);?> |
|
154 | + //header('location:../../main.php?module='.$module.'&id_module='.$id_module);?> |
|
155 | 155 | |
156 | 156 | <script language="javascript"> |
157 | 157 | window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>"; |
@@ -159,6 +159,6 @@ discard block |
||
159 | 159 | </script> |
160 | 160 | |
161 | 161 | <?php |
162 | - } |
|
162 | + } |
|
163 | 163 | } |
164 | -?> |
|
164 | + ?> |
@@ -1,9 +1,9 @@ discard block |
||
1 | - |
|
2 | -<?php |
|
1 | + |
|
2 | + <?php |
|
3 | 3 | switch ($_GET[act]) { |
4 | 4 | |
5 | -default: |
|
6 | - ?> |
|
5 | + default: |
|
6 | + ?> |
|
7 | 7 | |
8 | 8 | <div class=""> |
9 | 9 | |
@@ -44,56 +44,56 @@ discard block |
||
44 | 44 | |
45 | 45 | <?php |
46 | 46 | |
47 | - $tampil = mysql_query("SELECT * FROM modul WHERE status_menu = 'M' ORDER BY urutan ASC"); |
|
47 | + $tampil = mysql_query("SELECT * FROM modul WHERE status_menu = 'M' ORDER BY urutan ASC"); |
|
48 | 48 | |
49 | - $no = 1; |
|
50 | - while ($r = mysql_fetch_array($tampil)) { |
|
51 | - echo'<tr>'; |
|
52 | - echo"<td><b>$r[nama_modul]</b></td>"; |
|
53 | - echo"<td>$r[link]</td>"; |
|
49 | + $no = 1; |
|
50 | + while ($r = mysql_fetch_array($tampil)) { |
|
51 | + echo'<tr>'; |
|
52 | + echo"<td><b>$r[nama_modul]</b></td>"; |
|
53 | + echo"<td>$r[link]</td>"; |
|
54 | 54 | |
55 | - echo"<td style='text-align:center;'>$r[aktif]</td>"; |
|
56 | - echo"<td style='text-align:center;'>"; |
|
57 | - if ($r_input == 'Y') { |
|
58 | - echo"<a class='thickbox' href='modul/mod_$module/form_sub$module.php?parentid=$r[id_modul]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Sub $nmmodule Baru'><span class='icon'><i class='fa fa-pencil-square-o'></i></span></a>"; |
|
59 | - } |
|
55 | + echo"<td style='text-align:center;'>$r[aktif]</td>"; |
|
56 | + echo"<td style='text-align:center;'>"; |
|
57 | + if ($r_input == 'Y') { |
|
58 | + echo"<a class='thickbox' href='modul/mod_$module/form_sub$module.php?parentid=$r[id_modul]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Sub $nmmodule Baru'><span class='icon'><i class='fa fa-pencil-square-o'></i></span></a>"; |
|
59 | + } |
|
60 | 60 | |
61 | - if ($r_edit == 'Y') { |
|
62 | - echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_modul=$r[id_modul]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update $nmmodule '><span class='icon'><i class='fa fa-pencil'></i></span></a>"; |
|
63 | - } |
|
61 | + if ($r_edit == 'Y') { |
|
62 | + echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_modul=$r[id_modul]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update $nmmodule '><span class='icon'><i class='fa fa-pencil'></i></span></a>"; |
|
63 | + } |
|
64 | 64 | |
65 | - if ($r_delete == 'Y') { |
|
66 | - echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapusmod&id=$r[id_modul]&id_module=$id' onClick=\"return confirm('Hapus data ?')\"><span class='icon'><i class='fa fa-trash'></i></span></a>"; |
|
67 | - } |
|
68 | - echo'</td>'; |
|
65 | + if ($r_delete == 'Y') { |
|
66 | + echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapusmod&id=$r[id_modul]&id_module=$id' onClick=\"return confirm('Hapus data ?')\"><span class='icon'><i class='fa fa-trash'></i></span></a>"; |
|
67 | + } |
|
68 | + echo'</td>'; |
|
69 | 69 | |
70 | - echo'</tr>'; |
|
70 | + echo'</tr>'; |
|
71 | 71 | |
72 | - $dtampil = mysql_query("SELECT * FROM modul |
|
72 | + $dtampil = mysql_query("SELECT * FROM modul |
|
73 | 73 | WHERE status_menu = 'c' |
74 | 74 | AND parentid = '$r[id_modul]' and aktif = 'Y' ORDER BY urutan ASC"); |
75 | 75 | |
76 | - while ($d = mysql_fetch_array($dtampil)) { |
|
77 | - echo'<tr>'; |
|
78 | - echo"<td style='padding-left:15px;'>$d[nama_modul]</td>"; |
|
79 | - echo"<td style='text-transform:lowercase;'>$d[link]</td>"; |
|
76 | + while ($d = mysql_fetch_array($dtampil)) { |
|
77 | + echo'<tr>'; |
|
78 | + echo"<td style='padding-left:15px;'>$d[nama_modul]</td>"; |
|
79 | + echo"<td style='text-transform:lowercase;'>$d[link]</td>"; |
|
80 | 80 | |
81 | - echo"<td style='text-align:center;'>$d[aktif]</td>"; |
|
82 | - echo" <td style='text-align:right;'>"; |
|
83 | - if ($r_edit == 'Y') { |
|
84 | - echo"<a class='thickbox' href='modul/mod_$module/form_sub$module.php?id_modul=$d[id_modul]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update Sub $imodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>"; |
|
85 | - } |
|
81 | + echo"<td style='text-align:center;'>$d[aktif]</td>"; |
|
82 | + echo" <td style='text-align:right;'>"; |
|
83 | + if ($r_edit == 'Y') { |
|
84 | + echo"<a class='thickbox' href='modul/mod_$module/form_sub$module.php?id_modul=$d[id_modul]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update Sub $imodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>"; |
|
85 | + } |
|
86 | 86 | |
87 | - if ($r_delete == 'Y') { |
|
88 | - echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$d[id_modul]&id_module=$id' onClick=\"return confirm('Hapus data ?')\"><span class='icon'><i class='fa fa-trash'></i></span></a>"; |
|
89 | - } |
|
90 | - echo'</td>'; |
|
91 | - echo'</tr>'; |
|
92 | - } |
|
87 | + if ($r_delete == 'Y') { |
|
88 | + echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$d[id_modul]&id_module=$id' onClick=\"return confirm('Hapus data ?')\"><span class='icon'><i class='fa fa-trash'></i></span></a>"; |
|
89 | + } |
|
90 | + echo'</td>'; |
|
91 | + echo'</tr>'; |
|
92 | + } |
|
93 | 93 | |
94 | - $no++; |
|
95 | - } |
|
96 | - ?> |
|
94 | + $no++; |
|
95 | + } |
|
96 | + ?> |
|
97 | 97 | </tbody> |
98 | 98 | </table> |
99 | 99 | </div> |
@@ -1,9 +1,9 @@ discard block |
||
1 | - |
|
2 | -<?php |
|
1 | + |
|
2 | + <?php |
|
3 | 3 | switch ($_GET[act]) { |
4 | 4 | |
5 | -default: |
|
6 | - ?> |
|
5 | + default: |
|
6 | + ?> |
|
7 | 7 | |
8 | 8 | <div class=""> |
9 | 9 | |
@@ -45,31 +45,31 @@ discard block |
||
45 | 45 | |
46 | 46 | <?php |
47 | 47 | |
48 | - $tampil = mysql_query('SELECT * FROM groups a |
|
48 | + $tampil = mysql_query('SELECT * FROM groups a |
|
49 | 49 | ORDER BY id_groups'); |
50 | 50 | |
51 | - $no = 1; |
|
51 | + $no = 1; |
|
52 | 52 | |
53 | - while ($r = mysql_fetch_array($tampil)) { |
|
54 | - echo'<tr>'; |
|
55 | - echo"<td>$r[groups]</td>"; |
|
56 | - // echo"<td>$r[main_page]</td>"; |
|
57 | - // echo"<td>$r[tipe_sales]</td>"; |
|
58 | - echo"<td style='text-align:center;'>$r[aktif]</td>"; |
|
59 | - echo" <td style='text-align:center;'>"; |
|
53 | + while ($r = mysql_fetch_array($tampil)) { |
|
54 | + echo'<tr>'; |
|
55 | + echo"<td>$r[groups]</td>"; |
|
56 | + // echo"<td>$r[main_page]</td>"; |
|
57 | + // echo"<td>$r[tipe_sales]</td>"; |
|
58 | + echo"<td style='text-align:center;'>$r[aktif]</td>"; |
|
59 | + echo" <td style='text-align:center;'>"; |
|
60 | 60 | |
61 | - if ($r_edit == 'Y') { |
|
62 | - echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_groups=$r[id_groups]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>"; |
|
63 | - } |
|
61 | + if ($r_edit == 'Y') { |
|
62 | + echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_groups=$r[id_groups]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>"; |
|
63 | + } |
|
64 | 64 | |
65 | - if ($r_delete == 'Y') { |
|
66 | - echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_groups]&id_module=$id' onClick=\"return confirm('Delete this record ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>"; |
|
67 | - } |
|
68 | - echo'</td>'; |
|
69 | - echo'</tr>'; |
|
70 | - $no++; |
|
71 | - } |
|
72 | - ?> |
|
65 | + if ($r_delete == 'Y') { |
|
66 | + echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_groups]&id_module=$id' onClick=\"return confirm('Delete this record ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>"; |
|
67 | + } |
|
68 | + echo'</td>'; |
|
69 | + echo'</tr>'; |
|
70 | + $no++; |
|
71 | + } |
|
72 | + ?> |
|
73 | 73 | </tbody> |
74 | 74 | </table> |
75 | 75 | </div> |
@@ -1,29 +1,29 @@ discard block |
||
1 | -<?php |
|
2 | -session_start(); |
|
3 | -if (empty($_SESSION['username']) and empty($_SESSION['password'])) { |
|
4 | - echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>"; |
|
1 | + <?php |
|
2 | + session_start(); |
|
3 | + if (empty($_SESSION['username']) and empty($_SESSION['password'])) { |
|
4 | + echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>"; |
|
5 | 5 | } else { |
6 | - include './../../config/koneksi.php'; |
|
7 | - include './../../config/fungsi_thumb.php'; |
|
6 | + include './../../config/koneksi.php'; |
|
7 | + include './../../config/fungsi_thumb.php'; |
|
8 | 8 | |
9 | - $module = $_GET[module]; |
|
10 | - $act = $_GET[act]; |
|
9 | + $module = $_GET[module]; |
|
10 | + $act = $_GET[act]; |
|
11 | 11 | |
12 | - $date = date('d/m/Y'); |
|
13 | - $idate = date('Y-m-d'); |
|
14 | - $hour = time() - (1 * 1 * 60 * 60); |
|
15 | - $datetime = date('Y-m-d G:i:s', $hour); |
|
16 | - $userid = $_SESSION['userid']; |
|
17 | - $business_type = $_SESSION['business_type']; |
|
12 | + $date = date('d/m/Y'); |
|
13 | + $idate = date('Y-m-d'); |
|
14 | + $hour = time() - (1 * 1 * 60 * 60); |
|
15 | + $datetime = date('Y-m-d G:i:s', $hour); |
|
16 | + $userid = $_SESSION['userid']; |
|
17 | + $business_type = $_SESSION['business_type']; |
|
18 | 18 | |
19 | - // Hapus modul |
|
20 | - if ($module == 'groups' and $act == 'hapus') { |
|
21 | - $id = $_GET['id']; |
|
22 | - $id_module = $_GET['id_module']; |
|
19 | + // Hapus modul |
|
20 | + if ($module == 'groups' and $act == 'hapus') { |
|
21 | + $id = $_GET['id']; |
|
22 | + $id_module = $_GET['id_module']; |
|
23 | 23 | |
24 | - mysql_query('DELETE FROM '.$module.' WHERE id_'.$module." = $id"); |
|
24 | + mysql_query('DELETE FROM '.$module.' WHERE id_'.$module." = $id"); |
|
25 | 25 | |
26 | - //header('location:../../main.php?module='.$module.'&id_module='.$id_module);?> |
|
26 | + //header('location:../../main.php?module='.$module.'&id_module='.$id_module);?> |
|
27 | 27 | |
28 | 28 | <script language="javascript"> |
29 | 29 | window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>"; |
@@ -31,20 +31,20 @@ discard block |
||
31 | 31 | </script> |
32 | 32 | |
33 | 33 | <?php |
34 | - } |
|
34 | + } |
|
35 | 35 | |
36 | - // Input group |
|
37 | - elseif ($module == 'groups' and $act == 'input') { |
|
38 | - $id_module = $_POST['id_module']; |
|
36 | + // Input group |
|
37 | + elseif ($module == 'groups' and $act == 'input') { |
|
38 | + $id_module = $_POST['id_module']; |
|
39 | 39 | |
40 | - if ($_POST['ID']) { |
|
41 | - mysql_query("UPDATE groups SET groups = '$_POST[groups]' |
|
40 | + if ($_POST['ID']) { |
|
41 | + mysql_query("UPDATE groups SET groups = '$_POST[groups]' |
|
42 | 42 | ,upddt = '$datetime' |
43 | 43 | ,updby = '$userid' |
44 | 44 | ,aktif = '$_POST[aktif]' |
45 | 45 | WHERE id_groups = '$_POST[ID]'"); |
46 | - } else { |
|
47 | - mysql_query("INSERT INTO groups(groups |
|
46 | + } else { |
|
47 | + mysql_query("INSERT INTO groups(groups |
|
48 | 48 | ,crtdt |
49 | 49 | ,crtby |
50 | 50 | ,upddt |
@@ -56,9 +56,9 @@ discard block |
||
56 | 56 | ,'$datetime' |
57 | 57 | ,'$userid' |
58 | 58 | ,'$_POST[aktif]')"); |
59 | - } |
|
59 | + } |
|
60 | 60 | |
61 | - //header('location:../../main.php?module='.$module.'&id_module='.$id_module);?> |
|
61 | + //header('location:../../main.php?module='.$module.'&id_module='.$id_module);?> |
|
62 | 62 | |
63 | 63 | <script language="javascript"> |
64 | 64 | window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>"; |
@@ -66,6 +66,6 @@ discard block |
||
66 | 66 | </script> |
67 | 67 | |
68 | 68 | <?php |
69 | - } |
|
69 | + } |
|
70 | 70 | } |
71 | -?> |
|
71 | + ?> |