Passed
Push — master ( d91862...237c42 )
by Saepul
04:48
created
modul/mod_kasir/ecetak_kasir.php 3 patches
Indentation   +79 added lines, -79 removed lines patch added patch discarded remove patch
@@ -49,37 +49,37 @@  discard block
 block discarded – undo
49 49
   
50 50
       <?php
51 51
 
52
-       $gtampil = mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
52
+        $gtampil = mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
53 53
 
54
-       $g = mysql_fetch_array($gtampil);
54
+        $g = mysql_fetch_array($gtampil);
55 55
 
56
-      if ($g['pict']) {
57
-          $pict = $g['pict'];
58
-      } else {
59
-          $pict = '';
60
-      }
56
+        if ($g['pict']) {
57
+            $pict = $g['pict'];
58
+        } else {
59
+            $pict = '';
60
+        }
61 61
 
62
-      $company = ucwords($g['company']);
62
+        $company = ucwords($g['company']);
63 63
 
64
-      $sql = mysql_query("SELECT a.*,b.shift FROM kasir  a LEFT JOIN shift b 
64
+        $sql = mysql_query("SELECT a.*,b.shift FROM kasir  a LEFT JOIN shift b 
65 65
                             ON a.id_shift = b.id_shift
66 66
                             WHERE a.id_kasir = '$k_ID' 
67 67
 
68 68
                            ");
69 69
 
70
-      $r = mysql_fetch_array($sql);
70
+        $r = mysql_fetch_array($sql);
71 71
 
72
-      $penjualan_barang = $r['id_kasir'];
72
+        $penjualan_barang = $r['id_kasir'];
73 73
 
74
-      $shift = $r['shift'];
74
+        $shift = $r['shift'];
75 75
 
76
-      $petugas = $r['petugas'];
76
+        $petugas = $r['petugas'];
77 77
 
78
-      $status = $r['status'];
78
+        $status = $r['status'];
79 79
 
80
-      $tanggal = date('d/m/Y', strtotime($r['tanggal']));
80
+        $tanggal = date('d/m/Y', strtotime($r['tanggal']));
81 81
 
82
-      ?>
82
+        ?>
83 83
 
84 84
       <table width="100%">
85 85
       <tr>
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
                 while ($i = mysql_fetch_array($itampil)) {
117 117
                     echo "<th>$i[jenis_transaksi]</th>";
118 118
                 }
119
-               ?>
119
+                ?>
120 120
 
121 121
                <?php
122 122
 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
                 while ($i = mysql_fetch_array($itampil)) {
126 126
                     echo "<th>$i[jenis_pembayaran]</th>";
127 127
                 }
128
-               ?>
128
+                ?>
129 129
 
130 130
 
131 131
             </tr> 
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
 
288 288
                 $no++;
289 289
             }
290
-             ?>
290
+                ?>
291 291
              </tbody> 
292 292
 
293 293
              <tfoot>
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
 
301 301
                <?php
302 302
 
303
-                          $itampil = mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' ORDER BY id_jenis_transaksi");
303
+                            $itampil = mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' ORDER BY id_jenis_transaksi");
304 304
 
305 305
                             while ($i = mysql_fetch_array($itampil)) {
306 306
                                 $jtampil = mysql_query("SELECT sum(b.jumlah) as jumlah FROM kasir a INNER JOIN kasir_detail b 
@@ -325,10 +325,10 @@  discard block
 block discarded – undo
325 325
                 ?>        
326 326
 
327 327
                  <?php
328
-                 $itampil = mysql_query("SELECT * FROM jenis_pembayaran where aktif = 'Y' ORDER BY id_jenis_pembayaran");
328
+                    $itampil = mysql_query("SELECT * FROM jenis_pembayaran where aktif = 'Y' ORDER BY id_jenis_pembayaran");
329 329
 
330
-                  while ($i = mysql_fetch_array($itampil)) {
331
-                      $pSQL = "SELECT  sum(a.jumlah) as jumlah 
330
+                    while ($i = mysql_fetch_array($itampil)) {
331
+                        $pSQL = "SELECT  sum(a.jumlah) as jumlah 
332 332
 
333 333
                            FROM kasir_detail a LEFT JOIN jenis_transaksi b
334 334
 
@@ -356,20 +356,20 @@  discard block
 block discarded – undo
356 356
 
357 357
                            ";
358 358
 
359
-                      $ptampil = mysql_query($pSQL);
359
+                        $ptampil = mysql_query($pSQL);
360 360
 
361
-                      $p = mysql_fetch_array($ptampil);
361
+                        $p = mysql_fetch_array($ptampil);
362 362
 
363
-                      if ($p[jumlah]) {
364
-                          $jml = number_format($p['jumlah'], 0, '.', ',');
365
-                      } else {
366
-                          $jml = 0;
367
-                      }
363
+                        if ($p[jumlah]) {
364
+                            $jml = number_format($p['jumlah'], 0, '.', ',');
365
+                        } else {
366
+                            $jml = 0;
367
+                        }
368 368
 
369
-                      echo"<th  style='text-align:right;'>$jml </th>";
370
-                  }
369
+                        echo"<th  style='text-align:right;'>$jml </th>";
370
+                    }
371 371
 
372
-               ?> 
372
+                ?> 
373 373
        
374 374
                <th></th> 
375 375
 
@@ -389,16 +389,16 @@  discard block
 block discarded – undo
389 389
 
390 390
             <?php 
391 391
 
392
-                 if ($r[id_shift] == '1') {
393
-                     $id_shift = '1';
394
-                 } else {
395
-                     $id_shift = '%';
396
-                 }
392
+                    if ($r[id_shift] == '1') {
393
+                        $id_shift = '1';
394
+                    } else {
395
+                        $id_shift = '%';
396
+                    }
397 397
 
398
-                 $itampil = mysql_query("SELECT * FROM shift where aktif = 'Y' and id_shift LIKE '$id_shift' ORDER BY id_shift");
398
+                    $itampil = mysql_query("SELECT * FROM shift where aktif = 'Y' and id_shift LIKE '$id_shift' ORDER BY id_shift");
399 399
 
400
-                  while ($i = mysql_fetch_array($itampil)) {
401
-                      $shift = $i['shift']; ?>       
400
+                    while ($i = mysql_fetch_array($itampil)) {
401
+                        $shift = $i['shift']; ?>       
402 402
 
403 403
                     <tr>
404 404
                     <th></th>
@@ -437,15 +437,15 @@  discard block
 block discarded – undo
437 437
 
438 438
                            ";
439 439
 
440
-                      $ptampil = mysql_query($pSQL);
440
+                        $ptampil = mysql_query($pSQL);
441 441
 
442
-                      $p = mysql_fetch_array($ptampil);
442
+                        $p = mysql_fetch_array($ptampil);
443 443
 
444
-                      if ($p[jumlah]) {
445
-                          $cash = number_format($p['jumlah'], 0, '.', ',');
446
-                      } else {
447
-                          $cash = 0;
448
-                      } ?>
444
+                        if ($p[jumlah]) {
445
+                            $cash = number_format($p['jumlah'], 0, '.', ',');
446
+                        } else {
447
+                            $cash = 0;
448
+                        } ?>
449 449
                     <th style="text-align: right;"><?=$cash; ?></th>
450 450
                     <th style="text-align: left;">Credit</th>
451 451
 
@@ -480,15 +480,15 @@  discard block
 block discarded – undo
480 480
 
481 481
                            ";
482 482
 
483
-                      $ptampil = mysql_query($pSQL);
483
+                        $ptampil = mysql_query($pSQL);
484 484
 
485
-                      $p = mysql_fetch_array($ptampil);
485
+                        $p = mysql_fetch_array($ptampil);
486 486
 
487
-                      if ($p[jumlah]) {
488
-                          $credit = number_format($p['jumlah'], 0, '.', ',');
489
-                      } else {
490
-                          $credit = 0;
491
-                      } ?>
487
+                        if ($p[jumlah]) {
488
+                            $credit = number_format($p['jumlah'], 0, '.', ',');
489
+                        } else {
490
+                            $credit = 0;
491
+                        } ?>
492 492
 
493 493
                     <th style="text-align: right;"><?=$credit; ?></th>
494 494
                     <th colspan="4"></th>
@@ -496,12 +496,12 @@  discard block
 block discarded – undo
496 496
 
497 497
 
498 498
                <?php
499
-                  }
499
+                    }
500 500
 
501
-               ?> 
501
+                ?> 
502 502
 
503 503
                <?php if ($id_shift == '%') {
504
-                   ?>
504
+                    ?>
505 505
                <tr>
506 506
                     <th></th>
507 507
                     <th></th>
@@ -537,15 +537,15 @@  discard block
 block discarded – undo
537 537
 
538 538
                            ";
539 539
 
540
-                   $ptampil = mysql_query($pSQL);
540
+                    $ptampil = mysql_query($pSQL);
541 541
 
542
-                   $p = mysql_fetch_array($ptampil);
542
+                    $p = mysql_fetch_array($ptampil);
543 543
 
544
-                   if ($p[jumlah]) {
545
-                       $cash = number_format($p['jumlah'], 0, '.', ',');
546
-                   } else {
547
-                       $cash = 0;
548
-                   } ?>
544
+                    if ($p[jumlah]) {
545
+                        $cash = number_format($p['jumlah'], 0, '.', ',');
546
+                    } else {
547
+                        $cash = 0;
548
+                    } ?>
549 549
                     <th style="text-align: right;"><?=$cash; ?></th>
550 550
                     <th style="text-align: left;">Credit</th>
551 551
 
@@ -578,22 +578,22 @@  discard block
 block discarded – undo
578 578
 
579 579
                            ";
580 580
 
581
-                   $ptampil = mysql_query($pSQL);
581
+                    $ptampil = mysql_query($pSQL);
582 582
 
583
-                   $p = mysql_fetch_array($ptampil);
583
+                    $p = mysql_fetch_array($ptampil);
584 584
 
585
-                   if ($p[jumlah]) {
586
-                       $credit = number_format($p['jumlah'], 0, '.', ',');
587
-                   } else {
588
-                       $credit = 0;
589
-                   } ?>
585
+                    if ($p[jumlah]) {
586
+                        $credit = number_format($p['jumlah'], 0, '.', ',');
587
+                    } else {
588
+                        $credit = 0;
589
+                    } ?>
590 590
 
591 591
                     <th style="text-align: right;"><?=$credit; ?></th>
592 592
                     <th colspan="4"></th>
593 593
                     </tr> 
594 594
 
595 595
                 <?php
596
-               } ?>
596
+                } ?>
597 597
 
598 598
                  <tr><td colspan="12">&nbsp</td></tr>  
599 599
 
@@ -644,13 +644,13 @@  discard block
 block discarded – undo
644 644
 
645 645
                         $p = mysql_fetch_array($ptampil);
646 646
 
647
-                             if ($p[jumlah]) {
648
-                                 $total = number_format($p['jumlah'], 0, '.', ',');
649
-                             } else {
650
-                                 $total = 0;
651
-                             }
647
+                                if ($p[jumlah]) {
648
+                                    $total = number_format($p['jumlah'], 0, '.', ',');
649
+                                } else {
650
+                                    $total = 0;
651
+                                }
652 652
 
653
-              ?>
653
+                ?>
654 654
 
655 655
 
656 656
                 <tr>
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
 
390 390
             <?php 
391 391
 
392
-                 if ($r[id_shift] == '1') {
392
+                 if ($r[id_shift]=='1') {
393 393
                      $id_shift = '1';
394 394
                  } else {
395 395
                      $id_shift = '%';
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
 
501 501
                ?> 
502 502
 
503
-               <?php if ($id_shift == '%') {
503
+               <?php if ($id_shift=='%') {
504 504
                    ?>
505 505
                <tr>
506 506
                     <th></th>
Please login to merge, or discard this patch.
Switch Indentation   +182 added lines, -182 removed lines patch added patch discarded remove patch
@@ -1,38 +1,38 @@  discard block
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 
3
-header('Content-Type: application/octet-stream');
4
-header('Content-Type: application/download');
5
-header('Content-Type: application/vnd.ms-excel');
6
-header('Content-Disposition: attachment;filename=laporan_harian_kasir.xls ');
7
-header('Content-Transfer-Encoding: binary ');
3
+    header('Content-Type: application/octet-stream');
4
+    header('Content-Type: application/download');
5
+    header('Content-Type: application/vnd.ms-excel');
6
+    header('Content-Disposition: attachment;filename=laporan_harian_kasir.xls ');
7
+    header('Content-Transfer-Encoding: binary ');
8 8
 
9
-?>
10
-
11
-<?php
9
+    ?>
10
+    
11
+    <?php
12 12
 
13 13
 
14
-include './../../config/koneksi.php';
14
+    include './../../config/koneksi.php';
15 15
 
16
-$report_id = $_GET[report_id];
17
-$tampil = mysql_query("SELECT * FROM modul WHERE id_modul ='".$report_id."'");
16
+    $report_id = $_GET[report_id];
17
+    $tampil = mysql_query("SELECT * FROM modul WHERE id_modul ='".$report_id."'");
18 18
 
19
-$r = mysql_fetch_array($tampil);
19
+    $r = mysql_fetch_array($tampil);
20 20
 
21
-//module=$module&report_id=$report_id&k_ID=$k_ID
21
+    //module=$module&report_id=$report_id&k_ID=$k_ID
22 22
 
23
-$module = $_GET['module'];
23
+    $module = $_GET['module'];
24 24
 
25
-$imodule = ucwords($r['nama_modul']);
25
+    $imodule = ucwords($r['nama_modul']);
26 26
 
27
-$nmmodule = ucwords($r['nama_modul']);
27
+    $nmmodule = ucwords($r['nama_modul']);
28 28
 
29
-$id = $r['id_modul'];
29
+    $id = $r['id_modul'];
30 30
 
31
-$fa_icon = $r['fa_icon'];
31
+    $fa_icon = $r['fa_icon'];
32 32
 
33
-$k_ID = $_GET['k_ID'];
33
+    $k_ID = $_GET['k_ID'];
34 34
 
35
-?>
35
+    ?>
36 36
 
37 37
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
38 38
 <html xmlns="http://www.w3.org/1999/xhtml"><head>
@@ -49,37 +49,37 @@  discard block
 block discarded – undo
49 49
   
50 50
       <?php
51 51
 
52
-       $gtampil = mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
52
+           $gtampil = mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
53 53
 
54
-       $g = mysql_fetch_array($gtampil);
54
+           $g = mysql_fetch_array($gtampil);
55 55
 
56
-      if ($g['pict']) {
57
-          $pict = $g['pict'];
58
-      } else {
59
-          $pict = '';
60
-      }
56
+          if ($g['pict']) {
57
+              $pict = $g['pict'];
58
+          } else {
59
+              $pict = '';
60
+          }
61 61
 
62
-      $company = ucwords($g['company']);
62
+          $company = ucwords($g['company']);
63 63
 
64
-      $sql = mysql_query("SELECT a.*,b.shift FROM kasir  a LEFT JOIN shift b 
64
+          $sql = mysql_query("SELECT a.*,b.shift FROM kasir  a LEFT JOIN shift b 
65 65
                             ON a.id_shift = b.id_shift
66 66
                             WHERE a.id_kasir = '$k_ID' 
67 67
 
68 68
                            ");
69 69
 
70
-      $r = mysql_fetch_array($sql);
70
+          $r = mysql_fetch_array($sql);
71 71
 
72
-      $penjualan_barang = $r['id_kasir'];
72
+          $penjualan_barang = $r['id_kasir'];
73 73
 
74
-      $shift = $r['shift'];
74
+          $shift = $r['shift'];
75 75
 
76
-      $petugas = $r['petugas'];
76
+          $petugas = $r['petugas'];
77 77
 
78
-      $status = $r['status'];
78
+          $status = $r['status'];
79 79
 
80
-      $tanggal = date('d/m/Y', strtotime($r['tanggal']));
80
+          $tanggal = date('d/m/Y', strtotime($r['tanggal']));
81 81
 
82
-      ?>
82
+          ?>
83 83
 
84 84
       <table width="100%">
85 85
       <tr>
@@ -111,21 +111,21 @@  discard block
 block discarded – undo
111 111
             <tr>
112 112
                <?php
113 113
 
114
-                $itampil = mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' ORDER BY id_jenis_transaksi");
114
+                    $itampil = mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' ORDER BY id_jenis_transaksi");
115 115
 
116
-                while ($i = mysql_fetch_array($itampil)) {
117
-                    echo "<th>$i[jenis_transaksi]</th>";
118
-                }
119
-               ?>
120
-
116
+                    while ($i = mysql_fetch_array($itampil)) {
117
+                        echo "<th>$i[jenis_transaksi]</th>";
118
+                    }
119
+                   ?>
120
+    
121 121
                <?php
122 122
 
123
-                $itampil = mysql_query("SELECT * FROM jenis_pembayaran where aktif = 'Y' ORDER BY id_jenis_pembayaran");
123
+                    $itampil = mysql_query("SELECT * FROM jenis_pembayaran where aktif = 'Y' ORDER BY id_jenis_pembayaran");
124 124
 
125
-                while ($i = mysql_fetch_array($itampil)) {
126
-                    echo "<th>$i[jenis_pembayaran]</th>";
127
-                }
128
-               ?>
125
+                    while ($i = mysql_fetch_array($itampil)) {
126
+                        echo "<th>$i[jenis_pembayaran]</th>";
127
+                    }
128
+                   ?>
129 129
 
130 130
 
131 131
             </tr> 
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
           <tbody>
139 139
             <?php
140 140
 
141
-            $dSQL = "SELECT a.notrans, a.pasien , a.id_jenis_pembayaran, c.penjamin,d.jenis_pembayaran , sum(a.jumlah) as jumlah 
141
+                $dSQL = "SELECT a.notrans, a.pasien , a.id_jenis_pembayaran, c.penjamin,d.jenis_pembayaran , sum(a.jumlah) as jumlah 
142 142
 
143 143
                      FROM kasir_detail a LEFT JOIN jenis_transaksi b
144 144
 
@@ -160,45 +160,45 @@  discard block
 block discarded – undo
160 160
 
161 161
                      ";
162 162
 
163
-            $dtampil = mysql_query($dSQL);
163
+                $dtampil = mysql_query($dSQL);
164 164
 
165
-            $no = 1;
165
+                $no = 1;
166 166
 
167
-            while ($d = mysql_fetch_array($dtampil)) {
168
-                $d_id = $d['id_kasir_detail'];
167
+                while ($d = mysql_fetch_array($dtampil)) {
168
+                    $d_id = $d['id_kasir_detail'];
169 169
 
170
-                $ijumlah = number_format($d['jumlah'], 0, '.', ',');
170
+                    $ijumlah = number_format($d['jumlah'], 0, '.', ',');
171 171
 
172
-                $jumlah = number_format($d['jumlah'], 0, '.', ',');
172
+                    $jumlah = number_format($d['jumlah'], 0, '.', ',');
173 173
 
174
-                $total = $total + $d['jumlah'];
174
+                    $total = $total + $d['jumlah'];
175 175
 
176
-                $itotal = number_format($total, 0, '.', ',');
176
+                    $itotal = number_format($total, 0, '.', ',');
177 177
 
178
-                echo'<tr>';
178
+                    echo'<tr>';
179 179
 
180
-                echo' <td>';
180
+                    echo' <td>';
181 181
 
182
-                echo $no;
182
+                    echo $no;
183 183
 
184
-                echo'</td>';
184
+                    echo'</td>';
185 185
 
186
-                echo' <td>';
186
+                    echo' <td>';
187 187
 
188
-                echo $d['notrans'];
188
+                    echo $d['notrans'];
189 189
 
190
-                echo'</td>';
190
+                    echo'</td>';
191 191
 
192
-                echo' <td>';
192
+                    echo' <td>';
193 193
 
194
-                echo $d['pasien'];
194
+                    echo $d['pasien'];
195 195
 
196
-                echo'</td>';
196
+                    echo'</td>';
197 197
 
198
-                $itampil = mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' ORDER BY id_jenis_transaksi");
198
+                    $itampil = mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' ORDER BY id_jenis_transaksi");
199 199
 
200
-                while ($i = mysql_fetch_array($itampil)) {
201
-                    $jtampil = mysql_query("SELECT b.jumlah FROM kasir a INNER JOIN kasir_detail b 
200
+                    while ($i = mysql_fetch_array($itampil)) {
201
+                        $jtampil = mysql_query("SELECT b.jumlah FROM kasir a INNER JOIN kasir_detail b 
202 202
                                          ON a.id_kasir = b.id_kasir 
203 203
                                          where a.tanggal = '$r[tanggal]'
204 204
                                          AND a.id_shift  = '$r[id_shift]'
@@ -207,21 +207,21 @@  discard block
 block discarded – undo
207 207
                                          AND b.status <> '4'
208 208
                                          ");
209 209
 
210
-                    $j = mysql_fetch_array($jtampil);
210
+                        $j = mysql_fetch_array($jtampil);
211 211
 
212
-                    if ($j[jumlah]) {
213
-                        $jml = number_format($j['jumlah'], 0, '.', ',');
214
-                    } else {
215
-                        $jml = 0;
216
-                    }
212
+                        if ($j[jumlah]) {
213
+                            $jml = number_format($j['jumlah'], 0, '.', ',');
214
+                        } else {
215
+                            $jml = 0;
216
+                        }
217 217
 
218
-                    echo "<td  style='text-align:right;'>$jml</td>";
219
-                }
218
+                        echo "<td  style='text-align:right;'>$jml</td>";
219
+                    }
220 220
 
221
-                $itampil = mysql_query("SELECT * FROM jenis_pembayaran where aktif = 'Y' ORDER BY id_jenis_pembayaran");
221
+                    $itampil = mysql_query("SELECT * FROM jenis_pembayaran where aktif = 'Y' ORDER BY id_jenis_pembayaran");
222 222
 
223
-                while ($i = mysql_fetch_array($itampil)) {
224
-                    $pSQL = "SELECT  sum(a.jumlah) as jumlah 
223
+                    while ($i = mysql_fetch_array($itampil)) {
224
+                        $pSQL = "SELECT  sum(a.jumlah) as jumlah 
225 225
 
226 226
                          FROM kasir_detail a LEFT JOIN jenis_transaksi b
227 227
 
@@ -251,43 +251,43 @@  discard block
 block discarded – undo
251 251
 
252 252
                          ";
253 253
 
254
-                    $ptampil = mysql_query($pSQL);
254
+                        $ptampil = mysql_query($pSQL);
255 255
 
256
-                    $p = mysql_fetch_array($ptampil);
256
+                        $p = mysql_fetch_array($ptampil);
257 257
 
258
-                    if ($p[jumlah]) {
259
-                        $jml = number_format($p['jumlah'], 0, '.', ',');
260
-                    } else {
261
-                        $jml = 0;
262
-                    }
258
+                        if ($p[jumlah]) {
259
+                            $jml = number_format($p['jumlah'], 0, '.', ',');
260
+                        } else {
261
+                            $jml = 0;
262
+                        }
263 263
 
264
-                    echo"<td  style='text-align:right;'>$jml </td>";
265
-                }
264
+                        echo"<td  style='text-align:right;'>$jml </td>";
265
+                    }
266 266
 
267
-                echo' <td>';
267
+                    echo' <td>';
268 268
 
269
-                $jtampil = mysql_query("SELECT b.ket  FROM kasir a INNER JOIN kasir_detail b 
269
+                    $jtampil = mysql_query("SELECT b.ket  FROM kasir a INNER JOIN kasir_detail b 
270 270
                                          ON a.id_kasir = b.id_kasir 
271 271
                                          where a.tanggal = '$r[tanggal]'
272 272
                                          AND a.id_shift  = '$r[id_shift]'
273 273
                                          AND b.notrans  = '$d[notrans]'
274 274
                                          ");
275 275
 
276
-                $j = mysql_fetch_array($jtampil);
276
+                    $j = mysql_fetch_array($jtampil);
277 277
 
278
-                echo $j[ket];
278
+                    echo $j[ket];
279 279
 
280
-                if ($d['penjamin']) {
281
-                    echo'<br>'.'('.$d['penjamin'].')';
282
-                }
280
+                    if ($d['penjamin']) {
281
+                        echo'<br>'.'('.$d['penjamin'].')';
282
+                    }
283 283
 
284
-                echo'</td>';
284
+                    echo'</td>';
285 285
 
286
-                echo '</tr>';
286
+                    echo '</tr>';
287 287
 
288
-                $no++;
289
-            }
290
-             ?>
288
+                    $no++;
289
+                }
290
+                 ?>
291 291
              </tbody> 
292 292
 
293 293
              <tfoot>
@@ -300,10 +300,10 @@  discard block
 block discarded – undo
300 300
 
301 301
                <?php
302 302
 
303
-                          $itampil = mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' ORDER BY id_jenis_transaksi");
303
+                              $itampil = mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' ORDER BY id_jenis_transaksi");
304 304
 
305
-                            while ($i = mysql_fetch_array($itampil)) {
306
-                                $jtampil = mysql_query("SELECT sum(b.jumlah) as jumlah FROM kasir a INNER JOIN kasir_detail b 
305
+                                while ($i = mysql_fetch_array($itampil)) {
306
+                                    $jtampil = mysql_query("SELECT sum(b.jumlah) as jumlah FROM kasir a INNER JOIN kasir_detail b 
307 307
                                                      ON a.id_kasir = b.id_kasir 
308 308
                                                      where a.tanggal = '$r[tanggal]'
309 309
                                                      AND a.id_shift  = '$r[id_shift]'
@@ -311,24 +311,24 @@  discard block
 block discarded – undo
311 311
                                                      AND b.status <> '4'
312 312
                                                      ");
313 313
 
314
-                                $j = mysql_fetch_array($jtampil);
314
+                                    $j = mysql_fetch_array($jtampil);
315 315
 
316
-                                if ($j[jumlah]) {
317
-                                    $jml = number_format($j['jumlah'], 0, '.', ',');
318
-                                } else {
319
-                                    $jml = 0;
320
-                                }
316
+                                    if ($j[jumlah]) {
317
+                                        $jml = number_format($j['jumlah'], 0, '.', ',');
318
+                                    } else {
319
+                                        $jml = 0;
320
+                                    }
321 321
 
322
-                                echo "<th  style='text-align:right;'>$jml</th>";
323
-                            }
322
+                                    echo "<th  style='text-align:right;'>$jml</th>";
323
+                                }
324 324
 
325
-                ?>        
325
+                    ?>        
326 326
 
327 327
                  <?php
328
-                 $itampil = mysql_query("SELECT * FROM jenis_pembayaran where aktif = 'Y' ORDER BY id_jenis_pembayaran");
328
+                     $itampil = mysql_query("SELECT * FROM jenis_pembayaran where aktif = 'Y' ORDER BY id_jenis_pembayaran");
329 329
 
330
-                  while ($i = mysql_fetch_array($itampil)) {
331
-                      $pSQL = "SELECT  sum(a.jumlah) as jumlah 
330
+                      while ($i = mysql_fetch_array($itampil)) {
331
+                          $pSQL = "SELECT  sum(a.jumlah) as jumlah 
332 332
 
333 333
                            FROM kasir_detail a LEFT JOIN jenis_transaksi b
334 334
 
@@ -356,20 +356,20 @@  discard block
 block discarded – undo
356 356
 
357 357
                            ";
358 358
 
359
-                      $ptampil = mysql_query($pSQL);
359
+                          $ptampil = mysql_query($pSQL);
360 360
 
361
-                      $p = mysql_fetch_array($ptampil);
361
+                          $p = mysql_fetch_array($ptampil);
362 362
 
363
-                      if ($p[jumlah]) {
364
-                          $jml = number_format($p['jumlah'], 0, '.', ',');
365
-                      } else {
366
-                          $jml = 0;
367
-                      }
363
+                          if ($p[jumlah]) {
364
+                              $jml = number_format($p['jumlah'], 0, '.', ',');
365
+                          } else {
366
+                              $jml = 0;
367
+                          }
368 368
 
369
-                      echo"<th  style='text-align:right;'>$jml </th>";
370
-                  }
369
+                          echo"<th  style='text-align:right;'>$jml </th>";
370
+                      }
371 371
 
372
-               ?> 
372
+                   ?> 
373 373
        
374 374
                <th></th> 
375 375
 
@@ -389,16 +389,16 @@  discard block
 block discarded – undo
389 389
 
390 390
             <?php 
391 391
 
392
-                 if ($r[id_shift] == '1') {
393
-                     $id_shift = '1';
394
-                 } else {
395
-                     $id_shift = '%';
396
-                 }
392
+                     if ($r[id_shift] == '1') {
393
+                         $id_shift = '1';
394
+                     } else {
395
+                         $id_shift = '%';
396
+                     }
397 397
 
398
-                 $itampil = mysql_query("SELECT * FROM shift where aktif = 'Y' and id_shift LIKE '$id_shift' ORDER BY id_shift");
398
+                     $itampil = mysql_query("SELECT * FROM shift where aktif = 'Y' and id_shift LIKE '$id_shift' ORDER BY id_shift");
399 399
 
400
-                  while ($i = mysql_fetch_array($itampil)) {
401
-                      $shift = $i['shift']; ?>       
400
+                      while ($i = mysql_fetch_array($itampil)) {
401
+                          $shift = $i['shift']; ?>       
402 402
 
403 403
                     <tr>
404 404
                     <th></th>
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
                     <?php
410 410
 
411 411
 
412
-                    $pSQL = "SELECT  sum(a.jumlah) as jumlah 
412
+                        $pSQL = "SELECT  sum(a.jumlah) as jumlah 
413 413
 
414 414
                            FROM kasir_detail a LEFT JOIN jenis_transaksi b
415 415
 
@@ -437,22 +437,22 @@  discard block
 block discarded – undo
437 437
 
438 438
                            ";
439 439
 
440
-                      $ptampil = mysql_query($pSQL);
440
+                          $ptampil = mysql_query($pSQL);
441 441
 
442
-                      $p = mysql_fetch_array($ptampil);
442
+                          $p = mysql_fetch_array($ptampil);
443 443
 
444
-                      if ($p[jumlah]) {
445
-                          $cash = number_format($p['jumlah'], 0, '.', ',');
446
-                      } else {
447
-                          $cash = 0;
448
-                      } ?>
449
-                    <th style="text-align: right;"><?=$cash; ?></th>
444
+                          if ($p[jumlah]) {
445
+                              $cash = number_format($p['jumlah'], 0, '.', ',');
446
+                          } else {
447
+                              $cash = 0;
448
+                          } ?>
449
+                        <th style="text-align: right;"><?=$cash; ?></th>
450 450
                     <th style="text-align: left;">Credit</th>
451 451
 
452 452
                     <?php
453 453
 
454 454
 
455
-                    $pSQL = "SELECT  sum(a.jumlah) as jumlah 
455
+                        $pSQL = "SELECT  sum(a.jumlah) as jumlah 
456 456
 
457 457
                            FROM kasir_detail a LEFT JOIN jenis_transaksi b
458 458
 
@@ -480,15 +480,15 @@  discard block
 block discarded – undo
480 480
 
481 481
                            ";
482 482
 
483
-                      $ptampil = mysql_query($pSQL);
483
+                          $ptampil = mysql_query($pSQL);
484 484
 
485
-                      $p = mysql_fetch_array($ptampil);
485
+                          $p = mysql_fetch_array($ptampil);
486 486
 
487
-                      if ($p[jumlah]) {
488
-                          $credit = number_format($p['jumlah'], 0, '.', ',');
489
-                      } else {
490
-                          $credit = 0;
491
-                      } ?>
487
+                          if ($p[jumlah]) {
488
+                              $credit = number_format($p['jumlah'], 0, '.', ',');
489
+                          } else {
490
+                              $credit = 0;
491
+                          } ?>
492 492
 
493 493
                     <th style="text-align: right;"><?=$credit; ?></th>
494 494
                     <th colspan="4"></th>
@@ -496,12 +496,12 @@  discard block
 block discarded – undo
496 496
 
497 497
 
498 498
                <?php
499
-                  }
499
+                      }
500 500
 
501
-               ?> 
501
+                   ?> 
502 502
 
503 503
                <?php if ($id_shift == '%') {
504
-                   ?>
504
+                       ?>
505 505
                <tr>
506 506
                     <th></th>
507 507
                     <th></th>
@@ -510,7 +510,7 @@  discard block
 block discarded – undo
510 510
                     <?php
511 511
 
512 512
 
513
-                    $pSQL = "SELECT  sum(a.jumlah) as jumlah 
513
+                        $pSQL = "SELECT  sum(a.jumlah) as jumlah 
514 514
 
515 515
                            FROM kasir_detail a LEFT JOIN jenis_transaksi b
516 516
 
@@ -537,22 +537,22 @@  discard block
 block discarded – undo
537 537
 
538 538
                            ";
539 539
 
540
-                   $ptampil = mysql_query($pSQL);
540
+                       $ptampil = mysql_query($pSQL);
541 541
 
542
-                   $p = mysql_fetch_array($ptampil);
542
+                       $p = mysql_fetch_array($ptampil);
543 543
 
544
-                   if ($p[jumlah]) {
545
-                       $cash = number_format($p['jumlah'], 0, '.', ',');
546
-                   } else {
547
-                       $cash = 0;
548
-                   } ?>
549
-                    <th style="text-align: right;"><?=$cash; ?></th>
544
+                       if ($p[jumlah]) {
545
+                           $cash = number_format($p['jumlah'], 0, '.', ',');
546
+                       } else {
547
+                           $cash = 0;
548
+                       } ?>
549
+                        <th style="text-align: right;"><?=$cash; ?></th>
550 550
                     <th style="text-align: left;">Credit</th>
551 551
 
552 552
                     <?php
553 553
 
554 554
 
555
-                    $pSQL = "SELECT  sum(a.jumlah) as jumlah 
555
+                        $pSQL = "SELECT  sum(a.jumlah) as jumlah 
556 556
 
557 557
                            FROM kasir_detail a LEFT JOIN jenis_transaksi b
558 558
 
@@ -578,22 +578,22 @@  discard block
 block discarded – undo
578 578
 
579 579
                            ";
580 580
 
581
-                   $ptampil = mysql_query($pSQL);
581
+                       $ptampil = mysql_query($pSQL);
582 582
 
583
-                   $p = mysql_fetch_array($ptampil);
583
+                       $p = mysql_fetch_array($ptampil);
584 584
 
585
-                   if ($p[jumlah]) {
586
-                       $credit = number_format($p['jumlah'], 0, '.', ',');
587
-                   } else {
588
-                       $credit = 0;
589
-                   } ?>
585
+                       if ($p[jumlah]) {
586
+                           $credit = number_format($p['jumlah'], 0, '.', ',');
587
+                       } else {
588
+                           $credit = 0;
589
+                       } ?>
590 590
 
591 591
                     <th style="text-align: right;"><?=$credit; ?></th>
592 592
                     <th colspan="4"></th>
593 593
                     </tr> 
594 594
 
595 595
                 <?php
596
-               } ?>
596
+                   } ?>
597 597
 
598 598
                  <tr><td colspan="12">&nbsp</td></tr>  
599 599
 
@@ -614,7 +614,7 @@  discard block
 block discarded – undo
614 614
                 <?php
615 615
 
616 616
 
617
-                    $pSQL = "SELECT  sum(a.jumlah) as jumlah 
617
+                        $pSQL = "SELECT  sum(a.jumlah) as jumlah 
618 618
 
619 619
                            FROM kasir_detail a LEFT JOIN jenis_transaksi b
620 620
 
@@ -640,17 +640,17 @@  discard block
 block discarded – undo
640 640
 
641 641
                            ";
642 642
 
643
-                        $ptampil = mysql_query($pSQL);
643
+                            $ptampil = mysql_query($pSQL);
644 644
 
645
-                        $p = mysql_fetch_array($ptampil);
645
+                            $p = mysql_fetch_array($ptampil);
646 646
 
647
-                             if ($p[jumlah]) {
648
-                                 $total = number_format($p['jumlah'], 0, '.', ',');
649
-                             } else {
650
-                                 $total = 0;
651
-                             }
647
+                                 if ($p[jumlah]) {
648
+                                     $total = number_format($p['jumlah'], 0, '.', ',');
649
+                                 } else {
650
+                                     $total = 0;
651
+                                 }
652 652
 
653
-              ?>
653
+                  ?>
654 654
 
655 655
 
656 656
                 <tr>
Please login to merge, or discard this patch.
modul/mod_report_rujukan_pasien/print_report_rujukan_pasien.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 
167 167
 <?php
168 168
 $gtampil = mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
169
- $g = mysql_fetch_array($gtampil);
169
+    $g = mysql_fetch_array($gtampil);
170 170
 
171 171
 if ($g['pict']) {
172 172
     $pict = $g['pict'];
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
                          <?php
214 214
 
215 215
 
216
-                         $tampil = mysql_query("SELECT a.*,b.nama,b.tgl_lahir,b.ktp,c.poli,d.kategori    
216
+                            $tampil = mysql_query("SELECT a.*,b.nama,b.tgl_lahir,b.ktp,c.poli,d.kategori    
217 217
                                                 ,e.rujukan as rujukan_rs
218 218
                                                 ,f.rujukan as rujukan_lab                              
219 219
                                             FROM kunjungan_berobat a left join pasien b 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 $id = $r['id_modul'];
13 13
 $fa_icon = $r['fa_icon'];
14 14
 
15
-if ($r[orientation] == 'P') {
15
+if ($r[orientation]=='P') {
16 16
     $orientation = 'portrait';
17 17
 } else {
18 18
     $orientation = 'landscape';
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 
140 140
 <!--<body onload="cetakspk()">-->
141 141
 
142
-<?php if ($_GET['printto'] == '2') {
142
+<?php if ($_GET['printto']=='2') {
143 143
     ?>
144 144
 <body onload="icetak()">
145 145
 <?php
Please login to merge, or discard this patch.
Switch Indentation   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -1,30 +1,30 @@  discard block
 block discarded – undo
1
-<?php
2
-include './../../config/koneksi.php';
3
-include './../../config/fungsi_indobulan.php';
1
+    <?php
2
+    include './../../config/koneksi.php';
3
+    include './../../config/fungsi_indobulan.php';
4 4
 
5
-$tampil = mysql_query("SELECT * FROM modul WHERE id_modul ='".$_GET[report_id]."'");
5
+    $tampil = mysql_query("SELECT * FROM modul WHERE id_modul ='".$_GET[report_id]."'");
6 6
 
7
-$r = mysql_fetch_array($tampil);
7
+    $r = mysql_fetch_array($tampil);
8 8
 
9
-$module = $_GET['module'];
10
-$imodule = ucwords($r['nama_modul']);
11
-$nmmodule = ucwords($r['nama_modul']);
12
-$id = $r['id_modul'];
13
-$fa_icon = $r['fa_icon'];
9
+    $module = $_GET['module'];
10
+    $imodule = ucwords($r['nama_modul']);
11
+    $nmmodule = ucwords($r['nama_modul']);
12
+    $id = $r['id_modul'];
13
+    $fa_icon = $r['fa_icon'];
14 14
 
15
-if ($r[orientation] == 'P') {
16
-    $orientation = 'portrait';
15
+    if ($r[orientation] == 'P') {
16
+        $orientation = 'portrait';
17 17
 } else {
18
-    $orientation = 'landscape';
18
+        $orientation = 'landscape';
19 19
 }
20 20
 
21
-$fdate = $_GET['fdate'];
22
-$ldate = $_GET['ldate'];
21
+    $fdate = $_GET['fdate'];
22
+    $ldate = $_GET['ldate'];
23 23
 
24
-$ftgl = date('d/m/Y', strtotime($_GET['fdate']));
25
-$ltgl = date('d/m/Y', strtotime($_GET['ldate']));
24
+    $ftgl = date('d/m/Y', strtotime($_GET['fdate']));
25
+    $ltgl = date('d/m/Y', strtotime($_GET['ldate']));
26 26
 
27
-?>
27
+    ?>
28 28
 
29 29
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
30 30
 <html xmlns="http://www.w3.org/1999/xhtml"><head>
@@ -140,14 +140,14 @@  discard block
 block discarded – undo
140 140
 <!--<body onload="cetakspk()">-->
141 141
 
142 142
 <?php if ($_GET['printto'] == '2') {
143
-    ?>
144
-<body onload="icetak()">
145
-<?php
146
-} else {
147 143
         ?>
148
-<body>
149
-<?php
150
-    } ?>
144
+    <body onload="icetak()">
145
+    <?php
146
+} else {
147
+            ?>
148
+    <body>
149
+    <?php
150
+        } ?>
151 151
 
152 152
 
153 153
    <div class="noprint themeborderleft themeborderright themebordertop themeborderbottom"  >
@@ -165,17 +165,17 @@  discard block
 block discarded – undo
165 165
 
166 166
 
167 167
 <?php
168
-$gtampil = mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
169
- $g = mysql_fetch_array($gtampil);
168
+    $gtampil = mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
169
+     $g = mysql_fetch_array($gtampil);
170 170
 
171
-if ($g['pict']) {
172
-    $pict = $g['pict'];
171
+    if ($g['pict']) {
172
+        $pict = $g['pict'];
173 173
 } else {
174
-    $pict = '';
174
+        $pict = '';
175 175
 }
176 176
 
177
-$company = ucwords($g['company']);
178
-?>
177
+    $company = ucwords($g['company']);
178
+    ?>
179 179
 
180 180
  <table width='100%' style="padding-top:10px;">
181 181
 <tr>
@@ -184,8 +184,8 @@  discard block
 block discarded – undo
184 184
 </td>
185 185
 <td style="text-align:center;" width='80%'>
186 186
 <span class='h1'><?=$nmmodule; ?></span>
187
-<?php echo "<span class='h2'>".$g['company'].'</span><br>'; ?>
188
-<br>Periode : <?=$ftgl; ?> - <?=$ltgl; ?>
187
+    <?php echo "<span class='h2'>".$g['company'].'</span><br>'; ?>
188
+    <br>Periode : <?=$ftgl; ?> - <?=$ltgl; ?>
189 189
 </td>
190 190
 <td width='10%'>
191 191
 &nbsp
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
                          <?php
214 214
 
215 215
 
216
-                         $tampil = mysql_query("SELECT a.*,b.nama,b.tgl_lahir,b.ktp,c.poli,d.kategori    
216
+                             $tampil = mysql_query("SELECT a.*,b.nama,b.tgl_lahir,b.ktp,c.poli,d.kategori    
217 217
                                                 ,e.rujukan as rujukan_rs
218 218
                                                 ,f.rujukan as rujukan_lab                              
219 219
                                             FROM kunjungan_berobat a left join pasien b 
@@ -232,24 +232,24 @@  discard block
 block discarded – undo
232 232
                                              AND a.rujukan = 'Y'                    
233 233
                                              ORDER BY a.tanggal,a.id_poli,a.no_urut ASC");
234 234
 
235
-                        $no = 1;
235
+                            $no = 1;
236 236
 
237
-                        while ($r = mysql_fetch_array($tampil)) {
238
-                            $tgl = date('d/m/Y', strtotime($r[tanggal]));
239
-                            $tgl_lahir = date('d/m/Y', strtotime($r[tgl_lahir]));
237
+                            while ($r = mysql_fetch_array($tampil)) {
238
+                                $tgl = date('d/m/Y', strtotime($r[tanggal]));
239
+                                $tgl_lahir = date('d/m/Y', strtotime($r[tgl_lahir]));
240 240
 
241
-                            echo'<tr>';
242
-                            echo"<td>$tgl</td>";
243
-                            echo"<td>$r[poli]</td>";
244
-                            echo"<td>$r[nama]</td>";
245
-                            echo"<td>$r[kategori]</td>";
246
-                            echo"<td>$r[rujukan_rs]</td>";
247
-                            echo"<td>$r[rujukan_lab]</td>";
241
+                                echo'<tr>';
242
+                                echo"<td>$tgl</td>";
243
+                                echo"<td>$r[poli]</td>";
244
+                                echo"<td>$r[nama]</td>";
245
+                                echo"<td>$r[kategori]</td>";
246
+                                echo"<td>$r[rujukan_rs]</td>";
247
+                                echo"<td>$r[rujukan_lab]</td>";
248 248
 
249
-                            echo'</tr>';
250
-                            $no++;
251
-                        }
252
-                        ?>
249
+                                echo'</tr>';
250
+                                $no++;
251
+                            }
252
+                            ?>
253 253
 
254 254
                       
255 255
 
Please login to merge, or discard this patch.
modul/mod_user/xform_user.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
121 121
                  <select name="groups" class="form-control" required >
122 122
                           <option value=''></option>
123 123
                     <?php
124
-                      $query = mysql_query('SELECT * FROM groups ORDER BY groups');
124
+                        $query = mysql_query('SELECT * FROM groups ORDER BY groups');
125 125
     if ($query && mysql_num_rows($query) > 0) {
126 126
         while ($row = mysql_fetch_object($query)) {
127 127
             echo '<option value="'.$row->id_groups.'"';
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
     if ($id) {
63 63
         $query = mysql_query('SELECT * FROM user WHERE id_user = "'.$id.'"');
64
-        if ($query && mysql_num_rows($query) == 1) {
64
+        if ($query && mysql_num_rows($query)==1) {
65 65
             $data = mysql_fetch_object($query);
66 66
         } else {
67 67
             die('Data user tidak ditemukan');
@@ -122,10 +122,10 @@  discard block
 block discarded – undo
122 122
                           <option value=''></option>
123 123
                     <?php
124 124
                       $query = mysql_query('SELECT * FROM groups ORDER BY groups');
125
-    if ($query && mysql_num_rows($query) > 0) {
125
+    if ($query && mysql_num_rows($query)>0) {
126 126
         while ($row = mysql_fetch_object($query)) {
127 127
             echo '<option value="'.$row->id_groups.'"';
128
-            if ($row->id_groups == @$data->id_groups) {
128
+            if ($row->id_groups==@$data->id_groups) {
129 129
                 echo ' selected';
130 130
             }
131 131
             echo '>'.$row->groups.'</option>';
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
                 <?php if ($data->id_user) {
143 143
         ?>
144 144
 
145
-                    <?php if ($data->r_input == 'Y') {
145
+                    <?php if ($data->r_input=='Y') {
146 146
             ?>  
147 147
                         <input checked type='checkbox' class='flat' value='Y' name='r_input' >&nbsp;<label>Input</label>  &nbsp; 
148 148
                     <?php
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
                     <?php
153 153
         } ?>  
154 154
                     
155
-                    <?php if ($data->r_edit == 'Y') {
155
+                    <?php if ($data->r_edit=='Y') {
156 156
             ?>  
157 157
                         <input checked type='checkbox' class='flat' value='Y' name='r_edit' >&nbsp;<label>Edit</label>  &nbsp; 
158 158
                     <?php
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
                     <?php
163 163
         } ?>         
164 164
                     
165
-                    <?php if ($data->r_delete == 'Y') {
165
+                    <?php if ($data->r_delete=='Y') {
166 166
             ?>  
167 167
                         <input checked type='checkbox' class='flat' value='Y' name='r_delete' >&nbsp;<label>Delete</label>  &nbsp; 
168 168
                     <?php
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
           <?php if ($id) {
188 188
         ?>  
189 189
     
190
-            <?php if (@$data->aktif == 'Y') {
190
+            <?php if (@$data->aktif=='Y') {
191 191
             ?>
192 192
           
193 193
                 <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Aktif :</label>
Please login to merge, or discard this patch.
Switch Indentation   +68 added lines, -68 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
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'; ?>
6
+        include './../../config/koneksi.php'; ?>
7 7
 <!doctype html>
8 8
 <html>
9 9
 <head>
@@ -50,35 +50,35 @@  discard block
 block discarded – undo
50 50
 <body style='background-color:#fff;'>
51 51
 <?php
52 52
 
53
-$modul = $_GET['module'];
54
-    $title = $_GET['title'];
53
+    $modul = $_GET['module'];
54
+        $title = $_GET['title'];
55 55
 
56
-    $role = $_SESSION['role'];
56
+        $role = $_SESSION['role'];
57 57
 
58
-    $id_module = $_GET['id_module'];
58
+        $id_module = $_GET['id_module'];
59 59
 
60
-    $id = $_GET['id_user']; // isset($_GET['id_user']) ? intval($_GET['id_user']) : false;
60
+        $id = $_GET['id_user']; // isset($_GET['id_user']) ? intval($_GET['id_user']) : false;
61 61
 
62
-    if ($id) {
63
-        $query = mysql_query('SELECT * FROM user WHERE id_user = "'.$id.'"');
64
-        if ($query && mysql_num_rows($query) == 1) {
65
-            $data = mysql_fetch_object($query);
66
-        } else {
67
-            die('Data user tidak ditemukan');
62
+        if ($id) {
63
+            $query = mysql_query('SELECT * FROM user WHERE id_user = "'.$id.'"');
64
+            if ($query && mysql_num_rows($query) == 1) {
65
+                $data = mysql_fetch_object($query);
66
+            } else {
67
+                die('Data user tidak ditemukan');
68
+            }
68 69
         }
69
-    }
70 70
 
71
-    if ($_GET['igroup']) {
72
-        $group = $_GET['igroup'];
73
-    } else {
74
-        $group = $data->id_groups;
75
-    }
71
+        if ($_GET['igroup']) {
72
+            $group = $_GET['igroup'];
73
+        } else {
74
+            $group = $data->id_groups;
75
+        }
76 76
 
77
-    if ($_GET['imenu']) {
78
-        $imenu = $_GET['imenu'];
79
-    } else {
80
-        $imenu = $data->id_modul;
81
-    } ?>
77
+        if ($_GET['imenu']) {
78
+            $imenu = $_GET['imenu'];
79
+        } else {
80
+            $imenu = $data->id_modul;
81
+        } ?>
82 82
 
83 83
 
84 84
 <div class="ix_panel">
@@ -90,14 +90,14 @@  discard block
 block discarded – undo
90 90
             <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>User ID :</label>
91 91
               <div class="col-md-6 col-sm-6 col-xs-12" >
92 92
                  <?php if ($data->id_user) {
93
-        ?>
94
-                    <input type="text" name="id_user" value="<?php echo @$data->id_user?>" autofocus readonly required="required" class="form-control col-md-7 col-xs-12">                    
93
+            ?>
94
+                        <input type="text" name="id_user" value="<?php echo @$data->id_user?>" autofocus readonly required="required" class="form-control col-md-7 col-xs-12">                    
95 95
                    <?php
96
-    } else {
97
-        ?>
98
-                    <input type="text" name="id_user" value="<?php echo @$data->id_user?>" autofocus required="required" class="form-control col-md-7 col-xs-12"> 
96
+        } else {
97
+            ?>
98
+                        <input type="text" name="id_user" value="<?php echo @$data->id_user?>" autofocus required="required" class="form-control col-md-7 col-xs-12"> 
99 99
                     <?php
100
-    } ?>
100
+        } ?>
101 101
               </div>
102 102
           </div>
103 103
 
@@ -121,16 +121,16 @@  discard block
 block discarded – undo
121 121
                  <select name="groups" class="form-control" required >
122 122
                           <option value=''></option>
123 123
                     <?php
124
-                      $query = mysql_query('SELECT * FROM groups ORDER BY groups');
125
-    if ($query && mysql_num_rows($query) > 0) {
126
-        while ($row = mysql_fetch_object($query)) {
127
-            echo '<option value="'.$row->id_groups.'"';
128
-            if ($row->id_groups == @$data->id_groups) {
129
-                echo ' selected';
124
+                          $query = mysql_query('SELECT * FROM groups ORDER BY groups');
125
+        if ($query && mysql_num_rows($query) > 0) {
126
+            while ($row = mysql_fetch_object($query)) {
127
+                echo '<option value="'.$row->id_groups.'"';
128
+                if ($row->id_groups == @$data->id_groups) {
129
+                    echo ' selected';
130
+                }
131
+                echo '>'.$row->groups.'</option>';
130 132
             }
131
-            echo '>'.$row->groups.'</option>';
132
-        }
133
-    } ?>
133
+        } ?>
134 134
                     </select>
135 135
               </div>
136 136
   
@@ -140,55 +140,55 @@  discard block
 block discarded – undo
140 140
               <div class="col-md-6 col-sm-6 col-xs-12" >
141 141
 
142 142
                 <?php if ($data->id_user) {
143
-        ?>
144
-
143
+            ?>
144
+    
145 145
                     <?php if ($data->r_input == 'Y') {
146
-            ?>  
146
+                ?>  
147 147
                         <input checked type='checkbox' class='flat' value='Y' name='r_input' >&nbsp;<label>Input</label>  &nbsp; 
148 148
                     <?php
149
-        } else {
150
-            ?>  
149
+            } else {
150
+                ?>  
151 151
                         <input  type='checkbox'  class='flat'value='Y' name='r_input' >&nbsp;<label>Input</label>  &nbsp; 
152 152
                     <?php
153
-        } ?>  
153
+            } ?>  
154 154
                     
155 155
                     <?php if ($data->r_edit == 'Y') {
156
-            ?>  
156
+                ?>  
157 157
                         <input checked type='checkbox' class='flat' value='Y' name='r_edit' >&nbsp;<label>Edit</label>  &nbsp; 
158 158
                     <?php
159
-        } else {
160
-            ?>  
159
+            } else {
160
+                ?>  
161 161
                         <input  type='checkbox' class='flat' value='Y' name='r_edit' >&nbsp;<label>Edit</label>  &nbsp; 
162 162
                     <?php
163
-        } ?>         
163
+            } ?>         
164 164
                     
165 165
                     <?php if ($data->r_delete == 'Y') {
166
-            ?>  
166
+                ?>  
167 167
                         <input checked type='checkbox' class='flat' value='Y' name='r_delete' >&nbsp;<label>Delete</label>  &nbsp; 
168 168
                     <?php
169
-        } else {
170
-            ?>  
169
+            } else {
170
+                ?>  
171 171
                         <input  type='checkbox' class='flat' value='Y' name='r_delete' >&nbsp;<label>Delete</label>  &nbsp; 
172 172
                     <?php
173
-        } ?> 
173
+            } ?> 
174 174
                   <?php
175
-    } else {
176
-        ?>
175
+        } else {
176
+            ?>
177 177
                     
178 178
                     <input checked type='checkbox' value='Y' name='r_input' class="flat">&nbsp;<label>Input</label>  &nbsp; 
179 179
                      <input checked type='checkbox' value='Y' name='r_edit' class="flat">&nbsp;<label>Edit</label>  &nbsp; 
180 180
                      <input checked type='checkbox' value='Y' name='r_delete' class="flat">&nbsp;<label>Delete</label>  &nbsp;   
181 181
 
182 182
                   <?php
183
-    } ?>   
183
+        } ?>   
184 184
                 </div>
185 185
 
186 186
         
187 187
           <?php if ($id) {
188
-        ?>  
188
+            ?>  
189 189
     
190 190
             <?php if (@$data->aktif == 'Y') {
191
-            ?>
191
+                ?>
192 192
           
193 193
                 <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Aktif :</label>
194 194
                   <div class="col-md-6 col-sm-6 col-xs-12">
@@ -197,8 +197,8 @@  discard block
 block discarded – undo
197 197
                   </div>
198 198
               
199 199
             <?php
200
-        } else {
201
-            ?>  
200
+            } else {
201
+                ?>  
202 202
              
203 203
                 <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Aktif :</label>
204 204
                   <div class="col-md-6 col-sm-6 col-xs-12">
@@ -207,11 +207,11 @@  discard block
 block discarded – undo
207 207
                   </div>
208 208
           
209 209
              <?php
210
-        } ?>
211
-
210
+            } ?>
211
+    
212 212
         <?php
213
-    } else {
214
-        ?>  
213
+        } else {
214
+            ?>  
215 215
 
216 216
           
217 217
                 <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Aktif :</label>
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
            
223 223
 
224 224
         <?php
225
-    } ?>
225
+        } ?>
226 226
 
227 227
 
228 228
         </div>        
Please login to merge, or discard this patch.
modul/mod_user/aksi_user.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
     $userid = $_SESSION['userid'];
17 17
 
18 18
     // Hapus modul
19
-    if ($module == 'user' and $act == 'hapus') {
19
+    if ($module=='user' and $act=='hapus') {
20 20
         $id = $_GET['id'];
21 21
         $id_module = $_GET['id_module'];
22 22
 
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     }
27 27
 
28 28
     // Input group
29
-    elseif ($module == 'user' and $act == 'input') {
29
+    elseif ($module=='user' and $act=='input') {
30 30
         $id_module = $_POST['id_module'];
31 31
 
32 32
         $lokasi_file = $_FILES['fupload']['tmp_name'];
@@ -37,25 +37,25 @@  discard block
 block discarded – undo
37 37
 
38 38
         $pass = $_POST[password];
39 39
 
40
-        if ($_POST['r_input'] == 'Y') {
40
+        if ($_POST['r_input']=='Y') {
41 41
             $r_input = 'Y';
42 42
         } else {
43 43
             $r_input = 'N';
44 44
         }
45 45
 
46
-        if ($_POST['r_edit'] == 'Y') {
46
+        if ($_POST['r_edit']=='Y') {
47 47
             $r_edit = 'Y';
48 48
         } else {
49 49
             $r_edit = 'N';
50 50
         }
51 51
 
52
-        if ($_POST['r_delete'] == 'Y') {
52
+        if ($_POST['r_delete']=='Y') {
53 53
             $r_delete = 'Y';
54 54
         } else {
55 55
             $r_delete = 'N';
56 56
         }
57 57
 
58
-        if ($_POST['r_admin'] == 'Y') {
58
+        if ($_POST['r_admin']=='Y') {
59 59
             $r_admin = 'Y';
60 60
         } else {
61 61
             $r_admin = 'N';
Please login to merge, or discard this patch.
Switch Indentation   +77 added lines, -77 removed lines patch added patch discarded remove patch
@@ -1,70 +1,70 @@  discard block
 block discarded – undo
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 == 'user' and $act == 'hapus') {
20
-        $id = $_GET['id'];
21
-        $id_module = $_GET['id_module'];
18
+        // Hapus modul
19
+        if ($module == 'user' 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);
26
-    }
25
+            header('location:../../main.php?module='.$module.'&id_module='.$id_module);
26
+        }
27 27
 
28
-    // Input group
29
-    elseif ($module == 'user' and $act == 'input') {
30
-        $id_module = $_POST['id_module'];
28
+        // Input group
29
+        elseif ($module == 'user' and $act == 'input') {
30
+            $id_module = $_POST['id_module'];
31 31
 
32
-        $lokasi_file = $_FILES['fupload']['tmp_name'];
33
-        $tipe_file = $_FILES['fupload']['type'];
34
-        $nama_file = $_FILES['fupload']['name'];
35
-        $acak = rand(1, 99);
36
-        $nama_file_unik = $acak.$nama_file;
32
+            $lokasi_file = $_FILES['fupload']['tmp_name'];
33
+            $tipe_file = $_FILES['fupload']['type'];
34
+            $nama_file = $_FILES['fupload']['name'];
35
+            $acak = rand(1, 99);
36
+            $nama_file_unik = $acak.$nama_file;
37 37
 
38
-        $pass = $_POST[password];
38
+            $pass = $_POST[password];
39 39
 
40
-        if ($_POST['r_input'] == 'Y') {
41
-            $r_input = 'Y';
42
-        } else {
43
-            $r_input = 'N';
44
-        }
40
+            if ($_POST['r_input'] == 'Y') {
41
+                $r_input = 'Y';
42
+            } else {
43
+                $r_input = 'N';
44
+            }
45 45
 
46
-        if ($_POST['r_edit'] == 'Y') {
47
-            $r_edit = 'Y';
48
-        } else {
49
-            $r_edit = 'N';
50
-        }
46
+            if ($_POST['r_edit'] == 'Y') {
47
+                $r_edit = 'Y';
48
+            } else {
49
+                $r_edit = 'N';
50
+            }
51 51
 
52
-        if ($_POST['r_delete'] == 'Y') {
53
-            $r_delete = 'Y';
54
-        } else {
55
-            $r_delete = 'N';
56
-        }
52
+            if ($_POST['r_delete'] == 'Y') {
53
+                $r_delete = 'Y';
54
+            } else {
55
+                $r_delete = 'N';
56
+            }
57 57
 
58
-        if ($_POST['r_admin'] == 'Y') {
59
-            $r_admin = 'Y';
60
-        } else {
61
-            $r_admin = 'N';
62
-        }
58
+            if ($_POST['r_admin'] == 'Y') {
59
+                $r_admin = 'Y';
60
+            } else {
61
+                $r_admin = 'N';
62
+            }
63 63
 
64
-        if ($_POST['ID']) {
65
-            if (empty($_POST['password'])) {
66
-                if (empty($lokasi_file)) {
67
-                    mysql_query("UPDATE user SET  username      = '$_POST[username]'
64
+            if ($_POST['ID']) {
65
+                if (empty($_POST['password'])) {
66
+                    if (empty($lokasi_file)) {
67
+                        mysql_query("UPDATE user SET  username      = '$_POST[username]'
68 68
                        ,id_groups     = '$_POST[groups]'  
69 69
                        ,nik           = '$_POST[nik]'  
70 70
                        ,r_input     = '$r_input'  
@@ -75,9 +75,9 @@  discard block
 block discarded – undo
75 75
                        ,updby       = '$userid' 
76 76
                        ,aktif         = '$_POST[aktif]'
77 77
                      WHERE id_user        = '$_POST[ID]'");
78
-                } else {
79
-                    ProfileImage($nama_file_unik);
80
-                    mysql_query("UPDATE user SET  username      = '$_POST[username]'
78
+                    } else {
79
+                        ProfileImage($nama_file_unik);
80
+                        mysql_query("UPDATE user SET  username      = '$_POST[username]'
81 81
                        ,id_groups     = '$_POST[groups]'  
82 82
                        ,nik           = '$_POST[nik]'  
83 83
                        ,r_input     = '$r_input'  
@@ -89,16 +89,16 @@  discard block
 block discarded – undo
89 89
                          ,updby       = '$userid' 
90 90
                          ,aktif         = '$_POST[aktif]'
91 91
                      WHERE id_user        = '$_POST[ID]'");
92
+                    }
92 93
                 }
93
-            }
94
-            // Apabila password diubah
95
-            else {
94
+                // Apabila password diubah
95
+                else {
96 96
 
97
-    //$pass=md5($_POST[password]);
98
-                $pass = $_POST[password];
97
+        //$pass=md5($_POST[password]);
98
+                    $pass = $_POST[password];
99 99
 
100
-                if (empty($lokasi_file)) {
101
-                    mysql_query("UPDATE user SET password     = '$pass'
100
+                    if (empty($lokasi_file)) {
101
+                        mysql_query("UPDATE user SET password     = '$pass'
102 102
                          ,username    = '$_POST[username]'
103 103
                          ,id_groups   = '$_POST[groups]'  
104 104
                          ,nik           = '$_POST[nik]'  
@@ -110,9 +110,9 @@  discard block
 block discarded – undo
110 110
                          ,updby     = '$userid' 
111 111
                          ,aktif       = '$_POST[aktif]'      
112 112
                        WHERE id_user      = '$_POST[ID]'");
113
-                } else {
114
-                    ProfileImage($nama_file_unik);
115
-                    mysql_query("UPDATE user SET password     = '$pass'
113
+                    } else {
114
+                        ProfileImage($nama_file_unik);
115
+                        mysql_query("UPDATE user SET password     = '$pass'
116 116
                          ,username    = '$_POST[username]'
117 117
                          ,id_groups   = '$_POST[groups]'  
118 118
                          ,nik           = '$_POST[nik]'  
@@ -125,13 +125,13 @@  discard block
 block discarded – undo
125 125
                          ,updby     = '$userid' 
126 126
                          ,aktif       = '$_POST[aktif]'      
127 127
                        WHERE id_user      = '$_POST[ID]'");
128
+                    }
128 129
                 }
129
-            }
130
-        } else {
131
-            if (!empty($lokasi_file)) {
132
-                ProfileImage($nama_file_unik);
130
+            } else {
131
+                if (!empty($lokasi_file)) {
132
+                    ProfileImage($nama_file_unik);
133 133
 
134
-                mysql_query("INSERT INTO user (id_user
134
+                    mysql_query("INSERT INTO user (id_user
135 135
                         ,username
136 136
                         ,password      
137 137
                         ,nik
@@ -161,8 +161,8 @@  discard block
 block discarded – undo
161 161
                        ,'$datetime'
162 162
                        ,'$userid'
163 163
                        ,'$_POST[aktif]')");
164
-            } else {
165
-                mysql_query("INSERT INTO user (id_user
164
+                } else {
165
+                    mysql_query("INSERT INTO user (id_user
166 166
                         ,username
167 167
                         ,password     
168 168
                         ,nik 
@@ -192,10 +192,10 @@  discard block
 block discarded – undo
192 192
                        ,'$datetime'
193 193
                        ,'$userid'
194 194
                        ,'$_POST[aktif]')");
195
+                }
195 196
             }
196
-        }
197 197
 
198
-        //header('location:../../main.php?module='.$module.'&id_module='.$id_module);?>
198
+            //header('location:../../main.php?module='.$module.'&id_module='.$id_module);?>
199 199
    
200 200
   <script language="javascript">
201 201
      window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>";  
@@ -203,6 +203,6 @@  discard block
 block discarded – undo
203 203
    </script>
204 204
   
205 205
   <?php
206
-    }
206
+        }
207 207
 }
208
-?>
208
+    ?>
Please login to merge, or discard this patch.
modul/mod_user/form_user.php 3 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
                  <select name="groups" class="form-control" required >
161 161
                           <option value=''></option>
162 162
                     <?php
163
-                      $query = mysql_query('SELECT * FROM groups ORDER BY groups');
163
+                        $query = mysql_query('SELECT * FROM groups ORDER BY groups');
164 164
     if ($query && mysql_num_rows($query) > 0) {
165 165
         while ($row = mysql_fetch_object($query)) {
166 166
             echo '<option value="'.$row->id_groups.'"';
@@ -492,11 +492,11 @@  discard block
 block discarded – undo
492 492
         <!-- /editor -->
493 493
 
494 494
          <?php 
495
-         if (empty($pict)) {
496
-             $ipict = 'male.png';
497
-         } else {
498
-             $ipict = $pict;
499
-         } ?>
495
+            if (empty($pict)) {
496
+                $ipict = 'male.png';
497
+            } else {
498
+                $ipict = $pict;
499
+            } ?>
500 500
 
501 501
         <script>
502 502
           var btnCust = '<button type="button" class="btn btn-default" title="Add picture tags" ' + 
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
     if ($id) {
82 82
         $query = mysql_query('SELECT * FROM user WHERE id_user = "'.$id.'"');
83
-        if ($query && mysql_num_rows($query) == 1) {
83
+        if ($query && mysql_num_rows($query)==1) {
84 84
             $data = mysql_fetch_object($query);
85 85
         } else {
86 86
             die('Data user tidak ditemukan');
@@ -161,10 +161,10 @@  discard block
 block discarded – undo
161 161
                           <option value=''></option>
162 162
                     <?php
163 163
                       $query = mysql_query('SELECT * FROM groups ORDER BY groups');
164
-    if ($query && mysql_num_rows($query) > 0) {
164
+    if ($query && mysql_num_rows($query)>0) {
165 165
         while ($row = mysql_fetch_object($query)) {
166 166
             echo '<option value="'.$row->id_groups.'"';
167
-            if ($row->id_groups == @$data->id_groups) {
167
+            if ($row->id_groups==@$data->id_groups) {
168 168
                 echo ' selected';
169 169
             }
170 170
             echo '>'.$row->groups.'</option>';
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
                 <?php if ($data->id_user) {
182 182
         ?>
183 183
 
184
-                    <?php if ($data->r_input == 'Y') {
184
+                    <?php if ($data->r_input=='Y') {
185 185
             ?>  
186 186
                         <input checked type='checkbox' class='flat' value='Y' name='r_input' >&nbsp;<label>Input</label>  &nbsp; 
187 187
                     <?php
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
                     <?php
192 192
         } ?>  
193 193
                     
194
-                    <?php if ($data->r_edit == 'Y') {
194
+                    <?php if ($data->r_edit=='Y') {
195 195
             ?>  
196 196
                         <input checked type='checkbox' class='flat' value='Y' name='r_edit' >&nbsp;<label>Ubah</label>  &nbsp; 
197 197
                     <?php
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
                     <?php
202 202
         } ?>         
203 203
                     
204
-                    <?php if ($data->r_delete == 'Y') {
204
+                    <?php if ($data->r_delete=='Y') {
205 205
             ?>  
206 206
                         <input checked type='checkbox' class='flat' value='Y' name='r_delete' >&nbsp;<label>Hapus</label>   &nbsp; 
207 207
                     <?php
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
                     <?php
212 212
         } ?> 
213 213
 
214
-                     <?php if ($data->r_admin == 'Y') {
214
+                     <?php if ($data->r_admin=='Y') {
215 215
             ?>  
216 216
                         <input checked type='checkbox' class='flat' value='Y' name='r_admin' >&nbsp;<label>Grup Admin</label>   &nbsp; 
217 217
                     <?php
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
           <?php if ($id) {
238 238
         ?>  
239 239
     
240
-            <?php if (@$data->aktif == 'Y') {
240
+            <?php if (@$data->aktif=='Y') {
241 241
             ?>
242 242
           
243 243
                 <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Aktif :</label>
Please login to merge, or discard this patch.
Switch Indentation   +80 added lines, -80 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@  discard block
 block discarded – undo
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
-    $df_outlet = $_SESSION['outlet']; ?>
9
+        $df_outlet = $_SESSION['outlet']; ?>
10 10
 <!doctype html>
11 11
 <html>
12 12
 <head>
@@ -69,37 +69,37 @@  discard block
 block discarded – undo
69 69
 <body style='background-color:#fff;'>
70 70
 <?php
71 71
 
72
-$modul = $_GET['module'];
73
-    $title = $_GET['title'];
72
+    $modul = $_GET['module'];
73
+        $title = $_GET['title'];
74 74
 
75
-    $role = $_SESSION['role'];
75
+        $role = $_SESSION['role'];
76 76
 
77
-    $id_module = $_GET['id_module'];
77
+        $id_module = $_GET['id_module'];
78 78
 
79
-    $id = $_GET['id_user']; // isset($_GET['id_user']) ? intval($_GET['id_user']) : false;
79
+        $id = $_GET['id_user']; // isset($_GET['id_user']) ? intval($_GET['id_user']) : false;
80 80
 
81
-    if ($id) {
82
-        $query = mysql_query('SELECT * FROM user WHERE id_user = "'.$id.'"');
83
-        if ($query && mysql_num_rows($query) == 1) {
84
-            $data = mysql_fetch_object($query);
85
-        } else {
86
-            die('Data user tidak ditemukan');
81
+        if ($id) {
82
+            $query = mysql_query('SELECT * FROM user WHERE id_user = "'.$id.'"');
83
+            if ($query && mysql_num_rows($query) == 1) {
84
+                $data = mysql_fetch_object($query);
85
+            } else {
86
+                die('Data user tidak ditemukan');
87
+            }
87 88
         }
88
-    }
89 89
 
90
-    if ($_GET['igroup']) {
91
-        $group = $_GET['igroup'];
92
-    } else {
93
-        $group = $data->id_groups;
94
-    }
90
+        if ($_GET['igroup']) {
91
+            $group = $_GET['igroup'];
92
+        } else {
93
+            $group = $data->id_groups;
94
+        }
95 95
 
96
-    if ($_GET['imenu']) {
97
-        $imenu = $_GET['imenu'];
98
-    } else {
99
-        $imenu = $data->id_modul;
100
-    }
96
+        if ($_GET['imenu']) {
97
+            $imenu = $_GET['imenu'];
98
+        } else {
99
+            $imenu = $data->id_modul;
100
+        }
101 101
 
102
-    $pict = $data->pict; ?>
102
+        $pict = $data->pict; ?>
103 103
 
104 104
 
105 105
 <div class="ix_panel">
@@ -121,14 +121,14 @@  discard block
 block discarded – undo
121 121
             <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Pengguna :</label>
122 122
               <div class="col-md-6 col-sm-6 col-xs-12" >
123 123
                  <?php if ($data->id_user) {
124
-        ?>
125
-                    <input type="text" name="id_user" value="<?php echo @$data->id_user?>" autofocus readonly required="required" class="form-control">                    
124
+            ?>
125
+                        <input type="text" name="id_user" value="<?php echo @$data->id_user?>" autofocus readonly required="required" class="form-control">                    
126 126
                    <?php
127
-    } else {
128
-        ?>
129
-                    <input type="text" name="id_user" value="<?php echo @$data->id_user?>" autofocus required="required" class="form-control"> 
127
+        } else {
128
+            ?>
129
+                        <input type="text" name="id_user" value="<?php echo @$data->id_user?>" autofocus required="required" class="form-control"> 
130 130
                     <?php
131
-    } ?>
131
+        } ?>
132 132
               </div>
133 133
           </div>
134 134
 
@@ -160,16 +160,16 @@  discard block
 block discarded – undo
160 160
                  <select name="groups" class="form-control" required >
161 161
                           <option value=''></option>
162 162
                     <?php
163
-                      $query = mysql_query('SELECT * FROM groups ORDER BY groups');
164
-    if ($query && mysql_num_rows($query) > 0) {
165
-        while ($row = mysql_fetch_object($query)) {
166
-            echo '<option value="'.$row->id_groups.'"';
167
-            if ($row->id_groups == @$data->id_groups) {
168
-                echo ' selected';
163
+                          $query = mysql_query('SELECT * FROM groups ORDER BY groups');
164
+        if ($query && mysql_num_rows($query) > 0) {
165
+            while ($row = mysql_fetch_object($query)) {
166
+                echo '<option value="'.$row->id_groups.'"';
167
+                if ($row->id_groups == @$data->id_groups) {
168
+                    echo ' selected';
169
+                }
170
+                echo '>'.$row->groups.'</option>';
169 171
             }
170
-            echo '>'.$row->groups.'</option>';
171
-        }
172
-    } ?>
172
+        } ?>
173 173
                     </select>
174 174
               </div>
175 175
   
@@ -179,66 +179,66 @@  discard block
 block discarded – undo
179 179
               <div class="col-md-6 col-sm-6 col-xs-12" >
180 180
 
181 181
                 <?php if ($data->id_user) {
182
-        ?>
183
-
182
+            ?>
183
+    
184 184
                     <?php if ($data->r_input == 'Y') {
185
-            ?>  
185
+                ?>  
186 186
                         <input checked type='checkbox' class='flat' value='Y' name='r_input' >&nbsp;<label>Input</label>  &nbsp; 
187 187
                     <?php
188
-        } else {
189
-            ?>  
188
+            } else {
189
+                ?>  
190 190
                         <input  type='checkbox'  class='flat'value='Y' name='r_input' >&nbsp;<label>Input</label>  &nbsp; 
191 191
                     <?php
192
-        } ?>  
192
+            } ?>  
193 193
                     
194 194
                     <?php if ($data->r_edit == 'Y') {
195
-            ?>  
195
+                ?>  
196 196
                         <input checked type='checkbox' class='flat' value='Y' name='r_edit' >&nbsp;<label>Ubah</label>  &nbsp; 
197 197
                     <?php
198
-        } else {
199
-            ?>  
198
+            } else {
199
+                ?>  
200 200
                         <input  type='checkbox' class='flat' value='Y' name='r_edit' >&nbsp;<label>Ubah</label>  &nbsp; 
201 201
                     <?php
202
-        } ?>         
202
+            } ?>         
203 203
                     
204 204
                     <?php if ($data->r_delete == 'Y') {
205
-            ?>  
205
+                ?>  
206 206
                         <input checked type='checkbox' class='flat' value='Y' name='r_delete' >&nbsp;<label>Hapus</label>   &nbsp; 
207 207
                     <?php
208
-        } else {
209
-            ?>  
208
+            } else {
209
+                ?>  
210 210
                         <input  type='checkbox' class='flat' value='Y' name='r_delete' >&nbsp;<label>Hapus</label>   &nbsp; 
211 211
                     <?php
212
-        } ?> 
212
+            } ?> 
213 213
 
214 214
                      <?php if ($data->r_admin == 'Y') {
215
-            ?>  
215
+                ?>  
216 216
                         <input checked type='checkbox' class='flat' value='Y' name='r_admin' >&nbsp;<label>Grup Admin</label>   &nbsp; 
217 217
                     <?php
218
-        } else {
219
-            ?>  
218
+            } else {
219
+                ?>  
220 220
                         <input  type='checkbox' class='flat' value='Y' name='r_admin' >&nbsp;<label>Grup Admin</label>   &nbsp; 
221 221
                     <?php
222
-        } ?> 
222
+            } ?> 
223 223
 
224 224
                   <?php
225
-    } else {
226
-        ?>
225
+        } else {
226
+            ?>
227 227
                     
228 228
                     <input checked type='checkbox' value='Y' name='r_input' class="flat">&nbsp;<label>Input</label>  &nbsp; 
229 229
                     <input checked type='checkbox' value='Y' name='r_edit' class="flat">&nbsp;<label>Ubah</label>  &nbsp; 
230 230
                     <input checked type='checkbox' value='Y' name='r_delete' class="flat">&nbsp;<label>Hapus</label>  &nbsp;   
231 231
                     <input type = 'hidden' type='checkbox' value='N' name='r_admin' class="flat"> 
232 232
                   <?php
233
-    } ?>   
233
+        } ?>   
234 234
                 </div>
235 235
 
236 236
         
237 237
           <?php if ($id) {
238
-        ?>  
238
+            ?>  
239 239
     
240 240
             <?php if (@$data->aktif == 'Y') {
241
-            ?>
241
+                ?>
242 242
           
243 243
                 <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Aktif :</label>
244 244
                   <div class="col-md-6 col-sm-6 col-xs-12">
@@ -247,8 +247,8 @@  discard block
 block discarded – undo
247 247
                   </div>
248 248
               
249 249
             <?php
250
-        } else {
251
-            ?>  
250
+            } else {
251
+                ?>  
252 252
              
253 253
                 <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Aktif :</label>
254 254
                   <div class="col-md-6 col-sm-6 col-xs-12">
@@ -257,11 +257,11 @@  discard block
 block discarded – undo
257 257
                   </div>
258 258
           
259 259
              <?php
260
-        } ?>
261
-
260
+            } ?>
261
+    
262 262
         <?php
263
-    } else {
264
-        ?>  
263
+        } else {
264
+            ?>  
265 265
 
266 266
           
267 267
                 <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Aktif :</label>
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
            
273 273
 
274 274
         <?php
275
-    } ?>
275
+        } ?>
276 276
 
277 277
 
278 278
         </div>        
@@ -492,11 +492,11 @@  discard block
 block discarded – undo
492 492
         <!-- /editor -->
493 493
 
494 494
          <?php 
495
-         if (empty($pict)) {
496
-             $ipict = 'male.png';
497
-         } else {
498
-             $ipict = $pict;
499
-         } ?>
495
+             if (empty($pict)) {
496
+                 $ipict = 'male.png';
497
+             } else {
498
+                 $ipict = $pict;
499
+             } ?>
500 500
 
501 501
         <script>
502 502
           var btnCust = '<button type="button" class="btn btn-default" title="Add picture tags" ' + 
Please login to merge, or discard this patch.
modul/mod_kunjungan_berobat/form_kunjungan_berobat.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
                  <select required name="pasien" class="form-control">
92 92
                  <option>--Pilih Pasien--</option>                
93 93
                     <?php
94
-                      $query = mysql_query('SELECT * FROM pasien ORDER BY nama');
94
+                        $query = mysql_query('SELECT * FROM pasien ORDER BY nama');
95 95
     if ($query && mysql_num_rows($query) > 0) {
96 96
         while ($row = mysql_fetch_object($query)) {
97 97
             $pasien = $row->ktp.'-'.$row->nama;
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
                  <select name="poli" class="form-control">     
113 113
                  <option>--Pilih Poliklinik --</option>                          
114 114
                     <?php
115
-                      $query = mysql_query('SELECT * FROM poli ORDER BY poli');
115
+                        $query = mysql_query('SELECT * FROM poli ORDER BY poli');
116 116
     if ($query && mysql_num_rows($query) > 0) {
117 117
         while ($row = mysql_fetch_object($query)) {
118 118
             echo '<option value="'.$row->id_poli.'"';
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
     if ($id) {
46 46
         $query = mysql_query('SELECT * FROM kunjungan_berobat WHERE id_kunjungan_berobat = "'.$id.'"');
47
-        if ($query && mysql_num_rows($query) == 1) {
47
+        if ($query && mysql_num_rows($query)==1) {
48 48
             $data = mysql_fetch_object($query);
49 49
         } else {
50 50
             die('Data modul tidak ditemukan');
@@ -92,12 +92,12 @@  discard block
 block discarded – undo
92 92
                  <option>--Pilih Pasien--</option>                
93 93
                     <?php
94 94
                       $query = mysql_query('SELECT * FROM pasien ORDER BY nama');
95
-    if ($query && mysql_num_rows($query) > 0) {
95
+    if ($query && mysql_num_rows($query)>0) {
96 96
         while ($row = mysql_fetch_object($query)) {
97 97
             $pasien = $row->ktp.'-'.$row->nama;
98 98
 
99 99
             echo '<option value="'.$row->id_pasien.'"';
100
-            if ($row->id_pasien == @$data->id_pasien) {
100
+            if ($row->id_pasien==@$data->id_pasien) {
101 101
                 echo ' selected';
102 102
             }
103 103
             echo '>'.$pasien.'</option>';
@@ -113,10 +113,10 @@  discard block
 block discarded – undo
113 113
                  <option>--Pilih Poliklinik --</option>                          
114 114
                     <?php
115 115
                       $query = mysql_query('SELECT * FROM poli ORDER BY poli');
116
-    if ($query && mysql_num_rows($query) > 0) {
116
+    if ($query && mysql_num_rows($query)>0) {
117 117
         while ($row = mysql_fetch_object($query)) {
118 118
             echo '<option value="'.$row->id_poli.'"';
119
-            if ($row->id_poli == @$data->id_poli) {
119
+            if ($row->id_poli==@$data->id_poli) {
120 120
                 echo ' selected';
121 121
             }
122 122
             echo '>'.$row->poli.'</option>';
Please login to merge, or discard this patch.
Switch Indentation   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
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'; ?>
6
+        include './../../config/koneksi.php'; ?>
7 7
 <!doctype html>
8 8
 <html>
9 9
 <head>
@@ -33,41 +33,41 @@  discard block
 block discarded – undo
33 33
 <body style='background-color:#fff;'>
34 34
 <?php
35 35
 
36
-$modul = $_GET['module'];
37
-    $title = $_GET['title'];
38
-    $business_type = $_SESSION['business_type'];
39
-    $role = $_SESSION['role'];
36
+    $modul = $_GET['module'];
37
+        $title = $_GET['title'];
38
+        $business_type = $_SESSION['business_type'];
39
+        $role = $_SESSION['role'];
40 40
 
41
-    $id_module = $_GET['id_module'];
41
+        $id_module = $_GET['id_module'];
42 42
 
43
-    $id = isset($_GET['id_kunjungan_berobat']) ? intval($_GET['id_kunjungan_berobat']) : false;
43
+        $id = isset($_GET['id_kunjungan_berobat']) ? intval($_GET['id_kunjungan_berobat']) : false;
44 44
 
45
-    if ($id) {
46
-        $query = mysql_query('SELECT * FROM kunjungan_berobat WHERE id_kunjungan_berobat = "'.$id.'"');
47
-        if ($query && mysql_num_rows($query) == 1) {
48
-            $data = mysql_fetch_object($query);
49
-        } else {
50
-            die('Data modul tidak ditemukan');
45
+        if ($id) {
46
+            $query = mysql_query('SELECT * FROM kunjungan_berobat WHERE id_kunjungan_berobat = "'.$id.'"');
47
+            if ($query && mysql_num_rows($query) == 1) {
48
+                $data = mysql_fetch_object($query);
49
+            } else {
50
+                die('Data modul tidak ditemukan');
51
+            }
51 52
         }
52
-    }
53 53
 
54
-    if ($_GET['igroup']) {
55
-        $group = $_GET['igroup'];
56
-    } else {
57
-        $group = $data->id_kunjungan_berobat;
58
-    }
54
+        if ($_GET['igroup']) {
55
+            $group = $_GET['igroup'];
56
+        } else {
57
+            $group = $data->id_kunjungan_berobat;
58
+        }
59 59
 
60
-    if ($_GET['imenu']) {
61
-        $imenu = $_GET['imenu'];
62
-    } else {
63
-        $imenu = $data->id_modul;
64
-    }
60
+        if ($_GET['imenu']) {
61
+            $imenu = $_GET['imenu'];
62
+        } else {
63
+            $imenu = $data->id_modul;
64
+        }
65 65
 
66
-    if ($data->tanggal) {
67
-        $tanggal = $data->tanggal;
68
-    } else {
69
-        $tanggal = date('Y-m-d');
70
-    } ?>
66
+        if ($data->tanggal) {
67
+            $tanggal = $data->tanggal;
68
+        } else {
69
+            $tanggal = date('Y-m-d');
70
+        } ?>
71 71
 
72 72
 
73 73
 <div class="ix_panel">
@@ -91,18 +91,18 @@  discard block
 block discarded – undo
91 91
                  <select required name="pasien" class="form-control">
92 92
                  <option>--Pilih Pasien--</option>                
93 93
                     <?php
94
-                      $query = mysql_query('SELECT * FROM pasien ORDER BY nama');
95
-    if ($query && mysql_num_rows($query) > 0) {
96
-        while ($row = mysql_fetch_object($query)) {
97
-            $pasien = $row->ktp.'-'.$row->nama;
94
+                          $query = mysql_query('SELECT * FROM pasien ORDER BY nama');
95
+        if ($query && mysql_num_rows($query) > 0) {
96
+            while ($row = mysql_fetch_object($query)) {
97
+                $pasien = $row->ktp.'-'.$row->nama;
98 98
 
99
-            echo '<option value="'.$row->id_pasien.'"';
100
-            if ($row->id_pasien == @$data->id_pasien) {
101
-                echo ' selected';
99
+                echo '<option value="'.$row->id_pasien.'"';
100
+                if ($row->id_pasien == @$data->id_pasien) {
101
+                    echo ' selected';
102
+                }
103
+                echo '>'.$pasien.'</option>';
102 104
             }
103
-            echo '>'.$pasien.'</option>';
104
-        }
105
-    } ?>
105
+        } ?>
106 106
                     </select>
107 107
               </div>
108 108
 
@@ -112,16 +112,16 @@  discard block
 block discarded – undo
112 112
                  <select name="poli" class="form-control">     
113 113
                  <option>--Pilih Poliklinik --</option>                          
114 114
                     <?php
115
-                      $query = mysql_query('SELECT * FROM poli ORDER BY poli');
116
-    if ($query && mysql_num_rows($query) > 0) {
117
-        while ($row = mysql_fetch_object($query)) {
118
-            echo '<option value="'.$row->id_poli.'"';
119
-            if ($row->id_poli == @$data->id_poli) {
120
-                echo ' selected';
115
+                          $query = mysql_query('SELECT * FROM poli ORDER BY poli');
116
+        if ($query && mysql_num_rows($query) > 0) {
117
+            while ($row = mysql_fetch_object($query)) {
118
+                echo '<option value="'.$row->id_poli.'"';
119
+                if ($row->id_poli == @$data->id_poli) {
120
+                    echo ' selected';
121
+                }
122
+                echo '>'.$row->poli.'</option>';
121 123
             }
122
-            echo '>'.$row->poli.'</option>';
123
-        }
124
-    } ?>
124
+        } ?>
125 125
                     </select>
126 126
               </div>
127 127
 
Please login to merge, or discard this patch.
modul/mod_kunjungan_berobat/aksi_kunjungan_berobat.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     $business_type = $_SESSION['business_type'];
18 18
 
19 19
     // Hapus modul
20
-    if ($module == 'kunjungan_berobat' and $act == 'hapus') {
20
+    if ($module=='kunjungan_berobat' and $act=='hapus') {
21 21
         $id = $_GET['id'];
22 22
         $id_module = $_GET['id_module'];
23 23
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     }
35 35
 
36 36
     // Input group
37
-    elseif ($module == 'kunjungan_berobat' and $act == 'input') {
37
+    elseif ($module=='kunjungan_berobat' and $act=='input') {
38 38
         $id_module = $_POST['id_module'];
39 39
 
40 40
         if ($_POST['ID']) {
Please login to merge, or discard this patch.
Switch Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -1,29 +1,29 @@  discard block
 block discarded – undo
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 == 'kunjungan_berobat' and $act == 'hapus') {
21
-        $id = $_GET['id'];
22
-        $id_module = $_GET['id_module'];
19
+        // Hapus modul
20
+        if ($module == 'kunjungan_berobat' 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,34 +31,34 @@  discard block
 block discarded – undo
31 31
    </script>
32 32
   
33 33
   <?php
34
-    }
34
+        }
35 35
 
36
-    // Input group
37
-    elseif ($module == 'kunjungan_berobat' and $act == 'input') {
38
-        $id_module = $_POST['id_module'];
36
+        // Input group
37
+        elseif ($module == 'kunjungan_berobat' and $act == 'input') {
38
+            $id_module = $_POST['id_module'];
39 39
 
40
-        if ($_POST['ID']) {
41
-            mysql_query("UPDATE kunjungan_berobat SET tanggal   = '$_POST[tanggal]'
40
+            if ($_POST['ID']) {
41
+                mysql_query("UPDATE kunjungan_berobat SET tanggal   = '$_POST[tanggal]'
42 42
                     ,id_pasien   = '$_POST[pasien]'
43 43
                     ,id_poli   = '$_POST[poli]'    
44 44
                     ,upddt   = '$datetime' 
45 45
                     ,updby   = '$userid' 
46 46
                     ,aktif     = '$_POST[aktif]'  
47 47
                  WHERE id_kunjungan_berobat    = '$_POST[ID]'");
48
-        } else {
49
-            $sql = mysql_query("select no_urut from kunjungan_berobat 
48
+            } else {
49
+                $sql = mysql_query("select no_urut from kunjungan_berobat 
50 50
                      where tanggal='$_POST[tanggal]' 
51 51
                      and id_poli   = '$_POST[poli]'   ");
52 52
 
53
-            $r = mysql_fetch_array($sql);
53
+                $r = mysql_fetch_array($sql);
54 54
 
55
-            if ($r['no_urut']) {
56
-                $no_urut = $r['no_urut'] + 1;
57
-            } else {
58
-                $no_urut = 1;
59
-            }
55
+                if ($r['no_urut']) {
56
+                    $no_urut = $r['no_urut'] + 1;
57
+                } else {
58
+                    $no_urut = 1;
59
+                }
60 60
 
61
-            mysql_query("INSERT INTO kunjungan_berobat(tanggal
61
+                mysql_query("INSERT INTO kunjungan_berobat(tanggal
62 62
                     ,no_urut
63 63
                    ,id_pasien
64 64
                    ,id_poli
@@ -74,9 +74,9 @@  discard block
 block discarded – undo
74 74
                   ,'$userid'
75 75
                   ,'$datetime'
76 76
                   ,'$userid')");
77
-        }
77
+            }
78 78
 
79
-        //header('location:../../main.php?module='.$module.'&id_module='.$id_module);?>
79
+            //header('location:../../main.php?module='.$module.'&id_module='.$id_module);?>
80 80
    
81 81
   <script language="javascript">
82 82
      window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>";  
@@ -84,6 +84,6 @@  discard block
 block discarded – undo
84 84
    </script>
85 85
   
86 86
   <?php
87
-    }
87
+        }
88 88
 }
89
-?>
89
+    ?>
Please login to merge, or discard this patch.
modul/mod_groupmodul/form_groupmodul.php 3 patches
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
               <div class="col-md-6 col-sm-6 col-xs-12" >
74 74
                  <select name="igroup" class="form-control" autofocus >
75 75
 				    <?php
76
-                       $query = mysql_query('SELECT * FROM groups ORDER BY groups');
76
+                        $query = mysql_query('SELECT * FROM groups ORDER BY groups');
77 77
     if ($query && mysql_num_rows($query) > 0) {
78 78
         while ($row = mysql_fetch_object($query)) {
79 79
             echo '<option value="'.$row->id_groups.'"';
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     } ?>>
97 97
 				          <option value=''></option>
98 98
 				    <?php
99
-                       $query = mysql_query("SELECT * FROM modul WHERE status_menu = 'M' AND aktif = 'Y' ORDER BY urutan ASC");
99
+                        $query = mysql_query("SELECT * FROM modul WHERE status_menu = 'M' AND aktif = 'Y' ORDER BY urutan ASC");
100 100
     if ($query && mysql_num_rows($query) > 0) {
101 101
         while ($row = mysql_fetch_object($query)) {
102 102
             echo '<option value="'.$row->id_modul.'"';
@@ -123,13 +123,13 @@  discard block
 block discarded – undo
123 123
               <div class="col-md-6 col-sm-6 col-xs-12" >
124 124
                  <?php
125 125
 
126
-                   $iquery = mysql_query("SELECT * FROM modul WHERE status_menu = 'C' AND aktif = 'Y' AND parentid= '$imenu' ORDER BY urutan ASC");
126
+                    $iquery = mysql_query("SELECT * FROM modul WHERE status_menu = 'C' AND aktif = 'Y' AND parentid= '$imenu' ORDER BY urutan ASC");
127 127
     $irow = mysql_fetch_object($iquery); ?>     
128 128
 				      
129 129
 				        <?php 
130
-                           //echo"<div id='iframe'>";
131
-                         if ($id) {
132
-                             $query = mysql_query("SELECT DISTINCT a.*
130
+                            //echo"<div id='iframe'>";
131
+                            if ($id) {
132
+                                $query = mysql_query("SELECT DISTINCT a.*
133 133
 				                       ,CASE WHEN ifnull(b.id_groupmodul,0) = '0' THEN 0 ELSE 1 END as flag
134 134
 				                        FROM modul a left join groupmodul b
135 135
 				                        ON b.id_groups = '$group'
@@ -137,38 +137,38 @@  discard block
 block discarded – undo
137 137
 				                          WHERE a.status_menu = 'C' AND a.aktif = 'Y' AND a.parentid = '$imenu'
138 138
 				                        ORDER BY a.urutan ASC");
139 139
 
140
-                             if ($query && mysql_num_rows($query) > 0) {
141
-                                 $no = 1;
142
-                                 while ($row = mysql_fetch_object($query)) {
143
-                                     $status = $row->status_menu;
140
+                                if ($query && mysql_num_rows($query) > 0) {
141
+                                    $no = 1;
142
+                                    while ($row = mysql_fetch_object($query)) {
143
+                                        $status = $row->status_menu;
144 144
 
145
-                                     if ($row->flag == '1') {
146
-                                         echo"<input checked type='checkbox' value='id".$no."'  name='id".$no."' style='width:12px;'>";
147
-                                     } else {
148
-                                         echo"<input type='checkbox' value='id".$no."'  name='id".$no."' style='width:12px;'>";
149
-                                     }
145
+                                        if ($row->flag == '1') {
146
+                                            echo"<input checked type='checkbox' value='id".$no."'  name='id".$no."' style='width:12px;'>";
147
+                                        } else {
148
+                                            echo"<input type='checkbox' value='id".$no."'  name='id".$no."' style='width:12px;'>";
149
+                                        }
150 150
 
151
-                                     echo"<input type='hidden' name='modul".$no."' value='".$row->id_modul."'>".$row->nama_modul.'</br>';
151
+                                        echo"<input type='hidden' name='modul".$no."' value='".$row->id_modul."'>".$row->nama_modul.'</br>';
152 152
 
153
-                                     $no++;
154
-                                 }
155
-                             }
156
-                         } else {
157
-                             $query = mysql_query("SELECT * FROM modul WHERE status_menu = 'C' AND aktif = 'Y' AND parentid= '$imenu' ORDER BY urutan ASC");
153
+                                        $no++;
154
+                                    }
155
+                                }
156
+                            } else {
157
+                                $query = mysql_query("SELECT * FROM modul WHERE status_menu = 'C' AND aktif = 'Y' AND parentid= '$imenu' ORDER BY urutan ASC");
158 158
 
159
-                             if ($query && mysql_num_rows($query) > 0) {
160
-                                 $no = 1;
161
-                                 while ($row = mysql_fetch_object($query)) {
162
-                                     $status = $row->status_menu;
159
+                                if ($query && mysql_num_rows($query) > 0) {
160
+                                    $no = 1;
161
+                                    while ($row = mysql_fetch_object($query)) {
162
+                                        $status = $row->status_menu;
163 163
 
164
-                                     echo"<input checked type='checkbox' value='id".$no."'  name='id".$no."' style='width:12px;'>
164
+                                        echo"<input checked type='checkbox' value='id".$no."'  name='id".$no."' style='width:12px;'>
165 165
 				              <input type='hidden' name='modul".$no."' value='".$row->id_modul."'>
166 166
 				               ".$row->nama_modul.'</br>';
167 167
 
168
-                                     $no++;
169
-                                 }
170
-                             }
171
-                         }
168
+                                        $no++;
169
+                                    }
170
+                                }
171
+                            }
172 172
     //echo"</div>";
173 173
 
174 174
                     ?>
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
     if ($id) {
45 45
         $query = mysql_query('SELECT * FROM groupmodul WHERE id_groupmodul = "'.$id.'"');
46
-        if ($query && mysql_num_rows($query) == 1) {
46
+        if ($query && mysql_num_rows($query)==1) {
47 47
             $data = mysql_fetch_object($query);
48 48
         } else {
49 49
             die('Data groupmodul tidak ditemukan');
@@ -74,10 +74,10 @@  discard block
 block discarded – undo
74 74
                  <select name="igroup" class="form-control" autofocus >
75 75
 				    <?php
76 76
                        $query = mysql_query('SELECT * FROM groups ORDER BY groups');
77
-    if ($query && mysql_num_rows($query) > 0) {
77
+    if ($query && mysql_num_rows($query)>0) {
78 78
         while ($row = mysql_fetch_object($query)) {
79 79
             echo '<option value="'.$row->id_groups.'"';
80
-            if ($row->id_groups == @$data->id_groups) {
80
+            if ($row->id_groups==@$data->id_groups) {
81 81
                 echo ' selected';
82 82
             }
83 83
             echo '>'.$row->groups.'</option>';
@@ -97,10 +97,10 @@  discard block
 block discarded – undo
97 97
 				          <option value=''></option>
98 98
 				    <?php
99 99
                        $query = mysql_query("SELECT * FROM modul WHERE status_menu = 'M' AND aktif = 'Y' ORDER BY urutan ASC");
100
-    if ($query && mysql_num_rows($query) > 0) {
100
+    if ($query && mysql_num_rows($query)>0) {
101 101
         while ($row = mysql_fetch_object($query)) {
102 102
             echo '<option value="'.$row->id_modul.'"';
103
-            if ($imenu == $row->id_modul) {
103
+            if ($imenu==$row->id_modul) {
104 104
                 echo ' selected';
105 105
             }
106 106
             echo '>'.$row->nama_modul.'</option>';
@@ -137,12 +137,12 @@  discard block
 block discarded – undo
137 137
 				                          WHERE a.status_menu = 'C' AND a.aktif = 'Y' AND a.parentid = '$imenu'
138 138
 				                        ORDER BY a.urutan ASC");
139 139
 
140
-                             if ($query && mysql_num_rows($query) > 0) {
140
+                             if ($query && mysql_num_rows($query)>0) {
141 141
                                  $no = 1;
142 142
                                  while ($row = mysql_fetch_object($query)) {
143 143
                                      $status = $row->status_menu;
144 144
 
145
-                                     if ($row->flag == '1') {
145
+                                     if ($row->flag=='1') {
146 146
                                          echo"<input checked type='checkbox' value='id".$no."'  name='id".$no."' style='width:12px;'>";
147 147
                                      } else {
148 148
                                          echo"<input type='checkbox' value='id".$no."'  name='id".$no."' style='width:12px;'>";
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
                          } else {
157 157
                              $query = mysql_query("SELECT * FROM modul WHERE status_menu = 'C' AND aktif = 'Y' AND parentid= '$imenu' ORDER BY urutan ASC");
158 158
 
159
-                             if ($query && mysql_num_rows($query) > 0) {
159
+                             if ($query && mysql_num_rows($query)>0) {
160 160
                                  $no = 1;
161 161
                                  while ($row = mysql_fetch_object($query)) {
162 162
                                      $status = $row->status_menu;
Please login to merge, or discard this patch.
Switch Indentation   +75 added lines, -75 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
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'; ?>
6
+        include './../../config/koneksi.php'; ?>
7 7
 <!doctype html>
8 8
 <html>
9 9
 <head>
@@ -33,34 +33,34 @@  discard block
 block discarded – undo
33 33
 <body style='background-color:#fff;'>
34 34
 <?php
35 35
 
36
-$modul = $_GET['module'];
37
-    $title = $_GET['title'];
38
-    $business_type = $_SESSION['business_type'];
36
+    $modul = $_GET['module'];
37
+        $title = $_GET['title'];
38
+        $business_type = $_SESSION['business_type'];
39 39
 
40
-    $id_module = $_GET['id_module'];
40
+        $id_module = $_GET['id_module'];
41 41
 
42
-    $id = $_GET['id_groupmodul']; // isset($_GET['id_groupmodul']) ? intval($_GET['id_groupmodul']) : false;
42
+        $id = $_GET['id_groupmodul']; // isset($_GET['id_groupmodul']) ? intval($_GET['id_groupmodul']) : false;
43 43
 
44
-    if ($id) {
45
-        $query = mysql_query('SELECT * FROM groupmodul WHERE id_groupmodul = "'.$id.'"');
46
-        if ($query && mysql_num_rows($query) == 1) {
47
-            $data = mysql_fetch_object($query);
48
-        } else {
49
-            die('Data groupmodul tidak ditemukan');
44
+        if ($id) {
45
+            $query = mysql_query('SELECT * FROM groupmodul WHERE id_groupmodul = "'.$id.'"');
46
+            if ($query && mysql_num_rows($query) == 1) {
47
+                $data = mysql_fetch_object($query);
48
+            } else {
49
+                die('Data groupmodul tidak ditemukan');
50
+            }
50 51
         }
51
-    }
52 52
 
53
-    if ($_GET['igroup']) {
54
-        $group = $_GET['igroup'];
55
-    } else {
56
-        $group = $data->id_groups;
57
-    }
53
+        if ($_GET['igroup']) {
54
+            $group = $_GET['igroup'];
55
+        } else {
56
+            $group = $data->id_groups;
57
+        }
58 58
 
59
-    if ($_GET['imenu']) {
60
-        $imenu = $_GET['imenu'];
61
-    } else {
62
-        $imenu = $data->id_modul;
63
-    } ?>
59
+        if ($_GET['imenu']) {
60
+            $imenu = $_GET['imenu'];
61
+        } else {
62
+            $imenu = $data->id_modul;
63
+        } ?>
64 64
 
65 65
 
66 66
 <div class="ix_panel">
@@ -73,16 +73,16 @@  discard block
 block discarded – undo
73 73
               <div class="col-md-6 col-sm-6 col-xs-12" >
74 74
                  <select name="igroup" class="form-control" autofocus >
75 75
 				    <?php
76
-                       $query = mysql_query('SELECT * FROM groups ORDER BY groups');
77
-    if ($query && mysql_num_rows($query) > 0) {
78
-        while ($row = mysql_fetch_object($query)) {
79
-            echo '<option value="'.$row->id_groups.'"';
80
-            if ($row->id_groups == @$data->id_groups) {
81
-                echo ' selected';
76
+                           $query = mysql_query('SELECT * FROM groups ORDER BY groups');
77
+        if ($query && mysql_num_rows($query) > 0) {
78
+            while ($row = mysql_fetch_object($query)) {
79
+                echo '<option value="'.$row->id_groups.'"';
80
+                if ($row->id_groups == @$data->id_groups) {
81
+                    echo ' selected';
82
+                }
83
+                echo '>'.$row->groups.'</option>';
82 84
             }
83
-            echo '>'.$row->groups.'</option>';
84
-        }
85
-    } ?>
85
+        } ?>
86 86
 				  </select>
87 87
               </div>
88 88
           </div>
@@ -92,20 +92,20 @@  discard block
 block discarded – undo
92 92
 	           <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Groups :</label>
93 93
               <div class="col-md-6 col-sm-6 col-xs-12" >
94 94
                  <select name="imenu" class="form-control" required  onChange="document.myform.submit();" <?php if ($id) {
95
-        ?> disabled <?php
96
-    } ?>>
95
+            ?> disabled <?php
96
+        } ?>>
97 97
 				          <option value=''></option>
98 98
 				    <?php
99
-                       $query = mysql_query("SELECT * FROM modul WHERE status_menu = 'M' AND aktif = 'Y' ORDER BY urutan ASC");
100
-    if ($query && mysql_num_rows($query) > 0) {
101
-        while ($row = mysql_fetch_object($query)) {
102
-            echo '<option value="'.$row->id_modul.'"';
103
-            if ($imenu == $row->id_modul) {
104
-                echo ' selected';
99
+                           $query = mysql_query("SELECT * FROM modul WHERE status_menu = 'M' AND aktif = 'Y' ORDER BY urutan ASC");
100
+        if ($query && mysql_num_rows($query) > 0) {
101
+            while ($row = mysql_fetch_object($query)) {
102
+                echo '<option value="'.$row->id_modul.'"';
103
+                if ($imenu == $row->id_modul) {
104
+                    echo ' selected';
105
+                }
106
+                echo '>'.$row->nama_modul.'</option>';
105 107
             }
106
-            echo '>'.$row->nama_modul.'</option>';
107
-        }
108
-    } ?>
108
+        } ?>
109 109
 				    </select>
110 110
               </div>
111 111
           </div>
@@ -123,13 +123,13 @@  discard block
 block discarded – undo
123 123
               <div class="col-md-6 col-sm-6 col-xs-12" >
124 124
                  <?php
125 125
 
126
-                   $iquery = mysql_query("SELECT * FROM modul WHERE status_menu = 'C' AND aktif = 'Y' AND parentid= '$imenu' ORDER BY urutan ASC");
127
-    $irow = mysql_fetch_object($iquery); ?>     
126
+                       $iquery = mysql_query("SELECT * FROM modul WHERE status_menu = 'C' AND aktif = 'Y' AND parentid= '$imenu' ORDER BY urutan ASC");
127
+        $irow = mysql_fetch_object($iquery); ?>     
128 128
 				      
129 129
 				        <?php 
130
-                           //echo"<div id='iframe'>";
131
-                         if ($id) {
132
-                             $query = mysql_query("SELECT DISTINCT a.*
130
+                               //echo"<div id='iframe'>";
131
+                             if ($id) {
132
+                                 $query = mysql_query("SELECT DISTINCT a.*
133 133
 				                       ,CASE WHEN ifnull(b.id_groupmodul,0) = '0' THEN 0 ELSE 1 END as flag
134 134
 				                        FROM modul a left join groupmodul b
135 135
 				                        ON b.id_groups = '$group'
@@ -137,41 +137,41 @@  discard block
 block discarded – undo
137 137
 				                          WHERE a.status_menu = 'C' AND a.aktif = 'Y' AND a.parentid = '$imenu'
138 138
 				                        ORDER BY a.urutan ASC");
139 139
 
140
-                             if ($query && mysql_num_rows($query) > 0) {
141
-                                 $no = 1;
142
-                                 while ($row = mysql_fetch_object($query)) {
143
-                                     $status = $row->status_menu;
140
+                                 if ($query && mysql_num_rows($query) > 0) {
141
+                                     $no = 1;
142
+                                     while ($row = mysql_fetch_object($query)) {
143
+                                         $status = $row->status_menu;
144 144
 
145
-                                     if ($row->flag == '1') {
146
-                                         echo"<input checked type='checkbox' value='id".$no."'  name='id".$no."' style='width:12px;'>";
147
-                                     } else {
148
-                                         echo"<input type='checkbox' value='id".$no."'  name='id".$no."' style='width:12px;'>";
149
-                                     }
145
+                                         if ($row->flag == '1') {
146
+                                             echo"<input checked type='checkbox' value='id".$no."'  name='id".$no."' style='width:12px;'>";
147
+                                         } else {
148
+                                             echo"<input type='checkbox' value='id".$no."'  name='id".$no."' style='width:12px;'>";
149
+                                         }
150 150
 
151
-                                     echo"<input type='hidden' name='modul".$no."' value='".$row->id_modul."'>".$row->nama_modul.'</br>';
151
+                                         echo"<input type='hidden' name='modul".$no."' value='".$row->id_modul."'>".$row->nama_modul.'</br>';
152 152
 
153
-                                     $no++;
153
+                                         $no++;
154
+                                     }
154 155
                                  }
155
-                             }
156
-                         } else {
157
-                             $query = mysql_query("SELECT * FROM modul WHERE status_menu = 'C' AND aktif = 'Y' AND parentid= '$imenu' ORDER BY urutan ASC");
156
+                             } else {
157
+                                 $query = mysql_query("SELECT * FROM modul WHERE status_menu = 'C' AND aktif = 'Y' AND parentid= '$imenu' ORDER BY urutan ASC");
158 158
 
159
-                             if ($query && mysql_num_rows($query) > 0) {
160
-                                 $no = 1;
161
-                                 while ($row = mysql_fetch_object($query)) {
162
-                                     $status = $row->status_menu;
159
+                                 if ($query && mysql_num_rows($query) > 0) {
160
+                                     $no = 1;
161
+                                     while ($row = mysql_fetch_object($query)) {
162
+                                         $status = $row->status_menu;
163 163
 
164
-                                     echo"<input checked type='checkbox' value='id".$no."'  name='id".$no."' style='width:12px;'>
164
+                                         echo"<input checked type='checkbox' value='id".$no."'  name='id".$no."' style='width:12px;'>
165 165
 				              <input type='hidden' name='modul".$no."' value='".$row->id_modul."'>
166 166
 				               ".$row->nama_modul.'</br>';
167 167
 
168
-                                     $no++;
168
+                                         $no++;
169
+                                     }
169 170
                                  }
170 171
                              }
171
-                         }
172
-    //echo"</div>";
172
+        //echo"</div>";
173 173
 
174
-                    ?>
174
+                        ?>
175 175
           		</div>
176 176
            </div>
177 177
 
Please login to merge, or discard this patch.
modul/mod_groupmodul/aksi_groupmodul.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     $business_type = $_SESSION['business_type'];
18 18
 
19 19
     // Hapus modul
20
-    if ($module == 'groupmodul' and $act == 'hapus') {
20
+    if ($module=='groupmodul' and $act=='hapus') {
21 21
         $id = $_GET['id'];
22 22
 
23 23
         mysql_query('DELETE FROM '.$module.' WHERE id_'.$module." = $id");
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     }
29 29
 
30 30
     // Input groupmodul
31
-    elseif ($module == 'groupmodul' and $act == 'input') {
31
+    elseif ($module=='groupmodul' and $act=='input') {
32 32
         $jum = $_POST['jum'];
33 33
 
34 34
         mysql_query("DELETE FROM groupmodul WHERE id_groups = '$_POST[groups]' AND id_modul = '$_POST[imenu]'");
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
                         ,'$userid'
49 49
                         ,'Y')");
50 50
 
51
-        for ($i = 1; $i <= $jum; $i++) {
51
+        for ($i = 1; $i<=$jum; $i++) {
52 52
             $id = $_POST['id'.$i];
53 53
             $modul = $_POST['modul'.$i];
54 54
 
Please login to merge, or discard this patch.
Switch Indentation   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -1,39 +1,39 @@  discard block
 block discarded – undo
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 == 'groupmodul' and $act == 'hapus') {
21
-        $id = $_GET['id'];
19
+        // Hapus modul
20
+        if ($module == 'groupmodul' and $act == 'hapus') {
21
+            $id = $_GET['id'];
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
-        $id_module = $_GET['id_module'];
25
+            $id_module = $_GET['id_module'];
26 26
 
27
-        header('location:../../main.php?module='.$module.'&id_module='.$id_module);
28
-    }
27
+            header('location:../../main.php?module='.$module.'&id_module='.$id_module);
28
+        }
29 29
 
30
-    // Input groupmodul
31
-    elseif ($module == 'groupmodul' and $act == 'input') {
32
-        $jum = $_POST['jum'];
30
+        // Input groupmodul
31
+        elseif ($module == 'groupmodul' and $act == 'input') {
32
+            $jum = $_POST['jum'];
33 33
 
34
-        mysql_query("DELETE FROM groupmodul WHERE id_groups = '$_POST[groups]' AND id_modul = '$_POST[imenu]'");
34
+            mysql_query("DELETE FROM groupmodul WHERE id_groups = '$_POST[groups]' AND id_modul = '$_POST[imenu]'");
35 35
 
36
-        mysql_query("INSERT INTO groupmodul(id_groups
36
+            mysql_query("INSERT INTO groupmodul(id_groups
37 37
                          ,id_modul
38 38
                         ,crtdt
39 39
                           ,crtby
@@ -48,14 +48,14 @@  discard block
 block discarded – undo
48 48
                         ,'$userid'
49 49
                         ,'Y')");
50 50
 
51
-        for ($i = 1; $i <= $jum; $i++) {
52
-            $id = $_POST['id'.$i];
53
-            $modul = $_POST['modul'.$i];
51
+            for ($i = 1; $i <= $jum; $i++) {
52
+                $id = $_POST['id'.$i];
53
+                $modul = $_POST['modul'.$i];
54 54
 
55
-            mysql_query("DELETE FROM groupmodul WHERE id_groups = '$_POST[groups]' AND id_modul = '$modul'");
55
+                mysql_query("DELETE FROM groupmodul WHERE id_groups = '$_POST[groups]' AND id_modul = '$modul'");
56 56
 
57
-            if (!empty($id)) {
58
-                mysql_query("INSERT INTO groupmodul(id_groups
57
+                if (!empty($id)) {
58
+                    mysql_query("INSERT INTO groupmodul(id_groups
59 59
                          ,id_modul
60 60
                         ,crtdt
61 61
                           ,crtby
@@ -69,10 +69,10 @@  discard block
 block discarded – undo
69 69
                         ,'$datetime'
70 70
                         ,'$userid'
71 71
                         ,'Y')");
72
+                }
72 73
             }
73
-        }
74 74
 
75
-        $id_module = $_POST['id_module']; ?>
75
+            $id_module = $_POST['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,6 +80,6 @@  discard block
 block discarded – undo
80 80
    </script>
81 81
   
82 82
   <?php
83
-    }
83
+        }
84 84
 }
85
-?>
85
+    ?>
Please login to merge, or discard this patch.