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); }
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'); }
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'); }
public static function getPostion($staff_id) { $staff = Model_Staff::find($staff_id); return array('lat' => $staff->lat, 'long' => $staff->long); }
/** * Действие для отображения списка игроков */ 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); }
/** * Удаление игрока * * @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'); }
public function post_getPostion() { $staff_id = $_POST['staff_id']; $staff = Model_Staff::find($staff_id); return array('lat' => $staff->lat, 'long' => $staff->long); }