@@ -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 | } |
@@ -20,7 +20,7 @@ |
||
20 | 20 | <script type="text/javascript" src="../unit_test.js"></script> |
21 | 21 | <?php |
22 | 22 | $aScripts = explode(':', $_GET['scripts']); |
23 | - for ($i = 0; $i < count($aScripts); $i++) { |
|
23 | + for ($i = 0; $i<count($aScripts); $i++) { |
|
24 | 24 | echo '<script type="text/javascript" src="../'.$aScripts[$i].'?rand='.rand().'"></script>'."\n"; |
25 | 25 | } |
26 | 26 | ?> |
@@ -20,7 +20,7 @@ |
||
20 | 20 | <script type="text/javascript" src="../unit_test.js"></script> |
21 | 21 | <?php |
22 | 22 | $aScripts = explode(':', $_GET['scripts']); |
23 | - for ($i = 0; $i < count($aScripts); $i++) { |
|
23 | + for ($i = 0; $i<count($aScripts); $i++) { |
|
24 | 24 | echo '<script type="text/javascript" src="../'.$aScripts[$i].'?rand='.rand().'"></script>'."\n"; |
25 | 25 | } |
26 | 26 | ?> |
@@ -82,7 +82,7 @@ |
||
82 | 82 | </script> |
83 | 83 | <?php |
84 | 84 | $aScripts = explode(':', $_GET['scripts']); |
85 | - for ($i = 0; $i < count($aScripts); $i++) { |
|
85 | + for ($i = 0; $i<count($aScripts); $i++) { |
|
86 | 86 | echo '<script type="text/javascript" src="../'.$aScripts[$i].'?rand='.rand().'"></script>'."\n"; |
87 | 87 | } |
88 | 88 | ?> |
@@ -20,7 +20,7 @@ |
||
20 | 20 | <script type="text/javascript" src="../unit_test.js"></script> |
21 | 21 | <?php |
22 | 22 | $aScripts = explode(':', $_GET['scripts']); |
23 | - for ($i = 0; $i < count($aScripts); $i++) { |
|
23 | + for ($i = 0; $i<count($aScripts); $i++) { |
|
24 | 24 | echo '<script type="text/javascript" src="../'.$aScripts[$i].'?rand='.rand().'"></script>'."\n"; |
25 | 25 | } |
26 | 26 | ?> |
@@ -82,7 +82,7 @@ |
||
82 | 82 | </script> |
83 | 83 | <?php |
84 | 84 | $aScripts = explode(':', $_GET['scripts']); |
85 | - for ($i = 0; $i < count($aScripts); $i++) { |
|
85 | + for ($i = 0; $i<count($aScripts); $i++) { |
|
86 | 86 | echo '<script type="text/javascript" src="../'.$aScripts[$i].'?rand='.rand().'"></script>'."\n"; |
87 | 87 | } |
88 | 88 | ?> |
@@ -20,7 +20,7 @@ |
||
20 | 20 | <script type="text/javascript" src="../unit_test.js"></script> |
21 | 21 | <?php |
22 | 22 | $aScripts = explode(':', $_GET['scripts']); |
23 | - for ($i = 0; $i < count($aScripts); $i++) { |
|
23 | + for ($i = 0; $i<count($aScripts); $i++) { |
|
24 | 24 | echo '<script type="text/javascript" src="../'.$aScripts[$i].'?rand='.rand().'"></script>'."\n"; |
25 | 25 | } |
26 | 26 | ?> |
@@ -20,7 +20,7 @@ |
||
20 | 20 | <script type="text/javascript" src="../unit_test.js"></script> |
21 | 21 | <?php |
22 | 22 | $aScripts = explode(':', $_GET['scripts']); |
23 | - for ($i = 0; $i < count($aScripts); $i++) { |
|
23 | + for ($i = 0; $i<count($aScripts); $i++) { |
|
24 | 24 | echo '<script type="text/javascript" src="../'.$aScripts[$i].'?rand='.rand().'"></script>'."\n"; |
25 | 25 | } |
26 | 26 | ?> |
@@ -20,7 +20,7 @@ |
||
20 | 20 | <script type="text/javascript" src="../unit_test.js"></script> |
21 | 21 | <?php |
22 | 22 | $aScripts = explode(':', $_GET['scripts']); |
23 | - for ($i = 0; $i < count($aScripts); $i++) { |
|
23 | + for ($i = 0; $i<count($aScripts); $i++) { |
|
24 | 24 | echo '<script type="text/javascript" src="../'.$aScripts[$i].'?rand='.rand().'"></script>'."\n"; |
25 | 25 | } |
26 | 26 | ?> |