Passed
Branch master (c66316)
by Saepul
06:04
created
js/datatables/unit_testing/templates/6776.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2
-	header( 'Expires: Sat, 26 Jul 1997 05:00:00 GMT' ); 
3
-	header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' ); 
4
-	header( 'Cache-Control: no-store, no-cache, must-revalidate' ); 
5
-	header( 'Cache-Control: post-check=0, pre-check=0', false ); 
6
-	header( 'Pragma: no-cache' ); 
2
+	header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); 
3
+	header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); 
4
+	header('Cache-Control: no-store, no-cache, must-revalidate'); 
5
+	header('Cache-Control: post-check=0, pre-check=0', false); 
6
+	header('Pragma: no-cache'); 
7 7
 ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
8 8
 <html>
9 9
 	<head>
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
 		<script type="text/javascript" src="../../js/jquery.dataTables.js"></script>
20 20
 		<script type="text/javascript" src="../unit_test.js"></script>
21 21
 		<?php
22
-			$aScripts = explode( ":", $_GET['scripts'] );
23
-			for ( $i=0 ; $i<count($aScripts) ; $i++ )
22
+			$aScripts = explode(":", $_GET['scripts']);
23
+			for ($i = 0; $i<count($aScripts); $i++)
24 24
 			{
25 25
 				echo '<script type="text/javascript" src="../'.$aScripts[$i].'?rand='.rand().'"></script>'."\n";
26 26
 			}
Please login to merge, or discard this patch.
js/datatables/unit_testing/templates/html_table.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2
-	header( 'Expires: Sat, 26 Jul 1997 05:00:00 GMT' ); 
3
-	header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' ); 
4
-	header( 'Cache-Control: no-store, no-cache, must-revalidate' ); 
5
-	header( 'Cache-Control: post-check=0, pre-check=0', false ); 
6
-	header( 'Pragma: no-cache' ); 
2
+	header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); 
3
+	header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); 
4
+	header('Cache-Control: no-store, no-cache, must-revalidate'); 
5
+	header('Cache-Control: post-check=0, pre-check=0', false); 
6
+	header('Pragma: no-cache'); 
7 7
 ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
8 8
 <html>
9 9
 	<head>
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
 		<script type="text/javascript" src="../../js/jquery.dataTables.js"></script>
20 20
 		<script type="text/javascript" src="../unit_test.js"></script>
21 21
 		<?php
22
-			$aScripts = explode( ":", $_GET['scripts'] );
23
-			for ( $i=0 ; $i<count($aScripts) ; $i++ )
22
+			$aScripts = explode(":", $_GET['scripts']);
23
+			for ($i = 0; $i<count($aScripts); $i++)
24 24
 			{
25 25
 				echo '<script type="text/javascript" src="../'.$aScripts[$i].'?rand='.rand().'"></script>'."\n";
26 26
 			}
Please login to merge, or discard this patch.
js/datatables/unit_testing/templates/complex_header_2.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2
-	header( 'Expires: Sat, 26 Jul 1997 05:00:00 GMT' ); 
3
-	header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' ); 
4
-	header( 'Cache-Control: no-store, no-cache, must-revalidate' ); 
5
-	header( 'Cache-Control: post-check=0, pre-check=0', false ); 
6
-	header( 'Pragma: no-cache' ); 
2
+	header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); 
3
+	header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); 
4
+	header('Cache-Control: no-store, no-cache, must-revalidate'); 
5
+	header('Cache-Control: post-check=0, pre-check=0', false); 
6
+	header('Pragma: no-cache'); 
7 7
 ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
8 8
 <html>
9 9
 	<head>
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
 		<script type="text/javascript" src="../../js/jquery.dataTables.js"></script>
20 20
 		<script type="text/javascript" src="../unit_test.js"></script>
21 21
 		<?php
22
-			$aScripts = explode( ":", $_GET['scripts'] );
23
-			for ( $i=0 ; $i<count($aScripts) ; $i++ )
22
+			$aScripts = explode(":", $_GET['scripts']);
23
+			for ($i = 0; $i<count($aScripts); $i++)
24 24
 			{
25 25
 				echo '<script type="text/javascript" src="../'.$aScripts[$i].'?rand='.rand().'"></script>'."\n";
26 26
 			}
