$mode = isset($_GET['action']) ? $_GET['action'] : $_POST['action'];
include 'cfu.php';
if (empty($PriTarget)) {
    $PriTarget = 'Alpha';
}
if (empty($SecTarget)) {
    $SecTarget = 'Beta';
}
postHead('');
AuthUser("{$Pl_Value['USERNAME']}", "{$Pl_Value['PASSWORD']}");
if ($CFU_Time >= $TIMEAUTH + $TIME_OUT_TIME || $TIMEAUTH <= $CFU_Time - $TIME_OUT_TIME) {
    echo "連線逾時!<br>請重新登入!";
    exit;
}
include 'includes/sfo.class.php';
$Pl = new player_stats();
$Pl->SetUser($Pl_Value['USERNAME']);
$Pl->FetchPlayer();
$t_now = time();
if ($t_now - $Pl->Player['btltime'] <= 1) {
    echo "動作過快。";
    postFooter();
    mysql_query("UPDATE `" . $GLOBALS['DBPrefix'] . "phpeb_user_general_info` SET `btltime` = " . intval($t_now + 10) . " WHERE `username` = '" . $Pl->Player['name'] . "' LIMIT 1;");
    exit;
}
if ($Pl->Player['organization'] != 0) {
    $sql = "SELECT `occupied`, `tickets` FROM `" . $GLOBALS['DBPrefix'] . "phpeb_user_map` WHERE map_id = '" . $Pl->Player['coordinates'] . "';";
    $query = mysql_query($sql);
    $localArea = mysql_fetch_row($query);
    $sql = "SELECT SUM(`tickets`), COUNT(`map_id`) FROM `" . $GLOBALS['DBPrefix'] . "phpeb_user_map` WHERE `occupied` = '" . $Pl->Player['organization'] . "';";
    $query = mysql_query($sql);
<?php

if ($mode != 'proc') {
    echo 'Invalid Action';
    exit;
}
//php-eb Game Screen Base Unit
postHead(1);
//Assign Variables
$User = $Pl_Value['USERNAME'];
$Password = $Pl_Value['PASSWORD'];
//Fetch Player Information
include_once 'includes/sfo.class.php';
$Pl = new player_stats();
$Pl->SetUser($User);
$Pl->FetchPlayer(true, false, ', `request`');
$Player =& $Pl->Player;
//Adjust to user's setting
if ($Player['gen_img_dir']) {
    $General_Image_Dir = $Player['gen_img_dir'];
}
if ($Player['unit_img_dir']) {
    $Unit_Image_Dir = $Player['unit_img_dir'];
}
if ($Player['base_img_dir']) {
    $Base_Image_Dir = $Player['base_img_dir'];
}
//Area and Organization
$Area = ReturnMap($Player['coordinates']);
$AreaLandForm = ReturnMType($Area["Sys"]["type"]);
$LandFormBg = ReturnMBg($Area["Sys"]["type"]);
Beispiel #3
0
if (empty($SecTarget)) {
    $SecTarget = 'Beta';
}
if (!isset($Game_Scrn_Type)) {
    $Game_Scrn_Type = 1;
}
$additionalHeader = '<link href="images/alphaChannel.css" rel="stylesheet" type="text/css" />';
postHead('', 'phpeb_session_dir', $additionalHeader);
AuthUser("{$Pl_Value['USERNAME']}", "{$Pl_Value['PASSWORD']}");
if ($CFU_Time >= $TIMEAUTH + $TIME_OUT_TIME || $TIMEAUTH <= $CFU_Time - $TIME_OUT_TIME) {
    echo "連線逾時!<br>請重新登入!";
    exit;
}
mt_srand((double) microtime() * 1000000);
include 'includes/sfo.class.php';
$Pl = new player_stats();
$Pl->SetUser($Pl_Value['USERNAME']);
$Pl->FetchPlayer(true, true);
if ($CFU_Time - $Pl->Player['btltime'] < $Move_Intv) {
    echo "距離上次攻擊或移動的時間太短了!<br>請在 " . ($Move_Intv - ($CFU_Time - $Pl->Player['btltime'])) . " 秒後再移動!";
    exit;
}
if ($Pl->Player['msuit']) {
    $Pl->ProcessAllWeapon();
    $Pl_Repaired = RepairPlayer($Pl->Player, $Pl->Eq['D'], $Pl->Eq['E']);
    $Pl->Player['hp'] = $Pl_Repaired['hp'];
    $Pl->Player['en'] = $Pl_Repaired['en'];
    $Pl->Player['sp'] = $Pl_Repaired['sp'];
    $Pl->Player['status'] = $Pl_Repaired['status'];
    $t_now = $Pl->Player['time1'] = $Pl_Repaired['time1'];
    if ($Pl->Player['status']) {
} elseif ($mode == 'searchPlayer') {
    if (!isset($ByID)) {
        $ByID = 'false';
    }
    $SearchBy = '';
    if ($ByID == 'true') {
        $SearchBy = 'username';
    } else {
        $SearchBy = 'gamename';
    }
    $restriction = array("|", "`", "'", "--", "\"", "\\");
    $searchPlayer = str_replace($restriction, '', $searchPlayer);
    $sql = "SELECT `username`, COUNT(*) AS `count` FROM `" . $GLOBALS['DBPrefix'] . "phpeb_user_game_info` WHERE `{$SearchBy}` = '" . $searchPlayer . "';";
    $query = mysql_query($sql);
    $result = mysql_fetch_array($query);
    $Op = new player_stats();
    if ($result['count'] != 1) {
        echo "<form action=information.php method=post name=infoForm>";
        echo "<input type=hidden value='{$Pl_Value['USERNAME']}' name=Pl_Value[USERNAME]>";
        echo "<input type=hidden value='{$Pl_Value['PASSWORD']}' name=Pl_Value[PASSWORD]>";
        echo "<input type=hidden value='listPlayers' name=action>";
        echo "<input type=hidden name=search value='{$searchPlayer}'>";
        echo "<input type=hidden name=listMethod value='search'>";
        echo "<input type=hidden name=\"TIMEAUTH\" value=\"{$CFU_Time}\">";
        if ($ByID == 'true') {
            echo "<p align=center style=\"font-size: 12pt; color: white;\"><Br><br><br>找不到目標玩家, 回到情報首頁中!</p>";
            echo "<script language=\"JavaScript\">";
            echo "setTimeout(\"infoForm.action.value='Main';infoForm.submit();\",1000);";
            echo "</script>";
        } else {
            echo "<p align=center style=\"font-size: 12pt; color: white;\"><Br><br><br>找不到目標玩家「" . $searchPlayer . "」, 進行關鍵字搜索中!</p>";