コード例 #1
0
function main_switch()
{
    switch ($_GET["main"]) {
        case "index":
            main_index();
            exit;
        case "actions":
            main_actions();
            exit;
        case "rules":
            main_rule();
            break;
    }
}
コード例 #2
0
 * parameters from the file 'config.php' in the current directory and 
 * continue with /program/main_index.php to do the actual work.
 *
 * @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: index.php,v 1.6 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('maintenance.html')) {
    header(sprintf('Location: %s/maintenance.html', $CFG->www));
    die;
}
if (file_exists($CFG->progdir . '/main_index.php')) {
    require_once $CFG->progdir . '/main_index.php';
} else {
    die('condition code 015');
}
/* main_index() does all the work. It is defined in /program/main_index.php */
main_index();
コード例 #3
0
ファイル: squid.newbee.php プロジェクト: brucewu16899/1.6.x
function main_switch(){
	
	if(isset($_GET["ajaxmenu"])){echo "<div id='squid_main_config'>";}
	
	switch ($_GET["main"]) {
		case "index":echo main_index();break;
		case "yes":echo main_config();break;
		case "filters":echo main_filter();break;
		case "cache":echo main_cache();break;
		case "events":echo main_events_tabs();break;
		case "icons-events":echo main_events();break;
		
		default:echo main_config();break;
	}
	
	if(isset($_GET["ajaxmenu"])){echo "</div>";}
	
}
コード例 #4
0
function main_switch()
{
    switch ($_GET["main"]) {
        case "index":
            main_index();
            exit;
            break;
        case "yes":
            main_config();
            exit;
            break;
        case "http_engine":
            main_config();
            exit;
            break;
        case "components":
            main_components();
            exit;
            break;
        case "Update_sites_info":
            main_Update_sites_info();
            exit;
            break;
        case "events":
            main_events();
            exit;
            break;
        default:
            break;
    }
}
コード例 #5
0
function main_switch()
{
    //if(GET_CACHED(__FILE__,__FUNCTION__,$_GET["main"])){return null;}
    switch ($_GET["main"]) {
        case "index":
            $html = main_index();
            SET_CACHED(__FILE__, __FUNCTION__, $_GET["main"], $html);
            echo $html;
            break;
        case "net_share":
            $html = main_samba();
            SET_CACHED(__FILE__, __FUNCTION__, $_GET["main"], $html);
            echo $html;
            break;
        case "ftp_share":
            $html = main_pureftpd();
            SET_CACHED(__FILE__, __FUNCTION__, $_GET["main"], $html);
            echo $html;
            break;
        case "net_share2":
            $html = main_samba_content();
            SET_CACHED(__FILE__, __FUNCTION__, $_GET["main"], $html);
            echo $html;
            break;
        case "rsync":
            $html = main_rsync();
            SET_CACHED(__FILE__, __FUNCTION__, $_GET["main"], $html);
            echo $html;
            break;
        default:
            $html = main_samba();
            $_GET["main"] = "NULL";
            SET_CACHED(__FILE__, __FUNCTION__, $_GET["main"], $html);
            echo $html;
            $_GET["main"] = null;
            break;
    }
}