Пример #1
0
 public function save()
 {
     $params = array('name' => $this->name, 'first_name' => $this->first_name, 'last_name' => $this->last_name, 'passw' => $this->passw, 'email' => $this->email, 'color' => $this->color ? $this->color : '', 'state' => $this->state ? $this->state : '', 'rating' => intval($this->rating), 'timezone' => intval($this->timezone), 'url' => (string) $this->url, 'icq' => (string) $this->icq, 'about' => (string) $this->about, 'signature' => (string) $this->signature, 'pol' => (string) $this->pol, 'jabber' => (string) $this->jabber, 'city' => (string) $this->city, 'telephone' => intval($this->telephone), 'byear' => intval($this->byear), 'bmonth' => intval($this->bmonth), 'bday' => intval($this->bday), 'photo' => (string) $this->photo, 'puttime' => $this->puttime, 'themes' => intval($this->themes), 'posts' => intval($this->posts), 'status' => intval($this->status), 'locked' => intval($this->locked), 'activation' => $this->activation, 'warnings' => intval($this->warnings), 'ban_expire' => $this->ban_expire ? $this->ban_expire : '0000-00-00 00:00:00', 'email_notification' => intval($this->email_notification), 'summer_time' => intval($this->summer_time));
     if ($this->id) {
         $params['id'] = $this->id;
     }
     return parent::save('users', $params);
 }
Пример #2
0
 public function save()
 {
     $params = array('user_id' => intval($this->user_id), 'date' => $this->date, 'status' => (string) $this->status, 'total' => floatval($this->total), 'comment' => (string) $this->comment, 'delivery_address' => (string) $this->delivery_address, 'delivery_type_id' => intval($this->delivery_type_id), 'telephone' => (string) $this->telephone, 'first_name' => (string) $this->first_name, 'last_name' => (string) $this->last_name);
     if ($this->id) {
         $params['id'] = $this->id;
     }
     return parent::save('shop_orders', $params);
 }
Пример #3
0
 public function save()
 {
     $params = array('title' => $this->title, 'clean_url_title' => $this->clean_url_title, 'description' => $this->description, 'views' => intval($this->views), 'date' => $this->date, 'category_id' => intval($this->category_id), 'author_id' => intval($this->author_id), 'comments' => intval($this->comments), 'filename' => $this->filename, 'rating' => intval($this->rating));
     if ($this->id) {
         $params['id'] = $this->id;
     }
     return parent::save('foto', $params);
 }
Пример #4
0
 public function save($full = false)
 {
     $params = array('stock_id' => intval($this->stock_id), 'stock_description' => (string) $this->stock_description, 'attributes_group_id' => intval($this->attributes_group_id), 'title' => (string) $this->title, 'clean_url_title' => (string) $this->clean_url_title, 'description' => (string) $this->description, 'category_id' => intval($this->category_id), 'vendor_id' => intval($this->vendor_id), 'user_id' => intval($this->user_id), 'date' => empty($this->date) ? new Expr('NOW()') : $this->date, 'orders_cnt' => intval($this->orders_cnt), 'comments_cnt' => intval($this->comments_cnt), 'available' => !empty($this->available) ? '1' : '0', 'commented' => !empty($this->commented) ? '1' : '0', 'view_on_home' => !empty($this->view_on_home) ? '1' : '0', 'hide_not_exists' => !empty($this->hide_not_exists) ? '1' : '0', 'article' => (string) $this->article, 'image' => (string) $this->image, 'price' => floatval($this->price), 'discount' => intval($this->discount), 'quantity' => intval($this->quantity));
     if ($this->id) {
         $params['id'] = $this->id;
     }
     parent::save('shop_products', $params);
     if ($full === true) {
         $this->__saveAttributes();
     }
     return $this->id;
 }