Passed
Pull Request — master (#7)
by Saepul
06:57 queued 02:15
created
js/datatables/unit_testing/performance/large.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-  /* MySQL connection */
2
+    /* MySQL connection */
3 3
     include $_SERVER['DOCUMENT_ROOT'].'/datatables/mysql.php'; /* ;-) */
4 4
 
5 5
     $gaSql['link'] = mysql_pconnect($gaSql['server'], $gaSql['user'], $gaSql['password']) or
Please login to merge, or discard this patch.
js/datatables/unit_testing/templates/empty_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 		<script type="text/javascript" src="../unit_test.js"></script>
21 21
 		<?php
22 22
             $aScripts = explode(':', $_GET['scripts']);
23
-            for ($i = 0; $i < count($aScripts); $i++) {
23
+            for ($i = 0; $i<count($aScripts); $i++) {
24 24
                 echo '<script type="text/javascript" src="../'.$aScripts[$i].'?rand='.rand().'"></script>'."\n";
25 25
             }
26 26
         ?>
Please login to merge, or discard this patch.
js/datatables/unit_testing/templates/js_data_mixed_types.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
 		</script>
83 83
 		<?php
84 84
             $aScripts = explode(':', $_GET['scripts']);
85
-            for ($i = 0; $i < count($aScripts); $i++) {
85
+            for ($i = 0; $i<count($aScripts); $i++) {
86 86
                 echo '<script type="text/javascript" src="../'.$aScripts[$i].'?rand='.rand().'"></script>'."\n";
87 87
             }
88 88
         ?>
Please login to merge, or discard this patch.
content.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -2,22 +2,22 @@
 block discarded – undo
2 2
 
3 3
 include 'config/koneksi.php';
4 4
 
5
-  $tampil = mysql_query("SELECT * FROM modul where link !='' ORDER BY urutan");
5
+    $tampil = mysql_query("SELECT * FROM modul where link !='' ORDER BY urutan");
6 6
 
7
-  while ($r = mysql_fetch_array($tampil)) {
8
-      $p = strlen($r['link']);
9
-      $mod = substr($r['link'], 8, $p);
7
+    while ($r = mysql_fetch_array($tampil)) {
8
+        $p = strlen($r['link']);
9
+        $mod = substr($r['link'], 8, $p);
10 10
 
11
-      //  echo"$mod<br>";
12
-      //  echo"$_GET[module]<br>";
13
-      //  echo"modul/mod_$mod.php<br>";
11
+        //  echo"$mod<br>";
12
+        //  echo"$_GET[module]<br>";
13
+        //  echo"modul/mod_$mod.php<br>";
14 14
 //
15 15
 
16
-      if ($_GET['module'] == $mod) {
17
-          //include "modul/mod_$mod.php";
18
-          include "modul/mod_$mod/$mod.php";
19
-      }
20
-  }
16
+        if ($_GET['module'] == $mod) {
17
+            //include "modul/mod_$mod.php";
18
+            include "modul/mod_$mod/$mod.php";
19
+        }
20
+    }
21 21
 
22 22
 // Apabila modul tidak ditemukan
23 23
 //else{
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
       //  echo"modul/mod_$mod.php<br>";
14 14
 //
15 15
 
16
-      if ($_GET['module'] == $mod) {
16
+      if ($_GET['module']==$mod) {
17 17
           //include "modul/mod_$mod.php";
18 18
           include "modul/mod_$mod/$mod.php";
19 19
       }
Please login to merge, or discard this patch.
modul.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -2,11 +2,11 @@  discard block
 block discarded – undo
2 2
 session_start();
3 3
 include 'config/koneksi.php';
4 4
 
5
-if ($_SESSION[role] == 'dev') {
5
+if ($_SESSION[role]=='dev') {
6 6
     $sql = mysql_query("select * from modul where aktif='Y' order by urutan");
7
-} elseif ($_SESSION[role] == 'admin') {
7
+} elseif ($_SESSION[role]=='admin') {
8 8
     $sql = mysql_query("select * from modul where status !='dev' and aktif='Y' order by urutan");
9
-} elseif ($_SESSION[role] == 'user') {
9
+} elseif ($_SESSION[role]=='user') {
10 10
     $sql = mysql_query("select * from modul where status='user' and aktif='Y' order by urutan");
11 11
 } else {
12 12
     $sql = mysql_query("SELECT * FROM modul a inner join usermenu b on a.id_modul = b.id_modul where a.status='user' and a.aktif='Y'  and b.m_aktif='Y' and b.username='$_SESSION[id_user]' ORDER BY a.urutan");
@@ -23,16 +23,16 @@  discard block
 block discarded – undo
23 23
     //$njml = '('.$cjml.')';
24 24
     //}
25 25
 
26
-    if ($r[status_menu] == 'M' and !empty($r[link])) {
27
-        if ($r[nama_modul] == 'Notice') {
26
+    if ($r[status_menu]=='M' and !empty($r[link])) {
27
+        if ($r[nama_modul]=='Notice') {
28 28
             echo "<a class='menuitem' href='$r[link]'>$r[nama_modul] $njml</a>";
29 29
         } else {
30 30
             echo "<a class='menuitem' href='$r[link]'>$r[nama_modul]</a>";
31 31
         }
32
-    } elseif ($r[status_menu] == 'M' and empty($r[link])) {
32
+    } elseif ($r[status_menu]=='M' and empty($r[link])) {
33 33
         echo "<a class='menuitem submenuheader' href='$r[link]'>$r[nama_modul]</a>  ";
34 34
 
35
-        if ($_SESSION[role] == 'dev' or $_SESSION[role] == 'admin') {
35
+        if ($_SESSION[role]=='dev' or $_SESSION[role]=='admin') {
36 36
             $detil = mysql_query("select * from modul where id_submenu='$r[id_modul]' and status_menu='C' and aktif='Y' order by urutan");
37 37
         } else {
38 38
             $detil = mysql_query("select * from modul where id_submenu='$r[id_modul]' and status_menu='C' and aktif='Y' and (id_role = '5' or id_role	 = '$_SESSION[role]') and (id_group = '1' or id_group = '$_SESSION[group]')order by urutan");
Please login to merge, or discard this patch.
topmenu.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
     $user = $_SESSION['userid'];
34 34
 
35
-          $sql = mysql_query("select * from modul where aktif='Y' order by urutan");
35
+            $sql = mysql_query("select * from modul where aktif='Y' order by urutan");
36 36
 
37 37
     while ($r = mysql_fetch_array($sql)) {
38 38
         if ($r[status_menu] == 'M' and !empty($r[link])) {
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         echo'</ul>';
57 57
     }
58 58
 
59
-  ?>
59
+    ?>
60 60
   
61 61
   
62 62
   
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
           $sql = mysql_query("select * from modul where aktif='Y' order by urutan");
36 36
 
37 37
     while ($r = mysql_fetch_array($sql)) {
38
-        if ($r[status_menu] == 'M' and !empty($r[link])) {
38
+        if ($r[status_menu]=='M' and !empty($r[link])) {
39 39
             echo "<li class='Aktif'><a href='$r[link]&menu=$r[nama_modul]'>$r[nama_modul]</a>";
40
-        } elseif ($r[status_menu] == 'M' and empty($r[link])) {
40
+        } elseif ($r[status_menu]=='M' and empty($r[link])) {
41 41
             echo "<li class='Aktif'><a href='#'>$r[nama_modul]</a>";
42 42
         }
43 43
 
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         $detil = mysql_query("select * from modul where parentid='$r[id_modul]' and status_menu='C' and aktif='Y' order by urutan");
47 47
 
48 48
         while ($d = mysql_fetch_array($detil)) {
49
-            if ($d[is_form] == 'Y') {
49
+            if ($d[is_form]=='Y') {
50 50
                 echo"<li><a href='form/form_$d[link].php?width=850&height=600&module=$d[link]&imodule=$imodule&imenu=$imenu&isub=$isub&TB_iframe=true' title='$d[nama_modul]' class='thickbox' >$d[nama_modul]</a></li>";
51 51
             } else {
52 52
                 echo"<li><a href='$d[link]&menu=$r[nama_modul]&sub=$d[nama_modul]'>$d[nama_modul]</a></li>";
Please login to merge, or discard this patch.
config/barcode.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 $size = (isset($_GET['size']) ? $_GET['size'] : '20');
15 15
 $orientation = (isset($_GET['orientation']) ? $_GET['orientation'] : 'horizontal');
16 16
 $code_type = (isset($_GET['codetype']) ? $_GET['codetype'] : 'code128');
17
-$print = (isset($_GET['print']) && $_GET['print'] == 'true' ? true : false);
17
+$print = (isset($_GET['print']) && $_GET['print']=='true' ? true : false);
18 18
 $sizefactor = (isset($_GET['sizefactor']) ? $_GET['sizefactor'] : '1');
19 19
 
20 20
 // This function call can be copied into your project and can be made from anywhere in your code
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         $code_array = [' '=>'212222', '!'=>'222122', '"'=>'222221', '#'=>'121223', '$'=>'121322', '%'=>'131222', '&'=>'122213', "'"=>'122312', '('=>'132212', ')'=>'221213', '*'=>'221312', '+'=>'231212', ','=>'112232', '-'=>'122132', '.'=>'122231', '/'=>'113222', '0'=>'123122', '1'=>'123221', '2'=>'223211', '3'=>'221132', '4'=>'221231', '5'=>'213212', '6'=>'223112', '7'=>'312131', '8'=>'311222', '9'=>'321122', ':'=>'321221', ';'=>'312212', '<'=>'322112', '='=>'322211', '>'=>'212123', '?'=>'212321', '@'=>'232121', 'A'=>'111323', 'B'=>'131123', 'C'=>'131321', 'D'=>'112313', 'E'=>'132113', 'F'=>'132311', 'G'=>'211313', 'H'=>'231113', 'I'=>'231311', 'J'=>'112133', 'K'=>'112331', 'L'=>'132131', 'M'=>'113123', 'N'=>'113321', 'O'=>'133121', 'P'=>'313121', 'Q'=>'211331', 'R'=>'231131', 'S'=>'213113', 'T'=>'213311', 'U'=>'213131', 'V'=>'311123', 'W'=>'311321', 'X'=>'331121', 'Y'=>'312113', 'Z'=>'312311', '['=>'332111', '\\'=>'314111', ']'=>'221411', '^'=>'431111', '_'=>'111224', "\`"=>'111422', 'a'=>'121124', 'b'=>'121421', 'c'=>'141122', 'd'=>'141221', 'e'=>'112214', 'f'=>'112412', 'g'=>'122114', 'h'=>'122411', 'i'=>'142112', 'j'=>'142211', 'k'=>'241211', 'l'=>'221114', 'm'=>'413111', 'n'=>'241112', 'o'=>'134111', 'p'=>'111242', 'q'=>'121142', 'r'=>'121241', 's'=>'114212', 't'=>'124112', 'u'=>'124211', 'v'=>'411212', 'w'=>'421112', 'x'=>'421211', 'y'=>'212141', 'z'=>'214121', '{'=>'412121', '|'=>'111143', '}'=>'111341', '~'=>'131141', 'DEL'=>'114113', 'FNC 3'=>'114311', 'FNC 2'=>'411113', 'SHIFT'=>'411311', 'CODE C'=>'113141', 'FNC 4'=>'114131', 'CODE A'=>'311141', 'FNC 1'=>'411131', 'Start A'=>'211412', 'Start B'=>'211214', 'Start C'=>'211232', 'Stop'=>'2331112'];
31 31
         $code_keys = array_keys($code_array);
32 32
         $code_values = array_flip($code_keys);
33
-        for ($X = 1; $X <= strlen($text); $X++) {
33
+        for ($X = 1; $X<=strlen($text); $X++) {
34 34
             $activeKey = substr($text, ($X - 1), 1);
35 35
             $code_string .= $code_array[$activeKey];
36 36
             $chksum = ($chksum + ($code_values[$activeKey] * $X));
@@ -38,14 +38,14 @@  discard block
 block discarded – undo
38 38
         $code_string .= $code_array[$code_keys[($chksum - (intval($chksum / 103) * 103))]];
39 39
 
40 40
         $code_string = '211214'.$code_string.'2331112';
41
-    } elseif (strtolower($code_type) == 'code128a') {
41
+    } elseif (strtolower($code_type)=='code128a') {
42 42
         $chksum = 103;
43 43
         $text = strtoupper($text); // Code 128A doesn't support lower case
44 44
         // Must not change order of array elements as the checksum depends on the array's key to validate final code
45 45
         $code_array = [' '=>'212222', '!'=>'222122', '"'=>'222221', '#'=>'121223', '$'=>'121322', '%'=>'131222', '&'=>'122213', "'"=>'122312', '('=>'132212', ')'=>'221213', '*'=>'221312', '+'=>'231212', ','=>'112232', '-'=>'122132', '.'=>'122231', '/'=>'113222', '0'=>'123122', '1'=>'123221', '2'=>'223211', '3'=>'221132', '4'=>'221231', '5'=>'213212', '6'=>'223112', '7'=>'312131', '8'=>'311222', '9'=>'321122', ':'=>'321221', ';'=>'312212', '<'=>'322112', '='=>'322211', '>'=>'212123', '?'=>'212321', '@'=>'232121', 'A'=>'111323', 'B'=>'131123', 'C'=>'131321', 'D'=>'112313', 'E'=>'132113', 'F'=>'132311', 'G'=>'211313', 'H'=>'231113', 'I'=>'231311', 'J'=>'112133', 'K'=>'112331', 'L'=>'132131', 'M'=>'113123', 'N'=>'113321', 'O'=>'133121', 'P'=>'313121', 'Q'=>'211331', 'R'=>'231131', 'S'=>'213113', 'T'=>'213311', 'U'=>'213131', 'V'=>'311123', 'W'=>'311321', 'X'=>'331121', 'Y'=>'312113', 'Z'=>'312311', '['=>'332111', '\\'=>'314111', ']'=>'221411', '^'=>'431111', '_'=>'111224', 'NUL'=>'111422', 'SOH'=>'121124', 'STX'=>'121421', 'ETX'=>'141122', 'EOT'=>'141221', 'ENQ'=>'112214', 'ACK'=>'112412', 'BEL'=>'122114', 'BS'=>'122411', 'HT'=>'142112', 'LF'=>'142211', 'VT'=>'241211', 'FF'=>'221114', 'CR'=>'413111', 'SO'=>'241112', 'SI'=>'134111', 'DLE'=>'111242', 'DC1'=>'121142', 'DC2'=>'121241', 'DC3'=>'114212', 'DC4'=>'124112', 'NAK'=>'124211', 'SYN'=>'411212', 'ETB'=>'421112', 'CAN'=>'421211', 'EM'=>'212141', 'SUB'=>'214121', 'ESC'=>'412121', 'FS'=>'111143', 'GS'=>'111341', 'RS'=>'131141', 'US'=>'114113', 'FNC 3'=>'114311', 'FNC 2'=>'411113', 'SHIFT'=>'411311', 'CODE C'=>'113141', 'CODE B'=>'114131', 'FNC 4'=>'311141', 'FNC 1'=>'411131', 'Start A'=>'211412', 'Start B'=>'211214', 'Start C'=>'211232', 'Stop'=>'2331112'];
46 46
         $code_keys = array_keys($code_array);
47 47
         $code_values = array_flip($code_keys);
48
-        for ($X = 1; $X <= strlen($text); $X++) {
48
+        for ($X = 1; $X<=strlen($text); $X++) {
49 49
             $activeKey = substr($text, ($X - 1), 1);
50 50
             $code_string .= $code_array[$activeKey];
51 51
             $chksum = ($chksum + ($code_values[$activeKey] * $X));
@@ -53,50 +53,50 @@  discard block
 block discarded – undo
53 53
         $code_string .= $code_array[$code_keys[($chksum - (intval($chksum / 103) * 103))]];
54 54
 
55 55
         $code_string = '211412'.$code_string.'2331112';
56
-    } elseif (strtolower($code_type) == 'code39') {
56
+    } elseif (strtolower($code_type)=='code39') {
57 57
         $code_array = ['0'=>'111221211', '1'=>'211211112', '2'=>'112211112', '3'=>'212211111', '4'=>'111221112', '5'=>'211221111', '6'=>'112221111', '7'=>'111211212', '8'=>'211211211', '9'=>'112211211', 'A'=>'211112112', 'B'=>'112112112', 'C'=>'212112111', 'D'=>'111122112', 'E'=>'211122111', 'F'=>'112122111', 'G'=>'111112212', 'H'=>'211112211', 'I'=>'112112211', 'J'=>'111122211', 'K'=>'211111122', 'L'=>'112111122', 'M'=>'212111121', 'N'=>'111121122', 'O'=>'211121121', 'P'=>'112121121', 'Q'=>'111111222', 'R'=>'211111221', 'S'=>'112111221', 'T'=>'111121221', 'U'=>'221111112', 'V'=>'122111112', 'W'=>'222111111', 'X'=>'121121112', 'Y'=>'221121111', 'Z'=>'122121111', '-'=>'121111212', '.'=>'221111211', ' '=>'122111211', '$'=>'121212111', '/'=>'121211121', '+'=>'121112121', '%'=>'111212121', '*'=>'121121211'];
58 58
 
59 59
         // Convert to uppercase
60 60
         $upper_text = strtoupper($text);
61 61
 
62
-        for ($X = 1; $X <= strlen($upper_text); $X++) {
62
+        for ($X = 1; $X<=strlen($upper_text); $X++) {
63 63
             $code_string .= $code_array[substr($upper_text, ($X - 1), 1)].'1';
64 64
         }
65 65
 
66 66
         $code_string = '1211212111'.$code_string.'121121211';
67
-    } elseif (strtolower($code_type) == 'code25') {
67
+    } elseif (strtolower($code_type)=='code25') {
68 68
         $code_array1 = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0'];
69 69
         $code_array2 = ['3-1-1-1-3', '1-3-1-1-3', '3-3-1-1-1', '1-1-3-1-3', '3-1-3-1-1', '1-3-3-1-1', '1-1-1-3-3', '3-1-1-3-1', '1-3-1-3-1', '1-1-3-3-1'];
70 70
 
71
-        for ($X = 1; $X <= strlen($text); $X++) {
72
-            for ($Y = 0; $Y < count($code_array1); $Y++) {
73
-                if (substr($text, ($X - 1), 1) == $code_array1[$Y]) {
71
+        for ($X = 1; $X<=strlen($text); $X++) {
72
+            for ($Y = 0; $Y<count($code_array1); $Y++) {
73
+                if (substr($text, ($X - 1), 1)==$code_array1[$Y]) {
74 74
                     $temp[$X] = $code_array2[$Y];
75 75
                 }
76 76
             }
77 77
         }
78 78
 
79
-        for ($X = 1; $X <= strlen($text); $X += 2) {
79
+        for ($X = 1; $X<=strlen($text); $X += 2) {
80 80
             if (isset($temp[$X]) && isset($temp[($X + 1)])) {
81 81
                 $temp1 = explode('-', $temp[$X]);
82 82
                 $temp2 = explode('-', $temp[($X + 1)]);
83
-                for ($Y = 0; $Y < count($temp1); $Y++) {
83
+                for ($Y = 0; $Y<count($temp1); $Y++) {
84 84
                     $code_string .= $temp1[$Y].$temp2[$Y];
85 85
                 }
86 86
             }
87 87
         }
88 88
 
89 89
         $code_string = '1111'.$code_string.'311';
90
-    } elseif (strtolower($code_type) == 'codabar') {
90
+    } elseif (strtolower($code_type)=='codabar') {
91 91
         $code_array1 = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '$', ':', '/', '.', '+', 'A', 'B', 'C', 'D'];
92 92
         $code_array2 = ['1111221', '1112112', '2211111', '1121121', '2111121', '1211112', '1211211', '1221111', '2112111', '1111122', '1112211', '1122111', '2111212', '2121112', '2121211', '1121212', '1122121', '1212112', '1112122', '1112221'];
93 93
 
94 94
         // Convert to uppercase
95 95
         $upper_text = strtoupper($text);
96 96
 
97
-        for ($X = 1; $X <= strlen($upper_text); $X++) {
98
-            for ($Y = 0; $Y < count($code_array1); $Y++) {
99
-                if (substr($upper_text, ($X - 1), 1) == $code_array1[$Y]) {
97
+        for ($X = 1; $X<=strlen($upper_text); $X++) {
98
+            for ($Y = 0; $Y<count($code_array1); $Y++) {
99
+                if (substr($upper_text, ($X - 1), 1)==$code_array1[$Y]) {
100 100
                     $code_string .= $code_array2[$Y].'1';
101 101
                 }
102 102
             }
@@ -112,11 +112,11 @@  discard block
 block discarded – undo
112 112
         $text_height = 0;
113 113
     }
114 114
 
115
-    for ($i = 1; $i <= strlen($code_string); $i++) {
116
-        $code_length = $code_length + (int) (substr($code_string, ($i - 1), 1));
115
+    for ($i = 1; $i<=strlen($code_string); $i++) {
116
+        $code_length = $code_length + (int)(substr($code_string, ($i - 1), 1));
117 117
     }
118 118
 
119
-    if (strtolower($orientation) == 'horizontal') {
119
+    if (strtolower($orientation)=='horizontal') {
120 120
         $img_width = $code_length * $SizeFactor;
121 121
         $img_height = $size;
122 122
     } else {
@@ -134,18 +134,18 @@  discard block
 block discarded – undo
134 134
     }
135 135
 
136 136
     $location = 10;
137
-    for ($position = 1; $position <= strlen($code_string); $position++) {
137
+    for ($position = 1; $position<=strlen($code_string); $position++) {
138 138
         $cur_size = $location + (substr($code_string, ($position - 1), 1));
139
-        if (strtolower($orientation) == 'horizontal') {
140
-            imagefilledrectangle($image, $location * $SizeFactor, 0, $cur_size * $SizeFactor, $img_height, ($position % 2 == 0 ? $white : $black));
139
+        if (strtolower($orientation)=='horizontal') {
140
+            imagefilledrectangle($image, $location * $SizeFactor, 0, $cur_size * $SizeFactor, $img_height, ($position % 2==0 ? $white : $black));
141 141
         } else {
142
-            imagefilledrectangle($image, 0, $location * $SizeFactor, $img_width, $cur_size * $SizeFactor, ($position % 2 == 0 ? $white : $black));
142
+            imagefilledrectangle($image, 0, $location * $SizeFactor, $img_width, $cur_size * $SizeFactor, ($position % 2==0 ? $white : $black));
143 143
         }
144 144
         $location = $cur_size;
145 145
     }
146 146
 
147 147
     // Draw barcode to the screen or save in a file
148
-    if ($filepath == '') {
148
+    if ($filepath=='') {
149 149
         header('Content-type: image/png');
150 150
         imagepng($image);
151 151
         imagedestroy($image);
Please login to merge, or discard this patch.
config/class_paging.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     {
33 33
         $link_halaman = '';
34 34
 
35
-        if (($halaman_aktif - 1) > 0) {
35
+        if (($halaman_aktif - 1)>0) {
36 36
             $previous = $halaman_aktif - 1;
37 37
 
38 38
             $link_halaman .= "<a href=$_SERVER[PHP_SELF]?module=$_GET[module]&halaman=$previous title=Previous><<</a>&nbsp;";
@@ -66,30 +66,30 @@  discard block
 block discarded – undo
66 66
 
67 67
         ///
68 68
 
69
-        $angka = ($halaman > 3 ? ' ... ' : ' ');
70
-        for ($i = $halaman - 2; $i < $halaman; $i++) {
71
-            if ($i < 1) {
69
+        $angka = ($halaman>3 ? ' ... ' : ' ');
70
+        for ($i = $halaman - 2; $i<$halaman; $i++) {
71
+            if ($i<1) {
72 72
                 continue;
73 73
             }
74 74
             $angka .= "<a href=$_SERVER[PHP_SELF]?halaman=$i>$i</A> ";
75 75
         }
76 76
 
77 77
         $angka .= " <b>$halaman</b> ";
78
-        for ($i = $halaman + 1; $i < ($halaman + 3); $i++) {
79
-            if ($i > $jmlhalaman) {
78
+        for ($i = $halaman + 1; $i<($halaman + 3); $i++) {
79
+            if ($i>$jmlhalaman) {
80 80
                 break;
81 81
             }
82 82
             $angka .= "<a href=$_SERVER[PHP_SELF]?module=$_GET[module]&halaman=$i>$i</A> ";
83 83
         }
84 84
 
85
-        $angka .= ($halaman + 2 < $jmlhalaman ? " ...  
85
+        $angka .= ($halaman + 2<$jmlhalaman ? " ...  
86 86
           <a href=$_SERVER[PHP_SELF]?module=$_GET[module]&halaman=$jmlhalaman>$jmlhalaman</A> " : ' ');
87 87
 
88 88
         echo "$angka";
89 89
 
90 90
         // Link Next dan Last
91 91
 
92
-        if ($halaman_aktif < $jmlhalaman) {
92
+        if ($halaman_aktif<$jmlhalaman) {
93 93
             $next = $halaman_aktif + 1;
94 94
 
95 95
             $link_halaman .= " <a href=$_SERVER[PHP_SELF]?module=$_GET[module]&halaman=$next title=Next>>></a> ";
Please login to merge, or discard this patch.
config/qrcode/qrrscode.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -30,22 +30,22 @@  discard block
 block discarded – undo
30 30
 
31 31
     class QRrsItem
32 32
     {
33
-        public $mm;                  // Bits per symbol
34
-        public $nn;                  // Symbols per block (= (1<<mm)-1)
35
-        public $alpha_to = [];  // log lookup table
36
-        public $index_of = [];  // Antilog lookup table
37
-        public $genpoly = [];   // Generator polynomial
38
-        public $nroots;              // Number of generator roots = number of parity symbols
39
-        public $fcr;                 // First consecutive root, index form
40
-        public $prim;                // Primitive element, index form
41
-        public $iprim;               // prim-th root of 1, index form
42
-        public $pad;                 // Padding bytes in shortened block
33
+        public $mm; // Bits per symbol
34
+        public $nn; // Symbols per block (= (1<<mm)-1)
35
+        public $alpha_to = []; // log lookup table
36
+        public $index_of = []; // Antilog lookup table
37
+        public $genpoly = []; // Generator polynomial
38
+        public $nroots; // Number of generator roots = number of parity symbols
39
+        public $fcr; // First consecutive root, index form
40
+        public $prim; // Primitive element, index form
41
+        public $iprim; // prim-th root of 1, index form
42
+        public $pad; // Padding bytes in shortened block
43 43
         public $gfpoly;
44 44
 
45 45
         //----------------------------------------------------------------------
46 46
         public function modnn($x)
47 47
         {
48
-            while ($x >= $this->nn) {
48
+            while ($x>=$this->nn) {
49 49
                 $x -= $this->nn;
50 50
                 $x = ($x >> $this->mm) + ($x & $this->nn);
51 51
             }
@@ -63,19 +63,19 @@  discard block
 block discarded – undo
63 63
             $rs = null;
64 64
 
65 65
             // Check parameter ranges
66
-            if ($symsize < 0 || $symsize > 8) {
66
+            if ($symsize<0 || $symsize>8) {
67 67
                 return $rs;
68 68
             }
69
-            if ($fcr < 0 || $fcr >= (1 << $symsize)) {
69
+            if ($fcr<0 || $fcr>=(1 << $symsize)) {
70 70
                 return $rs;
71 71
             }
72
-            if ($prim <= 0 || $prim >= (1 << $symsize)) {
72
+            if ($prim<=0 || $prim>=(1 << $symsize)) {
73 73
                 return $rs;
74 74
             }
75
-            if ($nroots < 0 || $nroots >= (1 << $symsize)) {
75
+            if ($nroots<0 || $nroots>=(1 << $symsize)) {
76 76
                 return $rs;
77 77
             } // Can't have more roots than symbol values!
78
-            if ($pad < 0 || $pad >= ((1 << $symsize) - 1 - $nroots)) {
78
+            if ($pad<0 || $pad>=((1 << $symsize) - 1 - $nroots)) {
79 79
                 return $rs;
80 80
             } // Too much padding
81 81
 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
             $rs->alpha_to[$A0] = 0; // alpha**-inf = 0
97 97
             $sr = 1;
98 98
 
99
-            for ($i = 0; $i < $rs->nn; $i++) {
99
+            for ($i = 0; $i<$rs->nn; $i++) {
100 100
                 $rs->index_of[$sr] = $i;
101 101
                 $rs->alpha_to[$i] = $sr;
102 102
                 $sr <<= 1;
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
                 $sr &= $rs->nn;
107 107
             }
108 108
 
109
-            if ($sr != 1) {
109
+            if ($sr!=1) {
110 110
                 // field generator polynomial is not primitive!
111 111
                 $rs = null;
112 112
 
@@ -122,17 +122,17 @@  discard block
 block discarded – undo
122 122
             $rs->gfpoly = $gfpoly;
123 123
 
124 124
             /* Find prim-th root of 1, used in decoding */
125
-            for ($iprim = 1; ($iprim % $prim) != 0; $iprim += $rs->nn); // intentional empty-body loop!
125
+            for ($iprim = 1; ($iprim % $prim)!=0; $iprim += $rs->nn); // intentional empty-body loop!
126 126
 
127
-            $rs->iprim = (int) ($iprim / $prim);
127
+            $rs->iprim = (int)($iprim / $prim);
128 128
             $rs->genpoly[0] = 1;
129 129
 
130
-            for ($i = 0,$root = $fcr * $prim; $i < $nroots; $i++, $root += $prim) {
130
+            for ($i = 0, $root = $fcr * $prim; $i<$nroots; $i++, $root += $prim) {
131 131
                 $rs->genpoly[$i + 1] = 1;
132 132
 
133 133
                 // Multiply rs->genpoly[] by  @**(root + x)
134
-                for ($j = $i; $j > 0; $j--) {
135
-                    if ($rs->genpoly[$j] != 0) {
134
+                for ($j = $i; $j>0; $j--) {
135
+                    if ($rs->genpoly[$j]!=0) {
136 136
                         $rs->genpoly[$j] = $rs->genpoly[$j - 1] ^ $rs->alpha_to[$rs->modnn($rs->index_of[$rs->genpoly[$j]] + $root)];
137 137
                     } else {
138 138
                         $rs->genpoly[$j] = $rs->genpoly[$j - 1];
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
             }
144 144
 
145 145
             // convert rs->genpoly[] to index form for quicker encoding
146
-            for ($i = 0; $i <= $nroots; $i++) {
146
+            for ($i = 0; $i<=$nroots; $i++) {
147 147
                 $rs->genpoly[$i] = $rs->index_of[$rs->genpoly[$i]];
148 148
             }
149 149
 
@@ -167,23 +167,23 @@  discard block
 block discarded – undo
167 167
 
168 168
             $parity = array_fill(0, $NROOTS, 0);
169 169
 
170
-            for ($i = 0; $i < ($NN - $NROOTS - $PAD); $i++) {
170
+            for ($i = 0; $i<($NN - $NROOTS - $PAD); $i++) {
171 171
                 $feedback = $INDEX_OF[$data[$i] ^ $parity[0]];
172
-                if ($feedback != $A0) {
172
+                if ($feedback!=$A0) {
173 173
                     // feedback term is non-zero
174 174
 
175 175
                     // This line is unnecessary when GENPOLY[NROOTS] is unity, as it must
176 176
                     // always be for the polynomials constructed by init_rs()
177 177
                     $feedback = $this->modnn($NN - $GENPOLY[$NROOTS] + $feedback);
178 178
 
179
-                    for ($j = 1; $j < $NROOTS; $j++) {
179
+                    for ($j = 1; $j<$NROOTS; $j++) {
180 180
                         $parity[$j] ^= $ALPHA_TO[$this->modnn($feedback + $GENPOLY[$NROOTS - $j])];
181 181
                     }
182 182
                 }
183 183
 
184 184
                 // Shift
185 185
                 array_shift($parity);
186
-                if ($feedback != $A0) {
186
+                if ($feedback!=$A0) {
187 187
                     array_push($parity, $ALPHA_TO[$this->modnn($feedback + $GENPOLY[0])]);
188 188
                 } else {
189 189
                     array_push($parity, 0);
@@ -202,22 +202,22 @@  discard block
 block discarded – undo
202 202
         public static function init_rs($symsize, $gfpoly, $fcr, $prim, $nroots, $pad)
203 203
         {
204 204
             foreach (self::$items as $rs) {
205
-                if ($rs->pad != $pad) {
205
+                if ($rs->pad!=$pad) {
206 206
                     continue;
207 207
                 }
208
-                if ($rs->nroots != $nroots) {
208
+                if ($rs->nroots!=$nroots) {
209 209
                     continue;
210 210
                 }
211
-                if ($rs->mm != $symsize) {
211
+                if ($rs->mm!=$symsize) {
212 212
                     continue;
213 213
                 }
214
-                if ($rs->gfpoly != $gfpoly) {
214
+                if ($rs->gfpoly!=$gfpoly) {
215 215
                     continue;
216 216
                 }
217
-                if ($rs->fcr != $fcr) {
217
+                if ($rs->fcr!=$fcr) {
218 218
                     continue;
219 219
                 }
220
-                if ($rs->prim != $prim) {
220
+                if ($rs->prim!=$prim) {
221 221
                     continue;
222 222
                 }
223 223
 
Please login to merge, or discard this patch.