示例#1
0
文件: Crud.php 项目: hisaboh/w2t
 public function do_drop($name)
 {
     if ($this->login()) {
         $class = $this->get_class($name);
         $obj = $class->sync();
         if ($this->isPost()) {
             $obj->set_model($this->vars());
             $obj->delete();
             C($obj)->commit();
             $tools = new CrudTools($name);
             Http::redirect(Http::referer());
         }
     }
     return $this->do_find($name);
 }
示例#2
0
 /**
  * ログインを必須とする
  * @param string $redirect_to リダイレクト先
  */
 protected function login_required($redirect_to = null)
 {
     if (!$this->is_login()) {
         if (!isset($redirect_to)) {
             $redirect_to = $this->in_sessions('logined_redirect_to', Http::referer());
         }
         $this->sessions('logined_redirect_to', App::url($redirect_to));
         $this->redirect_method('do_login');
     }
 }
示例#3
0
 /**
  * refererを返す
  *
  * @return string
  */
 public function referer()
 {
     return Http::referer();
 }
示例#4
0
文件: Templf.php 项目: hisaboh/w2t
 /**
  * refererを返す
  *
  * @return string
  */
 public static final function referer()
 {
     return Http::referer();
 }