예제 #1
0
파일: client.php 프로젝트: OICTH1/mtpizza
 public function action_index()
 {
     $staff_id = Session::get(self::LOGIN);
     $staff = Model_Staff::find($staff_id);
     $data['deliverylist'] = $staff->getDeliveryList();
     $this->template->title = '配達一覧';
     $this->template->content = View::forge('deliverysupport/client/deliverylist', $data);
 }
예제 #2
0
파일: staff.php 프로젝트: ClixLtd/pccupload
 public function action_delete($id = null)
 {
     if ($staff = Model_Staff::find($id)) {
         $staff->delete();
         Session::set_flash('success', 'Deleted staff #' . $id);
     } else {
         Session::set_flash('error', 'Could not delete staff #' . $id);
     }
     Response::redirect('staff');
 }
예제 #3
0
파일: api.php 프로젝트: OICTH1/mtpizza
 public function post_testposition()
 {
     /*if(empty(Session::get(self::LOGIN))){
     			return array(
     				'status' => 'NG',
     				'id' => $_POST['lat']
     			);
     		}*/
     $staff_id = $_POST['staff_id'];
     $staff = Model_Staff::find($staff_id);
     $staff->lat = $_POST['lat'];
     $staff->long = $_POST['lng'];
     $staff->save();
     return array('status' => 'OK');
 }
예제 #4
0
파일: staff.php 프로젝트: OICTH1/mtpizza
 public static function getPostion($staff_id)
 {
     $staff = Model_Staff::find($staff_id);
     return array('lat' => $staff->lat, 'long' => $staff->long);
 }
예제 #5
0
 /**
  * Действие для отображения списка игроков
  */
 public function action_index()
 {
     $data['staff'] = \Model_Staff::find('all', array('order_by' => array('staff_name' => 'ASC')));
     $this->template->page_title = 'Команда :: Персонал';
     $this->template->content = \View::forge('staff/index', $data, FALSE);
 }
예제 #6
0
 /**
  * Удаление игрока
  * 
  * @param int $id
  */
 public function action_delete($id = null)
 {
     is_null($id) and \Response::redirect_back('admin/staff');
     if ($staff = \Model_Staff::find($id)) {
         if ($staff->image_uri) {
             unlink(DOCROOT . 'assets/img/staff/' . $staff->image_uri);
         }
         $staff->delete();
         \Session::set_flash('success', 'Персонал удалён.');
     } else {
         \Session::set_flash('error', 'Could not delete Ыефаа #' . $id);
     }
     \Response::redirect_back('admin/staff');
 }
예제 #7
0
파일: api.php 프로젝트: OICTH1/mtpizza
 public function post_getPostion()
 {
     $staff_id = $_POST['staff_id'];
     $staff = Model_Staff::find($staff_id);
     return array('lat' => $staff->lat, 'long' => $staff->long);
 }