Exemple #1
0
 public static function usernameByCharname($szCharname)
 {
     core::$sql->changeDB("shard");
     $nCharID = char::charIDByCharname($szCharname);
     $nJID = core::$sql->getRow("select UserJID from _User where CharID='{$nCharID}'");
     core::$sql->changeDB("acc");
     return core::$sql->getRow("select StrUserID from TB_User where JID='{$nJID}'");
 }
Exemple #2
0
 public static function isCharNaked($szCharname)
 {
     core::$sql->changeDB('shard');
     $nCharID = char::charIDByCharname($szCharname);
     $hQuery = core::$sql->exec("select * from _Inventory where CharID='{$nCharID}'");
     $nSlot = 0;
     $bResult = true;
     while ($row = mssql_fetch_array($hQuery)) {
         if ($row['ItemID'] != '0') {
             $bResult = false;
             break;
         }
         if ($nSlot == 12) {
             break;
         }
         $nSlot++;
     }
     return $bResult;
 }
Exemple #3
0
 $jobType = char::jobTypeByID($hGuild);
 $hData = core::$sql->fetchArray("select * from _Char where CharID='{$nCharID}'");
 if (strlen($hData['NickName16']) < 2) {
     $hData['NickName16'] = "<b>None</b>";
 }
 $ownerStr = null;
 if ($core->aConfig['allowShowCharOwner'] == 1) {
     $ownerStr = "<td>Owner account</td>\r\n\t\t\t\t\t\t\t<td><a href='?pg=viewprofile&username={$szUsername}'>{$szUsername}</td>";
 }
 echo "<table valign='top' id='table-3'  border='0' cellpadding='5' cellspacing='3'>\r\n\r\n\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t<table border='0' cellpadding='0' cellspacing='0'>\r\n\t\t\t\t\t\t\t{$ownerStr}\r\n\t\t\t\t\t\t </table><br/>";
 /*
 for character gold add this line :
 <td>Gold</td><td>$hData[RemainGold]</td><tr/> 
 */
 $nGuildName = guild::guildNameByID($hData['GuildID']);
 $nCharID = char::charIDByCharname($_GET['name']);
 core::$sql->changeDB("log");
 $charstatus = core::$sql->exec("select top 1 EventID,EventTime from  _LogEventChar where CharID = '{$nCharID}' order by EventTime DESC");
 if (core::$sql->numRows("select top 1 EventID,EventTime from  _LogEventChar where CharID = '{$nCharID}' order by EventTime DESC") == 0) {
     $StatusIS = "<img src='img/status/offline.gif' /> Offline";
 } else {
     while ($row1 = mssql_fetch_array($charstatus)) {
         $charEvent = $row1['EventID'];
         switch ($charEvent) {
             case 4:
                 $StatusIS = "<img src='img/status/online.gif' /> Online";
                 break;
             case 6:
                 $StatusIS = "<img src='img/status/offline.gif' /> Offline";
                 break;
             default: