Passed
Branch master (c66316)
by Saepul
06:04
created
modul/mod_kunjungan_berobat/aksi_kunjungan_berobat.php 2 patches
Indentation   +21 added lines, -21 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,14 +18,14 @@  discard block
 block discarded – undo
18 18
 
19 19
 // Hapus modul
20 20
 if ($module=='kunjungan_berobat' AND $act=='hapus'){
21
-  $id = $_GET['id'];
22
-  $id_module = $_GET['id_module'];
21
+    $id = $_GET['id'];
22
+    $id_module = $_GET['id_module'];
23 23
    
24
-  mysql_query("DELETE FROM ".$module." WHERE id_".$module." = $id");
24
+    mysql_query("DELETE FROM ".$module." WHERE id_".$module." = $id");
25 25
 
26
-   //header('location:../../main.php?module='.$module.'&id_module='.$id_module);          
26
+    //header('location:../../main.php?module='.$module.'&id_module='.$id_module);          
27 27
 
28
-  ?>
28
+    ?>
29 29
    
30 30
   <script language="javascript">
31 31
      window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module";?>";  
@@ -34,16 +34,16 @@  discard block
 block discarded – undo
34 34
   
35 35
   <?php                 
36 36
    
37
- }
37
+    }
38 38
 
39
-  // Input group
39
+    // Input group
40 40
 elseif ($module=='kunjungan_berobat' AND $act=='input'){
41 41
 
42
-  $id_module = $_POST['id_module'];
42
+    $id_module = $_POST['id_module'];
43 43
 
44 44
 
45
-   if($_POST['ID']){
46
-   mysql_query("UPDATE kunjungan_berobat SET tanggal   = '$_POST[tanggal]'
45
+    if($_POST['ID']){
46
+    mysql_query("UPDATE kunjungan_berobat SET tanggal   = '$_POST[tanggal]'
47 47
                     ,id_pasien   = '$_POST[pasien]'
48 48
                     ,id_poli   = '$_POST[poli]'    
49 49
                     ,upddt   = '$datetime' 
@@ -53,21 +53,21 @@  discard block
 block discarded – undo
53 53
                           
54 54
 
55 55
       
56
-   } else {
56
+    } else {
57 57
 
58
-   $sql=mysql_query("select no_urut from kunjungan_berobat 
58
+    $sql=mysql_query("select no_urut from kunjungan_berobat 
59 59
                      where tanggal='$_POST[tanggal]' 
60 60
                      and id_poli   = '$_POST[poli]'   ");
61 61
 
62
-   $r=mysql_fetch_array($sql);
62
+    $r=mysql_fetch_array($sql);
63 63
 
64
-   if ($r['no_urut']) {
64
+    if ($r['no_urut']) {
65 65
     $no_urut = $r['no_urut']+1;
66
-   } else {
66
+    } else {
67 67
     $no_urut = 1;
68
-   }
68
+    }
69 69
 
70
-   mysql_query("INSERT INTO kunjungan_berobat(tanggal
70
+    mysql_query("INSERT INTO kunjungan_berobat(tanggal
71 71
                     ,no_urut
72 72
                    ,id_pasien
73 73
                    ,id_poli
@@ -85,12 +85,12 @@  discard block
 block discarded – undo
85 85
                   ,'$userid')");
86 86
   
87 87
                 
88
-   }
88
+    }
89 89
    
90 90
 
91
-   //header('location:../../main.php?module='.$module.'&id_module='.$id_module);          
91
+    //header('location:../../main.php?module='.$module.'&id_module='.$id_module);          
92 92
 
93
-  ?>
93
+    ?>
94 94
    
95 95
   <script language="javascript">
96 96
      window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module";?>";  
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 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=='kunjungan_berobat' AND $act=='hapus'){
20
+if ($module=='kunjungan_berobat' AND $act=='hapus') {
21 21
   $id = $_GET['id'];
22 22
   $id_module = $_GET['id_module'];
23 23
    
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
   ?>
29 29
    
30 30
   <script language="javascript">
31
-     window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module";?>";  
31
+     window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>";  
32 32
      window.parent.tb_remove();
33 33
    </script>
34 34
   
@@ -37,12 +37,12 @@  discard block
 block discarded – undo
37 37
  }
38 38
 
39 39
   // Input group
40
-elseif ($module=='kunjungan_berobat' AND $act=='input'){
40
+elseif ($module=='kunjungan_berobat' AND $act=='input') {
41 41
 
42 42
   $id_module = $_POST['id_module'];
43 43
 
44 44
 
45
-   if($_POST['ID']){
45
+   if ($_POST['ID']) {
46 46
    mysql_query("UPDATE kunjungan_berobat SET tanggal   = '$_POST[tanggal]'
47 47
                     ,id_pasien   = '$_POST[pasien]'
48 48
                     ,id_poli   = '$_POST[poli]'    
@@ -55,14 +55,14 @@  discard block
 block discarded – undo
55 55
       
56 56
    } else {
57 57
 
58
-   $sql=mysql_query("select no_urut from kunjungan_berobat 
58
+   $sql = mysql_query("select no_urut from kunjungan_berobat 
59 59
                      where tanggal='$_POST[tanggal]' 
60 60
                      and id_poli   = '$_POST[poli]'   ");
61 61
 
62
-   $r=mysql_fetch_array($sql);
62
+   $r = mysql_fetch_array($sql);
63 63
 
64 64
    if ($r['no_urut']) {
65
-    $no_urut = $r['no_urut']+1;
65
+    $no_urut = $r['no_urut'] + 1;
66 66
    } else {
67 67
     $no_urut = 1;
68 68
    }
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
   ?>
94 94
    
95 95
   <script language="javascript">
96
-     window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module";?>";  
96
+     window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>";  
97 97
      window.parent.tb_remove();
98 98
    </script>
99 99
   
Please login to merge, or discard this patch.
modul/mod_kunjungan_berobat/kunjungan_berobat.php 3 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -75,23 +75,23 @@
 block discarded – undo
75 75
             echo" <td  style='text-align:center;'>";
76 76
 
77 77
             if($r_edit == 'Y') {
78
-              //if ($status == '0') {
79
-               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>";
80
-              // } else {
81
-              //  echo"<span class='icon'><i class='fa fa-pencil'></i></span>"; 
82
-              // }
83
-             }
78
+                //if ($status == '0') {
79
+                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>";
80
+                // } else {
81
+                //  echo"<span class='icon'><i class='fa fa-pencil'></i></span>"; 
82
+                // }
83
+                }
84 84
 
85 85
                
86
-               if($r_delete == 'Y') {
86
+                if($r_delete == 'Y') {
87 87
                 //if ($status == '0') {
88
-                  echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_kunjungan_berobat]&id_module=$id' onClick=\"return confirm('Delete this record ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
88
+                    echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_kunjungan_berobat]&id_module=$id' onClick=\"return confirm('Delete this record ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
89 89
                
90 90
                 // }else {
91 91
                 //   echo"<span class='icon'><i class='fa fa-trash'></i></span>";
92 92
                   
93 93
                 // }
94
-               }  
94
+                }  
95 95
             echo"</td>";              
96 96
                                 echo"</tr>";
97 97
                                 $no++;
Please login to merge, or discard this patch.
Switch Indentation   +36 added lines, -36 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
                    
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
                             
48 48
                          <?
49 49
                         
50
-            $tampil=mysql_query("SELECT a.*,b.nama,b.tgl_lahir,b.ktp,c.poli,d.kategori 
50
+                $tampil=mysql_query("SELECT a.*,b.nama,b.tgl_lahir,b.ktp,c.poli,d.kategori 
51 51
                                 FROM kunjungan_berobat a left join pasien b 
52 52
                                  ON a.id_pasien = b.id_pasien
53 53
                                  left join poli c 
@@ -56,48 +56,48 @@  discard block
 block discarded – undo
56 56
                                  ON b.id_kategori = d.id_kategori
57 57
                                  ORDER BY a.tanggal,a.id_poli,a.no_urut ASC");
58 58
             
59
-            $no = 1;
59
+                $no = 1;
60 60
             
61
-            while ($r=mysql_fetch_array($tampil)){  
61
+                while ($r=mysql_fetch_array($tampil)){  
62 62
 
63
-            $tgl       = DATE('d/m/Y',strtotime($r[tanggal]));
64
-            $tgl_lahir = DATE('d/m/Y',strtotime($r[tgl_lahir]));
65
-            $status    = $r[status];
63
+                $tgl       = DATE('d/m/Y',strtotime($r[tanggal]));
64
+                $tgl_lahir = DATE('d/m/Y',strtotime($r[tgl_lahir]));
65
+                $status    = $r[status];
66 66
 
67
-            echo"<tr>";
68
-            echo"<td>$tgl</td>";
69
-            echo"<td>$r[poli]</td>";
70
-            echo"<td>$r[no_urut]</td>";            
71
-            echo"<td>$r[nama]</td>";
72
-            echo"<td>$r[ktp]</td>";
73
-            echo"<td>$tgl_lahir</td>";
74
-            echo"<td>$r[kategori]</td>";
75
-            echo" <td  style='text-align:center;'>";
67
+                echo"<tr>";
68
+                echo"<td>$tgl</td>";
69
+                echo"<td>$r[poli]</td>";
70
+                echo"<td>$r[no_urut]</td>";            
71
+                echo"<td>$r[nama]</td>";
72
+                echo"<td>$r[ktp]</td>";
73
+                echo"<td>$tgl_lahir</td>";
74
+                echo"<td>$r[kategori]</td>";
75
+                echo" <td  style='text-align:center;'>";
76 76
 
77
-            if($r_edit == 'Y') {
78
-              //if ($status == '0') {
79
-               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>";
80
-              // } else {
81
-              //  echo"<span class='icon'><i class='fa fa-pencil'></i></span>"; 
82
-              // }
83
-             }
77
+                if($r_edit == 'Y') {
78
+                  //if ($status == '0') {
79
+                   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>";
80
+                  // } else {
81
+                  //  echo"<span class='icon'><i class='fa fa-pencil'></i></span>"; 
82
+                  // }
83
+                 }
84 84
 
85 85
                
86
-               if($r_delete == 'Y') {
87
-                //if ($status == '0') {
88
-                  echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_kunjungan_berobat]&id_module=$id' onClick=\"return confirm('Delete this record ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
86
+                   if($r_delete == 'Y') {
87
+                    //if ($status == '0') {
88
+                      echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_kunjungan_berobat]&id_module=$id' onClick=\"return confirm('Delete this record ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
89 89
                
90
-                // }else {
91
-                //   echo"<span class='icon'><i class='fa fa-trash'></i></span>";
90
+                    // }else {
91
+                    //   echo"<span class='icon'><i class='fa fa-trash'></i></span>";
92 92
                   
93
-                // }
94
-               }  
95
-            echo"</td>";              
96
-                                echo"</tr>";
97
-                                $no++;
93
+                    // }
94
+                   }  
95
+                echo"</td>";              
96
+                                    echo"</tr>";
97
+                                    $no++;
98 98
                                 
99
-                                }
100
-                                ?>
99
+                                    }
100
+                                    ?>
101 101
                          </tbody>
102 102
                     </table>
103 103
                   </div>
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 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,8 +11,8 @@  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>
15
-                                      <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>
14
+                                    <h2><?php echo $nmmodule; ?></h2>
15
+                                      <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>
16 16
                                     <div class="clearfix"></div>
17 17
                                 </div>
18 18
                                 <div class="x_content">
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
                             
48 48
                          <?
49 49
                         
50
-            $tampil=mysql_query("SELECT a.*,b.nama,b.tgl_lahir,b.ktp,c.poli,d.kategori 
50
+            $tampil = mysql_query("SELECT a.*,b.nama,b.tgl_lahir,b.ktp,c.poli,d.kategori 
51 51
                                 FROM kunjungan_berobat a left join pasien b 
52 52
                                  ON a.id_pasien = b.id_pasien
53 53
                                  left join poli c 
@@ -58,10 +58,10 @@  discard block
 block discarded – undo
58 58
             
59 59
             $no = 1;
60 60
             
61
-            while ($r=mysql_fetch_array($tampil)){  
61
+            while ($r = mysql_fetch_array($tampil)) {  
62 62
 
63
-            $tgl       = DATE('d/m/Y',strtotime($r[tanggal]));
64
-            $tgl_lahir = DATE('d/m/Y',strtotime($r[tgl_lahir]));
63
+            $tgl       = DATE('d/m/Y', strtotime($r[tanggal]));
64
+            $tgl_lahir = DATE('d/m/Y', strtotime($r[tgl_lahir]));
65 65
             $status    = $r[status];
66 66
 
67 67
             echo"<tr>";
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
             echo"<td>$r[kategori]</td>";
75 75
             echo" <td  style='text-align:center;'>";
76 76
 
77
-            if($r_edit == 'Y') {
77
+            if ($r_edit=='Y') {
78 78
               //if ($status == '0') {
79 79
                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>";
80 80
               // } else {
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
              }
84 84
 
85 85
                
86
-               if($r_delete == 'Y') {
86
+               if ($r_delete=='Y') {
87 87
                 //if ($status == '0') {
88 88
                   echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_kunjungan_berobat]&id_module=$id' onClick=\"return confirm('Delete this record ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
89 89
                
Please login to merge, or discard this patch.
modul/mod_kunjungan_berobat/form_kunjungan_berobat.php 3 patches
Indentation   +29 added lines, -29 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">
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">     
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>
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 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
                        }        
Please login to merge, or discard this patch.
Braces   +9 added lines, -4 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
                        }        
Please login to merge, or discard this patch.
modul/mod_pasien/aksi_pasien.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,14 +18,14 @@  discard block
 block discarded – undo
18 18
 
19 19
 // Hapus modul
20 20
 if ($module=='pasien' AND $act=='hapus'){
21
-  $id = $_GET['id'];
22
-  $id_module = $_GET['id_module'];
21
+    $id = $_GET['id'];
22
+    $id_module = $_GET['id_module'];
23 23
    
24
-  mysql_query("DELETE FROM ".$module." WHERE id_".$module." = $id");
24
+    mysql_query("DELETE FROM ".$module." WHERE id_".$module." = $id");
25 25
 
26
-   //header('location:../../main.php?module='.$module.'&id_module='.$id_module);          
26
+    //header('location:../../main.php?module='.$module.'&id_module='.$id_module);          
27 27
 
28
-  ?>
28
+    ?>
29 29
    
30 30
   <script language="javascript">
31 31
      window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module";?>";  
@@ -34,16 +34,16 @@  discard block
 block discarded – undo
34 34
   
35 35
   <?php                 
36 36
    
37
- }
37
+    }
38 38
 
39
-  // Input group
39
+    // Input group
40 40
 elseif ($module=='pasien' AND $act=='input'){
41 41
 
42
-  $id_module = $_POST['id_module'];
42
+    $id_module = $_POST['id_module'];
43 43
 
44 44
 
45
-   if($_POST['ID']){
46
-   mysql_query("UPDATE pasien SET ktp   = '$_POST[ktp]'
45
+    if($_POST['ID']){
46
+    mysql_query("UPDATE pasien SET ktp   = '$_POST[ktp]'
47 47
                     ,nama   = '$_POST[nama]'
48 48
                     ,gender   = '$_POST[gender]'    
49 49
                     ,tgl_lahir   = '$_POST[tgl_lahir]'    
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
                           
59 59
 
60 60
       
61
-   } else {
62
-   mysql_query("INSERT INTO pasien(ktp
61
+    } else {
62
+    mysql_query("INSERT INTO pasien(ktp
63 63
                    ,nama
64 64
                    ,gender
65 65
                    ,tgl_lahir
@@ -87,12 +87,12 @@  discard block
 block discarded – undo
87 87
                     ,'$_POST[aktif]')");
88 88
   
89 89
                 
90
-   }
90
+    }
91 91
    
92 92
 
93
-   //header('location:../../main.php?module='.$module.'&id_module='.$id_module);          
93
+    //header('location:../../main.php?module='.$module.'&id_module='.$id_module);          
94 94
 
95
-  ?>
95
+    ?>
96 96
    
97 97
   <script language="javascript">
98 98
      window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module";?>";  
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 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=='pasien' AND $act=='hapus'){
20
+if ($module=='pasien' AND $act=='hapus') {
21 21
   $id = $_GET['id'];
22 22
   $id_module = $_GET['id_module'];
23 23
    
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
   ?>
29 29
    
30 30
   <script language="javascript">
31
-     window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module";?>";  
31
+     window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>";  
32 32
      window.parent.tb_remove();
33 33
    </script>
34 34
   
@@ -37,12 +37,12 @@  discard block
 block discarded – undo
37 37
  }
38 38
 
39 39
   // Input group
40
-elseif ($module=='pasien' AND $act=='input'){
40
+elseif ($module=='pasien' AND $act=='input') {
41 41
 
42 42
   $id_module = $_POST['id_module'];
43 43
 
44 44
 
45
-   if($_POST['ID']){
45
+   if ($_POST['ID']) {
46 46
    mysql_query("UPDATE pasien SET ktp   = '$_POST[ktp]'
47 47
                     ,nama   = '$_POST[nama]'
48 48
                     ,gender   = '$_POST[gender]'    
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
   ?>
96 96
    
97 97
   <script language="javascript">
98
-     window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module";?>";  
98
+     window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>";  
99 99
      window.parent.tb_remove();
100 100
    </script>
101 101
   
Please login to merge, or discard this patch.
modul/mod_pasien/pasien.php 3 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -92,13 +92,13 @@
 block discarded – undo
92 92
                             <?
93 93
 
94 94
                             if($r_edit == 'Y') {
95
-                               echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_pasien=$r[id_pasien]&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>";
96
-                               }
95
+                                echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_pasien=$r[id_pasien]&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>";
96
+                                }
97 97
 
98 98
                                
99
-                               // if($r_delete == 'Y') {
100
-                               // echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_pasien]&id_module=$id' onClick=\"return confirm('Delete this record ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
101
-                               // }  
99
+                                // if($r_delete == 'Y') {
100
+                                // echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_pasien]&id_module=$id' onClick=\"return confirm('Delete this record ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
101
+                                // }  
102 102
                             echo"</td>";              
103 103
                                 echo"</tr>";
104 104
                                 $no++;
Please login to merge, or discard this patch.
Switch Indentation   +35 added lines, -35 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
                    
@@ -51,39 +51,39 @@  discard block
 block discarded – undo
51 51
                          <?
52 52
                                        
53 53
 
54
-                            $tampil=mysql_query("SELECT a.*,b.agama,c.kategori
54
+                                $tampil=mysql_query("SELECT a.*,b.agama,c.kategori
55 55
                                                 FROM pasien a left join agama b 
56 56
                                                  ON a.id_agama = b.id_agama
57 57
                                                  left join kategori c
58 58
                                                  ON a.id_kategori = c.id_kategori
59 59
                                                  ORDER BY a.nama ");
60 60
                             
61
-                            $no = 1;
61
+                                $no = 1;
62 62
                             
63
-                            while ($r=mysql_fetch_array($tampil)){  
63
+                                while ($r=mysql_fetch_array($tampil)){  
64 64
 
65
-                                $tgl_lahir = DATE('d/m/Y',strtotime($r[tgl_lahir]));
65
+                                    $tgl_lahir = DATE('d/m/Y',strtotime($r[tgl_lahir]));
66 66
 
67
-                                if ($r['gender'] == 'L') {
68
-                                    $gender    = 'Laki-laki';
69
-                                } else {
70
-                                    $gender    = 'Perempuan';
71
-                                }
67
+                                    if ($r['gender'] == 'L') {
68
+                                        $gender    = 'Laki-laki';
69
+                                    } else {
70
+                                        $gender    = 'Perempuan';
71
+                                    }
72 72
                                 
73 73
                             
74
-                            echo"<tr>";
75
-                            echo"<td>$r[nama]</td>";
76
-                            echo"<td>$r[ktp]</td>";
77
-                            echo"<td>$tgl_lahir</td>";
78
-                            echo"<td>$gender</td>";
79
-                            echo"<td>$r[agama]</td>";
80
-                            echo"<td>$r[kategori]</td>";
81
-                            echo"<td>$r[telp]</td>";
82
-                            echo"<td>$r[alamat]</td>";
83
-                            echo"<td style='text-align:center;'>$r[aktif]</td>";  
84
-                            echo" <td  style='text-align:center;'>";
85
-                            ?>
86
-                            <a href='#' title='Cetak' onclick="window.open('./modul/mod_<?php echo $module;?>/cetak_pasien.php?id_pasien=<?php echo $r[id_pasien];?>', '', 'height=500,width=600,resizable=1,scrollbars=1,addressbars=0,directories=no,location=no')">
74
+                                echo"<tr>";
75
+                                echo"<td>$r[nama]</td>";
76
+                                echo"<td>$r[ktp]</td>";
77
+                                echo"<td>$tgl_lahir</td>";
78
+                                echo"<td>$gender</td>";
79
+                                echo"<td>$r[agama]</td>";
80
+                                echo"<td>$r[kategori]</td>";
81
+                                echo"<td>$r[telp]</td>";
82
+                                echo"<td>$r[alamat]</td>";
83
+                                echo"<td style='text-align:center;'>$r[aktif]</td>";  
84
+                                echo" <td  style='text-align:center;'>";
85
+                                ?>
86
+                                <a href='#' title='Cetak' onclick="window.open('./modul/mod_<?php echo $module;?>/cetak_pasien.php?id_pasien=<?php echo $r[id_pasien];?>', '', 'height=500,width=600,resizable=1,scrollbars=1,addressbars=0,directories=no,location=no')">
87 87
 
88 88
                             <span class='icon'><i class='fa fa-print'></i></span>
89 89
 
@@ -91,20 +91,20 @@  discard block
 block discarded – undo
91 91
 
92 92
                             <?
93 93
 
94
-                            if($r_edit == 'Y') {
95
-                               echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_pasien=$r[id_pasien]&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>";
96
-                               }
94
+                                if($r_edit == 'Y') {
95
+                                   echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_pasien=$r[id_pasien]&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>";
96
+                                   }
97 97
 
98 98
                                
99
-                               // if($r_delete == 'Y') {
100
-                               // echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_pasien]&id_module=$id' onClick=\"return confirm('Delete this record ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
101
-                               // }  
102
-                            echo"</td>";              
103
-                                echo"</tr>";
104
-                                $no++;
99
+                                   // if($r_delete == 'Y') {
100
+                                   // echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_pasien]&id_module=$id' onClick=\"return confirm('Delete this record ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
101
+                                   // }  
102
+                                echo"</td>";              
103
+                                    echo"</tr>";
104
+                                    $no++;
105 105
                                 
106
-                                }
107
-                                ?>
106
+                                    }
107
+                                    ?>
108 108
                          </tbody>
109 109
                     </table>
110 110
                   </div>
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 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">
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
                          <?
52 52
                                        
53 53
 
54
-                            $tampil=mysql_query("SELECT a.*,b.agama,c.kategori
54
+                            $tampil = mysql_query("SELECT a.*,b.agama,c.kategori
55 55
                                                 FROM pasien a left join agama b 
56 56
                                                  ON a.id_agama = b.id_agama
57 57
                                                  left join kategori c
@@ -60,11 +60,11 @@  discard block
 block discarded – undo
60 60
                             
61 61
                             $no = 1;
62 62
                             
63
-                            while ($r=mysql_fetch_array($tampil)){  
63
+                            while ($r = mysql_fetch_array($tampil)) {  
64 64
 
65
-                                $tgl_lahir = DATE('d/m/Y',strtotime($r[tgl_lahir]));
65
+                                $tgl_lahir = DATE('d/m/Y', strtotime($r[tgl_lahir]));
66 66
 
67
-                                if ($r['gender'] == 'L') {
67
+                                if ($r['gender']=='L') {
68 68
                                     $gender    = 'Laki-laki';
69 69
                                 } else {
70 70
                                     $gender    = 'Perempuan';
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
                             echo"<td style='text-align:center;'>$r[aktif]</td>";  
84 84
                             echo" <td  style='text-align:center;'>";
85 85
                             ?>
86
-                            <a href='#' title='Cetak' onclick="window.open('./modul/mod_<?php echo $module;?>/cetak_pasien.php?id_pasien=<?php echo $r[id_pasien];?>', '', 'height=500,width=600,resizable=1,scrollbars=1,addressbars=0,directories=no,location=no')">
86
+                            <a href='#' title='Cetak' onclick="window.open('./modul/mod_<?php echo $module; ?>/cetak_pasien.php?id_pasien=<?php echo $r[id_pasien]; ?>', '', 'height=500,width=600,resizable=1,scrollbars=1,addressbars=0,directories=no,location=no')">
87 87
 
88 88
                             <span class='icon'><i class='fa fa-print'></i></span>
89 89
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 
92 92
                             <?
93 93
 
94
-                            if($r_edit == 'Y') {
94
+                            if ($r_edit=='Y') {
95 95
                                echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_pasien=$r[id_pasien]&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>";
96 96
                                }
97 97
 
Please login to merge, or discard this patch.
modul/mod_pasien/form_pasien.php 3 patches
Indentation   +27 added lines, -27 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,27 +41,27 @@  discard block
 block discarded – undo
41 41
 
42 42
 $id_module = $_GET['id_module']; 
43 43
 
44
-  $id = isset($_GET['id_pasien']) ? intval($_GET['id_pasien']) : false;
44
+    $id = isset($_GET['id_pasien']) ? intval($_GET['id_pasien']) : false;
45 45
   
46
-  if($id){
47
-     $query = mysql_query('SELECT * FROM pasien WHERE id_pasien = "'.$id.'"');
48
-     if($query && mysql_num_rows($query) == 1){
46
+    if($id){
47
+        $query = mysql_query('SELECT * FROM pasien WHERE id_pasien = "'.$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_pasien;
57
+    $group  = $data->id_pasien;
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
 
@@ -139,14 +139,14 @@  discard block
 block discarded – undo
139 139
               <div class="col-md-6 col-sm-6 col-xs-12" >
140 140
                  <select name="agama" class="form-control">                
141 141
                     <?
142
-                      $query = mysql_query('SELECT * FROM agama ORDER BY agama');
143
-                       if($query && mysql_num_rows($query) > 0){
144
-                          while($row = mysql_fetch_object($query)){
145
-                             echo '<option value="'.$row->id_agama.'"';
146
-                             if($row->id_agama == @$data->id_agama) echo ' selected';
147
-                             echo '>'.$row->agama.'</option>';
148
-                          }
149
-                       }        
142
+                        $query = mysql_query('SELECT * FROM agama ORDER BY agama');
143
+                        if($query && mysql_num_rows($query) > 0){
144
+                            while($row = mysql_fetch_object($query)){
145
+                                echo '<option value="'.$row->id_agama.'"';
146
+                                if($row->id_agama == @$data->id_agama) echo ' selected';
147
+                                echo '>'.$row->agama.'</option>';
148
+                            }
149
+                        }        
150 150
                     ?>
151 151
                     </select>
152 152
               </div>
@@ -156,14 +156,14 @@  discard block
 block discarded – undo
156 156
               <div class="col-md-6 col-sm-6 col-xs-12" >
157 157
                  <select name="kategori" class="form-control">                
158 158
                     <?
159
-                      $query = mysql_query('SELECT * FROM kategori ORDER BY kategori');
160
-                       if($query && mysql_num_rows($query) > 0){
161
-                          while($row = mysql_fetch_object($query)){
162
-                             echo '<option value="'.$row->id_kategori.'"';
163
-                             if($row->id_kategori == @$data->id_kategori) echo ' selected';
164
-                             echo '>'.$row->kategori.'</option>';
165
-                          }
166
-                       }        
159
+                        $query = mysql_query('SELECT * FROM kategori ORDER BY kategori');
160
+                        if($query && mysql_num_rows($query) > 0){
161
+                            while($row = mysql_fetch_object($query)){
162
+                                echo '<option value="'.$row->id_kategori.'"';
163
+                                if($row->id_kategori == @$data->id_kategori) echo ' selected';
164
+                                echo '>'.$row->kategori.'</option>';
165
+                            }
166
+                        }        
167 167
                     ?>
168 168
                     </select>
169 169
               </div>
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 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_pasien']) ? intval($_GET['id_pasien']) : false;
45 45
   
46
-  if($id){
46
+  if ($id) {
47 47
      $query = mysql_query('SELECT * FROM pasien WHERE id_pasien = "'.$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
   
@@ -96,9 +96,9 @@  discard block
 block discarded – undo
96 96
               </div>
97 97
           </div>
98 98
 
99
-          <?php if ($id){ ?>  
99
+          <?php if ($id) { ?>  
100 100
 
101
-            <?php if (@$data->gender=='L'){ ?>
101
+            <?php if (@$data->gender=='L') { ?>
102 102
               
103 103
                 <div class="form-group">
104 104
                  <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Jenis Kelamin</label>
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
                     <input type=radio name='gender' value='P' class="flat"> Perempuan                
108 108
                   </div>
109 109
               </div>  
110
-            <?php   }else{ ?>  
110
+            <?php   } else { ?>  
111 111
               
112 112
                 <div class="form-group">
113 113
                  <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Jenis Kelamin</label>
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
               </div>  
119 119
              <?php } ?>
120 120
 
121
-        <?php   }else{ ?>  
121
+        <?php   } else { ?>  
122 122
 
123 123
            
124 124
                 <div class="form-group">
@@ -140,10 +140,10 @@  discard block
 block discarded – undo
140 140
                  <select name="agama" class="form-control">                
141 141
                     <?
142 142
                       $query = mysql_query('SELECT * FROM agama ORDER BY agama');
143
-                       if($query && mysql_num_rows($query) > 0){
144
-                          while($row = mysql_fetch_object($query)){
143
+                       if ($query && mysql_num_rows($query)>0) {
144
+                          while ($row = mysql_fetch_object($query)) {
145 145
                              echo '<option value="'.$row->id_agama.'"';
146
-                             if($row->id_agama == @$data->id_agama) echo ' selected';
146
+                             if ($row->id_agama==@$data->id_agama) echo ' selected';
147 147
                              echo '>'.$row->agama.'</option>';
148 148
                           }
149 149
                        }        
@@ -157,10 +157,10 @@  discard block
 block discarded – undo
157 157
                  <select name="kategori" class="form-control">                
158 158
                     <?
159 159
                       $query = mysql_query('SELECT * FROM kategori ORDER BY kategori');
160
-                       if($query && mysql_num_rows($query) > 0){
161
-                          while($row = mysql_fetch_object($query)){
160
+                       if ($query && mysql_num_rows($query)>0) {
161
+                          while ($row = mysql_fetch_object($query)) {
162 162
                              echo '<option value="'.$row->id_kategori.'"';
163
-                             if($row->id_kategori == @$data->id_kategori) echo ' selected';
163
+                             if ($row->id_kategori==@$data->id_kategori) echo ' selected';
164 164
                              echo '>'.$row->kategori.'</option>';
165 165
                           }
166 166
                        }        
@@ -183,9 +183,9 @@  discard block
 block discarded – undo
183 183
           </div>    
184 184
 
185 185
         
186
-          <?php if ($id){ ?>  
186
+          <?php if ($id) { ?>  
187 187
     
188
-            <?php if (@$data->aktif=='Y'){ ?>
188
+            <?php if (@$data->aktif=='Y') { ?>
189 189
               
190 190
                 <div class="form-group">
191 191
 	               <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Aktif:</label>
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
                     <input type=radio name='aktif' value='N' class="flat"> T                
195 195
                   </div>
196 196
               </div>  
197
-            <?php   }else{ ?>  
197
+            <?php   } else { ?>  
198 198
               
199 199
                 <div class="form-group">
200 200
 	               <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Aktif:</label>
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
               </div>  
206 206
              <?php } ?>
207 207
 
208
-        <?php   }else{ ?>  
208
+        <?php   } else { ?>  
209 209
 
210 210
            
211 211
                 <div class="form-group">
Please login to merge, or discard this patch.
Braces   +13 added lines, -8 removed lines patch added patch discarded remove patch
@@ -47,8 +47,9 @@  discard block
 block discarded – undo
47 47
      $query = mysql_query('SELECT * FROM pasien WHERE id_pasien = "'.$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']) {
@@ -107,7 +108,7 @@  discard block
 block discarded – undo
107 108
                     <input type=radio name='gender' value='P' class="flat"> Perempuan                
108 109
                   </div>
109 110
               </div>  
110
-            <?php   }else{ ?>  
111
+            <?php   } else{ ?>  
111 112
               
112 113
                 <div class="form-group">
113 114
                  <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Jenis Kelamin</label>
@@ -118,7 +119,7 @@  discard block
 block discarded – undo
118 119
               </div>  
119 120
              <?php } ?>
120 121
 
121
-        <?php   }else{ ?>  
122
+        <?php   } else{ ?>  
122 123
 
123 124
            
124 125
                 <div class="form-group">
@@ -143,7 +144,9 @@  discard block
 block discarded – undo
143 144
                        if($query && mysql_num_rows($query) > 0){
144 145
                           while($row = mysql_fetch_object($query)){
145 146
                              echo '<option value="'.$row->id_agama.'"';
146
-                             if($row->id_agama == @$data->id_agama) echo ' selected';
147
+                             if($row->id_agama == @$data->id_agama) {
148
+                                 echo ' selected';
149
+                             }
147 150
                              echo '>'.$row->agama.'</option>';
148 151
                           }
149 152
                        }        
@@ -160,7 +163,9 @@  discard block
 block discarded – undo
160 163
                        if($query && mysql_num_rows($query) > 0){
161 164
                           while($row = mysql_fetch_object($query)){
162 165
                              echo '<option value="'.$row->id_kategori.'"';
163
-                             if($row->id_kategori == @$data->id_kategori) echo ' selected';
166
+                             if($row->id_kategori == @$data->id_kategori) {
167
+                                 echo ' selected';
168
+                             }
164 169
                              echo '>'.$row->kategori.'</option>';
165 170
                           }
166 171
                        }        
@@ -194,7 +199,7 @@  discard block
 block discarded – undo
194 199
                     <input type=radio name='aktif' value='N' class="flat"> T                
195 200
                   </div>
196 201
               </div>  
197
-            <?php   }else{ ?>  
202
+            <?php   } else{ ?>  
198 203
               
199 204
                 <div class="form-group">
200 205
 	               <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Aktif:</label>
@@ -205,7 +210,7 @@  discard block
 block discarded – undo
205 210
               </div>  
206 211
              <?php } ?>
207 212
 
208
-        <?php   }else{ ?>  
213
+        <?php   } else{ ?>  
209 214
 
210 215
            
211 216
                 <div class="form-group">
Please login to merge, or discard this patch.
modul/mod_pasien/cetak_pasien.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -368,9 +368,9 @@  discard block
 block discarded – undo
368 368
 
369 369
 
370 370
 
371
- $gtampil=mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
371
+    $gtampil=mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
372 372
 
373
- $g=mysql_fetch_array($gtampil);
373
+    $g=mysql_fetch_array($gtampil);
374 374
 
375 375
 
376 376
 
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
 
393 393
 
394 394
 
395
- ?>
395
+    ?>
396 396
 
397 397
 <div style='border:1px solid black;'>
398 398
 
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
 
412 412
 
413 413
 <?
414
- $tampil=mysql_query("SELECT a.*,b.agama,c.kategori
414
+    $tampil=mysql_query("SELECT a.*,b.agama,c.kategori
415 415
                 FROM pasien a left join agama b 
416 416
                  ON a.id_agama = b.id_agama
417 417
                  left join kategori c
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -8,11 +8,11 @@  discard block
 block discarded – undo
8 8
 include "./../../config/qrcode/qrlib.php";
9 9
 
10 10
 
11
-$tampil=mysql_query("SELECT * FROM modul WHERE id_modul ='".$_GET[report_id]."'");
11
+$tampil = mysql_query("SELECT * FROM modul WHERE id_modul ='".$_GET[report_id]."'");
12 12
 
13 13
                         
14 14
 
15
-$r=mysql_fetch_array($tampil);
15
+$r = mysql_fetch_array($tampil);
16 16
 
17 17
 
18 18
 
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
 
48 48
 
49
-$status     = $_GET['status'];
49
+$status = $_GET['status'];
50 50
 
51 51
 
52 52
 
@@ -364,13 +364,13 @@  discard block
 block discarded – undo
364 364
 
365 365
 
366 366
 
367
-$id_pasien    = $_GET['id_pasien']; 
367
+$id_pasien = $_GET['id_pasien']; 
368 368
 
369 369
 
370 370
 
371
- $gtampil=mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
371
+ $gtampil = mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
372 372
 
373
- $g=mysql_fetch_array($gtampil);
373
+ $g = mysql_fetch_array($gtampil);
374 374
 
375 375
 
376 376
 
@@ -411,18 +411,18 @@  discard block
 block discarded – undo
411 411
 
412 412
 
413 413
 <?
414
- $tampil=mysql_query("SELECT a.*,b.agama,c.kategori
414
+ $tampil = mysql_query("SELECT a.*,b.agama,c.kategori
415 415
                 FROM pasien a left join agama b 
416 416
                  ON a.id_agama = b.id_agama
417 417
                  left join kategori c
418 418
                  ON a.id_kategori = c.id_kategori
419 419
                 WHERE a.id_pasien = '$id_pasien' ");
420 420
                             
421
-$r=mysql_fetch_array($tampil);
421
+$r = mysql_fetch_array($tampil);
422 422
 
423
-$tgl_lahir = DATE('d/m/Y',strtotime($r[tgl_lahir]));
423
+$tgl_lahir = DATE('d/m/Y', strtotime($r[tgl_lahir]));
424 424
 
425
-if ($r['gender'] == 'L') {
425
+if ($r['gender']=='L') {
426 426
     $gender    = 'Laki-laki';
427 427
 } else {
428 428
     $gender    = 'Perempuan';
@@ -434,22 +434,22 @@  discard block
 block discarded – undo
434 434
 <tr>
435 435
     <td width='30%'>NIP</td>
436 436
     <td width='1%'>:</td>
437
-    <td><?=$r['ktp'];?></td>
437
+    <td><?=$r['ktp']; ?></td>
438 438
 </tr>
439 439
 <tr>
440 440
     <td width='30%'>Nama</td>
441 441
     <td width='1%'>:</td>
442
-    <td><?=$r['nama'];?></td>
442
+    <td><?=$r['nama']; ?></td>
443 443
 </tr>    
444 444
 <tr>
445 445
     <td width='30%'>Jenis Kelamin</td>
446 446
     <td width='1%'>:</td>
447
-    <td><?=$gender;?></td>
447
+    <td><?=$gender; ?></td>
448 448
 </tr>
449 449
 <tr>
450 450
     <td width='30%'>Kategori Pasien</td>
451 451
     <td width='1%'>:</td>
452
-    <td><?=$r['kategori'];?></td>
452
+    <td><?=$r['kategori']; ?></td>
453 453
 </tr>
454 454
 </table>    
455 455
 
Please login to merge, or discard this patch.
modul/mod_report_rekap_harian/print_report_rekap_harian.php 3 patches
Indentation   +152 added lines, -152 removed lines patch added patch discarded remove patch
@@ -13,83 +13,83 @@  discard block
 block discarded – undo
13 13
 
14 14
 function getBulan1($bln1){
15 15
 
16
-				switch ($bln1){
16
+                switch ($bln1){
17 17
 
18
-					case 1: 
18
+                    case 1: 
19 19
 
20
-						return "Januari";
20
+                        return "Januari";
21 21
 
22
-						break;
22
+                        break;
23 23
 
24
-					case 2:
24
+                    case 2:
25 25
 
26
-						return "Februari";
26
+                        return "Februari";
27 27
 
28
-						break;
28
+                        break;
29 29
 
30
-					case 3:
30
+                    case 3:
31 31
 
32
-						return "Maret";
32
+                        return "Maret";
33 33
 
34
-						break;
34
+                        break;
35 35
 
36
-					case 4:
36
+                    case 4:
37 37
 
38
-						return "April";
38
+                        return "April";
39 39
 
40
-						break;
40
+                        break;
41 41
 
42
-					case 5:
42
+                    case 5:
43 43
 
44
-						return "Mei";
44
+                        return "Mei";
45 45
 
46
-						break;
46
+                        break;
47 47
 
48
-					case 6:
48
+                    case 6:
49 49
 
50
-						return "Juni";
50
+                        return "Juni";
51 51
 
52
-						break;
52
+                        break;
53 53
 
54
-					case 7:
54
+                    case 7:
55 55
 
56
-						return "Juli";
56
+                        return "Juli";
57 57
 
58
-						break;
58
+                        break;
59 59
 
60
-					case 8:
60
+                    case 8:
61 61
 
62
-						return "Agustus";
62
+                        return "Agustus";
63 63
 
64
-						break;
64
+                        break;
65 65
 
66
-					case 9:
66
+                    case 9:
67 67
 
68
-						return "September";
68
+                        return "September";
69 69
 
70
-						break;
70
+                        break;
71 71
 
72
-					case 10:
72
+                    case 10:
73 73
 
74
-						return "Oktober";
74
+                        return "Oktober";
75 75
 
76
-						break;
76
+                        break;
77 77
 
78
-					case 11:
78
+                    case 11:
79 79
 
80
-						return "November";
80
+                        return "November";
81 81
 
82
-						break;
82
+                        break;
83 83
 
84
-					case 12:
84
+                    case 12:
85 85
 
86
-						return "Desember";
86
+                        return "Desember";
87 87
 
88
-						break;
88
+                        break;
89 89
 
90
-				}
90
+                }
91 91
 
92
-			} 
92
+            } 
93 93
 
94 94
 $report_id = $_GET[report_id];
95 95
 $tampil=mysql_query("SELECT * FROM modul WHERE id_modul ='".$report_id."'");
@@ -248,38 +248,38 @@  discard block
 block discarded – undo
248 248
 
249 249
       <?
250 250
 
251
-       $gtampil=mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
251
+        $gtampil=mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
252 252
 
253
-       $g=mysql_fetch_array($gtampil);
253
+        $g=mysql_fetch_array($gtampil);
254 254
 
255 255
 
256 256
 
257
-      if ($g['pict']) {
257
+        if ($g['pict']) {
258 258
 
259 259
         $pict = $g['pict'];
260 260
 
261
-      } else {
261
+        } else {
262 262
 
263 263
         $pict = '';
264 264
 
265
-      }
265
+        }
266 266
 
267 267
 
268
-      $company = ucwords($g['company']);
268
+        $company = ucwords($g['company']);
269 269
 
270
-      $jsql   = mysql_query("SELECT * FROM jenis_transaksi
270
+        $jsql   = mysql_query("SELECT * FROM jenis_transaksi
271 271
                             WHERE id_jenis_transaksi = '$jenis_transaksi' 
272 272
 
273 273
                            ");
274 274
 
275 275
 
276 276
 
277
-      $j     = mysql_fetch_array($jsql); 
277
+        $j     = mysql_fetch_array($jsql); 
278 278
 
279
-      $jenis_transaksi   = $j['jenis_transaksi'];  
279
+        $jenis_transaksi   = $j['jenis_transaksi'];  
280 280
 
281 281
 
282
-      $sql   = mysql_query("SELECT a.*,b.shift FROM kasir  a LEFT JOIN shift b 
282
+        $sql   = mysql_query("SELECT a.*,b.shift FROM kasir  a LEFT JOIN shift b 
283 283
                             ON a.id_shift = b.id_shift
284 284
                             WHERE a.id_kasir = '$k_ID' 
285 285
 
@@ -287,20 +287,20 @@  discard block
 block discarded – undo
287 287
 
288 288
 
289 289
 
290
-      $r     = mysql_fetch_array($sql); 
290
+        $r     = mysql_fetch_array($sql); 
291 291
 
292 292
 
293
-      $penjualan_barang   = $r['id_kasir'];  
293
+        $penjualan_barang   = $r['id_kasir'];  
294 294
 
295
-      $shift   = $r['shift'];  
295
+        $shift   = $r['shift'];  
296 296
 
297
-      $petugas   = $r['petugas'];  
297
+        $petugas   = $r['petugas'];  
298 298
 
299
-      $status   = $r['status']; 
299
+        $status   = $r['status']; 
300 300
 
301
-      $tanggal   = DATE('d/m/Y',strtotime($r['tanggal']));  
301
+        $tanggal   = DATE('d/m/Y',strtotime($r['tanggal']));  
302 302
 
303
-      ?>
303
+        ?>
304 304
 
305 305
       <table width="100%">
306 306
       <tr>
@@ -329,11 +329,11 @@  discard block
 block discarded – undo
329 329
           
330 330
                 while ($h=mysql_fetch_array($htampil)){  
331 331
 
332
-                	echo "<th colspan='2'>".$h['penjamin']."</th>";
332
+                    echo "<th colspan='2'>".$h['penjamin']."</th>";
333 333
 
334 334
                 } 	
335 335
 
336
-               ?> 	
336
+                ?> 	
337 337
 
338 338
                <th colspan ="4" >UMUM</th>  
339 339
                <th rowspan="2" >PIC</th>  
@@ -348,14 +348,14 @@  discard block
 block discarded – undo
348 348
             <tr>
349 349
 
350 350
                <? 
351
-               	for($j = 1; $j <= $hjml; $j++)  { 
351
+                    for($j = 1; $j <= $hjml; $j++)  { 
352 352
 
353
-               		echo "<th>JML</th>";  
354
-               		echo "<th>RUPIAH</th>";  
353
+                        echo "<th>JML</th>";  
354
+                        echo "<th>RUPIAH</th>";  
355 355
 
356 356
 
357
-               	 }	
358
-               ?>	
357
+                    }	
358
+                ?>	
359 359
 
360 360
 
361 361
                <th>JML</th>  
@@ -378,18 +378,18 @@  discard block
 block discarded – undo
378 378
 
379 379
       	  <? for($i = 1; $i <= 31; $i++)  { 
380 380
 
381
-      	  	 echo"<tr>";
381
+                    echo"<tr>";
382 382
 
383
-             echo"<td style='text-align:center;'>$i</td>"; 
383
+                echo"<td style='text-align:center;'>$i</td>"; 
384 384
 
385
-             if (strlen($i) == '1') {
386
-             	$tgl = $prd.'-0'.$i;
387
-             } else {
388
-             	$tgl = $prd.'-'.$i;
389
-             }
385
+                if (strlen($i) == '1') {
386
+                    $tgl = $prd.'-0'.$i;
387
+                } else {
388
+                    $tgl = $prd.'-'.$i;
389
+                }
390 390
 
391
-             //transaksi asuransi
392
-             $dtampil1=mysql_query("SELECT a.id_penjamin
391
+                //transaksi asuransi
392
+                $dtampil1=mysql_query("SELECT a.id_penjamin
393 393
 										,	COUNT(c.jumlah) as jml 
394 394
 										,	IFNULL(SUM(c.jumlah),0) as rp  
395 395
 									FROM penjamin a LEFT JOIN kasir b
@@ -406,16 +406,16 @@  discard block
 block discarded – undo
406 406
 									ORDER BY a.id_penjamin");
407 407
 
408 408
           
409
-             while ($d1=mysql_fetch_array($dtampil1)){  
409
+                while ($d1=mysql_fetch_array($dtampil1)){  
410 410
 
411 411
 
412
-              	echo "<th>".$d1['jml']."</th>";
413
-              	echo "<th style='text-align:right;'>".number_format($d1['rp'], 0, ".", ",")."</th>";
412
+                    echo "<th>".$d1['jml']."</th>";
413
+                    echo "<th style='text-align:right;'>".number_format($d1['rp'], 0, ".", ",")."</th>";
414 414
 
415
-             } 	
415
+                } 	
416 416
 
417
-              //transaksi umum tunai
418
-              $dtampil2=mysql_query("SELECT COUNT(c.jumlah) as jml 
417
+                //transaksi umum tunai
418
+                $dtampil2=mysql_query("SELECT COUNT(c.jumlah) as jml 
419 419
 										,	IFNULL(SUM(c.jumlah),0) as rp  
420 420
 									FROM kasir b LEFT JOIN kasir_detail c
421 421
 									ON  b.id_kasir = c.id_kasir
@@ -425,15 +425,15 @@  discard block
 block discarded – undo
425 425
 									WHERE b.tanggal = '$tgl'
426 426
 									AND b.status != '4'");
427 427
                        
428
-             $d2=mysql_fetch_array($dtampil2);
428
+                $d2=mysql_fetch_array($dtampil2);
429 429
 
430 430
 
431
-             echo "<th>".$d2['jml']."</th>";
432
-             echo "<th style='text-align:right;'>".number_format($d2['rp'], 0, ".", ",")."</th>";
431
+                echo "<th>".$d2['jml']."</th>";
432
+                echo "<th style='text-align:right;'>".number_format($d2['rp'], 0, ".", ",")."</th>";
433 433
 
434 434
 
435
-              //transaksi umum tunai
436
-              $dtampil3=mysql_query("SELECT COUNT(c.jumlah) as jml 
435
+                //transaksi umum tunai
436
+                $dtampil3=mysql_query("SELECT COUNT(c.jumlah) as jml 
437 437
 										,	IFNULL(SUM(c.jumlah),0) as rp  
438 438
 									FROM kasir b LEFT JOIN kasir_detail c
439 439
 									ON  b.id_kasir = c.id_kasir
@@ -443,22 +443,22 @@  discard block
 block discarded – undo
443 443
 									WHERE b.tanggal = '$tgl'
444 444
 									AND b.status != '4'");
445 445
                        
446
-             $d3=mysql_fetch_array($dtampil3);
446
+                $d3=mysql_fetch_array($dtampil3);
447 447
 
448 448
 
449
-             echo "<th>".$d3['jml']."</th>";
450
-             echo "<th style='text-align:right;'>".number_format($d3['rp'], 0, ".", ",")."</th>";
449
+                echo "<th>".$d3['jml']."</th>";
450
+                echo "<th style='text-align:right;'>".number_format($d3['rp'], 0, ".", ",")."</th>";
451 451
 
452
-             echo "<th></th>";          	
453
-             echo "<th></th>";
454
-             echo "<th></th>";
452
+                echo "<th></th>";          	
453
+                echo "<th></th>";
454
+                echo "<th></th>";
455 455
 
456
-             echo "<th></th>";          	
457
-             echo "<th></th>";
458
-             echo "<th></th>";
456
+                echo "<th></th>";          	
457
+                echo "<th></th>";
458
+                echo "<th></th>";
459 459
 
460
-             //total jml
461
-              $dtampil4=mysql_query("SELECT COUNT(c.jumlah) as jml 
460
+                //total jml
461
+                $dtampil4=mysql_query("SELECT COUNT(c.jumlah) as jml 
462 462
 									FROM kasir b LEFT JOIN kasir_detail c
463 463
 									ON  b.id_kasir = c.id_kasir
464 464
 									AND c.status != '4'
@@ -466,13 +466,13 @@  discard block
 block discarded – undo
466 466
 									WHERE b.tanggal = '$tgl'
467 467
 									AND b.status != '4'");
468 468
                        
469
-             $d4=mysql_fetch_array($dtampil4);
469
+                $d4=mysql_fetch_array($dtampil4);
470 470
 
471 471
 
472
-             echo "<th>".$d4['jml']."</th>";
472
+                echo "<th>".$d4['jml']."</th>";
473 473
 
474
-             //total pembayaran
475
-             $dtampil5=mysql_query("SELECT a.groups
474
+                //total pembayaran
475
+                $dtampil5=mysql_query("SELECT a.groups
476 476
 										,	IFNULL(SUM(c.jumlah),0) as rp  
477 477
 									FROM jenis_pembayaran a LEFT JOIN kasir b
478 478
 									ON  b.tanggal = '$tgl'
@@ -485,33 +485,33 @@  discard block
 block discarded – undo
485 485
 									GROUP BY a.groups
486 486
 									ORDER BY a.groups");
487 487
                        
488
-             while ($d5=mysql_fetch_array($dtampil5)){  
488
+                while ($d5=mysql_fetch_array($dtampil5)){  
489 489
 
490 490
 
491
-              	echo "<th style='text-align:right;'>".number_format($d5['rp'], 0, ".", ",")."</th>";
491
+                    echo "<th style='text-align:right;'>".number_format($d5['rp'], 0, ".", ",")."</th>";
492 492
 
493
-             } 	
493
+                } 	
494 494
 
495 495
 
496 496
 
497 497
 
498
-             echo"</tr>";
498
+                echo"</tr>";
499 499
 
500 500
 
501
-      	  } ?>
501
+            } ?>
502 502
 
503 503
       	</tbody>
504 504
 
505 505
       	<? 
506 506
 
507
-      	  	 echo"<tr>";
507
+                    echo"<tr>";
508 508
 
509
-             echo"<th style='text-align:center;'>TOTAL</th>"; 
509
+                echo"<th style='text-align:center;'>TOTAL</th>"; 
510 510
 
511 511
       
512 512
 
513
-             //transaksi asuransi
514
-             $dtampil1=mysql_query("SELECT a.id_penjamin
513
+                //transaksi asuransi
514
+                $dtampil1=mysql_query("SELECT a.id_penjamin
515 515
 										,	COUNT(c.jumlah) as jml 
516 516
 										,	IFNULL(SUM(c.jumlah),0) as rp  
517 517
 									FROM penjamin a LEFT JOIN kasir b
@@ -527,16 +527,16 @@  discard block
 block discarded – undo
527 527
 									GROUP BY a.id_penjamin
528 528
 									ORDER BY a.id_penjamin");
529 529
                        
530
-             while ($d1=mysql_fetch_array($dtampil1)){  
530
+                while ($d1=mysql_fetch_array($dtampil1)){  
531 531
 
532 532
 
533
-              	echo "<th>".$d1['jml']."</th>";
534
-              	echo "<th style='text-align:right;'>".number_format($d1['rp'], 0, ".", ",")."</th>";
533
+                    echo "<th>".$d1['jml']."</th>";
534
+                    echo "<th style='text-align:right;'>".number_format($d1['rp'], 0, ".", ",")."</th>";
535 535
 
536
-             } 	
536
+                } 	
537 537
 
538
-              //transaksi umum tunai
539
-              $dtampil2=mysql_query("SELECT COUNT(c.jumlah) as jml 
538
+                //transaksi umum tunai
539
+                $dtampil2=mysql_query("SELECT COUNT(c.jumlah) as jml 
540 540
 										,	IFNULL(SUM(c.jumlah),0) as rp  
541 541
 									FROM kasir b LEFT JOIN kasir_detail c
542 542
 									ON  b.id_kasir = c.id_kasir
@@ -546,15 +546,15 @@  discard block
 block discarded – undo
546 546
 									AND  b.tanggal LIKE '$prd%'
547 547
 									AND b.status != '4'");
548 548
                        
549
-             $d2=mysql_fetch_array($dtampil2);
549
+                $d2=mysql_fetch_array($dtampil2);
550 550
 
551 551
 
552
-             echo "<th>".$d2['jml']."</th>";
553
-             echo "<th style='text-align:right;'>".number_format($d2['rp'], 0, ".", ",")."</th>";
552
+                echo "<th>".$d2['jml']."</th>";
553
+                echo "<th style='text-align:right;'>".number_format($d2['rp'], 0, ".", ",")."</th>";
554 554
 
555 555
 
556
-              //transaksi umum tunai
557
-              $dtampil3=mysql_query("SELECT COUNT(c.jumlah) as jml 
556
+                //transaksi umum tunai
557
+                $dtampil3=mysql_query("SELECT COUNT(c.jumlah) as jml 
558 558
 										,	IFNULL(SUM(c.jumlah),0) as rp  
559 559
 									FROM kasir b LEFT JOIN kasir_detail c
560 560
 									ON  b.id_kasir = c.id_kasir
@@ -564,22 +564,22 @@  discard block
 block discarded – undo
564 564
 									WHERE b.tanggal LIKE '$prd%'
565 565
 									AND b.status != '4'");
566 566
                        
567
-             $d3=mysql_fetch_array($dtampil3);
567
+                $d3=mysql_fetch_array($dtampil3);
568 568
 
569 569
 
570
-             echo "<th>".$d3['jml']."</th>";
571
-             echo "<th style='text-align:right;'>".number_format($d3['rp'], 0, ".", ",")."</th>";
570
+                echo "<th>".$d3['jml']."</th>";
571
+                echo "<th style='text-align:right;'>".number_format($d3['rp'], 0, ".", ",")."</th>";
572 572
 
573
-             echo "<th></th>";          	
574
-             echo "<th></th>";
575
-             echo "<th></th>";
573
+                echo "<th></th>";          	
574
+                echo "<th></th>";
575
+                echo "<th></th>";
576 576
 
577
-             echo "<th></th>";          	
578
-             echo "<th></th>";
579
-             echo "<th></th>";
577
+                echo "<th></th>";          	
578
+                echo "<th></th>";
579
+                echo "<th></th>";
580 580
 
581
-             //total jml
582
-              $dtampil4=mysql_query("SELECT COUNT(c.jumlah) as jml 
581
+                //total jml
582
+                $dtampil4=mysql_query("SELECT COUNT(c.jumlah) as jml 
583 583
 									FROM kasir b LEFT JOIN kasir_detail c
584 584
 									ON  b.id_kasir = c.id_kasir
585 585
 									AND c.status != '4'
@@ -587,13 +587,13 @@  discard block
 block discarded – undo
587 587
 									WHERE b.tanggal LIKE '$prd%'
588 588
 									AND b.status != '4'");
589 589
                        
590
-             $d4=mysql_fetch_array($dtampil4);
590
+                $d4=mysql_fetch_array($dtampil4);
591 591
 
592 592
 
593
-             echo "<th>".$d4['jml']."</th>";
593
+                echo "<th>".$d4['jml']."</th>";
594 594
 
595
-             //total pembayaran
596
-             $dtampil5=mysql_query("SELECT a.groups
595
+                //total pembayaran
596
+                $dtampil5=mysql_query("SELECT a.groups
597 597
 										,	IFNULL(SUM(c.jumlah),0) as rp  
598 598
 									FROM jenis_pembayaran a LEFT JOIN kasir b
599 599
 									ON  b.tanggal LIKE '$prd%'
@@ -606,24 +606,24 @@  discard block
 block discarded – undo
606 606
 									GROUP BY a.groups
607 607
 									ORDER BY a.groups");
608 608
                        
609
-             while ($d5=mysql_fetch_array($dtampil5)){  
609
+                while ($d5=mysql_fetch_array($dtampil5)){  
610 610
 
611 611
 
612
-              	echo "<th style='text-align:right;'>".number_format($d5['rp'], 0, ".", ",")."</th>";
612
+                    echo "<th style='text-align:right;'>".number_format($d5['rp'], 0, ".", ",")."</th>";
613 613
 
614
-             } 	
614
+                } 	
615 615
 
616 616
 
617 617
 
618 618
 
619
-             echo"</tr>";
619
+                echo"</tr>";
620 620
 
621
-             echo"<tr>";
621
+                echo"<tr>";
622 622
 
623
-             echo"<th style='text-align:center;' colspan='23'>TOTAL REVENUE</th>"; 
623
+                echo"<th style='text-align:center;' colspan='23'>TOTAL REVENUE</th>"; 
624 624
 
625
-             //total jml
626
-              $dtampil4=mysql_query("SELECT COUNT(c.jumlah) as jml 
625
+                //total jml
626
+                $dtampil4=mysql_query("SELECT COUNT(c.jumlah) as jml 
627 627
 									FROM kasir b LEFT JOIN kasir_detail c
628 628
 									ON  b.id_kasir = c.id_kasir
629 629
 									AND c.status != '4'
@@ -631,13 +631,13 @@  discard block
 block discarded – undo
631 631
 									WHERE b.tanggal LIKE '$prd%'
632 632
 									AND b.status != '4'");
633 633
                        
634
-             $d4=mysql_fetch_array($dtampil4);
634
+                $d4=mysql_fetch_array($dtampil4);
635 635
 
636 636
 
637
-             echo "<th>".$d4['jml']."</th>";
637
+                echo "<th>".$d4['jml']."</th>";
638 638
 
639
-             //total pembayaran
640
-             $dtampil5=mysql_query("SELECT IFNULL(SUM(c.jumlah),0) as rp  
639
+                //total pembayaran
640
+                $dtampil5=mysql_query("SELECT IFNULL(SUM(c.jumlah),0) as rp  
641 641
 									FROM  kasir b LEFT JOIN kasir_detail c
642 642
 									ON  b.id_kasir = c.id_kasir
643 643
 									AND c.status != '4'
@@ -645,14 +645,14 @@  discard block
 block discarded – undo
645 645
 									WHERE b.tanggal LIKE '$prd%'
646 646
 									AND b.status != '4'");
647 647
                        
648
-             $d5=mysql_fetch_array($dtampil5);
648
+                $d5=mysql_fetch_array($dtampil5);
649 649
 
650 650
 
651
-              	echo "<th style='text-align:right;' colspan='2'>".number_format($d5['rp'], 0, ".", ",")."</th>";
651
+                    echo "<th style='text-align:right;' colspan='2'>".number_format($d5['rp'], 0, ".", ",")."</th>";
652 652
 
653 653
             	
654 654
 
655
-      	  ?>
655
+            ?>
656 656
 
657 657
 
658 658
 
@@ -667,13 +667,13 @@  discard block
 block discarded – undo
667 667
     $month = DATE('m',strtotime($iprd))*1;
668 668
 
669 669
     if ($month == '1') {
670
-    	$imonth = 12;
670
+        $imonth = 12;
671 671
     } else {
672
-    	$imonth = $month-1;
672
+        $imonth = $month-1;
673 673
     }
674 674
 
675
-	$nprd = $lastday.' '.getBulan1($imonth).' '.$year;
676
-	?>
675
+    $nprd = $lastday.' '.getBulan1($imonth).' '.$year;
676
+    ?>
677 677
 
678 678
     <table width="100%">
679 679
     	<tr>
Please login to merge, or discard this patch.
Spacing   +66 added lines, -66 removed lines patch added patch discarded remove patch
@@ -11,9 +11,9 @@  discard block
 block discarded – undo
11 11
 include "./../../config/koneksi.php";
12 12
 //include "./../../config/fungsi_indobulan.php";
13 13
 
14
-function getBulan1($bln1){
14
+function getBulan1($bln1) {
15 15
 
16
-				switch ($bln1){
16
+				switch ($bln1) {
17 17
 
18 18
 					case 1: 
19 19
 
@@ -92,11 +92,11 @@  discard block
 block discarded – undo
92 92
 			} 
93 93
 
94 94
 $report_id = $_GET[report_id];
95
-$tampil=mysql_query("SELECT * FROM modul WHERE id_modul ='".$report_id."'");
95
+$tampil = mysql_query("SELECT * FROM modul WHERE id_modul ='".$report_id."'");
96 96
 
97 97
             
98 98
 
99
-$r=mysql_fetch_array($tampil);
99
+$r = mysql_fetch_array($tampil);
100 100
 
101 101
 //module=$module&report_id=$report_id&k_ID=$k_ID
102 102
 
@@ -104,21 +104,21 @@  discard block
 block discarded – undo
104 104
 
105 105
 $imodule  = ucwords($r['nama_modul']);
106 106
 
107
-$nmmodule   = ucwords($r['nama_modul']);
107
+$nmmodule = ucwords($r['nama_modul']);
108 108
 
109
-$id       = $r['id_modul'];
109
+$id = $r['id_modul'];
110 110
 
111
-$fa_icon    = $r['fa_icon'];
111
+$fa_icon = $r['fa_icon'];
112 112
 
113 113
 
114
-$prd  = $_GET['prd'];
114
+$prd = $_GET['prd'];
115 115
 
116
-$iprd  = $_GET['prd'].'-01';
116
+$iprd = $_GET['prd'].'-01';
117 117
 
118
-$nm_month = DATE('F Y',strtotime($iprd));
118
+$nm_month = DATE('F Y', strtotime($iprd));
119 119
 
120
-$year = DATE('Y',strtotime($iprd));
121
-$month = DATE('m',strtotime($iprd))*1;
120
+$year = DATE('Y', strtotime($iprd));
121
+$month = DATE('m', strtotime($iprd)) * 1;
122 122
 
123 123
 $nprd = getBulan1($month).' '.$year;
124 124
 
@@ -126,8 +126,8 @@  discard block
 block discarded – undo
126 126
 
127 127
 
128 128
 
129
-$id_jenis_transaksi  = $_GET['jenis_transaksi'];
130
-$jenis_transaksi  = $_GET['jenis_transaksi'];
129
+$id_jenis_transaksi = $_GET['jenis_transaksi'];
130
+$jenis_transaksi = $_GET['jenis_transaksi'];
131 131
  
132 132
 ?>
133 133
 
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 <meta charset="utf-8">
137 137
 <meta http-equiv="X-UA-Compatible" content="IE=edge">
138 138
 <link rel="shortcut icon" type="image/x-icon" href="../images/favicon.png">
139
-<title><?php echo $imodule ;?> (<?php echo $nprd;?>)</title>
139
+<title><?php echo $imodule; ?> (<?php echo $nprd; ?>)</title>
140 140
 
141 141
 <!-- Tell the browser to be responsive to screen width -->
142 142
 <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
@@ -243,14 +243,14 @@  discard block
 block discarded – undo
243 243
       <div class="noprint"  >
244 244
         <button class='print pull-right' onclick="javascript:window.close()"><i class="fa fa-lg fa-close"></i> Close</button>
245 245
         <button class='print pull-right' onclick="icetak()"><i class="fa fa-lg fa-print"></i> Print</button>
246
-        <button class='print pull-right' onclick="window.open('eprint_report_rekap_harian.php?prd=<?=$prd;?>&jenis_transaksi=<?=$id_jenis_transaksi;?>&report_id=<?=$report_id;?>', '_blank')"><i class="fa fa-lg fa-file-excel-o"></i> Excel</button>
246
+        <button class='print pull-right' onclick="window.open('eprint_report_rekap_harian.php?prd=<?=$prd; ?>&jenis_transaksi=<?=$id_jenis_transaksi; ?>&report_id=<?=$report_id; ?>', '_blank')"><i class="fa fa-lg fa-file-excel-o"></i> Excel</button>
247 247
       </div>   
248 248
 
249 249
       <?
250 250
 
251
-       $gtampil=mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
251
+       $gtampil = mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
252 252
 
253
-       $g=mysql_fetch_array($gtampil);
253
+       $g = mysql_fetch_array($gtampil);
254 254
 
255 255
 
256 256
 
@@ -267,19 +267,19 @@  discard block
 block discarded – undo
267 267
 
268 268
       $company = ucwords($g['company']);
269 269
 
270
-      $jsql   = mysql_query("SELECT * FROM jenis_transaksi
270
+      $jsql = mysql_query("SELECT * FROM jenis_transaksi
271 271
                             WHERE id_jenis_transaksi = '$jenis_transaksi' 
272 272
 
273 273
                            ");
274 274
 
275 275
 
276 276
 
277
-      $j     = mysql_fetch_array($jsql); 
277
+      $j = mysql_fetch_array($jsql); 
278 278
 
279
-      $jenis_transaksi   = $j['jenis_transaksi'];  
279
+      $jenis_transaksi = $j['jenis_transaksi'];  
280 280
 
281 281
 
282
-      $sql   = mysql_query("SELECT a.*,b.shift FROM kasir  a LEFT JOIN shift b 
282
+      $sql = mysql_query("SELECT a.*,b.shift FROM kasir  a LEFT JOIN shift b 
283 283
                             ON a.id_shift = b.id_shift
284 284
                             WHERE a.id_kasir = '$k_ID' 
285 285
 
@@ -287,29 +287,29 @@  discard block
 block discarded – undo
287 287
 
288 288
 
289 289
 
290
-      $r     = mysql_fetch_array($sql); 
290
+      $r = mysql_fetch_array($sql); 
291 291
 
292 292
 
293
-      $penjualan_barang   = $r['id_kasir'];  
293
+      $penjualan_barang = $r['id_kasir'];  
294 294
 
295
-      $shift   = $r['shift'];  
295
+      $shift = $r['shift'];  
296 296
 
297
-      $petugas   = $r['petugas'];  
297
+      $petugas = $r['petugas'];  
298 298
 
299
-      $status   = $r['status']; 
299
+      $status = $r['status']; 
300 300
 
301
-      $tanggal   = DATE('d/m/Y',strtotime($r['tanggal']));  
301
+      $tanggal = DATE('d/m/Y', strtotime($r['tanggal']));  
302 302
 
303 303
       ?>
304 304
 
305 305
       <table width="100%">
306 306
       <tr>
307 307
       <td style="text-align: center;" colspan="3">
308
-      <h4 ><?=$company;?>
308
+      <h4 ><?=$company; ?>
309 309
       <br>
310
-      <?=$nmmodule;?>
310
+      <?=$nmmodule; ?>
311 311
       <br>
312
-      <?=$jenis_transaksi;?> PER : <?php echo $nprd;?>
312
+      <?=$jenis_transaksi; ?> PER : <?php echo $nprd; ?>
313 313
       </h4></td>
314 314
       </tr>      
315 315
       </table>
@@ -323,11 +323,11 @@  discard block
 block discarded – undo
323 323
 
324 324
                <?
325 325
 
326
-                $htampil=mysql_query("SELECT * FROM penjamin where aktif = 'Y' ORDER BY id_penjamin");
326
+                $htampil = mysql_query("SELECT * FROM penjamin where aktif = 'Y' ORDER BY id_penjamin");
327 327
 
328 328
                 $hjml = mysql_num_rows($htampil);
329 329
           
330
-                while ($h=mysql_fetch_array($htampil)){  
330
+                while ($h = mysql_fetch_array($htampil)) {  
331 331
 
332 332
                 	echo "<th colspan='2'>".$h['penjamin']."</th>";
333 333
 
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
             <tr>
349 349
 
350 350
                <? 
351
-               	for($j = 1; $j <= $hjml; $j++)  { 
351
+               	for ($j = 1; $j<=$hjml; $j++) { 
352 352
 
353 353
                		echo "<th>JML</th>";  
354 354
                		echo "<th>RUPIAH</th>";  
@@ -376,20 +376,20 @@  discard block
 block discarded – undo
376 376
 
377 377
       	<tbody>
378 378
 
379
-      	  <? for($i = 1; $i <= 31; $i++)  { 
379
+      	  <? for ($i = 1; $i<=31; $i++) { 
380 380
 
381 381
       	  	 echo"<tr>";
382 382
 
383 383
              echo"<td style='text-align:center;'>$i</td>"; 
384 384
 
385
-             if (strlen($i) == '1') {
385
+             if (strlen($i)=='1') {
386 386
              	$tgl = $prd.'-0'.$i;
387 387
              } else {
388 388
              	$tgl = $prd.'-'.$i;
389 389
              }
390 390
 
391 391
              //transaksi asuransi
392
-             $dtampil1=mysql_query("SELECT a.id_penjamin
392
+             $dtampil1 = mysql_query("SELECT a.id_penjamin
393 393
 										,	COUNT(c.jumlah) as jml 
394 394
 										,	IFNULL(SUM(c.jumlah),0) as rp  
395 395
 									FROM penjamin a LEFT JOIN kasir b
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
 									ORDER BY a.id_penjamin");
407 407
 
408 408
           
409
-             while ($d1=mysql_fetch_array($dtampil1)){  
409
+             while ($d1 = mysql_fetch_array($dtampil1)) {  
410 410
 
411 411
 
412 412
               	echo "<th>".$d1['jml']."</th>";
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
              } 	
416 416
 
417 417
               //transaksi umum tunai
418
-              $dtampil2=mysql_query("SELECT COUNT(c.jumlah) as jml 
418
+              $dtampil2 = mysql_query("SELECT COUNT(c.jumlah) as jml 
419 419
 										,	IFNULL(SUM(c.jumlah),0) as rp  
420 420
 									FROM kasir b LEFT JOIN kasir_detail c
421 421
 									ON  b.id_kasir = c.id_kasir
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
 									WHERE b.tanggal = '$tgl'
426 426
 									AND b.status != '4'");
427 427
                        
428
-             $d2=mysql_fetch_array($dtampil2);
428
+             $d2 = mysql_fetch_array($dtampil2);
429 429
 
430 430
 
431 431
              echo "<th>".$d2['jml']."</th>";
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
 
434 434
 
435 435
               //transaksi umum tunai
436
-              $dtampil3=mysql_query("SELECT COUNT(c.jumlah) as jml 
436
+              $dtampil3 = mysql_query("SELECT COUNT(c.jumlah) as jml 
437 437
 										,	IFNULL(SUM(c.jumlah),0) as rp  
438 438
 									FROM kasir b LEFT JOIN kasir_detail c
439 439
 									ON  b.id_kasir = c.id_kasir
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
 									WHERE b.tanggal = '$tgl'
444 444
 									AND b.status != '4'");
445 445
                        
446
-             $d3=mysql_fetch_array($dtampil3);
446
+             $d3 = mysql_fetch_array($dtampil3);
447 447
 
448 448
 
449 449
              echo "<th>".$d3['jml']."</th>";
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
              echo "<th></th>";
459 459
 
460 460
              //total jml
461
-              $dtampil4=mysql_query("SELECT COUNT(c.jumlah) as jml 
461
+              $dtampil4 = mysql_query("SELECT COUNT(c.jumlah) as jml 
462 462
 									FROM kasir b LEFT JOIN kasir_detail c
463 463
 									ON  b.id_kasir = c.id_kasir
464 464
 									AND c.status != '4'
@@ -466,13 +466,13 @@  discard block
 block discarded – undo
466 466
 									WHERE b.tanggal = '$tgl'
467 467
 									AND b.status != '4'");
468 468
                        
469
-             $d4=mysql_fetch_array($dtampil4);
469
+             $d4 = mysql_fetch_array($dtampil4);
470 470
 
471 471
 
472 472
              echo "<th>".$d4['jml']."</th>";
473 473
 
474 474
              //total pembayaran
475
-             $dtampil5=mysql_query("SELECT a.groups
475
+             $dtampil5 = mysql_query("SELECT a.groups
476 476
 										,	IFNULL(SUM(c.jumlah),0) as rp  
477 477
 									FROM jenis_pembayaran a LEFT JOIN kasir b
478 478
 									ON  b.tanggal = '$tgl'
@@ -485,7 +485,7 @@  discard block
 block discarded – undo
485 485
 									GROUP BY a.groups
486 486
 									ORDER BY a.groups");
487 487
                        
488
-             while ($d5=mysql_fetch_array($dtampil5)){  
488
+             while ($d5 = mysql_fetch_array($dtampil5)) {  
489 489
 
490 490
 
491 491
               	echo "<th style='text-align:right;'>".number_format($d5['rp'], 0, ".", ",")."</th>";
@@ -511,7 +511,7 @@  discard block
 block discarded – undo
511 511
       
512 512
 
513 513
              //transaksi asuransi
514
-             $dtampil1=mysql_query("SELECT a.id_penjamin
514
+             $dtampil1 = mysql_query("SELECT a.id_penjamin
515 515
 										,	COUNT(c.jumlah) as jml 
516 516
 										,	IFNULL(SUM(c.jumlah),0) as rp  
517 517
 									FROM penjamin a LEFT JOIN kasir b
@@ -527,7 +527,7 @@  discard block
 block discarded – undo
527 527
 									GROUP BY a.id_penjamin
528 528
 									ORDER BY a.id_penjamin");
529 529
                        
530
-             while ($d1=mysql_fetch_array($dtampil1)){  
530
+             while ($d1 = mysql_fetch_array($dtampil1)) {  
531 531
 
532 532
 
533 533
               	echo "<th>".$d1['jml']."</th>";
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
              } 	
537 537
 
538 538
               //transaksi umum tunai
539
-              $dtampil2=mysql_query("SELECT COUNT(c.jumlah) as jml 
539
+              $dtampil2 = mysql_query("SELECT COUNT(c.jumlah) as jml 
540 540
 										,	IFNULL(SUM(c.jumlah),0) as rp  
541 541
 									FROM kasir b LEFT JOIN kasir_detail c
542 542
 									ON  b.id_kasir = c.id_kasir
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
 									AND  b.tanggal LIKE '$prd%'
547 547
 									AND b.status != '4'");
548 548
                        
549
-             $d2=mysql_fetch_array($dtampil2);
549
+             $d2 = mysql_fetch_array($dtampil2);
550 550
 
551 551
 
552 552
              echo "<th>".$d2['jml']."</th>";
@@ -554,7 +554,7 @@  discard block
 block discarded – undo
554 554
 
555 555
 
556 556
               //transaksi umum tunai
557
-              $dtampil3=mysql_query("SELECT COUNT(c.jumlah) as jml 
557
+              $dtampil3 = mysql_query("SELECT COUNT(c.jumlah) as jml 
558 558
 										,	IFNULL(SUM(c.jumlah),0) as rp  
559 559
 									FROM kasir b LEFT JOIN kasir_detail c
560 560
 									ON  b.id_kasir = c.id_kasir
@@ -564,7 +564,7 @@  discard block
 block discarded – undo
564 564
 									WHERE b.tanggal LIKE '$prd%'
565 565
 									AND b.status != '4'");
566 566
                        
567
-             $d3=mysql_fetch_array($dtampil3);
567
+             $d3 = mysql_fetch_array($dtampil3);
568 568
 
569 569
 
570 570
              echo "<th>".$d3['jml']."</th>";
@@ -579,7 +579,7 @@  discard block
 block discarded – undo
579 579
              echo "<th></th>";
580 580
 
581 581
              //total jml
582
-              $dtampil4=mysql_query("SELECT COUNT(c.jumlah) as jml 
582
+              $dtampil4 = mysql_query("SELECT COUNT(c.jumlah) as jml 
583 583
 									FROM kasir b LEFT JOIN kasir_detail c
584 584
 									ON  b.id_kasir = c.id_kasir
585 585
 									AND c.status != '4'
@@ -587,13 +587,13 @@  discard block
 block discarded – undo
587 587
 									WHERE b.tanggal LIKE '$prd%'
588 588
 									AND b.status != '4'");
589 589
                        
590
-             $d4=mysql_fetch_array($dtampil4);
590
+             $d4 = mysql_fetch_array($dtampil4);
591 591
 
592 592
 
593 593
              echo "<th>".$d4['jml']."</th>";
594 594
 
595 595
              //total pembayaran
596
-             $dtampil5=mysql_query("SELECT a.groups
596
+             $dtampil5 = mysql_query("SELECT a.groups
597 597
 										,	IFNULL(SUM(c.jumlah),0) as rp  
598 598
 									FROM jenis_pembayaran a LEFT JOIN kasir b
599 599
 									ON  b.tanggal LIKE '$prd%'
@@ -606,7 +606,7 @@  discard block
 block discarded – undo
606 606
 									GROUP BY a.groups
607 607
 									ORDER BY a.groups");
608 608
                        
609
-             while ($d5=mysql_fetch_array($dtampil5)){  
609
+             while ($d5 = mysql_fetch_array($dtampil5)) {  
610 610
 
611 611
 
612 612
               	echo "<th style='text-align:right;'>".number_format($d5['rp'], 0, ".", ",")."</th>";
@@ -623,7 +623,7 @@  discard block
 block discarded – undo
623 623
              echo"<th style='text-align:center;' colspan='23'>TOTAL REVENUE</th>"; 
624 624
 
625 625
              //total jml
626
-              $dtampil4=mysql_query("SELECT COUNT(c.jumlah) as jml 
626
+              $dtampil4 = mysql_query("SELECT COUNT(c.jumlah) as jml 
627 627
 									FROM kasir b LEFT JOIN kasir_detail c
628 628
 									ON  b.id_kasir = c.id_kasir
629 629
 									AND c.status != '4'
@@ -631,13 +631,13 @@  discard block
 block discarded – undo
631 631
 									WHERE b.tanggal LIKE '$prd%'
632 632
 									AND b.status != '4'");
633 633
                        
634
-             $d4=mysql_fetch_array($dtampil4);
634
+             $d4 = mysql_fetch_array($dtampil4);
635 635
 
636 636
 
637 637
              echo "<th>".$d4['jml']."</th>";
638 638
 
639 639
              //total pembayaran
640
-             $dtampil5=mysql_query("SELECT IFNULL(SUM(c.jumlah),0) as rp  
640
+             $dtampil5 = mysql_query("SELECT IFNULL(SUM(c.jumlah),0) as rp  
641 641
 									FROM  kasir b LEFT JOIN kasir_detail c
642 642
 									ON  b.id_kasir = c.id_kasir
643 643
 									AND c.status != '4'
@@ -645,7 +645,7 @@  discard block
 block discarded – undo
645 645
 									WHERE b.tanggal LIKE '$prd%'
646 646
 									AND b.status != '4'");
647 647
                        
648
-             $d5=mysql_fetch_array($dtampil5);
648
+             $d5 = mysql_fetch_array($dtampil5);
649 649
 
650 650
 
651 651
               	echo "<th style='text-align:right;' colspan='2'>".number_format($d5['rp'], 0, ".", ",")."</th>";
@@ -660,16 +660,16 @@  discard block
 block discarded – undo
660 660
 
661 661
     <? 
662 662
 
663
-    $lastday = DATE('t',strtotime($iprd));
663
+    $lastday = DATE('t', strtotime($iprd));
664 664
 
665
-    $year = DATE('Y',strtotime($iprd));
665
+    $year = DATE('Y', strtotime($iprd));
666 666
 
667
-    $month = DATE('m',strtotime($iprd))*1;
667
+    $month = DATE('m', strtotime($iprd)) * 1;
668 668
 
669
-    if ($month == '1') {
669
+    if ($month=='1') {
670 670
     	$imonth = 12;
671 671
     } else {
672
-    	$imonth = $month-1;
672
+    	$imonth = $month - 1;
673 673
     }
674 674
 
675 675
 	$nprd = $lastday.' '.getBulan1($imonth).' '.$year;
@@ -677,7 +677,7 @@  discard block
 block discarded – undo
677 677
 
678 678
     <table width="100%">
679 679
     	<tr>
680
-    		<td width="70%">Bekasi, <?=$nprd;?></td>
680
+    		<td width="70%">Bekasi, <?=$nprd; ?></td>
681 681
     		<td width="30%">Mengetahui,</td>
682 682
     	</tr>
683 683
     	<tr>
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,7 @@
 block discarded – undo
2 2
 
3 3
 if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) {
4 4
 ob_start("ob_gzhandler");
5
-}
6
-else {
5
+} else {
7 6
 ob_start();
8 7
 }
9 8
 
Please login to merge, or discard this patch.
modul/mod_report_rekap_harian/report_rekap_harian.php 3 patches
Indentation   +14 added lines, -14 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
                    
@@ -101,14 +101,14 @@  discard block
 block discarded – undo
101 101
                 <div class="col-md-9 col-sm-9 col-xs-9 form-group"> 
102 102
                      <select name="jenis_transaksi" class="form-control">
103 103
                         <?
104
-                          $query = mysql_query('SELECT * FROM jenis_transaksi ORDER BY id_jenis_transaksi');
105
-                           if($query && mysql_num_rows($query) > 0){
106
-                              while($row = mysql_fetch_object($query)){
107
-                              echo '<option value="'.$row->id_jenis_transaksi.'"';
108
-                              if($row->id_jenis_transaksi == '1') echo ' selected';
109
-                              echo '>'.$row->jenis_transaksi.'</option>';
110
-                              }
111
-                           }        
104
+                            $query = mysql_query('SELECT * FROM jenis_transaksi ORDER BY id_jenis_transaksi');
105
+                            if($query && mysql_num_rows($query) > 0){
106
+                                while($row = mysql_fetch_object($query)){
107
+                                echo '<option value="'.$row->id_jenis_transaksi.'"';
108
+                                if($row->id_jenis_transaksi == '1') echo ' selected';
109
+                                echo '>'.$row->jenis_transaksi.'</option>';
110
+                                }
111
+                            }        
112 112
                         ?>  
113 113
                         </select>                
114 114
                 </div>
@@ -130,12 +130,12 @@  discard block
 block discarded – undo
130 130
 
131 131
              <?
132 132
 
133
-             $module = '?module='.$_GET['module'];          
134
-             $tampil=mysql_query("SELECT id_modul as id FROM modul WHERE link='".$module."'");                       
135
-             $r=mysql_fetch_array($tampil);
133
+                $module = '?module='.$_GET['module'];          
134
+                $tampil=mysql_query("SELECT id_modul as id FROM modul WHERE link='".$module."'");                       
135
+                $r=mysql_fetch_array($tampil);
136 136
 
137
-             echo"<input type='hidden' name='report_id' id='report_id' value=".$r[id].">"; 
138
-             echo"<input type='hidden' name='module' value=".$_GET[module].">";
137
+                echo"<input type='hidden' name='report_id' id='report_id' value=".$r[id].">"; 
138
+                echo"<input type='hidden' name='module' value=".$_GET[module].">";
139 139
             ?>
140 140
             </form>    
141 141
                    
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 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>
@@ -102,10 +102,10 @@  discard block
 block discarded – undo
102 102
                      <select name="jenis_transaksi" class="form-control">
103 103
                         <?
104 104
                           $query = mysql_query('SELECT * FROM jenis_transaksi ORDER BY id_jenis_transaksi');
105
-                           if($query && mysql_num_rows($query) > 0){
106
-                              while($row = mysql_fetch_object($query)){
105
+                           if ($query && mysql_num_rows($query)>0) {
106
+                              while ($row = mysql_fetch_object($query)) {
107 107
                               echo '<option value="'.$row->id_jenis_transaksi.'"';
108
-                              if($row->id_jenis_transaksi == '1') echo ' selected';
108
+                              if ($row->id_jenis_transaksi=='1') echo ' selected';
109 109
                               echo '>'.$row->jenis_transaksi.'</option>';
110 110
                               }
111 111
                            }        
@@ -131,8 +131,8 @@  discard block
 block discarded – undo
131 131
              <?
132 132
 
133 133
              $module = '?module='.$_GET['module'];          
134
-             $tampil=mysql_query("SELECT id_modul as id FROM modul WHERE link='".$module."'");                       
135
-             $r=mysql_fetch_array($tampil);
134
+             $tampil = mysql_query("SELECT id_modul as id FROM modul WHERE link='".$module."'");                       
135
+             $r = mysql_fetch_array($tampil);
136 136
 
137 137
              echo"<input type='hidden' name='report_id' id='report_id' value=".$r[id].">"; 
138 138
              echo"<input type='hidden' name='module' value=".$_GET[module].">";
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
             </form>    
141 141
                    
142 142
                 </div>
143
-                <?for($i = 0; $i <= 20; $i++)  { 
143
+                <?for ($i = 0; $i<=20; $i++) { 
144 144
                     ?>
145 145
                     <br />
146 146
                     <?
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,9 @@
 block discarded – undo
105 105
                            if($query && mysql_num_rows($query) > 0){
106 106
                               while($row = mysql_fetch_object($query)){
107 107
                               echo '<option value="'.$row->id_jenis_transaksi.'"';
108
-                              if($row->id_jenis_transaksi == '1') echo ' selected';
108
+                              if($row->id_jenis_transaksi == '1') {
109
+                                  echo ' selected';
110
+                              }
109 111
                               echo '>'.$row->jenis_transaksi.'</option>';
110 112
                               }
111 113
                            }        
Please login to merge, or discard this patch.