Passed
Branch master (c66316)
by Saepul
06:04
created
modul/mod_report_revenue/eprint_report_revenue.php 2 patches
Indentation   +117 added lines, -117 removed lines patch added patch discarded remove patch
@@ -9,83 +9,83 @@  discard block
 block discarded – undo
9 9
 
10 10
 function getBulan1($bln1){
11 11
 
12
-				switch ($bln1){
12
+                switch ($bln1){
13 13
 
14
-					case 1: 
14
+                    case 1: 
15 15
 
16
-						return "Januari";
16
+                        return "Januari";
17 17
 
18
-						break;
18
+                        break;
19 19
 
20
-					case 2:
20
+                    case 2:
21 21
 
22
-						return "Februari";
22
+                        return "Februari";
23 23
 
24
-						break;
24
+                        break;
25 25
 
26
-					case 3:
26
+                    case 3:
27 27
 
28
-						return "Maret";
28
+                        return "Maret";
29 29
 
30
-						break;
30
+                        break;
31 31
 
32
-					case 4:
32
+                    case 4:
33 33
 
34
-						return "April";
34
+                        return "April";
35 35
 
36
-						break;
36
+                        break;
37 37
 
38
-					case 5:
38
+                    case 5:
39 39
 
40
-						return "Mei";
40
+                        return "Mei";
41 41
 
42
-						break;
42
+                        break;
43 43
 
44
-					case 6:
44
+                    case 6:
45 45
 
46
-						return "Juni";
46
+                        return "Juni";
47 47
 
48
-						break;
48
+                        break;
49 49
 
50
-					case 7:
50
+                    case 7:
51 51
 
52
-						return "Juli";
52
+                        return "Juli";
53 53
 
54
-						break;
54
+                        break;
55 55
 
56
-					case 8:
56
+                    case 8:
57 57
 
58
-						return "Agustus";
58
+                        return "Agustus";
59 59
 
60
-						break;
60
+                        break;
61 61
 
62
-					case 9:
62
+                    case 9:
63 63
 
64
-						return "September";
64
+                        return "September";
65 65
 
66
-						break;
66
+                        break;
67 67
 
68
-					case 10:
68
+                    case 10:
69 69
 
70
-						return "Oktober";
70
+                        return "Oktober";
71 71
 
72
-						break;
72
+                        break;
73 73
 
74
-					case 11:
74
+                    case 11:
75 75
 
76
-						return "November";
76
+                        return "November";
77 77
 
78
-						break;
78
+                        break;
79 79
 
80
-					case 12:
80
+                    case 12:
81 81
 
82
-						return "Desember";
82
+                        return "Desember";
83 83
 
84
-						break;
84
+                        break;
85 85
 
86
-				}
86
+                }
87 87
 
88
-			} 
88
+            } 
89 89
 
90 90
 		
91 91
 
@@ -131,9 +131,9 @@  discard block
 block discarded – undo
131 131
 header("Content-Type: application/vnd.ms-excel");
132 132
 
133 133
 if ($tipe == 'R') {
134
-  header("Content-Disposition: attachment;filename=rekap_revenue_$nprd.xls "); 
134
+    header("Content-Disposition: attachment;filename=rekap_revenue_$nprd.xls "); 
135 135
 } else {
136
-  header("Content-Disposition: attachment;filename=detail_rekap_$nprd.xls "); 
136
+    header("Content-Disposition: attachment;filename=detail_rekap_$nprd.xls "); 
137 137
 }
138 138
 header("Content-Transfer-Encoding: binary ");	
139 139
 ?>
@@ -158,38 +158,38 @@  discard block
 block discarded – undo
158 158
 
159 159
       <?
160 160
 
161
-       $gtampil=mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
161
+        $gtampil=mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
162 162
 
163
-       $g=mysql_fetch_array($gtampil);
163
+        $g=mysql_fetch_array($gtampil);
164 164
 
165 165
 
166 166
 
167
-      if ($g['pict']) {
167
+        if ($g['pict']) {
168 168
 
169 169
         $pict = $g['pict'];
170 170
 
171
-      } else {
171
+        } else {
172 172
 
173 173
         $pict = '';
174 174
 
175
-      }
175
+        }
176 176
 
177 177
 
178
-      $company = ucwords($g['company']);
178
+        $company = ucwords($g['company']);
179 179
 
