Example #1
0
 public function postsaveAction()
 {
     $data = array();
     $data['id'] = $this->_getParam("id");
     $data['name'] = $this->_getParam("name");
     $data["time_start"] = strtotime($this->_getParam("time_start"));
     $data["time_end"] = strtotime($this->_getParam("time_end"));
     $data["before_price"] = $this->_getParam("before_price");
     $data["now_price"] = $this->_getParam("now_price");
     $data['image'] = $this->_getParam("image");
     $data['visible'] = $this->_getParam("visible");
     $data['paypal'] = $this->_getParam("paypal");
     $data['desc'] = $this->_getParam("desc");
     //check data
     $this->_product->save($data);
     $this->redirect("index", "courses", "admin");
 }