コード例 #1
0
ファイル: admin.tabs.php プロジェクト: brucewu16899/1.6.x
function switch_tabs()
{
    if (trim($_GET["tab"] == null)) {
        die;
    }
    switch ($_GET["tab"]) {
        case "frontend":
            main_admin();
            break;
        case "add-tab":
            main_add_tab();
            exit;
            break;
        default:
            perso_page($_GET["tab"]);
    }
}
コード例 #2
0
 * entry points are {@link /index.php}, {@link /cron.php}, {@link /file.php}
 * and also {@link /program/install.php}. Main entry points all define the constant
 * WASENTRY. This is used in various include()ed files to detect break-in
 * attempts.
 *
 * This is a kickstarter for /program/main_admin.php.
 *
 * @author Peter Fokker <*****@*****.**>
 * @copyright Copyright (C) 2008-2013 Ingenieursbureau PSD/Peter Fokker
 * @license http://websiteatschool.eu/license.html GNU AGPLv3+Additional Terms
 * @package wascore
 * @version $Id: admin.php,v 1.5 2013/06/11 11:25:57 pfokker Exp $
 */
/** Valid entry points define WASENTRY; prevents direct access to include()'s. */
define('WASENTRY', __FILE__);
if (file_exists(dirname(WASENTRY) . '/config.php')) {
    unset($CFG);
    /* prevent tricks with stray globals */
    $CFG = new stdClass();
    require_once dirname(WASENTRY) . '/config.php';
} else {
    die('condition code 010');
}
if (file_exists($CFG->progdir . '/main_admin.php')) {
    require_once $CFG->progdir . '/main_admin.php';
} else {
    die('condition code 015');
}
/* main_admin() does all the work. It is defined in /program/main_admin.php */
main_admin();