View difference between Paste ID: UZTxGqDQ and ic5y7CYE
SHOW: | | - or go back to the newest paste.
1-
<?php
1+
2
/*
3
    Copyright (C) 2007 - 2008  Nicaw
4
5
    This program is free software; you can redistribute it and/or modify
6
    it under the terms of the GNU General Public License as published by
7
    the Free Software Foundation; either version 2 of the License, or
8
    (at your option) any later version.
9-
<form method="get" action="characters.php"><br>
9+
10-
<center><input type="text" name="player_name"/> 
10+
    This program is distributed in the hope that it will be useful,
11-
<input type="submit" value="Search"/></center>
11+
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
    GNU General Public License for more details.
14
15-
$SQL = new SQL();
15+
    You should have received a copy of the GNU General Public License along
16
    with this program; if not, write to the Free Software Foundation, Inc.,
17
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18-
	echo '<hr/><table style="width: 100%"><tr><td><font class=f2>Name:</font><font class=f1> '.htmlspecialchars($player->getAttr('name'))."</font><br/>\n";
18+
*/
19-
	echo '<font class=f2>Level:</font><font class=f1> '.$player->getAttr('level')."</font><br/>\n";
19+
20-
	echo '<font class=f2>Magic Level:</font><font class=f1> '.$player->getAttr('maglevel')."</font><br/>\n";
20+
21-
	echo '<font class=f2>Vocation:</font><font class=f1> '.$cfg['vocations'][$player->getAttr('vocation')]['name']."</font> ";
21+
22-
	/* INICIO VIP */
22+
23
<div id="content">
24-
	$account->load($player->getAttr('account'));
24+
25-
    if ($account->getAttr('premend') > time()) {
25+
26-
        echo "<a href=vantagens.php target=vantagens><font color=blue><b>(VIP)</b></font></a><br/>";
26+
<form method="get" action="characters.php"> 
27-
    } else { echo "<br/>\n";}
27+
<input type="text" name="player_name"/> 
28-
	/* FIM VIP */
28+
<input type="submit" value="Search"/> 
29
</form>
30-
		echo '<font class=f2>Guild:</font><font class=f1> '.$player->getAttr('guild_rank').' of <a href="guilds.php?guild_id='.$player->getAttr('guild_id').'">'.htmlspecialchars($player->getAttr('guild_name')).'</a></font><br/>'."\n";
