function GetFriends($var, $gm) { global $tbl_role_all_detail; echo "<h1>{$tbl_role_all_detail['16']}</h1>\n"; ReturnAndBack(); Reload(); $role_id = ArgRoleId(); echo "<table class='list_table'>\n"; echo sprintf("<tr><td>{$tbl_role_all_detail['18']}</td></tr>\n", ArgRoleName() . "(" . $role_id . ")"); echo "</table>\n"; global $tbl_role_friends, $tbl_camp, $tbl_class, $tbl_sex, $tbl_sys_msg; $serverid = $var["serverid"]; if (!$role_id) { return true; } echo "<h1>" . $tbl_role_friends[0] . "</h1>\n"; echo "<table class='list_table'>\n"; printf("<tr><th>%s</th><th>%s</th><th style='width:100px;'>%s</th><th style='width:100px;'>%s</th><th style='width:100px;'>%s</th><th style='width:100px;'>%s</th></tr>\n", $tbl_role_friends[1][0], $tbl_role_friends[1][1], $tbl_role_friends[1][2], $tbl_role_friends[1][3], $tbl_role_friends[1][4], $tbl_role_friends[1][5]); $rs = MySQLQuery("select c.c_sName, cs.cs_uCamp, cs.cs_uClass, cb.cb_uLevel, cs.cs_uSex, fc.fc_sName from tbl_player_friends pf, tbl_friends_class fc, tbl_char c, tbl_char_basic cb, tbl_char_static cs where pf.fc_uId = fc.fc_uId and pf.cs_uId = fc.cs_uId and pf.pf_uFriendId = c.cs_uId and fc.fc_uId<>2 and pf.cs_uId='{$role_id}' and cb.cs_uId = c.cs_uId and cs.cs_uId = c.cs_uId", "Game", $serverid); while ($row = mysql_fetch_row($rs)) { if ($row[5] == UTF82Local($tbl_role_friends[1][6])) { $row[5] = $tbl_role_friends[1][6]; } printf("<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>\n", $row[5], $row[0], $tbl_camp[$row[1]], $tbl_class[$row[2]], $row[3], $tbl_sex[$row[4]]); } echo "</table>\n"; echo "<h1>" . $tbl_role_friends[2] . "</h1>\n"; echo "<table class='list_table'>\n"; printf("<tr><th>%s</th><th style='width:100px;'>%s</th><th style='width:100px;'>%s</th><th style='width:100px;'>%s</th><th style='width:100px;'>%s</th></tr>\n", $tbl_role_friends[3][0], $tbl_role_friends[3][1], $tbl_role_friends[3][2], $tbl_role_friends[3][3], $tbl_role_friends[3][4]); $rs = MySQLQuery("select c.c_sName, cs.cs_uCamp, cs.cs_uClass, cb.cb_uLevel, cs.cs_uSex from tbl_player_friends pf, tbl_char c, tbl_char_basic cb, tbl_char_static cs where pf.pf_uFriendId = c.cs_uId and pf.cs_uId='{$role_id}' and pf.fc_uId=2 and cb.cs_uId = c.cs_uId and cs.cs_uId = c.cs_uId", "Game", $serverid); while ($row = mysql_fetch_row($rs)) { printf("<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>\n", $row[0], $tbl_camp[$row[1]], $tbl_class[$row[2]], $row[3], $tbl_sex[$row[4]]); } echo "</table>\n"; echo "<h1>" . $tbl_role_friends[4] . "</h1>\n"; echo "<table class='list_table'>\n"; printf("<tr><th>%s</th><th>%s</th><th>%s</th></tr>\n", $tbl_role_friends[5][0], $tbl_role_friends[5][1], $tbl_role_friends[5][2]); $rs = MySQLQuery("select fg.fg_sName,gm1.gm_uIdentity,count(*) from tbl_group_manager gm1,tbl_group_manager gm2,tbl_friends_group fg where gm1.cs_uId='{$role_id}' and gm1.fg_uId = gm2.fg_uId and gm1.fg_uId = fg.fg_uId group by gm2.fg_uId", "Game", $serverid); while ($row = mysql_fetch_row($rs)) { printf("<tr><td>%s</td><td>%s</td><td>%d</td></tr>\n", $row[0], $tbl_role_friends[5][3][intval($row[1])], $row[2]); } echo "</table>\n"; echo "<h1>" . $tbl_role_friends[6] . "</h1>\n"; echo "<table class='list_table'>\n"; printf("<tr><th>%s</th><th>%s</th><th>%s</th></tr>\n", $tbl_role_friends[7][0], $tbl_role_friends[7][1], $tbl_role_friends[7][2]); $rs = MySQLQuery("select t.t_sName, mt1.mt_sPosition, count(*) from tbl_member_tong mt1, tbl_tong t, tbl_member_tong mt2 where mt1.t_uId = t.t_uId and t.t_uId = mt2.t_uId and mt1.cs_uId = '{$role_id}' group by t.t_uId", "Game", $serverid); while ($row = mysql_fetch_row($rs)) { global $tbl_tong_pos; printf("<tr><td>%s</td><td>%s</td><td>%d</td></tr>\n", $row[0], $tbl_tong_pos[intval($row[1])], $row[2]); } echo "</table>\n"; return true; }
function SearchTaskInfo($var, $gm) { global $tbl_list_task; $serverid = $var["serverid"]; $role_id = ArgRoleId(); if (!$role_id) { return true; } $query_string = "select q_sName,q_state,FROM_UNIXTIME(q_tAcceptTime),FROM_UNIXTIME(q_tFinishTime) from tbl_quest where cs_uId=" . $role_id . " and q_sName = '" . UTF82Local($var["quest_name"]) . "'"; $result = MySQLQuery($query_string . " order by q_tAcceptTime", "Game", $serverid); $tbl_content = array(); while ($row = mysql_fetch_row($result)) { $row[1] = $tbl_list_task[intval($row[1])]; $tbl_size = count($tbl_content); $tbl_content[$tbl_size] = $row; } if (!IsDownload($var)) { RetGetTaskInfo($tbl_content, $role_name, $role_id); return true; } return true; }
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; }
function GetRoleAllDetail($var, $gm) { global $tbl_role_all_detail, $tbl_sys_msg; $serverid = $var["serverid"]; $js_str = <<<_js_str <script type="text/javascript"> function toItem(){ \tdocument.form1.action_name.value = "201"; \tdocument.form1.submit(); } function toFriend(){ \tdocument.form1.action_name.value = "199"; \tdocument.form1.submit(); } function toRealTime(){ \tdocument.form1.action_name.value = "204"; \tdocument.form1.submit(); } </script> _js_str; echo $js_str . "\n"; echo "<h1>{$tbl_role_all_detail['10']}</h1>\n"; ReturnAndBack(); Reload(); form($var, $gm); $role_id = ArgRoleId(); echo "<input type='hidden' name='role_str' value='" . $var["role_str"] . "'/>"; echo "<input type='hidden' name='role_item' value='" . $var["role_item"] . "'/>"; echo "<table class='list_table'>\n"; echo sprintf("<tr><td>{$tbl_role_all_detail['0']}</td></tr>\n", ArgRoleName() . "(" . $role_id . ")"); echo "<tr><td><a href='#' onclick='toItem()'>{$tbl_role_all_detail['15']}</a></td></tr>\n"; echo "<tr><td><a href='#' onclick='toFriend()'>{$tbl_role_all_detail['16']}</a></td></tr>\n"; echo "</table>\n"; echo "</form>\n"; echo "<h2>{$tbl_role_all_detail['1']}</h2>\n" . GetRoleDetail($role_id, $serverid); echo "<h2>{$tbl_role_all_detail['19']}</h2>\n" . GetRoleLogin($role_id, $serverid); echo "<h2>{$tbl_role_all_detail['2']}</h2>\n" . GetRoleLocation($role_id, $serverid); echo "<h2>{$tbl_role_all_detail['11']}</h2>\n" . GetRoleSort($role_id, $serverid); echo "<h2>{$tbl_role_all_detail['12']}</h2>\n" . GetRoleAppellation($role_id, $serverid); echo "<h2>{$tbl_role_all_detail['6']}</h2>\n" . GetRoleSkill($role_id, $serverid); return true; }
function GetRoleTeamLog($var, $gm) { global $tbl_sys_msg, $page_main, $tbl_log_db, $tbl_serv_db, $tbl_team_log; $server_id = $var["serverid"]; LastLogTime(); $role_id = ArgRoleId(); if (!$role_id) { return true; } echo "<table class='list_table'>\n"; printf("<tr><th style='width:120px;'>%s</th><th>%s</th><th>%s</th><th>%s</th></tr>\n", $tbl_sys_msg["time"], $page_main["type"], $page_main["role_name"], $tbl_sys_msg["status"]); $qs = "select le.le_dtDateTime, let.let_uTeamId "; $qs .= "from tbl_log_player lp, tbl_log_event le, tbl_log_enter_team let "; $qs .= "where le.le_uId = lp.le_uId and le.le_uId = let.le_uId and "; $qs .= "lp.lcs_uId = '{$role_id}' " . getDateLimit($var, $server_id) . " "; $qs .= "order by le.le_uId"; $result = MySQLQuery($qs, "Log", $server_id); while ($row = mysql_fetch_row($result)) { $team_member = array(); printf("<tr><td>%s</td><td colspan='3'></td></tr>\n", $row[0]); $qs = "(select le.le_dtDateTime, 0, lp.lcs_uId from tbl_log_enter_team let, tbl_log_event le, tbl_log_player lp where let.le_uId = le.le_uId and lp.le_uId = le.le_uId and let.let_uTeamId = " . $row[1] . ")"; $qs .= "union"; $qs .= "(select le.le_dtDateTime, 1, lp.lcs_uId from tbl_log_leave_team llt, tbl_log_event le, tbl_log_player lp where llt.le_uId = le.le_uId and lp.le_uId = le.le_uId and llt.let_uTeamId = " . $row[1] . ")"; $qs .= "order by le_dtDateTime"; $rs = MySQLQuery($qs, "Log", $server_id); while ($r = mysql_fetch_row($rs)) { $role_name = GetRoleName($r[2], $server_id); if ($r[1] == "0") { $type = $tbl_sys_msg["enter"]; array_push($team_member, $role_name); } else { $type = $tbl_sys_msg["leave"]; $index = array_search($role_name, $team_member); unset($team_member[$index]); } printf("<tr style='color: #888;'><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>\n", $r[0], $type, $role_name, implode(", ", $team_member)); } } echo "</table>\n"; return true; }
function ChannelChatAllLog($var, $gm) { global $tbl_serv_db, $tbl_sys_msg, $page_main, $tbl_channel, $channel_id; echo "<script type='text/javascript' src='/js/page.js'></script>\n"; echo "<script type='text/javascript' src='/js/checkbox.js'></script>\n"; $serverid = $var["serverid"]; $role_id = ArgRoleId(); if (!$role_id) { return true; } $str = ""; if ($var["begin_time"] != null && $var["begin_time"] != "") { $str .= " and lcc_dtChatTIme >= '" . $var["begin_time"] . "'"; } if ($var["end_time"] != null && $var["end_time"] != "") { $str .= " and lcc_dtChatTIme <= '" . $var["end_time"] . "'"; } $qs = "select lcc_sMsg, lcc_dtChatTime, lcc_sChannelName from tbl_log_channel_chat where cs_uId = " . $role_id . $str; $rs = MySQLQuery($qs, "GameLog", $serverid); echo "<table class='list_table'>\n"; printf("<tr><th>%s</th><th>%s</th><th>%s</th></tr>\n", $tbl_sys_msg["time"], $page_main["content"], $page_main["channel"]); while ($row = mysql_fetch_row($rs)) { printf("<tr><td>%s</td><td>%s</td><td>%s</td></tr>\n", $row[1], ChannelString($row[0]), $tbl_channel[$channel_id[$row[2]]]); } echo "</table>\n"; return true; }