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


PHP Character::GetClassName方法代码示例

本文整理汇总了PHP中Character::GetClassName方法的典型用法代码示例。如果您正苦于以下问题:PHP Character::GetClassName方法的具体用法?PHP Character::GetClassName怎么用?PHP Character::GetClassName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Character的用法示例。


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

示例1: ViewUserInfo


//.........这里部分代码省略.........
     for ($i = 0; $i < $NumGameCurrencies; $i++) {
         $GameCurrencies[$i] = $db->GetRow();
     }
     foreach ($GameCurrencies as $Key1 => $Value1) {
         $CurrencyAmount = $this->acc->GetGameCreditAmount($memb___id, $Value1['idx'], $db);
         $GameCreditsArray[$Value1['idx']]['value'] = $CurrencyAmount;
         $GameCreditsArray[$Value1['idx']]['name'] = $Value1['name'];
         $GameCreditsArray[$Value1['idx']]['id'] = $Value1['idx'];
     }
     $db->Query("SELECT {$SQLVIPDateColumn} FROM MEMB_INFO WHERE memb___id = '{$memb___id}'");
     $thisMembData = $db->GetRow();
     $return .= "\n\t\t<td valign=\"top\">\n\t\t\t<table class=\"UserInfoServerTable\">\n\t\t\t<tr>\n\t\t\t  <td align=\"right\" valign=\"top\">{$UsersMessage010}</td><td>";
     $VipId = $this->acc->GetVip($memb___id, $db);
     $vip0 = $vip1 = $vip2 = $vip3 = "";
     switch ($VipId) {
         case "0":
             $vip0 = " selected=\"selected\" ";
             break;
         case "1":
             $vip1 = " selected=\"selected\" ";
             break;
         case "2":
             $vip2 = " selected=\"selected\" ";
             break;
         case "3":
             $vip3 = " selected=\"selected\" ";
             break;
     }
     $return .= "\n\t\t\t  <select name=\"VipLevel\" id=\"VipLevel\">\n\t\t\t\t<option value=\"0\" {$vip0}>{$VIP_0_Name}</option>\n\t\t\t\t<option value=\"1\" {$vip1}>{$VIP_1_Name}</option>\n\t\t\t\t<option value=\"2\" {$vip2}>{$VIP_2_Name}</option>\n\t\t\t\t<option value=\"3\" {$vip3}>{$VIP_3_Name}</option>\n\t\t\t  </select>\n\t\t\t  </td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t  <td align=\"right\" valign=\"top\">{$UsersMessage011}</td><td nowrap=\"nowrap\">";
     if (empty($thisMembData[$SQLVIPDateColumn])) {
         $DueDay = date("d");
         $DueMonth = date("m");
         $DueYear = date("Y");
     } else {
         $format = strtotime(substr($thisMembData[$SQLVIPDateColumn], 0, 20));
         $DueDay = date("d", $format);
         $DueMonth = date("m", $format);
         $DueYear = date("Y", $format);
     }
     $return .= "<input name=\"DueDay\" type=\"text\" id=\"DueDay\" size=\"1\" maxlength=\"2\" value=\"{$DueDay}\">/<input name=\"DueMonth\" type=\"text\" id=\"DueMonth\" size=\"1\" maxlength=\"2\" value=\"{$DueMonth}\">/<input name=\"DueYear\" type=\"text\" id=\"DueYear\" size=\"2\" maxlength=\"4\" value=\"{$DueYear}\"></td>\n\t\t\t</tr>";
     $return .= "<tr><td align=\"center\" colspan=\"2\"> <hr /> </td></tr>";
     //VIP ITEMS
     $return .= "\n\t\t\t<tr>\n\t\t\t  <td align=\"right\" valign=\"top\">{$UsersMessage064}</td><td>";
     $VipItem = $this->acc->GetVipItem($memb___id, $db);
     $vip0 = $vip1 = "";
     switch ($VipItem) {
         case "0":
             $vip0 = " selected=\"selected\" ";
             break;
         case "1":
             $vip1 = " selected=\"selected\" ";
             break;
     }
     $return .= "\n\t\t\t  <select name=\"VipItem\" id=\"VipItem\">\n\t\t\t\t<option value=\"0\" {$vip0}>{$UsersMessage063}</option>\n\t\t\t\t<option value=\"1\" {$vip1}>{$UsersMessage062}</option>\n\t\t\t  </select>\n\t\t\t  </td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t  <td align=\"right\" valign=\"top\">{$UsersMessage011}</td><td nowrap=\"nowrap\">";
     $VipItemsDueDate = $this->acc->GetVipItemDueDate($memb___id, $db);
     if (empty($VipItemsDueDate)) {
         $DueDay = date("d");
         $DueMonth = date("m");
         $DueYear = date("Y");
     } else {
         $format = strtotime($VipItemsDueDate);
         $DueDay = date("d", $format);
         $DueMonth = date("m", $format);
         $DueYear = date("Y", $format);
     }
     $return .= "<input name=\"ItemDueDay\" type=\"text\" id=\"ItemDueDay\" size=\"1\" maxlength=\"2\" value=\"{$DueDay}\">/<input name=\"ItemDueMonth\" type=\"text\" id=\"ItemDueMonth\" size=\"1\" maxlength=\"2\" value=\"{$DueMonth}\">/<input name=\"ItemDueYear\" type=\"text\" id=\"ItemDueYear\" size=\"2\" maxlength=\"4\" value=\"{$DueYear}\"></td>\n\t\t\t</tr>";
     $return .= "<tr><td align=\"center\" colspan=\"2\"> <hr /> </td></tr>";
     $return .= "\n\t\t\t<tr><td colspan=\"2\">\n\t\t\t\n\t\t\t<fieldset>\n\t\t\t\t<legend>{$UsersMessage012}</legend>\n\t\t\t\t<table class=\"UserInfoCharsTable\" align=\"center\">\n\t\t\t\t   <tr>\n\t\t\t\t\t<th align=\"center\" valign=\"middle\">{$UsersMessage013}</th>\n\t\t\t\t\t<th align=\"center\" valign=\"middle\">{$UsersMessage014}</th>\n\t\t\t\t\t<th align=\"center\" valign=\"middle\">{$UsersMessage015}</th>\n\t\t\t\t\t<th align=\"center\" valign=\"middle\">{$UsersMessage016}</th>\n\t\t\t\t   </tr>\n\t\t\t\t\t";
     $Characters = $this->acc->GetCharacters($memb___id, $db);
     foreach ($Characters as $Key2 => $Value2) {
         $return .= "\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t  <td align=\"center\" valign=\"middle\">";
         if ($mn->GetUserLevel($_SESSION['ManagerId'], $db) < $ManagerCharEditLevel) {
             $return .= $Value2['Name'];
         } else {
             $return .= "<a href=\"javascript:;\" onclick=\"CharInfo('" . $Value2['Name'] . "')\">" . $Value2['Name'] . "</a>";
         }
         $return .= "\n\t\t\t\t\t\t  </td>\n\t\t\t\t\t\t  <td align=\"center\" valign=\"middle\">" . $Value2['cLevel'] . "</td>\n\t\t\t\t\t\t  <td align=\"center\" valign=\"middle\">" . $Value2[$SQLResetsColumn] . "</td>\n\t\t\t\t\t\t  <td align=\"center\" valign=\"middle\">" . $ch->GetClassName($Value2['Class'], "tiny") . "</td>\n\t\t\t\t\t\t</tr>";
     }
     $return .= "\n\t\t\t\t</table>\n\t\t\t</fieldset>\n\t\t\t</td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t</td>\n\t\t\n\t\t<td valign=\"top\">\n\t\t\t<fieldset>\n\t\t\t<legend>{$UsersMessage145}</legend>\n\t\t\t<table class=\"UserInfoServerTable\" align=\"center\">";
     foreach ($Currencies as $Key1 => $Value1) {
         $FieldName = "Credit_" . $CreditsArray[$Value1['idx']]['id'];
         $return .= "\n\t\t\t\t<tr>\n\t\t\t\t  <td align=\"right\" valign=\"top\">" . $CreditsArray[$Value1['idx']]['name'] . ":</td>\n\t\t\t\t  <td align=\"left\">\n\t\t\t\t\t<input type=\"text\" name=\"{$FieldName}\" id=\"{$FieldName}\" value=\"" . $CreditsArray[$Value1['idx']]['value'] . "\" size=\"4\" />\n\t\t\t\t  </td>\t\t\t\t  \n\t\t\t\t</tr>\n\t\t\t\t";
     }
     $return .= "<tr><td align=\"center\" colspan=\"2\"> <hr /> </td></tr>";
     foreach ($GameCurrencies as $Key1 => $Value1) {
         $FieldName = "GameCredit_" . $GameCreditsArray[$Value1['idx']]['id'];
         $return .= "\n\t\t\t\t<tr>\n\t\t\t\t  <td align=\"right\" valign=\"top\">" . $GameCreditsArray[$Value1['idx']]['name'] . ":</td>\n\t\t\t\t  <td align=\"left\">\n\t\t\t\t\t<input type=\"text\" name=\"{$FieldName}\" id=\"{$FieldName}\" value=\"" . $GameCreditsArray[$Value1['idx']]['value'] . "\" size=\"4\" />\n\t\t\t\t  </td>\t\t\t\t  \n\t\t\t\t</tr>\n\t\t\t\t";
     }
     $return .= "\n\t\t\t<tr><td align=\"center\" colspan=\"2\"> <hr /> </td></tr>\n\t\t\t</table>\n\t\t\t</fieldset>\n\t\t\t\n\t\t\t<table align=\"center\">\n\t\t\t<br />\n\t\t\t<tr>\n\t\t\t\t<td colspan=\"2\" align=\"center\"><input type=\"button\" value=\"Gravar\" onclick=\"SaveServerData('{$memb___id}')\" /></td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t</td>";
     $return .= "</tr></table></fieldset><hr>";
     $return .= "<fieldset><legend>{$UsersMessage031}</legend>\n\t\t<table class=\"UserInfoDonationsTable\">\n\t\t  <tr>\n\t\t\t<th align=\"center\">{$UsersMessage032}</th>\n\t\t\t<th align=\"center\">{$UsersMessage033}</th>\n\t\t\t<th align=\"center\">{$UsersMessage034}</th>\n\t\t\t<th align=\"center\">{$UsersMessage035}</th>\n\t\t  </tr>";
     $db->Query("SELECT * FROM Z_Income WHERE memb___id = '{$memb___id}' AND status = '1' ORDER BY date_confirm DESC");
     $NumDon = $db->NumRows();
     for ($i = 0; $i < $NumDon; $i++) {
         $data = $db->GetRow();
         $return .= "\n\t\t\t  <tr>\n\t\t\t    <td align=\"center\">" . $dateClass->DateFormat($data['date_confirm']) . "</td>\n\t\t\t\t<td align=\"center\">{$UsersMessage022}" . $data['amount'] . "{$UsersMessage023}</td>\n\t\t\t\t<td>" . $data['bank'] . "</td>\n\t\t\t\t<td>" . $data['data'] . "</td>\n\t\t\t  </tr>";
     }
     $return .= "</table></fieldset><hr />";
     return $return;
 }
