@@ -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> |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | $jml = ($lday - $fday) + 1; |
92 | 92 | |
93 | 93 | if ($_GET['ldate']) { |
94 | - if ($lmonth == $fmonth and $lyear == $fyear) { |
|
94 | + if ($lmonth==$fmonth and $lyear==$fyear) { |
|
95 | 95 | $jcol = $jml; |
96 | 96 | } else { |
97 | 97 | $jcol = $f_jml + $l_jml; |
@@ -120,10 +120,10 @@ discard block |
||
120 | 120 | <option value="">--------- Room Type ---------</option> |
121 | 121 | <?php |
122 | 122 | $query = mysql_query('SELECT * FROM room_type ORDER BY room_type'); |
123 | - if ($query && mysql_num_rows($query) > 0) { |
|
123 | + if ($query && mysql_num_rows($query)>0) { |
|
124 | 124 | while ($row = mysql_fetch_object($query)) { |
125 | 125 | echo '<option value="'.$row->id_room_type.'"'; |
126 | - if ($row->id_room_type == $_GET['room_type']) { |
|
126 | + if ($row->id_room_type==$_GET['room_type']) { |
|
127 | 127 | echo ' selected'; |
128 | 128 | } |
129 | 129 | echo '>'.$row->room_type.'</option>'; |
@@ -156,9 +156,9 @@ discard block |
||
156 | 156 | <?php |
157 | 157 | $col = (83 / $jcol); |
158 | 158 | |
159 | - if ($lmonth == $fmonth and $lyear == $fyear) { |
|
160 | - for ($i = $fday; $i <= $lday; $i++) { |
|
161 | - if (strlen($i) == '1') { |
|
159 | + if ($lmonth==$fmonth and $lyear==$fyear) { |
|
160 | + for ($i = $fday; $i<=$lday; $i++) { |
|
161 | + if (strlen($i)=='1') { |
|
162 | 162 | $tgl = '0'.$i; |
163 | 163 | } else { |
164 | 164 | $tgl = $i; |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | |
177 | 177 | if ($s['sdate']) { |
178 | 178 | $bg = '#eba51c'; |
179 | - } elseif ($nday == '6' or $nday == '7') { |
|
179 | + } elseif ($nday=='6' or $nday=='7') { |
|
180 | 180 | $bg = '#eb1c41'; |
181 | 181 | } else { |
182 | 182 | $bg = ''; |
@@ -191,8 +191,8 @@ discard block |
||
191 | 191 | </th>"; |
192 | 192 | } |
193 | 193 | } else { |
194 | - for ($i = $fday; $i <= $f_lastday; $i++) { |
|
195 | - if (strlen($i) == '1') { |
|
194 | + for ($i = $fday; $i<=$f_lastday; $i++) { |
|
195 | + if (strlen($i)=='1') { |
|
196 | 196 | $tgl = '0'.$i; |
197 | 197 | } else { |
198 | 198 | $tgl = $i; |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | |
211 | 211 | if ($s['sdate']) { |
212 | 212 | $bg = '#eba51c'; |
213 | - } elseif ($nday == '6' or $nday == '7') { |
|
213 | + } elseif ($nday=='6' or $nday=='7') { |
|
214 | 214 | $bg = '#eb1c41'; |
215 | 215 | } else { |
216 | 216 | $bg = ''; |
@@ -225,8 +225,8 @@ discard block |
||
225 | 225 | </th>"; |
226 | 226 | } |
227 | 227 | |
228 | - for ($i = 1; $i <= $lday; $i++) { |
|
229 | - if (strlen($i) == '1') { |
|
228 | + for ($i = 1; $i<=$lday; $i++) { |
|
229 | + if (strlen($i)=='1') { |
|
230 | 230 | $tgl = '0'.$i; |
231 | 231 | } else { |
232 | 232 | $tgl = $i; |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | |
245 | 245 | if ($s['sdate']) { |
246 | 246 | $bg = '#eba51c'; |
247 | - } elseif ($nday == '6' or $nday == '7') { |
|
247 | + } elseif ($nday=='6' or $nday=='7') { |
|
248 | 248 | $bg = '#eb1c41'; |
249 | 249 | } else { |
250 | 250 | $bg = ''; |
@@ -286,9 +286,9 @@ discard block |
||
286 | 286 | echo'<tr>'; |
287 | 287 | echo"<td style='background-color: #1ABB9C;color: #E7E7E7;'>".$t['room_type'].'</td>'; |
288 | 288 | |
289 | - if ($lmonth == $fmonth and $lyear == $fyear) { |
|
290 | - for ($i = $fday; $i <= $lday; $i++) { |
|
291 | - if (strlen($i) == '1') { |
|
289 | + if ($lmonth==$fmonth and $lyear==$fyear) { |
|
290 | + for ($i = $fday; $i<=$lday; $i++) { |
|
291 | + if (strlen($i)=='1') { |
|
292 | 292 | $tgl = '0'.$i; |
293 | 293 | } else { |
294 | 294 | $tgl = $i; |
@@ -300,8 +300,8 @@ discard block |
||
300 | 300 | </td>"; |
301 | 301 | } |
302 | 302 | } else { |
303 | - for ($i = $fday; $i <= $f_lastday; $i++) { |
|
304 | - if (strlen($i) == '1') { |
|
303 | + for ($i = $fday; $i<=$f_lastday; $i++) { |
|
304 | + if (strlen($i)=='1') { |
|
305 | 305 | $tgl = '0'.$i; |
306 | 306 | } else { |
307 | 307 | $tgl = $i; |
@@ -315,8 +315,8 @@ discard block |
||
315 | 315 | </td>"; |
316 | 316 | } |
317 | 317 | |
318 | - for ($i = 1; $i <= $lday; $i++) { |
|
319 | - if (strlen($i) == '1') { |
|
318 | + for ($i = 1; $i<=$lday; $i++) { |
|
319 | + if (strlen($i)=='1') { |
|
320 | 320 | $tgl = '0'.$i; |
321 | 321 | } else { |
322 | 322 | $tgl = $i; |
@@ -341,7 +341,7 @@ discard block |
||
341 | 341 | while ($r = mysql_fetch_array($room)) { |
342 | 342 | $aktif = $r['aktif']; |
343 | 343 | |
344 | - if (($no % 2) == 0) { |
|
344 | + if (($no % 2)==0) { |
|
345 | 345 | $sty = 'ftd'; |
346 | 346 | } else { |
347 | 347 | $sty = 'ltd'; |
@@ -352,9 +352,9 @@ discard block |
||
352 | 352 | echo'<tr>'; |
353 | 353 | echo"<td style='padding-left:20px;text-align:left;' class=$sty>".$r['room_no'].'</td>'; |
354 | 354 | |
355 | - if ($lmonth == $fmonth and $lyear == $fyear) { |
|
356 | - for ($i = $fday; $i <= $lday; $i++) { |
|
357 | - if (strlen($i) == '1') { |
|
355 | + if ($lmonth==$fmonth and $lyear==$fyear) { |
|
356 | + for ($i = $fday; $i<=$lday; $i++) { |
|
357 | + if (strlen($i)=='1') { |
|
358 | 358 | $tgl = '0'.$i; |
359 | 359 | } else { |
360 | 360 | $tgl = $i; |
@@ -364,7 +364,7 @@ discard block |
||
364 | 364 | |
365 | 365 | echo"<td class=$sty style='padding:0;'>"; |
366 | 366 | |
367 | - if ($aktif == 'T') { |
|
367 | + if ($aktif=='T') { |
|
368 | 368 | echo" |
369 | 369 | <i class='fa fa-warning' style='color: red;font-size:18px' onMouseover=\"ddrivetip('Out of Order')\"; onMouseout=\"hideddrivetip()\"></i> |
370 | 370 | "; |
@@ -434,15 +434,15 @@ discard block |
||
434 | 434 | $legend = $c['legend']; |
435 | 435 | $status = $c['status']; |
436 | 436 | |
437 | - if ($status == 0) { |
|
437 | + if ($status==0) { |
|
438 | 438 | $icolor = '#fff'; |
439 | 439 | } else { |
440 | 440 | $icolor = '#fff'; |
441 | 441 | } |
442 | 442 | |
443 | - if ($status == 0) { |
|
443 | + if ($status==0) { |
|
444 | 444 | $istatus = 'Reserved'; |
445 | - } elseif ($status == 1) { |
|
445 | + } elseif ($status==1) { |
|
446 | 446 | $istatus = 'Check In'; |
447 | 447 | } else { |
448 | 448 | $istatus = 'Check Out'; |
@@ -450,7 +450,7 @@ discard block |
||
450 | 450 | |
451 | 451 | $iguest = trim($c['initial']).'. '.trim($c['guest']).' | '.$istatus; |
452 | 452 | |
453 | - if ($c['initial'] == 'Mr ') { |
|
453 | + if ($c['initial']=='Mr ') { |
|
454 | 454 | $icon = 'fa fa-male'; |
455 | 455 | } else { |
456 | 456 | $icon = 'fa fa-female'; |
@@ -460,7 +460,7 @@ discard block |
||
460 | 460 | |
461 | 461 | //if ($jml == '1') { |
462 | 462 | |
463 | - if ($ljml == '0' and $jml == '1' and $njml == '1') { |
|
463 | + if ($ljml=='0' and $jml=='1' and $njml=='1') { |
|
464 | 464 | echo"<td width='50%'> |
465 | 465 | </td>"; |
466 | 466 | } |
@@ -477,7 +477,7 @@ discard block |
||
477 | 477 | } |
478 | 478 | } |
479 | 479 | |
480 | - if ($ljml != '0' and $jml == '1') { |
|
480 | + if ($ljml!='0' and $jml=='1') { |
|
481 | 481 | echo"<td width='50%'> |
482 | 482 | </td>"; |
483 | 483 | } |
@@ -489,8 +489,8 @@ discard block |
||
489 | 489 | echo'</td>'; |
490 | 490 | } |
491 | 491 | } else { |
492 | - for ($i = $fday; $i <= $f_lastday; $i++) { |
|
493 | - if (strlen($i) == '1') { |
|
492 | + for ($i = $fday; $i<=$f_lastday; $i++) { |
|
493 | + if (strlen($i)=='1') { |
|
494 | 494 | $tgl = '0'.$i; |
495 | 495 | } else { |
496 | 496 | $tgl = $i; |
@@ -500,7 +500,7 @@ discard block |
||
500 | 500 | |
501 | 501 | echo"<td class=$sty style='padding:0;'>"; |
502 | 502 | |
503 | - if ($aktif == 'T') { |
|
503 | + if ($aktif=='T') { |
|
504 | 504 | echo" |
505 | 505 | <i class='fa fa-warning' style='color: red;font-size:18px' onMouseover=\"ddrivetip('Out of Order')\"; onMouseout=\"hideddrivetip()\"></i> |
506 | 506 | "; |
@@ -532,15 +532,15 @@ discard block |
||
532 | 532 | $legend = $c['legend']; |
533 | 533 | $status = $c['status']; |
534 | 534 | |
535 | - if ($status == 0) { |
|
535 | + if ($status==0) { |
|
536 | 536 | $icolor = '#fff'; |
537 | 537 | } else { |
538 | 538 | $icolor = '#fff'; |
539 | 539 | } |
540 | 540 | |
541 | - if ($status == 0) { |
|
541 | + if ($status==0) { |
|
542 | 542 | $istatus = 'Reserved'; |
543 | - } elseif ($status == 1) { |
|
543 | + } elseif ($status==1) { |
|
544 | 544 | $istatus = 'Check In'; |
545 | 545 | } else { |
546 | 546 | $istatus = 'Check Out'; |
@@ -548,7 +548,7 @@ discard block |
||
548 | 548 | |
549 | 549 | $iguest = trim($c['initial']).'. '.trim($c['guest']).' | '.$istatus; |
550 | 550 | |
551 | - if ($c['initial'] == 'Mr ') { |
|
551 | + if ($c['initial']=='Mr ') { |
|
552 | 552 | $icon = 'fa fa-male'; |
553 | 553 | } else { |
554 | 554 | $icon = 'fa fa-female'; |
@@ -566,7 +566,7 @@ discard block |
||
566 | 566 | } |
567 | 567 | } |
568 | 568 | |
569 | - if ($jml == '1') { |
|
569 | + if ($jml=='1') { |
|
570 | 570 | echo"<td width='50%'> |
571 | 571 | </td>"; |
572 | 572 | } |
@@ -576,8 +576,8 @@ discard block |
||
576 | 576 | echo'</td>'; |
577 | 577 | } |
578 | 578 | |
579 | - for ($i = 1; $i <= $lday; $i++) { |
|
580 | - if (strlen($i) == '1') { |
|
579 | + for ($i = 1; $i<=$lday; $i++) { |
|
580 | + if (strlen($i)=='1') { |
|
581 | 581 | $tgl = '0'.$i; |
582 | 582 | } else { |
583 | 583 | $tgl = $i; |
@@ -587,7 +587,7 @@ discard block |
||
587 | 587 | |
588 | 588 | echo"<td class=$sty style='padding:0;'>"; |
589 | 589 | |
590 | - if ($aktif == 'T') { |
|
590 | + if ($aktif=='T') { |
|
591 | 591 | echo" |
592 | 592 | <i class='fa fa-warning' style='color: red;font-size:18px' onMouseover=\"ddrivetip('Out of Order')\"; onMouseout=\"hideddrivetip()\"></i> |
593 | 593 | "; |
@@ -619,15 +619,15 @@ discard block |
||
619 | 619 | $legend = $c['legend']; |
620 | 620 | $status = $c['status']; |
621 | 621 | |
622 | - if ($status == 0) { |
|
622 | + if ($status==0) { |
|
623 | 623 | $icolor = '#fff'; |
624 | 624 | } else { |
625 | 625 | $icolor = '#fff'; |
626 | 626 | } |
627 | 627 | |
628 | - if ($status == 0) { |
|
628 | + if ($status==0) { |
|
629 | 629 | $istatus = 'Reserved'; |
630 | - } elseif ($status == 1) { |
|
630 | + } elseif ($status==1) { |
|
631 | 631 | $istatus = 'Check In'; |
632 | 632 | } else { |
633 | 633 | $istatus = 'Check Out'; |
@@ -635,7 +635,7 @@ discard block |
||
635 | 635 | |
636 | 636 | $iguest = trim($c['initial']).'. '.trim($c['guest']).' | '.$istatus; |
637 | 637 | |
638 | - if ($c['initial'] == 'Mr ') { |
|
638 | + if ($c['initial']=='Mr ') { |
|
639 | 639 | $icon = 'fa fa-male'; |
640 | 640 | } else { |
641 | 641 | $icon = 'fa fa-female'; |
@@ -653,7 +653,7 @@ discard block |
||
653 | 653 | } |
654 | 654 | } |
655 | 655 | |
656 | - if ($jml == '1') { |
|
656 | + if ($jml=='1') { |
|
657 | 657 | echo"<td width='50%'> |
658 | 658 | </td>"; |
659 | 659 | } |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | <tr> |
228 | 228 | |
229 | 229 | <?php |
230 | - for ($j = 1; $j <= $hjml; $j++) { |
|
230 | + for ($j = 1; $j<=$hjml; $j++) { |
|
231 | 231 | echo '<th>JML</th>'; |
232 | 232 | echo '<th>RUPIAH</th>'; |
233 | 233 | } |
@@ -252,12 +252,12 @@ discard block |
||
252 | 252 | |
253 | 253 | <tbody> |
254 | 254 | |
255 | - <?php for ($i = 1; $i <= 31; $i++) { |
|
255 | + <?php for ($i = 1; $i<=31; $i++) { |
|
256 | 256 | echo'<tr>'; |
257 | 257 | |
258 | 258 | echo"<td style='text-align:center;'>$i</td>"; |
259 | 259 | |
260 | - if (strlen($i) == '1') { |
|
260 | + if (strlen($i)=='1') { |
|
261 | 261 | $tgl = $prd.'-0'.$i; |
262 | 262 | } else { |
263 | 263 | $tgl = $prd.'-'.$i; |
@@ -505,7 +505,7 @@ discard block |
||
505 | 505 | |
506 | 506 | $month = date('m', strtotime($iprd)) * 1; |
507 | 507 | |
508 | - if ($month == '1') { |
|
508 | + if ($month=='1') { |
|
509 | 509 | $imonth = 12; |
510 | 510 | } else { |
511 | 511 | $imonth = $month - 1; |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | <tr> |
228 | 228 | |
229 | 229 | <?php |
230 | - for ($j = 1; $j <= $hjml; $j++) { |
|
230 | + for ($j = 1; $j<=$hjml; $j++) { |
|
231 | 231 | echo '<th>JML</th>'; |
232 | 232 | echo '<th>RUPIAH</th>'; |
233 | 233 | } |
@@ -252,12 +252,12 @@ discard block |
||
252 | 252 | |
253 | 253 | <tbody> |
254 | 254 | |
255 | - <?php for ($i = 1; $i <= 31; $i++) { |
|
255 | + <?php for ($i = 1; $i<=31; $i++) { |
|
256 | 256 | echo'<tr>'; |
257 | 257 | |
258 | 258 | echo"<td style='text-align:center;'>$i</td>"; |
259 | 259 | |
260 | - if (strlen($i) == '1') { |
|
260 | + if (strlen($i)=='1') { |
|
261 | 261 | $tgl = $prd.'-0'.$i; |
262 | 262 | } else { |
263 | 263 | $tgl = $prd.'-'.$i; |
@@ -505,7 +505,7 @@ discard block |
||
505 | 505 | |
506 | 506 | $month = date('m', strtotime($iprd)) * 1; |
507 | 507 | |
508 | - if ($month == '1') { |
|
508 | + if ($month=='1') { |
|
509 | 509 | $imonth = 12; |
510 | 510 | } else { |
511 | 511 | $imonth = $month - 1; |