Lines Matching +full:g +full:- +full:guard

8 // Begin       : 2008-06-09
9 // Last Update : 2014-10-20
10 // Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
11 // License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
12 // -------------------------------------------------------------------
13 // Copyright (C) 2008-2014 Nicola Asuni - Tecnick.com LTD
31 // -------------------------------------------------------------------
74- ANSI MH10.8M-1983 - USD-3 - 3 of 9.</li><li>C39+ : CODE 39 with checksum</li><li>C39E : CODE 39 …
78 $this->setBarcode($code, $type);
87 return $this->barcode_array;
93- ANSI MH10.8M-1983 - USD-3 - 3 of 9.</li><li>C39+ : CODE 39 with checksum</li><li>C39E : CODE 39 …
99 case 'C39': { // CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9.
100 $arrcode = $this->barcode_code39($code, false, false);
104 $arrcode = $this->barcode_code39($code, false, true);
108 $arrcode = $this->barcode_code39($code, true, false);
112 $arrcode = $this->barcode_code39($code, true, true);
115 case 'C93': { // CODE 93 - USS-93
116 $arrcode = $this->barcode_code93($code);
120 $arrcode = $this->barcode_s25($code, false);
124 $arrcode = $this->barcode_s25($code, true);
128 $arrcode = $this->barcode_i25($code, false);
132 $arrcode = $this->barcode_i25($code, true);
136 $arrcode = $this->barcode_c128($code, '');
140 $arrcode = $this->barcode_c128($code, 'A');
144 $arrcode = $this->barcode_c128($code, 'B');
148 $arrcode = $this->barcode_c128($code, 'C');
151 case 'EAN2': { // 2-Digits UPC-Based Extension
152 $arrcode = $this->barcode_eanext($code, 2);
155 case 'EAN5': { // 5-Digits UPC-Based Extension
156 $arrcode = $this->barcode_eanext($code, 5);
160 $arrcode = $this->barcode_eanupc($code, 8);
164 $arrcode = $this->barcode_eanupc($code, 13);
167 case 'UPCA': { // UPC-A
168 $arrcode = $this->barcode_eanupc($code, 12);
171 case 'UPCE': { // UPC-E
172 $arrcode = $this->barcode_eanupc($code, 6);
176 $arrcode = $this->barcode_msi($code, false);
180 $arrcode = $this->barcode_msi($code, true);
184 $arrcode = $this->barcode_postnet($code, false);
188 $arrcode = $this->barcode_postnet($code, true);
191 case 'RMS4CC': { // RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code)
192 $arrcode = $this->barcode_rms4cc($code, false);
195 case 'KIX': { // KIX (Klant index - Customer index)
196 $arrcode = $this->barcode_rms4cc($code, true);
199 case 'IMB': { // IMB - Intelligent Mail Barcode - Onecode - USPS-B-3200
200 $arrcode = $this->barcode_imb($code);
203 case 'IMBPRE': { // IMB - Intelligent Mail Barcode - Onecode - USPS-B-3200- pre-processed
204 $arrcode = $this->barcode_imb_pre($code);
208 $arrcode = $this->barcode_codabar($code);
212 $arrcode = $this->barcode_code11($code);
216 $arrcode = $this->barcode_pharmacode($code);
219 case 'PHARMA2T': { // PHARMACODE TWO-TRACKS
220 $arrcode = $this->barcode_pharmacode2t($code);
224 $this->barcode_array = false;
229 $this->barcode_array = $arrcode;
233 * CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9.
234 * General-purpose code in very wide use world-wide
258 $chr['G'] = '111113313';
278 $chr['-'] = '131111313';
289 $code = $this->encode_code39_ext($code);
296 $code .= $this->checksum_code39($code);
337 chr(4) => '$D', chr(5) => '$E', chr(6) => '$F', chr(7) => '$G',
345 chr(36) => '/D', chr(37) => '/E', chr(38) => '/F', chr(39) => '/G',
347 chr(44) => '/L', chr(45) => '-', chr(46) => '.', chr(47) => '/O',
351 chr(60) => '%G', chr(61) => '%H', chr(62) => '%I', chr(63) => '%J',
353 chr(68) => 'D', chr(69) => 'E', chr(70) => 'F', chr(71) => 'G',
361 chr(100) => '+D', chr(101) => '+E', chr(102) => '+F', chr(103) => '+G',
388 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K',
390 'W', 'X', 'Y', 'Z', '-', '.', ' ', '$', '/', '+', '%');
402 * CODE 93 - USS-93
425 $chr[71] = '112113'; // G
445 $chr[45] = '121131'; // -
456 $chr[42] = '111141'; // start-stop
460 chr(4) => chr(128).'D', chr(5) => chr(128).'E', chr(6) => chr(128).'F', chr(7) => chr(128).'G',
468 …chr(36) => chr(129).'D', chr(37) => chr(129).'E', chr(38) => chr(129).'F', chr(39) => chr(129).'G',
470 chr(44) => chr(129).'L', chr(45) => '-', chr(46) => '.', chr(47) => chr(129).'O',
474 …chr(60) => chr(131).'G', chr(61) => chr(131).'H', chr(62) => chr(131).'I', chr(63) => chr(131).'J',
476 chr(68) => 'D', chr(69) => 'E', chr(70) => 'F', chr(71) => 'G',
484 …100) => chr(130).'D', chr(101) => chr(130).'E', chr(102) => chr(130).'F', chr(103) => chr(130).'G',
500 $code_ext .= $this->checksum_code93($code_ext);
539 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K',
541 'W', 'X', 'Y', 'Z', '-', '.', ' ', '$', '/', '+', '%',
549 for ($i = ($len - 1); $i >= 0; --$i) {
563 for ($i = $len; $i >= 0; --$i) {
597 $r = (10 - $r);
633 for ($i = ($clen - 1); $i >= 0; --$i) {
642 $check = 11 - $check;
646 $seq = '110'; // left guard
656 $seq .= '1001'; // right guard
658 return $this->binseq_to_array($seq, $bararray);
683 $code .= $this->checksum_s25($code);
686 // add leading zero if code-length is odd
701 return $this->binseq_to_array($seq, $bararray);
718 if (($i == ($len - 1)) OR (($i < ($len - 1)) AND ($seq[$i] != $seq[($i+1)]))) {
757 $code .= $this->checksum_s25($code);
760 // add leading zero if code-length is odd
776 // create a bar-space sequence
800 * Very capable code, excellent density, high reliability; in very wide use world-wide
917 // ASCII characters for code A (ASCII 00 - 95)
918 $keys_a = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_';
923 // ASCII characters for code B (ASCII 32 - 127)
924 …$keys_b = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrst…
968 --$len;
976 if (preg_match('/([0-9]{2})/', $chrnum) > 0) {
989 preg_match_all('/([0-9]{4,})/', $code, $numseq, PREG_OFFSET_CAPTURE);
996 …$sequence = array_merge($sequence, $this->get128ABsequence(substr($code, $end_offset, ($offset - $…
1002 --$slen;
1008 $sequence = array_merge($sequence, $this->get128ABsequence(substr($code, $end_offset)));
1012 $sequence = array_merge($sequence, $this->get128ABsequence($code));
1020 } elseif ($sequence[($key - 1)][0] != 'A') {
1021 … (($seq[2] == 1) AND ($key > 0) AND ($sequence[($key - 1)][0] == 'B') AND (!isset($sequence[($key
1026 } elseif (!isset($sequence[($key - 1)][3])) {
1063 } elseif ($sequence[($key - 1)][0] != 'B') {
1064 … (($seq[2] == 1) AND ($key > 0) AND ($sequence[($key - 1)][0] == 'A') AND (!isset($sequence[($key
1069 } elseif (!isset($sequence[($key - 1)][3])) {
1087 } elseif ($sequence[($key - 1)][0] != 'C') {
1141 preg_match_all('/([\0-\31])/', $code, $numseq, PREG_OFFSET_CAPTURE);
1148 …$sequence[] = array('B', substr($code, $end_offset, ($offset - $end_offset)), ($offset - $end_offs…
1156 $sequence[] = array('B', substr($code, $end_offset), ($len - $end_offset));
1166 * EAN13 and UPC-A barcodes.
1168 * UPC-A: Universal product code seen on almost all retail products in the USA and Canada
1169 * UPC-E: Short version of UPC symbol
1171 * @param $len (string) barcode type: 6 = UPC-E, 8 = EAN8, 13 = EAN13, 12 = UPC-A
1178 $len = 12; // UPC-A
1179 $upce = true; // UPC-E mode
1181 $data_len = $len - 1;
1202 $r = (10 - $r);
1212 // UPC-A
1217 // convert UPC-A to UPC-E
1313 $seq = '101'; // left guard bar
1320 $seq .= '010101'; // right guard bar
1331 $seq .= $codes[$p[$i-1]][$code[$i]];
1334 $seq .= '01010'; // center guard bar
1338 $seq .= '101'; // right guard bar
1344 if (($i == ($clen - 1)) OR (($i < ($clen - 1)) AND ($seq[$i] != $seq[($i+1)]))) {
1360 * UPC-Based Extensions
1361 * 2-Digit Ext.: Used to indicate magazines and newspaper issue numbers
1362 * 5-Digit Ext.: Used to mark suggested retail price of books
1364 * @param $len (string) barcode type: 2 = 2-Digit, 5 = 5-Digit
1425 $seq = '1011'; // left guard bar
1432 return $this->binseq_to_array($seq, $bararray);
1438 …ing) zip code to represent. Must be a string containing a zip code of the form DDDDD or DDDDD-DDDD.
1474 $code = str_replace('-', '', $code);
1484 $chkd = (10 - $chkd);
1508 * RMS4CC - CBC - KIX
1509 …* RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code) - KIX (Klant index - Custome…
1512 …the KIX variation (doesn't use the start and end symbols, and the checksum) - in this case the hou…
1540 'G' => array(4,1,2,3),
1583 'G' => array(3,5),
1679 '-' => '11122111',
1735 '-' => '112111',
1746 for ($i = ($len - 1); $i >= 0; --$i) {
1748 if ($digit == '-') {
1761 $check = '-';
1768 for ($i = $len; $i >= 0; --$i) {
1770 if ($digit == '-') {
1820 $code -= 2;
1823 $code -= 1;
1827 $seq = substr($seq, 0, -2);
1830 return $this->binseq_to_array($seq, $bararray);
1834 * Pharmacode two-track
1847 $code = ($code - 3) / 3;
1852 $code = ($code - 1) / 3;
1857 $code = ($code - 2) / 3;
1888 unset($bararray['bcode'][($k - 1)]);
1889 --$bararray['maxw'];
1894 * IMB - Intelligent Mail Barcode - Onecode - USPS-B-3200
1896 * Intelligent Mail barcode is a 65-bar code for use on mail in the United States.
1897-digit value shall correspond to a particular mail class with a particular combination of service(…
1898 …P (routing code) from the rest using a minus char '-' (BarcodeID_ServiceTypeID_MailerID_SerialNumb…
1907 $code_arr = explode('-', $code);
1943 $binary_code = $this->dec_to_hex($binary_code);
1948 $binary_code_arr = substr($binary_code_arr, 0, -1);
1951 $fcs = $this->imb_crc11fcs($binary_code_arr);
1957 $data = $this->hex_to_dec($binary_code_102bit);
1969 $table2of13 = $this->imb_tables(2, 78);
1970 $table5of13 = $this->imb_tables(5, 1287);
1978 $chrcode = $table2of13[($val - 1287)];
2015 unset($bararray['bcode'][($k - 1)]);
2016 --$bararray['maxw'];
2021 * IMB - Intelligent Mail Barcode - Onecode - USPS-B-3200
2023 * @param $code (string) pre-formatted IMB barcode (65 chars "FADT")
2066 unset($bararray['bcode'][($k - 1)]);
2067 --$bararray['maxw'];
2105 for($pos = ($len - 1); $pos >= 0; --$pos) {
2174 $lui = $size - 1; // LUT upper index
2182 $reverse = ($this->imb_reverse_us($count) >> 3);
2189 --$lui;