Пример #1
0
 public function move_down()
 {
     $this->output->set_content_type('application/json');
     $uri = $this->uri->ruri_to_assoc(3);
     if (isset($uri['period_id'])) {
         $this->_transaction_isolation();
         $this->db->trans_begin();
         $period = new Period();
         $period->get_by_id($uri['period_id']);
         $period->move_down();
         if ($this->db->trans_status()) {
             $this->db->trans_commit();
             $this->output->set_output(json_encode(TRUE));
             $this->_action_success();
         } else {
             $this->db->trans_rollback();
             $this->output->set_output(json_encode(FALSE));
         }
     } else {
         $this->output->set_output(json_encode(FALSE));
     }
 }