/** * (non-PHPdoc) * @see BPCPageAbstract::onLoad() */ public function onLoad($param) { parent::onLoad($param); if (!AccessControl::canAccessPriceMatchPage(Core::getRole())) { die(BPCPageAbstract::show404Page('Access Denied', 'You do NOT have the access to this page!')); } }
/** * (non-PHPdoc) * @see BPCPageAbstract::onLoad() */ public function onLoad($param) { parent::onLoad($param); if (!AccessControl::canAccessStockAdjustPage(Core::getRole())) { die('You do NOT have access to this page.'); } }
/** * (non-PHPdoc) * @see BPCPageAbstract::onLoad() */ public function onLoad($param) { parent::onLoad($param); if (!$this->isPostBack) { $this->order = Order::get($this->Request['orderId']); if (!$this->order instanceof Order) { die('Invalid Order!'); } if (isset($_REQUEST['pdf']) && intval($_REQUEST['pdf']) === 1) { $file = EntityToPDF::getPDF($this->order, 'docket'); header('Content-Type: application/pdf'); // The PDF source is in original.pdf readfile($file); die; } } }
public function onLoad($param) { parent::onLoad($param); if (Core::getUser() instanceof UserAccount) { $this->getResponse()->redirect('/'); } $cScripts = BPCPageAbstract::getLastestJS(get_class($this)); if (isset($cScripts['js']) && ($lastestJs = trim($cScripts['js'])) !== '') { $this->getPage()->getClientScript()->registerScriptFile('pageJs', $this->publishAsset($lastestJs)); } if (isset($cScripts['css']) && ($lastestCss = trim($cScripts['css'])) !== '') { $this->getPage()->getClientScript()->registerStyleSheetFile('pageCss', $this->publishAsset($lastestCss)); } if (!$this->IsPostBack) { $this->username->focus(); $this->errorDiv->visible = false; } }
/** * (non-PHPdoc) * @see BPCPageAbstract::onLoad() */ public function onLoad($param) { parent::onLoad($param); if (!$this->isPostBack) { $this->kit = Kit::get($this->Request['kitId']); if (!$this->kit instanceof Kit) { die('Invalid Kit!'); } if (isset($_REQUEST['pdf']) && intval($_REQUEST['pdf']) === 1) { $file = EntityToPDF::getPDF($this->kit); header('Content-Type: application/pdf'); // The PDF source is in original.pdf readfile($file); die; } if (isset($_REQUEST['printlater']) && intval($_REQUEST['printlater']) === 1) { $this->getClientScript()->registerEndScript('printlater', 'window.print();'); } } }
/** * (non-PHPdoc) * @see BPCPageAbstract::onLoad() */ public function onLoad($param) { parent::onLoad($param); }