예제 #1
0
 public function handleUpGoal($id, $order)
 {
     $data = $this->model->get($id);
     if ($data && $data->works == 0 && ($this->user->isInRole("administrator") || $this->user->id == $data->user_id)) {
         $this->model->upGoal($id, $order);
     }
     $this->template->goals = $this->model->getGoals($id);
     if ($this->isAjax()) {
         $this->redrawControl('goalList');
         $this->redrawControl('flashMessages');
     }
 }