@@ -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> |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | |
| 81 | 81 | if ($id) { |
| 82 | 82 | $query = mysql_query('SELECT * FROM user WHERE id_user = "'.$id.'"'); |
| 83 | - if ($query && mysql_num_rows($query) == 1) { |
|
| 83 | + if ($query && mysql_num_rows($query)==1) { |
|
| 84 | 84 | $data = mysql_fetch_object($query); |
| 85 | 85 | } else { |
| 86 | 86 | die('Data user tidak ditemukan'); |
@@ -161,10 +161,10 @@ discard block |
||
| 161 | 161 | <option value=''></option> |
| 162 | 162 | <?php |
| 163 | 163 | $query = mysql_query('SELECT * FROM groups ORDER BY groups'); |
| 164 | - if ($query && mysql_num_rows($query) > 0) { |
|
| 164 | + if ($query && mysql_num_rows($query)>0) { |
|
| 165 | 165 | while ($row = mysql_fetch_object($query)) { |
| 166 | 166 | echo '<option value="'.$row->id_groups.'"'; |
| 167 | - if ($row->id_groups == @$data->id_groups) { |
|
| 167 | + if ($row->id_groups==@$data->id_groups) { |
|
| 168 | 168 | echo ' selected'; |
| 169 | 169 | } |
| 170 | 170 | echo '>'.$row->groups.'</option>'; |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | <?php if ($data->id_user) { |
| 182 | 182 | ?> |
| 183 | 183 | |
| 184 | - <?php if ($data->r_input == 'Y') { |
|
| 184 | + <?php if ($data->r_input=='Y') { |
|
| 185 | 185 | ?> |
| 186 | 186 | <input checked type='checkbox' class='flat' value='Y' name='r_input' > <label>Input</label> |
| 187 | 187 | <?php |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | <?php |
| 192 | 192 | } ?> |
| 193 | 193 | |
| 194 | - <?php if ($data->r_edit == 'Y') { |
|
| 194 | + <?php if ($data->r_edit=='Y') { |
|
| 195 | 195 | ?> |
| 196 | 196 | <input checked type='checkbox' class='flat' value='Y' name='r_edit' > <label>Ubah</label> |
| 197 | 197 | <?php |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | <?php |
| 202 | 202 | } ?> |
| 203 | 203 | |
| 204 | - <?php if ($data->r_delete == 'Y') { |
|
| 204 | + <?php if ($data->r_delete=='Y') { |
|
| 205 | 205 | ?> |
| 206 | 206 | <input checked type='checkbox' class='flat' value='Y' name='r_delete' > <label>Hapus</label> |
| 207 | 207 | <?php |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | <?php |
| 212 | 212 | } ?> |
| 213 | 213 | |
| 214 | - <?php if ($data->r_admin == 'Y') { |
|
| 214 | + <?php if ($data->r_admin=='Y') { |
|
| 215 | 215 | ?> |
| 216 | 216 | <input checked type='checkbox' class='flat' value='Y' name='r_admin' > <label>Grup Admin</label> |
| 217 | 217 | <?php |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | <?php if ($id) { |
| 238 | 238 | ?> |
| 239 | 239 | |
| 240 | - <?php if (@$data->aktif == 'Y') { |
|
| 240 | + <?php if (@$data->aktif=='Y') { |
|
| 241 | 241 | ?> |
| 242 | 242 | |
| 243 | 243 | <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Aktif :</label> |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | if ($id) { |
| 46 | 46 | $query = mysql_query('SELECT * FROM kunjungan_berobat WHERE id_kunjungan_berobat = "'.$id.'"'); |
| 47 | - if ($query && mysql_num_rows($query) == 1) { |
|
| 47 | + if ($query && mysql_num_rows($query)==1) { |
|
| 48 | 48 | $data = mysql_fetch_object($query); |
| 49 | 49 | } else { |
| 50 | 50 | die('Data modul tidak ditemukan'); |
@@ -92,12 +92,12 @@ discard block |
||
| 92 | 92 | <option>--Pilih Pasien--</option> |
| 93 | 93 | <?php |
| 94 | 94 | $query = mysql_query('SELECT * FROM pasien ORDER BY nama'); |
| 95 | - if ($query && mysql_num_rows($query) > 0) { |
|
| 95 | + if ($query && mysql_num_rows($query)>0) { |
|
| 96 | 96 | while ($row = mysql_fetch_object($query)) { |
| 97 | 97 | $pasien = $row->ktp.'-'.$row->nama; |
| 98 | 98 | |
| 99 | 99 | echo '<option value="'.$row->id_pasien.'"'; |
| 100 | - if ($row->id_pasien == @$data->id_pasien) { |
|
| 100 | + if ($row->id_pasien==@$data->id_pasien) { |
|
| 101 | 101 | echo ' selected'; |
| 102 | 102 | } |
| 103 | 103 | echo '>'.$pasien.'</option>'; |
@@ -113,10 +113,10 @@ discard block |
||
| 113 | 113 | <option>--Pilih Poliklinik --</option> |
| 114 | 114 | <?php |
| 115 | 115 | $query = mysql_query('SELECT * FROM poli ORDER BY poli'); |
| 116 | - if ($query && mysql_num_rows($query) > 0) { |
|
| 116 | + if ($query && mysql_num_rows($query)>0) { |
|
| 117 | 117 | while ($row = mysql_fetch_object($query)) { |
| 118 | 118 | echo '<option value="'.$row->id_poli.'"'; |
| 119 | - if ($row->id_poli == @$data->id_poli) { |
|
| 119 | + if ($row->id_poli==@$data->id_poli) { |
|
| 120 | 120 | echo ' selected'; |
| 121 | 121 | } |
| 122 | 122 | echo '>'.$row->poli.'</option>'; |