Conditions | 4 |
Paths | 5 |
Total Lines | 38 |
Code Lines | 23 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 2 |
1 | <?php |
||
37 | public function play() |
||
38 | { |
||
39 | // セッションをスタート |
||
40 | $sess = new \Risoluto\Session(); |
||
41 | $sess->start(); |
||
42 | |||
43 | if ($sess->isThere( 'Auth' )) { |
||
44 | // 認証情報がある場合は取得する |
||
45 | $detail = $sess->Load( 'Auth' ); |
||
46 | } else { |
||
47 | // 認証情報がない場合はログイン画面へ遷移する |
||
48 | $sess->store( 'AuthError', 'invalid_access' ); |
||
49 | \Risoluto\Url::redirectTo( 'Admin_Login' ); |
||
50 | exit; |
||
51 | } |
||
52 | |||
53 | // メニュータブ制御 |
||
54 | $params = $this->GetParam(); |
||
55 | if (!empty( $params )) { |
||
56 | $active_tab = htmlentities( $params[ 0 ], ENT_QUOTES, 'UTF-8' ); |
||
57 | } else { |
||
58 | $active_tab = 'user'; |
||
59 | } |
||
60 | $allow_admintab = ( $detail[ 'groupno' ] == 1 ) ? true : false; |
||
61 | |||
62 | // ヘッダ情報のセット |
||
63 | $header = $this->getDefaultHeader(); |
||
64 | $header = $this->replaceHeader( $header, 'robots', 'NOINDEX,NOFOLLOW' ); |
||
65 | |||
66 | // テンプレートエンジン関連の処理 |
||
67 | $assign_value = [ |
||
68 | 'header' => $header, |
||
69 | 'detail' => $detail, |
||
70 | 'active_tab' => $active_tab, |
||
71 | 'allow_admintab' => $allow_admintab |
||
72 | ]; |
||
73 | $this->risolutoView( $assign_value ); |
||
74 | } |
||
75 | } |