当前位置: 首页>>代码示例>>PHP>>正文


PHP GetUsrDetails函数代码示例

本文整理汇总了PHP中GetUsrDetails函数的典型用法代码示例。如果您正苦于以下问题:PHP GetUsrDetails函数的具体用法?PHP GetUsrDetails怎么用?PHP GetUsrDetails使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了GetUsrDetails函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: header

<?php

header('Content-Type: text/html; charset=utf-8');
$mode = isset($_GET['action']) ? $_GET['action'] : $_POST['action'];
include 'cfu.php';
postHead('');
AuthUser();
if ($CFU_Time >= $_SESSION['timeauth'] + $TIME_OUT_TIME || $_SESSION['timeauth'] <= $CFU_Time - $TIME_OUT_TIME) {
    echo "驗證機制!<br>請重新登入!";
    exit;
}
GetUsrDetails("{$_SESSION['username']}", 'Gen', 'Game');
//Tactics Learning center GUI
if ($mode == 'main') {
    unset($CancelFlag, $TactMessage);
    echo "<br>戰術學院<hr>";
    if ($actionb == 'proclearn') {
        $Tactics = GetTactics($learndesired);
        if ($Tactics['price'] > $Gen['cash']) {
            $TactMessage = '金錢不足!';
            $CancelFlag = '1';
        }
        if ($Tactics['needlv'] > $Game['level']) {
            $TactMessage .= '等級不足!';
            $CancelFlag = '1';
        }
        if (ereg("({$Tactics['id']})+", $Game['tactics'])) {
            $TactMessage .= "你早就學會了 {$Tactics['name']} 。";
            $CancelFlag = '1';
        }
        if (!$CancelFlag) {
开发者ID:j4ckcyw,项目名称:PHP-Endless-Battle,代码行数:31,代码来源:tacticslearn.php

示例2: GetUsrDetails

<?php

echo "装备<hr>";
GetUsrDetails("{$Pl_Value['USERNAME']}", 'GenVal', 'GameVal');
$UsrWepA = explode('<!>', $GameVal['wepa']);
$UsrWepB = explode('<!>', $GameVal['wepb']);
$UsrWepC = explode('<!>', $GameVal['wepc']);
$UsrWepD = explode('<!>', $GameVal['eqwep']);
//改造武器(Ev)
if ($UsrWepA[1] >= 1000 || $UsrWepB[1] >= 1000 || $UsrWepC[1] >= 1000) {
    GetWeaponDetails("{$UsrWepA['0']}", 'SysWepE_A');
    if ($UsrWepA[2]) {
        if ($UsrWepA[2] == 1) {
            $SysWepE_A['name'] = $UsrWepA[3] . $SysWepE_A['name'] . "<sub>?</sub>";
        } else {
            $SysWepE_A['name'] = $SysWepE_A['name'] . $UsrWepA[3] . "<sub>?</sub>";
        }
        $SysWepE_A['atk'] += $UsrWepA[4];
        $SysWepE_A['hit'] += $UsrWepA[5];
        $SysWepE_A['rd'] += $UsrWepA[6];
        $SysWepE_A['enc'] = $UsrWepA[7];
    }
    GetWeaponDetails("{$UsrWepB['0']}", 'SysWepE_B');
    if ($UsrWepB[2]) {
        if ($UsrWepB[2] == 1) {
            $SysWepE_B['name'] = $UsrWepB[3] . $SysWepE_B['name'] . "<sub>?</sub>";
        } else {
            $SysWepE_B['name'] = $SysWepE_B['name'] . $UsrWepB[3] . "<sub>?</sub>";
        }
        $SysWepE_B['atk'] += $UsrWepB[4];
        $SysWepE_B['hit'] += $UsrWepB[5];
开发者ID:Saren-Arterius,项目名称:php-eb,代码行数:31,代码来源:equip_wep.php

示例3: postFooter

             exit;
         }
         if ($t_amount <= 0) {
             echo "麻煩閣下重新輸入金額。";
             postFooter();
             exit;
         }
         if ($t_target == $Pl_Value['USERNAME']) {
             echo "麻煩閣下不要亂來。";
             postFooter();
             exit;
         }
         $sql = "SELECT `bounty`,`gamename` FROM `" . $GLOBALS['DBPrefix'] . "phpeb_user_general_info` `gen`,`" . $GLOBALS['DBPrefix'] . "phpeb_user_game_info` `game` WHERE `gen`.`username` = `game`.`username` AND `gen`.`username` = '{$t_target}'";
         $query = mysql_query($sql) or die(mysql_error());
         $BntyTrgt = mysql_fetch_array($query);
         GetUsrDetails($t_target, '', 'BntyTrgtGame');
         $Bank['savings'] -= $t_amount;
         $BntyTrgt['bounty'] += $t_amount;
         $log_target = $t_target;
         $log_amount = $t_amount;
         $log_tg_name = $BntyTrgt['gamename'];
         $log_type = 4;
     } else {
         echo "未定義動作!";
         postFooter();
         exit;
     }
 }
 if ($actionb == 'remit' && $c_target == '<您所屬的組織>') {
     $Bank['savings'] -= $c_amount;
     unset($sql);
开发者ID:c0re100,项目名称:PHP-Endless-Battle,代码行数:31,代码来源:bank.php

示例4: mysql_query

        $Pos_Flag = "你身上沒有空位!本次交易不扣款";
        $price = 0;
    }
    if ($price > 0) {
        //給武器
        $sql = "UPDATE `" . $GLOBALS['DBPrefix'] . "phpeb_user_game_info` SET `wepa` = '{$Game['wepa']}', `wepb` = '{$Game['wepb']}', `wepc` = '{$Game['wepc']}' WHERE `username` = '{$Pl_Value['USERNAME']}' LIMIT 1;";
        mysql_query($sql);
        //刪除商場物品
        $sql = "DELETE FROM `" . $GLOBALS['DBPrefix'] . "phpeb_user_market` WHERE `id` = '{$sellid}' LIMIT 1;";
        mysql_query($sql);
        //扣款
        $Gen['cash'] = $Gen['cash'] - $price;
        $sql = "UPDATE `" . $GLOBALS['DBPrefix'] . "phpeb_user_general_info` SET `cash` = '{$Gen['cash']}' WHERE `username` = '{$Pl_Value['USERNAME']}' LIMIT 1;";
        mysql_query($sql);
        //給錢
        GetUsrDetails("{$owner}", 'Gen2', 'Game2');
        $Gen2['cash'] = $Gen2['cash'] + $price;
        $sql = "UPDATE `" . $GLOBALS['DBPrefix'] . "phpeb_user_general_info` SET `cash` = '{$Gen2['cash']}' WHERE `username` = '{$owner}' LIMIT 1;";
        mysql_query($sql);
    }
    echo "<form action=market.php?actionb=none method=post name=frmeq target={$SecTarget}>";
    echo "<p align=center style=\"font-size: 16pt\">{$Pos_Flag}<br><input type=submit value=\"返回\" onClick=\"parent.{$SecTarget}.location.replace('gen_info.php')\"><input type=submit value=\"繼續逛商場\" onClick=\"frmeq.submit()\"></p>";
    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 name=\"TIMEAUTH\" value=\"{$CFU_Time}\">";
    echo "</form>";
} else {
    echo "未定義動作!";
}
postFooter();
exit;
开发者ID:c0re100,项目名称:PHP-Endless-Battle,代码行数:31,代码来源:market.php

示例5: unset

<?php

if ($mode == 'attack_target') {
    unset($AtkFortFlag);
    if (!$Op_Name) {
        echo "請先挑選對手!";
        exit;
    } elseif ($Op_Name == $Pl_Value['USERNAME']) {
        echo "不能攻擊自己!";
        exit;
    } elseif ($Op_Name != '<AttackFort>') {
        GetUsrDetails("{$Op_Name}", 'Op_Gen', 'Op_Game');
        $Op_Settings_Query = "SELECT `show_log_num` FROM `" . $GLOBALS['DBPrefix'] . "phpeb_user_settings` WHERE username='" . $Op_Gen['username'] . "'";
        $Op_Settings = mysql_fetch_array(mysql_query($Op_Settings_Query));
    } elseif ($Op_Name == '<AttackFort>') {
        if ($AttackFort != 'True' || $CFU_Time < $Pl_Org['optstart'] || $Area["User"]["hp"] <= 0) {
            echo "不能攻擊要塞";
            postFooter();
            exit;
        }
        $AtkFortFlag = '1';
        $Op_Gen = array("username" => '<AttackFort>', "color" => "{$Area_Org['color']}", "msuit" => '<AttackFort>', "typech" => "nat1", "coordinates" => "{$Pl_Gen['coordinates']}", "fame" => "0", "time2" => "0");
        $Op_Game = array("username" => '<AttackFort>', "gamename" => '防禦要塞', "hp" => $Area["User"]["hp"], "hpmax" => $Area["User"]["hpmax"], "en" => "100000", "enmax" => "100000", "attacking" => "{$Area_At}", "defending" => "{$Area_De}", "reacting" => "0", "targeting" => "{$Area_Ta}", "level" => "90", "expr" => "0", "wepa" => $Area["User"]["wepa"] . "<!>25000", "eqwep" => "", "rank" => "100000", "rights" => "1", "organization" => "{$Area_Org['id']}", "status" => "0", "tactics" => "DefCounterA\nTripleStrike\nMindStrike\nFirstStrike\nSenseStrike");
    }
    if ($Op_Game['status']) {
        echo "對手修理中..";
        postFooter();
        exit;
    }
    if ($Pl_Game['status']) {
        echo "修理中,無法出擊。";
开发者ID:Jasonlhy,项目名称:PHP-Endless-Battle,代码行数:31,代码来源:battle-2.php

示例6: unset

         }
         $Pl_WepCS['atk'] += $Pl_WepC[4];
         $Pl_WepCS['hit'] += $Pl_WepC[5];
         $Pl_WepCS['rd'] += $Pl_WepC[6];
         $Pl_WepCS['enc'] = $Pl_WepC[7];
     }
     echo " 備用武器二:<br>  " . $Pl_WepCS['name'] . " <input type=radio value='wepc' name=sellslot>";
 }
 echo "<br><b>賣給</b><br>";
 unset($sql, $query, $BankUsers, $c_rcb);
 $Exch_Avail = '';
 $sql = "SELECT * FROM `" . $GLOBALS['DBPrefix'] . "phpeb_user_bank` WHERE `status` = '1' AND `username` != '{$Bank['username']}' AND (!`sh_ina` OR !`sh_inb` OR !`sh_inc`)";
 $query = mysql_query($sql);
 while ($BankUsers = mysql_fetch_array($query)) {
     $c_rcb += 1;
     GetUsrDetails($BankUsers['username'], '', 'BankGame');
     $Exch_Avail .= "<option value='{$BankGame['username']}'>{$BankGame['gamename']}";
     unset($BankGame);
 }
 unset($sql, $query);
 if (!$c_rcb) {
     $exch_disabledtrue = 'disabled';
 }
 echo "<select name=exch_target {$exch_disabledtrue}>";
 echo "<option value='0'>-----〔請選擇〕-----";
 echo "{$Exch_Avail}";
 echo "</select>";
 echo "<br><b>出價:</b><br><input type=text name=price_sell maxlength=10 size=10><br>";
 echo "<input type=submit onClick=\"return MakeDeal()\" value=建立交易>";
 echo "</td></tr>";
 echo "</table>";
