Exemplo n.º 1
0
 /**
  * @author Bui Dang <*****@*****.**>
  * action detail contact
  */
 public function action_index($id = null)
 {
     $data = array();
     if (!isset($id) or !\Model_Contact::find_by_pk($id)) {
         Response::redirect(Uri::base() . 'support/contacts');
     }
     $data['contact'] = \Model_Contact::find_by_pk($id);
     $this->template->title = 'UOS求人システム';
     $this->template->content = \View::forge('contact/index', $data);
 }
Exemplo n.º 2
0
 public function action_change_status()
 {
     if ($contact_id = Input::post('contact_id')) {
         $user_login = Session::get('login_info');
         $contact = \Model_Contact::find_by_pk($contact_id);
         if (Input::post('status') == 0) {
             $contact->set(array('status' => 1, 'user_id' => $user_login['user_id'], 'update_at' => date('Y-m-d H:i:s')));
         }
         if (Input::post('status') == 1) {
             $contact->set(array('status' => 0, 'user_id' => null, 'update_at' => null));
         }
         $contact->save();
         Response::redirect(Uri::base() . 'support/contacts?' . Session::get('url_filter_contacts'));
     }
     Response::redirect(Uri::base() . 'support/contacts?' . Session::get('url_filter_contacts'));
 }