ayhan1993
AyhaN ^^
- Ağu
- 427
- 10
Kod:
<?php
/*******************
* Forumdewil.com
* script
*******************/
if (!defined('KE_PANEL'))
{
exit("You are not allowed to view this page directly.");
}
else
{
$_USER['strUserID'] = str_replace("'","",$_GET['userid']);
$_USER['strUserID'] = str_replace('"','',$_USER['strUserID']);
$_USER['strUserID'] = str_replace(" ","",$_USER['strUserID']);
//Test if empty
if(empty($_USER['strUserID']))
{
$skip=1;
$error=1;
$errorcode='User does not exists!';
$title = "Character Profile";
}
//Pull user stats
if(empty($error))
{
$_TEST['exists'] = "SELECT count(*) FROM USERDATA WHERE strUserID='{$_USER['strUserID']}'";
$_TEST['exists'] = odbc_exec($con[db], $_TEST['exists']) or die(odbc_error());
$_TEST['exists'] = odbc_result($_TEST['exists'], 1);
if(!$_TEST['exists'])
{
$error=1;
$skip=1;
$errorcode='User does not exists!';
$title = "Character Profile";
}
}
if(empty($error))
{
$title = $_USER['strUserID']." Character Profile";
$query = "SELECT strAccountID, bNation FROM ACCOUNT_CHAR WHERE strCharID1='{$_USER['strUserID']}' or strCharID2='{$_USER['strUserID']}' or strCharID3='{$_USER['strUserID']}'";
$result = odbc_exec($con[db], $query) or die(odbc_error());
$row = odbc_fetch_array($result);
$_PROFILE['strUserID'] = $row['strAccountID'];
$_PROFILE['Nation'] = $row['bNation'];
$query1 = "select strUserID, level, authority, exp, class, nation, loyalty, knights from USERDATA where struserid='{$_USER['strUserID']}'";
$export1 = odbc_exec($con[db], $query1) or die('<br/>Error described above.');
$_CHAR['strUserID'] = odbc_result($export1, 1);
$_CHAR['level'] = odbc_result($export1, 2);
$_CHAR['status'] = odbc_result($export1, 3);
$_CHAR['exppos'] = odbc_result($export1, 4);
$_CHAR['class'] = odbc_result($export1, 5);
$_CHAR['class'] = getClass($_CHAR['class']);
$query2 = "select Exp from LEVEL_UP where level='{$_CHAR['level']}'";
$export2 = odbc_exec($con[db], $query2) or die('<br/>Error described above.');
$_CHAR['expreq'] = odbc_result($export2, 1);
$_CHAR['exp'] = $_CHAR['exppos'] / $_CHAR['expreq'];
$_CHAR['exp']=substr($_CHAR['exp'], 0, 4);
$_CHAR['exp'] = $_CHAR['exp'] * 100;
$_CHAR['nation'] = odbc_result($export1, 6);
$_CHAR['loyalty'] = odbc_result($export1, 7);
$_CHAR['knightsid'] = odbc_result($export1, 8);
$_QUERY['knights'] = "select idname from KNIGHTS where IDNum='{$_CHAR['knightsid']}'";
$_RESULTS['knights'] = odbc_exec($con[db], $_QUERY['knights']) or die('<br/>Error described above.');
$_CHAR['knights'] = odbc_result($_RESULTS['knights'], 1);
if($_CHAR['knightsid'] == "893")
{
$_CHAR['knights'] = "NoNameClan";
}
if($_CHAR['knightsid'] == "722")
{
$_CHAR['knights'] = "NoNameClan JR";
}
if(empty($_CHAR['knights'])) $_CHAR['knights'] = 'None';
else
$_CHAR['knights'] = '<a href="./?act=clanprofile&clanid='.$_CHAR['knightsid'].'">'.$_CHAR['knights'].'</a>';
switch($_CHAR['status'])
{
case 0: $_CHAR['status'] = '<font color=darkgreen>Game Master</font>'; break;
case 1:
//check if it's online
$_TEST['online'] = "SELECT count(*) FROM CURRENTUSER WHERE strCharID='{$_USER['strUserID']}'";
$_TEST['online'] = odbc_exec($con[db2], $_TEST['online']) or die(odbc_error());
$_TEST['online'] = odbc_result($_TEST['online'], 1);
if($_TEST['online'] >= 1)
$_CHAR['status'] = '<font color="green">Online</font>';
else
$_CHAR['status'] = '<font color="red">Offline</font>';
break;
case 2: $_CHAR['status'] = '<font color=black>Muted</font>'; break;
case 255: $_CHAR['status'] = '<font color=red>Banned</font>'; break;
}
$pagecontent .= '
<br /><br />
<center><b>'.$_CHAR['strUserID'].'\'s Profile</b></center>
<br />
<center><img src="http://www.ko-cuce.com/images/'.$_CHAR['nation'].'.gif"></center>
<br />
Character Status: '.$_CHAR['status'].'
<br />
Class: '.$_CHAR['class'].'
<br />
Level: '.$_CHAR['level'].'
<br />
Experience: '.$_CHAR['exp'].'%
<br />
'.$_CHAR['exppos'].'/'.$_CHAR['expreq'].'
<DIV>
<DIV style="padding: 1px 1px 1px 1px; height:5px; border: 1px solid #ffffbe;width:120px;text-align:left;">
<DIV style="width: '.$_CHAR['exp'].'%; background-color: #ffffbe; height:5px; clip:auto;overflow:hidden;">
</DIV>
</DIV>
<br />
National Points: '.$_CHAR['loyalty'].'
<br />
Clan: '.$_CHAR['knights'].'
<br /><br />
';
}
if($error) $pagecontent .= $errorcode;
}
?>
Kod:
bu koda dex , str , int , mp , hp göstermesini istiyorum yapacak biri warmı acaba ?