30+
31
$player = new Player();
32
if (!empty($_GET['player_id']) && $player->load($_GET['player_id']) || !empty($_GET['player_name']) && $player->find($_GET['player_name'])){
33
	echo '<hr/><table style="width: 100%"><tr><td><b>Name:</b> '.htmlspecialchars($player->getAttr('name'))."";
34-
	echo '<font class=f2>Gender:</font><font class=f1> '.$gender[$player->getAttr('sex')].'</font><br/>'."\n";
34+
35-
	if (!empty($cfg['temple'][$player->getAttr('city')]['name'])){
35+
	if ($player->getAttr('premend') > 0){
36-
		echo "<font class=f2>Residence:</font><font class=f1> ".ucfirst($cfg['temple'][$player->getAttr('city')]['name'])."</font><br/>";
36+
		echo "<b>(VIP)</b><br/>\n";
37
	}
38
39-
	if ($player->isAttr('position'))
39+
	echo '<b>Level:</b> '.$player->getAttr('level')."<br/>\n";
40-
		echo "<font class=f2>Position: </font><font class=f1> ".$player->getAttr('position')."</font><br/>";
40+
	echo '<b>Magic Level:</b> '.$player->getAttr('maglevel')."<br/>\n";
41
	echo '<b>Vocation:</b> '.$cfg['vocations'][$player->getAttr('vocation')]['name']."<br/>\n";
42-
	/* INICIO DO STATUS */
42+
43-
	if($player->isOnline())
43+
44-
		echo '<font class=f2>Status:</font> <font class=f1><font color=green><b>Online</b></font></font><br/>';
44+
		echo '<b>Guild:</b> '.$player->getAttr('guild_rank').' of <a href="guilds.php?guild_id='.$player->getAttr('guild_id').'">'.htmlspecialchars($player->getAttr('guild_name')).'</a><br/>'."\n";
45-
    else
45+
46-
        echo '<font class=f2>Status:</font> <font class=f1><font color=red><b>Offline</b></font></font><br/>';
46+
47-
    /* FIM DO STATUS */
47+
48
	echo '<b>Gender:</b> '.$gender[$player->getAttr('sex')].'<br/>'."\n";
49-
	if ($player->getAttr('lastlogin') == 0){
49+
	if (!empty($cfg['temple'][$player->getAttr('city')]['name']))
50-
		$lastlogin = 'Never';}
50+
		echo "<b>Residence</b>: ".ucfirst($cfg['temple'][$player->getAttr('city')]['name'])."<br/>";
51-
	else {
51+
52
	if ($player->isAttr('position')){
53-
		echo "<font class=f2>Last Login:</font><font class=f1> ".$lastlogin."</font><br/>\n";
53+
		echo "<b>Position: </b> ".$player->getAttr('position')."<br/>";
54
	}
55
	if ($player->getAttr('premend') > 0){
56-
	if ($player->getAttr('redskulltime') > time())
56+
		echo "<b>Premium: </b> ".ceil((time() - $player->getAttr('premend'))/(3600*24))." day(s)";
57-
		echo '<font class=f2>Frag time left:</font><font class=f1> '.ceil(($player->getAttr('redskulltime') - time())/60/60).' h</font><br/>';
57+
58
	if ($player->getAttr('lastlogin') == 0)
59
		$lastlogin = 'Never';
60
	else
61
		$lastlogin = date("jS F Y H:i:s",$player->getAttr('lastlogin'));
62
	echo "<b>Last Login:</b> ".$lastlogin."<br/>\n";
63-
			echo '<font class=f2>'.ucfirst($sn[$i]).':</font><font class=f1> '.$player->getSkill($i)."</font><br/>\n";
63+
	if ($player->getAttr('redskulltime') > time()) echo '<b>Frag time left:</b> '.ceil(($player->getAttr('redskulltime') - time())/60/60).' h</b><br/>';
64
	if ($cfg['show_skills']){
65
		echo "</td><td>";
66
		$sn = $cfg['skill_names'];
67
		for ($i=0; $i < count($sn); $i++){
68
			echo '<b>'.ucfirst($sn[$i]).':</b> '.$player->getSkill($i)."<br/>\n";
69
		}
70
		echo '</td></tr>';
71-
			echo "<hr><font class=f3><center>Comments</center></font><br><div style=\"overflow:hidden\"><pre><font class=f1>".htmlspecialchars($account->getAttr('comment'))."</font></pre></div><br/>\n";
71+
72
	echo '</table>';
73
	$account = new Account();
74
	if ($account->load($player->getAttr('account')))
75-
	echo '<center><font class=f3>Special Skills</font><br><br></center><font class=f1><table border=0 cellpadding=1 cellspacing=1 width=right></table><hr/>';
75+
76
			echo "<b>Comments</b><br/><div style=\"overflow:hidden\"><pre>".htmlspecialchars($account->getAttr('comment'))."</pre></div><br/>\n";
77
		}	
78
	echo '<hr/>';
79
	if ($cfg['show_deathlist']){
80-
		echo '<font class=f3><center>Deaths</center></font><br/>';
80+
81
		if ($deaths !== false && !empty($deaths)){
82
		echo '<b>Deaths</b><br/>';
83
			foreach ($deaths as $death){
84
				$killer = new Player($death['killer']);
85
				if ($killer->exists())
86
					$name = '<a href="characters.php?char='.$death['killer'].'">'.$death['killer'].'</a>';
87-
				echo '<font class=f2><i>'.date("jS F Y H:i:s",$death['date']).'</i> Killed at level '.$death['level'].' by '.$name.'</font><br/>';
87+
88
					$name = $death['killer'];
89
				echo '<i>'.date("jS F Y H:i:s",$death['date']).'</i> Killed at level '.$death['level'].' by '.$name.'<br/>';
90
			}
91-
}elseif (isset($_GET['player_id']) || isset($_GET['player_name'])) echo '<font class=f1><br>Player not found</font>';
91+
92
	}
93
}elseif (isset($_GET['player_id']) || isset($_GET['player_name'])) echo 'Player not found';
94
?>
95
</div>
96-
<?php include ("footer.inc.php"); ?>
96+
97
</div>
98
<?php include ("footer.inc.php");?>