• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[Gesior AAC] Show outfit (characters & whoisonline.php)

Status
Not open for further replies.
Then open the file and remove the ' ,,,,,,,,,,,,,,,,,,,,,, ' line

@Tibiamakers - didnt remember yout name
 
Script:
<?PHP
$order = $_REQUEST['order'];
if($order == 'name') {
$orderby = 'name';
}
if($order == 'level') {
$orderby = 'level';
}
if($order == 'vocation') {
$orderby = 'vocation';
}
if(empty($orderby)) {
$orderby = 'name';
}
if(count($config['site']['worlds']) > 1)
{
$worlds .= '<i>Select world:</i> ';
foreach($config['site']['worlds'] as $idd => $world_n)
{
if($idd == (int) $_GET['world'])
{
$world_id = $idd;
$world_name = $world_n;
}
}
}
if($idd == (int) $_GET['world'])
{
$world_id = $idd;
$world_name = $world_n;
}
if(!isset($world_id))
{
$world_id = 0;
$world_name = $config['server']['serverName'];
}
if(count($config['site']['worlds']) > 1)
{
$main_content .= '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%><TR><TD>
<FORM ACTION="?subtopic=whoisonline" METHOD=get><INPUT TYPE=hidden NAME=subtopic VALUE=whoisonline><INPUT TYPE=hidden NAME=list VALUE=experience>
<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>World Selection</B></TD></TR><TR><TD BGCOLOR="'.$config['site']['lightborder'].'">
<TABLE BORDER=0 CELLPADDING=1><TR><TD>World: </TD><TD><SELECT SIZE="1" NAME="world"><OPTION VALUE="" SELECTED>(choose world)</OPTION>';
foreach($config['site']['worlds'] as $id => $world_n)
{
$main_content .= '<OPTION VALUE="'.$id.'">'.$world_n.'</OPTION>';
}
$main_content .= '</SELECT> </TD><TD><INPUT TYPE=image NAME="Submit" ALT="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18>
</TD></TR></TABLE></TABLE></FORM></TABLE><br>';
}
$players_online_data = $SQL->query('SELECT * FROM players WHERE online > 0 AND world_id = '.$world_id.' ORDER BY '.$orderby);
$number_of_players_online = 0;
foreach($players_online_data as $player)
{
$number_of_players_online++;
if($config['site']['show_flag'])
{
$account = $SQL->query('SELECT * FROM accounts WHERE id = '.$player['account_id'].'')->fetch();
$flag = '<image src="http://images.boardhost.com/flags/'.$account['flag'].'.png"/> ';
}
if(is_int($number_of_players_online / 2))
{
$bgcolor = $config['site']['darkborder'];
}
else
{
$bgcolor = $config['site']['lightborder'];
}
$players_rows .= '
<TR BGCOLOR='.$bgcolor.'>
<TD WIDTH=70%>'.$flag.'<A HREF="index.php?subtopic=characters&name='.urlencode($player['name']).'">'.$player['name'].'</A></TD>,
<TD><div style="position: relative; width: 32px; height: 32px;"><div style="background-image: url(\'outfitter.php?id='.$player['looktype'].'&addons='.$player['lookaddons'].'&head='.$player['lookhead'].'&body='.$player['lookbody'].'&legs='.$player['looklegs'].'&feet='.$player['lookfeet'].'\'); position: absolute; width: 64px; height: 80px; background-position: bottom right; background-repeat: no-repeat; right: 0px; bottom: 0px;"></div></div></TD>
<TD WIDTH=10%>'.$player['level'].'</TD>
<TD WIDTH=20%>'.$vocation_name[$player['world_id']][$player['promotion']][$player['vocation']].'</TD>
</TR>';
}
if($number_of_players_online == 0)
{
//server status - server empty
$main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><B>Server Status</B></TD></TR><TR BGCOLOR='.$config['site']['darkborder'].'><TD><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=1><TR><TD>Currently no one is playing on '.$config['server']['serverName'].'.</TD></TR></TABLE></TD></TR></TABLE><BR>';
}
else
{
//server status - someone is online
$main_content .= '
<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%>
<TR BGCOLOR="'.$config['site']['vdarkborder'].'">
<TD CLASS=white><B>Server Status</B></TD>
</TR>
<TR BGCOLOR='.$config['site']['darkborder'].'>
<TD>';
if($number_of_players_online == $config['status']['serverStatus_players'])
$main_content .= 'Currently there are '.$number_of_players_online.' players is active';
else
$main_content .= 'Currently there are '.$config['status']['serverStatus_players'].' active and '.($number_of_players_online - $config['status']['serverStatus_players']).' AFK players';
$main_content .= ' on '.$world_name.' gameworlds.<br>
</TD>
</TR>
</TABLE><BR>';
//list of players
$main_content .= '
<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%>
<TR BGCOLOR="'.$config['site']['vdarkborder'].'">
<TD><A HREF="index.php?subtopic=whoisonline&order=name" CLASS=white>Name</A></TD>
<TD CLASS=white><b>Outfit</b></TD>
<TD><A HREF="index.php?subtopic=whoisonline&order=level" CLASS=white>Level</A></TD>
<TD><A HREF="index.php?subtopic=whoisonline&order=vocation" CLASS=white>Vocation</TD>
</TR>
'.$players_rows.'</TABLE>';
//search bar
$main_content .= '<BR><FORM ACTION="index.php?subtopic=characters" METHOD=post> <TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Search Character</B></TD></TR><TR><TD BGCOLOR="'.$config['site']['darkborder'].'"><TABLE BORDER=0 CELLPADDING=1><TR><TD>Name:</TD><TD><INPUT NAME="name" VALUE=""SIZE=29 MAXLENGTH=29></TD><TD><INPUT TYPE=image NAME="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></TABLE></TD></TR></TABLE></FORM>';
}
?>
 
