Passed
Branch master (c66316)
by Saepul
06:04
created
koneksi.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,6 +12,6 @@
 block discarded – undo
12 12
 //$database = "k7398289_three";
13 13
 
14 14
 // Koneksi dan memilih database di server
15
-mysql_connect($server,$username,$password) or die("Koneksi gagal");
15
+mysql_connect($server, $username, $password) or die("Koneksi gagal");
16 16
 mysql_select_db($database) or die("Database tidak bisa dibuka");
17 17
 ?>
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 		<form method="post" action="cek_login.php" accept-charset="utf-8">
34 34
 		
35 35
 		<label id="username">
36
-			<input type="text" name="userid" value='<?php echo $userid;?>' <?php if (!$userid) { echo 'autofocus'; } ?> placeholder="Pengguna" required autofocus onKeyUp="" >
36
+			<input type="text" name="userid" value='<?php echo $userid; ?>' <?php if (!$userid) { echo 'autofocus'; } ?> placeholder="Pengguna" required autofocus onKeyUp="" >
37 37
 		</label>
38 38
 			<br>
39 39
 		<label id="password">	
@@ -49,16 +49,16 @@  discard block
 block discarded – undo
49 49
 	<br><br><br>
50 50
 	<?php
51 51
 	$SQL = "SELECT* FROM versi WHERE status = 'A' ";
52
-	$tampil=mysql_query($SQL);
52
+	$tampil = mysql_query($SQL);
53 53
 	$p = mysql_fetch_array($tampil);
54 54
 
55 55
 	$app = $p['aplikasi'];
56 56
 
57
-	$versi = $p['versi'];;
57
+	$versi = $p['versi']; ;
58 58
 	?>
59 59
                 
60
-	<div class="wifi" style="font-size: 33px;"><?php echo $app;?></div>
61
-		<!-- <p class="copyright">Version : <?php echo $versi;?></p> -->
60
+	<div class="wifi" style="font-size: 33px;"><?php echo $app; ?></div>
61
+		<!-- <p class="copyright">Version : <?php echo $versi; ?></p> -->
62 62
 	</footer>
63 63
 </body>
64 64
 </html>
