PNG  IHDR* pHYs+ IDATx]n#; cdLb Ǚ[at¤_:uP}>!Usă cag޿ ֵNu`ݼTâabO7uL&y^wFٝA"l[|ŲHLN밪4*sG3|Dv}?+y߉{OuOAt4Jj.u]Gz*҉sP'VQKbA1u\`& Af;HWj hsO;ogTu uj7S3/QzUr&wS`M$X_L7r2;aE+ώ%vikDA:dR+%KzƉo>eOth$z%: :{WwaQ:wz%4foɹE[9<]#ERINƻv溂E%P1i01 |Jvҗ&{b?9g=^wζXn/lK::90KwrюO\!ջ3uzuGv^;騢wq<Iatv09:tt~hEG`v;3@MNZD.1]L:{ծI3`L(÷ba")Y.iljCɄae#I"1 `3*Bdz>j<fU40⨬%O$3cGt]j%Fߠ_twJ;ABU8vP3uEԑwQ V:h%))LfraqX-ۿX]v-\9I gl8tzX ]ecm)-cgʒ#Uw=Wlێn(0hPP/ӨtQ“&J35 $=]r1{tLuǮ*i0_;NƝ8;-vݏr8+U-kruȕYr0RnC]*ެ(M:]gE;{]tg(#ZJ9y>utRDRMdr9㪩̞zֹb<ģ&wzJM"iI( .ꮅX)Qw:9,i좜\Ԛi7&N0:asϓc];=ΗOӣ APqz93 y $)A*kVHZwBƺnWNaby>XMN*45~ղM6Nvm;A=jֲ.~1}(9`KJ/V F9[=`~[;sRuk]rєT!)iQO)Y$V ی ۤmzWz5IM Zb )ˆC`6 rRa}qNmUfDsWuˤV{ Pݝ'=Kֳbg,UҘVz2ﴻnjNgBb{? ߮tcsͻQuxVCIY۠:(V뺕 ٥2;t`@Fo{Z9`;]wMzU~%UA蛚dI vGq\r82iu +St`cR.6U/M9IENDB`starting = $this->ending = 43; $this->keys = array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','-','.',' ','$','/','+','%','*'); $this->code = array( // 0 added to add an extra space '0001101000', /* 0 */ '1001000010', /* 1 */ '0011000010', /* 2 */ '1011000000', /* 3 */ '0001100010', /* 4 */ '1001100000', /* 5 */ '0011100000', /* 6 */ '0001001010', /* 7 */ '1001001000', /* 8 */ '0011001000', /* 9 */ '1000010010', /* A */ '0010010010', /* B */ '1010010000', /* C */ '0000110010', /* D */ '1000110000', /* E */ '0010110000', /* F */ '0000011010', /* G */ '1000011000', /* H */ '0010011000', /* I */ '0000111000', /* J */ '1000000110', /* K */ '0010000110', /* L */ '1010000100', /* M */ '0000100110', /* N */ '1000100100', /* O */ '0010100100', /* P */ '0000001110', /* Q */ '1000001100', /* R */ '0010001100', /* S */ '0000101100', /* T */ '1100000010', /* U */ '0110000010', /* V */ '1110000000', /* W */ '0100100010', /* X */ '1100100000', /* Y */ '0110100000', /* Z */ '0100001010', /* - */ '1100001000', /* . */ '0110001000', /* */ '0101010000', /* $ */ '0101000100', /* / */ '0100010100', /* + */ '0001010100', /* % */ '0100101000' /* * */ ); $this->setText($text); $this->textfont = $textfont; $this->checksum = $checksum; } /** * Saves Text * * @param string $text */ public function setText($text) { $this->text = strtoupper($text); // Only Capital Letters are Allowed } /** * Draws the barcode * * @param ressource $im */ public function draw($im) { $error_stop = false; // Checking if all chars are allowed for($i=0;$itext);$i++) { if(!is_int(array_search($this->text[$i],$this->keys))) { $this->DrawError($im,'Char \''.$this->text[$i].'\' not allowed.'); $error_stop = true; } } if($error_stop == false) { // The * is not allowed if(is_int(strpos($this->text,'*'))) { $this->DrawError($im,'Char \'*\' not allowed.'); $error_stop = true; } if($error_stop == false) { // Starting * $this->DrawChar($im,$this->code[$this->starting],1); // Chars for($i=0;$itext);$i++) $this->DrawChar($im,$this->findCode($this->text[$i]),1); // Checksum (rarely used) if($this->checksum == true) { $checksum = 0; for($i=0;$itext);$i++) $checksum += $this->findIndex($this->text[$i]); $this->DrawChar($im,$this->code[$checksum % 43],1); } // Ending * $this->DrawChar($im,$this->code[$this->ending],1); $this->lastX = $this->positionX; $this->lastY = $this->maxHeight; $this->DrawText($im); } } } }; ?>