PHP:
<?PHP
$order = $_REQUEST['order'];
if($order == 'name') {
        $orderby = 'name';
}
if($order == 'level') {
        $orderby = 'level';
}
if($order == 'vocation') {
        $orderby = 'vocation';
}
if(empty($orderby)) {
        $orderby = 'name';
}
if(count($config['site']['worlds']) > 1)
{
        $worlds .= '<i>Select world:</i> ';
        foreach($config['site']['worlds'] as $idd => $world_n)
        {
                if($idd == (int) $_GET['world'])
                {
                        $world_id = $idd;
                        $world_name = $world_n;
                }
        }
}
if($idd == (int) $_GET['world'])
{
        $world_id = $idd;
        $world_name = $world_n;
}
if(!isset($world_id))
{
        $world_id = 0;
        $world_name = $config['server']['serverName'];
}
if(count($config['site']['worlds']) > 1)
{
        $main_content .= '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%><TR><TD>
                <FORM ACTION="?subtopic=whoisonline" METHOD=get><INPUT TYPE=hidden NAME=subtopic VALUE=whoisonline><INPUT TYPE=hidden NAME=list VALUE=experience>
                <TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>World Selection</B></TD></TR><TR><TD BGCOLOR="'.$config['site']['lightborder'].'">
                <TABLE BORDER=0 CELLPADDING=1><TR><TD>World: </TD><TD><SELECT SIZE="1" NAME="world"><OPTION VALUE="" SELECTED>(choose world)</OPTION>';
                foreach($config['site']['worlds'] as $id => $world_n)
                {
                        $main_content .= '<OPTION VALUE="'.$id.'">'.$world_n.'</OPTION>';
                }
                $main_content .= '</SELECT> </TD><TD><INPUT TYPE=image NAME="Submit" ALT="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18>
                </TD></TR></TABLE></TABLE></FORM></TABLE><br>';
}
$players_online_data = $SQL->query('SELECT * FROM players WHERE online > 0 AND world_id = '.$world_id.' ORDER BY '.$orderby);
$number_of_players_online = 0;
foreach($players_online_data as $player) 
{
        $number_of_players_online++;
        if($config['site']['show_flag'])
        {
                $account = $SQL->query('SELECT * FROM accounts WHERE id = '.$player['account_id'].'')->fetch();
                $flag = '<image src="http://images.boardhost.com/flags/'.$account['flag'].'.png"/> ';
        }
        if(is_int($number_of_players_online / 2)) 
        {
                $bgcolor = $config['site']['darkborder'];
        }
        else
        {
                $bgcolor = $config['site']['lightborder'];
        }
        $players_rows .= '
        <TR BGCOLOR='.$bgcolor.'>
                <TD WIDTH=70%>'.$flag.'<A HREF="index.php?subtopic=characters&name='.urlencode($player['name']).'">'.$player['name'].'</A></TD>,
				<TD><div style="position: relative; width: 32px; height: 32px;"><div style="background-image: url(\'outfitter.php?id='.$player['looktype'].'&addons='.$player['lookaddons'].'&head='.$player['lookhead'].'&body='.$player['lookbody'].'&legs='.$player['looklegs'].'&feet='.$player['lookfeet'].'\'); position: absolute; width: 64px; height: 80px; background-position: bottom right; background-repeat: no-repeat; right: 0px; bottom: 0px;"></div></div></TD>
                <TD WIDTH=10%>'.$player['level'].'</TD>
                <TD WIDTH=20%>'.$vocation_name[$player['world_id']][$player['promotion']][$player['vocation']].'</TD>
        </TR>';
}
if($number_of_players_online == 0) 
{
        //server status - server empty
        $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><B>Server Status</B></TD></TR><TR BGCOLOR='.$config['site']['darkborder'].'><TD><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=1><TR><TD>Currently no one is playing on '.$config['server']['serverName'].'.</TD></TR></TABLE></TD></TR></TABLE><BR>';
}
else
{
        //server status - someone is online
        $main_content .= '
        <TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%>
                <TR BGCOLOR="'.$config['site']['vdarkborder'].'">
                        <TD CLASS=white><B>Server Status</B></TD>
                </TR>
                <TR BGCOLOR='.$config['site']['darkborder'].'>
                        <TD>';
                                if($number_of_players_online == $config['status']['serverStatus_players'])
                                        $main_content .= 'Currently there are '.$number_of_players_online.' players is active';
                                else
                                        $main_content .= 'Currently there are '.$config['status']['serverStatus_players'].' active and '.($number_of_players_online - $config['status']['serverStatus_players']).' AFK players';
                        $main_content .= ' on '.$world_name.' gameworlds.<br>
                        </TD>
                </TR>
        </TABLE><BR>';
        //list of players
        $main_content .= '
        <TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%>
                <TR BGCOLOR="'.$config['site']['vdarkborder'].'">
                        <TD><A HREF="index.php?subtopic=whoisonline&order=name" CLASS=white>Name</A></TD>
						<TD CLASS=white><b>Outfit</b></TD>
                        <TD><A HREF="index.php?subtopic=whoisonline&order=level" CLASS=white>Level</A></TD>
                        <TD><A HREF="index.php?subtopic=whoisonline&order=vocation" CLASS=white>Vocation</TD>
                </TR>
        '.$players_rows.'</TABLE>';
        //search bar
        $main_content .= '<BR><FORM ACTION="index.php?subtopic=characters" METHOD=post>  <TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Search Character</B></TD></TR><TR><TD BGCOLOR="'.$config['site']['darkborder'].'"><TABLE BORDER=0 CELLPADDING=1><TR><TD>Name:</TD><TD><INPUT NAME="name" VALUE=""SIZE=29 MAXLENGTH=29></TD><TD><INPUT TYPE=image NAME="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></TABLE></TD></TR></TABLE></FORM>';
}
?>
 
