Beispiel #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);
 }
Beispiel #2
0
 public function save()
 {
     $setField = $this->product_id . ", " . $this->quantity . ", '" . $this->date . "', " . $this->user_id . ", " . $this->product_price;
     return DbFunctions::insertEntity('order', $setField);
 }
Beispiel #3
0
 public function delete($product_id)
 {
     return DbFunctions::deleteEntityById('product', $product_id);
 }
Beispiel #4
0
 public function viewAction()
 {
     $id = $this->params()->fromRoute('id', 0);
     return new ViewModel(array('user' => DbFunctions::getEntity('user', $id)));
 }