Passed
Branch master (c66316)
by Saepul
06:04
created
modul/mod_modul/form_modul.php 1 patch
Spacing   +14 added lines, -14 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
 
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_modul']) ? intval($_GET['id_modul']) : false;
45 45
   
46
-  if($id){
46
+  if ($id) {
47 47
      $query = mysql_query('SELECT * FROM modul WHERE id_modul = "'.$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
   
@@ -95,9 +95,9 @@  discard block
 block discarded – undo
95 95
               </div>
96 96
           </div>  
97 97
 
98
-          <?php if ($id){ ?>  
98
+          <?php if ($id) { ?>  
99 99
     
100
-            <?php if (@$data->is_form=='Y'){ ?>
100
+            <?php if (@$data->is_form=='Y') { ?>
101 101
               <div class="form-group">
102 102
                 <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Is Form :</label>
103 103
                   <div class="col-md-6 col-sm-6 col-xs-12">
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
                     <input type=radio name='is_form' value='N' class="flat"> T                
106 106
                   </div>
107 107
               </div>  
108
-            <?php   }else{ ?>  
108
+            <?php   } else { ?>  
109 109
               <div class="form-group">
110 110
                 <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Is Form :</label>
111 111
                   <div class="col-md-6 col-sm-6 col-xs-12">
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
               </div>  
116 116
              <?php } ?>
117 117
 
118
-        <?php   }else{ ?>  
118
+        <?php   } else { ?>  
119 119
 
120 120
              <div class="form-group">
121 121
                 <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Is Form :</label>
@@ -136,9 +136,9 @@  discard block
 block discarded – undo
136 136
               </div>
137 137
           </div>  
138 138
 
139
-          <?php if ($id){ ?>  
139
+          <?php if ($id) { ?>  
140 140
     
141
-            <?php if (@$data->aktif=='Y'){ ?>
141
+            <?php if (@$data->aktif=='Y') { ?>
142 142
               <div class="form-group">
143 143
                 <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Aktif :</label>
144 144
                   <div class="col-md-6 col-sm-6 col-xs-12">
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
                     <input type=radio name='aktif' value='N' class="flat"> T                
147 147
                   </div>
148 148
               </div>  
149
-            <?php   }else{ ?>  
149
+            <?php   } else { ?>  
150 150
               <div class="form-group">
151 151
                 <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Aktif :</label>
152 152
                   <div class="col-md-6 col-sm-6 col-xs-12">
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
               </div>  
157 157
              <?php } ?>
158 158
 
159
-        <?php   }else{ ?>  
159
+        <?php   } else { ?>  
160 160
 
161 161
                 <div class="form-group">
162 162
                 <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Aktif :</label>
Please login to merge, or discard this patch.
modul/mod_modul/form_submodul.php 1 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>
@@ -36,18 +36,18 @@  discard block
 block discarded – undo
36 36
 $modul = $_GET['module'];
37 37
 $title = $_GET['title'];
38 38
 
39
-$role   = $_SESSION['role'];
39
+$role = $_SESSION['role'];
40 40
 
41 41
 $id_module = $_GET['id_module']; 
42 42
 $parentid = $_GET['parentid']; 
43 43
 
44
-    $id = isset($_GET['id_modul']) ? intval($_GET['id_modul'])  : false;
44
+    $id = isset($_GET['id_modul']) ? intval($_GET['id_modul']) : false;
45 45
     
46
-    if($id){
46
+    if ($id) {
47 47
        $query = mysql_query('SELECT * FROM modul WHERE id_modul = "'.$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
   
@@ -98,9 +98,9 @@  discard block
 block discarded – undo
98 98
               </div>
99 99
           </div>  
100 100
 
101
-          <?php if ($id){ ?>  
101
+          <?php if ($id) { ?>  
102 102
     
103
-            <?php if (@$data->is_form=='Y'){ ?>
103
+            <?php if (@$data->is_form=='Y') { ?>
104 104
               
105 105
                 <div class="form-group">
106 106
 	               <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Is Form :</label>
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
                     <input type=radio name='is_form' value='N' class="flat"> T                
110 110
                   </div>
111 111
               </div>  
112
-            <?php   }else{ ?>  
112
+            <?php   } else { ?>  
113 113
               
114 114
                 <div class="form-group">
115 115
 	               <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Is Form :</label>
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
               </div>  
121 121
              <?php } ?>
122 122
 
123
-        <?php   }else{ ?>  
123
+        <?php   } else { ?>  
124 124
 
125 125
            
126 126
                 <div class="form-group">
@@ -133,9 +133,9 @@  discard block
 block discarded – undo
133 133
 
134 134
         <?php } ?>
135 135
 
136
-        <?php if ($id){ ?>  
136
+        <?php if ($id) { ?>  
137 137
     
138
-            <?php if (@$data->is_report=='Y'){ ?>
138
+            <?php if (@$data->is_report=='Y') { ?>
139 139
               
140 140
                 <div class="form-group">
141 141
 	                 <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Is Report :</label>
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
                     <input type=radio name='is_report' value='N' class="flat"> T                
145 145
                   </div>
146 146
               </div>  
147
-            <?php   }else{ ?>  
147
+            <?php   } else { ?>  
148 148
               
149 149
                 <div class="form-group">
150 150
 	                 <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Is Report :</label>
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
               </div>  
156 156
              <?php } ?>
157 157
 
158
-        <?php   }else{ ?>  
158
+        <?php   } else { ?>  
159 159
 
160 160
            
161 161
                 <div class="form-group">
@@ -178,9 +178,9 @@  discard block
 block discarded – undo
178 178
               </div>
179 179
           </div>  
180 180
 
181
-          <?php if ($id){ ?>  
181
+          <?php if ($id) { ?>  
182 182
     
183
-            <?php if (@$data->aktif=='Y'){ ?>
183
+            <?php if (@$data->aktif=='Y') { ?>
184 184
               
185 185
                 <div class="form-group">
186 186
 	               <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Aktif :</label>
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
                     <input type=radio name='aktif' value='N' class="flat"> T                
190 190
                   </div>
191 191
               </div>  
192
-            <?php   }else{ ?>  
192
+            <?php   } else { ?>  
193 193
               
194 194
                 <div class="form-group">
195 195
 	               <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Aktif :</label>
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
               </div>  
201 201
              <?php } ?>
202 202
 
203
-        <?php   }else{ ?>  
203
+        <?php   } else { ?>  
204 204
 
205 205
            
206 206
                 <div class="form-group">
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
              <div class="form-group">
220 220
                <div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3" style='margin-top:20px;'>
221 221
                  <input type="hidden" name="ID" value="<?php echo @$data->id_modul?>" />
222
-                 <input type='hidden' name='jum' value="<?php echo $no-1?>" /> 
222
+                 <input type='hidden' name='jum' value="<?php echo $no - 1?>" /> 
223 223
                  <input type="hidden" name="id_module" value="<?php echo $id_module?>" />
224 224
                  <input type="hidden" name="parentid" value="<?php echo $parentid?>" /> 
225 225
                   <button type="button" onClick="parent.tb_remove()" class="btn btn-danger">Batal</button>
Please login to merge, or discard this patch.
modul/mod_home/xxhome.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 
2 2
 <?php
3
-switch($_GET[act]){
3
+switch ($_GET[act]) {
4 4
 
5 5
 default:  
6 6
 
7 7
 
8
- $gtampil=mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
9
- $g=mysql_fetch_array($gtampil);
8
+ $gtampil = mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
9
+ $g = mysql_fetch_array($gtampil);
10 10
 
11 11
 if ($g['pict']) {
12 12
 	$pict = $g['pict'];
Please login to merge, or discard this patch.
modul/mod_home/xhome.php 1 patch
Spacing   +133 added lines, -133 removed lines patch added patch discarded remove patch
@@ -47,22 +47,22 @@  discard block
 block discarded – undo
47 47
 </style>
48 48
 
49 49
 <?php
50
-switch($_GET[act]){
50
+switch ($_GET[act]) {
51 51
 
52 52
 default:  
53 53
 
54
-if($_GET['fdate']) {
54
+if ($_GET['fdate']) {
55 55
 	$fdate	= $_GET['fdate'];
56 56
 } else {
57 57
 	$hour = time() - (1 * 1 * 60 * 60);
58 58
 	$fdate	= date("Y-m-d", $hour);
59 59
 }
60 60
 
61
-if($_GET['ldate']) {
61
+if ($_GET['ldate']) {
62 62
 	$ldate	= $_GET['ldate'];
63 63
 } else {
64 64
 	$hour = time() - (1 * 1 * 60 * 60) + (168 * 1 * 60 * 60);
65
-	$ldate	= date("Y-m-d",$hour);
65
+	$ldate	= date("Y-m-d", $hour);
66 66
 }
67 67
 
68 68
 $fdate1 	= date("m/d/Y", strtotime($fdate));
@@ -76,31 +76,31 @@  discard block
 block discarded – undo
76 76
 	
77 77
 	$fmonthName = date("M", mktime(0, 0, 0, $fmonth, 10));
78 78
 	
79
-	$lday		= mysql_query("SELECT substr(LAST_DAY('$fdate'),-2,2) as lastday ");	 
80
-	$l			= mysql_fetch_array($lday);	  
81
-	$f_lastday  = $l['lastday'];
82
-	$f_jml	 	= ($f_lastday-$fday)+1;
79
+	$lday = mysql_query("SELECT substr(LAST_DAY('$fdate'),-2,2) as lastday ");	 
80
+	$l = mysql_fetch_array($lday);	  
81
+	$f_lastday = $l['lastday'];
82
+	$f_jml = ($f_lastday - $fday) + 1;
83 83
 	
84 84
 	//$ldate = '2014-08-15';
85 85
 	
86
-	$lday	 	= date("d", strtotime($ldate));
86
+	$lday = date("d", strtotime($ldate));
87 87
 	$lmonth 	= date("m", strtotime($ldate));
88 88
 	$lyear 		= date("Y", strtotime($ldate));
89 89
 	$l_jml	 	= $lday;
90 90
 	
91 91
 	$lmonthName = date("M", mktime(0, 0, 0, $lmonth, 10));
92 92
 	
93
-	$jml = ($lday - $fday)+1;
93
+	$jml = ($lday - $fday) + 1;
94 94
 
95 95
 
96
-if($_GET['ldate']) {
97
-	if ($lmonth == $fmonth  and $lyear == $fyear) {
98
-		$jcol =  $jml;
96
+if ($_GET['ldate']) {
97
+	if ($lmonth==$fmonth and $lyear==$fyear) {
98
+		$jcol = $jml;
99 99
 	 } else {
100
-		 $jcol =  $f_jml+$l_jml;		 
100
+		 $jcol = $f_jml + $l_jml;		 
101 101
 	 }
102 102
 } else {
103
-	$jcol =  8;
103
+	$jcol = 8;
104 104
 }
105 105
 
106 106
 ?>
@@ -123,10 +123,10 @@  discard block
 block discarded – undo
123 123
 							                 	<option value="">--------- Room Type ---------</option>
124 124
 							                    <?
125 125
 							                      $query = mysql_query('SELECT * FROM room_type ORDER BY room_type');
126
-							                       if($query && mysql_num_rows($query) > 0){
127
-							                          while($row = mysql_fetch_object($query)){
126
+							                       if ($query && mysql_num_rows($query)>0) {
127
+							                          while ($row = mysql_fetch_object($query)) {
128 128
 							                             echo '<option value="'.$row->id_room_type.'"';
129
-							                             if($row->id_room_type == $_GET['room_type']) echo ' selected';
129
+							                             if ($row->id_room_type==$_GET['room_type']) echo ' selected';
130 130
 							                             echo '>'.$row->room_type.'</option>';
131 131
 							                          }
132 132
 							                       }        
@@ -155,35 +155,35 @@  discard block
 block discarded – undo
155 155
 		                            <th style='text-align:center;' width='17%' ><h3 style='font-size:12px;'>Room</h3></th>
156 156
 
157 157
 		                        	<?
158
-		                        	$col = (83/$jcol);
158
+		                        	$col = (83 / $jcol);
159 159
 
160 160
 
161
-		                            if ($lmonth == $fmonth  and $lyear == $fyear) {
161
+		                            if ($lmonth==$fmonth and $lyear==$fyear) {
162 162
 		
163
-									for($i = $fday; $i <= $lday; $i++)	{
163
+									for ($i = $fday; $i<=$lday; $i++) {
164 164
 											
165
-										if (strlen($i) == '1') {
166
-											$tgl = 	'0'.$i;
165
+										if (strlen($i)=='1') {
166
+											$tgl = '0'.$i;
167 167
 										} else {
168
-											$tgl = 	$i;
168
+											$tgl = $i;
169 169
 										}
170 170
 
171 171
 										$tanggal = $fyear.'-'.$fmonth.'-'.$tgl;
172 172
 
173
-										$DayName 	= date("D",strtotime($tanggal));
173
+										$DayName = date("D", strtotime($tanggal));
174 174
 										
175
-										 $sSQL=	"select sdate from special_day_detail where sdate in ('$tanggal')";	
175
+										 $sSQL = "select sdate from special_day_detail where sdate in ('$tanggal')";	
176 176
 								 		 $sday = mysql_query($sSQL);
177
-		             					 $s=mysql_fetch_array($sday);
177
+		             					 $s = mysql_fetch_array($sday);
178 178
 
179 179
 		             					 $nday = date('N', strtotime($tanggal));
180 180
 
181
-		             					 if($s['sdate']) {
182
-		             					 	$bg ='#eba51c';
183
-		             					 } else if ($nday == '6' or $nday == '7') {
184
-		             					 	$bg ='#eb1c41';
181
+		             					 if ($s['sdate']) {
182
+		             					 	$bg = '#eba51c';
183
+		             					 } else if ($nday=='6' or $nday=='7') {
184
+		             					 	$bg = '#eb1c41';
185 185
 		             					 } else {	
186
-		             					 	$bg ='';
186
+		             					 	$bg = '';
187 187
 		             					 }
188 188
 
189 189
 										echo"<th style='text-align:center;background-color:$bg' width='$col%'>
@@ -198,30 +198,30 @@  discard block
 block discarded – undo
198 198
 									
199 199
 								} else {
200 200
 									
201
-									for($i = $fday; $i <= $f_lastday; $i++)	{
201
+									for ($i = $fday; $i<=$f_lastday; $i++) {
202 202
 											
203
-										if (strlen($i) == '1') {
204
-											$tgl = 	'0'.$i;
203
+										if (strlen($i)=='1') {
204
+											$tgl = '0'.$i;
205 205
 										} else {
206
-											$tgl = 	$i;
206
+											$tgl = $i;
207 207
 										}
208 208
 										
209 209
 										$tanggal = $fyear.'-'.$fmonth.'-'.$tgl;
210 210
 
211
-										$DayName 	= date("D",strtotime($tanggal));
211
+										$DayName = date("D", strtotime($tanggal));
212 212
 										
213
-										$sSQL=	"select sdate from special_day_detail where sdate in ('$tanggal')";	
213
+										$sSQL = "select sdate from special_day_detail where sdate in ('$tanggal')";	
214 214
 								 		 $sday = mysql_query($sSQL);
215
-		             					 $s=mysql_fetch_array($sday);
215
+		             					 $s = mysql_fetch_array($sday);
216 216
 
217 217
 		             					 $nday = date('N', strtotime($tanggal));
218 218
 
219
-		             					 if($s['sdate']) {
220
-		             					 	$bg ='#eba51c';
221
-		             					 } else if ($nday == '6' or $nday == '7') {
222
-		             					 	$bg ='#eb1c41';
219
+		             					 if ($s['sdate']) {
220
+		             					 	$bg = '#eba51c';
221
+		             					 } else if ($nday=='6' or $nday=='7') {
222
+		             					 	$bg = '#eb1c41';
223 223
 		             					 } else {	
224
-		             					 	$bg ='';
224
+		             					 	$bg = '';
225 225
 		             					 }
226 226
 
227 227
 										echo"<th style='text-align:center;background-color:$bg' width='$col%'>
@@ -234,31 +234,31 @@  discard block
 block discarded – undo
234 234
 										
235 235
 									}
236 236
 									
237
-									for($i = 1; $i <= $lday; $i++)	{
237
+									for ($i = 1; $i<=$lday; $i++) {
238 238
 											
239
-										if (strlen($i) == '1') {
240
-											$tgl = 	'0'.$i;
239
+										if (strlen($i)=='1') {
240
+											$tgl = '0'.$i;
241 241
 										} else {
242
-											$tgl = 	$i;
242
+											$tgl = $i;
243 243
 										}
244 244
 										
245 245
 										$tanggal = $lyear.'-'.$lmonth.'-'.$tgl;
246 246
 
247 247
 
248
-										$DayName 	= date("D",strtotime($tanggal));
248
+										$DayName = date("D", strtotime($tanggal));
249 249
 										
250
-										$sSQL=	"select sdate from special_day_detail where sdate in ('$tanggal')";	
250
+										$sSQL = "select sdate from special_day_detail where sdate in ('$tanggal')";	
251 251
 								 		 $sday = mysql_query($sSQL);
252
-		             					 $s=mysql_fetch_array($sday);
252
+		             					 $s = mysql_fetch_array($sday);
253 253
 
254 254
 		             					 $nday = date('N', strtotime($tanggal));
255 255
 
256
-		             					 if($s['sdate']) {
257
-		             					 	$bg ='#eba51c';
258
-		             					 } else if ($nday == '6' or $nday == '7') {
259
-		             					 	$bg ='#eb1c41';
256
+		             					 if ($s['sdate']) {
257
+		             					 	$bg = '#eba51c';
258
+		             					 } else if ($nday=='6' or $nday=='7') {
259
+		             					 	$bg = '#eb1c41';
260 260
 		             					 } else {	
261
-		             					 	$bg ='';
261
+		             					 	$bg = '';
262 262
 		             					 }
263 263
 
264 264
 										echo"<th style='text-align:center;background-color:$bg' width='$col%'>
@@ -282,17 +282,17 @@  discard block
 block discarded – undo
282 282
 									
283 283
                             
284 284
                          <?						 
285
-								 $tSQL =	"SELECT * FROM room_type ";	
285
+								 $tSQL = "SELECT * FROM room_type ";	
286 286
 
287
-								 if ($_GET['room_type']){
288
-								 	$tSQL .=	"WHERE id_room_type = '$_GET[room_type]'";	
287
+								 if ($_GET['room_type']) {
288
+								 	$tSQL .= "WHERE id_room_type = '$_GET[room_type]'";	
289 289
 								 }
290 290
 
291
-								 $tSQL .=	"ORDER BY room_type";	
291
+								 $tSQL .= "ORDER BY room_type";	
292 292
 
293 293
 								 $type = mysql_query($tSQL);
294 294
 		             						 
295
-								 while($t=mysql_fetch_array($type)){
295
+								 while ($t = mysql_fetch_array($type)) {
296 296
 
297 297
 								 $id_room_type = $t['id_room_type'];  
298 298
 
@@ -301,14 +301,14 @@  discard block
 block discarded – undo
301 301
 		                         echo"<td style='background-color: #1ABB9C;color: #E7E7E7;'>".$t['room_type']."</td>";
302 302
 
303 303
 
304
-		                        if ($lmonth == $fmonth  and $lyear == $fyear) {
304
+		                        if ($lmonth==$fmonth and $lyear==$fyear) {
305 305
 		
306
-									for($i = $fday; $i <= $lday; $i++)	{
306
+									for ($i = $fday; $i<=$lday; $i++) {
307 307
 											
308
-										if (strlen($i) == '1') {
309
-											$tgl = 	'0'.$i;
308
+										if (strlen($i)=='1') {
309
+											$tgl = '0'.$i;
310 310
 										} else {
311
-											$tgl = 	$i;
311
+											$tgl = $i;
312 312
 										}
313 313
 
314 314
 										$tanggal = $fyear.'-'.$fmonth.'-'.$tgl;
@@ -320,34 +320,34 @@  discard block
 block discarded – undo
320 320
 									
321 321
 								} else {
322 322
 									
323
-									for($i = $fday; $i <= $f_lastday; $i++)	{
323
+									for ($i = $fday; $i<=$f_lastday; $i++) {
324 324
 											
325
-										if (strlen($i) == '1') {
326
-											$tgl = 	'0'.$i;
325
+										if (strlen($i)=='1') {
326
+											$tgl = '0'.$i;
327 327
 										} else {
328
-											$tgl = 	$i;
328
+											$tgl = $i;
329 329
 										}
330 330
 										
331 331
 										$tanggal = $fyear.'-'.$fmonth.'-'.$tgl;
332 332
 
333
-										$DayName 	= date("D",strtotime($tanggal));
333
+										$DayName = date("D", strtotime($tanggal));
334 334
 										
335 335
 										echo"<td style='background-color: #1ABB9C;color: #E7E7E7;'>
336 336
 										</td>";
337 337
 										
338 338
 									}
339 339
 									
340
-									for($i = 1; $i <= $lday; $i++)	{
340
+									for ($i = 1; $i<=$lday; $i++) {
341 341
 											
342
-										if (strlen($i) == '1') {
343
-											$tgl = 	'0'.$i;
342
+										if (strlen($i)=='1') {
343
+											$tgl = '0'.$i;
344 344
 										} else {
345
-											$tgl = 	$i;
345
+											$tgl = $i;
346 346
 										}
347 347
 										
348 348
 										$tanggal = $lyear.'-'.$lmonth.'-'.$tgl;
349 349
 
350
-										$DayName 	= date("D",strtotime($tanggal));
350
+										$DayName = date("D", strtotime($tanggal));
351 351
 										
352 352
 										echo"<td style='background-color: #1ABB9C;color: #E7E7E7;'>
353 353
 										</td>";
@@ -357,19 +357,19 @@  discard block
 block discarded – undo
357 357
 
358 358
 								 echo"</tr>";	
359 359
 
360
-									 $rSQL=	"SELECT * FROM room WHERE id_room_type = '$id_room_type' ORDER BY room_no";	
360
+									 $rSQL = "SELECT * FROM room WHERE id_room_type = '$id_room_type' ORDER BY room_no";	
361 361
 								 
362 362
 									 $room = mysql_query($rSQL);
363 363
 		             				
364 364
 		             				 $no = 1;		 
365
-									 while($r=mysql_fetch_array($room)){
365
+									 while ($r = mysql_fetch_array($room)) {
366 366
 
367 367
 									 $aktif = $r['aktif']; 
368 368
 
369
-									 if(($no % 2)==0){
370
-									 	$sty="ftd";
371
-									 } else{
372
-									 	$sty="ltd";	
369
+									 if (($no % 2)==0) {
370
+									 	$sty = "ftd";
371
+									 } else {
372
+									 	$sty = "ltd";	
373 373
 									}	
374 374
 
375 375
 									 $id_room = $r['id_room'];  	
@@ -377,21 +377,21 @@  discard block
 block discarded – undo
377 377
 									echo"<tr>";
378 378
 									echo"<td style='padding-left:20px;text-align:left;' class=$sty>".$r['room_no']."</td>";
379 379
 
380
-									if ($lmonth == $fmonth  and $lyear == $fyear) {
380
+									if ($lmonth==$fmonth and $lyear==$fyear) {
381 381
 		
382
-									for($i = $fday; $i <= $lday; $i++)	{
382
+									for ($i = $fday; $i<=$lday; $i++) {
383 383
 											
384
-										if (strlen($i) == '1') {
385
-											$tgl = 	'0'.$i;
384
+										if (strlen($i)=='1') {
385
+											$tgl = '0'.$i;
386 386
 										} else {
387
-											$tgl = 	$i;
387
+											$tgl = $i;
388 388
 										}
389 389
 											
390 390
 										$tanggal = $fyear.'-'.$fmonth.'-'.$tgl;
391 391
 
392 392
 										echo"<td class=$sty style='padding:0;'>";
393 393
 
394
-										if ($aktif == 'T') {
394
+										if ($aktif=='T') {
395 395
 											echo"
396 396
 												<i class='fa fa-warning' style='color: red;font-size:18px' onMouseover=\"ddrivetip('Out of Order')\"; onMouseout=\"hideddrivetip()\"></i>
397 397
 												";
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
 										echo"<table cellpadding='0' cellspacing='0' border='0' width='100%'>";
401 401
 										echo"<tr>";
402 402
 
403
-										$cSQL =	"SELECT a.id_room,a.room_no,b.rdate,b.status,a.aktif,c.guest,c.initial,d.legend
403
+										$cSQL = "SELECT a.id_room,a.room_no,b.rdate,b.status,a.aktif,c.guest,c.initial,d.legend
404 404
 													FROM room a left join room_reservation b
405 405
 													 ON a.id_room = b.id_room
406 406
 													 and b.status in ('0','1')
@@ -417,21 +417,21 @@  discard block
 block discarded – undo
417 417
 										$jml = mysql_num_rows($croom); 
418 418
 			             						 
419 419
 										//$c=mysql_fetch_array($croom);
420
-										while ($c=mysql_fetch_array($croom)){  
420
+										while ($c = mysql_fetch_array($croom)) {  
421 421
 
422 422
 										$rdate = $c['rdate'];  
423 423
 
424
-										$lSQL =	"SELECT '$rdate' - INTERVAL 1 DAY as ldate, '$rdate' + INTERVAL 1 DAY as ndate ";	
424
+										$lSQL = "SELECT '$rdate' - INTERVAL 1 DAY as ldate, '$rdate' + INTERVAL 1 DAY as ndate ";	
425 425
 								 		//echo $lSQL;
426 426
 										$ld = mysql_query($lSQL);	
427 427
 
428
-										$l=mysql_fetch_array($ld);
428
+										$l = mysql_fetch_array($ld);
429 429
 
430 430
 										$ldate = $l['ldate'];
431 431
 
432 432
 										$ndate = $l['ndate'];
433 433
 
434
-										$cSQL1 =	"SELECT * from room_reservation 
434
+										$cSQL1 = "SELECT * from room_reservation 
435 435
 													 WHERE id_room = '$id_room' 
436 436
 													 AND rdate = '$ldate'";	
437 437
 								 	
@@ -444,7 +444,7 @@  discard block
 block discarded – undo
444 444
 										}
445 445
 										
446 446
 									
447
-										$cSQL2 =	"SELECT * from room_reservation 
447
+										$cSQL2 = "SELECT * from room_reservation 
448 448
 													 WHERE id_room = '$id_room' 
449 449
 													 AND rdate = '$ndate'";	
450 450
 								 	
@@ -466,15 +466,15 @@  discard block
 block discarded – undo
466 466
 										$status = $c['status'];  
467 467
 										
468 468
 										
469
-										if ($status == 0) {
469
+										if ($status==0) {
470 470
 											$icolor = '#fff';
471 471
 										} else {
472 472
 											$icolor = '#fff';
473 473
 										}
474 474
 
475
-										if ($status == 0) {
475
+										if ($status==0) {
476 476
 											$istatus = 'Reserved';
477
-										} elseif ($status == 1) {
477
+										} elseif ($status==1) {
478 478
 											$istatus = 'Check In';
479 479
 										} else {
480 480
 											$istatus = 'Check Out';
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
 
485 485
 
486 486
 
487
-										if($c['initial'] == 'Mr ' ) {
487
+										if ($c['initial']=='Mr ') {
488 488
 											$icon = 'fa fa-male';
489 489
 										} else {
490 490
 											$icon = 'fa fa-female';
@@ -494,15 +494,15 @@  discard block
 block discarded – undo
494 494
 
495 495
 										//if ($jml == '1') {
496 496
 										
497
-												if ($ljml == '0' and $jml == '1' and $njml == '1') {
497
+												if ($ljml=='0' and $jml=='1' and $njml=='1') {
498 498
 														echo"<td width='50%'>
499 499
 														</td>";
500 500
 												}
501 501
 
502
-												if 	($guest) {	
502
+												if ($guest) {	
503 503
 													
504 504
 
505
-													if 	($guest) {
505
+													if ($guest) {
506 506
 														echo"<td style='background-color:$legend;'  width='50%'>
507 507
 														<a href='' onMouseover=\"ddrivetip('$iguest')\"; onMouseout=\"hideddrivetip()\" title=''><i class='$icon' style='color: $icolor;font-size:15px'></i></a>
508 508
 														</td>";
@@ -516,7 +516,7 @@  discard block
 block discarded – undo
516 516
 
517 517
 											}
518 518
 
519
-												if ($ljml != '0' and $jml == '1') {
519
+												if ($ljml!='0' and $jml=='1') {
520 520
 														echo"<td width='50%'>
521 521
 														</td>";
522 522
 												}
@@ -534,19 +534,19 @@  discard block
 block discarded – undo
534 534
 									
535 535
 								} else {
536 536
 									
537
-									for($i = $fday; $i <= $f_lastday; $i++)	{
537
+									for ($i = $fday; $i<=$f_lastday; $i++) {
538 538
 											
539
-										if (strlen($i) == '1') {
540
-											$tgl = 	'0'.$i;
539
+										if (strlen($i)=='1') {
540
+											$tgl = '0'.$i;
541 541
 										} else {
542
-											$tgl = 	$i;
542
+											$tgl = $i;
543 543
 										}
544 544
 										
545 545
 										$tanggal = $fyear.'-'.$fmonth.'-'.$tgl;
546 546
 
547 547
 										echo"<td class=$sty style='padding:0;'>";
548 548
 
549
-										if ($aktif == 'T') {
549
+										if ($aktif=='T') {
550 550
 											echo"
551 551
 												<i class='fa fa-warning' style='color: red;font-size:18px' onMouseover=\"ddrivetip('Out of Order')\"; onMouseout=\"hideddrivetip()\"></i>
552 552
 												";
@@ -555,7 +555,7 @@  discard block
 block discarded – undo
555 555
 										echo"<table cellpadding='0' cellspacing='0' border='0' width='100%'>";
556 556
 										echo"<tr>";
557 557
 
558
-										$cSQL =	"SELECT a.id_room,a.room_no,b.rdate,b.status,a.aktif,c.guest,c.initial,d.legend
558
+										$cSQL = "SELECT a.id_room,a.room_no,b.rdate,b.status,a.aktif,c.guest,c.initial,d.legend
559 559
 													FROM room a left join room_reservation b
560 560
 													 ON a.id_room = b.id_room
561 561
 													 and b.status in ('0','1')
@@ -572,7 +572,7 @@  discard block
 block discarded – undo
572 572
 										$jml = mysql_num_rows($croom); 
573 573
 			             						 
574 574
 										//$c=mysql_fetch_array($croom);
575
-										while ($c=mysql_fetch_array($croom)){  
575
+										while ($c = mysql_fetch_array($croom)) {  
576 576
 
577 577
 
578 578
 										$guest = $c['guest'];
@@ -580,15 +580,15 @@  discard block
 block discarded – undo
580 580
 										$legend = $c['legend'];  
581 581
 										$status = $c['status'];  
582 582
 										
583
-										if ($status == 0) {
583
+										if ($status==0) {
584 584
 											$icolor = '#fff';
585 585
 										} else {
586 586
 											$icolor = '#fff';
587 587
 										}
588 588
 
589
-										if ($status == 0) {
589
+										if ($status==0) {
590 590
 											$istatus = 'Reserved';
591
-										} elseif ($status == 1) {
591
+										} elseif ($status==1) {
592 592
 											$istatus = 'Check In';
593 593
 										} else {
594 594
 											$istatus = 'Check Out';
@@ -598,16 +598,16 @@  discard block
 block discarded – undo
598 598
 
599 599
 
600 600
 
601
-										if($c['initial'] == 'Mr ' ) {
601
+										if ($c['initial']=='Mr ') {
602 602
 											$icon = 'fa fa-male';
603 603
 										} else {
604 604
 											$icon = 'fa fa-female';
605 605
 										}	
606 606
 
607
-										if 	($guest) {	
607
+										if ($guest) {	
608 608
 											
609 609
 
610
-											if 	($guest) {
610
+											if ($guest) {
611 611
 												echo"<td style='background-color:$legend;'  width='50%'>
612 612
 												<a href='' onMouseover=\"ddrivetip('$iguest')\"; onMouseout=\"hideddrivetip()\" title=''><i class='$icon' style='color: $icolor;font-size:15px'></i></a>
613 613
 												</td>";
@@ -621,7 +621,7 @@  discard block
 block discarded – undo
621 621
 
622 622
 									}
623 623
 
624
-											if ($jml == '1') {
624
+											if ($jml=='1') {
625 625
 										 
626 626
 
627 627
 												echo"<td width='50%'>
@@ -635,19 +635,19 @@  discard block
 block discarded – undo
635 635
 										
636 636
 									}
637 637
 									
638
-									for($i = 1; $i <= $lday; $i++)	{
638
+									for ($i = 1; $i<=$lday; $i++) {
639 639
 											
640
-										if (strlen($i) == '1') {
641
-											$tgl = 	'0'.$i;
640
+										if (strlen($i)=='1') {
641
+											$tgl = '0'.$i;
642 642
 										} else {
643
-											$tgl = 	$i;
643
+											$tgl = $i;
644 644
 										}
645 645
 										
646 646
 										$tanggal = $lyear.'-'.$lmonth.'-'.$tgl;
647 647
 
648 648
 										echo"<td class=$sty style='padding:0;'>";
649 649
 
650
-										if ($aktif == 'T') {
650
+										if ($aktif=='T') {
651 651
 											echo"
652 652
 												<i class='fa fa-warning' style='color: red;font-size:18px' onMouseover=\"ddrivetip('Out of Order')\"; onMouseout=\"hideddrivetip()\"></i>
653 653
 												";
@@ -656,7 +656,7 @@  discard block
 block discarded – undo
656 656
 										echo"<table cellpadding='0' cellspacing='0' border='0' width='100%'>";
657 657
 										echo"<tr>";
658 658
 
659
-										$cSQL =	"SELECT a.id_room,a.room_no,b.rdate,b.status,a.aktif,c.guest,c.initial,d.legend
659
+										$cSQL = "SELECT a.id_room,a.room_no,b.rdate,b.status,a.aktif,c.guest,c.initial,d.legend
660 660
 													FROM room a left join room_reservation b
661 661
 													 ON a.id_room = b.id_room
662 662
 													 and b.status in ('0','1')
@@ -673,7 +673,7 @@  discard block
 block discarded – undo
673 673
 										$jml = mysql_num_rows($croom); 
674 674
 			             						 
675 675
 										//$c=mysql_fetch_array($croom);
676
-										while ($c=mysql_fetch_array($croom)){  
676
+										while ($c = mysql_fetch_array($croom)) {  
677 677
 
678 678
 
679 679
 										$guest = $c['guest'];
@@ -681,15 +681,15 @@  discard block
 block discarded – undo
681 681
 										$legend = $c['legend'];  
682 682
 										$status = $c['status'];  
683 683
 										
684
-										if ($status == 0) {
684
+										if ($status==0) {
685 685
 											$icolor = '#fff';
686 686
 										} else {
687 687
 											$icolor = '#fff';
688 688
 										}
689 689
 
690
-										if ($status == 0) {
690
+										if ($status==0) {
691 691
 											$istatus = 'Reserved';
692
-										} elseif ($status == 1) {
692
+										} elseif ($status==1) {
693 693
 											$istatus = 'Check In';
694 694
 										} else {
695 695
 											$istatus = 'Check Out';
@@ -699,16 +699,16 @@  discard block
 block discarded – undo
699 699
 
700 700
 
701 701
 
702
-										if($c['initial'] == 'Mr ' ) {
702
+										if ($c['initial']=='Mr ') {
703 703
 											$icon = 'fa fa-male';
704 704
 										} else {
705 705
 											$icon = 'fa fa-female';
706 706
 										}	
707 707
 
708
-										if 	($guest) {	
708
+										if ($guest) {	
709 709
 											
710 710
 
711
-											if 	($guest) {
711
+											if ($guest) {
712 712
 												echo"<td style='background-color:$legend;'  width='50%'>
713 713
 												<a href='' onMouseover=\"ddrivetip('$iguest')\"; onMouseout=\"hideddrivetip()\" title=''><i class='$icon' style='color: $icolor;font-size:15px'></i></a>
714 714
 												</td>";
@@ -722,7 +722,7 @@  discard block
 block discarded – undo
722 722
 
723 723
 									}
724 724
 
725
-											if ($jml == '1') {
725
+											if ($jml=='1') {
726 726
 												echo"<td width='50%'>
727 727
 												</td>";
728 728
 											}
@@ -755,10 +755,10 @@  discard block
 block discarded – undo
755 755
 										<tr>
756 756
 										<td style='padding-right:3px;'>Room Status : </td>	
757 757
 										<?
758
-											 $SQL=	"SELECT * FROM room_status where aktif ='Y' ORDER BY id_room_status";	
759
-											 $tampil=mysql_query($SQL);
758
+											 $SQL = "SELECT * FROM room_status where aktif ='Y' ORDER BY id_room_status";	
759
+											 $tampil = mysql_query($SQL);
760 760
 					             						 
761
-											 while($r=mysql_fetch_array($tampil)){
761
+											 while ($r = mysql_fetch_array($tampil)) {
762 762
 
763 763
 											 	
764 764
 											 echo"<td style='width:20px;background-color:".$r['legend'].";'>&nbsp</td>";
Please login to merge, or discard this patch.
modul/mod_home/home.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 
2 2
 <?php
3
-switch($_GET[act]){
3
+switch ($_GET[act]) {
4 4
 
5 5
 default:  
6 6
 
7 7
 
8
- $gtampil=mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
9
- $g=mysql_fetch_array($gtampil);
8
+ $gtampil = mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
9
+ $g = mysql_fetch_array($gtampil);
10 10
 
11 11
 if ($g['pict']) {
12 12
 	$pict = $g['pict'];
Please login to merge, or discard this patch.
modul/mod_rekam_medis/aksi_rekam_medis.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,22 +1,22 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 session_start();
3
-if (empty($_SESSION['username']) AND empty($_SESSION['password'])){
3
+if (empty($_SESSION['username']) AND empty($_SESSION['password'])) {
4 4
   echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
5
-} else{
5
+} else {
6 6
 include "./../../config/koneksi.php";
7 7
 include "./../../config/fungsi_thumb.php";
8 8
 
9
-$module=$_GET[module];
10
-$act=$_GET[act];
9
+$module = $_GET[module];
10
+$act = $_GET[act];
11 11
 
12 12
 $date     = date("d/m/Y");  
13 13
 $idate    = date("Y-m-d");
14 14
 $hour = time() - (1 * 1 * 60 * 60);
15
-$datetime   = date("Y-m-d G:i:s", $hour);
15
+$datetime = date("Y-m-d G:i:s", $hour);
16 16
 $userid   = $_SESSION['userid'];
17 17
 $business_type = $_SESSION['business_type']; 
18 18
 
19
-if ($module=='rekam_medis' AND $act=='update'){
19
+if ($module=='rekam_medis' AND $act=='update') {
20 20
 
21 21
   $id_module = $_POST['id_module'];
22 22
 
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
   ?>
40 40
    
41 41
   <script language="javascript">
42
-     window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module";?>";  
42
+     window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>";  
43 43
      window.parent.tb_remove();
44 44
    </script>
45 45
   
Please login to merge, or discard this patch.
modul/mod_rekam_medis/rekam_medis.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-switch($_GET[act]){
2
+switch ($_GET[act]) {
3 3
 
4 4
 default:  
5 5
   ?>
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
                         <div class="col-md-12 col-sm-12 col-xs-12">
12 12
                             <div class="x_panel">
13 13
                                 <div class="x_title">
14
-                                    <h2><?php echo $nmmodule;?></h2>
14
+                                    <h2><?php echo $nmmodule; ?></h2>
15 15
                                      <div class="clearfix"></div>
16 16
                                 </div>
17 17
                                 <div class="x_content">
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
                             
49 49
                          <?
50 50
                         
51
-            $tampil=mysql_query("SELECT a.*,b.nama,b.tgl_lahir,b.ktp,c.poli,d.kategori                                  
51
+            $tampil = mysql_query("SELECT a.*,b.nama,b.tgl_lahir,b.ktp,c.poli,d.kategori                                  
52 52
                                 FROM kunjungan_berobat a left join pasien b 
53 53
                                  ON a.id_pasien = b.id_pasien
54 54
                                  left join poli c 
@@ -59,10 +59,10 @@  discard block
 block discarded – undo
59 59
             
60 60
             $no = 1;
61 61
             
62
-            while ($r=mysql_fetch_array($tampil)){  
62
+            while ($r = mysql_fetch_array($tampil)) {  
63 63
 
64
-            $tgl       = DATE('d/m/Y',strtotime($r[tanggal]));
65
-            $tgl_lahir = DATE('d/m/Y',strtotime($r[tgl_lahir]));
64
+            $tgl       = DATE('d/m/Y', strtotime($r[tanggal]));
65
+            $tgl_lahir = DATE('d/m/Y', strtotime($r[tgl_lahir]));
66 66
 
67 67
             echo"<tr>";
68 68
             echo"<td>$tgl</td>";
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
             echo"<td>$r[tindakan]</td>";
77 77
             echo" <td  style='text-align:center;'>";
78 78
 
79
-            if($r_edit == 'Y') {
79
+            if ($r_edit=='Y') {
80 80
                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>";
81 81
                }
82 82
 
Please login to merge, or discard this patch.
modul/mod_rekam_medis/form_rekam_medis.php 1 patch
Spacing   +14 added lines, -14 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
                        }        
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 
156 156
 
157 157
  
158
-                  <?php if (@$data->rujukan=='Y'){ ?>
158
+                  <?php if (@$data->rujukan=='Y') { ?>
159 159
               
160 160
                     <div class="form-group">
161 161
                      <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Rujukan :</label>
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
                         <input type=radio name='rujukan' value='N' class="flat"> T                
165 165
                       </div>
166 166
                   </div>  
167
-                <?php   }else{ ?>  
167
+                <?php   } else { ?>  
168 168
                   
169 169
                     <div class="form-group">
170 170
                      <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Rujukan :</label>
Please login to merge, or discard this patch.
modul/mod_report_revenue/print_report_revenue.php 1 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,31 +104,31 @@  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 116
 $tipe  = $_GET['tipe'];
117 117
 
118 118
 $iprd  = $_GET['prd'].'-01';
119 119
 
120
-$nm_month = DATE('F Y',strtotime($iprd));
120
+$nm_month = DATE('F Y', strtotime($iprd));
121 121
 
122
-$year = DATE('Y',strtotime($iprd));
123
-$month = DATE('m',strtotime($iprd))*1;
122
+$year = DATE('Y', strtotime($iprd));
123
+$month = DATE('m', strtotime($iprd)) * 1;
124 124
 
125 125
 $nprd = getBulan1($month).' '.$year;
126 126
 
127
-$jenis_transaksi  = $_GET['jenis_transaksi'];
127
+$jenis_transaksi = $_GET['jenis_transaksi'];
128 128
 
129
-if ($tipe == 'R') {
129
+if ($tipe=='R') {
130 130
   $kertas = 'portrait';
131
-}  else {
131
+} else {
132 132
   $kertas = 'landscape';
133 133
 }
134 134
 ?>
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 <meta charset="utf-8">
139 139
 <meta http-equiv="X-UA-Compatible" content="IE=edge">
140 140
 <link rel="shortcut icon" type="image/x-icon" href="../images/favicon.png">
141
-<title><?php echo $imodule ;?> (<?php echo $nprd;?>)</title>
141
+<title><?php echo $imodule; ?> (<?php echo $nprd; ?>)</title>
142 142
 
143 143
 <!-- Tell the browser to be responsive to screen width -->
144 144
 <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
   }*/
181 181
 
182 182
   @media print {
183
-    @page { size: <?=$kertas;?> ; margin-top: 10px; margin-bottom: 0px; margin-left: 10px;}
183
+    @page { size: <?=$kertas; ?> ; margin-top: 10px; margin-bottom: 0px; margin-left: 10px;}
184 184
     body { margin-top: 10px; margin-bottom: 0px;margin-left: 10px;}
185 185
     .dataTables_wrapper .dt-buttons{display:none}
186 186
     .print{display:none}
@@ -245,14 +245,14 @@  discard block
 block discarded – undo
245 245
       <div class="noprint"  >
246 246
         <button class='print pull-right' onclick="javascript:window.close()"><i class="fa fa-lg fa-close"></i> Close</button>
247 247
         <button class='print pull-right' onclick="icetak()"><i class="fa fa-lg fa-print"></i> Print</button>
248
-        <button class='print pull-right' onclick="window.open('eprint_report_revenue.php?prd=<?=$prd;?>&report_id=<?=$report_id;?>&tipe=<?=$tipe;?>', '_blank')"><i class="fa fa-lg fa-file-excel-o"></i> Excel</button>
248
+        <button class='print pull-right' onclick="window.open('eprint_report_revenue.php?prd=<?=$prd; ?>&report_id=<?=$report_id; ?>&tipe=<?=$tipe; ?>', '_blank')"><i class="fa fa-lg fa-file-excel-o"></i> Excel</button>
249 249
       </div>   
250 250
 
251 251
       <?
252 252
 
253
-       $gtampil=mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
253
+       $gtampil = mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
254 254
 
255
-       $g=mysql_fetch_array($gtampil);
255
+       $g = mysql_fetch_array($gtampil);
256 256
 
257 257
 
258 258
 
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
 
270 270
       $company = ucwords($g['company']);
271 271
 
272
-      $jsql   = mysql_query("SELECT * FROM jenis_transaksi
272
+      $jsql = mysql_query("SELECT * FROM jenis_transaksi
273 273
                             WHERE id_jenis_transaksi = '$jenis_transaksi' 
274 274
 								
275 275
 
@@ -277,12 +277,12 @@  discard block
 block discarded – undo
277 277
 
278 278
 
279 279
 
280
-      $j     = mysql_fetch_array($jsql); 
280
+      $j = mysql_fetch_array($jsql); 
281 281
 
282
-      $jenis_transaksi   = $j['jenis_transaksi'];  
282
+      $jenis_transaksi = $j['jenis_transaksi'];  
283 283
 
284 284
 
285
-      $sql   = mysql_query("SELECT a.*,b.shift FROM kasir  a LEFT JOIN shift b 
285
+      $sql = mysql_query("SELECT a.*,b.shift FROM kasir  a LEFT JOIN shift b 
286 286
                             ON a.id_shift = b.id_shift
287 287
                             WHERE a.id_kasir = '$k_ID' 
288 288
 
@@ -290,30 +290,30 @@  discard block
 block discarded – undo
290 290
 
291 291
 
292 292
 
293
-      $r     = mysql_fetch_array($sql); 
293
+      $r = mysql_fetch_array($sql); 
294 294
 
295 295
 
296
-      $penjualan_barang   = $r['id_kasir'];  
296
+      $penjualan_barang = $r['id_kasir'];  
297 297
 
298
-      $shift   = $r['shift'];  
298
+      $shift = $r['shift'];  
299 299
 
300
-      $petugas   = $r['petugas'];  
300
+      $petugas = $r['petugas'];  
301 301
 
302
-      $status   = $r['status']; 
302
+      $status = $r['status']; 
303 303
 
304
-      $tanggal   = DATE('d/m/Y',strtotime($r['tanggal']));  
304
+      $tanggal = DATE('d/m/Y', strtotime($r['tanggal']));  
305 305
 
306 306
       ?>
307 307
 
308
-      <? if ($tipe =='R') { ?>
308
+      <? if ($tipe=='R') { ?>
309 309
 
310 310
 
311 311
         <table width="100%">
312 312
           <tr>
313 313
           <td style="text-align: center;" colspan="3">
314
-          <h4 >REVENUE <?=$company;?>         
314
+          <h4 >REVENUE <?=$company; ?>         
315 315
           <BR>
316
-          PER : <?php echo $nprd;?>
316
+          PER : <?php echo $nprd; ?>
317 317
           </h4></td>
318 318
           </tr>      
319 319
         </table>
@@ -330,17 +330,17 @@  discard block
 block discarded – undo
330 330
             <tbody>
331 331
 
332 332
             <?
333
-            $htampil=mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' AND id_jenis_transaksi != '6' ORDER BY id_jenis_transaksi");
333
+            $htampil = mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' AND id_jenis_transaksi != '6' ORDER BY id_jenis_transaksi");
334 334
 
335 335
                     $hjml = mysql_num_rows($htampil);
336 336
               
337
-                    while ($h=mysql_fetch_array($htampil)){  
337
+                    while ($h = mysql_fetch_array($htampil)) {  
338 338
 
339 339
                       echo "<tr>";
340 340
                       echo "<td>".$h['jenis_transaksi']."</td>";
341 341
                       
342 342
                       //transaksi umum tunai
343
-                      $dtampil=mysql_query("SELECT COUNT(c.jumlah) as jml 
343
+                      $dtampil = mysql_query("SELECT COUNT(c.jumlah) as jml 
344 344
                             , IFNULL(SUM(c.jumlah),0) as rp  
345 345
                           FROM kasir b LEFT JOIN kasir_detail c
346 346
                           ON  b.id_kasir = c.id_kasir
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
                           AND c.id_jenis_transaksi = '".$h['id_jenis_transaksi']."'
350 350
                           AND b.status != '4'");
351 351
                                
352
-                     $d=mysql_fetch_array($dtampil);
352
+                     $d = mysql_fetch_array($dtampil);
353 353
 
354 354
 
355 355
                      echo "<th>".$d['jml']."</th>";
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
              <tr>
366 366
                 <th>TOTAL</th>  
367 367
                  <?
368
-                    $dtampil=mysql_query("SELECT COUNT(c.jumlah) as jml 
368
+                    $dtampil = mysql_query("SELECT COUNT(c.jumlah) as jml 
369 369
                                   , IFNULL(SUM(c.jumlah),0) as rp  
370 370
                                 FROM kasir b LEFT JOIN kasir_detail c
371 371
                                 ON  b.id_kasir = c.id_kasir
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
                                 WHERE b.tanggal like '$prd%'
374 374
                                 AND b.status != '4'");
375 375
                                      
376
-                    $d=mysql_fetch_array($dtampil);
376
+                    $d = mysql_fetch_array($dtampil);
377 377
 
378 378
                     echo "<th>".$d['jml']."</th>";
379 379
                     echo "<th style='text-align:right;'>".number_format($d['rp'], 0, ".", ",")."</th>";                   
@@ -411,9 +411,9 @@  discard block
 block discarded – undo
411 411
           <table width="100%">
412 412
           <tr>
413 413
           <td style="text-align: center;" colspan="3">
414
-          <h4 >REVENUE <?=$company;?>         
414
+          <h4 >REVENUE <?=$company; ?>         
415 415
           <BR>
416
-          PER : <?php echo $nprd;?>
416
+          PER : <?php echo $nprd; ?>
417 417
           </h4></td>
418 418
           </tr>      
419 419
         </table>
@@ -425,11 +425,11 @@  discard block
 block discarded – undo
425 425
 
426 426
                    <?
427 427
 
428
-                    $htampil=mysql_query("SELECT * FROM penjamin where aktif = 'Y' ORDER BY id_penjamin");
428
+                    $htampil = mysql_query("SELECT * FROM penjamin where aktif = 'Y' ORDER BY id_penjamin");
429 429
 
430 430
                     $hjml = mysql_num_rows($htampil);
431 431
               
432
-                    while ($h=mysql_fetch_array($htampil)){  
432
+                    while ($h = mysql_fetch_array($htampil)) {  
433 433
 
434 434
                     	echo "<th colspan='2' rowspan='2'>".$h['penjamin']."</th>";
435 435
 
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
 
453 453
 
454 454
                    <? 
455
-                   	for($j = 1; $j <= $hjml; $j++)  { 
455
+                   	for ($j = 1; $j<=$hjml; $j++) { 
456 456
 
457 457
                    		echo "<th>KUNJ</th>";  
458 458
                    		echo "<th>REV</th>";  
@@ -477,11 +477,11 @@  discard block
 block discarded – undo
477 477
 
478 478
               <? 
479 479
 
480
-                $htampil=mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' ORDER BY id_jenis_transaksi");
480
+                $htampil = mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' ORDER BY id_jenis_transaksi");
481 481
 
482 482
                 $hjml = mysql_num_rows($htampil);
483 483
               
484
-                while ($h=mysql_fetch_array($htampil)){  
484
+                while ($h = mysql_fetch_array($htampil)) {  
485 485
 
486 486
 
487 487
                  echo"<tr>";
@@ -490,7 +490,7 @@  discard block
 block discarded – undo
490 490
 
491 491
 
492 492
                   //transaksi asuransi
493
-                   $dtampil1=mysql_query("SELECT a.id_penjamin
493
+                   $dtampil1 = mysql_query("SELECT a.id_penjamin
494 494
                           , COUNT(c.jumlah) as jml 
495 495
                           , IFNULL(SUM(c.jumlah),0) as rp  
496 496
                         FROM penjamin a LEFT JOIN kasir b
@@ -506,7 +506,7 @@  discard block
 block discarded – undo
506 506
                         GROUP BY a.id_penjamin
507 507
                         ORDER BY a.id_penjamin");
508 508
                              
509
-                   while ($d1=mysql_fetch_array($dtampil1)){  
509
+                   while ($d1 = mysql_fetch_array($dtampil1)) {  
510 510
 
511 511
 
512 512
                       echo "<td style='text-align:center;'>".$d1['jml']."</td>";
@@ -516,7 +516,7 @@  discard block
 block discarded – undo
516 516
 
517 517
 
518 518
    
519
-                  $dtampil2=mysql_query("SELECT COUNT(c.jumlah) as jml 
519
+                  $dtampil2 = mysql_query("SELECT COUNT(c.jumlah) as jml 
520 520
                                             ,   IFNULL(SUM(c.jumlah),0) as rp  
521 521
                                         FROM kasir b LEFT JOIN kasir_detail c
522 522
                                         ON  b.id_kasir = c.id_kasir
@@ -526,13 +526,13 @@  discard block
 block discarded – undo
526 526
                       AND c.id_jenis_transaksi = '".$h['id_jenis_transaksi']."'
527 527
                                         AND b.status != '4'");
528 528
                            
529
-                 $d2=mysql_fetch_array($dtampil2);
529
+                 $d2 = mysql_fetch_array($dtampil2);
530 530
 
531 531
 
532 532
                  echo "<td style='text-align:center;'>".$d2['jml']."</td>";
533 533
                  echo "<td style='text-align:right;'>".number_format($d2['rp'], 0, ".", ",")."</td>";
534 534
 
535
-                 $dtampil3=mysql_query("SELECT COUNT(c.jumlah) as jml 
535
+                 $dtampil3 = mysql_query("SELECT COUNT(c.jumlah) as jml 
536 536
                         , IFNULL(SUM(c.jumlah),0) as rp  
537 537
                       FROM kasir b LEFT JOIN kasir_detail c
538 538
                       ON  b.id_kasir = c.id_kasir
@@ -542,7 +542,7 @@  discard block
 block discarded – undo
542 542
                       AND c.id_jenis_transaksi = '".$h['id_jenis_transaksi']."'
543 543
                       AND b.status != '4'");
544 544
                            
545
-                 $d3=mysql_fetch_array($dtampil3);
545
+                 $d3 = mysql_fetch_array($dtampil3);
546 546
 
547 547
 
548 548
                  echo "<td style='text-align:center;'>".$d3['jml']."</td>";
@@ -550,7 +550,7 @@  discard block
 block discarded – undo
550 550
 
551 551
 
552 552
           
553
-                 $dtampil=mysql_query("SELECT COUNT(c.jumlah) as jml 
553
+                 $dtampil = mysql_query("SELECT COUNT(c.jumlah) as jml 
554 554
                             , IFNULL(SUM(c.jumlah),0) as rp  
555 555
                           FROM kasir b LEFT JOIN kasir_detail c
556 556
                           ON  b.id_kasir = c.id_kasir
@@ -559,7 +559,7 @@  discard block
 block discarded – undo
559 559
                           AND c.id_jenis_transaksi = '".$h['id_jenis_transaksi']."'
560 560
                           AND b.status != '4'");
561 561
                                
562
-                     $d=mysql_fetch_array($dtampil);
562
+                     $d = mysql_fetch_array($dtampil);
563 563
 
564 564
 
565 565
                 echo "<td style='text-align:center;'>".$d['jml']."</td>";
@@ -583,7 +583,7 @@  discard block
 block discarded – undo
583 583
 
584 584
 
585 585
                   //transaksi asuransi
586
-                   $dtampil1=mysql_query("SELECT a.id_penjamin
586
+                   $dtampil1 = mysql_query("SELECT a.id_penjamin
587 587
                           , COUNT(c.jumlah) as jml 
588 588
                           , IFNULL(SUM(c.jumlah),0) as rp  
589 589
                         FROM penjamin a LEFT JOIN kasir b
@@ -598,7 +598,7 @@  discard block
 block discarded – undo
598 598
                         GROUP BY a.id_penjamin
599 599
                         ORDER BY a.id_penjamin");
600 600
                              
601
-                   while ($d1=mysql_fetch_array($dtampil1)){  
601
+                   while ($d1 = mysql_fetch_array($dtampil1)) {  
602 602
 
603 603
 
604 604
                       echo "<th>".$d1['jml']."</th>";
@@ -608,7 +608,7 @@  discard block
 block discarded – undo
608 608
 
609 609
 
610 610
    
611
-                  $dtampil2=mysql_query("SELECT COUNT(c.jumlah) as jml 
611
+                  $dtampil2 = mysql_query("SELECT COUNT(c.jumlah) as jml 
612 612
                                             ,   IFNULL(SUM(c.jumlah),0) as rp  
613 613
                                         FROM kasir b LEFT JOIN kasir_detail c
614 614
                                         ON  b.id_kasir = c.id_kasir
@@ -617,13 +617,13 @@  discard block
 block discarded – undo
617 617
                                         WHERE b.tanggal LIKE '$prd%'
618 618
                                         AND b.status != '4'");
619 619
                            
620
-                 $d2=mysql_fetch_array($dtampil2);
620
+                 $d2 = mysql_fetch_array($dtampil2);
621 621
 
622 622
 
623 623
                  echo "<th>".$d2['jml']."</th>";
624 624
                  echo "<th style='text-align:right;'>".number_format($d2['rp'], 0, ".", ",")."</th>";
625 625
 
626
-                 $dtampil3=mysql_query("SELECT COUNT(c.jumlah) as jml 
626
+                 $dtampil3 = mysql_query("SELECT COUNT(c.jumlah) as jml 
627 627
                         , IFNULL(SUM(c.jumlah),0) as rp  
628 628
                       FROM kasir b LEFT JOIN kasir_detail c
629 629
                       ON  b.id_kasir = c.id_kasir
@@ -632,7 +632,7 @@  discard block
 block discarded – undo
632 632
                       WHERE b.tanggal LIKE '$prd%'
633 633
                       AND b.status != '4'");
634 634
                            
635
-                 $d3=mysql_fetch_array($dtampil3);
635
+                 $d3 = mysql_fetch_array($dtampil3);
636 636
 
637 637
 
638 638
                  echo "<th>".$d3['jml']."</th>";
@@ -640,7 +640,7 @@  discard block
 block discarded – undo
640 640
 
641 641
 
642 642
           
643
-                 $dtampil=mysql_query("SELECT COUNT(c.jumlah) as jml 
643
+                 $dtampil = mysql_query("SELECT COUNT(c.jumlah) as jml 
644 644
                             , IFNULL(SUM(c.jumlah),0) as rp  
645 645
                           FROM kasir b LEFT JOIN kasir_detail c
646 646
                           ON  b.id_kasir = c.id_kasir
@@ -648,7 +648,7 @@  discard block
 block discarded – undo
648 648
                           WHERE b.tanggal like '$prd%'
649 649
                           AND b.status != '4'");
650 650
                                
651
-                     $d=mysql_fetch_array($dtampil);
651
+                     $d = mysql_fetch_array($dtampil);
652 652
 
653 653
 
654 654
                 echo "<th>".$d['jml']."</th>";
@@ -669,16 +669,16 @@  discard block
 block discarded – undo
669 669
 
670 670
         <? 
671 671
 
672
-        $lastday = DATE('t',strtotime($iprd));
672
+        $lastday = DATE('t', strtotime($iprd));
673 673
 
674
-        $year = DATE('Y',strtotime($iprd));
674
+        $year = DATE('Y', strtotime($iprd));
675 675
 
676
-        $month = DATE('m',strtotime($iprd))*1;
676
+        $month = DATE('m', strtotime($iprd)) * 1;
677 677
 
678
-        if ($month == '1') {
678
+        if ($month=='1') {
679 679
         	$imonth = 12;
680 680
         } else {
681
-        	$imonth = $month-1;
681
+        	$imonth = $month - 1;
682 682
         }
683 683
 
684 684
     	$nprd = $lastday.' '.getBulan1($imonth).' '.$year;
Please login to merge, or discard this patch.