@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | { |
4 | 4 | echo "<select name=$var>"; |
5 | 5 | echo "<option value=0 selected>$default</option>"; |
6 | - for ($i = $awal; $i <= $akhir; $i++) { |
|
6 | + for ($i = $awal; $i<=$akhir; $i++) { |
|
7 | 7 | echo "<option value=$i>$i</option>"; |
8 | 8 | } |
9 | 9 | echo '</select> '; |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | include '../config/library.php'; |
15 | 15 | echo "<select name=$var>"; |
16 | 16 | echo "<option value=0 selected>$default</option>"; |
17 | - for ($bln = $awal; $bln <= $akhir; $bln++) { |
|
17 | + for ($bln = $awal; $bln<=$akhir; $bln++) { |
|
18 | 18 | echo "<option value=$bln>$nama_bln[$bln]</option>"; |
19 | 19 | } |
20 | 20 | echo '</select> '; |
@@ -23,8 +23,8 @@ discard block |
||
23 | 23 | function combotgl2($awal, $akhir, $var, $terpilih) |
24 | 24 | { |
25 | 25 | echo "<select name=$var class='tselect_tgl'>"; |
26 | - for ($i = $awal; $i <= $akhir; $i++) { |
|
27 | - if ($i == $terpilih) { |
|
26 | + for ($i = $awal; $i<=$akhir; $i++) { |
|
27 | + if ($i==$terpilih) { |
|
28 | 28 | echo "<option value=$i selected>$i</option>"; |
29 | 29 | } else { |
30 | 30 | echo "<option value=$i>$i</option>"; |
@@ -37,8 +37,8 @@ discard block |
||
37 | 37 | { |
38 | 38 | include '../config/library.php'; |
39 | 39 | echo "<select name=$var class='tselect_bln'>"; |
40 | - for ($bln = $awal; $bln <= $akhir; $bln++) { |
|
41 | - if ($bln == $terpilih) { |
|
40 | + for ($bln = $awal; $bln<=$akhir; $bln++) { |
|
41 | + if ($bln==$terpilih) { |
|
42 | 42 | echo "<option value=$bln selected>$nama_bln[$bln]</option>"; |
43 | 43 | } else { |
44 | 44 | echo "<option value=$bln>$nama_bln[$bln]</option>"; |
@@ -50,8 +50,8 @@ discard block |
||
50 | 50 | function combothn($awal, $akhir, $var, $terpilih) |
51 | 51 | { |
52 | 52 | echo "<select name=$var class='tselect_thn'>"; |
53 | - for ($i = $awal; $i <= $akhir; $i++) { |
|
54 | - if ($i == $terpilih) { |
|
53 | + for ($i = $awal; $i<=$akhir; $i++) { |
|
54 | + if ($i==$terpilih) { |
|
55 | 55 | echo "<option value=$i selected>$i</option>"; |
56 | 56 | } else { |
57 | 57 | echo "<option value=$i>$i</option>"; |
@@ -84,28 +84,28 @@ |
||
84 | 84 | } |
85 | 85 | |
86 | 86 | switch ($size[2]) { |
87 | - case 1: //GIF |
|
87 | + case 1: //GIF |
|
88 | 88 | $src = imagecreatefromgif($srcFile); |
89 | - break; |
|
90 | - case 2: //JPEG |
|
89 | + break; |
|
90 | + case 2: //JPEG |
|
91 | 91 | $src = imagecreatefromjpeg($srcFile); |
92 | - break; |
|
93 | - case 3: //PNG |
|
92 | + break; |
|
93 | + case 3: //PNG |
|
94 | 94 | $src = imagecreatefrompng($srcFile); |
95 | - break; |
|
96 | - default: |
|
95 | + break; |
|
96 | + default: |
|
97 | 97 | return false; |
98 | - break; |
|
98 | + break; |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | imagecopyresampled($dest, $src, 0, 0, 0, 0, $w, $h, $size[0], $size[1]); |
102 | 102 | |
103 | 103 | switch ($size[2]) { |
104 | - case 1: |
|
104 | + case 1: |
|
105 | 105 | case 2: |
106 | 106 | imagejpeg($dest, $destFile, $quality); |
107 | - break; |
|
108 | - case 3: |
|
107 | + break; |
|
108 | + case 3: |
|
109 | 109 | imagepng($dest, $destFile); |
110 | 110 | } |
111 | 111 |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | $thumbnailPath = ''; |
14 | 14 | |
15 | 15 | // if a file is given |
16 | - if (trim($image['tmp_name']) != '') { |
|
16 | + if (trim($image['tmp_name'])!='') { |
|
17 | 17 | $ext = substr(strrchr($image['name'], '.'), 1); |
18 | 18 | |
19 | 19 | // generate a random new file name to avoid name conflict |
@@ -72,11 +72,11 @@ discard block |
||
72 | 72 | $tmpDest = pathinfo(strtolower($destFile)); |
73 | 73 | $size = getimagesize($srcFile); |
74 | 74 | |
75 | - if ($tmpDest['extension'] == 'gif' || $tmpDest['extension'] == 'jpg') { |
|
75 | + if ($tmpDest['extension']=='gif' || $tmpDest['extension']=='jpg') { |
|
76 | 76 | $destFile = substr_replace($destFile, 'jpg', -3); |
77 | 77 | $dest = imagecreatetruecolor($w, $h); |
78 | 78 | //imageantialias($dest, TRUE); |
79 | - } elseif ($tmpDest['extension'] == 'png') { |
|
79 | + } elseif ($tmpDest['extension']=='png') { |
|
80 | 80 | $dest = imagecreatetruecolor($w, $h); |
81 | 81 | //imageantialias($dest, TRUE); |
82 | 82 | } else { |
@@ -40,7 +40,7 @@ |
||
40 | 40 | $onChar = 1; |
41 | 41 | for ($x = 0; $x < strlen($text); $x++) { // GO THRU TEXT GET LETTERS |
42 | 42 | if (!(($pos = strpos($char128asc, $text[$x])) === false)) { // SKIP NOT FOUND CHARS |
43 | - $w .= $char128wid[$pos]; |
|
43 | + $w .= $char128wid[$pos]; |
|
44 | 44 | $sum += $onChar++ * $pos; |
45 | 45 | } |
46 | 46 | } |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | </style> |
18 | 18 | |
19 | 19 | <?php |
20 | -global $char128asc,$char128charWidth; |
|
20 | +global $char128asc, $char128charWidth; |
|
21 | 21 | $char128asc = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
22 | 22 | $char128wid = [ |
23 | 23 | '212222', '222122', '222221', '121223', '121322', '131222', '122213', '122312', '132212', '221213', // 0-9 |
@@ -30,24 +30,24 @@ discard block |
||
30 | 30 | '112412', '122114', '122411', '142112', '142211', '241211', '221114', '413111', '241112', '134111', // 70-79 |
31 | 31 | '111242', '121142', '121241', '114212', '124112', '124211', '411212', '421112', '421211', '212141', // 80-89 |
32 | 32 | '214121', '412121', '111143', '111341', '131141', '114113', '114311', '411113', '411311', '113141', // 90-99 |
33 | - '114131', '311141', '411131', '211412', '211214', '211232', '23311120', ]; // 100-106 |
|
33 | + '114131', '311141', '411131', '211412', '211214', '211232', '23311120', ]; // 100-106 |
|
34 | 34 | |
35 | 35 | ////Define Function |
36 | 36 | function bar128($text) |
37 | 37 | { // Part 1, make list of widths |
38 | - global $char128asc,$char128wid; |
|
39 | - $w = $char128wid[$sum = 104]; // START symbol |
|
38 | + global $char128asc, $char128wid; |
|
39 | + $w = $char128wid[$sum = 104]; // START symbol |
|
40 | 40 | $onChar = 1; |
41 | - for ($x = 0; $x < strlen($text); $x++) { // GO THRU TEXT GET LETTERS |
|
42 | - if (!(($pos = strpos($char128asc, $text[$x])) === false)) { // SKIP NOT FOUND CHARS |
|
41 | + for ($x = 0; $x<strlen($text); $x++) { // GO THRU TEXT GET LETTERS |
|
42 | + if (!(($pos = strpos($char128asc, $text[$x]))===false)) { // SKIP NOT FOUND CHARS |
|
43 | 43 | $w .= $char128wid[$pos]; |
44 | 44 | $sum += $onChar++ * $pos; |
45 | 45 | } |
46 | 46 | } |
47 | - $w .= $char128wid[$sum % 103].$char128wid[106]; //Check Code, then END |
|
47 | + $w .= $char128wid[$sum % 103].$char128wid[106]; //Check Code, then END |
|
48 | 48 | //Part 2, Write rows |
49 | 49 | $html = '<table cellpadding=0 cellspacing=0><tr>'; |
50 | - for ($x = 0; $x < strlen($w); $x += 2) { // code 128 widths: black border, then white space |
|
50 | + for ($x = 0; $x<strlen($w); $x += 2) { // code 128 widths: black border, then white space |
|
51 | 51 | $html .= "<td><div class=\"b128\" style=\"border-left-width:{$w[$x]};width:{$w[$x + 1]}\"></div>"; |
52 | 52 | } |
53 | 53 |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | </style> |
18 | 18 | |
19 | 19 | <?php |
20 | -global $char128asc,$char128charWidth; |
|
20 | +global $char128asc, $char128charWidth; |
|
21 | 21 | $char128asc = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
22 | 22 | $char128wid = [ |
23 | 23 | '212222', '222122', '222221', '121223', '121322', '131222', '122213', '122312', '132212', '221213', // 0-9 |
@@ -30,24 +30,24 @@ discard block |
||
30 | 30 | '112412', '122114', '122411', '142112', '142211', '241211', '221114', '413111', '241112', '134111', // 70-79 |
31 | 31 | '111242', '121142', '121241', '114212', '124112', '124211', '411212', '421112', '421211', '212141', // 80-89 |
32 | 32 | '214121', '412121', '111143', '111341', '131141', '114113', '114311', '411113', '411311', '113141', // 90-99 |
33 | - '114131', '311141', '411131', '211412', '211214', '211232', '23311120', ]; // 100-106 |
|
33 | + '114131', '311141', '411131', '211412', '211214', '211232', '23311120', ]; // 100-106 |
|
34 | 34 | |
35 | 35 | ////Define Function |
36 | 36 | function bar128($text) |
37 | 37 | { // Part 1, make list of widths |
38 | - global $char128asc,$char128wid; |
|
39 | - $w = $char128wid[$sum = 104]; // START symbol |
|
38 | + global $char128asc, $char128wid; |
|
39 | + $w = $char128wid[$sum = 104]; // START symbol |
|
40 | 40 | $onChar = 1; |
41 | - for ($x = 0; $x < strlen($text); $x++) { // GO THRU TEXT GET LETTERS |
|
42 | - if (!(($pos = strpos($char128asc, $text[$x])) === false)) { // SKIP NOT FOUND CHARS |
|
41 | + for ($x = 0; $x<strlen($text); $x++) { // GO THRU TEXT GET LETTERS |
|
42 | + if (!(($pos = strpos($char128asc, $text[$x]))===false)) { // SKIP NOT FOUND CHARS |
|
43 | 43 | $w .= $char128wid[$pos]; |
44 | 44 | $sum += $onChar++ * $pos; |
45 | 45 | } |
46 | 46 | } |
47 | - $w .= $char128wid[$sum % 103].$char128wid[106]; //Check Code, then END |
|
47 | + $w .= $char128wid[$sum % 103].$char128wid[106]; //Check Code, then END |
|
48 | 48 | //Part 2, Write rows |
49 | 49 | $html = '<table cellpadding=0 cellspacing=0><tr>'; |
50 | - for ($x = 0; $x < strlen($w); $x += 2) { // code 128 widths: black border, then white space |
|
50 | + for ($x = 0; $x<strlen($w); $x += 2) { // code 128 widths: black border, then white space |
|
51 | 51 | $html .= "<td><div class=\"b128\" style=\"border-left-width:{$w[$x]};width:{$w[$x + 1]}\"></div>"; |
52 | 52 | } |
53 | 53 |
@@ -40,7 +40,7 @@ |
||
40 | 40 | $onChar = 1; |
41 | 41 | for ($x = 0; $x < strlen($text); $x++) { // GO THRU TEXT GET LETTERS |
42 | 42 | if (!(($pos = strpos($char128asc, $text[$x])) === false)) { // SKIP NOT FOUND CHARS |
43 | - $w .= $char128wid[$pos]; |
|
43 | + $w .= $char128wid[$pos]; |
|
44 | 44 | $sum += $onChar++ * $pos; |
45 | 45 | } |
46 | 46 | } |
@@ -387,7 +387,7 @@ |
||
387 | 387 | |
388 | 388 | $tgl_lahir = date('d/m/Y', strtotime($r[tgl_lahir])); |
389 | 389 | |
390 | -if ($r['gender'] == 'L') { |
|
390 | +if ($r['gender']=='L') { |
|
391 | 391 | $gender = 'Laki-laki'; |
392 | 392 | } else { |
393 | 393 | $gender = 'Perempuan'; |
@@ -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> |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | <tr> |
324 | 324 | |
325 | 325 | <?php |
326 | - for ($j = 1; $j <= $hjml; $j++) { |
|
326 | + for ($j = 1; $j<=$hjml; $j++) { |
|
327 | 327 | echo '<th>JML</th>'; |
328 | 328 | echo '<th>RUPIAH</th>'; |
329 | 329 | } |
@@ -348,12 +348,12 @@ discard block |
||
348 | 348 | |
349 | 349 | <tbody> |
350 | 350 | |
351 | - <?php for ($i = 1; $i <= 31; $i++) { |
|
351 | + <?php for ($i = 1; $i<=31; $i++) { |
|
352 | 352 | echo'<tr>'; |
353 | 353 | |
354 | 354 | echo"<td style='text-align:center;'>$i</td>"; |
355 | 355 | |
356 | - if (strlen($i) == '1') { |
|
356 | + if (strlen($i)=='1') { |
|
357 | 357 | $tgl = $prd.'-0'.$i; |
358 | 358 | } else { |
359 | 359 | $tgl = $prd.'-'.$i; |
@@ -602,7 +602,7 @@ discard block |
||
602 | 602 | |
603 | 603 | $month = date('m', strtotime($iprd)) * 1; |
604 | 604 | |
605 | - if ($month == '1') { |
|
605 | + if ($month=='1') { |
|
606 | 606 | $imonth = 12; |
607 | 607 | } else { |
608 | 608 | $imonth = $month - 1; |
@@ -15,12 +15,12 @@ discard block |
||
15 | 15 | $datetime = date('Y-m-d G:i:s', $hour); |
16 | 16 | $userid = $_SESSION['userid']; |
17 | 17 | |
18 | - if ($module == 'approval_diskon_penjualan_barang' and $act == 'approve') { |
|
18 | + if ($module=='approval_diskon_penjualan_barang' and $act=='approve') { |
|
19 | 19 | $id_module = $_POST['id_module']; |
20 | 20 | |
21 | 21 | $jum = $_POST['jum'] - 1; |
22 | 22 | |
23 | - for ($i = 1; $i <= $jum; $i++) { |
|
23 | + for ($i = 1; $i<=$jum; $i++) { |
|
24 | 24 | $id = $_POST['id'.$i]; |
25 | 25 | $p_status = $_POST['p_status'.$i]; |
26 | 26 | $status = $_POST['status'.$i]; |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | $notrans = $_POST['notrans'.$i]; |
31 | 31 | $outlet = $_POST['outlet'.$i]; |
32 | 32 | |
33 | - if ($p_status == '1') { |
|
33 | + if ($p_status=='1') { |
|
34 | 34 | mysql_query("UPDATE penjualan_barang_detail |
35 | 35 | SET disc = disc1 |
36 | 36 | , disc_value = disc_value1 |
@@ -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> |