Please login to merge, or discard this patch.
js/datatables/unit_testing/templates/deferred_table.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2
-	header( 'Expires: Sat, 26 Jul 1997 05:00:00 GMT' ); 
3
-	header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' ); 
4
-	header( 'Cache-Control: no-store, no-cache, must-revalidate' ); 
5
-	header( 'Cache-Control: post-check=0, pre-check=0', false ); 
6
-	header( 'Pragma: no-cache' ); 
2
+	header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); 
3
+	header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); 
4
+	header('Cache-Control: no-store, no-cache, must-revalidate'); 
5
+	header('Cache-Control: post-check=0, pre-check=0', false); 
6
+	header('Pragma: no-cache'); 
7 7
 ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
8 8
 <html>
9 9
 	<head>
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
 		<script type="text/javascript" src="../../js/jquery.dataTables.js"></script>
20 20
 		<script type="text/javascript" src="../unit_test.js"></script>
21 21
 		<?php
22
-			$aScripts = explode( ":", $_GET['scripts'] );
23
-			for ( $i=0 ; $i<count($aScripts) ; $i++ )
22
+			$aScripts = explode(":", $_GET['scripts']);
23
+			for ($i = 0; $i<count($aScripts); $i++)
24 24
 			{
25 25
 				echo '<script type="text/javascript" src="../'.$aScripts[$i].'?rand='.rand().'"></script>'."\n";
26 26
 			}
Please login to merge, or discard this patch.
js/datatables/unit_testing/templates/js_data_mixed_types.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2
-	header( 'Expires: Sat, 26 Jul 1997 05:00:00 GMT' ); 
3
-	header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' ); 
4
-	header( 'Cache-Control: no-store, no-cache, must-revalidate' ); 
5
-	header( 'Cache-Control: post-check=0, pre-check=0', false ); 
6
-	header( 'Pragma: no-cache' ); 
2
+	header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); 
3
+	header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); 
4
+	header('Cache-Control: no-store, no-cache, must-revalidate'); 
5
+	header('Cache-Control: post-check=0, pre-check=0', false); 
6
+	header('Pragma: no-cache'); 
7 7
 ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
8 8
 <html>
9 9
 	<head>
@@ -81,8 +81,8 @@  discard block
 block discarded – undo
81 81
 			];
82 82
 		</script>
83 83
 		<?php
84
-			$aScripts = explode( ":", $_GET['scripts'] );
85
-			for ( $i=0 ; $i<count($aScripts) ; $i++ )
84
+			$aScripts = explode(":", $_GET['scripts']);
85
+			for ($i = 0; $i<count($aScripts); $i++)
86 86
 			{
87 87
 				echo '<script type="text/javascript" src="../'.$aScripts[$i].'?rand='.rand().'"></script>'."\n";
88 88
 			}
Please login to merge, or discard this patch.
js/datatables/unit_testing/performance/large.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
   /* MySQL connection */
3
-	include( $_SERVER['DOCUMENT_ROOT']."/datatables/mysql.php" ); /* ;-) */
3
+	include($_SERVER['DOCUMENT_ROOT']."/datatables/mysql.php"); /* ;-) */
4 4
 	
5
-	$gaSql['link'] =  mysql_pconnect( $gaSql['server'], $gaSql['user'], $gaSql['password']  ) or
6
-		die( 'Could not open connection to server' );
5
+	$gaSql['link'] = mysql_pconnect($gaSql['server'], $gaSql['user'], $gaSql['password']) or
6
+		die('Could not open connection to server');
7 7
 	
8
-	mysql_select_db( $gaSql['db'], $gaSql['link'] ) or 
9
-		die( 'Could not select database '. $gaSql['db'] );
8
+	mysql_select_db($gaSql['db'], $gaSql['link']) or 
9
+		die('Could not select database '.$gaSql['db']);
10 10
 
11 11
 ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
