예제 #1
0
if (INSTALL == 1) {
    define("THEME", $db->config("theme"));
    # Set the default theme
    define("URL", $db->config("url"));
    # Sets the URL THT is located at
    define("NAME", $db->config("name"));
    # Sets the name of the website
} else {
    define("THEME", 'bnpanel');
    # Set the default theme
    define("URL", "../");
    # Set url to blank
    define("NAME", 'BNPanel');
    # Sets the name of the website
}
$path = dirname($main->removeXSS($_SERVER['PHP_SELF']));
$position = strrpos($path, '/') + 1;
$folder = substr($path, $position);
define("FOLDER", $folder);
# Add current folder name to global
$available_classes = array('addon', 'billing', 'currency', 'email', 'invoice', 'order', 'style', 'package', 'server', 'staff', 'ticket', 'type', 'user', 'extrafield', 'controller');
foreach ($available_classes as $class_item) {
    ${$class_item} = new $class_item();
    global ${$class_item};
}
require_once INCLUDES . 'validator.class.php';
// Setting GETs and POSTss
$load_post = false;
if ($_POST) {
    $load_post = true;
}