function insertProduct($pro_name, $image, $tomtat, $description, $price_niemyet, $price_sale, $thongsokythuat, $image_phu, $ma_sp, $soluong, $position, $hot, $status, $cat_id, $mausac) { $pro_id = parent::insert_data($this->table, array('pro_name' => $pro_name, 'image' => $image, 'tomtat' => $tomtat, 'description' => $description, 'price_niemyet' => $price_niemyet, 'price_sale' => $price_sale, 'thongsokythuat' => $thongsokythuat, 'image_phu' => $image_phu, 'ma_sp' => $ma_sp, 'soluong' => $soluong, 'position' => $position, 'hot' => $hot, 'status' => $status, 'mausac' => $mausac, 'ngaydangbai' => date('Y-m-d H:i:s'))); if ($pro_id != '') { $arr = array(); $arr['pro_id'] = $pro_id; for ($i = 0; $i < count($cat_id); $i++) { $arr['cat_id'][] = parent::insert_data($this->table1, array('pro_id' => $pro_id, 'cat_id' => $cat_id[$i])); } return $arr; } else { return false; } }
function insertOrders($order_name, $uid, $product_info, $total, $ship_address, $method_pay, $status) { date_default_timezone_set("Asia/Ho_Chi_Minh"); return parent::insert_data($this->table, array('order_name' => $order_name, 'u_id' => $uid, 'product_info' => $product_info, 'total' => $total, 'ngaydat' => date('Y-m-d H:i:s'), 'ship_address' => $ship_address, 'method_pay' => $method_pay, 'status' => $status)); }
function insertUser($username, $password, $fullname, $email, $address, $mobile, $status, $created_date, $avatar) { return parent::insert_data($this->table, array('user' => $username, 'pass' => $password, 'fullname' => $fullname, 'email' => $email, 'address' => $address, 'mobile' => $mobile, 'status' => $status, 'created_date' => $created_date, 'avatar' => $avatar)); }
function insertNews($title, $images, $tomtat, $content, $cat_id, $hotnews, $featured) { return parent::insert_data($this->table, array('title' => $title, 'tomtat' => $tomtat, 'images' => $images, 'content' => $content, 'cat_id' => $cat_id, 'hot' => $hotnews, 'featured_home' => $featured, 'ngaydangbai' => date('Y-m-d H:i:s'))); }
function insertLienhe($fullname, $email, $mobile, $noidung) { return parent::insert_data($this->table, array('fullname' => $fullname, 'email' => $email, 'mobile' => $mobile, 'noidung' => $noidung)); }
function insertConfig($name, $values_data) { return parent::insert_data($this->table, array('name' => $name, 'values_data' => $values_data)); }
function insertMenuGroup($name, $status) { return parent::insert_data($this->table, array('menu_group_name' => $name, 'status' => $status)); }
function insertCat($name, $parent_id, $position, $home) { return parent::insert_data($this->table, array('cat_name' => $name, 'parent_id' => $parent_id, 'position' => $position, 'home' => $home)); }