Ejemplo n.º 1
0
 public function addUser()
 {
     $this->findUserIp();
     $this->role = 'user';
     $setField = "'" . $this->name . "', '" . md5($this->pass) . "', '" . $this->email . "', '" . $this->tel . "', '" . $this->ip . "', '" . $this->role . "'";
     DbFunctions::insertEntity('user', $setField);
 }
Ejemplo n.º 2
0
 public function save()
 {
     $setField = $this->product_id . ", " . $this->quantity . ", '" . $this->date . "', " . $this->user_id . ", " . $this->product_price;
     return DbFunctions::insertEntity('order', $setField);
 }
Ejemplo n.º 3
0
 public function delete($product_id)
 {
     return DbFunctions::deleteEntityById('product', $product_id);
 }
Ejemplo n.º 4
0
 public function viewAction()
 {
     $id = $this->params()->fromRoute('id', 0);
     return new ViewModel(array('user' => DbFunctions::getEntity('user', $id)));
 }