function Update()
 {
     $_POST["config"] = serialize($_POST["config"]);
     $map['type'] = 0;
     $this->country = D('Region')->where($map)->findall();
     parent::Update();
 }
Example #2
0
 public function Update()
 {
     if (!$_POST['type'] && $_POST['type2']) {
         $_POST['type'] = $_POST['type2'];
     }
     $return[] = array('text' => '添加新广告', 'link' => U('Ad/add'));
     $return[] = array('text' => '继续编辑该广告', 'link' => U('Ad/edit', array('id' => $_POST['id'])));
     $this->assign('return', $return);
     parent::Update();
 }
 function Update()
 {
     self::$Model = D("Shippingaddress");
     $list = self::$Model->where("id=" . $_POST['id'])->find();
     if ($list) {
         if (self::$Model->create()) {
             self::$Model->save();
             parent::Update();
         } else {
             $this->error("没有更新任何数据!");
         }
     } else {
         if (self::$Model->create()) {
             self::$Model->add();
             parent::Update();
         } else {
             $this->error("没有更新任何数据!");
         }
     }
 }