Exemplo n.º 1
0
$auth_name = 'manage_settings';
require 'inc.php';
if ($no_games && $_GET['t'] != 'add') {
    send('settings-games.php?t=add');
}
if ($_GET['t'] == 'add') {
    // if add game type page
    $is_add = true;
    $add_game_token = genFormToken('addgame');
} else {
    // if edit current game settings
    $is_add = false;
    // We are using the game information that was pulled in setup.php
    $game_token = genFormToken('gamesettings');
    if ($_GET['w'] == 'game') {
        set_warning('You have changed game/DB since the last page!');
    }
}
require 'inc/header.php';
if ($is_add) {
    ?>

	<a href="settings-games.php" class="float-left">&laquo; Go Back</a>
	<br />

	<form action="actions/settings-game.php" method="post">

	<fieldset>
		<legend>Add a New Game</legend>
			
			<fieldset class="none wide">
Exemplo n.º 2
0
}
// default to login required
if ($auth_user_here != false) {
    // some pages do not need auth but include this file so this following line is optional
    $mem->auth($auth_name);
}
// see if user has the right access level is not on the BL and has not got a hack counter above 3
## remove tokens from 2 pages ago to stop build up
if (!isLogin()) {
    // stop login page from using this and moving the vars
    $tokens = array();
    $num_tokens = count($_SESSION['tokens']);
    if ($num_tokens > 0) {
        foreach ($_SESSION['tokens'] as $key => $value) {
            $tokens[$key] = $value;
        }
        $_SESSION['tokens'] = array();
    }
}
## if no time zone set display error ##
if (NO_TIME_ZONE) {
    // if no time zoneset show warning message
    set_warning("Setup Error: The website's time zone is not set, defaulting to use Europe/London (GMT)");
}
## Block Internet Explorer ###
if ($allow_ie == 0) {
    if (detectIE() && !isError()) {
        // alow IE on the pubbans page aswell as the error page
        sendError('ie');
    }
}
Exemplo n.º 3
0
		</div>

	</div><!-- end #user-info -->

	<br class="clear" />

</div><!-- end #menu -->

<div id="content">

	<?php 
## if Site Admin check for current Echelon Version and if not equal add warning
if ($mem->reqLevel('see_update_msg')) {
    $day_of_week = date('N');
    if ((isSA() || isHome()) && $day_of_week == 1) {
        $latest = getEchVer();
        if (ECH_VER !== $latest && $latest != false) {
            // if current version does not equal latest version show warning message
            set_warning('You are not using the lastest version of Echelon, please check the <a href="http://www.bigbrotherbot.com/forums/" title="Check the B3 Forums">B3 Forums</a> for more information.');
        }
    }
}
errors();
// echo out all errors/success/warnings
if ($query_normal) {
    // if this is a normal query page and there is a db error show message
    if ($db->error) {
        dbErrorShow($db->error_msg);
    }
    // show db error
}
Exemplo n.º 4
0
 /**
  * Saves the users email
  * 
  * @since 1.0
  */
 function save_useremail()
 {
     //initializing variables
     if (!is_user_logged_in()) {
         return false;
     }
     if (!BRequest::getVar("user_email", false)) {
         set_warning('An email is required.');
         return false;
     }
     require_once dirname(__FILE__) . DS . "includes" . DS . 'mail.php';
     if (!check_email_address(BRequest::getVar("user_email"))) {
         set_warning('The given email must be valid.');
         return false;
     }
     //loading resources
     require_once ABSPATH . WPINC . '/pluggable.php';
     //initializing variables
     global $wpdb;
     $user =& get_user();
     $data = array();
     $data["user_email"] = BRequest::getVar("user_email");
     if ($wpdb->update($wpdb->users, $data, array('ID' => $user->ID))) {
         return true;
     }
     return false;
 }
Exemplo n.º 5
0
    setcookie("game", $game, $cookie_time, PATH);
    // set the cookie to game value
} elseif ($_POST['game']) {
    $game = cleanvar($_POST['game']);
    setcookie("game", $game, $cookie_time, PATH);
    // set the cookie to game value
} elseif ($_COOKIE['game']) {
    $game = cleanvar($_COOKIE['game']);
} else {
    $game = 1;
    setcookie("game", $game, $cookie_time, PATH);
    // set the cookie to game value
}
settype($game, "integer");
if (!$dbl->isActiveGame($game)) {
    set_warning('Attempting to access an inactive game');
}
## Setup Arrays ##
$config = array();
$config['cosmos'] = array();
## Get the config array ##
$config['cosmos'] = $dbl->getSettings();
// find the number of games from the config array
$num_games = $config['cosmos']['num_games'];
$site_name = $config['cosmos']['name'];
$limit_rows = $config['cosmos']['limit_rows'];
$allow_ie = $config['cosmos']['allow_ie'];
$min_pw_len = $config['cosmos']['min_pw_len'];
$https_enabled = $config['cosmos']['https'];
$key_expire = $config['cosmos']['user_key_expire'];
// This var says how long it takes for a user creation key to expire