Example #1
0
 /**
  * Page のレスポンス送信.
  *
  * @return void
  */
 public function sendResponse()
 {
     $this->adminPage = GcUtils::isAdminFunction();
     if ($this->adminPage) {
         $this->tpl_mainpage = 'login_error.tpl';
         $this->template = LOGIN_FRAME;
         $this->objDisplay->prepare($this, true);
     } else {
         $this->objDisplay->prepare($this);
     }
     $this->objDisplay->response->write();
 }
Example #2
0
 /**
  * 管理画面の認証を行う.
  *
  * mtb_auth_excludes へ登録されたページは, 認証を除外する.
  *
  * @return void
  */
 public static function adminAuthorization()
 {
     $arrScriptPath = explode('/', str_replace('\\', '/', $_SERVER['SCRIPT_FILENAME']));
     if (!GcUtils::isAdminFunction()) {
         return;
     } else {
         $masterData = Application::alias('eccube.db.master_data');
         $arrExcludes = $masterData->getMasterData('mtb_auth_excludes');
         foreach ($arrExcludes as $exclude) {
             $arrExcludesPath = explode('/', str_replace('\\', '/', realpath(HTML_REALDIR . ADMIN_DIR . $exclude)));
             $arrDiff = array_diff_assoc($arrExcludesPath, $arrScriptPath);
             if (count($arrDiff) === 0) {
                 return;
             }
         }
     }
     Utils::sfIsSuccess(new Session());
 }
Example #3
0
 /**
  * 前方互換用
  *
  * @deprecated 2.12.0 GcUtils::isAdminFunction を使用すること
  */
 public function sfIsAdminFunction()
 {
     trigger_error('前方互換用メソッドが使用されました。', E_USER_WARNING);
     return GcUtils::isAdminFunction();
 }