Esempio n. 1
0
function MoneyLog_3_7($var, $gm)
{
    global $circulation, $tbl_event_type, $tbl_serv_db, $tbl_sys_msg, $page_main;
    echo "<table class=\"list_table\" style=\"text-align:right;\">\n";
    echo "<tr style=\"text-align:center;\"><th>" . $tbl_sys_msg["time"] . "</th><th>" . $page_main["event_type"] . "</th><th>" . $page_main["number"] . "</th><th>" . $tbl_sys_msg["desc"] . "</th></tr>\n";
    $day = $var["day"];
    $date = date("Y-m-d", time() - $day * 24 * 60 * 60);
    $server_id = $var["serverid"];
    $tbl = array();
    $role_id = ArgRoleId();
    if (!$role_id) {
        return true;
    }
    $qs = "select lm.le_uId, le.le_dtDateTime, let.let_uEventType, lm.lm_uMoney from tbl_log_money lm, tbl_log_event le force index(le_dtDateTime), tbl_log_event_type let where lm.le_uId = le.le_uId and le.le_uId = let.le_uId and let.let_uEventType in ({$circulation}) and le.le_dtDateTime > '{$date} 00:00:00' and lm.lcs_uId = {$role_id}";
    $result = MySQLQuery($qs, "Log", $server_id);
    while ($row = mysql_fetch_row($result)) {
        $le_uId = $row[0];
        $event_type = $row[2];
        $str = "";
        switch ($event_type) {
            case 114:
                //订单被成功购买邮件
                break;
            case 165:
                //代工成功
                break;
            case 81:
                //玩家邮件提取钱
                break;
            case 85:
                //玩家交易
                break;
            case 152:
                //拍卖平均分钱
                break;
        }
        printf("<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>\n", $row[1], $tbl_event_type[$row[2]], number_to_string($row[3]), $str);
    }
    echo "</table>\n";
    return true;
}
Esempio n. 2
0
    for ($i = 0, $j = 0, $k = 0; $i < count($num); $i++) {
        if ($j == 0) {
            $string = $xx[$k++] . ' ' . $string;
        }
        if (isset($num[$i + 1]) && $j == 0) {
            $temp = $num[$i + 1] * 10 + $num[$i];
            if ($temp > 9 && $temp < 20) {
                $string = $tenth[1][$num[$i]] . ' ' . $string;
            } else {
                $string = $tenth[$num[$i + 1]] . ' ' . $oneth[$num[$i]] . ' ' . $string;
            }
            $j = $j + 2;
            $i++;
        } elseif ($j == 0) {
            $string = $oneth[$num[$i]] . ' ' . $string;
            $j++;
        } else {
            if ($num[$i] != 0) {
                $string = $oneth[$num[$i]] . ' hundred ' . $string;
            }
            $j++;
        }
        if ($j == 3) {
            $j = 0;
        }
    }
    echo $string;
}
if (isset($_GET['input-string']) && !empty($_GET['input-string'])) {
    number_to_string($_GET['input-string']);
}
Esempio n. 3
0
function ShowVirWealthLog_Desc($event_type, $event_id, $server_id)
{
    global $tbl_log_desc;
    $des = "";
    switch ($event_type) {
        case 1:
            $qs = "select lng_sNpcName from tbl_log_npc_giver where le_uId = {$event_type} group by lng_sNpcName";
            $rs = MySQLQuery($qs, "Log", $server_id);
            while ($row = mysql_fetch_row($rs)) {
                $des .= sprintf($tbl_log_desc[1][0] . "<br/>", Lan_NPC_GetDisplayName(Local2UTF8($row[0]), false));
            }
            $qs = "select count(*), lis.lis_sName from tbl_log_item_taker lit, tbl_log_item_static lis where lit.lis_uId = lis.lis_uId and lit.le_uId = {$event_id} group by lis.lis_sName";
            $rs = MySQLQuery($qs, "Log", $server_id);
            while ($row = mysql_fetch_row($rs)) {
                $des .= sprintf($tbl_log_desc[1][1] . "<br/>", $row[0], Lan_Item_GetDisplayName(Local2UTF8($row[1]), "", false));
            }
            $qs = "select lm_uMoneyType, sum(lm_uMoney) from tbl_log_money where le_uId = {$event_id} and lm_uMoneyType < 3 group by lm_uMoneyType";
            $rs = MySQLQuery($qs, "Log", $server_id);
            while ($row = mysql_fetch_row($rs)) {
                global $tbl_money_binding;
                $des .= sprintf($tbl_log_desc[1][2] . "<br/>", $tbl_money_binding[$row[0]], money_to_string(0 - $row[1]));
            }
            $qs = "select lj_uType, sum(lj_uPoint) from tbl_log_jifenpoint where le_uId = {$event_id} group by lj_uType";
            $rs = MySQLQuery($qs, "Log", $server_id);
            while ($row = mysql_fetch_row($rs)) {
                global $tbl_jifen;
                $des .= sprintf($tbl_log_desc[1][2] . "<br/>", $tbl_jifen[$row[0]], number_to_string(0 - $row[1]));
            }
            break;
        case 2:
            $qs = "select lnt_sNpcName from tbl_log_npc_taker where le_uId = {$event_id} group by lnt_sNpcName";
            $rs = MySQLQuery($qs, "Log", $server_id);
            if ($row = mysql_fetch_row($rs)) {
                global $tbl_money_binding;
                $des .= sprintf($tbl_log_desc[2][0] . "<br/>", Lan_NPC_GetDisplayName(Local2UTF8($row[0]), false));
            }
            $qs = "select count(*), lis.lis_sName from tbl_log_item_giver lig, tbl_log_item_static lis where lig.lis_uId = lis.lis_uId and lig.le_uId = {$event_id} group by lis.lis_sName";
            $rs = MySQLQuery($qs, "Log", $server_id);
            if ($row = mysql_fetch_row($rs)) {
                global $tbl_money_binding;
                $des .= sprintf($tbl_log_desc[2][1] . "<br/>", $row[0], Lan_Item_GetDisplayName(Local2UTF8($row[1]), "", false));
            }
            $qs = "select lm_uMoneyType, sum(lm_uMoney) from tbl_log_money where le_uId = {$event_id} and lm_uMoneyType < 3 group by lm_uMoneyType";
            $rs = MySQLQuery($qs, "Log", $server_id);
            if ($row = mysql_fetch_row($rs)) {
                global $tbl_money_binding;
                $des .= sprintf($tbl_log_desc[2][2] . "<br/>", $tbl_money_binding[$row[0]], money_to_string($row[1]));
            }
            $qs = "select lj_uType, sum(lj_uPoint) from tbl_log_jifenpoint where le_uId = {$event_id} group by lj_uType";
            $rs = MySQLQuery($qs, "Log", $server_id);
            if ($row = mysql_fetch_row($rs)) {
                global $tbl_jifen;
                $des .= sprintf($tbl_log_desc[2][2] . "<br/>", $tbl_jifen[$row[0]], number_to_string($row[1]));
            }
            break;
        case 3:
            $qs = "select lpg.lcs_uId, lpt.lcs_uId from tbl_log_player_taker lpt, tbl_log_player_giver lpg where lpg.le_uId = {$event_id} and lpt.le_uId = {$event_id}";
            $rs = MySQLQuery($qs, "Log", $server_id);
            if ($row = mysql_fetch_row($rs)) {
                $des .= sprintf($tbl_log_desc[3][0], GetRoleName($row[0], $server_id));
                $des .= sprintf($tbl_log_desc[3][1], GetRoleName($row[1], $server_id));
                $des .= $tbl_log_desc[3][2];
            }
            break;
        case 16:
            $qs = "select lmk.lm_uCount,lis.lis_sName,lmk.lm_uPrice,lmk.mos_uId from tbl_log_market lmk,tbl_log_item_giver lig,tbl_log_item_static lis where lmk.le_uId = {$event_id} and lig.le_uId = {$event_id} and lig.lis_uId = lis.lis_uId";
            $rs = MySQLQuery($qs, "Log", $server_id);
            if ($row = mysql_fetch_row($rs)) {
                $mos = $row[3];
                $des .= sprintf($tbl_log_desc[16][0], $row[0], Lan_Item_GetDisplayName(Local2UTF8($row[1]), "", false), money_to_string($row[2]));
                $query = "select le.le_dtDateTime, lpt.lcs_uId from tbl_log_market_item lmi, tbl_log_event le, tbl_log_event_type let, tbl_log_player_taker lpt where le.le_uId = lmi.le_uId and le.le_uId = let.le_uId and le.le_uId = lpt.le_uId and let.let_uEventType = 18 and lmi.mos_uId = {$mos}";
                $rs = MySQLQuery($query, "Log", $server_id);
                if ($r = mysql_fetch_row($rs)) {
                    $des .= sprintf("<br/>" . $tbl_log_desc[16][1], $r[0], GetRoleName($r[1], $server_id));
                }
            }
            break;
        case 18:
            $qs = "select lpg.lcs_uId, lmk.lm_uCount, lis.lis_sName, lmk.lm_uPrice from tbl_log_market lmk, tbl_log_market_item lmi, tbl_log_player_giver lpg, tbl_log_item_taker lit, tbl_log_item_static lis where lmi.le_uId = {$event_id} and lit.le_uId = {$event_id} and lit.lis_uId = lis.lis_uId and lmk.mos_uId = lmi.mos_uId and lpg.le_uId = lmk.le_uId";
            $rs = MySQLQuery($qs, "Log", $server_id);
            if ($row = mysql_fetch_row($rs)) {
                $des .= sprintf($tbl_log_desc[18][0], GetRoleName($row[0], $server_id), $row[1], Lan_Item_GetDisplayName(Local2UTF8($row[2]), "", false), money_to_string($row[3]));
            }
            break;
        case 42:
            $qs = "select lqf_sQuestName from tbl_log_quest_finish where le_uId = {$event_id}";
            $rs = MySQLQuery($qs, "Log", $server_id);
            if ($row = mysql_fetch_row($rs)) {
                $des .= sprintf($tbl_log_desc[42], Lan_Quest_GetDisplayName(Local2UTF8($row[0]), false));
            }
            break;
        case 85:
            $qs = "select lpt.lpt_uFromCharId,lpt.lpt_uToCharId, lpt.lpt_uMoney, lis.lis_sName, count(*), lis.lis_uType from tbl_log_player_trade lpt left join tbl_log_item_static lis on lpt.lis_uId = lis.lis_uId where lpt.le_uId = {$event_id} group by lpt_uFromCharId, lis.lis_sName";
            $rs = MySQLQuery($qs, "Log", $server_id);
            $role_id1 = 0;
            $role_id2 = 0;
            $money1 = "";
            $money2 = "";
            $goods1 = array();
            $goods2 = array();
            while ($row = mysql_fetch_row($rs)) {
                if ($role_id1 == 0) {
                    $role_id1 = $row[0];
                }
                if ($role_id2 == 0) {
                    $role_id2 = $row[1];
                }
                if ($role_id1 == $row[0]) {
                    if ($money1 == "" && $row[2] != 0) {
                        $money1 = sprintf($tbl_log_desc[85][3], money_to_string($row[2]));
                    }
                    if ($row[3] != NULL) {
                        array_push($goods1, sprintf($tbl_log_desc[85][2], $row[4], Lan_Item_GetDisplayName(Local2UTF8($row[3]), $row[5], false)));
                    }
                } else {
                    if ($money2 == "" && $row[2] != 0) {
                        $money2 = sprintf($tbl_log_desc[85][3], money_to_string($row[2]));
                    }
                    if ($row[3] != NULL) {
                        array_push($goods2, sprintf($tbl_log_desc[85][2], $row[4], Lan_Item_GetDisplayName(Local2UTF8($row[3]), $row[5], false)));
                    }
                }
            }
            if ($money1 != "") {
                array_push($goods1, $money1);
            }
            if ($money2 != "") {
                array_push($goods2, $money2);
            }
            $role_name1 = GetRoleName($role_id1, $server_id);
            $role_name2 = GetRoleName($role_id2, $server_id);
            $des .= sprintf($tbl_log_desc[85][0], $role_name1, $role_name2) . sprintf($tbl_log_desc[85][1], implode($tbl_log_desc[85][4], $goods1), implode($tbl_log_desc[85][4], $goods2));
        case 153:
            $qs = "select lng_sNpcName, count(*), lis.lis_sName, lm_uMoneyType, sum(lm_uMoney) from tbl_log_npc_giver lng, tbl_log_money lm, tbl_log_item_taker lit, tbl_log_item_static lis where lng.le_uId = lm.le_uId and lm.le_uId = lit.le_uId and lit.lis_uId = lis.lis_uId and lm.le_uId = {$event_id} and lm_uMoneyType < 3 group by lm.le_uId";
            $rs = MySQLQuery($qs, "Log", $server_id);
            if ($row = mysql_fetch_row($rs)) {
                global $tbl_money_binding;
                $des .= sprintf($tbl_log_desc[153], Lan_NPC_GetDisplayName(Local2UTF8($row[0]), false), $row[1], Lan_Item_GetDisplayName(Local2UTF8($row[2]), "", false), $tbl_money_binding[$row[3]], money_to_string(abs($row[4])));
            }
            break;
        case 10002:
            $des = $tbl_log_desc[10002];
            break;
        default:
            $des .= "";
            break;
    }
    return $des;
}