예제 #1
0
파일: Ajax.php 프로젝트: piotrazsko/sushi
 public function action_update_id()
 {
     if (Request::initial()->is_ajax()) {
         $id = Arr::get($_POST, 'val', '');
         $id_new = Arr::get($_POST, 'new_val', '');
         $ajax = new Model_Ajax();
         $res = $ajax->update_id($id, $id_new);
         if ($res == 0) {
             $res = 1;
         } else {
             $res = 0;
         }
         echo $res;
     }
 }