Example #1
0
<?php

/********************
* new_ship.php
* script that contains the functions for building new ships
* Created:
* By: Moriarty
* On: 20th August 2004
********************/
require "user.inc.php";
ship_status_checker();
//user is playing with templates.
if (isset($_GET['templates'])) {
}
Example #2
0
                }
                //add link destination to list of systems to search.
                array_unshift($search_queue, $vertex);
            }
        }
    }
    return sprintf($st[0], $dest_sector);
}
/************************ Page Start Processing ***********************/
$header = $cw['star_system'];
$auto_str = "";
$error_str = "";
$user_loc_message = "";
//check to see how alive the player is
//used to establish if the player can mover around or not.
$am_alive = ship_status_checker(1);
if (isset($calc_autowarp)) {
    $exp_sys_arr = explode(",", $user['explored_sys']);
    if (!isset($dest_sector)) {
        get_var("AutoWarp", "location.php", $st[1], "dest_sector", "", 4);
    } elseif ($dest_sector < 1 || $dest_sector > $game_info['num_stars'] || $user['location'] == $dest_sector) {
        $user_loc_message .= $st[2];
    } elseif ($GAME_VARS['uv_explored'] == 0 && $user['explored_sys'] != -1 && array_search($dest_sector, $exp_sys_arr) === false) {
        $user_loc_message .= $st[3];
    } else {
        $user_loc_message .= determine_route($dest_sector);
    }
}
// Check if on_planet
if ($user['on_planet'] != 0) {
    dbn("update {$db_name}_users set on_planet = 0 where login_id = {$user['login_id']}");
Example #3
0
<?php

/********
* Script containing Earth related functions
* //Last audited: 23/5/04 by Moriarty
********/
require_once "user.inc.php";
//am allowed onto this page if dead but not SD.
ship_status_checker(1);
$rs = "<p /><a href='{$_SERVER['PHP_SELF']}'>" . $cw['return_to_earth'] . "</a>";
$out = "";
//ensure user is in system 1 before continuing.
if ($user['location'] != 1) {
    $rs = "";
    print_page($cw['not_in_sol'], $st[429]);
}
//load fleet with colonists.
if (isset($_REQUEST['all_colon'])) {
    if (!avail_check(4001)) {
        //ensure item has been 'developed'
        $out .= $st[430];
    } else {
        $out .= fill_fleet($cw['colon'], $st[431], $cw['colonists'], $GAME_VARS['cost_colonist'], 1) . "<p />";
        empty_bays($user_ship);
    }
    //individual ship load
} elseif (isset($_REQUEST['colonist'])) {
    $fill = 0;
    if ($user['cash'] < $user_ship['empty_bays'] * $GAME_VARS['cost_colonist']) {
        $fill = floor($user['cash'] / $GAME_VARS['cost_colonist']);
    } else {