Exemplo n.º 1
0
 public function updateSort()
 {
     $orders = Q("fieldsort");
     if ($orders) {
         $model = new ModelFieldModel($this->_mid);
         foreach ($orders as $k => $v) {
             $model->join(null)->save(array("fid" => $k, "fieldsort" => $v));
         }
         $model->updateCache(intval($_GET['mid']));
         $this->_ajax(1, "排序成功");
     } else {
         $this->_ajax(0, $model->error);
     }
 }