function pBarcode128::pBarcode128 in Visitors 7
Same name and namespace in other branches
- 7.2 pChart/class/pBarcode128.class.php \pBarcode128::pBarcode128()
File
- pChart/
class/ pBarcode128.class.php, line 26
Class
Code
function pBarcode128($BasePath = "") {
$this->Codes = "";
$this->Reverse = "";
$FileHandle = @fopen($BasePath . "data/128B.db", "r");
if (!$FileHandle) {
die("Cannot find barcode database (" . $BasePath . "128B.db).");
}
while (!feof($FileHandle)) {
$Buffer = fgets($FileHandle, 4096);
$Buffer = str_replace(chr(10), "", $Buffer);
$Buffer = str_replace(chr(13), "", $Buffer);
$Values = preg_split("/;/", $Buffer);
$this->Codes[$Values[1]]["ID"] = $Values[0];
$this->Codes[$Values[1]]["Code"] = $Values[2];
$this->Reverse[$Values[0]]["Code"] = $Values[2];
$this->Reverse[$Values[0]]["Asc"] = $Values[1];
}
fclose($FileHandle);
}