开发者ID:BieeeLC,项目名称:OpenWeb,代码行数:101,代码来源:Users.class.php

示例2: DrawTopOnlineTable

 function DrawTopOnlineTable($param1)
 {
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Config/Main.php";
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Config/SQL.php";
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Config/VIP_.php";
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Config/TopReset.php";
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Config/TopOnline.php";
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Language/{$MainLanguage}/Rankings.php";
     require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/Account.class.php";
     $acc = new Account($this->db);
     $rows = $param1;
     if ($TopOnlineMaxResults > 0 && $rows > $TopOnlineMaxResults) {
         return "";
     }
     $return = "\n\t\t<table class=\"RankingOnlineTable\">\n\t\t\t<tr>\n\t\t\t\t<th id=\"Position\">{$RankingMessage008}</th>\n\t\t\t\t<th id=\"Name\">{$RankingMessage009}</th>\n\t\t\t\t<th id=\"OnlineTime\">{$RankingMessage069}</th>\n\t\t\t\t<th id=\"Resets\">{$RankingMessage011}</th>\n\t\t\t\t";
     if ($TopOnlineShowClass) {
         $return .= "<th id=\"Class\">{$RankingMessage012}</th>";
     }
     if ($TopOnlineShowGuild) {
         require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/Guild.class.php";
         $gd = new Guild();
         $guild = $gd->GetGuildMemberArray($this->db);
         $return .= "<th id=\"Guild\">{$RankingMessage013}</th>";
     }
     if ($TopOnlineShowStatus) {
         $OnlineCharacters = $acc->GetConnectedCharacters($this->db);
         $return .= "<th id=\"Status\">{$RankingMessage014}</th>";
     }
     if ($TopOnlineShowVip) {
         $return .= "<th id=\"Vip\">{$RankingMessage016}</th>";
     }
     $return .= "\n\t\t\t</tr>";
     if (!is_numeric($rows) && $rows != "*") {
         die;
     }
     if ($rows == "*") {
         $rows = "";
     } else {
         $rows = "TOP {$rows}";
     }
     $query = "\n\t\t\tSELECT {$rows} i.{$SQLVIPColumn} as Vip, c.Name, c.{$SQLResetsColumn} as Resets, c.Class, c.{$SQLOnlineTimeColumn} as Online, RANK() OVER(ORDER BY c.{$SQLOnlineTimeColumn} DESC) as Rank\n\t\t\tFROM Character as c, MEMB_INFO as i\n\t\t\tWHERE c.CtlCode < 8 AND c.AccountID = i.memb___id\n\t\t\tORDER BY c.{$SQLOnlineTimeColumn} DESC\n\t\t\t";
     $this->db->Query($query);
     $NumRows = $this->db->NumRows();
     for ($i = 0; $i < $NumRows; $i++) {
         $CharData[$i] = $this->db->GetRow();
     }
     for ($i = 0; $i < $NumRows; $i++) {
         $num = $i % 2 + 1;
         $data = $CharData[$i];
         if ($SQLOnlineTimeDivisor > 0) {
             $onlineTime = number_format($data['Online'] / $SQLOnlineTimeDivisor, 0, "", ".") . $SQLOnlineTimeSufix;
         } else {
             $onlineTime = number_format($data['Online'], 0, "", ".") . $SQLOnlineTimeSufix;
         }
         $return .= "\n\t\t\t\t<tr class=\"RankingOnlineTableRow{$num}\">\n\t\t\t\t<td id=\"Position\">" . $data['Rank'] . "{$RankingMessage017}</td>\n\t\t\t\t<td id=\"Name\"><a href=\"/" . $_SESSION['SiteFolder'] . "?c=CharInfo/" . $data['Name'] . "\">" . $data['Name'] . "</a></td>\n\t\t\t\t<td id=\"OnlineTime\">" . $onlineTime . "</td>\n\t\t\t\t<td id=\"Resets\">" . $data['Resets'] . "</td>\n\t\t\t\t";
         if ($TopOnlineShowClass) {
             require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/Character.class.php";
             $ch = new Character();
             $class = $ch->GetClassName($data['Class'], $TopOnlineShowClassMode);
             $return .= "<td id=\"Class\">" . $class . "</td>";
         }
         if ($TopOnlineShowGuild) {
             if (!empty($guild[$data['Name']])) {
                 $guildName = $guild[$data['Name']];
             } else {
                 $guildName = "-";
             }
             $return .= "<td id=\"Guild\">" . $guildName . "</td>";
         }
         if ($TopOnlineShowStatus) {
             $status = in_array($data['Name'], $OnlineCharacters) ? $RankingMessage018 : $RankingMessage019;
             $return .= "<td id=\"Status\">" . $status . "</td>";
         }
         if ($TopOnlineShowVip) {
             $vip = $data['Vip'];
             $vip = $acc->GetVipName($vip);
             $return .= "<td id=\"Vip\">{$vip}</td>";
         }
         $return .= "\n\t\t\t</tr>";
     }
     $return .= "</table>";
     return $return;
 }
开发者ID:BieeeLC,项目名称:OpenWeb,代码行数:83,代码来源:Rankings.class.php


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