function preprocess() { $posted_info = FormLib::get_form_value('cardnos'); if (is_array($posted_info)) { $this->content_function = 'post_charges'; return True; } return parent::preprocess(); }
public function preprocess() { if (FormLib::get('sign-layout') !== '') { $class = FormLib::get('sign-layout'); $items = array(); $prices = array(); $upcs = FormLib::get('u', array()); $formatted_prices = FormLib::get('p', array()); for ($i = 0; $i < count($upcs); $i++) { $items[] = $upcs[$i]; $prices[$upcs[$i]] = $formatted_prices[$i]; } $source_id = FormLib::get('sale-prices') == 'current' ? 2 : 3; $obj = new $class($items, '', $source_id); foreach ($prices as $upc => $price) { $obj->addOverride($upc, 'normal_price', $price); } $obj->drawPDF(); return false; } else { return parent::preprocess(); } }
public function preprocess() { if (php_sapi_name() !== 'cli') { /* this page requires a session to pass some extra state information through multiple requests */ @session_start(); } return parent::preprocess(); }