http://abilityuo.com/xxx/images/paperdoll.png
<?php
require("myrunuo.inc.php");
function skillimage($skillid, $skill)
{
if ($skill / 10 >= 100)
$temp = "g";
else
$temp = "";
$skillimage = "images/skills/{$skillid}{$temp}.gif";
return $skillimage;
}
function skillname($skillid, $skill)
{
global $skillnames;
if ($skill / 10 >= 100)
$temp = "Grandmaster:<br>";
else
$temp = "";
$skillname = $temp . $skillnames[$skillid];
return $skillname;
}
check_get($id, "id");
$id = intval($id);
echo <<<EOF
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Ability UO</title>
<meta http-equiv="Content-Type" content="text/html; CHARSET=iso-8859-1">
</head>
EOF;
$link = sql_connect();
if ($id) {
$result = sql_query($link, "SELECT char_name,char_nototitle FROM myrunuo_characters WHERE char_id=$id");
if (!(list($charname,$chartitle) = mysql_fetch_row($result))) {
echo "Invalid character ID!\n";
die();
}
mysql_free_result($result);
echo <<<EOF
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="0" align="left" valign="top">
<img src="http://95.130.170.36:8080/xxx/paperdoll.php?id=$id" width="232" height="297">
</td>
</tr>
<tr>
<td colspan="1" align="center">
<b>$charname</b>
<b>$chartitle</b>
</td>
</tr>
<tr>
EOF;
$result = sql_query($link, "SELECT skill_id,skill_value FROM myrunuo_characters_skills WHERE char_id=$id ORDER BY skill_value DESC LIMIT 3");
$num = 0;
while (list($skillid,$skill) = mysql_fetch_row($result)) {
$skillid = intval($skillid);
$skill = intval($skill);
$name = skillname($skillid, $skill);
// Fix for swapped skill IDs
if ($skillid == 47)
$skillid = 48;
else if ($skillid == 48)
$skillid = 47;
$image = skillimage($skillid, $skill);
echo <<<EOF
EOF;
$num++;
}
mysql_free_result($result);
while ($num < 3) {
echo " <td> </td>\n";
$num++;
}
echo " </tr>\n";
$result = sql_query($link, "SELECT myrunuo_guilds.guild_id,myrunuo_guilds.guild_name FROM myrunuo_characters INNER JOIN myrunuo_guilds ON myrunuo_characters.char_guild=myrunuo_guilds.guild_id WHERE myrunuo_characters.char_id=$id");
if (list($gid,$guild) = mysql_fetch_row($result)) {
$gid = intval($gid);
echo <<<EOF
<tr>
<td align="center" colspan="3">
<br><font face="Verdana, Arial" color="#000000" size="2"><b>Guild:</b> <a href="guild.php?id=$gid" style="color: Black">$guild</a></font>
</td>
</tr>
EOF;
}
mysql_free_result($result);
}
mysql_close($link);
echo <<<EOF
</table>
</body>
</html>
EOF;
?>
require_once "maincore.php";
$result = sql_query($link,
"SELECT
a.skill_id, a.skill_value, b.user_id, b.user_name, b.user_status,
FROM myrunuo_characters_skills a
LEFT JOIN ".DB_USERS." b on (a.PHP_FUSION_ID=b.user_id)
WHERE b.user_id=$id ORDER BY skill_value DESC LIMIT 3
");
$result = dbquery("SELECT * FROM table WHERE column='$id' ORDER BY col_name ASC LIMIT 0,25");
function render_page() {
global $userdata;
if (isset($userdata['user_avatar'] && $userdata['user_avatar'] && file_exists(IMAGES."avatars/".$userdata['user_avatar'])) {
echo "<img src='".IMAGES."avatars/".$userdata['user_avatar']."'>";
}
edited.
openside($userdata ['user_name']);
echo "<img src='".IMAGES."avatars/".$userdata['user_avatar']."'>";
;closeside();
if (iMEMBER) {
$msg_count = dbcount("(message_id)", DB_MESSAGES, "message_to='".$userdata['user_id']."' AND message_read='0' AND message_folder='0'");
openside($userdata ['[bcolor=#ff3300]user_name[/bcolor]'])
openside($userdata ['[bcolor=#ff3300]user_name[/bcolor]'])
Quote
the user_name column is in fusion sql I know but I will add a column to game's sql table that contains only user emails and user names.
if (!defined('GAME_TABLE')) {
define('GAME_TABLE', "do your game sql table prefix here"); // ie.. fusion73281_game
}
$result = dbquery("SELECT game.*, fusion.* FROM ".GAME_TABLE." game LEFT JOIN ".DB_USERS." fusion on (game.pf_uid=fusion.user_id) WHERE fusion.user_id='".$userdata['user_id']."' LIMIT 1");
$super_userdata = dbarray($result);
if (!defined('myrunuo_characters')) {
define('myrunuo_characters', "SELECT * FROM myrunuo_characters WHERE char_name ='$pf_uid'"); // ie.. fusion73281_game
}
$result = dbquery("SELECT myrunuo_characters.*, fusion9sgl2_users.* FROM myrunuo_characters LEFT JOIN fusion9sgl2_users on (myrunuo_characters.pf_uid=fusion9sgl2_users.user_id) WHERE fusion9sgl2_users.user_id='".$userdata['user_id']."' LIMIT 1");
$super_userdata = dbarray($result);
if (!defined('DB_GAME_USER')) {
define('DB_GAME_USER', "sphere_myrunuo_characters"; // ie.. fusion73281_game
}
$result = dbquery("SELECT a.*, b.* FROM ".DB_GAME_USER. a" LEFT JOIN ".DB_USERS." b on (a.pf_uid=b.user_id) WHERE b.user_id='".$userdata['user_id']."' LIMIT 1");
$super_userdata = dbarray($result);
print_r($super_userdata);
<?php
/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright (C) PHPFusion Inc
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: user_info_panel.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }
if (iMEMBER) {
$msg_count = dbcount("(message_id)", DB_MESSAGES, "message_to='".$userdata['user_id']."' AND message_read='0' AND message_folder='0'");
openside($userdata ['user_name']);
echo "<img src='".IMAGES."avatars/".$userdata['user_avatar']."'>";
;closeside();
openside($userdata['user_name']);
echo THEME_BULLET." <a href='".BASEDIR."edit_profile.php' class='side'>".$locale['global_120']."</a><br />\n";
echo THEME_BULLET." <a href='".BASEDIR."messages.php' class='side'>".$locale['global_121']."</a><br />\n";
echo THEME_BULLET." <a href='".BASEDIR."members.php' class='side'>".$locale['global_122']."</a><br />\n";
if (iADMIN && (iUSER_RIGHTS != "" || iUSER_RIGHTS != "C")) {
echo THEME_BULLET." <a href='".ADMIN."index.php".$aidlink."' class='side'>".$locale['global_123']."</a><br />\n";
}
echo THEME_BULLET." <a href='".BASEDIR."index.php?logout=yes' class='side'>".$locale['global_124']."</a>\n";
if ($msg_count) {
echo "<div style='text-align:center;margin-top:15px;'>\n";
echo "<strong><a href='".BASEDIR."messages.php' class='side'>".sprintf($locale['global_125'], $msg_count);
echo ($msg_count == 1 ? $locale['global_126'] : $locale['global_127'])."</a></strong>\n";
echo "</div>\n";
}
if (iADMIN && checkrights("SU")) {
$subm_count = dbcount("(submit_id)", DB_SUBMISSIONS);
if ($subm_count) {
echo "<div style='text-align:center;margin-top:15px;'>\n";
echo "<strong><a href='".ADMIN."submissions.php".$aidlink."' class='side'>".sprintf($locale['global_125'], $subm_count);
echo ($subm_count == 1 ? $locale['global_128'] : $locale['global_129'])."</a></strong>\n";
echo "</div>\n";
}
}
closeside();
} else {
if (!preg_match('/login.php/i',FUSION_SELF)) {
$action_url = FUSION_SELF.(FUSION_QUERY ? "?".FUSION_QUERY : "");
if (isset($_GET['redirect']) && strstr($_GET['redirect'], "/")) {
$action_url = cleanurl(urldecode($_GET['redirect']));
}
openside($locale['global_100']);
echo "<div style='text-align:center'>\n";
echo "<form name='loginform' method='post' action='".$action_url."'>\n";
echo $locale['global_101']."<br />\n<input type='text' name='user_name' class='textbox' style='width:100px' /><br />\n";
echo $locale['global_102']."<br />\n<input type='password' name='user_pass' class='textbox' style='width:100px' /><br />\n";
echo "<label><input type='checkbox' name='remember_me' value='y' title='".$locale['global_103']."' style='vertical-align:middle;' /></label>\n";
echo "<input type='submit' name='login' value='".$locale['global_104']."' class='button' /><br />\n";
echo "</form>\n<br />\n";
if ($settings['enable_registration']) {
echo $locale['global_105']."<br /><br />\n";
}
echo $locale['global_106']."\n</div>\n";
closeside();
}
}
?>
function dbconnect($db_host, $db_user, $db_pass, $db_name) {
global $db_connect;
$my_runuohost = 'localhost'; // this one -- verify
$myrunuo_dbuser = 'root'; // this one -- verify
$myrunuo_dbpass = 'root'; // this one -- verify
$my_table = 'mysphere'; // this is okay.
$db_connect = @mysql_connect($db_host, $db_user, $db_pass, false);
$db_connect = @mysql_connect($my_runuohost, $myrunuo_dbuser, $myrunuo_dbpass, true);
$db_select2 = @mysql_select_db($my_table);
$db_select = @mysql_select_db($db_name);
if (!$db_connect) {
die("<strong>Unable to establish connection to MySQL</strong><br />".mysql_errno()." : ".mysql_error());
} elseif (!$db_select) {
die("<strong>Unable to select MySQL database</strong><br />".mysql_errno()." : ".mysql_error());
}
}
// My runuo game database
if (!defined('GAME_DB')) { define('GAME_DB', 'mysphere.'); }
if (!defined('DB_CHARACTERS')) { define('DB_CHARACTERS', GAME_DB."myrunuo_characters"); }
if (!defined('DB_LAYERS')) { define('DB_LAYERS', GAME_DB."myrunuo_characters_layers"); }
if (!defined('DB_SKILLS')) { define('DB_SKILLS', GAME_DB."myrunuo_characters_skills"); }
if (!defined('DB_GUILDS')) { define('DB_GUILDS', GAME_DB."myrunuo_guilds"); }
if (!defined('DB_GUILDS_WARS')) { define('DB_GUILDS_WARS', GAME_DB."myrunuo_guild_wars"); }
if (!defined('DB_STATUS')) { define('DB_STATUS', GAME_DB."myrunuo_status"); }
if (!defined('DB_TIMESTAMPS')) { define('DB_TIMESTAMPS', GAME_DB."myrunuo_timestamps"); }
// Log in user
if (isset($_POST['login']) && isset($_POST['user_name']) && isset($_POST['user_pass'])) {
$auth = new Authenticate($_POST['user_name'], $_POST['user_pass'], (isset($_POST['remember_me']) ? true : false));
$userdata = $auth->getUserData();
unset($auth, $_POST['user_name'], $_POST['user_pass']);
} elseif (isset($_GET['logout']) && $_GET['logout'] == "yes") {
$userdata = Authenticate::logOut();
redirect(BASEDIR."index.php");
} else {
$userdata = Authenticate::validateAuthUser();
}
// Log in user
if (isset($_POST['login']) && isset($_POST['user_name']) && isset($_POST['user_pass'])) {
$auth = new Authenticate($_POST['user_name'], $_POST['user_pass'], (isset($_POST['remember_me']) ? true : false));
$userdata = $auth->getUserData();
$userdata = dbarray(dbquery("SELECT a.*, b.* FROM ".DB_USERS." a LEFT JOIN ".DB_CHARACTERS." b on (a.user_id=b.fusion_id) WHERE user_id='".$userdata['user_id']."' LIMIT 1"));
unset($auth, $_POST['user_name'], $_POST['user_pass']);
} elseif (isset($_GET['logout']) && $_GET['logout'] == "yes") {
$userdata = Authenticate::logOut();
redirect(BASEDIR."index.php");
} else {
$userdata = Authenticate::validateAuthUser();
$userdata = dbarray(dbquery("SELECT a.*, b.* FROM ".DB_USERS." a LEFT JOIN ".DB_CHARACTERS." b on (a.user_id=b.fusion_id) WHERE user_id='".$userdata['user_id']."' LIMIT 1"));
}
Array
(
[user_id] => 1
[user_name] => Admin
[user_algo] => sha256
[user_salt] => 0fb7b1bae245ddc92df2ad0b6c29ad0833b4e6a3
[user_password] => 735c02a4ffffdb1673be5c6d017c9ae047633da489c15e4c39d5a6e3e6e144b7
[user_admin_algo] => sha256
[user_admin_salt] => 41df50ffebf60993fabfd861773009e16bcc97b7
[user_admin_password] => f4b470b87258c3b4ba4d5ae6e3ac6229439f89f1e4f04286d4239672b147e8c1
[user_email] => 0
[user_hide_email] => 1
[user_offset] => 8.0
[user_avatar] =>
[user_posts] => 134
[user_threads] =>
[user_joined] => 1394337607
[user_lastvisit] => 1404158665
[user_ip] => 0000:0000:0000:0000:0000:0000:0000:0001
[user_ip_type] => 6
[user_rights] => A.AC.AD.APWR.B.BB.C.CP.DB.DC.D.ERRO.FQ.F.FR.IM.I.IP.M.N.NC.P.PH.PI.PO.ROB.SL.S1.S2.S3.S4.S5.S6.S7.S8.S9.S10.S11.S12.SB.SM.SU.UF.UFC.UG.UL.U.W.WC.ESP.PMT.ADNX.RMP.PFDN.S.STFF
[user_groups] => .1
[user_level] => 103
[user_status] => 0
[user_actiontime] => 0
[user_theme] => Default
[user_location] => Malaysia
[user_birthdate] => 0000-00-00
[user_skype] =>
[user_aim] =>
[user_icq] =>
[user_msn] =>
[user_yahoo] =>
[user_web] => http://www.phpfusion.me
[user_sig] => Php Fusion 8 Dev Team PHPFusion 8 Alpha - [url]http://www.next.php-fusion.co.uk[/url] "However sophisticated codes can be coded only to be found as an error of the coder."
[char_id] => 7519
[fusion_id] => 1
[char_name] => Glory
[char_str] => 44
[char_dex] => 11
[char_int] => 10
[char_female] => 0
[char_counts] =>
[char_guild] => 0
[char_guildtitle] =>
[char_nototitle] => Webmaster/Owner
[char_bodyhue] => 33770
[char_public] =>
)
$result = dbquery("SELECT * FROM ".WHATEVER_PREFIX_FROM_MULTISITE." WHERE column='$something' ORDER BY whatever LIMIT 0,25");
$rows = dbrows($result); // will tell you how many rows.
$data = dbarray($result);
while ($data = dbarray($result)) {
... loop
}
// Log in user
if (isset($_POST['login']) && isset($_POST['user_name']) && isset($_POST['user_pass'])) {
$auth = new Authenticate($_POST['user_name'], $_POST['user_pass'], (isset($_POST['remember_me']) ? true : false));
$userdata = $auth->getUserData();
unset($auth, $_POST['user_name'], $_POST['user_pass']);
} elseif (isset($_GET['logout']) && $_GET['logout'] == "yes") {
$userdata = Authenticate::logOut();
redirect(BASEDIR."index.php");
} else {
$userdata = Authenticate::validateAuthUser();
}
// Log in user
if (isset($_POST['login']) && isset($_POST['user_name']) && isset($_POST['user_pass'])) {
$auth = new Authenticate($_POST['user_name'], $_POST['user_pass'], (isset($_POST['remember_me']) ? true : false));
$userdata = $auth->getUserData();
$userdata = dbarray(dbquery("SELECT a.*, b.* FROM ".DB_USERS." a LEFT JOIN ".DB_CHARACTERS." b on (a.user_id=b.fusion_id) WHERE user_id='".$userdata['user_id']."' LIMIT 1"));
unset($auth, $_POST['user_name'], $_POST['user_pass']);
} elseif (isset($_GET['logout']) && $_GET['logout'] == "yes") {
$userdata = Authenticate::logOut();
redirect(BASEDIR."index.php");
} else {
$userdata = Authenticate::validateAuthUser();
$userdata = dbarray(dbquery("SELECT a.*, b.* FROM ".DB_USERS." a LEFT JOIN ".DB_CHARACTERS." b on (a.user_id=b.fusion_id) WHERE user_id='".$userdata['user_id']."' LIMIT 1"));
}
// Log in user
if (isset($_POST['login']) && isset($_POST['user_name']) && isset($_POST['user_pass'])) {
$auth = new Authenticate($_POST['user_name'], $_POST['user_pass'], (isset($_POST['remember_me']) ? true : false));
$userdata = $auth->getUserData();
$userdata = dbarray(dbquery("SELECT a.*, b.* FROM ".DB_USERS." a LEFT JOIN ".DB_CHARACTERS." b on (a.user_id=b.fusion_id) WHERE user_id='".$userdata['user_id']."' LIMIT 1"));
unset($auth, $_POST['user_name'], $_POST['user_pass']);
} elseif (isset($_GET['logout']) && $_GET['logout'] == "yes") {
$userdata = Authenticate::logOut();
redirect(BASEDIR."index.php");
} else {
$userdata = Authenticate::validateAuthUser();
$userdata = dbarray(dbquery("SELECT a.*, b.* FROM ".DB_USERS." a LEFT JOIN ".DB_CHARACTERS." b on (a.user_id=b.fusion_id) WHERE user_id='".$userdata['user_id']."' LIMIT 1"));
}
if (iMEMBER) {
$userdata = dbarray(dbquery("SELECT a.*, b.* FROM ".DB_USERS." a LEFT JOIN ".DB_CHARACTERS." b on (a.user_id=b.fusion_id) WHERE user_id='".$userdata['user_id']."' LIMIT 1"));
}
Category Forum
Modifications and Requests - 8Labels
None yet
Statistics
3 participants
Notifications
You are not receiving notifications from this thread.
Related Questions