开发者ID:Jasonlhy,项目名称:PHP-Endless-Battle,代码行数:31,代码来源:bank.php

示例7: isset

<?php

$mode = isset($_GET['action']) ? $_GET['action'] : $_POST['action'];
include 'cfu.php';
postHead('');
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);
GetUsrDetails("{$Pl_Value['USERNAME']}", 'Pl_Gen', 'Pl_Game');
$Pl_Settings_Query = "SELECT * FROM `" . $GLOBALS['DBPrefix'] . "phpeb_user_settings` WHERE username='" . $Pl_Gen['username'] . "'";
$Pl_Settings = mysql_fetch_array(mysql_query($Pl_Settings_Query));
if ($CFU_Time - $Pl_Gen['btltime'] < $Btl_Intv) {
    echo "距离上次攻击或移动的时间太短了!<br>请在 " . ($Btl_Intv - ($CFU_Time - $Pl_Gen['btltime'])) . " 秒后再进行攻击!";
    exit;
}
$Pl_WepA = explode('<!>', $Pl_Game['wepa']);
$Pl_WepB = explode('<!>', $Pl_Game['wepb']);
$Pl_WepC = explode('<!>', $Pl_Game['wepc']);
$Pl_WepD = explode('<!>', $Pl_Game['eqwep']);
$Pl_WepE = explode('<!>', $Pl_Game['p_equip']);
//Adjust to user's setting
if ($Pl_Settings['gen_img_dir']) {
    $General_Image_Dir = $Pl_Settings['gen_img_dir'];
}
if ($Pl_Settings['unit_img_dir']) {
    $Unit_Image_Dir = $Pl_Settings['unit_img_dir'];
}
if ($Pl_Settings['base_img_dir']) {
开发者ID:Saren-Arterius,项目名称:php-eb,代码行数:31,代码来源:battle.php


注:本文中的GetUsrDetails函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。