*/ if (0 > version_compare(PHP_VERSION, '5')) { die('This file was generated for PHP 5'); } /** * include AdminService * * @author firstname and lastname of author, */ require_once('class.AdminService.php'); /* user defined includes */ // section .:0000000000000B27-includes begin // section .:0000000000000B27-includes end /* user defined constants */ // section .:0000000000000B27-constants begin // section .:0000000000000B27-constants end /** * Short description of class AdminAddView * * @access public * @author firstname and lastname of author, */ class AdminAddView extends AdminService { // --- ATTRIBUTES --- /** * Short description of attribute m_request * * @access public * @var array */ public $m_request = array(); // --- OPERATIONS --- /** * Short description of method __construct * * @access public * @author firstname and lastname of author, * @param array * @return void */ public function __construct($request) { // section .:0000000000000B2C begin $this->m_request = $request; // section .:0000000000000B2C end } /** * Short description of method display * * @access public * @author firstname and lastname of author, * @return void */ public function display() { // section .:0000000000000B2F begin if ( (array_key_exists('product_id', $this->m_request)) && (array_key_exists('categorie', $this->m_request)) && (array_key_exists('product_name', $this->m_request)) && (array_key_exists('description', $this->m_request)) && (array_key_exists('manufacturer', $this->m_request)) && (array_key_exists('price', $this->m_request)) ) { $product_id = $this->m_request['product_id']; $categorie = $this->m_request['categorie']; $product_name = $this->m_request['product_name']; $description = $this->m_request['description']; $manufacturer = $this->m_request['manufacturer']; $price = $this->m_request['price']; $product_file = $this->m_request['product_file']; $daresult = AdminService::getInstance()->addProduct($product_id, $categorie, $product_name, $description, $manufacturer, $price,$product_file); echo "
Saved!
"; } else { include("design/admin_add_form.php"); } // section .:0000000000000B2F end } } /* end of class AdminAddView */ ?>