echo "\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t"; if ($core->aConfig['allowBuySP'] == 1) { echo "\t\t<td><a href='?pg=ucp&act=mychars&charname={$_GET['charname']}&char_act=buy_sp'>Buy skill points</a><br/></td>"; } echo "\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t</table>\r\n\t\t\t\t\t\t\t"; } echo "<br/><br/>"; misc::back(); break; } echo "Please, note, this function is still under development.<br/>"; if (char::getCharCount($_SESSION['username']) > 0) { $nJID = user::accountJIDbyUsername($_SESSION['username']); core::$sql->changeDB('shard'); $naChars = user::charIDsByUsername($_SESSION['username']); $naCharNames = char::charNamesByIDs($naChars); echo "<table id='table-3' border='0'><td>Char name</td><tr/>"; foreach ($naCharNames as $nElem) { echo "<td><a href='?pg=ucp&act=mychars&charname={$nElem}'>{$nElem}</td><tr/>"; } echo '</table>'; } else { echo "You don't have any characters on this account.<br/>"; } break; case 'myprofile': //module disabled if ($core->aConfig['allowMyProfile'] == 0) { echo "This module is currently disabled."; return; }
public static function viewProfile($szUsername) { $userData = core::$sql->fetchArray("select * from srcms_userprofiles where JID='" . user::accountJIDbyUsername($szUsername) . "'"); $gender = null; if ($userData['gender'] == '0') { $gender = "Male"; } else { $gender = "Female"; } $szRank = core::$sql->getRow("select whois from srcms_userprofiles where JID='" . user::accountJIDbyUsername($szUsername) . "'"); $szRank = user::getRankText($szRank); echo "\r\n\t\t\t\t<table id='table-3' border='1' cellpadding='0' cellspacing='0'>\r\n\t\t\t\t\t<form method='post'>\r\n\t\t\t\t\t<td>Username</td><td>{$szUsername}</td><tr/>\r\n\t\t\t\t\t<td>Rank</td><td>{$szRank}</td><tr/>\r\n\t\t\t\t\t<td>Gender</td><td>{$gender}</td><tr/>\r\n\t\t\t\t\t<td>Avatar</td><td><img src='{$userData['avatar']}'></img></td><tr/>\r\n\t\t\t\t\t<td>Skype</td><td>{$userData['skype']}</td><tr/>\r\n\t\t\t\t\t<td>MSN</td><td>{$userData['msn']}</td><tr/>\t\t\t\r\n\t\t\t\t\t</form>\r\n\t\t\t\t</table>\r\n\t\t\t\t"; global $core; if ($core->aConfig['allowShowCharOwner'] == 1) { //list characters $nChars = char::getCharCount($szUsername); if ($nChars > 0) { $naChars = user::charIDsByUsername($szUsername); $naCharNames = char::charNamesByIDs($naChars); echo "<br/><br/><b>Characters on account</b><table id='table-3' border='1'><td>Char name</td><tr/>"; foreach ($naCharNames as $nElem) { echo "<td><a href='?pg=rank&type=char&name={$nElem}'>{$nElem}</a></td><tr/>"; } echo "</table>"; } else { echo "<br/>This user has no characters.<br/>"; } if ($_SESSION['username'] == $szUsername) { return; } } if ($core->aConfig['allowMailbox'] == 1) { if (isset($_SESSION['username'])) { if (!isset($_POST['submit'])) { echo "<br/><b>Send private message</b><br/>\r\n\t\t\t\t\t\t\t<form method='post'>\r\n\t\t\t\t\t\t\tTo: <b>{$_GET['username']}</b><br/><br/>\r\n\t\t\t\t\t\t\t<input type='text' name='msgTitle' value='Message title'><br/>"; echo "\r\n\t\t\t\t\t\t\t<br/><textarea id='sendUserPrivMsgTextBox' name='msgText' rows='2' cols='100'>Type your message here</textarea><br/>\r\n\t\t\t\t\t\t\t<input type='submit' name='submit' value='Send'>\r\n\t\t\t\t\t\t\t</form>\r\n\t\t\t\t\t\t\t<script>CKEDITOR.replace( 'msgText' );</script>\r\n\t\t\t\t\t\t\t\t "; } else { user::sendWebPrivMsg($szUsername, $_SESSION['username'], $_POST['msgTitle'], $_POST['msgText']); } } else { echo "You must be logged in in order to send private messages.<br/>"; } } }