public function goods_del() { //post数据 $id = IFilter::act(IReq::get('id'), 'int'); //生成goods对象 $goods = new goods_class(); $goods->seller_id = $this->seller['seller_id']; if ($id) { if (is_array($id)) { foreach ($id as $key => $val) { $goods->del($val); } } else { $goods->del($id); } } $this->redirect("goods_list"); }
/** * @brief 商品彻底删除 * */ function goods_recycle_del() { //post数据 $id = IFilter::act(IReq::get('id')); //生成goods对象 $goods = new goods_class(); if (!empty($id)) { if (is_array($id) && isset($id[0]) && $id[0] != '') { for ($i = 0; $i < count($id); $i++) { $goods->del($id[$i]); } } else { $goods->del($id); } } $this->redirect("goods_recycle_list"); }