public function onLoad($param) { parent::onLoad($param); if (isset($this->Request['barcode'])) { $objCode = new pi_barcode(); $objCode->setSize(50); $objCode->hideCodeType(); $objCode->setColors('#000000'); $objCode->setSize(80); $param = Prado::getApplication()->getParameters(); $objCode->setType($param['barcodetype']); $objCode->setCode($this->Request['code']); $objCode->setFiletype('PNG'); $objCode->showBarcodeImage(); exit; } }
public function onLoad($param) { parent::onLoad($param); if (!$this->isPostBack) { $this->id->Value = $this->Request['id']; $this->setData(); $this->onTypeChanged(NULL, NULL); } if (isset($this->Request['barcode'])) { $objCode = new pi_barcode(); $objCode->setSize(50); $objCode->hideCodeType(); $objCode->setColors('#000000'); $objCode->setSize(80); $param = Prado::getApplication()->getParameters(); $objCode->setType($param['barcodetype']); $objCode->setCode($this->Request['code']); $objCode->setFiletype('PNG'); $objCode->showBarcodeImage(); exit; } }
$readable = 'N'; $showtype = 'N'; $color = '#000000'; $bgcolor = '#FFFFFF'; $zoom = 1; extract($_GET); // ***** Cr�ation de l'objet $objCode = new pi_barcode(); $type = strtoupper($type); // ***** Hauteur / Largeur if (isset($height) || isset($width)) { $objCode->setSize($height, $width); } // ***** Autres arguments if ($readable == 'N') { $objCode->setText(''); } if ($showtype == 'N') { $objCode->hideCodeType(); } if ($color) { if ($bgcolor) { $objCode->setColors($color, $bgcolor); } else { $objCode->setColors($color); } } $objCode->setType($type); $objCode->setCode($code); $objCode->showBarcodeImage(); }