@@ -35,9 +35,9 @@ discard block |
||
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 |
||
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>"; |
@@ -45,7 +45,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -112,9 +112,9 @@ discard block |
||
112 | 112 | //---------------------------------------------------------------------- |
113 | 113 | public static function getMinimumVersion($size, $level) |
114 | 114 | { |
115 | - for ($i = 1; $i <= QRSPEC_VERSION_MAX; $i++) { |
|
115 | + for ($i = 1; $i<=QRSPEC_VERSION_MAX; $i++) { |
|
116 | 116 | $words = self::$capacity[$i][QRCAP_WORDS] - self::$capacity[$i][QRCAP_EC][$level]; |
117 | - if ($words >= $size) { |
|
117 | + if ($words>=$size) { |
|
118 | 118 | return $i; |
119 | 119 | } |
120 | 120 | } |
@@ -134,13 +134,13 @@ discard block |
||
134 | 134 | //---------------------------------------------------------------------- |
135 | 135 | public static function lengthIndicator($mode, $version) |
136 | 136 | { |
137 | - if ($mode == QR_MODE_STRUCTURE) { |
|
137 | + if ($mode==QR_MODE_STRUCTURE) { |
|
138 | 138 | return 0; |
139 | 139 | } |
140 | 140 | |
141 | - if ($version <= 9) { |
|
141 | + if ($version<=9) { |
|
142 | 142 | $l = 0; |
143 | - } elseif ($version <= 26) { |
|
143 | + } elseif ($version<=26) { |
|
144 | 144 | $l = 1; |
145 | 145 | } else { |
146 | 146 | $l = 2; |
@@ -152,13 +152,13 @@ discard block |
||
152 | 152 | //---------------------------------------------------------------------- |
153 | 153 | public static function maximumWords($mode, $version) |
154 | 154 | { |
155 | - if ($mode == QR_MODE_STRUCTURE) { |
|
155 | + if ($mode==QR_MODE_STRUCTURE) { |
|
156 | 156 | return 3; |
157 | 157 | } |
158 | 158 | |
159 | - if ($version <= 9) { |
|
159 | + if ($version<=9) { |
|
160 | 160 | $l = 0; |
161 | - } elseif ($version <= 26) { |
|
161 | + } elseif ($version<=26) { |
|
162 | 162 | $l = 1; |
163 | 163 | } else { |
164 | 164 | $l = 2; |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | $bits = self::$lengthTableBits[$mode][$l]; |
168 | 168 | $words = (1 << $bits) - 1; |
169 | 169 | |
170 | - if ($mode == QR_MODE_KANJI) { |
|
170 | + if ($mode==QR_MODE_KANJI) { |
|
171 | 171 | $words *= 2; // the number of bytes is required |
172 | 172 | } |
173 | 173 | |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | |
228 | 228 | public static function getEccSpec($version, $level, array &$spec) |
229 | 229 | { |
230 | - if (count($spec) < 5) { |
|
230 | + if (count($spec)<5) { |
|
231 | 231 | $spec = [0, 0, 0, 0, 0]; |
232 | 232 | } |
233 | 233 | |
@@ -236,16 +236,16 @@ discard block |
||
236 | 236 | $data = self::getDataLength($version, $level); |
237 | 237 | $ecc = self::getECCLength($version, $level); |
238 | 238 | |
239 | - if ($b2 == 0) { |
|
239 | + if ($b2==0) { |
|
240 | 240 | $spec[0] = $b1; |
241 | - $spec[1] = (int) ($data / $b1); |
|
242 | - $spec[2] = (int) ($ecc / $b1); |
|
241 | + $spec[1] = (int)($data / $b1); |
|
242 | + $spec[2] = (int)($ecc / $b1); |
|
243 | 243 | $spec[3] = 0; |
244 | 244 | $spec[4] = 0; |
245 | 245 | } else { |
246 | 246 | $spec[0] = $b1; |
247 | - $spec[1] = (int) ($data / ($b1 + $b2)); |
|
248 | - $spec[2] = (int) ($ecc / ($b1 + $b2)); |
|
247 | + $spec[1] = (int)($data / ($b1 + $b2)); |
|
248 | + $spec[2] = (int)($ecc / ($b1 + $b2)); |
|
249 | 249 | $spec[3] = $b2; |
250 | 250 | $spec[4] = $spec[1] + 1; |
251 | 251 | } |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | $yStart = $oy - 2; |
293 | 293 | $xStart = $ox - 2; |
294 | 294 | |
295 | - for ($y = 0; $y < 5; $y++) { |
|
295 | + for ($y = 0; $y<5; $y++) { |
|
296 | 296 | QRstr::set($frame, $xStart, $yStart + $y, $finder[$y]); |
297 | 297 | } |
298 | 298 | } |
@@ -300,18 +300,18 @@ discard block |
||
300 | 300 | //---------------------------------------------------------------------- |
301 | 301 | public static function putAlignmentPattern($version, &$frame, $width) |
302 | 302 | { |
303 | - if ($version < 2) { |
|
303 | + if ($version<2) { |
|
304 | 304 | return; |
305 | 305 | } |
306 | 306 | |
307 | 307 | $d = self::$alignmentPattern[$version][1] - self::$alignmentPattern[$version][0]; |
308 | - if ($d < 0) { |
|
308 | + if ($d<0) { |
|
309 | 309 | $w = 2; |
310 | 310 | } else { |
311 | - $w = (int) (($width - self::$alignmentPattern[$version][0]) / $d + 2); |
|
311 | + $w = (int)(($width - self::$alignmentPattern[$version][0]) / $d + 2); |
|
312 | 312 | } |
313 | 313 | |
314 | - if ($w * $w - 3 == 1) { |
|
314 | + if ($w * $w - 3==1) { |
|
315 | 315 | $x = self::$alignmentPattern[$version][0]; |
316 | 316 | $y = self::$alignmentPattern[$version][0]; |
317 | 317 | self::putAlignmentMarker($frame, $x, $y); |
@@ -320,16 +320,16 @@ discard block |
||
320 | 320 | } |
321 | 321 | |
322 | 322 | $cx = self::$alignmentPattern[$version][0]; |
323 | - for ($x = 1; $x < $w - 1; $x++) { |
|
323 | + for ($x = 1; $x<$w - 1; $x++) { |
|
324 | 324 | self::putAlignmentMarker($frame, 6, $cx); |
325 | 325 | self::putAlignmentMarker($frame, $cx, 6); |
326 | 326 | $cx += $d; |
327 | 327 | } |
328 | 328 | |
329 | 329 | $cy = self::$alignmentPattern[$version][0]; |
330 | - for ($y = 0; $y < $w - 1; $y++) { |
|
330 | + for ($y = 0; $y<$w - 1; $y++) { |
|
331 | 331 | $cx = self::$alignmentPattern[$version][0]; |
332 | - for ($x = 0; $x < $w - 1; $x++) { |
|
332 | + for ($x = 0; $x<$w - 1; $x++) { |
|
333 | 333 | self::putAlignmentMarker($frame, $cx, $cy); |
334 | 334 | $cx += $d; |
335 | 335 | } |
@@ -355,7 +355,7 @@ discard block |
||
355 | 355 | //---------------------------------------------------------------------- |
356 | 356 | public static function getVersionPattern($version) |
357 | 357 | { |
358 | - if ($version < 7 || $version > QRSPEC_VERSION_MAX) { |
|
358 | + if ($version<7 || $version>QRSPEC_VERSION_MAX) { |
|
359 | 359 | return 0; |
360 | 360 | } |
361 | 361 | |
@@ -374,11 +374,11 @@ discard block |
||
374 | 374 | |
375 | 375 | public static function getFormatInfo($mask, $level) |
376 | 376 | { |
377 | - if ($mask < 0 || $mask > 7) { |
|
377 | + if ($mask<0 || $mask>7) { |
|
378 | 378 | return 0; |
379 | 379 | } |
380 | 380 | |
381 | - if ($level < 0 || $level > 3) { |
|
381 | + if ($level<0 || $level>3) { |
|
382 | 382 | return 0; |
383 | 383 | } |
384 | 384 | |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | "\xc1\xc1\xc1\xc1\xc1\xc1\xc1", |
410 | 410 | ]; |
411 | 411 | |
412 | - for ($y = 0; $y < 7; $y++) { |
|
412 | + for ($y = 0; $y<7; $y++) { |
|
413 | 413 | QRstr::set($frame, $ox, $oy + $y, $finder[$y]); |
414 | 414 | } |
415 | 415 | } |
@@ -429,7 +429,7 @@ discard block |
||
429 | 429 | // Separator |
430 | 430 | $yOffset = $width - 7; |
431 | 431 | |
432 | - for ($y = 0; $y < 7; $y++) { |
|
432 | + for ($y = 0; $y<7; $y++) { |
|
433 | 433 | $frame[$y][7] = "\xc0"; |
434 | 434 | $frame[$y][$width - 8] = "\xc0"; |
435 | 435 | $frame[$yOffset][7] = "\xc0"; |
@@ -449,14 +449,14 @@ discard block |
||
449 | 449 | |
450 | 450 | $yOffset = $width - 8; |
451 | 451 | |
452 | - for ($y = 0; $y < 8; $y++, $yOffset++) { |
|
452 | + for ($y = 0; $y<8; $y++, $yOffset++) { |
|
453 | 453 | $frame[$y][8] = "\x84"; |
454 | 454 | $frame[$yOffset][8] = "\x84"; |
455 | 455 | } |
456 | 456 | |
457 | 457 | // Timing pattern |
458 | 458 | |
459 | - for ($i = 1; $i < $width - 15; $i++) { |
|
459 | + for ($i = 1; $i<$width - 15; $i++) { |
|
460 | 460 | $frame[6][7 + $i] = chr(0x90 | ($i & 1)); |
461 | 461 | $frame[7 + $i][6] = chr(0x90 | ($i & 1)); |
462 | 462 | } |
@@ -465,21 +465,21 @@ discard block |
||
465 | 465 | self::putAlignmentPattern($version, $frame, $width); |
466 | 466 | |
467 | 467 | // Version information |
468 | - if ($version >= 7) { |
|
468 | + if ($version>=7) { |
|
469 | 469 | $vinf = self::getVersionPattern($version); |
470 | 470 | |
471 | 471 | $v = $vinf; |
472 | 472 | |
473 | - for ($x = 0; $x < 6; $x++) { |
|
474 | - for ($y = 0; $y < 3; $y++) { |
|
473 | + for ($x = 0; $x<6; $x++) { |
|
474 | + for ($y = 0; $y<3; $y++) { |
|
475 | 475 | $frame[($width - 11) + $y][$x] = chr(0x88 | ($v & 1)); |
476 | 476 | $v = $v >> 1; |
477 | 477 | } |
478 | 478 | } |
479 | 479 | |
480 | 480 | $v = $vinf; |
481 | - for ($y = 0; $y < 6; $y++) { |
|
482 | - for ($x = 0; $x < 3; $x++) { |
|
481 | + for ($y = 0; $y<6; $y++) { |
|
482 | + for ($x = 0; $x<3; $x++) { |
|
483 | 483 | $frame[$y][$x + ($width - 11)] = chr(0x88 | ($v & 1)); |
484 | 484 | $v = $v >> 1; |
485 | 485 | } |
@@ -553,7 +553,7 @@ discard block |
||
553 | 553 | //---------------------------------------------------------------------- |
554 | 554 | public static function newFrame($version) |
555 | 555 | { |
556 | - if ($version < 1 || $version > QRSPEC_VERSION_MAX) { |
|
556 | + if ($version<1 || $version>QRSPEC_VERSION_MAX) { |
|
557 | 557 | return; |
558 | 558 | } |
559 | 559 |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | { |
30 | 30 | $len = count($frame); |
31 | 31 | foreach ($frame as &$frameLine) { |
32 | - for ($i = 0; $i < $len; $i++) { |
|
32 | + for ($i = 0; $i<$len; $i++) { |
|
33 | 33 | $frameLine[$i] = (ord($frameLine[$i]) & 1) ? '1' : '0'; |
34 | 34 | } |
35 | 35 | } |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | |
49 | 49 | $eccLevel = 'L'; |
50 | 50 | |
51 | - if (count($mode) > 1) { |
|
51 | + if (count($mode)>1) { |
|
52 | 52 | $eccLevel = $mode[1]; |
53 | 53 | } |
54 | 54 | |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | foreach ($qrTab as $line) { |
63 | 63 | $arrAdd = []; |
64 | 64 | foreach (str_split($line) as $char) { |
65 | - $arrAdd[] = ($char == '1') ? 1 : 0; |
|
65 | + $arrAdd[] = ($char=='1') ? 1 : 0; |
|
66 | 66 | } |
67 | 67 | $barcode_array['bcode'][] = $arrAdd; |
68 | 68 | } |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | self::markTime('before_build_cache'); |
83 | 83 | |
84 | 84 | $mask = new QRmask(); |
85 | - for ($a = 1; $a <= QRSPEC_VERSION_MAX; $a++) { |
|
85 | + for ($a = 1; $a<=QRSPEC_VERSION_MAX; $a++) { |
|
86 | 86 | $frame = QRspec::newFrame($a); |
87 | 87 | if (QR_IMAGE) { |
88 | 88 | $fileName = QR_CACHE_DIR.'frame_'.$a.'.png'; |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | |
92 | 92 | $width = count($frame); |
93 | 93 | $bitMask = array_fill(0, $width, array_fill(0, $width, 0)); |
94 | - for ($maskNo = 0; $maskNo < 8; $maskNo++) { |
|
94 | + for ($maskNo = 0; $maskNo<8; $maskNo++) { |
|
95 | 95 | $mask->makeMaskNo($maskNo, $width, $frame, $bitMask, true); |
96 | 96 | } |
97 | 97 | } |
@@ -102,9 +102,9 @@ discard block |
||
102 | 102 | //---------------------------------------------------------------------- |
103 | 103 | public static function log($outfile, $err) |
104 | 104 | { |
105 | - if (QR_LOG_DIR !== false) { |
|
106 | - if ($err != '') { |
|
107 | - if ($outfile !== false) { |
|
105 | + if (QR_LOG_DIR!==false) { |
|
106 | + if ($err!='') { |
|
107 | + if ($outfile!==false) { |
|
108 | 108 | file_put_contents(QR_LOG_DIR.basename($outfile).'-errors.txt', date('Y-m-d H:i:s').': '.$err, FILE_APPEND); |
109 | 109 | } else { |
110 | 110 | file_put_contents(QR_LOG_DIR.'errors.txt', date('Y-m-d H:i:s').': '.$err, FILE_APPEND); |
@@ -117,8 +117,8 @@ discard block |
||
117 | 117 | public static function dumpMask($frame) |
118 | 118 | { |
119 | 119 | $width = count($frame); |
120 | - for ($y = 0; $y < $width; $y++) { |
|
121 | - for ($x = 0; $x < $width; $x++) { |
|
120 | + for ($y = 0; $y<$width; $y++) { |
|
121 | + for ($x = 0; $x<$width; $x++) { |
|
122 | 122 | echo ord($frame[$y][$x]).','; |
123 | 123 | } |
124 | 124 | } |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | public static function markTime($markerId) |
129 | 129 | { |
130 | 130 | list($usec, $sec) = explode(' ', microtime()); |
131 | - $time = ((float) $usec + (float) $sec); |
|
131 | + $time = ((float)$usec + (float)$sec); |
|
132 | 132 | |
133 | 133 | if (!isset($GLOBALS['qr_time_bench'])) { |
134 | 134 | $GLOBALS['qr_time_bench'] = []; |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | <tbody>'; |
152 | 152 | |
153 | 153 | foreach ($GLOBALS['qr_time_bench'] as $markerId=>$thisTime) { |
154 | - if ($p > 0) { |
|
154 | + if ($p>0) { |
|
155 | 155 | echo '<tr><th style="text-align:right">till '.$markerId.': </th><td>'.number_format($thisTime - $lastTime, 6).'s</td></tr>'; |
156 | 156 | } else { |
157 | 157 | $startTime = $thisTime; |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | header('Content-Type: application/download'); |
119 | 119 | header('Content-Type: application/vnd.ms-excel'); |
120 | 120 | |
121 | -if ($tipe == 'R') { |
|
121 | +if ($tipe=='R') { |
|
122 | 122 | header("Content-Disposition: attachment;filename=rekap_revenue_$nprd.xls "); |
123 | 123 | } else { |
124 | 124 | header("Content-Disposition: attachment;filename=detail_rekap_$nprd.xls "); |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | |
188 | 188 | ?> |
189 | 189 | |
190 | - <?php if ($tipe == 'R') { |
|
190 | + <?php if ($tipe=='R') { |
|
191 | 191 | ?> |
192 | 192 | |
193 | 193 | |
@@ -344,7 +344,7 @@ discard block |
||
344 | 344 | |
345 | 345 | |
346 | 346 | <?php |
347 | - for ($j = 1; $j <= $hjml; $j++) { |
|
347 | + for ($j = 1; $j<=$hjml; $j++) { |
|
348 | 348 | echo '<th>KUNJ</th>'; |
349 | 349 | echo '<th>REV</th>'; |
350 | 350 | } ?> |
@@ -533,7 +533,7 @@ discard block |
||
533 | 533 | |
534 | 534 | $month = date('m', strtotime($iprd)) * 1; |
535 | 535 | |
536 | - if ($month == '1') { |
|
536 | + if ($month=='1') { |
|
537 | 537 | $imonth = 12; |
538 | 538 | } else { |
539 | 539 | $imonth = $month - 1; |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | |
121 | 121 | $jenis_transaksi = $_GET['jenis_transaksi']; |
122 | 122 | |
123 | -if ($tipe == 'R') { |
|
123 | +if ($tipe=='R') { |
|
124 | 124 | $kertas = 'portrait'; |
125 | 125 | } else { |
126 | 126 | $kertas = 'landscape'; |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | |
287 | 287 | ?> |
288 | 288 | |
289 | - <?php if ($tipe == 'R') { |
|
289 | + <?php if ($tipe=='R') { |
|
290 | 290 | ?> |
291 | 291 | |
292 | 292 | |
@@ -425,7 +425,7 @@ discard block |
||
425 | 425 | |
426 | 426 | |
427 | 427 | <?php |
428 | - for ($j = 1; $j <= $hjml; $j++) { |
|
428 | + for ($j = 1; $j<=$hjml; $j++) { |
|
429 | 429 | echo '<th>KUNJ</th>'; |
430 | 430 | echo '<th>REV</th>'; |
431 | 431 | } ?> |
@@ -614,7 +614,7 @@ discard block |
||
614 | 614 | |
615 | 615 | $month = date('m', strtotime($iprd)) * 1; |
616 | 616 | |
617 | - if ($month == '1') { |
|
617 | + if ($month=='1') { |
|
618 | 618 | $imonth = 12; |
619 | 619 | } else { |
620 | 620 | $imonth = $month - 1; |
@@ -389,7 +389,7 @@ discard block |
||
389 | 389 | |
390 | 390 | <?php |
391 | 391 | |
392 | - if ($r[id_shift] == '1') { |
|
392 | + if ($r[id_shift]=='1') { |
|
393 | 393 | $id_shift = '1'; |
394 | 394 | } else { |
395 | 395 | $id_shift = '%'; |
@@ -500,7 +500,7 @@ discard block |
||
500 | 500 | |
501 | 501 | ?> |
502 | 502 | |
503 | - <?php if ($id_shift == '%') { |
|
503 | + <?php if ($id_shift=='%') { |
|
504 | 504 | ?> |
505 | 505 | <tr> |
506 | 506 | <th></th> |
@@ -286,21 +286,21 @@ discard block |
||
286 | 286 | { |
287 | 287 | $abil = ['', 'satu', 'dua', 'tiga', 'empat', 'lima', 'enam', 'tujuh', 'delapan', 'sembilan', 'sepuluh', 'sebelas']; |
288 | 288 | |
289 | - if ($x < 12) { |
|
289 | + if ($x<12) { |
|
290 | 290 | return ' '.$abil[$x]; |
291 | - } elseif ($x < 20) { |
|
291 | + } elseif ($x<20) { |
|
292 | 292 | return Terbilang($x - 10).'belas'; |
293 | - } elseif ($x < 100) { |
|
293 | + } elseif ($x<100) { |
|
294 | 294 | return Terbilang($x / 10).' puluh'.Terbilang($x % 10); |
295 | - } elseif ($x < 200) { |
|
295 | + } elseif ($x<200) { |
|
296 | 296 | return ' seratus'.Terbilang($x - 100); |
297 | - } elseif ($x < 1000) { |
|
297 | + } elseif ($x<1000) { |
|
298 | 298 | return Terbilang($x / 100).' ratus'.Terbilang($x % 100); |
299 | - } elseif ($x < 2000) { |
|
299 | + } elseif ($x<2000) { |
|
300 | 300 | return ' seribu'.Terbilang($x - 1000); |
301 | - } elseif ($x < 1000000) { |
|
301 | + } elseif ($x<1000000) { |
|
302 | 302 | return Terbilang($x / 1000).' ribu'.Terbilang($x % 1000); |
303 | - } elseif ($x < 1000000000) { |
|
303 | + } elseif ($x<1000000000) { |
|
304 | 304 | return Terbilang($x / 1000000).' juta'.Terbilang($x % 1000000); |
305 | 305 | } |
306 | 306 | } |
@@ -469,13 +469,13 @@ discard block |
||
469 | 469 | |
470 | 470 | $tgl = date('d/m/Y', strtotime($r['tanggal'])); |
471 | 471 | |
472 | - if ($r['status'] == '0') { |
|
472 | + if ($r['status']=='0') { |
|
473 | 473 | $istatus = 'Baru'; |
474 | - } elseif ($r['status'] == '1') { |
|
474 | + } elseif ($r['status']=='1') { |
|
475 | 475 | $istatus = 'Disetujui'; |
476 | - } elseif ($r['status'] == '2') { |
|
476 | + } elseif ($r['status']=='2') { |
|
477 | 477 | $istatus = 'Ditolak'; |
478 | - } elseif ($r['status'] == '9') { |
|
478 | + } elseif ($r['status']=='9') { |
|
479 | 479 | $istatus = 'Posting'; |
480 | 480 | } else { |
481 | 481 | $istatus = 'Dibatalkan'; |
@@ -739,7 +739,7 @@ discard block |
||
739 | 739 | |
740 | 740 | <th width='15%' class="iborder" style="text-align: right">Harga</th> |
741 | 741 | |
742 | - <?php if ($mata_uang == '1') { |
|
742 | + <?php if ($mata_uang=='1') { |
|
743 | 743 | ?> |
744 | 744 | |
745 | 745 | <th width='15%' class="lborder" style="text-align: right">Total</th> |
@@ -834,7 +834,7 @@ discard block |
||
834 | 834 | |
835 | 835 | echo'</td>'; |
836 | 836 | |
837 | - if ($mata_uang == '1') { |
|
837 | + if ($mata_uang=='1') { |
|
838 | 838 | echo" <td class='border' style='text-align:right;'>"; |
839 | 839 | |
840 | 840 | echo $total; |
@@ -857,8 +857,8 @@ discard block |
||
857 | 857 | $no++; |
858 | 858 | } |
859 | 859 | |
860 | - if ($no < 10) { |
|
861 | - while ($no < 10) { |
|
860 | + if ($no<10) { |
|
861 | + while ($no<10) { |
|
862 | 862 | echo '<tr>'; |
863 | 863 | |
864 | 864 | echo'<td colspan=4> </td>'; |
@@ -895,7 +895,7 @@ discard block |
||
895 | 895 | |
896 | 896 | $icgtotal = $r['cgtotal']; |
897 | 897 | |
898 | - if ($mata_uang == '1') { |
|
898 | + if ($mata_uang=='1') { |
|
899 | 899 | $rterbilang = ucwords(Terbilang($igtotal)).' Rupiah'; |
900 | 900 | } else { |
901 | 901 | $rterbilang = ucwords(Terbilang($icgtotal)).' '.$cnote; |
@@ -925,7 +925,7 @@ discard block |
||
925 | 925 | |
926 | 926 | </td> |
927 | 927 | |
928 | -<?php if ($mata_uang != '1') { |
|
928 | +<?php if ($mata_uang!='1') { |
|
929 | 929 | ?> |
930 | 930 | |
931 | 931 | <td style="text-align:right;border-bottom:1px black solid;"> |
@@ -965,7 +965,7 @@ discard block |
||
965 | 965 | |
966 | 966 | </td> |
967 | 967 | |
968 | -<?php if ($mata_uang != '1') { |
|
968 | +<?php if ($mata_uang!='1') { |
|
969 | 969 | ?> |
970 | 970 | |
971 | 971 | <td style="text-align:right;border-bottom:1px black solid;"> |
@@ -995,7 +995,7 @@ discard block |
||
995 | 995 | |
996 | 996 | </td> |
997 | 997 | |
998 | -<?php if ($mata_uang != '1') { |
|
998 | +<?php if ($mata_uang!='1') { |
|
999 | 999 | ?> |
1000 | 1000 | |
1001 | 1001 | <td style="text-align:right;border-bottom:1px black solid;"> |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | |
62 | 62 | if ($id) { |
63 | 63 | $query = mysql_query('SELECT * FROM user WHERE id_user = "'.$id.'"'); |
64 | - if ($query && mysql_num_rows($query) == 1) { |
|
64 | + if ($query && mysql_num_rows($query)==1) { |
|
65 | 65 | $data = mysql_fetch_object($query); |
66 | 66 | } else { |
67 | 67 | die('Data user tidak ditemukan'); |
@@ -122,10 +122,10 @@ discard block |
||
122 | 122 | <option value=''></option> |
123 | 123 | <?php |
124 | 124 | $query = mysql_query('SELECT * FROM groups ORDER BY groups'); |
125 | - if ($query && mysql_num_rows($query) > 0) { |
|
125 | + if ($query && mysql_num_rows($query)>0) { |
|
126 | 126 | while ($row = mysql_fetch_object($query)) { |
127 | 127 | echo '<option value="'.$row->id_groups.'"'; |
128 | - if ($row->id_groups == @$data->id_groups) { |
|
128 | + if ($row->id_groups==@$data->id_groups) { |
|
129 | 129 | echo ' selected'; |
130 | 130 | } |
131 | 131 | echo '>'.$row->groups.'</option>'; |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | <?php if ($data->id_user) { |
143 | 143 | ?> |
144 | 144 | |
145 | - <?php if ($data->r_input == 'Y') { |
|
145 | + <?php if ($data->r_input=='Y') { |
|
146 | 146 | ?> |
147 | 147 | <input checked type='checkbox' class='flat' value='Y' name='r_input' > <label>Input</label> |
148 | 148 | <?php |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | <?php |
153 | 153 | } ?> |
154 | 154 | |
155 | - <?php if ($data->r_edit == 'Y') { |
|
155 | + <?php if ($data->r_edit=='Y') { |
|
156 | 156 | ?> |
157 | 157 | <input checked type='checkbox' class='flat' value='Y' name='r_edit' > <label>Edit</label> |
158 | 158 | <?php |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | <?php |
163 | 163 | } ?> |
164 | 164 | |
165 | - <?php if ($data->r_delete == 'Y') { |
|
165 | + <?php if ($data->r_delete=='Y') { |
|
166 | 166 | ?> |
167 | 167 | <input checked type='checkbox' class='flat' value='Y' name='r_delete' > <label>Delete</label> |
168 | 168 | <?php |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | <?php if ($id) { |
188 | 188 | ?> |
189 | 189 | |
190 | - <?php if (@$data->aktif == 'Y') { |
|
190 | + <?php if (@$data->aktif=='Y') { |
|
191 | 191 | ?> |
192 | 192 | |
193 | 193 | <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Aktif :</label> |