180
-      $jsql   = mysql_query("SELECT * FROM jenis_transaksi
180
+        $jsql   = mysql_query("SELECT * FROM jenis_transaksi
181 181
                             WHERE id_jenis_transaksi = '$jenis_transaksi' 
182 182
 
183 183
                            ");
184 184
 
185 185
 
186 186
 
187
-      $j     = mysql_fetch_array($jsql); 
187
+        $j     = mysql_fetch_array($jsql); 
188 188
 
189
-      $jenis_transaksi   = $j['jenis_transaksi'];  
189
+        $jenis_transaksi   = $j['jenis_transaksi'];  
190 190
 
191 191
 
192
-      $sql   = mysql_query("SELECT a.*,b.shift FROM kasir  a LEFT JOIN shift b 
192
+        $sql   = mysql_query("SELECT a.*,b.shift FROM kasir  a LEFT JOIN shift b 
193 193
                             ON a.id_shift = b.id_shift
194 194
                             WHERE a.id_kasir = '$k_ID' 
195 195
 
@@ -197,20 +197,20 @@  discard block
 block discarded – undo
197 197
 
198 198
 
199 199
 
200
-      $r     = mysql_fetch_array($sql); 
200
+        $r     = mysql_fetch_array($sql); 
201 201
 
202 202
 
203
-      $penjualan_barang   = $r['id_kasir'];  
203
+        $penjualan_barang   = $r['id_kasir'];  
204 204
 
205
-      $shift   = $r['shift'];  
205
+        $shift   = $r['shift'];  
206 206
 
207
-      $petugas   = $r['petugas'];  
207
+        $petugas   = $r['petugas'];  
208 208
 
209
-      $status   = $r['status']; 
209
+        $status   = $r['status']; 
210 210
 
211
-      $tanggal   = DATE('d/m/Y',strtotime($r['tanggal']));  
211
+        $tanggal   = DATE('d/m/Y',strtotime($r['tanggal']));  
212 212
 
213
-      ?>
213
+        ?>
214 214
 
215 215
       <? if ($tipe =='R') { ?>
216 216
 
@@ -242,11 +242,11 @@  discard block
 block discarded – undo
242 242
               
243 243
                     while ($h=mysql_fetch_array($htampil)){  
244 244
 
245
-                      echo "<tr>";
246
-                      echo "<td>".$h['jenis_transaksi']."</td>";
245
+                        echo "<tr>";
246
+                        echo "<td>".$h['jenis_transaksi']."</td>";
247 247
                       
248
-                      //transaksi umum tunai
249
-                      $dtampil=mysql_query("SELECT COUNT(c.jumlah) as jml 
248
+                        //transaksi umum tunai
249
+                        $dtampil=mysql_query("SELECT COUNT(c.jumlah) as jml 
250 250
                             , IFNULL(SUM(c.jumlah),0) as rp  
251 251
                           FROM kasir b LEFT JOIN kasir_detail c
252 252
                           ON  b.id_kasir = c.id_kasir
@@ -255,13 +255,13 @@  discard block
 block discarded – undo
255 255
                           AND c.id_jenis_transaksi = '".$h['id_jenis_transaksi']."'
256 256
                           AND b.status != '4'");
257 257
                                
258
-                     $d=mysql_fetch_array($dtampil);
258
+                        $d=mysql_fetch_array($dtampil);
259 259
 
260 260
 
261
-                     echo "<th>".$d['jml']."</th>";
262
-                     echo "<th style='text-align:right;'>".number_format($d['rp'], 0, ".", ",")."</th>";
261
+                        echo "<th>".$d['jml']."</th>";
262
+                        echo "<th style='text-align:right;'>".number_format($d['rp'], 0, ".", ",")."</th>";
263 263
 
264
-                     echo "</tr>";
264
+                        echo "</tr>";
265 265
                     }   
266 266
 
267 267
             ?>        
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
                     echo "<th style='text-align:right;'>".number_format($d['rp'], 0, ".", ",")."</th>";                   
285 285
                              
286 286
 
287
-                  ?>        
287
+                    ?>        
288 288
 
289 289
               </tr>  
290 290
 
@@ -356,11 +356,11 @@  discard block
 block discarded – undo
356 356
               
357 357
                     while ($h=mysql_fetch_array($htampil)){  
358 358
 
359
-                      echo "<th colspan='2' rowspan='2'>".$h['penjamin']."</th>";
359
+                        echo "<th colspan='2' rowspan='2'>".$h['penjamin']."</th>";
360 360
 
361 361
                     }   
362 362
 
363
-                   ?>   
363
+                    ?>   
364 364
                  
365 365
                    <th colspan ="4" >UMUM</th>  
366 366
                    <th colspan ="2" rowspan='2'>TOTAL</th>  
@@ -379,12 +379,12 @@  discard block
 block discarded – undo
379 379
                    <? 
380 380
                     for($j = 1; $j <= $hjml; $j++)  { 
381 381
 
382
-                      echo "<th>KUNJ</th>";  
383
-                      echo "<th>REV</th>";  
382
+                        echo "<th>KUNJ</th>";  
383
+                        echo "<th>REV</th>";  
384 384
 
385 385
 
386
-                     }  
387
-                   ?> 
386
+                        }  
387
+                    ?> 
388 388
 
389 389
 
390 390
                    <th>KUNJ</th>  
@@ -409,13 +409,13 @@  discard block
 block discarded – undo
409 409
                 while ($h=mysql_fetch_array($htampil)){  
410 410
 
411 411
 
412
-                 echo"<tr>";
412
+                    echo"<tr>";
413 413
 
414
-                 echo"<td>".$h['jenis_transaksi']."</td>"; 
414
+                    echo"<td>".$h['jenis_transaksi']."</td>"; 
415 415
 
416 416
 
417
-                  //transaksi asuransi
418
-                   $dtampil1=mysql_query("SELECT a.id_penjamin
417
+                    //transaksi asuransi
418
+                    $dtampil1=mysql_query("SELECT a.id_penjamin
419 419
                           , COUNT(c.jumlah) as jml 
420 420
                           , IFNULL(SUM(c.jumlah),0) as rp  
421 421
                         FROM penjamin a LEFT JOIN kasir b
@@ -431,17 +431,17 @@  discard block
 block discarded – undo
431 431
                         GROUP BY a.id_penjamin
432 432
                         ORDER BY a.id_penjamin");
433 433
                              
434
-                   while ($d1=mysql_fetch_array($dtampil1)){  
434
+                    while ($d1=mysql_fetch_array($dtampil1)){  
435 435
 
436 436
 
437
-                      echo "<td style='text-align:center;'>".$d1['jml']."</td>";
438
-                      echo "<td style='text-align:right;'>".number_format($d1['rp'], 0, ".", ",")."</td>";
437
+                        echo "<td style='text-align:center;'>".$d1['jml']."</td>";
438
+                        echo "<td style='text-align:right;'>".number_format($d1['rp'], 0, ".", ",")."</td>";
439 439
 
440
-                   }  
440
+                    }  
441 441
 
442 442
 
443 443
    
444
-                  $dtampil2=mysql_query("SELECT COUNT(c.jumlah) as jml 
444
+                    $dtampil2=mysql_query("SELECT COUNT(c.jumlah) as jml 
445 445
                                             ,   IFNULL(SUM(c.jumlah),0) as rp  
446 446
                                         FROM kasir b LEFT JOIN kasir_detail c
447 447
                                         ON  b.id_kasir = c.id_kasir
@@ -451,13 +451,13 @@  discard block
 block discarded – undo
451 451
                       AND c.id_jenis_transaksi = '".$h['id_jenis_transaksi']."'
452 452
                                         AND b.status != '4'");
453 453
                            
454
-                 $d2=mysql_fetch_array($dtampil2);
454
+                    $d2=mysql_fetch_array($dtampil2);
455 455
 
456 456
 
457
-                 echo "<td style='text-align:center;'>".$d2['jml']."</td>";
458
-                 echo "<td style='text-align:right;'>".number_format($d2['rp'], 0, ".", ",")."</td>";
457
+                    echo "<td style='text-align:center;'>".$d2['jml']."</td>";
458
+                    echo "<td style='text-align:right;'>".number_format($d2['rp'], 0, ".", ",")."</td>";
459 459
 
460
-                 $dtampil3=mysql_query("SELECT COUNT(c.jumlah) as jml 
460
+                    $dtampil3=mysql_query("SELECT COUNT(c.jumlah) as jml 
461 461
                         , IFNULL(SUM(c.jumlah),0) as rp  
462 462
                       FROM kasir b LEFT JOIN kasir_detail c
463 463
                       ON  b.id_kasir = c.id_kasir
@@ -467,15 +467,15 @@  discard block
 block discarded – undo
467 467
                       AND c.id_jenis_transaksi = '".$h['id_jenis_transaksi']."'
468 468
                       AND b.status != '4'");
469 469
                            
470
-                 $d3=mysql_fetch_array($dtampil3);
470
+                    $d3=mysql_fetch_array($dtampil3);
471 471
 
472 472
 
473
-                 echo "<td style='text-align:center;'>".$d3['jml']."</td>";
474
-                 echo "<td style='text-align:right;'>".number_format($d3['rp'], 0, ".", ",")."</td>";
473
+                    echo "<td style='text-align:center;'>".$d3['jml']."</td>";
474
+                    echo "<td style='text-align:right;'>".number_format($d3['rp'], 0, ".", ",")."</td>";
475 475
 
476 476
 
477 477
           
478
-                 $dtampil=mysql_query("SELECT COUNT(c.jumlah) as jml 
478
+                    $dtampil=mysql_query("SELECT COUNT(c.jumlah) as jml 
479 479
                             , IFNULL(SUM(c.jumlah),0) as rp  
480 480
                           FROM kasir b LEFT JOIN kasir_detail c
481 481
                           ON  b.id_kasir = c.id_kasir
@@ -484,16 +484,16 @@  discard block
 block discarded – undo
484 484
                           AND c.id_jenis_transaksi = '".$h['id_jenis_transaksi']."'
485 485
                           AND b.status != '4'");
486 486
                                
487
-                     $d=mysql_fetch_array($dtampil);
487
+                        $d=mysql_fetch_array($dtampil);
488 488
 
489 489
 
490 490
                 echo "<td style='text-align:center;'>".$d['jml']."</td>";
491 491
                 echo "<td style='text-align:right;'>".number_format($d['rp'], 0, ".", ",")."</td>";
492 492
 
493
-                 echo"</tr>";
493
+                    echo"</tr>";
494 494
 
495 495
 
496
-              } ?>
496
+                } ?>
497 497
 
498 498
             </tbody>
499 499
 
@@ -502,13 +502,13 @@  discard block
 block discarded – undo
502 502
               <?            
503 503
 
504 504
 
505
-                 echo"<tr>";
505
+                    echo"<tr>";
506 506
 
507
-                 echo"<th>TOTAL</th>"; 
507
+                    echo"<th>TOTAL</th>"; 
508 508
 
509 509
 
510
-                  //transaksi asuransi
511
-                   $dtampil1=mysql_query("SELECT a.id_penjamin
510
+                    //transaksi asuransi
511
+                    $dtampil1=mysql_query("SELECT a.id_penjamin
512 512
                           , COUNT(c.jumlah) as jml 
513 513
                           , IFNULL(SUM(c.jumlah),0) as rp  
514 514
                         FROM penjamin a LEFT JOIN kasir b
@@ -523,17 +523,17 @@  discard block
 block discarded – undo
523 523
                         GROUP BY a.id_penjamin
524 524
                         ORDER BY a.id_penjamin");
525 525
                              
526
-                   while ($d1=mysql_fetch_array($dtampil1)){  
526
+                    while ($d1=mysql_fetch_array($dtampil1)){  
527 527
 
528 528
 
529
-                      echo "<th>".$d1['jml']."</th>";
530
-                      echo "<th style='text-align:right;'>".number_format($d1['rp'], 0, ".", ",")."</th>";
529
+                        echo "<th>".$d1['jml']."</th>";
530
+                        echo "<th style='text-align:right;'>".number_format($d1['rp'], 0, ".", ",")."</th>";
531 531
 
532
-                   }  
532
+                    }  
533 533
 
534 534
 
535 535
    
536
-                  $dtampil2=mysql_query("SELECT COUNT(c.jumlah) as jml 
536
+                    $dtampil2=mysql_query("SELECT COUNT(c.jumlah) as jml 
537 537
                                             ,   IFNULL(SUM(c.jumlah),0) as rp  
538 538
                                         FROM kasir b LEFT JOIN kasir_detail c
539 539
                                         ON  b.id_kasir = c.id_kasir
@@ -542,13 +542,13 @@  discard block
 block discarded – undo
542 542
                                         WHERE b.tanggal LIKE '$prd%'
543 543
                                         AND b.status != '4'");
544 544
                            
545
-                 $d2=mysql_fetch_array($dtampil2);
545
+                    $d2=mysql_fetch_array($dtampil2);
546 546
 
547 547
 
548
-                 echo "<th>".$d2['jml']."</th>";
549
-                 echo "<th style='text-align:right;'>".number_format($d2['rp'], 0, ".", ",")."</th>";
548
+                    echo "<th>".$d2['jml']."</th>";
549
+                    echo "<th style='text-align:right;'>".number_format($d2['rp'], 0, ".", ",")."</th>";
550 550
 
551
-                 $dtampil3=mysql_query("SELECT COUNT(c.jumlah) as jml 
551
+                    $dtampil3=mysql_query("SELECT COUNT(c.jumlah) as jml 
552 552
                         , IFNULL(SUM(c.jumlah),0) as rp  
553 553
                       FROM kasir b LEFT JOIN kasir_detail c
554 554
                       ON  b.id_kasir = c.id_kasir
@@ -557,15 +557,15 @@  discard block
 block discarded – undo
557 557
                       WHERE b.tanggal LIKE '$prd%'
558 558
                       AND b.status != '4'");
559 559
                            
560
-                 $d3=mysql_fetch_array($dtampil3);
560
+                    $d3=mysql_fetch_array($dtampil3);
561 561
 
562 562
 
563
-                 echo "<th>".$d3['jml']."</th>";
564
-                 echo "<th style='text-align:right;'>".number_format($d3['rp'], 0, ".", ",")."</th>";
563
+                    echo "<th>".$d3['jml']."</th>";
564
+                    echo "<th style='text-align:right;'>".number_format($d3['rp'], 0, ".", ",")."</th>";
565 565
 
566 566
 
567 567
           
568
-                 $dtampil=mysql_query("SELECT COUNT(c.jumlah) as jml 
568
+                    $dtampil=mysql_query("SELECT COUNT(c.jumlah) as jml 
569 569
                             , IFNULL(SUM(c.jumlah),0) as rp  
570 570
                           FROM kasir b LEFT JOIN kasir_detail c
571 571
                           ON  b.id_kasir = c.id_kasir
@@ -573,16 +573,16 @@  discard block
 block discarded – undo
573 573
                           WHERE b.tanggal like '$prd%'
574 574
                           AND b.status != '4'");
575 575
                                
576
-                     $d=mysql_fetch_array($dtampil);
576
+                        $d=mysql_fetch_array($dtampil);
577 577
 
578 578
 
579 579
                 echo "<th>".$d['jml']."</th>";
580 580
                 echo "<th style='text-align:right;'>".number_format($d['rp'], 0, ".", ",")."</th>";
581 581
 
582
-                 echo"</tr>";
582
+                    echo"</tr>";
583 583
 
584 584
 
585
-             ?>
585
+                ?>
586 586
 
587 587
       
588 588
 
@@ -601,13 +601,13 @@  discard block
 block discarded – undo
601 601
         $month = DATE('m',strtotime($iprd))*1;
602 602
 
603 603
         if ($month == '1') {
604
-          $imonth = 12;
604
+            $imonth = 12;
605 605
         } else {
606
-          $imonth = $month-1;
606
+            $imonth = $month-1;
607 607
         }
608 608
 
609
-      $nprd = $lastday.' '.getBulan1($imonth).' '.$year;
610
-      ?>
609
+        $nprd = $lastday.' '.getBulan1($imonth).' '.$year;
610
+        ?>
611 611
 
612 612
       <table width="100%">
613 613
           <tr>
Please login to merge, or discard this patch.
Spacing   +63 added lines, -63 removed lines patch added patch discarded remove patch
@@ -7,9 +7,9 @@  discard block
 block discarded – undo
7 7
 include "./../../config/koneksi.php";
8 8
 //include "./../../config/fungsi_indobulan.php";
9 9
 
10
-function getBulan1($bln1){
10
+function getBulan1($bln1) {
11 11
 
12
-				switch ($bln1){
12
+				switch ($bln1) {
13 13
 
14 14
 					case 1: 
15 15
 
@@ -90,11 +90,11 @@  discard block
 block discarded – undo
90 90
 		
91 91
 
92 92
 $report_id = $_GET[report_id];
93
-$tampil=mysql_query("SELECT * FROM modul WHERE id_modul ='".$report_id."'");
93
+$tampil = mysql_query("SELECT * FROM modul WHERE id_modul ='".$report_id."'");
94 94
 
95 95
             
96 96
 
97
-$r=mysql_fetch_array($tampil);
97
+$r = mysql_fetch_array($tampil);
98 98
 
99 99
 //module=$module&report_id=$report_id&k_ID=$k_ID
100 100
 
@@ -102,35 +102,35 @@  discard block
 block discarded – undo
102 102
 
103 103
 $imodule  = ucwords($r['nama_modul']);
104 104
 
105
-$nmmodule   = ucwords($r['nama_modul']);
105
+$nmmodule = ucwords($r['nama_modul']);
106 106
 
107
-$id       = $r['id_modul'];
107
+$id = $r['id_modul'];
108 108
 
109
-$fa_icon    = $r['fa_icon'];
109
+$fa_icon = $r['fa_icon'];
110 110
 
111 111
 
112
-$prd  = $_GET['prd'];
112
+$prd = $_GET['prd'];
113 113
 $tipe  = $_GET['tipe'];
114 114
 
115 115
 $iprd  = $_GET['prd'].'-01';
116 116
 
117
-$nm_month = DATE('F Y',strtotime($iprd));
117
+$nm_month = DATE('F Y', strtotime($iprd));
118 118
 
119
-$year = DATE('Y',strtotime($iprd));
120
-$month = DATE('m',strtotime($iprd))*1;
119
+$year = DATE('Y', strtotime($iprd));
120
+$month = DATE('m', strtotime($iprd)) * 1;
121 121
 
122 122
 $nprd = getBulan1($month).' '.$year;
123 123
 
124 124
 
125 125
 
126 126
 
127
-$jenis_transaksi  = $_GET['jenis_transaksi'];
127
+$jenis_transaksi = $_GET['jenis_transaksi'];
128 128
  
129 129
 header("Content-Type: application/octet-stream");
130 130
 header("Content-Type: application/download");
131 131
 header("Content-Type: application/vnd.ms-excel");
132 132
 
133
-if ($tipe == 'R') {
133
+if ($tipe=='R') {
134 134
   header("Content-Disposition: attachment;filename=rekap_revenue_$nprd.xls "); 
135 135
 } else {
136 136
   header("Content-Disposition: attachment;filename=detail_rekap_$nprd.xls "); 
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 <meta charset="utf-8">
144 144
 <meta http-equiv="X-UA-Compatible" content="IE=edge">
145 145
 <link rel="shortcut icon" type="image/x-icon" href="../images/favicon.png">
146
-<title><?php echo $imodule ;?> (<?php echo $nprd;?>)</title>
146
+<title><?php echo $imodule; ?> (<?php echo $nprd; ?>)</title>
147 147
 
148 148
 <!-- Tell the browser to be responsive to screen width -->
149 149
 <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
@@ -158,9 +158,9 @@  discard block
 block discarded – undo
158 158
 
159 159
       <?
160 160
 
161
-       $gtampil=mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
161
+       $gtampil = mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
162 162
 
163
-       $g=mysql_fetch_array($gtampil);
163
+       $g = mysql_fetch_array($gtampil);
164 164
 
165 165
 
166 166
 
@@ -177,19 +177,19 @@  discard block
 block discarded – undo
177 177
 
178 178
       $company = ucwords($g['company']);
179 179
 
180
-      $jsql   = mysql_query("SELECT * FROM jenis_transaksi
180
+      $jsql = mysql_query("SELECT * FROM jenis_transaksi
181 181
                             WHERE id_jenis_transaksi = '$jenis_transaksi' 
182 182
 
183 183
                            ");
184 184
 
185 185
 
186 186
 
187
-      $j     = mysql_fetch_array($jsql); 
187
+      $j = mysql_fetch_array($jsql); 
188 188
 
189
-      $jenis_transaksi   = $j['jenis_transaksi'];  
189
+      $jenis_transaksi = $j['jenis_transaksi'];  
190 190
 
191 191
 
192
-      $sql   = mysql_query("SELECT a.*,b.shift FROM kasir  a LEFT JOIN shift b 
192
+      $sql = mysql_query("SELECT a.*,b.shift FROM kasir  a LEFT JOIN shift b 
193 193
                             ON a.id_shift = b.id_shift
194 194
                             WHERE a.id_kasir = '$k_ID' 
195 195
 
@@ -197,30 +197,30 @@  discard block
 block discarded – undo
197 197
 
198 198
 
199 199
 
200
-      $r     = mysql_fetch_array($sql); 
200
+      $r = mysql_fetch_array($sql); 
201 201
 
202 202
 
203
-      $penjualan_barang   = $r['id_kasir'];  
203
+      $penjualan_barang = $r['id_kasir'];  
204 204
 
205
-      $shift   = $r['shift'];  
205
+      $shift = $r['shift'];  
206 206
 
207
-      $petugas   = $r['petugas'];  
207
+      $petugas = $r['petugas'];  
208 208
 
209
-      $status   = $r['status']; 
209
+      $status = $r['status']; 
210 210
 
211
-      $tanggal   = DATE('d/m/Y',strtotime($r['tanggal']));  
211
+      $tanggal = DATE('d/m/Y', strtotime($r['tanggal']));  
212 212
 
213 213
       ?>
214 214
 
215
-      <? if ($tipe =='R') { ?>
215
+      <? if ($tipe=='R') { ?>
216 216
 
217 217
 
218 218
         <table width="100%">
219 219
           <tr>
220 220
           <td style="text-align: center;" colspan="3">
221
-          <center><h4 >REVENUE <?=$company;?>         
221
+          <center><h4 >REVENUE <?=$company; ?>         
222 222
           <BR>
223
-          PER : <?php echo $nprd;?>
223
+          PER : <?php echo $nprd; ?>
224 224
           </h4></center>
225 225
           </td>
226 226
           </tr>      
@@ -236,17 +236,17 @@  discard block
 block discarded – undo
236 236
 
237 237
 
238 238
             <?
239
-            $htampil=mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' ORDER BY id_jenis_transaksi");
239
+            $htampil = mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' ORDER BY id_jenis_transaksi");
240 240
 
241 241
                     $hjml = mysql_num_rows($htampil);
242 242
               
243
-                    while ($h=mysql_fetch_array($htampil)){  
243
+                    while ($h = mysql_fetch_array($htampil)) {  
244 244
 
245 245
                       echo "<tr>";
246 246
                       echo "<td>".$h['jenis_transaksi']."</td>";
247 247
                       
248 248
                       //transaksi umum tunai
249
-                      $dtampil=mysql_query("SELECT COUNT(c.jumlah) as jml 
249
+                      $dtampil = mysql_query("SELECT COUNT(c.jumlah) as jml 
250 250
                             , IFNULL(SUM(c.jumlah),0) as rp  
251 251
                           FROM kasir b LEFT JOIN kasir_detail c
252 252
                           ON  b.id_kasir = c.id_kasir
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
                           AND c.id_jenis_transaksi = '".$h['id_jenis_transaksi']."'
256 256
                           AND b.status != '4'");
257 257
                                
258
-                     $d=mysql_fetch_array($dtampil);
258
+                     $d = mysql_fetch_array($dtampil);
259 259
 
260 260
 
261 261
                      echo "<th>".$d['jml']."</th>";
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
              <tr>
271 271
                 <th>TOTAL</th>  
272 272
                  <?
273
-                    $dtampil=mysql_query("SELECT COUNT(c.jumlah) as jml 
273
+                    $dtampil = mysql_query("SELECT COUNT(c.jumlah) as jml 
274 274
                                   , IFNULL(SUM(c.jumlah),0) as rp  
275 275
                                 FROM kasir b LEFT JOIN kasir_detail c
276 276
                                 ON  b.id_kasir = c.id_kasir
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
                                 WHERE b.tanggal like '$prd%'
279 279
                                 AND b.status != '4'");
280 280
                                      
281
-                    $d=mysql_fetch_array($dtampil);
281
+                    $d = mysql_fetch_array($dtampil);
282 282
 
283 283
                     echo "<th>".$d['jml']."</th>";
284 284
                     echo "<th style='text-align:right;'>".number_format($d['rp'], 0, ".", ",")."</th>";                   
@@ -326,9 +326,9 @@  discard block
 block discarded – undo
326 326
           <table width="100%">
327 327
           <tr>
328 328
           <td style="text-align: center;" colspan="14">
329
-          <center><h4 >REVENUE <?=$company;?>         
329
+          <center><h4 >REVENUE <?=$company; ?>         
330 330
           <BR>
331
-          PER : <?php echo $nprd;?>
331
+          PER : <?php echo $nprd; ?>
332 332
           </h4></center></td>
333 333
           </tr>    
334 334
            
@@ -350,11 +350,11 @@  discard block
 block discarded – undo
350 350
 
351 351
                    <?
352 352
 
353
-                    $htampil=mysql_query("SELECT * FROM penjamin where aktif = 'Y' ORDER BY id_penjamin");
353
+                    $htampil = mysql_query("SELECT * FROM penjamin where aktif = 'Y' ORDER BY id_penjamin");
354 354
 
355 355
                     $hjml = mysql_num_rows($htampil);
356 356
               
357
-                    while ($h=mysql_fetch_array($htampil)){  
357
+                    while ($h = mysql_fetch_array($htampil)) {  
358 358
 
359 359
                       echo "<th colspan='2' rowspan='2'>".$h['penjamin']."</th>";
360 360
 
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
 
378 378
 
379 379
                    <? 
380
-                    for($j = 1; $j <= $hjml; $j++)  { 
380
+                    for ($j = 1; $j<=$hjml; $j++) { 
381 381
 
382 382
                       echo "<th>KUNJ</th>";  
383 383
                       echo "<th>REV</th>";  
@@ -402,11 +402,11 @@  discard block
 block discarded – undo
402 402
 
403 403
               <? 
404 404
 
405
-                $htampil=mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' ORDER BY id_jenis_transaksi");
405
+                $htampil = mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' ORDER BY id_jenis_transaksi");
406 406
 
407 407
                 $hjml = mysql_num_rows($htampil);
408 408
               
409
-                while ($h=mysql_fetch_array($htampil)){  
409
+                while ($h = mysql_fetch_array($htampil)) {  
410 410
 
411 411
 
412 412
                  echo"<tr>";
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
 
416 416
 
417 417
                   //transaksi asuransi
418
-                   $dtampil1=mysql_query("SELECT a.id_penjamin
418
+                   $dtampil1 = mysql_query("SELECT a.id_penjamin
419 419
                           , COUNT(c.jumlah) as jml 
420 420
                           , IFNULL(SUM(c.jumlah),0) as rp  
421 421
                         FROM penjamin a LEFT JOIN kasir b
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
                         GROUP BY a.id_penjamin
432 432
                         ORDER BY a.id_penjamin");
433 433
                              
434
-                   while ($d1=mysql_fetch_array($dtampil1)){  
434
+                   while ($d1 = mysql_fetch_array($dtampil1)) {  
435 435
 
436 436
 
437 437
                       echo "<td style='text-align:center;'>".$d1['jml']."</td>";
@@ -441,7 +441,7 @@  discard block
 block discarded – undo
441 441
 
442 442
 
443 443
    
444
-                  $dtampil2=mysql_query("SELECT COUNT(c.jumlah) as jml 
444
+                  $dtampil2 = mysql_query("SELECT COUNT(c.jumlah) as jml 
445 445
                                             ,   IFNULL(SUM(c.jumlah),0) as rp  
446 446
                                         FROM kasir b LEFT JOIN kasir_detail c
447 447
                                         ON  b.id_kasir = c.id_kasir
@@ -451,13 +451,13 @@  discard block
 block discarded – undo
451 451
                       AND c.id_jenis_transaksi = '".$h['id_jenis_transaksi']."'
452 452
                                         AND b.status != '4'");
453 453
                            
454
-                 $d2=mysql_fetch_array($dtampil2);
454
+                 $d2 = mysql_fetch_array($dtampil2);
455 455
 
456 456
 
457 457
                  echo "<td style='text-align:center;'>".$d2['jml']."</td>";
458 458
                  echo "<td style='text-align:right;'>".number_format($d2['rp'], 0, ".", ",")."</td>";
459 459
 
460
-                 $dtampil3=mysql_query("SELECT COUNT(c.jumlah) as jml 
460
+                 $dtampil3 = mysql_query("SELECT COUNT(c.jumlah) as jml 
461 461
                         , IFNULL(SUM(c.jumlah),0) as rp  
462 462
                       FROM kasir b LEFT JOIN kasir_detail c
463 463
                       ON  b.id_kasir = c.id_kasir
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
                       AND c.id_jenis_transaksi = '".$h['id_jenis_transaksi']."'
468 468
                       AND b.status != '4'");
469 469
                            
470
-                 $d3=mysql_fetch_array($dtampil3);
470
+                 $d3 = mysql_fetch_array($dtampil3);
471 471
 
472 472
 
473 473
                  echo "<td style='text-align:center;'>".$d3['jml']."</td>";
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
 
476 476
 
477 477
           
478
-                 $dtampil=mysql_query("SELECT COUNT(c.jumlah) as jml 
478
+                 $dtampil = mysql_query("SELECT COUNT(c.jumlah) as jml 
479 479
                             , IFNULL(SUM(c.jumlah),0) as rp  
480 480
                           FROM kasir b LEFT JOIN kasir_detail c
481 481
                           ON  b.id_kasir = c.id_kasir
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
                           AND c.id_jenis_transaksi = '".$h['id_jenis_transaksi']."'
485 485
                           AND b.status != '4'");
486 486
                                
487
-                     $d=mysql_fetch_array($dtampil);
487
+                     $d = mysql_fetch_array($dtampil);
488 488
 
489 489
 
490 490
                 echo "<td style='text-align:center;'>".$d['jml']."</td>";
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
 
509 509
 
510 510
                   //transaksi asuransi
511
-                   $dtampil1=mysql_query("SELECT a.id_penjamin
511
+                   $dtampil1 = mysql_query("SELECT a.id_penjamin
512 512
                           , COUNT(c.jumlah) as jml 
513 513
                           , IFNULL(SUM(c.jumlah),0) as rp  
514 514
                         FROM penjamin a LEFT JOIN kasir b
@@ -523,7 +523,7 @@  discard block
 block discarded – undo
523 523
                         GROUP BY a.id_penjamin
524 524
                         ORDER BY a.id_penjamin");
525 525
                              
526
-                   while ($d1=mysql_fetch_array($dtampil1)){  
526
+                   while ($d1 = mysql_fetch_array($dtampil1)) {  
527 527
 
528 528
 
529 529
                       echo "<th>".$d1['jml']."</th>";
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
533 533
 
534 534
 
535 535
    
536
-                  $dtampil2=mysql_query("SELECT COUNT(c.jumlah) as jml 
536
+                  $dtampil2 = mysql_query("SELECT COUNT(c.jumlah) as jml 
537 537
                                             ,   IFNULL(SUM(c.jumlah),0) as rp  
538 538
                                         FROM kasir b LEFT JOIN kasir_detail c
539 539
                                         ON  b.id_kasir = c.id_kasir
@@ -542,13 +542,13 @@  discard block
 block discarded – undo
542 542
                                         WHERE b.tanggal LIKE '$prd%'
543 543
                                         AND b.status != '4'");
544 544
                            
545
-                 $d2=mysql_fetch_array($dtampil2);
545
+                 $d2 = mysql_fetch_array($dtampil2);
546 546
 
547 547
 
548 548
                  echo "<th>".$d2['jml']."</th>";
549 549
                  echo "<th style='text-align:right;'>".number_format($d2['rp'], 0, ".", ",")."</th>";
550 550
 
551
-                 $dtampil3=mysql_query("SELECT COUNT(c.jumlah) as jml 
551
+                 $dtampil3 = mysql_query("SELECT COUNT(c.jumlah) as jml 
552 552
                         , IFNULL(SUM(c.jumlah),0) as rp  
553 553
                       FROM kasir b LEFT JOIN kasir_detail c
554 554
                       ON  b.id_kasir = c.id_kasir
@@ -557,7 +557,7 @@  discard block
 block discarded – undo
557 557
                       WHERE b.tanggal LIKE '$prd%'
558 558
                       AND b.status != '4'");
559 559
                            
560
-                 $d3=mysql_fetch_array($dtampil3);
560
+                 $d3 = mysql_fetch_array($dtampil3);
561 561
 
562 562
 
563 563
                  echo "<th>".$d3['jml']."</th>";
@@ -565,7 +565,7 @@  discard block
 block discarded – undo
565 565
 
566 566
 
567 567
           
568
-                 $dtampil=mysql_query("SELECT COUNT(c.jumlah) as jml 
568
+                 $dtampil = mysql_query("SELECT COUNT(c.jumlah) as jml 
569 569
                             , IFNULL(SUM(c.jumlah),0) as rp  
570 570
                           FROM kasir b LEFT JOIN kasir_detail c
571 571
                           ON  b.id_kasir = c.id_kasir
@@ -573,7 +573,7 @@  discard block
 block discarded – undo
573 573
                           WHERE b.tanggal like '$prd%'
574 574
                           AND b.status != '4'");
575 575
                                
576
-                     $d=mysql_fetch_array($dtampil);
576
+                     $d = mysql_fetch_array($dtampil);
577 577
 
578 578
 
579 579
                 echo "<th>".$d['jml']."</th>";
@@ -594,16 +594,16 @@  discard block
 block discarded – undo
594 594
 
595 595
         <? 
596 596
 
597
-        $lastday = DATE('t',strtotime($iprd));
597
+        $lastday = DATE('t', strtotime($iprd));
598 598
 
599
-        $year = DATE('Y',strtotime($iprd));
599
+        $year = DATE('Y', strtotime($iprd));
600 600
 
601
-        $month = DATE('m',strtotime($iprd))*1;
601
+        $month = DATE('m', strtotime($iprd)) * 1;
602 602
 
603
-        if ($month == '1') {
603
+        if ($month=='1') {
604 604
           $imonth = 12;
605 605
         } else {
606
-          $imonth = $month-1;
606
+          $imonth = $month - 1;
607 607
         }
608 608
 
609 609
       $nprd = $lastday.' '.getBulan1($imonth).' '.$year;
Please login to merge, or discard this patch.
modul/mod_report_revenue/report_revenue.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 $prd   = date("Y-m");
65 65
 
66 66
 $userid   = $_SESSION['userid'];  
67
-  ?>
67
+    ?>
68 68
 
69 69
  <div class="">
70 70
                    
@@ -122,12 +122,12 @@  discard block
 block discarded – undo
122 122
 
123 123
              <?
124 124
 
125
-             $module = '?module='.$_GET['module'];          
126
-             $tampil=mysql_query("SELECT id_modul as id FROM modul WHERE link='".$module."'");                       
127
-             $r=mysql_fetch_array($tampil);
125
+                $module = '?module='.$_GET['module'];          
126
+                $tampil=mysql_query("SELECT id_modul as id FROM modul WHERE link='".$module."'");                       
127
+                $r=mysql_fetch_array($tampil);
128 128
 
129
-             echo"<input type='hidden' name='report_id' id='report_id' value=".$r[id].">"; 
130
-             echo"<input type='hidden' name='module' value=".$_GET[module].">";
129
+                echo"<input type='hidden' name='report_id' id='report_id' value=".$r[id].">"; 
130
+                echo"<input type='hidden' name='module' value=".$_GET[module].">";
131 131
             ?>
132 132
             </form>    
133 133
                    
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
   }
36 36
 
37
-  xmlhttp.open("GET","<?php echo"./modul/mod_$module/getlokasi.php?q=";?>"+str,true);
37
+  xmlhttp.open("GET","<?php echo"./modul/mod_$module/getlokasi.php?q="; ?>"+str,true);
38 38
 
39 39
   xmlhttp.send();
40 40
 
@@ -54,28 +54,28 @@  discard block
 block discarded – undo
54 54
 
55 55
 
56 56
 <?php
57
-switch($_GET[act]){
57
+switch ($_GET[act]) {
58 58
 
59 59
 default:  
60 60
 
61 61
 $fdate   = date("Y-m-01");
62 62
 $ldate   = date("Y-m-d");
63 63
 
64
-$prd   = date("Y-m");
64
+$prd = date("Y-m");
65 65
 
66
-$userid   = $_SESSION['userid'];  
66
+$userid = $_SESSION['userid'];  
67 67
   ?>
68 68
 
69 69
  <div class="">
70 70
                    
71 71
         <div class="row">
72 72
 
73
-          <form name="myform" id="myform" method="get" action="<? echo"modul/mod_$module/print_$module.php";?>"  onSubmit="popup<?=$module?>(this, 'join')"> 
73
+          <form name="myform" id="myform" method="get" action="<? echo"modul/mod_$module/print_$module.php"; ?>"  onSubmit="popup<?=$module?>(this, 'join')"> 
74 74
   
75 75
                 <div class="col-md-12 col-sm-12 col-xs-12">
76 76
                     <div class="x_panel">
77 77
                         <div class="x_title">
78
-                               <h2><?=$nmmodule;?></h2>
78
+                               <h2><?=$nmmodule; ?></h2>
79 79
                                <div class='pull-right'>
80 80
                                 <Button type="submit" class="btn btn-primary">
81 81
                                  <span class="glyphicon glyphicon-print" style='color:#fff;'></span>
@@ -123,8 +123,8 @@  discard block
 block discarded – undo
123 123
              <?
124 124
 
125 125
              $module = '?module='.$_GET['module'];          
126
-             $tampil=mysql_query("SELECT id_modul as id FROM modul WHERE link='".$module."'");                       
127
-             $r=mysql_fetch_array($tampil);
126
+             $tampil = mysql_query("SELECT id_modul as id FROM modul WHERE link='".$module."'");                       
127
+             $r = mysql_fetch_array($tampil);
128 128
 
129 129
              echo"<input type='hidden' name='report_id' id='report_id' value=".$r[id].">"; 
130 130
              echo"<input type='hidden' name='module' value=".$_GET[module].">";
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
             </form>    
133 133
                    
134 134
                 </div>
135
-                <?for($i = 0; $i <= 20; $i++)  { 
135
+                <?for ($i = 0; $i<=20; $i++) { 
136 136
                     ?>
137 137
                     <br />
138 138
                     <?
Please login to merge, or discard this patch.
modul/mod_groupmodul/aksi_groupmodul.php 2 patches
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 session_start();
3 3
 if (empty($_SESSION['username']) AND empty($_SESSION['password'])){
4
-  echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
4
+    echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
5 5
 } else{
6 6
 include "./../../config/koneksi.php";
7 7
 include "./../../config/fungsi_thumb.php";
@@ -18,25 +18,25 @@  discard block
 block discarded – undo
18 18
 
19 19
 // Hapus modul
20 20
 if ($module=='groupmodul' AND $act=='hapus'){
21
-  $id = $_GET['id'];
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 25
     $id_module = $_GET['id_module'];
26 26
 
27 27
     header('location:../../main.php?module='.$module.'&id_module='.$id_module);     
28 28
    
29
- }
29
+    }
30 30
 
31
-   // Input groupmodul
31
+    // Input groupmodul
32 32
 elseif ($module=='groupmodul' AND $act=='input'){
33 33
   
34 34
    
35
-  $jum = $_POST['jum']; 
35
+    $jum = $_POST['jum']; 
36 36
   
37
-     mysql_query("DELETE FROM groupmodul WHERE id_groups = '$_POST[groups]' AND id_modul = '$_POST[imenu]'"); 
37
+        mysql_query("DELETE FROM groupmodul WHERE id_groups = '$_POST[groups]' AND id_modul = '$_POST[imenu]'"); 
38 38
   
39
-     mysql_query("INSERT INTO groupmodul(id_groups
39
+        mysql_query("INSERT INTO groupmodul(id_groups
40 40
                          ,id_modul
41 41
                         ,crtdt
42 42
                           ,crtby
@@ -54,14 +54,14 @@  discard block
 block discarded – undo
54 54
   
55 55
     for($i = 1; $i <= $jum; $i++) {    
56 56
        
57
-       $id    = $_POST['id'.$i];  
58
-       $modul = $_POST['modul'.$i];   
57
+        $id    = $_POST['id'.$i];  
58
+        $modul = $_POST['modul'.$i];   
59 59
      
60
-       mysql_query("DELETE FROM groupmodul WHERE id_groups = '$_POST[groups]' AND id_modul = '$modul'");  
60
+        mysql_query("DELETE FROM groupmodul WHERE id_groups = '$_POST[groups]' AND id_modul = '$modul'");  
61 61
         
62
-       if (!empty($id)) {
62
+        if (!empty($id)) {
63 63
        
64
-         mysql_query("INSERT INTO groupmodul(id_groups
64
+            mysql_query("INSERT INTO groupmodul(id_groups
65 65
                          ,id_modul
66 66
                         ,crtdt
67 67
                           ,crtby
@@ -75,14 +75,14 @@  discard block
 block discarded – undo
75 75
                         ,'$datetime'
76 76
                         ,'$userid'
77 77
                         ,'Y')");
78
-      }
78
+        }
79 79
       
80 80
     }
81 81
                     
82 82
    
83
-   $id_module = $_POST['id_module'];
83
+    $id_module = $_POST['id_module'];
84 84
 
85
-   ?>
85
+    ?>
86 86
    
87 87
   <script language="javascript">
88 88
      window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module";?>";  
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,23 +1,23 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 session_start();
3
-if (empty($_SESSION['username']) AND empty($_SESSION['password'])){
3
+if (empty($_SESSION['username']) AND empty($_SESSION['password'])) {
4 4
   echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
5
-} else{
5
+} else {
6 6
 include "./../../config/koneksi.php";
7 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 12
 $date     = date("d/m/Y");  
13 13
 $idate    = date("Y-m-d");
14 14
 $hour = time() - (1 * 1 * 60 * 60);
15
-$datetime   = date("Y-m-d G:i:s", $hour);
15
+$datetime = date("Y-m-d G:i:s", $hour);
16 16
 $userid   = $_SESSION['userid'];
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");
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
  }
30 30
 
31 31
    // Input groupmodul
32
-elseif ($module=='groupmodul' AND $act=='input'){
32
+elseif ($module=='groupmodul' AND $act=='input') {
33 33
   
34 34
    
35 35
   $jum = $_POST['jum']; 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
                         ,'Y')");
53 53
   
54 54
   
55
-    for($i = 1; $i <= $jum; $i++) {    
55
+    for ($i = 1; $i<=$jum; $i++) {    
56 56
        
57 57
        $id    = $_POST['id'.$i];  
58 58
        $modul = $_POST['modul'.$i];   
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
    ?>
86 86
    
87 87
   <script language="javascript">
88
-     window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module";?>";  
88
+     window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>";  
89 89
      window.parent.tb_remove();
90 90
    </script>
91 91
   
Please login to merge, or discard this patch.
modul/mod_groupmodul/groupmodul.php 3 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -60,12 +60,12 @@  discard block
 block discarded – undo
60 60
                 echo"<td><b>$r[nama_modul]</b></td>";
61 61
                 echo"<td style='text-align:center;'>$r[aktif]</td>";  
62 62
                 echo" <td  style='text-align:center;'>";
63
-   if($r_edit == 'Y') {
64
-   echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_groupmodul=$r[id_groupmodul]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>";
65
-   }            
63
+    if($r_edit == 'Y') {
64
+    echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_groupmodul=$r[id_groupmodul]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>";
65
+    }            
66 66
    
67 67
     if($r_delete == 'Y') {
68
-   echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_groupmodul]&id_module=$id' onClick=\"return confirm('Hapus Data ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
68
+    echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_groupmodul]&id_module=$id' onClick=\"return confirm('Hapus Data ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
69 69
     }
70 70
 
71 71
     echo"</td>";              
@@ -90,11 +90,11 @@  discard block
 block discarded – undo
90 90
                 echo"<td>$d[nama_modul]</td>";
91 91
                  
92 92
                 echo"<td style='text-align:center;'>$d[aktif]</td>";  
93
-   echo"<td style='text-align:right;'>";
94
-   if($r_delete == 'Y') {
95
-   echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$d[id_groupmodul]&id_module=$id' onClick=\"return confirm('Delete this record ?')\"><span class='icon'><i class='fa fa-trash'></i></span></a>";
93
+    echo"<td style='text-align:right;'>";
94
+    if($r_delete == 'Y') {
95
+    echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$d[id_groupmodul]&id_module=$id' onClick=\"return confirm('Delete this record ?')\"><span class='icon'><i class='fa fa-trash'></i></span></a>";
96 96
    
97
-   }
97
+    }
98 98
     echo"</td>";              
99 99
 
100 100
                                 echo"</tr>";
Please login to merge, or discard this patch.
Switch Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@  discard block
 block discarded – undo
2 2
 <?php
3 3
 switch($_GET[act]){
4 4
 
5
-default:  
6
-  ?>
5
+    default:  
6
+      ?>
7 7
 
8 8
  <div class="">
9 9
                    
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
                         <tbody>
44 44
                          <?
45 45
                         
46
-            $tampil=mysql_query("SELECT a.*,b.groups,c.nama_modul,c.status_menu FROM groupmodul a INNER JOIN groups b
46
+                $tampil=mysql_query("SELECT a.*,b.groups,c.nama_modul,c.status_menu FROM groupmodul a INNER JOIN groups b
47 47
                        ON a.id_groups = b.id_groups
48 48
                        INNER JOIN modul c
49 49
                        ON a.id_modul = c.id_modul
@@ -51,28 +51,28 @@  discard block
 block discarded – undo
51 51
                        ORDER BY a.id_groups,a.id_modul");
52 52
             
53 53
            
54
-                $no = 1;
55
-                                while ($r=mysql_fetch_array($tampil)){  
54
+                    $no = 1;
55
+                                    while ($r=mysql_fetch_array($tampil)){  
56 56
                 
57 57
 
58
-                                echo"<tr>";
59
-                                echo"<td><b>$r[groups]</b></td>";
60
-                echo"<td><b>$r[nama_modul]</b></td>";
61
-                echo"<td style='text-align:center;'>$r[aktif]</td>";  
62
-                echo" <td  style='text-align:center;'>";
63
-   if($r_edit == 'Y') {
64
-   echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_groupmodul=$r[id_groupmodul]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>";
65
-   }            
58
+                                    echo"<tr>";
59
+                                    echo"<td><b>$r[groups]</b></td>";
60
+                    echo"<td><b>$r[nama_modul]</b></td>";
61
+                    echo"<td style='text-align:center;'>$r[aktif]</td>";  
62
+                    echo" <td  style='text-align:center;'>";
63
+       if($r_edit == 'Y') {
64
+       echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_groupmodul=$r[id_groupmodul]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>";
65
+       }            
66 66
    
67
-    if($r_delete == 'Y') {
68
-   echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_groupmodul]&id_module=$id' onClick=\"return confirm('Hapus Data ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
69
-    }
67
+        if($r_delete == 'Y') {
68
+       echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_groupmodul]&id_module=$id' onClick=\"return confirm('Hapus Data ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
69
+        }
70 70
 
71
-    echo"</td>";              
72
-                                echo"</tr>";
71
+        echo"</td>";              
72
+                                    echo"</tr>";
73 73
                 
74 74
             
75
-            $dtampil=mysql_query("SELECT a.*,b.groups,c.nama_modul,c.status_menu FROM groupmodul a INNER JOIN groups b
75
+                $dtampil=mysql_query("SELECT a.*,b.groups,c.nama_modul,c.status_menu FROM groupmodul a INNER JOIN groups b
76 76
                        ON a.id_groups = b.id_groups
77 77
                        INNER JOIN modul c
78 78
                        ON a.id_modul = c.id_modul
@@ -82,32 +82,32 @@  discard block
 block discarded – undo
82 82
                        ORDER BY a.id_groupmodul");
83 83
             
84 84
             
85
-                                while ($d=mysql_fetch_array($dtampil)){ 
85
+                                    while ($d=mysql_fetch_array($dtampil)){ 
86 86
                 
87 87
 
88
-                                echo"<tr>";
89
-                                echo"<td></td>";
90
-                echo"<td>$d[nama_modul]</td>";
88
+                                    echo"<tr>";
89
+                                    echo"<td></td>";
90
+                    echo"<td>$d[nama_modul]</td>";
91 91
                  
92
-                echo"<td style='text-align:center;'>$d[aktif]</td>";  
93
-   echo"<td style='text-align:right;'>";
94
-   if($r_delete == 'Y') {
95
-   echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$d[id_groupmodul]&id_module=$id' onClick=\"return confirm('Delete this record ?')\"><span class='icon'><i class='fa fa-trash'></i></span></a>";
92
+                    echo"<td style='text-align:center;'>$d[aktif]</td>";  
93
+       echo"<td style='text-align:right;'>";
94
+       if($r_delete == 'Y') {
95
+       echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$d[id_groupmodul]&id_module=$id' onClick=\"return confirm('Delete this record ?')\"><span class='icon'><i class='fa fa-trash'></i></span></a>";
96 96
    
97
-   }
98
-    echo"</td>";              
97
+       }
98
+        echo"</td>";              
99 99
 
100
-                                echo"</tr>";
100
+                                    echo"</tr>";
101 101
                 
102 102
                                 
103
-                                }
103
+                                    }
104 104
                 
105 105
                 
106 106
                 
107
-                                $no++;
107
+                                    $no++;
108 108
                                 
109
-                                }
110
-                                ?>
109
+                                    }
110
+                                    ?>
111 111
                          </tbody>
112 112
                     </table>
113 113
                   </div>
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
   
2 2
 <?php
3
-switch($_GET[act]){
3
+switch ($_GET[act]) {
4 4
 
5 5
 default:  
6 6
   ?>
@@ -12,8 +12,8 @@  discard block
 block discarded – undo
12 12
                         <div class="col-md-12 col-sm-12 col-xs-12">
13 13
                             <div class="x_panel">
14 14
                                 <div class="x_title">
15
-                                    <h2><?php echo $nmmodule;?></h2>
16
-                                      <p class="pull-right"><a href='<?php echo"modul/mod_$module/form_$module.php?width=720&height=560&module=$module&id_module=$id_module&TB_iframe=true";?>' title='New <?php echo $nmmodule;?>' class='thickbox btn btn-sm btn-success'><i class="fa fa-plus"></i> New</a></p>
15
+                                    <h2><?php echo $nmmodule; ?></h2>
16
+                                      <p class="pull-right"><a href='<?php echo"modul/mod_$module/form_$module.php?width=720&height=560&module=$module&id_module=$id_module&TB_iframe=true"; ?>' title='New <?php echo $nmmodule; ?>' class='thickbox btn btn-sm btn-success'><i class="fa fa-plus"></i> New</a></p>
17 17
                                     <div class="clearfix"></div>
18 18
                                 </div>
19 19
                                 <div class="x_content">
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
                         <tbody>
44 44
                          <?
45 45
                         
46
-            $tampil=mysql_query("SELECT a.*,b.groups,c.nama_modul,c.status_menu FROM groupmodul a INNER JOIN groups b
46
+            $tampil = mysql_query("SELECT a.*,b.groups,c.nama_modul,c.status_menu FROM groupmodul a INNER JOIN groups b
47 47
                        ON a.id_groups = b.id_groups
48 48
                        INNER JOIN modul c
49 49
                        ON a.id_modul = c.id_modul
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
             
53 53
            
54 54
                 $no = 1;
55
-                                while ($r=mysql_fetch_array($tampil)){  
55
+                                while ($r = mysql_fetch_array($tampil)) {  
56 56
                 
57 57
 
58 58
                                 echo"<tr>";
@@ -60,11 +60,11 @@  discard block
 block discarded – undo
60 60
                 echo"<td><b>$r[nama_modul]</b></td>";
61 61
                 echo"<td style='text-align:center;'>$r[aktif]</td>";  
62 62
                 echo" <td  style='text-align:center;'>";
63
-   if($r_edit == 'Y') {
63
+   if ($r_edit=='Y') {
64 64
    echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_groupmodul=$r[id_groupmodul]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>";
65 65
    }            
66 66
    
67
-    if($r_delete == 'Y') {
67
+    if ($r_delete=='Y') {
68 68
    echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_groupmodul]&id_module=$id' onClick=\"return confirm('Hapus Data ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
69 69
     }
70 70
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
                                 echo"</tr>";
73 73
                 
74 74
             
75
-            $dtampil=mysql_query("SELECT a.*,b.groups,c.nama_modul,c.status_menu FROM groupmodul a INNER JOIN groups b
75
+            $dtampil = mysql_query("SELECT a.*,b.groups,c.nama_modul,c.status_menu FROM groupmodul a INNER JOIN groups b
76 76
                        ON a.id_groups = b.id_groups
77 77
                        INNER JOIN modul c
78 78
                        ON a.id_modul = c.id_modul
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
                        ORDER BY a.id_groupmodul");
83 83
             
84 84
             
85
-                                while ($d=mysql_fetch_array($dtampil)){ 
85
+                                while ($d = mysql_fetch_array($dtampil)) { 
86 86
                 
87 87
 
88 88
                                 echo"<tr>";
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
                  
92 92
                 echo"<td style='text-align:center;'>$d[aktif]</td>";  
93 93
    echo"<td style='text-align:right;'>";
94
-   if($r_delete == 'Y') {
94
+   if ($r_delete=='Y') {
95 95
    echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$d[id_groupmodul]&id_module=$id' onClick=\"return confirm('Delete this record ?')\"><span class='icon'><i class='fa fa-trash'></i></span></a>";
96 96
    
97 97
    }
Please login to merge, or discard this patch.
modul/mod_groupmodul/form_groupmodul.php 3 patches
Indentation   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?
2 2
 session_start();
3 3
 if (empty($_SESSION['username']) AND empty($_SESSION['password'])){
4
-  echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
4
+    echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
5 5
 } else{
6 6
 include "./../../config/koneksi.php";
7 7
 ?>
@@ -40,27 +40,27 @@  discard block
 block discarded – undo
40 40
 
41 41
 $id_module = $_GET['id_module']; 
42 42
 
43
-  $id = $_GET['id_groupmodul']; // isset($_GET['id_groupmodul']) ? intval($_GET['id_groupmodul']) : false;
43
+    $id = $_GET['id_groupmodul']; // isset($_GET['id_groupmodul']) ? intval($_GET['id_groupmodul']) : false;
44 44
   
45
-  if($id){
46
-     $query = mysql_query('SELECT * FROM groupmodul WHERE id_groupmodul = "'.$id.'"');
47
-     if($query && mysql_num_rows($query) == 1){
45
+    if($id){
46
+        $query = mysql_query('SELECT * FROM groupmodul WHERE id_groupmodul = "'.$id.'"');
47
+        if($query && mysql_num_rows($query) == 1){
48 48
         $data = mysql_fetch_object($query);
49
-     }else 
49
+        }else 
50 50
         die('Data groupmodul tidak ditemukan');
51
-  }
51
+    }
52 52
   
53 53
 if ($_GET['igroup']) {
54
-  $group  = $_GET['igroup'];
54
+    $group  = $_GET['igroup'];
55 55
 } else {
56
-  $group  = $data->id_groups;
56
+    $group  = $data->id_groups;
57 57
   
58 58
 }
59 59
 
60 60
 if ($_GET['imenu']) {
61
-  $imenu  = $_GET['imenu'];
61
+    $imenu  = $_GET['imenu'];
62 62
 } else {
63
-  $imenu  = $data->id_modul;  
63
+    $imenu  = $data->id_modul;  
64 64
   
65 65
 }
66 66
 
@@ -78,15 +78,15 @@  discard block
 block discarded – undo
78 78
               <div class="col-md-6 col-sm-6 col-xs-12" >
79 79
                  <select name="igroup" class="form-control" autofocus >
80 80
 				    <?
81
-				       $query = mysql_query('SELECT * FROM groups ORDER BY groups');
82
-				       if($query && mysql_num_rows($query) > 0){
83
-				        while($row = mysql_fetch_object($query)){
84
-				         echo '<option value="'.$row->id_groups.'"';
85
-				         if($row->id_groups == @$data->id_groups) echo ' selected';
86
-				         echo '>'.$row->groups.'</option>';
87
-				        }
88
-				       }     
89
-				    ?>
81
+                        $query = mysql_query('SELECT * FROM groups ORDER BY groups');
82
+                        if($query && mysql_num_rows($query) > 0){
83
+                        while($row = mysql_fetch_object($query)){
84
+                            echo '<option value="'.$row->id_groups.'"';
85
+                            if($row->id_groups == @$data->id_groups) echo ' selected';
86
+                            echo '>'.$row->groups.'</option>';
87
+                        }
88
+                        }     
89
+                    ?>
90 90
 				  </select>
91 91
               </div>
92 92
           </div>
@@ -98,15 +98,15 @@  discard block
 block discarded – undo
98 98
                  <select name="imenu" class="form-control" required  onChange="document.myform.submit();" <?php if($id) { ?> disabled <?php } ?>>
99 99
 				          <option value=''></option>
100 100
 				    <?
101
-				       $query = mysql_query("SELECT * FROM modul WHERE status_menu = 'M' AND aktif = 'Y' ORDER BY urutan ASC");
102
-				       if($query && mysql_num_rows($query) > 0){
103
-				        while($row = mysql_fetch_object($query)){
104
-				         echo '<option value="'.$row->id_modul.'"';
105
-				         if($imenu == $row->id_modul) echo ' selected';
106
-				         echo '>'.$row->nama_modul.'</option>';
107
-				        }
108
-				       }     
109
-				    ?>
101
+                        $query = mysql_query("SELECT * FROM modul WHERE status_menu = 'M' AND aktif = 'Y' ORDER BY urutan ASC");
102
+                        if($query && mysql_num_rows($query) > 0){
103
+                        while($row = mysql_fetch_object($query)){
104
+                            echo '<option value="'.$row->id_modul.'"';
105
+                            if($imenu == $row->id_modul) echo ' selected';
106
+                            echo '>'.$row->nama_modul.'</option>';
107
+                        }
108
+                        }     
109
+                    ?>
110 110
 				    </select>
111 111
               </div>
112 112
           </div>
@@ -124,14 +124,14 @@  discard block
 block discarded – undo
124 124
               <div class="col-md-6 col-sm-6 col-xs-12" >
125 125
                  <?
126 126
      
127
-				   $iquery = mysql_query("SELECT * FROM modul WHERE status_menu = 'C' AND aktif = 'Y' AND parentid= '$imenu' ORDER BY urutan ASC");
128
-				   $irow = mysql_fetch_object($iquery);
129
-				    ?>     
127
+                    $iquery = mysql_query("SELECT * FROM modul WHERE status_menu = 'C' AND aktif = 'Y' AND parentid= '$imenu' ORDER BY urutan ASC");
128
+                    $irow = mysql_fetch_object($iquery);
129
+                    ?>     
130 130
 				      
131 131
 				        <?php    
132
-				           //echo"<div id='iframe'>";
133
-				         if($id){
134
-				           $query = mysql_query("SELECT DISTINCT a.*
132
+                            //echo"<div id='iframe'>";
133
+                            if($id){
134
+                            $query = mysql_query("SELECT DISTINCT a.*
135 135
 				                       ,CASE WHEN ifnull(b.id_groupmodul,0) = '0' THEN 0 ELSE 1 END as flag
136 136
 				                        FROM modul a left join groupmodul b
137 137
 				                        ON b.id_groups = '$group'
@@ -139,48 +139,48 @@  discard block
 block discarded – undo
139 139
 				                          WHERE a.status_menu = 'C' AND a.aktif = 'Y' AND a.parentid = '$imenu'
140 140
 				                        ORDER BY a.urutan ASC");
141 141
 				                                                              
142
-				           if($query && mysql_num_rows($query) > 0){
143
-				            $no = 1; 
144
-				            while($row = mysql_fetch_object($query)){
142
+                            if($query && mysql_num_rows($query) > 0){
143
+                            $no = 1; 
144
+                            while($row = mysql_fetch_object($query)){
145 145
 				            
146
-				            $status = $row->status_menu;
146
+                            $status = $row->status_menu;
147 147
 				            
148 148
 				                     
149
-				             if ($row->flag == '1') {
150
-				               echo"<input checked type='checkbox' value='id".$no."'  name='id".$no."' style='width:12px;'>";
151
-				             } else {
152
-				               echo"<input type='checkbox' value='id".$no."'  name='id".$no."' style='width:12px;'>";
153
-				             }
149
+                                if ($row->flag == '1') {
150
+                                echo"<input checked type='checkbox' value='id".$no."'  name='id".$no."' style='width:12px;'>";
151
+                                } else {
152
+                                echo"<input type='checkbox' value='id".$no."'  name='id".$no."' style='width:12px;'>";
153
+                                }
154 154
 				          
155
-				               echo"<input type='hidden' name='modul".$no."' value='".$row->id_modul."'>".$row->nama_modul."</br>";
155
+                                echo"<input type='hidden' name='modul".$no."' value='".$row->id_modul."'>".$row->nama_modul."</br>";
156 156
 				               
157 157
 				             
158
-				            $no++;   
159
-				            }   
160
-				           }  
158
+                            $no++;   
159
+                            }   
160
+                            }  
161 161
 				           
162
-				         } else {
162
+                            } else {
163 163
 				           
164
-				           $query = mysql_query("SELECT * FROM modul WHERE status_menu = 'C' AND aktif = 'Y' AND parentid= '$imenu' ORDER BY urutan ASC");
164
+                            $query = mysql_query("SELECT * FROM modul WHERE status_menu = 'C' AND aktif = 'Y' AND parentid= '$imenu' ORDER BY urutan ASC");
165 165
 				           
166
-				           if($query && mysql_num_rows($query) > 0){
167
-				            $no = 1; 
168
-				            while($row = mysql_fetch_object($query)){
169
-				            $status = $row->status_menu;
166
+                            if($query && mysql_num_rows($query) > 0){
167
+                            $no = 1; 
168
+                            while($row = mysql_fetch_object($query)){
169
+                            $status = $row->status_menu;
170 170
 				            
171 171
 				        
172
-				             echo"<input checked type='checkbox' value='id".$no."'  name='id".$no."' style='width:12px;'>
172
+                                echo"<input checked type='checkbox' value='id".$no."'  name='id".$no."' style='width:12px;'>
173 173
 				              <input type='hidden' name='modul".$no."' value='".$row->id_modul."'>
174 174
 				               ".$row->nama_modul."</br>";
175 175
 				             
176
-				            $no++;   
177
-				            }   
178
-				           }      
176
+                            $no++;   
177
+                            }   
178
+                            }      
179 179
 				        
180
-				         }
181
-				         //echo"</div>";
180
+                            }
181
+                            //echo"</div>";
182 182
 				      
183
-				    ?>
183
+                    ?>
184 184
           		</div>
185 185
            </div>
186 186
 
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?
2 2
 session_start();
3
-if (empty($_SESSION['username']) AND empty($_SESSION['password'])){
3
+if (empty($_SESSION['username']) AND empty($_SESSION['password'])) {
4 4
   echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
5
-} else{
5
+} else {
6 6
 include "./../../config/koneksi.php";
7 7
 ?>
8 8
 <!doctype html>
@@ -42,11 +42,11 @@  discard block
 block discarded – undo
42 42
 
43 43
   $id = $_GET['id_groupmodul']; // isset($_GET['id_groupmodul']) ? intval($_GET['id_groupmodul']) : false;
44 44
   
45
-  if($id){
45
+  if ($id) {
46 46
      $query = mysql_query('SELECT * FROM groupmodul WHERE id_groupmodul = "'.$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
-     }else 
49
+     } else 
50 50
         die('Data groupmodul tidak ditemukan');
51 51
   }
52 52
   
@@ -79,10 +79,10 @@  discard block
 block discarded – undo
79 79
                  <select name="igroup" class="form-control" autofocus >
80 80
 				    <?
81 81
 				       $query = mysql_query('SELECT * FROM groups ORDER BY groups');
82
-				       if($query && mysql_num_rows($query) > 0){
83
-				        while($row = mysql_fetch_object($query)){
82
+				       if ($query && mysql_num_rows($query)>0) {
83
+				        while ($row = mysql_fetch_object($query)) {
84 84
 				         echo '<option value="'.$row->id_groups.'"';
85
-				         if($row->id_groups == @$data->id_groups) echo ' selected';
85
+				         if ($row->id_groups==@$data->id_groups) echo ' selected';
86 86
 				         echo '>'.$row->groups.'</option>';
87 87
 				        }
88 88
 				       }     
@@ -95,14 +95,14 @@  discard block
 block discarded – undo
95 95
             <div class="form-group">
96 96
 	           <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Groups :</label>
97 97
               <div class="col-md-6 col-sm-6 col-xs-12" >
98
-                 <select name="imenu" class="form-control" required  onChange="document.myform.submit();" <?php if($id) { ?> disabled <?php } ?>>
98
+                 <select name="imenu" class="form-control" required  onChange="document.myform.submit();" <?php if ($id) { ?> disabled <?php } ?>>
99 99
 				          <option value=''></option>
100 100
 				    <?
101 101
 				       $query = mysql_query("SELECT * FROM modul WHERE status_menu = 'M' AND aktif = 'Y' ORDER BY urutan ASC");
102
-				       if($query && mysql_num_rows($query) > 0){
103
-				        while($row = mysql_fetch_object($query)){
102
+				       if ($query && mysql_num_rows($query)>0) {
103
+				        while ($row = mysql_fetch_object($query)) {
104 104
 				         echo '<option value="'.$row->id_modul.'"';
105
-				         if($imenu == $row->id_modul) echo ' selected';
105
+				         if ($imenu==$row->id_modul) echo ' selected';
106 106
 				         echo '>'.$row->nama_modul.'</option>';
107 107
 				        }
108 108
 				       }     
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 				      
131 131
 				        <?php    
132 132
 				           //echo"<div id='iframe'>";
133
-				         if($id){
133
+				         if ($id) {
134 134
 				           $query = mysql_query("SELECT DISTINCT a.*
135 135
 				                       ,CASE WHEN ifnull(b.id_groupmodul,0) = '0' THEN 0 ELSE 1 END as flag
136 136
 				                        FROM modul a left join groupmodul b
@@ -139,14 +139,14 @@  discard block
 block discarded – undo
139 139
 				                          WHERE a.status_menu = 'C' AND a.aktif = 'Y' AND a.parentid = '$imenu'
140 140
 				                        ORDER BY a.urutan ASC");
141 141
 				                                                              
142
-				           if($query && mysql_num_rows($query) > 0){
142
+				           if ($query && mysql_num_rows($query)>0) {
143 143
 				            $no = 1; 
144
-				            while($row = mysql_fetch_object($query)){
144
+				            while ($row = mysql_fetch_object($query)) {
145 145
 				            
146 146
 				            $status = $row->status_menu;
147 147
 				            
148 148
 				                     
149
-				             if ($row->flag == '1') {
149
+				             if ($row->flag=='1') {
150 150
 				               echo"<input checked type='checkbox' value='id".$no."'  name='id".$no."' style='width:12px;'>";
151 151
 				             } else {
152 152
 				               echo"<input type='checkbox' value='id".$no."'  name='id".$no."' style='width:12px;'>";
@@ -163,9 +163,9 @@  discard block
 block discarded – undo
163 163
 				           
164 164
 				           $query = mysql_query("SELECT * FROM modul WHERE status_menu = 'C' AND aktif = 'Y' AND parentid= '$imenu' ORDER BY urutan ASC");
165 165
 				           
166
-				           if($query && mysql_num_rows($query) > 0){
166
+				           if ($query && mysql_num_rows($query)>0) {
167 167
 				            $no = 1; 
168
-				            while($row = mysql_fetch_object($query)){
168
+				            while ($row = mysql_fetch_object($query)) {
169 169
 				            $status = $row->status_menu;
170 170
 				            
171 171
 				        
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 
189 189
              <div class="form-group">
190 190
                <div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3" style='margin-top:20px;'>
191
-                 <input type='hidden' name='jum' value="<?php echo $no-1?>" />  
191
+                 <input type='hidden' name='jum' value="<?php echo $no - 1?>" />  
192 192
 			     <input type="hidden" name="groups" value="<?php echo $group?>" />
193 193
 			     <input type="hidden" name="imenu" value="<?php echo $imenu?>" />
194 194
 			     <input type="hidden" name="ID" value="<?php echo @$data->id_groupmodul?>" />
Please login to merge, or discard this patch.
Braces   +9 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,8 +46,9 @@  discard block
 block discarded – undo
46 46
      $query = mysql_query('SELECT * FROM groupmodul WHERE id_groupmodul = "'.$id.'"');
47 47
      if($query && mysql_num_rows($query) == 1){
48 48
         $data = mysql_fetch_object($query);
49
-     }else 
50
-        die('Data groupmodul tidak ditemukan');
49
+     } else {
50
+             die('Data groupmodul tidak ditemukan');
51
+     }
51 52
   }
52 53
   
53 54
 if ($_GET['igroup']) {
@@ -82,7 +83,9 @@  discard block
 block discarded – undo
82 83
 				       if($query && mysql_num_rows($query) > 0){
83 84
 				        while($row = mysql_fetch_object($query)){
84 85
 				         echo '<option value="'.$row->id_groups.'"';
85
-				         if($row->id_groups == @$data->id_groups) echo ' selected';
86
+				         if($row->id_groups == @$data->id_groups) {
87
+				             echo ' selected';
88
+				         }
86 89
 				         echo '>'.$row->groups.'</option>';
87 90
 				        }
88 91
 				       }     
@@ -102,7 +105,9 @@  discard block
 block discarded – undo
102 105
 				       if($query && mysql_num_rows($query) > 0){
103 106
 				        while($row = mysql_fetch_object($query)){
104 107
 				         echo '<option value="'.$row->id_modul.'"';
105
-				         if($imenu == $row->id_modul) echo ' selected';
108
+				         if($imenu == $row->id_modul) {
109
+				             echo ' selected';
110
+				         }
106 111
 				         echo '>'.$row->nama_modul.'</option>';
107 112
 				        }
108 113
 				       }     
Please login to merge, or discard this patch.
modul/mod_rujukan_pasien/rujukan_pasien.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -80,8 +80,8 @@
 block discarded – undo
80 80
             echo" <td  style='text-align:center;'>";
81 81
 
82 82
             if($r_edit == 'Y') {
83
-               echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_kunjungan_berobat=$r[id_kunjungan_berobat]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>";
84
-               }
83
+                echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_kunjungan_berobat=$r[id_kunjungan_berobat]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>";
84
+                }
85 85
 
86 86
                
87 87
                
Please login to merge, or discard this patch.
Switch Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 switch($_GET[act]){
3 3
 
4
-default:  
5
-  ?>
4
+    default:  
5
+      ?>
6 6
 
7 7
  <div class="">
8 8
                    
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
                             
47 47
                          <?
48 48
                         
49
-            $tampil=mysql_query("SELECT a.*,b.nama,b.tgl_lahir,b.ktp,c.poli,d.kategori    
49
+                $tampil=mysql_query("SELECT a.*,b.nama,b.tgl_lahir,b.ktp,c.poli,d.kategori    
50 50
                                     ,e.rujukan as rujukan_rs
51 51
                                     ,f.rujukan as rujukan_lab                              
52 52
                                 FROM kunjungan_berobat a left join pasien b 
@@ -62,35 +62,35 @@  discard block
 block discarded – undo
62 62
                                  WHERE a.rujukan = 'Y'                    
63 63
                                  ORDER BY a.tanggal,a.id_poli,a.no_urut ASC");
64 64
             
65
-            $no = 1;
65
+                $no = 1;
66 66
             
67
-            while ($r=mysql_fetch_array($tampil)){  
67
+                while ($r=mysql_fetch_array($tampil)){  
68 68
 
69
-            $tgl       = DATE('d/m/Y',strtotime($r[tanggal]));
70
-            $tgl_lahir = DATE('d/m/Y',strtotime($r[tgl_lahir]));
69
+                $tgl       = DATE('d/m/Y',strtotime($r[tanggal]));
70
+                $tgl_lahir = DATE('d/m/Y',strtotime($r[tgl_lahir]));
71 71
 
72
-            echo"<tr>";
73
-            echo"<td>$tgl</td>";
74
-            echo"<td>$r[poli]</td>";
75
-            echo"<td>$r[no_urut]</td>";            
76
-            echo"<td>$r[nama]</td>";
77
-            echo"<td>$r[kategori]</td>";
78
-            echo"<td>$r[rujukan_rs]</td>";
79
-            echo"<td>$r[rujukan_lab]</td>";
80
-            echo" <td  style='text-align:center;'>";
72
+                echo"<tr>";
73
+                echo"<td>$tgl</td>";
74
+                echo"<td>$r[poli]</td>";
75
+                echo"<td>$r[no_urut]</td>";            
76
+                echo"<td>$r[nama]</td>";
77
+                echo"<td>$r[kategori]</td>";
78
+                echo"<td>$r[rujukan_rs]</td>";
79
+                echo"<td>$r[rujukan_lab]</td>";
80
+                echo" <td  style='text-align:center;'>";
81 81
 
82
-            if($r_edit == 'Y') {
83
-               echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_kunjungan_berobat=$r[id_kunjungan_berobat]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>";
84
-               }
82
+                if($r_edit == 'Y') {
83
+                   echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_kunjungan_berobat=$r[id_kunjungan_berobat]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>";
84
+                   }
85 85
 
86 86
                
87 87
                
88
-            echo"</td>";              
89
-                                echo"</tr>";
90
-                                $no++;
88
+                echo"</td>";              
89
+                                    echo"</tr>";
90
+                                    $no++;
91 91
                                 
92
-                                }
93
-                                ?>
92
+                                    }
93
+                                    ?>
94 94
                          </tbody>
95 95
                     </table>
96 96
                   </div>
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-switch($_GET[act]){
2
+switch ($_GET[act]) {
3 3
 
4 4
 default:  
5 5
   ?>
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
                         <div class="col-md-12 col-sm-12 col-xs-12">
12 12
                             <div class="x_panel">
13 13
                                 <div class="x_title">
14
-                                    <h2><?php echo $nmmodule;?></h2>
14
+                                    <h2><?php echo $nmmodule; ?></h2>
15 15
                                      <div class="clearfix"></div>
16 16
                                 </div>
17 17
                                 <div class="x_content">
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
                             
47 47
                          <?
48 48
                         
49
-            $tampil=mysql_query("SELECT a.*,b.nama,b.tgl_lahir,b.ktp,c.poli,d.kategori    
49
+            $tampil = mysql_query("SELECT a.*,b.nama,b.tgl_lahir,b.ktp,c.poli,d.kategori    
50 50
                                     ,e.rujukan as rujukan_rs
51 51
                                     ,f.rujukan as rujukan_lab                              
52 52
                                 FROM kunjungan_berobat a left join pasien b 
@@ -64,10 +64,10 @@  discard block
 block discarded – undo
64 64
             
65 65
             $no = 1;
66 66
             
67
-            while ($r=mysql_fetch_array($tampil)){  
67
+            while ($r = mysql_fetch_array($tampil)) {  
68 68
 
69
-            $tgl       = DATE('d/m/Y',strtotime($r[tanggal]));
70
-            $tgl_lahir = DATE('d/m/Y',strtotime($r[tgl_lahir]));
69
+            $tgl       = DATE('d/m/Y', strtotime($r[tanggal]));
70
+            $tgl_lahir = DATE('d/m/Y', strtotime($r[tgl_lahir]));
71 71
 
72 72
             echo"<tr>";
73 73
             echo"<td>$tgl</td>";
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
             echo"<td>$r[rujukan_lab]</td>";
80 80
             echo" <td  style='text-align:center;'>";
81 81
 
82
-            if($r_edit == 'Y') {
82
+            if ($r_edit=='Y') {
83 83
                echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_kunjungan_berobat=$r[id_kunjungan_berobat]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>";
84 84
                }
85 85
 
Please login to merge, or discard this patch.
modul/mod_rujukan_pasien/form_rujukan_pasien.php 3 patches
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?
2 2
 session_start();
3 3
 if (empty($_SESSION['username']) AND empty($_SESSION['password'])){
4
-  echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
4
+    echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
5 5
 } else{
6 6
 include "./../../config/koneksi.php";
7 7
 ?>
@@ -41,34 +41,34 @@  discard block
 block discarded – undo
41 41
 
42 42
 $id_module = $_GET['id_module']; 
43 43
 
44
-  $id = isset($_GET['id_kunjungan_berobat']) ? intval($_GET['id_kunjungan_berobat']) : false;
44
+    $id = isset($_GET['id_kunjungan_berobat']) ? intval($_GET['id_kunjungan_berobat']) : false;
45 45
   
46
-  if($id){
47
-     $query = mysql_query('SELECT * FROM kunjungan_berobat WHERE id_kunjungan_berobat = "'.$id.'"');
48
-     if($query && mysql_num_rows($query) == 1){
46
+    if($id){
47
+        $query = mysql_query('SELECT * FROM kunjungan_berobat WHERE id_kunjungan_berobat = "'.$id.'"');
48
+        if($query && mysql_num_rows($query) == 1){
49 49
         $data = mysql_fetch_object($query);
50
-     }else 
50
+        }else 
51 51
         die('Data modul tidak ditemukan');
52
-  }
52
+    }
53 53
   
54 54
 if ($_GET['igroup']) {
55
-  $group  = $_GET['igroup'];
55
+    $group  = $_GET['igroup'];
56 56
 } else {
57
-  $group  = $data->id_kunjungan_berobat;
57
+    $group  = $data->id_kunjungan_berobat;
58 58
   
59 59
 }
60 60
 
61 61
 if ($_GET['imenu']) {
62
-  $imenu  = $_GET['imenu'];
62
+    $imenu  = $_GET['imenu'];
63 63
 } else {
64
-  $imenu  = $data->id_modul;  
64
+    $imenu  = $data->id_modul;  
65 65
   
66 66
 }
67 67
 
68 68
 if ($data->tanggal) {
69
-  $tanggal = $data->tanggal;
69
+    $tanggal = $data->tanggal;
70 70
 } else {
71
-  $tanggal = DATE('Y-m-d');
71
+    $tanggal = DATE('Y-m-d');
72 72
 }
73 73
 
74 74
   
@@ -96,17 +96,17 @@  discard block
 block discarded – undo
96 96
                  <select required name="pasien" class="form-control" disabled>
97 97
                  <option>--Pilih Pasien--</option>                
98 98
                     <?
99
-                      $query = mysql_query('SELECT * FROM pasien ORDER BY nama');
100
-                       if($query && mysql_num_rows($query) > 0){
101
-                          while($row = mysql_fetch_object($query)){
99
+                        $query = mysql_query('SELECT * FROM pasien ORDER BY nama');
100
+                        if($query && mysql_num_rows($query) > 0){
101
+                            while($row = mysql_fetch_object($query)){
102 102
 
103 103
                             $pasien = $row->ktp.'-'.$row->nama;
104 104
 
105
-                             echo '<option value="'.$row->id_pasien.'"';
106
-                             if($row->id_pasien == @$data->id_pasien) echo ' selected';
107
-                             echo '>'.$pasien.'</option>';
108
-                          }
109
-                       }        
105
+                                echo '<option value="'.$row->id_pasien.'"';
106
+                                if($row->id_pasien == @$data->id_pasien) echo ' selected';
107
+                                echo '>'.$pasien.'</option>';
108
+                            }
109
+                        }        
110 110
                     ?>
111 111
                     </select>
112 112
               </div>
@@ -117,14 +117,14 @@  discard block
 block discarded – undo
117 117
                  <select name="poli" class="form-control" disabled>     
118 118
                  <option>--Pilih Poliklinik --</option>                          
119 119
                     <?
120
-                      $query = mysql_query('SELECT * FROM poli ORDER BY poli');
121
-                       if($query && mysql_num_rows($query) > 0){
122
-                          while($row = mysql_fetch_object($query)){
123
-                             echo '<option value="'.$row->id_poli.'"';
124
-                             if($row->id_poli == @$data->id_poli) echo ' selected';
125
-                             echo '>'.$row->poli.'</option>';
126
-                          }
127
-                       }        
120
+                        $query = mysql_query('SELECT * FROM poli ORDER BY poli');
121
+                        if($query && mysql_num_rows($query) > 0){
122
+                            while($row = mysql_fetch_object($query)){
123
+                                echo '<option value="'.$row->id_poli.'"';
124
+                                if($row->id_poli == @$data->id_poli) echo ' selected';
125
+                                echo '>'.$row->poli.'</option>';
126
+                            }
127
+                        }        
128 128
                     ?>
129 129
                     </select>
130 130
               </div>
@@ -135,14 +135,14 @@  discard block
 block discarded – undo
135 135
                  <select name="rujukan_rs" class="form-control">     
136 136
                  <option>--Pilih Rujukan RS --</option>                          
137 137
                     <?
138
-                      $query = mysql_query('SELECT * FROM rujukan WHERE tipe = "R" ORDER BY rujukan');
139
-                       if($query && mysql_num_rows($query) > 0){
140
-                          while($row = mysql_fetch_object($query)){
141
-                             echo '<option value="'.$row->id_rujukan.'"';
142
-                             if($row->id_rujukan == @$data->id_rujukan_rs) echo ' selected';
143
-                             echo '>'.$row->rujukan.'</option>';
144
-                          }
145
-                       }        
138
+                        $query = mysql_query('SELECT * FROM rujukan WHERE tipe = "R" ORDER BY rujukan');
139
+                        if($query && mysql_num_rows($query) > 0){
140
+                            while($row = mysql_fetch_object($query)){
141
+                                echo '<option value="'.$row->id_rujukan.'"';
142
+                                if($row->id_rujukan == @$data->id_rujukan_rs) echo ' selected';
143
+                                echo '>'.$row->rujukan.'</option>';
144
+                            }
145
+                        }        
146 146
                     ?>
147 147
                     </select>
148 148
               </div>
@@ -153,14 +153,14 @@  discard block
 block discarded – undo
153 153
                  <select name="rujukan_lab" class="form-control">     
154 154
                  <option>--Pilih Rujukan Lab --</option>                          
155 155
                     <?
156
-                      $query = mysql_query('SELECT * FROM rujukan WHERE tipe = "L" ORDER BY rujukan');
157
-                       if($query && mysql_num_rows($query) > 0){
158
-                          while($row = mysql_fetch_object($query)){
159
-                             echo '<option value="'.$row->id_rujukan.'"';
160
-                             if($row->id_rujukan == @$data->id_rujukan_lab) echo ' selected';
161
-                             echo '>'.$row->rujukan.'</option>';
162
-                          }
163
-                       }        
156
+                        $query = mysql_query('SELECT * FROM rujukan WHERE tipe = "L" ORDER BY rujukan');
157
+                        if($query && mysql_num_rows($query) > 0){
158
+                            while($row = mysql_fetch_object($query)){
159
+                                echo '<option value="'.$row->id_rujukan.'"';
160
+                                if($row->id_rujukan == @$data->id_rujukan_lab) echo ' selected';
161
+                                echo '>'.$row->rujukan.'</option>';
162
+                            }
163
+                        }        
164 164
                     ?>
165 165
                     </select>
166 166
               </div>
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?
2 2
 session_start();
3
-if (empty($_SESSION['username']) AND empty($_SESSION['password'])){
3
+if (empty($_SESSION['username']) AND empty($_SESSION['password'])) {
4 4
   echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
5
-} else{
5
+} else {
6 6
 include "./../../config/koneksi.php";
7 7
 ?>
8 8
 <!doctype html>
@@ -37,17 +37,17 @@  discard block
 block discarded – undo
37 37
 $modul = $_GET['module'];
38 38
 $title = $_GET['title'];
39 39
 $business_type = $_SESSION['business_type']; 
40
-$role   = $_SESSION['role'];
40
+$role = $_SESSION['role'];
41 41
 
42 42
 $id_module = $_GET['id_module']; 
43 43
 
44 44
   $id = isset($_GET['id_kunjungan_berobat']) ? intval($_GET['id_kunjungan_berobat']) : false;
45 45
   
46
-  if($id){
46
+  if ($id) {
47 47
      $query = mysql_query('SELECT * FROM kunjungan_berobat WHERE id_kunjungan_berobat = "'.$id.'"');
48
-     if($query && mysql_num_rows($query) == 1){
48
+     if ($query && mysql_num_rows($query)==1) {
49 49
         $data = mysql_fetch_object($query);
50
-     }else 
50
+     } else 
51 51
         die('Data modul tidak ditemukan');
52 52
   }
53 53
   
@@ -97,13 +97,13 @@  discard block
 block discarded – undo
97 97
                  <option>--Pilih Pasien--</option>                
98 98
                     <?
99 99
                       $query = mysql_query('SELECT * FROM pasien ORDER BY nama');
100
-                       if($query && mysql_num_rows($query) > 0){
101
-                          while($row = mysql_fetch_object($query)){
100
+                       if ($query && mysql_num_rows($query)>0) {
101
+                          while ($row = mysql_fetch_object($query)) {
102 102
 
103 103
                             $pasien = $row->ktp.'-'.$row->nama;
104 104
 
105 105
                              echo '<option value="'.$row->id_pasien.'"';
106
-                             if($row->id_pasien == @$data->id_pasien) echo ' selected';
106
+                             if ($row->id_pasien==@$data->id_pasien) echo ' selected';
107 107
                              echo '>'.$pasien.'</option>';
108 108
                           }
109 109
                        }        
@@ -118,10 +118,10 @@  discard block
 block discarded – undo
118 118
                  <option>--Pilih Poliklinik --</option>                          
119 119
                     <?
120 120
                       $query = mysql_query('SELECT * FROM poli ORDER BY poli');
121
-                       if($query && mysql_num_rows($query) > 0){
122
-                          while($row = mysql_fetch_object($query)){
121
+                       if ($query && mysql_num_rows($query)>0) {
122
+                          while ($row = mysql_fetch_object($query)) {
123 123
                              echo '<option value="'.$row->id_poli.'"';
124
-                             if($row->id_poli == @$data->id_poli) echo ' selected';
124
+                             if ($row->id_poli==@$data->id_poli) echo ' selected';
125 125
                              echo '>'.$row->poli.'</option>';
126 126
                           }
127 127
                        }        
@@ -136,10 +136,10 @@  discard block
 block discarded – undo
136 136
                  <option>--Pilih Rujukan RS --</option>                          
137 137
                     <?
138 138
                       $query = mysql_query('SELECT * FROM rujukan WHERE tipe = "R" ORDER BY rujukan');
139
-                       if($query && mysql_num_rows($query) > 0){
140
-                          while($row = mysql_fetch_object($query)){
139
+                       if ($query && mysql_num_rows($query)>0) {
140
+                          while ($row = mysql_fetch_object($query)) {
141 141
                              echo '<option value="'.$row->id_rujukan.'"';
142
-                             if($row->id_rujukan == @$data->id_rujukan_rs) echo ' selected';
142
+                             if ($row->id_rujukan==@$data->id_rujukan_rs) echo ' selected';
143 143
                              echo '>'.$row->rujukan.'</option>';
144 144
                           }
145 145
                        }        
@@ -154,10 +154,10 @@  discard block
 block discarded – undo
154 154
                  <option>--Pilih Rujukan Lab --</option>                          
155 155
                     <?
156 156
                       $query = mysql_query('SELECT * FROM rujukan WHERE tipe = "L" ORDER BY rujukan');
157
-                       if($query && mysql_num_rows($query) > 0){
158
-                          while($row = mysql_fetch_object($query)){
157
+                       if ($query && mysql_num_rows($query)>0) {
158
+                          while ($row = mysql_fetch_object($query)) {
159 159
                              echo '<option value="'.$row->id_rujukan.'"';
160
-                             if($row->id_rujukan == @$data->id_rujukan_lab) echo ' selected';
160
+                             if ($row->id_rujukan==@$data->id_rujukan_lab) echo ' selected';
161 161
                              echo '>'.$row->rujukan.'</option>';
162 162
                           }
163 163
                        }        
Please login to merge, or discard this patch.
Braces   +15 added lines, -6 removed lines patch added patch discarded remove patch
@@ -47,8 +47,9 @@  discard block
 block discarded – undo
47 47
      $query = mysql_query('SELECT * FROM kunjungan_berobat WHERE id_kunjungan_berobat = "'.$id.'"');
48 48
      if($query && mysql_num_rows($query) == 1){
49 49
         $data = mysql_fetch_object($query);
50
-     }else 
51
-        die('Data modul tidak ditemukan');
50
+     } else {
51
+             die('Data modul tidak ditemukan');
52
+     }
52 53
   }
53 54
   
54 55
 if ($_GET['igroup']) {
@@ -103,7 +104,9 @@  discard block
 block discarded – undo
103 104
                             $pasien = $row->ktp.'-'.$row->nama;
104 105
 
105 106
                              echo '<option value="'.$row->id_pasien.'"';
106
-                             if($row->id_pasien == @$data->id_pasien) echo ' selected';
107
+                             if($row->id_pasien == @$data->id_pasien) {
108
+                                 echo ' selected';
109
+                             }
107 110
                              echo '>'.$pasien.'</option>';
108 111
                           }
109 112
                        }        
@@ -121,7 +124,9 @@  discard block
 block discarded – undo
121 124
                        if($query && mysql_num_rows($query) > 0){
122 125
                           while($row = mysql_fetch_object($query)){
123 126
                              echo '<option value="'.$row->id_poli.'"';
124
-                             if($row->id_poli == @$data->id_poli) echo ' selected';
127
+                             if($row->id_poli == @$data->id_poli) {
128
+                                 echo ' selected';
129
+                             }
125 130
                              echo '>'.$row->poli.'</option>';
126 131
                           }
127 132
                        }        
@@ -139,7 +144,9 @@  discard block
 block discarded – undo
139 144
                        if($query && mysql_num_rows($query) > 0){
140 145
                           while($row = mysql_fetch_object($query)){
141 146
                              echo '<option value="'.$row->id_rujukan.'"';
142
-                             if($row->id_rujukan == @$data->id_rujukan_rs) echo ' selected';
147
+                             if($row->id_rujukan == @$data->id_rujukan_rs) {
148
+                                 echo ' selected';
149
+                             }
143 150
                              echo '>'.$row->rujukan.'</option>';
144 151
                           }
145 152
                        }        
@@ -157,7 +164,9 @@  discard block
 block discarded – undo
157 164
                        if($query && mysql_num_rows($query) > 0){
158 165
                           while($row = mysql_fetch_object($query)){
159 166
                              echo '<option value="'.$row->id_rujukan.'"';
160
-                             if($row->id_rujukan == @$data->id_rujukan_lab) echo ' selected';
167
+                             if($row->id_rujukan == @$data->id_rujukan_lab) {
168
+                                 echo ' selected';
169
+                             }
161 170
                              echo '>'.$row->rujukan.'</option>';
162 171
                           }
163 172
                        }        
Please login to merge, or discard this patch.
modul/mod_rujukan_pasien/aksi_rujukan_pasien.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 session_start();
3 3
 if (empty($_SESSION['username']) AND empty($_SESSION['password'])){
4
-  echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
4
+    echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
5 5
 } else{
6 6
 include "./../../config/koneksi.php";
7 7
 include "./../../config/fungsi_thumb.php";
@@ -18,11 +18,11 @@  discard block
 block discarded – undo
18 18
 
19 19
 if ($module=='rujukan_pasien' AND $act=='update'){
20 20
 
21
-  $id_module = $_POST['id_module'];
21
+    $id_module = $_POST['id_module'];
22 22
 
23 23
 
24 24
 
25
-   mysql_query("UPDATE kunjungan_berobat SET id_rujukan_rs   = '$_POST[rujukan_rs]'
25
+    mysql_query("UPDATE kunjungan_berobat SET id_rujukan_rs   = '$_POST[rujukan_rs]'
26 26
                     ,id_rujukan_lab   = '$_POST[rujukan_lab]'
27 27
                     ,upddt   = '$datetime' 
28 28
                     ,updby   = '$userid' 
@@ -31,9 +31,9 @@  discard block
 block discarded – undo
31 31
                           
32 32
 
33 33
    
34
-   //header('location:../../main.php?module='.$module.'&id_module='.$id_module);          
34
+    //header('location:../../main.php?module='.$module.'&id_module='.$id_module);          
35 35
 
36
-  ?>
36
+    ?>
37 37
    
38 38
   <script language="javascript">
39 39
      window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module";?>";  
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,22 +1,22 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 session_start();
3
-if (empty($_SESSION['username']) AND empty($_SESSION['password'])){
3
+if (empty($_SESSION['username']) AND empty($_SESSION['password'])) {
4 4
   echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
5
-} else{
5
+} else {
6 6
 include "./../../config/koneksi.php";
7 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 12
 $date     = date("d/m/Y");  
13 13
 $idate    = date("Y-m-d");
14 14
 $hour = time() - (1 * 1 * 60 * 60);
15
-$datetime   = date("Y-m-d G:i:s", $hour);
15
+$datetime = date("Y-m-d G:i:s", $hour);
16 16
 $userid   = $_SESSION['userid'];
17 17
 $business_type = $_SESSION['business_type']; 
18 18
 
19
-if ($module=='rujukan_pasien' AND $act=='update'){
19
+if ($module=='rujukan_pasien' AND $act=='update') {
20 20
 
21 21
   $id_module = $_POST['id_module'];
22 22
 
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
   ?>
37 37
    
38 38
   <script language="javascript">
39
-     window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module";?>";  
39
+     window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>";  
40 40
      window.parent.tb_remove();
41 41
    </script>
42 42
   
Please login to merge, or discard this patch.
modul/mod_report_rujukan_pasien/print_report_rujukan_pasien.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -13,9 +13,9 @@  discard block
 block discarded – undo
13 13
 $fa_icon    = $r['fa_icon'];
14 14
 
15 15
 if($r[orientation] == 'P') {
16
-  $orientation = 'portrait';
16
+    $orientation = 'portrait';
17 17
 } else {
18
-  $orientation = 'landscape';
18
+    $orientation = 'landscape';
19 19
 }
20 20
 
21 21
 
@@ -163,12 +163,12 @@  discard block
 block discarded – undo
163 163
 
164 164
 <?
165 165
 $gtampil=mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
166
- $g=mysql_fetch_array($gtampil);
166
+    $g=mysql_fetch_array($gtampil);
167 167
 
168 168
 if ($g['pict']) {
169
-  $pict = $g['pict'];
169
+    $pict = $g['pict'];
170 170
 } else {
171
-  $pict = '';
171
+    $pict = '';
172 172
 }
173 173
 
174 174
 $company = ucwords($g['company']);
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
                          <?
211 211
             
212 212
 
213
-                         $tampil=mysql_query("SELECT a.*,b.nama,b.tgl_lahir,b.ktp,c.poli,d.kategori    
213
+                            $tampil=mysql_query("SELECT a.*,b.nama,b.tgl_lahir,b.ktp,c.poli,d.kategori    
214 214
                                                 ,e.rujukan as rujukan_rs
215 215
                                                 ,f.rujukan as rujukan_lab                              
216 216
                                             FROM kunjungan_berobat a left join pasien b 
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
                         echo"</tr>";
249 249
                         $no++;
250 250
                                             
251
-                         }
251
+                            }
252 252
                         ?>
253 253
 
254 254
                       
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -2,9 +2,9 @@  discard block
 block discarded – undo
2 2
 include "./../../config/koneksi.php";
3 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 9
 $module   = $_GET['module'];
10 10
 $imodule  = ucwords($r['nama_modul']);
@@ -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';
@@ -22,8 +22,8 @@  discard block
 block discarded – undo
22 22
 $fdate = $_GET['fdate'];
23 23
 $ldate = $_GET['ldate'];
24 24
 
25
-$ftgl = DATE('d/m/Y',strtotime($_GET['fdate']));
26
-$ltgl = DATE('d/m/Y',strtotime($_GET['ldate']));
25
+$ftgl = DATE('d/m/Y', strtotime($_GET['fdate']));
26
+$ltgl = DATE('d/m/Y', strtotime($_GET['ldate']));
27 27
                 
28 28
 ?>
29 29
 
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 
141 141
 <!--<body onload="cetakspk()">-->
142 142
 
143
-<? if ($_GET['printto'] == '2') { ?>
143
+<? if ($_GET['printto']=='2') { ?>
144 144
 <body onload="icetak()">
145 145
 <? } else { ?>
146 146
 <body>
@@ -162,8 +162,8 @@  discard block
 block discarded – undo
162 162
 
163 163
 
164 164
 <?
165
-$gtampil=mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
166
- $g=mysql_fetch_array($gtampil);
165
+$gtampil = mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
166
+ $g = mysql_fetch_array($gtampil);
167 167
 
168 168
 if ($g['pict']) {
169 169
   $pict = $g['pict'];
@@ -177,12 +177,12 @@  discard block
 block discarded – undo
177 177
  <table width='100%' style="padding-top:10px;">
178 178
 <tr>
179 179
 <td width='10%'>
180
-<!-- <img src="../../images/logo/<?=$pict;?>" width=100px> -->
180
+<!-- <img src="../../images/logo/<?=$pict; ?>" width=100px> -->
181 181
 </td>
182 182
 <td style="text-align:center;" width='80%'>
183
-<span class='h1'><?=$nmmodule;?></span>
183
+<span class='h1'><?=$nmmodule; ?></span>
184 184
 <? echo "<span class='h2'>".$g['company']."</span><br>"; ?>
185
-<br>Periode : <?=$ftgl;?> - <?=$ltgl;?>
185
+<br>Periode : <?=$ftgl; ?> - <?=$ltgl; ?>
186 186
 </td>
187 187
 <td width='10%'>
188 188
 &nbsp
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
                          <?
211 211
             
212 212
 
213
-                         $tampil=mysql_query("SELECT a.*,b.nama,b.tgl_lahir,b.ktp,c.poli,d.kategori    
213
+                         $tampil = mysql_query("SELECT a.*,b.nama,b.tgl_lahir,b.ktp,c.poli,d.kategori    
214 214
                                                 ,e.rujukan as rujukan_rs
215 215
                                                 ,f.rujukan as rujukan_lab                              
216 216
                                             FROM kunjungan_berobat a left join pasien b 
@@ -232,10 +232,10 @@  discard block
 block discarded – undo
232 232
                         
233 233
                         $no = 1;
234 234
                         
235
-                        while ($r=mysql_fetch_array($tampil)){  
235
+                        while ($r = mysql_fetch_array($tampil)) {  
236 236
 
237
-                        $tgl       = DATE('d/m/Y',strtotime($r[tanggal]));
238
-                        $tgl_lahir = DATE('d/m/Y',strtotime($r[tgl_lahir]));
237
+                        $tgl       = DATE('d/m/Y', strtotime($r[tanggal]));
238
+                        $tgl_lahir = DATE('d/m/Y', strtotime($r[tgl_lahir]));
239 239
 
240 240
                         echo"<tr>";
241 241
                         echo"<td>$tgl</td>";
Please login to merge, or discard this patch.