Beispiel #1
0
/** function get_footer
 *		Generate the HTML footer portion of the page
 *
 * @param array option meta info
 * @return string HTML footer for page
 */
function get_footer($meta = array())
{
    $foot_data = isset($meta['foot_data']) ? $meta['foot_data'] : '';
    $players = GamePlayer::get_count();
    list($cur_games, $total_games) = Game::get_count();
    $Mysql = Mysql::get_instance();
    $html = '
	<div id="footerspacer">&nbsp;</div>
	<footer>
		<span>Total Players - ' . $players . '</span>
		<span>Active Games - ' . $cur_games . '</span>
		<span>Games Played - ' . $total_games . '</span>
	</footer>

	' . $foot_data . '

	<!-- Queries = ' . $Mysql->query_count . ' -->
</body>
</html>';
    return $html;
}
Beispiel #2
0
<?php

define('LOGIN', false);
require_once 'includes/inc.global.php';
// if we have a player_id in session, log them in, and check for admin
if (!empty($_SESSION['player_id'])) {
    $GLOBALS['Player'] = new GamePlayer();
    // this will redirect to login if failed
    $GLOBALS['Player']->log_in();
}
$no_new_users = false == Settings::read('new_users');
$max_users_set = 0 != Settings::read('max_users');
$max_users_reached = GamePlayer::get_count() >= Settings::read('max_users');
$not_admin = empty($GLOBALS['Player']) || !$GLOBALS['Player']->is_admin;
if ($not_admin && ($no_new_users || $max_users_set && $max_users_reached)) {
    Flash::store('Sorry, but we are not accepting new registrations at this time.');
}
if ($not_admin && isset($_SESSION['player_id'])) {
    $GLOBALS['Player'] = array();
    $_SESSION['player_id'] = false;
    unset($_SESSION['player_id']);
    unset($GLOBALS['Player']);
}
if (isset($_POST['register'])) {
    test_token();
    // die spammers
    if ('' != $_POST['website']) {
        header('Location: http://www.searchbliss.com/spambot/spambot-stopper.asp');
        exit;
    }
    try {
Beispiel #3
0
				<p>Warning! Javascript must be enabled for proper operation of <?php 
echo GAME_NAME;
?>
.</p>
			</noscript>

			<form method="post" action="index.php<?php 
echo $GLOBALS['_?_DEBUG_QUERY'];
?>
"><div class="formdiv">
				<div><label for="username">Username</label><input type="text" id="username" name="username" size="15" maxlength="20" tabindex="1" /></div>
				<div><label for="password">Password</label><input type="password" id="password" name="password" class="inputbox" size="15" tabindex="2" /></div>
				<label for="remember" class="inline"><input type="checkbox" id="remember" name="remember" checked="checked" tabindex="3" />Remember me</label><br />
				<input type="submit" name="login" value="Log in" tabindex="4" />
				<?php 
if (true == $new_users && (0 == $max_users || GamePlayer::get_count() < $max_users)) {
    ?>
<input type="button" value="Register" onclick="window.open('register.php<?php 
    echo $GLOBALS['_?_DEBUG_QUERY'];
    ?>
', '_self')" tabindex="5" /><?php 
}
?>
			</div></form>

			<noscript class="notice ctr">
				<p>Warning! Javascript must be enabled for proper operation of <?php 
echo GAME_NAME;
?>
.</p>
			</noscript>