Esempio n. 1
0
}
//if (!$gametype) $gametype[] = 'halflife';
// validate modtype's selected
$list = is_array($modtype) ? $modtype : array();
$modtype = array();
foreach ($list as $k) {
    if (array_key_exists($k, $modtypes)) {
        $modtype[] = $k;
    }
}
//if (!$modtype) $modtype[] = 'cstrike';
$cms->theme->assign(array('gamesupport' => $gamesupport, 'gametypes' => $gametypes, 'modtypes' => $modtypes));
if ($ajax_request) {
    //	sleep(1);
    $pagename = 'go-dbinit-results';
    do_init($gametype, $modtype);
    $cms->tiny_page($pagename, $pagename);
    exit;
}
// the DB will already exist (assuming the user did the 'db' step already; which they should have)
function do_init($games, $mods)
{
    global $cms, $db, $db_init, $errors, $actions, $overwrite, $dropdb, $allow_next, $schema, $defaults;
    $i = 1;
    $exists = array();
    $dropped = array();
    $ignore = array();
    if (!$games) {
        $errors[] = "No 'game type' selected! You must select at least one.";
    }
    // a 'mod' must be selected if 'halflife' is selected as a game type.
Esempio n. 2
0
File: 404.php Progetto: boost01/caan
<?php 
// ۞// text { encoding:utf-8 ; bom:no ; linebreaks:unix ; tabs:4sp ; }
$fourohfour_version = '1.8.1';
do_init();
/*	
	404 (not found)
	
	the corz.org intelligent php 404 error handler
	
	404 pages are more important than we generally think. most visitors,
	when presented with a broken link, will just go elsewhere. bye! a decent
	404 page will give you a "second-shot", keep them hanging around, and
	shows you care, which many webmasters don't. hit a 404 at corz.org for
	a wee demo.
	
	
	what it does..
		as well as the usual valid link to your site root and email address
		that folks can click to give feedback, 404.php provides an
		intelligent response to your site's missing pages..
		first 404.php does automatic redirection for all your moved pages.
		whenever you move a page, simply add it to 404.php's "catcher" list,
		and have all visitors and search engines automatically and
		permenantly redirected, without any fuss or .htaccess hacking.
		for genuinely missing documents, 404.php goes on to do a (very)
		quick scan your site, looking for similar items, and returns a
		list of any matching files, as links.
		if there is only a single matching document, 404.php can
		(optionally) jump the visitor directly to that document, nifty.
		finally, if no matches are found, 404.php (optionally) presents the
		user with a corzoogle search form, the important part of their query