12 12
 <html>
@@ -82,8 +82,8 @@  discard block
 block discarded – undo
82 82
 		FROM   testData
83 83
 		LIMIT  2000
84 84
 	";
85
-	$rResult = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
86
-	while ( $aRow = mysql_fetch_array( $rResult ) )
85
+	$rResult = mysql_query($sQuery, $gaSql['link']) or die(mysql_error());
86
+	while ($aRow = mysql_fetch_array($rResult))
87 87
 	{
88 88
 		echo '<tr>';
89 89
 		echo '<td><a href="1">'.$aRow['id'].'</a></td>';
Please login to merge, or discard this patch.
content.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -3,19 +3,19 @@
 block discarded – undo
3 3
 
4 4
 
5 5
 
6
-  $tampil=mysql_query("SELECT * FROM modul where link !='' ORDER BY urutan");
6
+  $tampil = mysql_query("SELECT * FROM modul where link !='' ORDER BY urutan");
7 7
   
8 8
   	
9
-  while ($r=mysql_fetch_array($tampil)){
9
+  while ($r = mysql_fetch_array($tampil)) {
10 10
   $p = strlen($r['link']);
11
-  $mod = substr($r['link'],8,$p);
11
+  $mod = substr($r['link'], 8, $p);
12 12
   
13 13
 //  echo"$mod<br>";
14 14
 //  echo"$_GET[module]<br>";
15 15
 //  echo"modul/mod_$mod.php<br>";
16 16
 //
17 17
 
18
-	if ($_GET['module']==$mod){
18
+	if ($_GET['module']==$mod) {
19 19
 	 //include "modul/mod_$mod.php";
20 20
 	 include "modul/mod_$mod/$mod.php";
21 21
 	}
Please login to merge, or discard this patch.
cek_login.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 include "config/koneksi.php";
3
-function anti_injection($data){
4
-  $filter = mysql_real_escape_string(stripslashes(strip_tags(htmlspecialchars($data,ENT_QUOTES))));
3
+function anti_injection($data) {
4
+  $filter = mysql_real_escape_string(stripslashes(strip_tags(htmlspecialchars($data, ENT_QUOTES))));
5 5
   return $filter;
6 6
 }
7 7
 
@@ -11,16 +11,16 @@  discard block
 block discarded – undo
11 11
 $pass       = anti_injection($_POST[password]);
12 12
 $module     = anti_injection($_POST[module]);
13 13
 
14
-$login=mysql_query("SELECT a.*,b.id_tipe_sales 
14
+$login = mysql_query("SELECT a.*,b.id_tipe_sales 
15 15
                     FROM user a LEFT JOIN groups b
16 16
                     on a.id_groups = b.id_groups
17 17
                     WHERE a.id_user='$userid' AND a.password='$pass' and a.aktif='Y'");
18 18
 
19
-$find=mysql_num_rows($login);
20
-$r=mysql_fetch_array($login);
19
+$find = mysql_num_rows($login);
20
+$r = mysql_fetch_array($login);
21 21
 
22 22
 // Apabila userid dan password ditemukan
23
-if ($find > 0){
23
+if ($find>0) {
24 24
   session_start();
25 25
   //session_register("userid");
26 26
 //  session_register("username");
@@ -33,12 +33,12 @@  discard block
 block discarded – undo
33 33
 
34 34
   $_SESSION['userid']     = $r['id_user'];
35 35
   $_SESSION['username']   = $r['username'];
36
-  $_SESSION['iusername']   = $r['username'];
36
+  $_SESSION['iusername'] = $r['username'];
37 37
   $_SESSION['password']	  = $r['password'];
38 38
   $_SESSION['groups']     = $r['id_groups'];
39 39
   $_SESSION['tipe_sales'] = $r['id_tipe_sales'];
40
-  $_SESSION['outlet']  = $r['id_outlet'];
41
-  $_SESSION['role']     = $r['role'];
40
+  $_SESSION['outlet'] = $r['id_outlet'];
41
+  $_SESSION['role'] = $r['role'];
42 42
   $_SESSION['pict']       = $r['pict'];
43 43
   $_SESSION['r_input']	  = $r['r_input'];
44 44
   $_SESSION['r_edit']	    = $r['r_edit'];
@@ -46,8 +46,8 @@  discard block
 block discarded – undo
46 46
   $_SESSION['r_admin']   = $r['r_admin'];
47 47
 
48 48
 
49
-  $gsql=mysql_query("SELECT main_page FROM groups WHERE id_groups ='$r[id_groups]'");
50
-  $g=mysql_fetch_array($gsql);
49
+  $gsql = mysql_query("SELECT main_page FROM groups WHERE id_groups ='$r[id_groups]'");
50
+  $g = mysql_fetch_array($gsql);
51 51
 
52 52
   if ($g['main_page']) {
53 53
     $lmodule = $g['main_page'];
@@ -56,9 +56,9 @@  discard block
 block discarded – undo
56 56
   }
57 57
 
58 58
 
59
-  $sql=mysql_query("SELECT * FROM modul WHERE link ='$lmodule'");
59
+  $sql = mysql_query("SELECT * FROM modul WHERE link ='$lmodule'");
60 60
 
61
-  $r=mysql_fetch_array($sql);
61
+  $r = mysql_fetch_array($sql);
62 62
 
63 63
   if ($r['id_modul']) {
64 64
     $imodule = $r['link'];  
Please login to merge, or discard this patch.
modal.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -61,14 +61,14 @@  discard block
 block discarded – undo
61 61
         // $id_module = $_GET['id_module'];
62 62
         // $title = $_GET['title'];
63 63
 
64
-        $prd    = '2016-01';//$_GET['prd']; 
65
-        $kode    = 'PJ';//$_GET['kode']; 
64
+        $prd = '2016-01'; //$_GET['prd']; 
65
+        $kode    = 'PJ'; //$_GET['kode']; 
66 66
 
67
-        $id_outlet  = '1';//$_GET['id_outlet'];
68
-        $outlet  = '';//$_GET['outlet'];
69
-        $tanggal = 'A44-1601-0002';//$_GET['tanggal'];
70
-        $notrans = '2016-09-04';//$_GET['notrans'];
71
-        $customer = '3';//$_GET['customer'];
67
+        $id_outlet = '1'; //$_GET['id_outlet'];
68
+        $outlet  = ''; //$_GET['outlet'];
69
+        $tanggal = 'A44-1601-0002'; //$_GET['tanggal'];
70
+        $notrans = '2016-09-04'; //$_GET['notrans'];
71
+        $customer = '3'; //$_GET['customer'];
72 72
 
73 73
         if ($_GET['ioutlet']) {
74 74
           $outlet = $_GET['ioutlet'];   
@@ -100,20 +100,20 @@  discard block
 block discarded – undo
100 100
                                          <input type="hidden" name="module" value="<?php echo $module?>" /> 
101 101
                                          <input type="hidden" name="prd" value="<?php echo $prd?>" /> 
102 102
 
103
-                                          <input type="hidden" name="kode" id="kode" value="<?php echo $kode;?>">
104
-                                          <input type="hidden" name="id_outlet" id="id_outlet" value="<?php echo $id_outlet;?>">
105
-                                          <input type="hidden" name="tanggal" id="tanggal" value="<?php echo $tanggal;?>">
106
-                                          <input type="hidden" name="customer" id="customer" value="<?php echo $customer;?>">
107
-                                          <input type="hidden" name="notrans" id="notrans" value="<?php echo $notrans;?>">
103
+                                          <input type="hidden" name="kode" id="kode" value="<?php echo $kode; ?>">
104
+                                          <input type="hidden" name="id_outlet" id="id_outlet" value="<?php echo $id_outlet; ?>">
105
+                                          <input type="hidden" name="tanggal" id="tanggal" value="<?php echo $tanggal; ?>">
106
+                                          <input type="hidden" name="customer" id="customer" value="<?php echo $customer; ?>">
107
+                                          <input type="hidden" name="notrans" id="notrans" value="<?php echo $notrans; ?>">
108 108
                                                                   
109 109
                                          <p class="pull-right">
110 110
                                          <select name="itipe_barang" class="form-control" onChange="document.myform.submit();">
111 111
                                             <?
112 112
                                               $query = mysql_query('SELECT * FROM tipe_barang ORDER BY id_tipe_barang');
113
-                                               if($query && mysql_num_rows($query) > 0){
114
-                                                  while($row = mysql_fetch_object($query)){
113
+                                               if ($query && mysql_num_rows($query)>0) {
114
+                                                  while ($row = mysql_fetch_object($query)) {
115 115
                                                   echo '<option value="'.$row->id_tipe_barang.'"';
116
-                                                  if($row->id_tipe_barang == $tipe_barang) echo ' selected';
116
+                                                  if ($row->id_tipe_barang==$tipe_barang) echo ' selected';
117 117
                                                   echo '>'.$row->tipe_barang.'</option>';
118 118
                                                   }
119 119
                                                }        
@@ -125,10 +125,10 @@  discard block
 block discarded – undo
125 125
                                          <select name="ioutlet" class="form-control" onChange="document.myform.submit();">
126 126
                                             <?
127 127
                                               $query = mysql_query('SELECT * FROM outlet ORDER BY id_outlet');
128
-                                               if($query && mysql_num_rows($query) > 0){
129
-                                                  while($row = mysql_fetch_object($query)){
128
+                                               if ($query && mysql_num_rows($query)>0) {
129
+                                                  while ($row = mysql_fetch_object($query)) {
130 130
                                                   echo '<option value="'.$row->id_outlet.'"';
131
-                                                  if($row->id_outlet == $outlet) echo ' selected';
131
+                                                  if ($row->id_outlet==$outlet) echo ' selected';
132 132
                                                   echo '>'.$row->outlet.'</option>';
133 133
                                                   }
134 134
                                                }        
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
                             
172 172
                          <?
173 173
                       
174
-                          $SQL= "SELECT b.jenis_barang
174
+                          $SQL = "SELECT b.jenis_barang
175 175
                                     ,c.unit_barang
176 176
                                     ,a.kode as kode_barang
177 177
                                      ,a.id_barang
@@ -205,17 +205,17 @@  discard block
 block discarded – undo
205 205
                                       ORDER BY a.id_jenis_barang,a.kode";   
206 206
 
207 207
 
208
-                             $tampil=mysql_query($SQL);
208
+                             $tampil = mysql_query($SQL);
209 209
 
210 210
                                                           
211 211
                              $no = 1;
212 212
                              
213
-                             while($r=mysql_fetch_array($tampil)){
213
+                             while ($r = mysql_fetch_array($tampil)) {
214 214
 
215 215
                                 $id_barang = $r['id_barang'];
216 216
                                 $kode_barang = $r['kode_barang'];
217 217
 
218
-                                $dsql   = mysql_query("SELECT sum(qty) as reserve
218
+                                $dsql = mysql_query("SELECT sum(qty) as reserve
219 219
                                                       FROM stok_reserved
220 220
                                                       WHERE id_barang_promosi = '$id_barang'
221 221
                                                       AND id_outlet = '$outlet'
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
                                                        and prd = '$prd'
224 224
                                                       "); 
225 225
 
226
-                                 $d     = mysql_fetch_array($dsql); 
226
+                                 $d = mysql_fetch_array($dsql); 
227 227
 
228 228
                                 if ($d['reserve']) {
229 229
                                   $reserve = $d['reserve'];
@@ -231,9 +231,9 @@  discard block
 block discarded – undo
231 231
                                   $reserve = 0;
232 232
                                  }
233 233
 
234
-                                  $sisa_stok   = $r['stok']-$reserve;
234
+                                  $sisa_stok = $r['stok'] - $reserve;
235 235
 
236
-                                  if ($sisa_stok == '0') {
236
+                                  if ($sisa_stok=='0') {
237 237
 
238 238
                                     echo "";
239 239
                                   } else {
Please login to merge, or discard this patch.