Exemplo n.º 1
0
function print_page($title, $text, $header = '')
{
    global $p_user;
    /*if ($p_user['bp_user_id']) {
    		$bpApi = new TheGame();
    		preg_match('`/([^/]*)$`Uis', $_SERVER['PHP_SELF'], $res);
    		$pageTag = $bpApi->getPageTags($p_user['bp_user_id'], $p_user['login_id'], $res[1]);
    		var_dump($pageTag);
    	}*/
    print_header($title, $header);
    print_leftbar();
    print_topbar();
    echo $text;
    print_footer();
}
Exemplo n.º 2
0
        }
        $error_str .= "<br /><input type='radio' name='style' value='{$key}' {$checked} /> <b><font color='{$details['b_col']}'>{$details['ss_name']}</font></b> - {$details['creator']}\n" . $s_def;
    }
    $error_str .= "<p /><input type='submit' value='" . $cw['submit'] . "' />";
    $error_str .= "</form>";
    print_page($cw['select_scheme'], $error_str);
    #demo of style sheet
} elseif (isset($_POST['style'])) {
    $temp = $directories['stylesheets'] . "/style" . $style . ".css";
    echo "<html>\n";
    echo "<head>\n";
    echo "<title>[ " . $cw['solar_empire'] . " - " . SERVER_NAME . " : " . $st[962] . " ]</title>\n";
    echo "<link rel='stylesheet' href='{$temp}' />\n";
    echo "</head>\n";
    echo "<body>\n";
    print_leftbar();
    print_topbar();
    $error_str .= $st[963];
    $error_str .= "<p />" . $st[964] . ".\n";
    $error_str .= "<br /><b>" . $st[965] . ".</b>\n";
    $error_str .= "<br /><b class='b1'>" . $st[966] . " 1</b>\n";
    $error_str .= "<br /><b class=b2>" . $st[966] . " 2</b>\n";
    $error_str .= "<br /><b class=b3>" . $st[966] . " 3</b>\n";
    $error_str .= "<br /><a href=''>" . $st[967] . "</a>\n";
    $error_str .= "<br /><a href='location.php'>" . $st[968] . "</a>\n";
    $error_str .= "<br /><b class=cloak>" . $st[969] . "</b>\n";
    $error_str .= "<p />" . $st[970] . ":\n";
    $error_str .= "<br /><a href='options.php?scheme=1'>" . $st[971] . "</a>.\n";
    $error_str .= "<br /><a href='options.php?keep={$style}'>" . $st[972] . "\n";
    $error_str .= "<p /><a href='options.php?keep_server={$style}'>" . $st[973] . ".\n";
    echo $error_str;
Exemplo n.º 3
0
function random_event_checker($star, $user, $autowarp)
{
    global $db_name, $GAME_VARS;
    if ($star['event_random'] == 1) {
        if ($user['turns_run'] < $GAME_VARS['turns_safe']) {
            $ret_str = "<center>Attention ! Attention ! <b class=b1>Trou Noir</b> Attention ! Attention !</center>";
            $ret_str .= "<p />Votre statut de débutant vous confère une protection contre le trou noir. Vous avez de la chance et vous n'en aurez surement pas autant la prochaine fois.";
            $ret_str .= "<center><p />Warp: ";
            if ($star['link_1']) {
                $ret_str .= "&lt;<a href=location.php?toloc={$star['link_1']}>{$star['link_1']}</a>&gt; ";
            }
            if ($star['link_2']) {
                $ret_str .= "&lt;<a href=location.php?toloc={$star['link_2']}>{$star['link_2']}</a>&gt; ";
            }
            if ($star['link_3']) {
                $ret_str .= "&lt;<a href=location.php?toloc={$star['link_3']}>{$star['link_3']}</a>&gt; ";
            }
            if ($star['link_4']) {
                $ret_str .= "&lt;<a href=location.php?toloc={$star['link_4']}>{$star['link_4']}</a>&gt; ";
            }
            if ($star['link_5']) {
                $ret_str .= "&lt;<a href=location.php?toloc={$star['link_5']}>{$star['link_5']}</a>&gt; ";
            }
            if ($star['link_6']) {
                $ret_str .= "&lt;<a href=location.php?toloc={$star['link_6']}>{$star['link_6']}</a>&gt; ";
            }
            if ($autowarp) {
                $path_str = str_replace("+", " ", $autowarp);
                $autowarp_path = array();
                $autowarp_path = explode(" ", $path_str);
                //$ret_str .= "<br />Path_str is $path_str";
                $next_sector = array_shift($autowarp_path);
                //$ret_str .= " Next Sector is $next_sector";
                if ($next_sector && ($next_sector == $star['link_1'] || $next_sector == $star['link_2'] || $next_sector == $star['link_3'] || $next_sector == $star['link_4'] || $next_sector == $star['link_5'] || $next_sector == $star['link_6'])) {
                    $temp328 = implode($autowarp_path, "+");
                    if (!empty($temp328)) {
                        $ret_str .= "<br />Vortex vers le prochain système : &lt;<a href=location.php?toloc={$next_sector}&autowarp={$temp328}>{$next_sector}</a>&gt;";
                    } else {
                        $ret_str .= "<br />Vortex vers le prochain système : &lt;<a href=location.php?toloc={$next_sector}>{$next_sector}</a>&gt;";
                    }
                }
            }
            $ret_str .= "</center>";
            print_header("Black Hole");
            print_leftbar();
            print_topbar();
            echo $ret_str;
            echo '</td></tr></table>';
            echo '</body></html>';
            exit;
        } else {
            black_hole($user, $star);
        }
        //player runs into nebula
    } elseif ($star['event_random'] == 2) {
        dbn("update {$db_name}_ships set shields = 0 where login_id = {$user['login_id']} && location = {$user['location']} && {$user['login_id']} != 1");
        $user_ship['shields'] = 0;
        #Solar Storm
    } elseif ($star['event_random'] == 12) {
        dbn("update {$db_name}_ships set shields = 0 where login_id = '{$user['login_id']}' && location = '{$user['location']}' && '{$user['login_id']}' != 1");
        $user_ship['shields'] = 0;
        //end random things
    }
}