コード例 #1
0
ファイル: me.php プロジェクト: HardSkript/anime-bracket
 public static function generate(array $params)
 {
     $action = is_array($params) ? array_shift($params) : null;
     Lib\Display::setLayout('admin');
     $user = self::_checkLogin();
     if ($user) {
         self::$_user = $user;
         Lib\Display::addKey('user', $user);
         $message = null;
         $force = false;
         if (Lib\Url::GetBool('created')) {
             $message = ['message' => 'Bracket was created successfully!', 'type' => 'success'];
             $force = true;
         }
         if (Lib\Url::GetBool('edited')) {
             $message = ['message' => 'Bracket was updated successfully!', 'type' => 'success'];
             $force = true;
         }
         // If there's an action, check for that page controller and use it
         if ($action && class_exists('Controller\\Admin\\' . $action, true)) {
             call_user_func(['Controller\\Admin\\' . $action, 'generate'], $params);
         } else {
             // Show the rollup page
             self::_main($message, $force);
         }
     }
 }
コード例 #2
0
ファイル: ControllerMe.php プロジェクト: hendro7naga/bnc
 static function getInstanceMe()
 {
     if (self::$controllerme == null) {
         self::$controllerme = 1;
         return new static();
         //self::$controllerme = new static;
         //return self::$controllerme;
     } else {
         //return self::$controllerme;
         return null;
     }
 }
コード例 #3
0
ファイル: apps.php プロジェクト: hendro7naga/bnc
<?php

require_once "ControllerMe.php";
$kontrol = ControllerMe::getInstanceMe();
if ($kontrol == null) {
    die("<h4 style=color:#fff;>Sorry.. Access denied</h4><hr style=color:#f00;/>");
} else {
    if (!$kontrol->initDBInstanceController()) {
        die("<hr/><h5>Sorry.. Server Disconnected...</h5><hr/>");
    }
}