All pastes #164131 Raw Edit

Miscellany

public php v1 · immutable
·published 2006-09-08 10:00 UTC
rendered paste body
<?phperror_reporting(E_ALL);/** * untitledModel - class.AdminAddView.php * * $Id$ * * This file is part of untitledModel. * * Automatic generated with ArgoUML 0.20 on 29.08.2006, 18:56:57 * * @author firstname and lastname of author, <author@example.org> */if (0 > version_compare(PHP_VERSION, '5')) {    die('This file was generated for PHP 5');}/** * include AdminService * * @author firstname and lastname of author, <author@example.org> */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, <author@example.org> */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, <author@example.org>     * @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, <author@example.org>     * @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 "<br><center><b>Saved!</b></center>";	} else {			include("design/admin_add_form.php");	}	// section .:0000000000000B2F end    }} /* end of class AdminAddView */?>