Code:
<TD WIDTH=70%>'.$flag.'<A HREF="index.php?subtopic=characters&name='.urlencode($player['name']).'">'.$player['name'].'</A></TD>[SIZE=7],[/SIZE]

Remove it? haha
 
Hello guys, someone can learn me how I can put it in HighScore?
Thanks ^_^
Btw, sorry for my english x.x
 
this is what i get:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1' in C:\xampp\htdocs\characters.php:350 Stack trace: #0 C:\xampp\htdocs\characters.php(350): PDO->query('SELECT `id`, `d...') #1 C:\xampp\htdocs\index.php(164): include('C:\xampp\htdocs...') #2 {main} thrown in C:\xampp\htdocs\characters.php on line 350

- - - Updated - - -

can someone add me on skype and help me do this? ive been trying to do this the whole day..but this is killing me..
Skype: cachappuz - I speak english,spanish and portuguese.
Thanks
 
can't send it over PM (The text that you have entered is too long (20262 characters). Please shorten it to 5000 characters long.)

<?PHP
$name = stripslashes(ucwords(strtolower(trim($_REQUEST['name']))));
if(empty($name)) {
$main_content .= 'Here you can get detailed information about a certain player on '.$config['server']['serverName'].'.<BR> <FORM ACTION="?subtopic=characters" METHOD=post><TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Search Character</B></TD></TR><TR><TD BGCOLOR="'.$config['site']['darkborder'].'"><TABLE BORDER=0 CELLPADDING=1><TR><TD>Name:</TD><TD><INPUT NAME="name" VALUE=""SIZE=29 MAXLENGTH=29></TD><TD><INPUT TYPE=image NAME="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></TABLE></TD></TR></TABLE></FORM>';
}
else
{
if(check_name($name)) {
$player = $ots->createObject('Player');
$player->find($name);
if($player->isLoaded()) {
$account = $player->getAccount();
$main_content .= '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%><TR><TD><IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=10 HEIGHT=1 BORDER=0></TD><TD><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Character Information</B></TD></TR>';
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=20%>Name:</TD><TD><font color="';
$main_content .= ($player->isOnline()) ? 'green' : 'red';
$main_content .= '"><b>'.$player->getName().'</b></font>';
if($player->isDeleted())
$main_content .= '<font color="red"> [DELETED]</font>';
if($player->isNameLocked())
$main_content .= '<font color="red"> [NAMELOCK]</font>';
$main_content .= '</TD></TR>';
if($player->getOldName())
{
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
if($player->isNameLocked())
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Proposition:</TD><TD>'.$player->getOldName().'</TD></TR>';
else
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Old name:</TD><TD>'.$player->getOldName().'</TD></TR>';
}
// BEGIN Position Showing *** Fixed by jerryb1988 from otfans.net
$group = $player->getGroup();
if ($group == 2){$group_name = 'Tutor';}
if ($group == 3){$group_name = 'Senior Tutor';}
if ($group == 4){$group_name = 'Gamemaster';}
if ($group == 5){$group_name = 'Community Manager';}
if ($group == 6){$group_name = 'GOD';}

if($group != 1)
{

if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Position:</TD><TD>'.$group_name.'</TD></TR>';
}
// END Position Showing
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Sex:</TD><TD>';
$main_content .= ($player->getSex() == 0) ? 'female' : 'male';
$main_content .= '</TD></TR>';
if($config['site']['show_marriage_info'])
{
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Marital status:</TD><TD>';
$marriage = new OTS_Player();
$marriage->load($player->getMarriage());
if($marriage->isLoaded())
$main_content .= 'married to <a href="?subtopic=characters&name='.urlencode($marriage->getName()).'"><b>'.$marriage->getName().'</b></a></TD></TR>';
else
$main_content .= 'single</TD></TR>';
}
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Profession:</TD><TD>'.$vocation_name[$player->getWorld()][$player->getPromotion()][$player->getVocation()].'</TD></TR>';
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Level:</TD><TD>'.$player->getLevel().'</TD></TR>';
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>World:</TD><TD>'.$config['site']['worlds'][$player->getWorld()].'</TD></TR>';
if(!empty($towns_list[$player->getWorld()][$player->getTownId()]))
{
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Residence:</TD><TD>'.$towns_list[$player->getWorld()][$player->getTownId()].'</TD></TR>';
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Balance:</TD><TD>'.$player->getBalance().' Gold Coins.</TD></TR>';


}

$rank_of_player = $player->getRank();
if(!empty($rank_of_player))
{
{
$guild_id = $rank_of_player->getGuild()->getId();
$guild_name = $rank_of_player->getGuild()->getName();
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Guild Membership:</TD><TD>'.$rank_of_player->getName().' of the <a href="?subtopic=guilds&action=show&guild='.$guild_id.'">'.$guild_name.'</a></TD></TR>';
}
}
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$lastlogin = $player->getLastLogin();
if(empty($lastlogin))
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Last login:</TD><TD>Never logged in.</TD></TR>';
else
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Last login:</TD><TD>'.date("j F Y, g:i a", $lastlogin).'</TD></TR>';
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
if($config['site']['show_creationdate'] && $player->getCreated())
{
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Created:</TD><TD>'.date("j F Y, g:i a", $player->getCreated()).'</TD></TR>';
}
if($config['site']['show_vip_status'])
{
$id = $player->getCustomField("id");
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=10%>Vip Status:</TD>';
$vip = $SQL->query('SELECT * FROM player_storage WHERE player_id = '.$id.' AND `key` = '.$config['site']['show_vip_storage'].';')->fetch();
if($vip == false) {
$main_content .= '<TD><span class="red"><B>NOT VIP</B></TD></TR>';
}
else
{
$main_content .= '<TD><span class="green"><B>VIP</B></TD></TR>';
}
$comment = $player->getComment();
$newlines = array("\r\n", "\n", "\r");
$comment_with_lines = str_replace($newlines, '<br />', $comment, $count);
if($count < 50)
$comment = $comment_with_lines;
if(!empty($comment))
{
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD VALIGN=top>Comment:</TD><TD>'.$comment.'</TD></TR>';
}

}


//frags list by Xampy

$frags_limit = 10; // frags limit to show? // default: 10
$player_frags = $SQL->query('SELECT `player_deaths`.*, `players`.`name`, `killers`.`unjustified` FROM `player_deaths` LEFT JOIN `killers` ON `killers`.`death_id` = `player_deaths`.`id` LEFT JOIN `player_killers` ON `player_killers`.`kill_id` = `killers`.`id` LEFT JOIN `players` ON `players`.`id` = `player_deaths`.`player_id` WHERE `player_killers`.`player_id` = '.$player->getId().' ORDER BY `date` DESC LIMIT 0,'.$frags_limit.';');
if(count($player_frags))
{
$frags = 0;
$frag_add_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><br><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Frags</B></TD></TR>';
foreach($player_frags as $frag)
{
$frags++;
if(is_int($number_of_rows / 2)) $bgcolor = $config['site']['darkborder']; else $bgcolor = $config['site']['lightborder'];
$number_of_rows++;
$frag_add_content .= "<tr bgcolor=\"".$bgcolor."\">
<td width=\"20%\" align=\"center\">".date("j M Y, H:i", $frag['date'])."</td>
<td>".(($player->getSex() == 0) ? 'She' : 'He')." fragged <a href=\"index.php?subtopic=characters&name=".$frag[name]."\">".$frag[name]."</a> at level ".$frag[level]."";

$frag_add_content .= ". (".(($frag[unjustified] == 0) ? "<font size=\"1\" color=\"green\">Justified</font>" : "<font size=\"1\" color=\"red\">Unjustified</font>").")</td></tr>";
}
if($frags >= 1)
$main_content .= $frag_add_content . '</TABLE>';
}
// end of frags list by Xampy

//deaths list
$player_deaths = $SQL->query('SELECT `id`, `date`, `level` FROM `player_deaths` WHERE `player_id` = '.$player->getId().' ORDER BY `date` DESC LIMIT 0,10;');
foreach($player_deaths as $death)
{
if(is_int($number_of_rows / 2))
$bgcolor = $config['site']['darkborder']; else $bgcolor = $config['site']['lightborder'];

$number_of_rows++; $deads++;
$dead_add_content .= "<tr bgcolor=\"".$bgcolor."\">
<td width=\"20%\" align=\"center\">".date("j M Y, H:i", $death['date'])."</td>
<td>";
$killers = $SQL->query("SELECT environment_killers.name AS monster_name, players.name AS player_name, players.deleted AS player_exists FROM killers LEFT JOIN environment_killers ON killers.id = environment_killers.kill_id
LEFT JOIN player_killers ON killers.id = player_killers.kill_id LEFT JOIN players ON players.id = player_killers.player_id
WHERE killers.death_id = ".$SQL->quote($death['id'])." ORDER BY killers.final_hit DESC, killers.id ASC")->fetchAll();

$i = 0;
$count = count($killers);
foreach($killers as $killer)
{
$i++;
if(in_array($i, array(1, $count)))
$killer['monster_name'] = str_replace(array("an ", "a "), array("", ""), $killer['monster_name']);

if($killer['player_name'] != "")
{
if($i == 1)
$dead_add_content .= "Killed at level <b>".$death['level']."</b> by ";
else if($i == $count)
$dead_add_content .= " and by ";
else
$dead_add_content .= ", ";

if($killer['monster_name'] != "")
$dead_add_content .= $killer['monster_name']." summoned by ";

if($killer['player_exists'] == 0)
$dead_add_content .= "<a href=\"index.php?subtopic=characters&name=".urlencode($killer['player_name'])."\">";

$dead_add_content .= $killer['player_name'];
if($killer['player_exists'] == 0)
$dead_add_content .= "</a>";
}
else
{
if($i == 1)
$dead_add_content .= "Died at level <b>".$death['level']."</b> by ";
else if($i == $count)
$dead_add_content .= " and by ";
else
$dead_add_content .= ", ";

$dead_add_content .= $killer['monster_name'];
}

if($i == $count)
$dead_add_content .= ".";
}

$dead_add_content .= ".</td></tr>";
}

if($deads > 0)
$main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Deaths</B></TD></TR>' . $dead_add_content . '</TABLE><br />';

//end
if(!$player->getHideChar()) {
$main_content .= '<TABLE BORDER=0><TR><TD></TD></TR></TABLE><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Account Information</B></TD></TR>';
if($account->getRLName())
{
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= '<TR BGCOLOR='.$config['site']['lightborder'].'><TD WIDTH=20%>Real name:</TD><TD>'.$account->getRLName().'</TD></TR>';
}
if($account->getLocation())
{
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= '<TR BGCOLOR='.$config['site']['darkborder'].'><TD WIDTH=20%>Location:</TD><TD>'.$account->getLocation().'</TD></TR>';
}
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
if($account->getLastLogin())
$main_content .= '<TR BGCOLOR='.$config['site']['lightborder'].'><TD WIDTH=20%>Last login:</TD><TD>'.date("j F Y, g:i a", $account->getLastLogin()).'</TD></TR>';
else
$main_content .= '<TR BGCOLOR='.$config['site']['lightborder'].'><TD WIDTH=20%>Last login:</TD><TD>Never logged in.</TD></TR>';
if($account->getCreated())
{
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= '<TR BGCOLOR='.$config['site']['lightborder'].'><TD WIDTH=20%>Created:</TD><TD>'.date("j F Y, g:i a", $account->getCreated()).'</TD></TR>';
}
/*Vip Status*/
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Vip Status:</TD><TD>';
$main_content .= ($account->getPlayerVip_Time()) ? '<b><font color="green">Vip Account</font></b>' : '<b><font color="red">Not Vip Account</font></b>';
if($account->isBanned())
if($account->getBanTime() > 0)
$main_content .= '<font color="red"> [Banished until '.date("j F Y, G:i", $account->getBanTime()).']</font>';
else
$main_content .= '<font color="red"> [Banished FOREVER]</font>';
$main_content .= '</TD></TR></TABLE>';
$main_content .= '<br><TABLE BORDER=0><TR><TD></TD></TR></TABLE><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=5 CLASS=white><B>Characters</B></TD></TR>
<TR BGCOLOR='.$config['site']['darkborder'].'><TD><B>Name</B></TD><TD><B>World</B></TD><TD><B>Level</B></TD><TD><b>Status</b></TD><TD><B>*</B></TD></TR>';
$account_players = $account->getPlayersList();
$account_players->orderBy('name');
$player_number = 0;
foreach($account_players as $player_list)
{
if(!$player_list->getHideChar())
{
$player_number++;
if(is_int($player_number / 2))
$bgcolor = $config['site']['darkborder'];
else
$bgcolor = $config['site']['lightborder'];
if(!$player_list->isOnline())
$player_list_status = '<font color="red">Offline</font>';
else
$player_list_status = '<font color="green">Online</font>';
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=52%><NOBR>'.$player_number.'.*'.$player_list->getName();
$main_content .= ($player_list->isDeleted()) ? '<font color="red"> [DELETED]</font>' : '';
$main_content .= '</NOBR></TD><TD WIDTH=15%>'.$config['site']['worlds'][$player_list->getWorld()].'</TD><TD WIDTH=25%>'.$player_list->getLevel().' '.$vocation_name[$player_list->getWorld()][$player_list->getPromotion()][$player_list->getVocation()].'</TD><TD WIDTH="8%"><b>'.$player_list_status.'</b></TD><TD><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION="?subtopic=characters" METHOD=post><TR><TD><INPUT TYPE=hidden NAME=name VALUE="'.$player_list->getName().'"><INPUT TYPE=image NAME="View '.$player_list->getName().'" ALT="View '.$player_list->getName().'" SRC="'.$layout_name.'/images/buttons/sbutton_view.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></FORM></TABLE></TD></TR>';
}
}
$main_content .= '</TABLE></TD><TD><IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=10 HEIGHT=1 BORDER=0></TD></TR></TABLE>';
}
$main_content .= '<BR><BR><FORM ACTION="?subtopic=characters" METHOD=post><TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Search Character</B></TD></TR><TR><TD BGCOLOR="'.$config['site']['darkborder'].'"><TABLE BORDER=0 CELLPADDING=1><TR><TD>Name:</TD><TD><INPUT NAME="name" VALUE=""SIZE=29 MAXLENGTH=29></TD><TD><INPUT TYPE=image NAME="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></TABLE></TD></TR></TABLE></FORM>';
$main_content .= '</TABLE>';
}
else
$search_errors[] = 'Character <b>'.$name.'</b> does not exist.';
}
else
$search_errors[] = 'This name contains invalid letters. Please use only A-Z, a-z and space.';
if(!empty($search_errors))
{
$main_content .= '<div class="SmallBox" > <div class="MessageContainer" > <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="ErrorMessage" > <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div><b>The Following Errors Have Occurred:</b><br/>';
foreach($search_errors as $search_error)
$main_content .= '<li>'.$search_error;
$main_content .= '</div> <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> </div></div><br/>';
$main_content .= '<BR><FORM ACTION="?subtopic=characters" METHOD=post><TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Search Character</B></TD></TR><TR><TD BGCOLOR="'.$config['site']['darkborder'].'"><TABLE BORDER=0 CELLPADDING=1><TR><TD>Name:</TD><TD><INPUT NAME="name" VALUE=""SIZE=29 MAXLENGTH=29></TD><TD><INPUT TYPE=image NAME="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></TABLE></TD></TR></TABLE></FORM>';
}
}
?>
 
Parse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\characters.php on line 57

nothing yet
 
Ok so i got something close to what i wanted.
Maybe you can now help me fix what im missing.
Which is only 3 pictures..(Sex - Residence and Weapon)

qp1lw3.jpg


Here is my character.php

 
My error:
Code:
Parse error: syntax error, unexpected 'age' (T_STRING) in X:\Program Files\xampp\htdocs\characters.php on line 57

Here is my character.php; Pastebin
 
wow, that's impressive. I already have outfit system on my website, but could you please provide code for these beautiful statistics? I love the way you structured the table!
 
Status
Not open for further replies.
Back
Top