65 65
\ No newline at end of file
Please login to merge, or discard this patch.
main.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 session_start();
3
-if (empty($_SESSION['userid']) AND empty($_SESSION['password'])){
3
+if (empty($_SESSION['userid']) AND empty($_SESSION['password'])) {
4 4
 
5 5
  echo "<script>window.alert('Login first.'); window.location=('index.php')</script>";
6 6
  
@@ -18,9 +18,9 @@  discard block
 block discarded – undo
18 18
 $role     = $_SESSION['role'];  
19 19
 $groups   = $_SESSION['groups'];  
20 20
 $outlet   = $_SESSION['outlet'];  
21
-$df_outlet   = $_SESSION['outlet'];  
21
+$df_outlet = $_SESSION['outlet'];  
22 22
 
23
-$tipe_sales   = $_SESSION['tipe_sales'];  
23
+$tipe_sales = $_SESSION['tipe_sales'];  
24 24
 
25 25
 $r_input = $_SESSION['r_input'];  
26 26
 $r_edit = $_SESSION['r_edit'];
@@ -31,11 +31,11 @@  discard block
 block discarded – undo
31 31
 
32 32
 
33 33
 
34
- $gsql=mysql_query("SELECT a.main_page,b.id_modul FROM groups a inner join modul b
34
+ $gsql = mysql_query("SELECT a.main_page,b.id_modul FROM groups a inner join modul b
35 35
                     on a.main_page = b.link
36 36
                     WHERE id_groups ='$groups'");
37 37
 
38
- $g=mysql_fetch_array($gsql);
38
+ $g = mysql_fetch_array($gsql);
39 39
 
40 40
 
41 41
   if ($g['main_page']) {
@@ -45,11 +45,11 @@  discard block
 block discarded – undo
45 45
   }
46 46
 
47 47
 
48
-$SQL=   "SELECT * FROM informasi_perusahaan WHERE id_informasi_perusahaan = '1'";   
48
+$SQL = "SELECT * FROM informasi_perusahaan WHERE id_informasi_perusahaan = '1'";   
49 49
 
50
-$tampil=mysql_query($SQL);
50
+$tampil = mysql_query($SQL);
51 51
                          
52
-$r=mysql_fetch_array($tampil);
52
+$r = mysql_fetch_array($tampil);
53 53
 
54 54
 $company = $r[company];
55 55
 
@@ -57,21 +57,21 @@  discard block
 block discarded – undo
57 57
 $module = trim($_GET[module]);
58 58
 
59 59
 
60
-$uSQL=   "SELECT pict FROM user where id_user = '$userid' ";   
60
+$uSQL = "SELECT pict FROM user where id_user = '$userid' ";   
61 61
 
62
-$utampil=mysql_query($uSQL);
62
+$utampil = mysql_query($uSQL);
63 63
                          
64
-$u=mysql_fetch_array($utampil);
64
+$u = mysql_fetch_array($utampil);
65 65
 
66
-$pict     = $u['pict'];  
66
+$pict = $u['pict'];  
67 67
 
68 68
 
69 69
 
70 70
 $id_module = $_GET['id_module'];
71 71
 
72 72
 
73
-$sql=mysql_query("select * from modul where id_modul = '$_GET[id_module]'");
74
-$r=mysql_fetch_array($sql);
73
+$sql = mysql_query("select * from modul where id_modul = '$_GET[id_module]'");
74
+$r = mysql_fetch_array($sql);
75 75
 
76 76
 $imodule    = $_GET['module'];
77 77
 $nmmodule   = ucwords($r['nama_modul']);
@@ -79,8 +79,8 @@  discard block
 block discarded – undo
79 79
 
80 80
 $fa_icon    = $r['ficon'];
81 81
 
82
-$psql=mysql_query("select * from modul where id_modul = '$r[parentid]'");
83
-$p=mysql_fetch_array($psql);
82
+$psql = mysql_query("select * from modul where id_modul = '$r[parentid]'");
83
+$p = mysql_fetch_array($psql);
84 84
 
85 85
 $p_imodule   = $p['nama_modul'];
86 86
 $p_id        = $p['id_modul'];
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 $kode = $_GET['kode'];
90 90
 
91 91
 
92
-if($_GET['fdate']) {
92
+if ($_GET['fdate']) {
93 93
     $fdate  = $_GET['fdate'];
94 94
     $ifdate = $_GET['fdate'];
95 95
 } else {
@@ -98,13 +98,13 @@  discard block
 block discarded – undo
98 98
     $ifdate = date("Y-m-d", $hour);
99 99
 }
100 100
 
101
-if($_GET['ldate']) {
101
+if ($_GET['ldate']) {
102 102
     $ldate  = $_GET['ldate'];
103 103
     $ildate = $_GET['ldate'];
104 104
 } else {
105 105
     $hour = time() - (1 * 1 * 60 * 60) + (168 * 1 * 60 * 60);
106
-    $ldate  = date("Y-m-d",$hour);
107
-    $ildate = date("Y-m-d",$hour);
106
+    $ldate  = date("Y-m-d", $hour);
107
+    $ildate = date("Y-m-d", $hour);
108 108
 }
109 109
 
110 110
 
@@ -114,12 +114,12 @@  discard block
 block discarded – undo
114 114
 
115 115
 <?php
116 116
     $SQL = "SELECT* FROM versi WHERE status = 'A' ";
117
-    $tampil=mysql_query($SQL);
117
+    $tampil = mysql_query($SQL);
118 118
     $p = mysql_fetch_array($tampil);
119 119
 
120 120
     $app = $p['aplikasi'];
121 121
 
122
-    $versi = $p['versi'];;
122
+    $versi = $p['versi']; ;
123 123
 ?>
124 124
 
125 125
 <!DOCTYPE html>
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
132 132
     <meta name="viewport" content="width=device-width, initial-scale=1">
133 133
 
134
-    <title><?=$app;?></title>
134
+    <title><?=$app; ?></title>
135 135
 
136 136
     
137 137
     <!-- Bootstrap core CSS -->
@@ -211,10 +211,10 @@  discard block
 block discarded – undo
211 211
 
212 212
 <?php
213 213
 $mod = '?module='.$_GET['module'];          
214
-$tampil=mysql_query("SELECT orientation FROM modul WHERE link='".$mod."'");                     
215
-$r=mysql_fetch_array($tampil);
214
+$tampil = mysql_query("SELECT orientation FROM modul WHERE link='".$mod."'");                     
215
+$r = mysql_fetch_array($tampil);
216 216
 
217
-if ($r[orientation] == 'P') {
217
+if ($r[orientation]=='P') {
218 218
 ?>
219 219
         
220 220
 <SCRIPT TYPE="text/javascript">
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 //-->
230 230
 </SCRIPT>
231 231
 
232
-<?php } elseif ($r[orientation] == 'A') { ?>
232
+<?php } elseif ($r[orientation]=='A') { ?>
233 233
 
234 234
 <SCRIPT TYPE="text/javascript">
235 235
 <!--
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
 <?php
270 270
 
271 271
 $SQL = "SELECT* FROM versi WHERE status = 'A' ";
272
-$tampil=mysql_query($SQL);
272
+$tampil = mysql_query($SQL);
273 273
 $p = mysql_fetch_array($tampil);
274 274
 
275 275
 $app = $p['aplikasi'];
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
 
292 292
                     <div class="navbar nav_title" style="border: 0;text-align:center;">
293 293
                        <!--  <a href="#" class="site_title">
294
-                           <span style='font-size:14px' class="btn btn-success"><?php echo $app;?></span>
294
+                           <span style='font-size:14px' class="btn btn-success"><?php echo $app; ?></span>
295 295
                         </a> -->
296 296
 
297 297
                     </div>
@@ -300,11 +300,11 @@  discard block
 block discarded – undo
300 300
                    
301 301
                     <div class="profile">
302 302
                         <div class="profile_pic">
303
-                            <img src="images/profile/<?php echo $pict;?>" alt="..." class="img-circle profile_img">
303
+                            <img src="images/profile/<?php echo $pict; ?>" alt="..." class="img-circle profile_img">
304 304
                         </div>
305 305
                         <div class="profile_info">                      
306 306
                             <span>Hallo,</span>                       
307
-                            <h2><?php echo $username;?></h2>
307
+                            <h2><?php echo $username; ?></h2>
308 308
                         </div>
309 309
                     </div>
310 310
                     <!-- /menu prile quick info -->
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
                        <!--  <ul class="nav navbar-nav navbar-right">
362 362
                             <li class="">
363 363
                                 <a href="javascript:;" class="user-profile dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
364
-                                    <img src="images/profile/<?php echo $pict;?>" alt=""><?php echo $userid;?>
364
+                                    <img src="images/profile/<?php echo $pict; ?>" alt=""><?php echo $userid; ?>
365 365
                                     <span class=" fa fa-angle-down"></span>
366 366
                                 </a>
367 367
                                 <ul class="dropdown-menu dropdown-usermenu animated fadeInDown pull-right">
@@ -392,12 +392,12 @@  discard block
 block discarded – undo
392 392
 
393 393
                     <?php
394 394
                     $SQL = "SELECT* FROM versi WHERE status = 'A' ";
395
-                    $tampil=mysql_query($SQL);
395
+                    $tampil = mysql_query($SQL);
396 396
                     $p = mysql_fetch_array($tampil);
397 397
 
398 398
                     $app = $p['aplikasi'];
399 399
 
400
-                    $versi = $p['versi'];;
400
+                    $versi = $p['versi']; ;
401 401
                     ?>
402 402
                 
403 403
                         <div class="col-md-3 col-sm-12 col-xs-12 form-group" >
Please login to merge, or discard this patch.
modul/mod_poli/poli.php 1 patch
Spacing   +6 added lines, -6 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='<?php echo $nmmodule;?> Baru' class='thickbox btn btn-sm btn-success'><i class="fa fa-plus"></i> Baru</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='<?php echo $nmmodule; ?> Baru' class='thickbox btn btn-sm btn-success'><i class="fa fa-plus"></i> Baru</a></p>
17 17
                                     <div class="clearfix"></div>
18 18
                                 </div>
19 19
                                 <div class="x_content">
@@ -43,18 +43,18 @@  discard block
 block discarded – undo
43 43
                             
44 44
                          <?
45 45
                         
46
-            $tampil=mysql_query("SELECT * FROM poli ORDER BY id_poli");
46
+            $tampil = mysql_query("SELECT * FROM poli ORDER BY id_poli");
47 47
             
48 48
             $no = 1;
49 49
             
50
-            while ($r=mysql_fetch_array($tampil)){  
50
+            while ($r = mysql_fetch_array($tampil)) {  
51 51
             
52 52
             echo"<tr>";
53 53
             echo"<td>$r[poli]</td>";
54 54
             echo"<td style='text-align:center;'>$r[aktif]</td>";  
55 55
             echo" <td  style='text-align:center;'>";
56 56
 
57
-            if($r_edit == 'Y') {
57
+            if ($r_edit=='Y') {
58 58
                echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_poli=$r[id_poli]&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>";
59 59
                }
60 60
 
Please login to merge, or discard this patch.
modul/mod_poli/form_poli.php 1 patch
Spacing   +10 added lines, -10 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_poli']) ? intval($_GET['id_poli']) : false;
45 45
   
46
-  if($id){
46
+  if ($id) {
47 47
      $query = mysql_query('SELECT * FROM poli WHERE id_poli = "'.$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
   
@@ -83,9 +83,9 @@  discard block
 block discarded – undo
83 83
           </div>
84 84
 
85 85
         
86
-          <?php if ($id){ ?>  
86
+          <?php if ($id) { ?>  
87 87
     
88
-            <?php if (@$data->aktif=='Y'){ ?>
88
+            <?php if (@$data->aktif=='Y') { ?>
89 89
               
90 90
                 <div class="form-group">
91 91
 	               <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Aktif :</label>
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
                     <input type=radio name='aktif' value='N' class="flat"> T                
95 95
                   </div>
96 96
               </div>  
97
-            <?php   }else{ ?>  
97
+            <?php   } else { ?>  
98 98
               
99 99
                 <div class="form-group">
100 100
 	               <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Aktif :</label>
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
               </div>  
106 106
              <?php } ?>
107 107
 
108
-        <?php   }else{ ?>  
108
+        <?php   } else { ?>  
109 109
 
110 110
            
111 111
                 <div class="form-group">
Please login to merge, or discard this patch.
modul/mod_poli/aksi_poli.php 1 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
 
18 18
 
19 19
 // Hapus modul
20
-if ($module=='poli' AND $act=='hapus'){
20
+if ($module=='poli' 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=='poli' AND $act=='input'){
40
+elseif ($module=='poli' 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 poli SET poli   = '$_POST[poli]'
47 47
                     ,upddt   = '$datetime' 
48 48
                   ,updby   = '$userid' 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
   ?>
76 76
    
77 77
   <script language="javascript">
78
-     window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module";?>";  
78
+     window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>";  
79 79
      window.parent.tb_remove();
80 80
    </script>
81 81
   
Please login to merge, or discard this patch.
modul/mod_report_stok/print_report_stok.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -2,9 +2,9 @@  discard block
 block discarded – undo
2 2
 include "./../../config/koneksi.php";
3 3
 include "./../../config/fungsi_indobulan.php";
4 4
 
5
-$tampil=mysql_query("SELECT * FROM modul WHERE id_modul ='".$_GET[report_id]."'");
5
+$tampil = mysql_query("SELECT * FROM modul WHERE id_modul ='".$_GET[report_id]."'");
6 6
             
7
-$r=mysql_fetch_array($tampil);
7
+$r = mysql_fetch_array($tampil);
8 8
 
9 9
 $module   = $_GET['module'];
10 10
 $imodule  = ucwords($r['nama_modul']);
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 $id       = $r['id_modul'];
13 13
 $fa_icon    = $r['fa_icon'];
14 14
 
15
-if($r[orientation] == 'P') {
15
+if ($r[orientation]=='P') {
16 16
   $orientation = 'portrait';
17 17
 } else {
18 18
   $orientation = 'landscape';
@@ -22,8 +22,8 @@  discard block
 block discarded – undo
22 22
 $fdate = $_GET['fdate'];
23 23
 $ldate = $_GET['ldate'];
24 24
 
25
-$ftgl = DATE('d/m/Y',strtotime($_GET['fdate']));
26
-$ltgl = DATE('d/m/Y',strtotime($_GET['ldate']));
25
+$ftgl = DATE('d/m/Y', strtotime($_GET['fdate']));
26
+$ltgl = DATE('d/m/Y', strtotime($_GET['ldate']));
27 27
                 
28 28
 ?>
29 29
 
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 
141 141
 <!--<body onload="cetakspk()">-->
142 142
 
143
-<? if ($_GET['printto'] == '2') { ?>
143
+<? if ($_GET['printto']=='2') { ?>
144 144
 <body onload="icetak()">
145 145
 <? } else { ?>
146 146
 <body>
@@ -162,8 +162,8 @@  discard block
 block discarded – undo
162 162
 
163 163
 
164 164
 <?
165
-$gtampil=mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
166
- $g=mysql_fetch_array($gtampil);
165
+$gtampil = mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
166
+ $g = mysql_fetch_array($gtampil);
167 167
 
168 168
 if ($g['pict']) {
169 169
   $pict = $g['pict'];
@@ -177,12 +177,12 @@  discard block
 block discarded – undo
177 177
  <table width='100%' style="padding-top:10px;">
178 178
 <tr>
179 179
 <td width='10%'>
180
-<!-- <img src="../../images/logo/<?=$pict;?>" width=100px> -->
180
+<!-- <img src="../../images/logo/<?=$pict; ?>" width=100px> -->
181 181
 </td>
182 182
 <td style="text-align:center;" width='80%'>
183
-<span class='h1'><?=$nmmodule;?></span>
183
+<span class='h1'><?=$nmmodule; ?></span>
184 184
 <? echo "<span class='h2'>".$g['company']."</span><br>"; ?>
185
-<br>Periode : <?=$ftgl;?> - <?=$ltgl;?>
185
+<br>Periode : <?=$ftgl; ?> - <?=$ltgl; ?>
186 186
 </td>
187 187
 <td width='10%'>
188 188
 &nbsp
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
                             
210 210
                          <?
211 211
                         
212
-             $tampil=mysql_query("SELECT a.obat,b.satuan,a.jumlah,ifnull(sum(d.qty),0) as keluar
212
+             $tampil = mysql_query("SELECT a.obat,b.satuan,a.jumlah,ifnull(sum(d.qty),0) as keluar
213 213
                                 FROM obat a left join satuan b 
214 214
                                  ON a.id_satuan = b.id_satuan
215 215
                                  left join kunjungan_berobat c 
@@ -223,13 +223,13 @@  discard block
 block discarded – undo
223 223
 
224 224
             $no = 1;
225 225
             
226
-            while ($r=mysql_fetch_array($tampil)){  
226
+            while ($r = mysql_fetch_array($tampil)) {  
227 227
 
228
-            $tgl       = DATE('d/m/Y',strtotime($r[tanggal]));
228
+            $tgl = DATE('d/m/Y', strtotime($r[tanggal]));
229 229
 
230
-            $id_pasien    = $r[id_pasien];
230
+            $id_pasien = $r[id_pasien];
231 231
 
232
-            $stok = $r[jumlah]+$r[keluar];
232
+            $stok = $r[jumlah] + $r[keluar];
233 233
 
234 234
             echo"<tr>";
235 235
             echo"<td style='text-align:center;'>$no</td>";
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
                                 <th colspan= '3'>TOTAL</th>
250 250
 
251 251
                                 <?
252
-                                $dtampil=mysql_query("SELECT sum(a.jumlah) as jumlah,ifnull(sum(d.qty),0) as keluar
252
+                                $dtampil = mysql_query("SELECT sum(a.jumlah) as jumlah,ifnull(sum(d.qty),0) as keluar
253 253
                                 FROM obat a left join satuan b 
254 254
                                  ON a.id_satuan = b.id_satuan
255 255
                                  left join kunjungan_berobat c 
@@ -261,9 +261,9 @@  discard block
 block discarded – undo
261 261
                                  AND a.id_obat = d.id_obat");  
262 262
 
263 263
 
264
-                                $d=mysql_fetch_array($dtampil);
264
+                                $d = mysql_fetch_array($dtampil);
265 265
 
266
-                                $tstok = $d[jumlah]+$d[keluar];
266
+                                $tstok = $d[jumlah] + $d[keluar];
267 267
 
268 268
                                 echo"<td style='text-align:right;'>$tstok</td>";     
269 269
                                 echo"<td style='text-align:right;'>$d[keluar]</td>";     
Please login to merge, or discard this patch.
modul/mod_report_stok/report_stok.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
   }
36 36
 
37
-  xmlhttp.open("GET","<?php echo"./modul/mod_$module/getlokasi.php?q=";?>"+str,true);
37
+  xmlhttp.open("GET","<?php echo"./modul/mod_$module/getlokasi.php?q="; ?>"+str,true);
38 38
 
39 39
   xmlhttp.send();
40 40
 
@@ -54,28 +54,28 @@  discard block
 block discarded – undo
54 54
 
55 55
 
56 56
 <?php
57
-switch($_GET[act]){
57
+switch ($_GET[act]) {
58 58
 
59 59
 default:  
60 60
 
61 61
 $fdate   = date("Y-m-01");
62 62
 $ldate   = date("Y-m-d");
63 63
 
64
-$prd   = date("Y-m");
64
+$prd = date("Y-m");
65 65
 
66
-$userid   = $_SESSION['userid'];  
66
+$userid = $_SESSION['userid'];  
67 67
   ?>
68 68
 
69 69
  <div class="">
70 70
                    
71 71
         <div class="row">
72 72
 
73
-          <form name="myform" id="myform" method="get" action="<? echo"modul/mod_$module/print_$module.php";?>"  onSubmit="popup<?=$module?>(this, 'join')"> 
73
+          <form name="myform" id="myform" method="get" action="<? echo"modul/mod_$module/print_$module.php"; ?>"  onSubmit="popup<?=$module?>(this, 'join')"> 
74 74
   
75 75
                 <div class="col-md-12 col-sm-12 col-xs-12">
76 76
                     <div class="x_panel">
77 77
                         <div class="x_title">
78
-                               <h2><?=$nmmodule;?></h2>
78
+                               <h2><?=$nmmodule; ?></h2>
79 79
                                <div class='pull-right'>
80 80
                                 <Button type="submit" class="btn btn-primary">
81 81
                                  <span class="glyphicon glyphicon-print" style='color:#fff;'></span>
@@ -116,8 +116,8 @@  discard block
 block discarded – undo
116 116
              <?
117 117
 
118 118
              $module = '?module='.$_GET['module'];          
119
-             $tampil=mysql_query("SELECT id_modul as id FROM modul WHERE link='".$module."'");                       
120
-             $r=mysql_fetch_array($tampil);
119
+             $tampil = mysql_query("SELECT id_modul as id FROM modul WHERE link='".$module."'");                       
120
+             $r = mysql_fetch_array($tampil);
121 121
 
122 122
              echo"<input type='hidden' name='report_id' id='report_id' value=".$r[id].">"; 
123 123
              echo"<input type='hidden' name='module' value=".$_GET[module].">";
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
             </form>    
126 126
                    
127 127
                 </div>
128
-                <?for($i = 0; $i <= 20; $i++)  { 
128
+                <?for ($i = 0; $i<=20; $i++) { 
129 129
                     ?>
130 130
                     <br />
131 131
                     <?
Please login to merge, or discard this patch.
modul/mod_modul/aksi_modul.php 1 patch
Spacing   +18 added lines, -18 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
 
18 18
 
19 19
 // Hapus modul
20
-if ($module=='modul' AND $act=='hapus'){
20
+if ($module=='modul' AND $act=='hapus') {
21 21
   $id_module = $_GET['id_module'];
22 22
   $id = $_GET['id'];
23 23
   
@@ -29,10 +29,10 @@  discard block
 block discarded – undo
29 29
  }
30 30
 
31 31
 // Input modul
32
-elseif ($module=='modul' AND $act=='input'){
32
+elseif ($module=='modul' AND $act=='input') {
33 33
 
34
-  if ($_POST['is_form'] == 'Y') {
35
-    $link =  $_POST['link'];
34
+  if ($_POST['is_form']=='Y') {
35
+    $link = $_POST['link'];
36 36
   } else {
37 37
     if ($_POST['link']) {
38 38
       $link = '?module='.$_POST['link'];  
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
   $id_module = $_POST['id_module'];
48 48
   
49 49
 
50
-   if($_POST['ID']){
50
+   if ($_POST['ID']) {
51 51
    mysql_query("UPDATE modul SET nama_modul = '$_POST[nama_modul]',
52 52
                                  is_form    = '$_POST[is_form]',
53 53
                                 link        = '$_POST[link]',
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
   ?>
90 90
    
91 91
   <script language="javascript">
92
-     window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module";?>";  
92
+     window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>";  
93 93
      window.parent.tb_remove();
94 94
    </script>
95 95
   
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 }
99 99
 
100 100
 
101
-elseif ($module=='modul' AND $act=='hapusmod'){
101
+elseif ($module=='modul' AND $act=='hapusmod') {
102 102
   // membaca ID dari data yang akan dihapus
103 103
   $id = $_GET['id'];
104 104
   $id_module = $_GET['id_module'];
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
   ?>
120 120
    
121 121
   <script language="javascript">
122
-     window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module";?>";  
122
+     window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>";  
123 123
      window.parent.tb_remove();
124 124
    </script>
125 125
   
@@ -127,10 +127,10 @@  discard block
 block discarded – undo
127 127
    
128 128
 }
129 129
   
130
-elseif ($module=='modul' AND $act=='subinput'){
130
+elseif ($module=='modul' AND $act=='subinput') {
131 131
 
132
- if ($_POST['is_form'] == 'Y') {
133
-    $link =  $_POST['link'];
132
+ if ($_POST['is_form']=='Y') {
133
+    $link = $_POST['link'];
134 134
   } else {
135 135
     if ($_POST['link']) {
136 136
       $link = '?module='.$_POST['link'];  
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
   $id_module = $_POST['id_module'];
146 146
   
147 147
 
148
-   if($_POST['ID']){
148
+   if ($_POST['ID']) {
149 149
    mysql_query("UPDATE modul SET nama_modul = '$_POST[nama_modul]',
150 150
                                  link        = '$_POST[link]',
151 151
                                 is_form   = '$_POST[is_form]',
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
   ?>
190 190
    
191 191
   <script language="javascript">
192
-     window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module";?>";  
192
+     window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>";  
193 193
      window.parent.tb_remove();
194 194
    </script>
195 195
   
Please login to merge, or discard this patch.