Ir para conteúdo
  • Cadastre-se

[GESIOR] Ajuda com VIP Time


Posts Recomendados

Galera alguem poderia me ajudar estou fazendo um OTS custom, Mapa proprio esta quase pronto, mais testou tentando adicionar um VIP System, o VIP funciona corretamento mais nao consigo por para mostrar quem e VIP na pagina characters.php do GESIOR!!

 

O certo seria editar isso ?

$main_content .= ($account->isVipTime() > 0) ? '<font color="#00CD00"><b>VIP Account</b></font>' : '<font color="#FF0000"><b>Free Account</b></font>';

 

Link para o post
Compartilhar em outros sites

MMHUCMQ.png  Esta é uma mensagem automática, este tópico foi movido para a área correta.
  Regras do fórum: http://www.tibiaking.com/forum/topic/1281-regras-gerais/#comment-7680

Este tópico foi movido:
De: WebSites OTServ > OTServ > Tutoriais de Websites
Para: Suporte OTServ > OTServ > Suporte de WebSites

Link para o post
Compartilhar em outros sites
1 hora atrás, Sekk disse:

sim, mas qual o problema?

quando eu edito a pagina fica em branco

Link para o post
Compartilhar em outros sites

Cara, na linha de comando que indicou ali em cima há várias variáveis que foram declaradas como parâmetros comparativos (ex.: $account, sVipTime()).

 

Assim, não consigo analisar o erro se não postar seu script completo, uma vez que toda e qualquer variável tem que ser 'declarada' no início de todo e qualquer 'script'.

 

Manda aqui e conversamos novamente.

5YkRF3w.gif

 

 

 

 

 

 

CzysZUR.gifytaam6k.png

 

 

Link para o post
Compartilhar em outros sites
42 minutos atrás, Xagah disse:

Cara, na linha de comando que indicou ali em cima há várias variáveis que foram declaradas como parâmetros comparativos (ex.: $account, sVipTime()).

 

Assim, não consigo analisar o erro se não postar seu script completo, uma vez que toda e qualquer variável tem que ser 'declarada' no início de todo e qualquer 'script'.

 

Manda aqui e conversamos novamente.

 

AKi esta o characters.php 

http://pastebin.com/41Z7HbAn

Link para o post
Compartilhar em outros sites

Cara, o 'script' está normal...

 

Ele aparece no final que está 'Free' ou 'Premmiun'.

 

Agora não sei se entendi sua pergunta certo:

 

Você quer que estas informações apareçam no meio das informações do 'char' ou quer mudar o texto que aparece?

5YkRF3w.gif

 

 

 

 

 

 

CzysZUR.gifytaam6k.png

 

 

Link para o post
Compartilhar em outros sites
26 minutos atrás, Xagah disse:

Cara, o 'script' está normal...

 

Ele aparece no final que está 'Free' ou 'Premmiun'.

 

Agora não sei se entendi sua pergunta certo:

 

Você quer que estas informações apareçam no meio das informações do 'char' ou quer mudar o texto que aparece?

 

Ele esta aparecendo pq esta normal, esta para mostrar se a account e premium ou nao

 

Eu quero que esta linha mostre o VIP ao inves da premium account

 

$main_content .= ($account->isPremium() > 0) ? '<font color="#00CD00"><b>VIP Account</b></font>' : '<font color="#FF0000"><b>Free Account</b></font>';

Link para o post
Compartilhar em outros sites

Ah, sim. Isto mesmo.

 

Coloque deste modo que está mencionando. É só mudar o texto 'Premmiun Account' por 'VIP'. Aquele texto entre '<b>  </b> é o que irá aparecer para o Player.

 

 

5YkRF3w.gif

 

 

 

 

 

 

CzysZUR.gifytaam6k.png

 

 

Link para o post
Compartilhar em outros sites
Agora, Xagah disse:

Ah, sim. Isto mesmo.

 

Coloque deste modo que está mencionando. É só mudar o texto 'Premmiun Account' por 'VIP'. Aquele texto entre '<b>  </b> é o que irá aparecer para o Player.

 

 

Mais dai ele vai mostrar VIP para todos, pois todos serao prmiums, eu estou utilziando um sistema de VIP System

Link para o post
Compartilhar em outros sites

Ok. 

 

Onde fica registrado quem é VIP no seu banco de dados?

 

Edited:

 

Abra seu PHPMyAdmin e bata uma 'screenshot' da página com a Variável.

Editado por Xagah (veja o histórico de edições)

5YkRF3w.gif

 

 

 

 

 

 

CzysZUR.gifytaam6k.png

 

 

Link para o post
Compartilhar em outros sites
14 minutos atrás, Xagah disse:

Ok. 

 

Onde fica registrado quem é VIP no seu banco de dados?

 

Edited:

 

Abra seu PHPMyAdmin e bata uma 'screenshot' da página com a Variável.

 

 

 

Essas 2 tabelas sao da vip

 

ALTER TABLE `accounts`
ADD COLUMN `viplastday` int(10) NOT NULL DEFAULT 0 AFTER `lastday`,
ADD COLUMN `vipdays` int(11) NOT NULL DEFAULT 0 AFTER `lastday`;
Link para o post
Compartilhar em outros sites

Pronto.

 

Primeiro abra o arquivo:

www > (pasta com nome do seu site) > classes > account.php

No início do 'script', onde vc tem:

public $data = array('name' => null, 'password' => null, 'premdays' => null, 'lastday' => null, 'email' => null, 'key' => null, 'group_id' => null, 'create_ip' => null, 'create_date' => null, 'premium_points' => null, 'page_access' => null, 'location' => null, 'rlname' => null, 'email_new' => null, 'email_new_time' => null, 'email_code' => null, 'next_email' => null, 'last_post' => null, 'flag' => null, 'vote' => null);

Depois de:

 'vote' => null

Insira:

, 'vipdays' => null

Depois, bem no fim do 'script', logo abaixo de:

 

public function getLastLogin(){return $this->getLastDay();}

 

Coloque:

public function getVipsDays(){return $this->data['vipsday'];}
public function isVipPlayer(){return ($this->getVipsDays() > 0);}

 

Depois, vá no 'script' ' characters.php' e onde há:

$main_content .= ($account->isVipTime() > 0) ? '<font color="#00CD00"><b>VIP Account</b></font>' : '<font color="#FF0000"><b>Free Account</b></font>';

Mude por:

$main_content .= ($account->isVipPlayer() > 0) ? '<font color="#00CD00"><b>VIP Account</b></font>' : '<font color="#FF0000"><b>Free Account</b></font>';

Tenta aí e me diz se deu certo.

5YkRF3w.gif

 

 

 

 

 

 

CzysZUR.gifytaam6k.png

 

 

Link para o post
Compartilhar em outros sites
1 hora atrás, Xagah disse:

Pronto.

 

Primeiro abra o arquivo:


www > (pasta com nome do seu site) > classes > account.php

No início do 'script', onde vc tem:


public $data = array('name' => null, 'password' => null, 'premdays' => null, 'lastday' => null, 'email' => null, 'key' => null, 'group_id' => null, 'create_ip' => null, 'create_date' => null, 'premium_points' => null, 'page_access' => null, 'location' => null, 'rlname' => null, 'email_new' => null, 'email_new_time' => null, 'email_code' => null, 'next_email' => null, 'last_post' => null, 'flag' => null, 'vote' => null);

Depois de:


 'vote' => null

Insira:


, 'vipdays' => null

Depois, bem no fim do 'script', logo abaixo de:

 


public function getLastLogin(){return $this->getLastDay();}

 

Coloque:


public function getVipsDays(){return $this->data['vipsday'];}
public function isVipPlayer(){return ($this->getVipsDays() > 0);}

 

Depois, vá no 'script' ' characters.php' e onde há:


$main_content .= ($account->isVipTime() > 0) ? '<font color="#00CD00"><b>VIP Account</b></font>' : '<font color="#FF0000"><b>Free Account</b></font>';

Mude por:


$main_content .= ($account->isVipPlayer() > 0) ? '<font color="#00CD00"><b>VIP Account</b></font>' : '<font color="#FF0000"><b>Free Account</b></font>';

Tenta aí e me diz se deu certo.

 A account esta com VIP mais no site mostra que esta free account ainda

Link para o post
Compartilhar em outros sites

Oooopps, onde vc tem:

public static $fields = array('id', 'name', 'password', 'premdays', 'lastday', 'email', 'key', 'group_id', 'create_ip', 'create_date', 'premium_points', 'page_access', 'location', 'rlname', 'email_new', 'email_new_time', 'email_code', 'next_email', 'last_post', 'flag', 'vote');

Coloque:

,'vipdays'

Depois de:

'vote'

E tenta de novo.

5YkRF3w.gif

 

 

 

 

 

 

CzysZUR.gifytaam6k.png

 

 

Link para o post
Compartilhar em outros sites
9 minutos atrás, Xagah disse:

Oooopps, onde vc tem:


public static $fields = array('id', 'name', 'password', 'premdays', 'lastday', 'email', 'key', 'group_id', 'create_ip', 'create_date', 'premium_points', 'page_access', 'location', 'rlname', 'email_new', 'email_new_time', 'email_code', 'next_email', 'last_post', 'flag', 'vote');

Coloque:


,'vipdays'

Depois de:


'vote'

E tenta de novo.

Mesma coisa, voce nao tem nenhum system VIP q esteje funfando  no gesior e no OT ?

Link para o post
Compartilhar em outros sites

Então, cara, o meu VIP é chamado por Premiun.

 

Desde o início eu não compreendi a razão de buscar a diferença.

 

O sistema que uso é quase idêntico ao seu. A diferença é que no meu a coluna se chama 'premiun_points' e no seu 'vipdays'.

5YkRF3w.gif

 

 

 

 

 

 

CzysZUR.gifytaam6k.png

 

 

Link para o post
Compartilhar em outros sites
19 minutos atrás, Xagah disse:

Então, cara, o meu VIP é chamado por Premiun.

 

Desde o início eu não compreendi a razão de buscar a diferença.

 

O sistema que uso é quase idêntico ao seu. A diferença é que no meu a coluna se chama 'premiun_points' e no seu 'vipdays'.

Poderia me passar ?

 

Link para o post
Compartilhar em outros sites

Claro:

Spoiler

<?php
if(!defined('INITIALIZED'))
	exit;

$name = '';
if(isset($_REQUEST['name']))
	$name = (string) $_REQUEST['name'];

if(!empty($name))
{
	$player = new Player();
	$player->find($name);
	if($player->isLoaded())
	{
		$number_of_rows = 0;
		$account = $player->getAccount();
		$skull = '';
		if ($player->getSkull() == 4)
			$skull = "<img style='border: 0;' src='./images/skulls/redskull.gif'/>";
		else if ($player->getSkull() == 5)
			$skull = "<img style='border: 0;' src='./images/skulls/blackskull.gif'/>";
		$main_content .= '<table border="0" cellspacing="1" cellpadding="4" width="100%">
			<tr bgcolor="'.$config['site']['vdarkborder'].'">
				<td colspan="2" style="font-weight:bold;color:white">
					Informações do Jogador
				</td>
			</tr>';
		$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
		$main_content .= '<tr bgcolor="' . $bgcolor . '">
			<td width="20%">
				Nome:
			</td>
			<td style="font-weight:bold;color:' . (($player->isOnline()) ? 'green' : 'red') . '">' . htmlspecialchars($player->getName()) . ' ' . $skull . ' <img src="' . $config['site']['flag_images_url'] . $account->getFlag() . $config['site']['flag_images_extension'] . '" title="Country: ' . $account->getFlag() . '" alt="' . $account->getFlag() . '" />';
		if($player->isBanned() || $account->isBanned())
			$main_content .= '<span style="color:red">
				[BANIDO]
			</span>';
		if($player->isNamelocked())
			$main_content .= '
			<span style="color:red">
				[NOME PROIBIDO]
			</span>';
		$main_content .= '
			<br />
				<img src="' . $config['site']['outfit_images_url'] . '?id=' . $player->getLookType() . '&addons=' . $player->getLookAddons() . '&head=' . $player->getLookHead() . '&body=' . $player->getLookBody() . '&legs=' . $player->getLookLegs() . '&feet=' . $player->getLookFeet() . '" alt="" /></td></tr>';

		$playerNamelocks = new DatabaseList('PlayerNamelocks');
		$filter = new SQL_Filter(new SQL_Field('player_id'), SQL_Filter::EQUAL, $player->getID());
		$playerNamelocks->setFilter($filter);
		if(count($playerNamelocks) > 0)
		{
			$old_names_text = array();
			foreach($playerNamelocks as $oldName)
			{
				$old_names_text[] = 
					'até ' . date("j F Y, g:i a", $oldName->getDate()) . ' conhecido como <b>' . htmlspecialchars($oldName->getName()) . '</b>';
			}
			$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
			$main_content .= '
			<tr bgcolor="' . $bgcolor . '">
				<td>
					Nomes Antigos:
				</td>
			<td>' . implode('<br />', $old_names_text) . '</td></tr>';
		}
		if(in_array($player->getGroup(), $config['site']['groups_support']))
		{
			$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
			$main_content .= '
			<tr bgcolor="' . $bgcolor . '">
				<td>
					Grupo:
				</td>
				<td>
					' . htmlspecialchars(Website::getGroupName($player->getGroup())) . '
				</td>
			</tr>';
		}
		$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
		$main_content .= '
			<tr bgcolor="' . $bgcolor . '">
				<td>
					Sexo:
				</td>
				<td>
					' . htmlspecialchars((($player->getSex() == 0) ? 'mulher' : 'homem')) . '
				</td>
			</tr>';
		$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
		$meritalStatus = 'single';
		if($player->getMarriage() > 0)
		{
			$marriage = new Player();
			$marriage->load($player->getMarriage());
			if($marriage->isLoaded())
				$meritalStatus = 'casado(a) com <a href="?subtopic=Jogadores&name='.urlencode($marriage->getName()).'"><b>'.htmlspecialchars($marriage->getName()).'</b></a>';
		}
		$main_content .= '
			<tr bgcolor="
				' . $bgcolor . '">
					<td>
						Estado Civil:
					</td>
					<td>
						' . $meritalStatus . '
					</td>
				</tr>';
		$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
		$main_content .= '
			<tr bgcolor="' . $bgcolor . '">
				<td>
					Vocação:
				</td>
				<td>
					' . htmlspecialchars(Website::getVocationName($player->getVocation(), $player->getPromotion())) . '
				</td>
			</tr>';
		$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
		$main_content .= '
			<tr bgcolor="' . $bgcolor . '">
				<td>
					Level:
				</td>
				<td>
					' . htmlspecialchars($player->getLevel()) . '
				</td>
			</tr>';
		$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
		$main_content .= '
			<tr bgcolor="' . $bgcolor . '">
				<td>
					Mundo:
				</td>
				<td>
					' . htmlspecialchars($config['site']['worlds'][$player->getWorldID()]) . '
				</td>
			</tr>';
		$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
		$main_content .= '
			<tr bgcolor="' . $bgcolor . '">
				<td>
					Redidência:
				</td>
				<td>
					' . htmlspecialchars($towns_list[$player->getWorldID()][$player->getTownID()]) . '
				</td>
			</tr>';
		$rank_of_player = $player->getRank();
		if(!empty($rank_of_player))
		{
			$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
			$main_content .= '
				<tr bgcolor="' . $bgcolor . '">
					<td>
						Membro da Guild:
					</td>
				<td>
					' . htmlspecialchars($rank_of_player->getName()) . ' da <a href="?subtopic=guilds&action=show&guild='. $rank_of_player->getGuild()->getID() .'">' . htmlspecialchars($rank_of_player->getGuild()->getName()) . '</a></td></tr>';
		}
		// $bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
		// $main_content .= '
			// <tr bgcolor="' . $bgcolor . '">
				// <td>
					// Balance:</td><td>' . htmlspecialchars($player->getBalance()) . ' gold coins</td></tr>';
		$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
		$main_content .= '
			<tr bgcolor="' . $bgcolor . '">
				<td>
					Último login:
				</td>
				<td>
					' . (($player->getLastLogin() > 0) ? date("j F Y, g:i a", $player->getLastLogin()) : 'Nunca entrou.') . '
				</td>
			</tr>';
		if($player->getCreateDate() > 0)
		{
			$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
			$main_content .= '
				<tr bgcolor="' . $bgcolor . '">
					<td>
						Criado:
					</td>
					<td>
						' . date("j F Y, g:i a", $player->getCreateDate()) . '
					</td>
				</tr>';
		}
		if($config['site']['show_vip_storage'] > 0)
		{
			$storageValue = $player->getStorage($config['site']['show_vip_storage']);
			$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
			$main_content .= '
				<tr bgcolor="' . $bgcolor . '">
					<td>
						VIP:
					</td>
					<td>
						' . (($storageValue === null || $storageValue < 0) ? '<span style="font-weight:bold;color:red">NOT VIP</span>' : '<span style="font-weight:bold;color:green">VIP</span>') . '
					</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))
		{
			$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
			$main_content .= '
				<tr bgcolor="' . $bgcolor . '">
					<td>
						Comentário:
					</td>
					<td>
						' . $comment . '
					</td>
				</tr>';
		}
		$main_content .= '</TABLE>';

		$main_content .= '<table width=100%><tr>';
		$itemsList = $player->getItems();
		$main_content .= '
			<td align=center>
				<table with=100% style="border: solid 1px #888888;" CELLSPACING="1">
					<TR>';		
						
						$list = array('2','1','3','6','4','5','9','7','10','8');
							foreach ($list as $number_of_items_showed => $slot)
							{
							if($slot == '8') // add Soul before show 'feet'
							{
							$main_content .= '
								<td style="background-color: '.$config['site']['darkborder'].'; text-align: center;">
									Soul:
								<br/>
									'. $player->getSoul() .'
								</td>';
							}
							if($itemsList->getSlot($slot) == false) // item does not exist in database
							{
							$main_content .= '
								<TD style="background-color: '.$config['site']['darkborder'].';">
									
									<img src="images/itensnovos/' . $slot . $config['site']['item_images_extension_otzao'] . '" width="48"/>
								</TD>';
							}
							else
							{
							$main_content .= '
								<TD style="background-color: '.$config['site']['darkborder'].';">
									<img src="images/itensnovos/'. $itemsList->getSlot($slot)->getID() . $config['site']['item_images_extension'] . '" width="48"/>
								</TD>';
							}
					if($number_of_items_showed % 3 == 2)
			{
				$main_content .= '
					</tr>
					<tr>';
			}
			if($slot == '8') // add Capacity after show 'feet'
			{
				$main_content .= '<td style="background-color: '.$config['site']['darkborder'].'; text-align: center;">Cap:<br/>'. $player->getCap() .'</td>';
			}
		}
		$main_content .= '
			</tr>
		</TABLE>
	</td>';

		$hpPercent = max(0, min(100, $player->getHealth() / max(1, $player->getHealthMax()) * 100));
		$manaPercent = max(0, min(100, $player->getMana() / max(1, $player->getManaMax()) * 100));
		$main_content .= '
			<td align=center >
				<table width=100%>
					<tr>
						<td align=center>
							<table CELLSPACING="1" CELLPADDING="4" width="100%">
								<tr>
									<td BGCOLOR="'.$config['site']['lightborder'].'" align="left" width="20%">
										<b>
											Life:
										</b>
									</td>
									<td BGCOLOR="
										'.$config['site']['lightborder'].'" align="left">
											'.$player->getHealth().'/'.$player->getHealthMax().'
												<div style="width: 100%; height: 3px; border: 1px solid #000;">
													<div style="background: red; width: ' . $hpPercent . '%; height: 3px;">
									</td>
								</tr>
								<tr>
									<td BGCOLOR="'.$config['site']['darkborder'].'" align="left">
										<b>
											Mana do Player:
										</b>
									</td>
									<td BGCOLOR="'.$config['site']['darkborder'].'" align="left">
										' . $player->getMana() . '/' . $player->getManaMax() . '
												<div style="width: 100%; height: 3px; border: 1px solid #000;">
													<div style="background: blue; width: '.$manaPercent.'%; height: 3px;">
									</td>
								</tr>
							</table>
						<tr>';
	
		$expCurrent = Functions::getExpForLevel($player->getLevel());
		$expNext = Functions::getExpForLevel($player->getLevel() + 1);
		$expLeft = bcsub($expNext, $player->getExperience(), 0);


		$expLeftPercent = max(0, min(100, ($player->getExperience() - $expCurrent) / ($expNext - $expCurrent) * 100));
		$main_content .= '
			<tr>
				<table CELLSPACING="1" CELLPADDING="4">
					<tr>
						<td BGCOLOR="'.$config['site']['lightborder'].'" align="left" width="20%">
							<b>
								Level:
							</b>
						</td>
						<td BGCOLOR="'.$config['site']['lightborder'].'" align="left">
							'.$player->getLevel().'
						</td>
					</tr>
					<tr>
						<td BGCOLOR="'.$config['site']['darkborder'].'" align="left">
							<b>
								Experiência:
							</b>
						</td>
						<td BGCOLOR="'.$config['site']['darkborder'].'" align="left">
							' . $player->getExperience() . ' Exp.
						</td>
					</tr>
					<tr>
						<td BGCOLOR="' . $config['site']['lightborder'].'" align="left">
							<b>
								Próximo Level:
							</b>
						</td>
					<td BGCOLOR="'.$config['site']['lightborder'].'" align="left">
						Você precisa de 
							<b>
								' . $expLeft . ' Exp.
							</b>
								para o Level 
							<b>
								' . ($player->getLevel() + 1) . '
							</b>.<div title="' . (100 - $expLeftPercent)  . '% left" style="width: 100%; height: 3px; border: 1px solid #000;">
							<div style="background: red; width: '.$expLeftPercent.'%; height: 3px;">
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>
</tr>
</TABLE></td>';

		if($config['site']['show_skills_info'])
		{
			$main_content .= '<center><strong>Skills</strong><table cellspacing="0" cellpadding="0" border="1" width="200">
				
				<tbody>
					<tr>
						<td style="text-align: center;"><a href="?subtopic=Ranking_do_OTZAO&list=experience&world=' . $player->getWorldID() . '"><img src="images/skills/level.gif" alt="" style="border-style: none"/></td>
						<td style="text-align: center;"><a href="?subtopic=Ranking_do_OTZAO&list=magic&world=' . $player->getWorldID() . '"><img src="images/skills/ml.gif" alt="" style="border-style: none"/></td>
						<td style="text-align: center;"><a href="?subtopic=Ranking_do_OTZAO&list=fist&world=' . $player->getWorldID() . '"><img src="images/skills/fist.gif" alt="" style="border-style: none"/></td>
						<td style="text-align: center;"><a href="?subtopic=Ranking_do_OTZAO&list=club&world=' . $player->getWorldID() . '"><img src="images/skills/club.gif" alt="" style="border-style: none"/></td>
						<td style="text-align: center;"><a href="?subtopic=Ranking_do_OTZAO&list=sword&world=' . $player->getWorldID() . '"><img src="images/skills/sword.gif" alt="" style="border-style: none"/></td>
						<td style="text-align: center;"><a href="?subtopic=Ranking_do_OTZAO&list=axe&world=' . $player->getWorldID() . '"><img src="images/skills/axe.gif" alt="" style="border-style: none"/></td>
						<td style="text-align: center;"><a href="?subtopic=Ranking_do_OTZAO&list=distance&world=' . $player->getWorldID() . '"><img src="images/skills/dist.gif" alt="" style="border-style: none"/></td>
						<td style="text-align: center;"><a href="?subtopic=Ranking_do_OTZAO&list=shield&world=' . $player->getWorldID() . '"><img src="images/skills/def.gif" alt="" style="border-style: none"/></td>
						<td style="text-align: center;"><a href="?subtopic=Ranking_do_OTZAO&list=fishing&world=' . $player->getWorldID() . '"><img src="images/skills/fish.gif" alt="" style="border-style: none"/></td>
					</tr>
					<tr>
						<tr bgcolor="' . $config['site']['darkborder'] . '"><td style="text-align: center;"><strong>Level</strong></td>
						<td style="text-align: center;"><strong>ML</strong></td>
						<td style="text-align: center;"><strong>Fist</strong></td>
						<td style="text-align: center;"><strong>Mace</strong></td>
						<td style="text-align: center;"><strong>Sword</strong></td>
						<td style="text-align: center;"><strong>Axe</strong></td>
						<td style="text-align: center;"><strong>Dist</strong></td>
						<td style="text-align: center;"><strong>Def</strong></td>
						<td style="text-align: center;"><strong>Fish</strong></td>
					</tr>
					<tr>
						<tr bgcolor="' . $config['site']['lightborder'] . '"><td style="text-align: center;">' . $player->getLevel() . '</td>
						<td style="text-align: center;">' . $player->getMagLevel().'</td>
						<td style="text-align: center;">' . $player->getSkill(0) . '</td>
						<td style="text-align: center;">' . $player->getSkill(1) . '</td>
						<td style="text-align: center;">' . $player->getSkill(2) . '</td>
						<td style="text-align: center;">' . $player->getSkill(3) . '</td>
						<td style="text-align: center;">' . $player->getSkill(4) . '</td>
						<td style="text-align: center;">' . $player->getSkill(5) . '</td>
						<td style="text-align: center;">' . $player->getSkill(6) . '</td>
					</tr>
				</tbody>
			</table>
			<div style="text-align: center;">&nbsp;<br />&nbsp;</div></center>';
		}

		$main_content .= '<center><table cellspacing="0" cellpadding="0" border="1" width="200">
				<tbody>
					<tr bgcolor="' . $config['site']['darkborder'] . '">
						<td style="text-align: center;"><img src="?subtopic=signature&name=' . urlencode($player->getName()) . '" alt="Signature" /></td>
					</tr>
					<tr bgcolor="' . $config['site']['lightborder'] . '">
						<td style="text-align: center;"><b>Link:</b><input type="text" name="" size="100" value="' . htmlspecialchars($config['server']['url'] . '?subtopic=signature&name=' . urlencode($player->getName())) . '" /></td>
					</tr>
				</tbody>
			</table>
			<div style="text-align: center;">&nbsp;<br />&nbsp;</div></center>';

		if(isset($config['site']['quests']) && is_array($config['site']['quests']) && count($config['site']['quests']) > 0)
		{
			$main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD align="left" COLSPAN=2 CLASS=white><B>Quests</B></TD></TD align="right"></TD></TR>';		
			$number_of_quests = 0;
			foreach($config['site']['quests'] as $questName => $storageID)
			{
				$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
				$number_of_quests++;
				$main_content .= '<TR BGCOLOR="' . $bgcolor . '"><TD WIDTH=95%>' . $questName . '</TD>';
				if($player->getStorage($storageID) === null)
				{
					$main_content .= '<TD><img src="images/false.png"/></TD></TR>';
				}
				else
				{
					$main_content .= '<TD><img src="images/true.png"/></TD></TR>';
				}
			}
			$main_content .= '</TABLE></td></tr></table><br />';
		}

		$deads = 0;

		//deaths list
		$player_deaths = $SQL->query('SELECT ' . $SQL->fieldName('id') . ', ' . $SQL->fieldName('date') . ', ' . $SQL->fieldName('level') . ' FROM ' . $SQL->tableName('player_deaths') . ' WHERE ' . $SQL->fieldName('player_id') . ' = '.$player->getId().' ORDER BY ' . $SQL->fieldName('date') . ' DESC LIMIT 10');
		foreach($player_deaths as $death)
		{
			$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
			$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 ' . $SQL->tableName('environment_killers') . '.' . $SQL->fieldName('name') . ' AS monster_name, ' . $SQL->tableName('players') . '.' . $SQL->fieldName('name') . ' AS player_name, ' . $SQL->tableName('players') . '.' . $SQL->fieldName('deleted') . ' AS player_exists FROM ' . $SQL->tableName('killers') . ' LEFT JOIN ' . $SQL->tableName('environment_killers') . ' ON ' . $SQL->tableName('killers') . '.' . $SQL->fieldName('id') . ' = ' . $SQL->tableName('environment_killers') . '.' . $SQL->fieldName('kill_id') . ' LEFT JOIN ' . $SQL->tableName('player_killers') . ' ON ' . $SQL->tableName('killers') . '.' . $SQL->fieldName('id') . ' = ' . $SQL->tableName('player_killers') . '.' . $SQL->fieldName('kill_id') . ' LEFT JOIN ' . $SQL->tableName('players') . ' ON ' . $SQL->tableName('players') . '.' . $SQL->fieldName('id') . ' = ' . $SQL->tableName('player_killers') . '.' . $SQL->fieldName('player_id') . '  WHERE ' . $SQL->tableName('killers') . '.' . $SQL->fieldName('death_id') . ' = ' . $SQL->quote($death['id']) . ' ORDER BY ' . $SQL->tableName('killers') . '.' . $SQL->fieldName('final_hit') . ' DESC, ' . $SQL->tableName('killers') . '.' . $SQL->fieldName('id') . ' ASC')->fetchAll();

			$i = 0;
			$count = count($killers);
			foreach($killers as $killer)
			{
				$i++;
				if($i == 1)
				{
					if($count <= 4)
						$dead_add_content .= "killed at level <b>".$death['level']."</b> by ";
					elseif($count > 4 and $count < 10)
						$dead_add_content .= "slain at level <b>".$death['level']."</b> by ";
					elseif($count > 9 and $count < 15)
						$dead_add_content .= "crushed at level <b>".$death['level']."</b> by ";
					elseif($count > 14 and $count < 20)
						$dead_add_content .= "eliminated at level <b>".$death['level']."</b> by ";
					elseif($count > 19)
						$dead_add_content .= "annihilated at level <b>".$death['level']."</b> by ";
				}
				elseif($i == $count)
					$dead_add_content .= " and ";
				else
					$dead_add_content .= ", ";

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

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

					$dead_add_content .= htmlspecialchars($killer['player_name']);
					if($killer['player_exists'] == 0)
						$dead_add_content .= "</a>";
				}
				else
					$dead_add_content .= htmlspecialchars($killer['monster_name']);
			}

			$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 />';

		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())
			{
				$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
				$main_content .= '<TR BGCOLOR="' . $bgcolor . '"><TD WIDTH=20%>Real name:</TD><TD>' . $account->getRLName() . '</TD></TR>';
			}
			if($account->getLocation())
			{
				$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
				$main_content .= '<TR BGCOLOR="' . $bgcolor . '"><TD WIDTH=20%>Location:</TD><TD>' . $account->getLocation() . '</TD></TR>';
			}
			$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
			if($account->getLastLogin())
				$main_content .= '<TR BGCOLOR="' . $bgcolor . '"><TD WIDTH=20%>Last login:</TD><TD>' . date("j F Y, g:i a", $account->getLastLogin()) . '</TD></TR>';
			else
				$main_content .= '<TR BGCOLOR="' . $bgcolor . '"><TD WIDTH=20%>Last login:</TD><TD>Never logged in.</TD></TR>';
			if($account->getCreateDate())
			{
				$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
				$main_content .= '<TR BGCOLOR="' . $bgcolor . '"><TD WIDTH=20%>Created:</TD><TD>' . date("j F Y, g:i a", $account->getCreateDate()) . '</TD></TR>';
			}
			$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
			$main_content .= '<TR BGCOLOR="' . $bgcolor . '"><TD>Account&#160;Status:</TD><TD>';
			$main_content .= ($account->isPremium() > 0) ? '<b><font color="green">Premium Account</font></b>' : '<b><font color="red">Free 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="' . $bgcolor . '"><TD><B>Name</B></TD><TD><B>World</B></TD><TD><B>Level</B></TD><TD><b>Status</b></TD><TD><B>&#160;</B></TD></TR>';
			$account_players = $account->getPlayersList();
			$player_number = 0;
			foreach($account_players as $player_list)
			{
				if(!$player_list->getHideChar())
				{
					$player_number++;
					$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $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.'.&#160;'.htmlspecialchars($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().' '.htmlspecialchars($vocation_name[$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=Jogadores" METHOD=post><TR><TD><INPUT TYPE="hidden" NAME="name" VALUE="'.htmlspecialchars($player_list->getName()).'"><INPUT TYPE=image NAME="View '.htmlspecialchars($player_list->getName()).'" ALT="View '.htmlspecialchars($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/blank.gif" WIDTH=10 HEIGHT=1 BORDER=0></TD></TR></TABLE>';
		}
	}
	else
		$search_errors[] = 'Character <b>'.htmlspecialchars($name).'</b> does not exist.';	
}
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><BR><FORM ACTION="?subtopic=Jogadores" 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>';

 

Mas, tipo, penso que irá haver erros por que sua tabela 'accounts' tem colunas com nomes diferentes.

 

Você tá montando seu OT sozinho?

5YkRF3w.gif

 

 

 

 

 

 

CzysZUR.gifytaam6k.png

 

 

Link para o post
Compartilhar em outros sites
2 minutos atrás, Xagah disse:

Claro:

  Mostrar conteúdo oculto



<?php
if(!defined('INITIALIZED'))
	exit;

$name = '';
if(isset($_REQUEST['name']))
	$name = (string) $_REQUEST['name'];

if(!empty($name))
{
	$player = new Player();
	$player->find($name);
	if($player->isLoaded())
	{
		$number_of_rows = 0;
		$account = $player->getAccount();
		$skull = '';
		if ($player->getSkull() == 4)
			$skull = "<img style='border: 0;' src='./images/skulls/redskull.gif'/>";
		else if ($player->getSkull() == 5)
			$skull = "<img style='border: 0;' src='./images/skulls/blackskull.gif'/>";
		$main_content .= '<table border="0" cellspacing="1" cellpadding="4" width="100%">
			<tr bgcolor="'.$config['site']['vdarkborder'].'">
				<td colspan="2" style="font-weight:bold;color:white">
					Informações do Jogador
				</td>
			</tr>';
		$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
		$main_content .= '<tr bgcolor="' . $bgcolor . '">
			<td width="20%">
				Nome:
			</td>
			<td style="font-weight:bold;color:' . (($player->isOnline()) ? 'green' : 'red') . '">' . htmlspecialchars($player->getName()) . ' ' . $skull . ' <img src="' . $config['site']['flag_images_url'] . $account->getFlag() . $config['site']['flag_images_extension'] . '" title="Country: ' . $account->getFlag() . '" alt="' . $account->getFlag() . '" />';
		if($player->isBanned() || $account->isBanned())
			$main_content .= '<span style="color:red">
				[BANIDO]
			</span>';
		if($player->isNamelocked())
			$main_content .= '
			<span style="color:red">
				[NOME PROIBIDO]
			</span>';
		$main_content .= '
			<br />
				<img src="' . $config['site']['outfit_images_url'] . '?id=' . $player->getLookType() . '&addons=' . $player->getLookAddons() . '&head=' . $player->getLookHead() . '&body=' . $player->getLookBody() . '&legs=' . $player->getLookLegs() . '&feet=' . $player->getLookFeet() . '" alt="" /></td></tr>';

		$playerNamelocks = new DatabaseList('PlayerNamelocks');
		$filter = new SQL_Filter(new SQL_Field('player_id'), SQL_Filter::EQUAL, $player->getID());
		$playerNamelocks->setFilter($filter);
		if(count($playerNamelocks) > 0)
		{
			$old_names_text = array();
			foreach($playerNamelocks as $oldName)
			{
				$old_names_text[] = 
					'até ' . date("j F Y, g:i a", $oldName->getDate()) . ' conhecido como <b>' . htmlspecialchars($oldName->getName()) . '</b>';
			}
			$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
			$main_content .= '
			<tr bgcolor="' . $bgcolor . '">
				<td>
					Nomes Antigos:
				</td>
			<td>' . implode('<br />', $old_names_text) . '</td></tr>';
		}
		if(in_array($player->getGroup(), $config['site']['groups_support']))
		{
			$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
			$main_content .= '
			<tr bgcolor="' . $bgcolor . '">
				<td>
					Grupo:
				</td>
				<td>
					' . htmlspecialchars(Website::getGroupName($player->getGroup())) . '
				</td>
			</tr>';
		}
		$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
		$main_content .= '
			<tr bgcolor="' . $bgcolor . '">
				<td>
					Sexo:
				</td>
				<td>
					' . htmlspecialchars((($player->getSex() == 0) ? 'mulher' : 'homem')) . '
				</td>
			</tr>';
		$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
		$meritalStatus = 'single';
		if($player->getMarriage() > 0)
		{
			$marriage = new Player();
			$marriage->load($player->getMarriage());
			if($marriage->isLoaded())
				$meritalStatus = 'casado(a) com <a href="?subtopic=Jogadores&name='.urlencode($marriage->getName()).'"><b>'.htmlspecialchars($marriage->getName()).'</b></a>';
		}
		$main_content .= '
			<tr bgcolor="
				' . $bgcolor . '">
					<td>
						Estado Civil:
					</td>
					<td>
						' . $meritalStatus . '
					</td>
				</tr>';
		$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
		$main_content .= '
			<tr bgcolor="' . $bgcolor . '">
				<td>
					Vocação:
				</td>
				<td>
					' . htmlspecialchars(Website::getVocationName($player->getVocation(), $player->getPromotion())) . '
				</td>
			</tr>';
		$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
		$main_content .= '
			<tr bgcolor="' . $bgcolor . '">
				<td>
					Level:
				</td>
				<td>
					' . htmlspecialchars($player->getLevel()) . '
				</td>
			</tr>';
		$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
		$main_content .= '
			<tr bgcolor="' . $bgcolor . '">
				<td>
					Mundo:
				</td>
				<td>
					' . htmlspecialchars($config['site']['worlds'][$player->getWorldID()]) . '
				</td>
			</tr>';
		$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
		$main_content .= '
			<tr bgcolor="' . $bgcolor . '">
				<td>
					Redidência:
				</td>
				<td>
					' . htmlspecialchars($towns_list[$player->getWorldID()][$player->getTownID()]) . '
				</td>
			</tr>';
		$rank_of_player = $player->getRank();
		if(!empty($rank_of_player))
		{
			$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
			$main_content .= '
				<tr bgcolor="' . $bgcolor . '">
					<td>
						Membro da Guild:
					</td>
				<td>
					' . htmlspecialchars($rank_of_player->getName()) . ' da <a href="?subtopic=guilds&action=show&guild='. $rank_of_player->getGuild()->getID() .'">' . htmlspecialchars($rank_of_player->getGuild()->getName()) . '</a></td></tr>';
		}
		// $bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
		// $main_content .= '
			// <tr bgcolor="' . $bgcolor . '">
				// <td>
					// Balance:</td><td>' . htmlspecialchars($player->getBalance()) . ' gold coins</td></tr>';
		$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
		$main_content .= '
			<tr bgcolor="' . $bgcolor . '">
				<td>
					Último login:
				</td>
				<td>
					' . (($player->getLastLogin() > 0) ? date("j F Y, g:i a", $player->getLastLogin()) : 'Nunca entrou.') . '
				</td>
			</tr>';
		if($player->getCreateDate() > 0)
		{
			$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
			$main_content .= '
				<tr bgcolor="' . $bgcolor . '">
					<td>
						Criado:
					</td>
					<td>
						' . date("j F Y, g:i a", $player->getCreateDate()) . '
					</td>
				</tr>';
		}
		if($config['site']['show_vip_storage'] > 0)
		{
			$storageValue = $player->getStorage($config['site']['show_vip_storage']);
			$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
			$main_content .= '
				<tr bgcolor="' . $bgcolor . '">
					<td>
						VIP:
					</td>
					<td>
						' . (($storageValue === null || $storageValue < 0) ? '<span style="font-weight:bold;color:red">NOT VIP</span>' : '<span style="font-weight:bold;color:green">VIP</span>') . '
					</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))
		{
			$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
			$main_content .= '
				<tr bgcolor="' . $bgcolor . '">
					<td>
						Comentário:
					</td>
					<td>
						' . $comment . '
					</td>
				</tr>';
		}
		$main_content .= '</TABLE>';

		$main_content .= '<table width=100%><tr>';
		$itemsList = $player->getItems();
		$main_content .= '
			<td align=center>
				<table with=100% style="border: solid 1px #888888;" CELLSPACING="1">
					<TR>';		
						
						$list = array('2','1','3','6','4','5','9','7','10','8');
							foreach ($list as $number_of_items_showed => $slot)
							{
							if($slot == '8') // add Soul before show 'feet'
							{
							$main_content .= '
								<td style="background-color: '.$config['site']['darkborder'].'; text-align: center;">
									Soul:
								<br/>
									'. $player->getSoul() .'
								</td>';
							}
							if($itemsList->getSlot($slot) == false) // item does not exist in database
							{
							$main_content .= '
								<TD style="background-color: '.$config['site']['darkborder'].';">
									
									<img src="images/itensnovos/' . $slot . $config['site']['item_images_extension_otzao'] . '" width="48"/>
								</TD>';
							}
							else
							{
							$main_content .= '
								<TD style="background-color: '.$config['site']['darkborder'].';">
									<img src="images/itensnovos/'. $itemsList->getSlot($slot)->getID() . $config['site']['item_images_extension'] . '" width="48"/>
								</TD>';
							}
					if($number_of_items_showed % 3 == 2)
			{
				$main_content .= '
					</tr>
					<tr>';
			}
			if($slot == '8') // add Capacity after show 'feet'
			{
				$main_content .= '<td style="background-color: '.$config['site']['darkborder'].'; text-align: center;">Cap:<br/>'. $player->getCap() .'</td>';
			}
		}
		$main_content .= '
			</tr>
		</TABLE>
	</td>';

		$hpPercent = max(0, min(100, $player->getHealth() / max(1, $player->getHealthMax()) * 100));
		$manaPercent = max(0, min(100, $player->getMana() / max(1, $player->getManaMax()) * 100));
		$main_content .= '
			<td align=center >
				<table width=100%>
					<tr>
						<td align=center>
							<table CELLSPACING="1" CELLPADDING="4" width="100%">
								<tr>
									<td BGCOLOR="'.$config['site']['lightborder'].'" align="left" width="20%">
										<b>
											Life:
										</b>
									</td>
									<td BGCOLOR="
										'.$config['site']['lightborder'].'" align="left">
											'.$player->getHealth().'/'.$player->getHealthMax().'
												<div style="width: 100%; height: 3px; border: 1px solid #000;">
													<div style="background: red; width: ' . $hpPercent . '%; height: 3px;">
									</td>
								</tr>
								<tr>
									<td BGCOLOR="'.$config['site']['darkborder'].'" align="left">
										<b>
											Mana do Player:
										</b>
									</td>
									<td BGCOLOR="'.$config['site']['darkborder'].'" align="left">
										' . $player->getMana() . '/' . $player->getManaMax() . '
												<div style="width: 100%; height: 3px; border: 1px solid #000;">
													<div style="background: blue; width: '.$manaPercent.'%; height: 3px;">
									</td>
								</tr>
							</table>
						<tr>';
	
		$expCurrent = Functions::getExpForLevel($player->getLevel());
		$expNext = Functions::getExpForLevel($player->getLevel() + 1);
		$expLeft = bcsub($expNext, $player->getExperience(), 0);


		$expLeftPercent = max(0, min(100, ($player->getExperience() - $expCurrent) / ($expNext - $expCurrent) * 100));
		$main_content .= '
			<tr>
				<table CELLSPACING="1" CELLPADDING="4">
					<tr>
						<td BGCOLOR="'.$config['site']['lightborder'].'" align="left" width="20%">
							<b>
								Level:
							</b>
						</td>
						<td BGCOLOR="'.$config['site']['lightborder'].'" align="left">
							'.$player->getLevel().'
						</td>
					</tr>
					<tr>
						<td BGCOLOR="'.$config['site']['darkborder'].'" align="left">
							<b>
								Experiência:
							</b>
						</td>
						<td BGCOLOR="'.$config['site']['darkborder'].'" align="left">
							' . $player->getExperience() . ' Exp.
						</td>
					</tr>
					<tr>
						<td BGCOLOR="' . $config['site']['lightborder'].'" align="left">
							<b>
								Próximo Level:
							</b>
						</td>
					<td BGCOLOR="'.$config['site']['lightborder'].'" align="left">
						Você precisa de 
							<b>
								' . $expLeft . ' Exp.
							</b>
								para o Level 
							<b>
								' . ($player->getLevel() + 1) . '
							</b>.<div title="' . (100 - $expLeftPercent)  . '% left" style="width: 100%; height: 3px; border: 1px solid #000;">
							<div style="background: red; width: '.$expLeftPercent.'%; height: 3px;">
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>
</tr>
</TABLE></td>';

		if($config['site']['show_skills_info'])
		{
			$main_content .= '<center><strong>Skills</strong><table cellspacing="0" cellpadding="0" border="1" width="200">
				
				<tbody>
					<tr>
						<td style="text-align: center;"><a href="?subtopic=Ranking_do_OTZAO&list=experience&world=' . $player->getWorldID() . '"><img src="images/skills/level.gif" alt="" style="border-style: none"/></td>
						<td style="text-align: center;"><a href="?subtopic=Ranking_do_OTZAO&list=magic&world=' . $player->getWorldID() . '"><img src="images/skills/ml.gif" alt="" style="border-style: none"/></td>
						<td style="text-align: center;"><a href="?subtopic=Ranking_do_OTZAO&list=fist&world=' . $player->getWorldID() . '"><img src="images/skills/fist.gif" alt="" style="border-style: none"/></td>
						<td style="text-align: center;"><a href="?subtopic=Ranking_do_OTZAO&list=club&world=' . $player->getWorldID() . '"><img src="images/skills/club.gif" alt="" style="border-style: none"/></td>
						<td style="text-align: center;"><a href="?subtopic=Ranking_do_OTZAO&list=sword&world=' . $player->getWorldID() . '"><img src="images/skills/sword.gif" alt="" style="border-style: none"/></td>
						<td style="text-align: center;"><a href="?subtopic=Ranking_do_OTZAO&list=axe&world=' . $player->getWorldID() . '"><img src="images/skills/axe.gif" alt="" style="border-style: none"/></td>
						<td style="text-align: center;"><a href="?subtopic=Ranking_do_OTZAO&list=distance&world=' . $player->getWorldID() . '"><img src="images/skills/dist.gif" alt="" style="border-style: none"/></td>
						<td style="text-align: center;"><a href="?subtopic=Ranking_do_OTZAO&list=shield&world=' . $player->getWorldID() . '"><img src="images/skills/def.gif" alt="" style="border-style: none"/></td>
						<td style="text-align: center;"><a href="?subtopic=Ranking_do_OTZAO&list=fishing&world=' . $player->getWorldID() . '"><img src="images/skills/fish.gif" alt="" style="border-style: none"/></td>
					</tr>
					<tr>
						<tr bgcolor="' . $config['site']['darkborder'] . '"><td style="text-align: center;"><strong>Level</strong></td>
						<td style="text-align: center;"><strong>ML</strong></td>
						<td style="text-align: center;"><strong>Fist</strong></td>
						<td style="text-align: center;"><strong>Mace</strong></td>
						<td style="text-align: center;"><strong>Sword</strong></td>
						<td style="text-align: center;"><strong>Axe</strong></td>
						<td style="text-align: center;"><strong>Dist</strong></td>
						<td style="text-align: center;"><strong>Def</strong></td>
						<td style="text-align: center;"><strong>Fish</strong></td>
					</tr>
					<tr>
						<tr bgcolor="' . $config['site']['lightborder'] . '"><td style="text-align: center;">' . $player->getLevel() . '</td>
						<td style="text-align: center;">' . $player->getMagLevel().'</td>
						<td style="text-align: center;">' . $player->getSkill(0) . '</td>
						<td style="text-align: center;">' . $player->getSkill(1) . '</td>
						<td style="text-align: center;">' . $player->getSkill(2) . '</td>
						<td style="text-align: center;">' . $player->getSkill(3) . '</td>
						<td style="text-align: center;">' . $player->getSkill(4) . '</td>
						<td style="text-align: center;">' . $player->getSkill(5) . '</td>
						<td style="text-align: center;">' . $player->getSkill(6) . '</td>
					</tr>
				</tbody>
			</table>
			<div style="text-align: center;">&nbsp;<br />&nbsp;</div></center>';
		}

		$main_content .= '<center><table cellspacing="0" cellpadding="0" border="1" width="200">
				<tbody>
					<tr bgcolor="' . $config['site']['darkborder'] . '">
						<td style="text-align: center;"><img src="?subtopic=signature&name=' . urlencode($player->getName()) . '" alt="Signature" /></td>
					</tr>
					<tr bgcolor="' . $config['site']['lightborder'] . '">
						<td style="text-align: center;"><b>Link:</b><input type="text" name="" size="100" value="' . htmlspecialchars($config['server']['url'] . '?subtopic=signature&name=' . urlencode($player->getName())) . '" /></td>
					</tr>
				</tbody>
			</table>
			<div style="text-align: center;">&nbsp;<br />&nbsp;</div></center>';

		if(isset($config['site']['quests']) && is_array($config['site']['quests']) && count($config['site']['quests']) > 0)
		{
			$main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD align="left" COLSPAN=2 CLASS=white><B>Quests</B></TD></TD align="right"></TD></TR>';		
			$number_of_quests = 0;
			foreach($config['site']['quests'] as $questName => $storageID)
			{
				$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
				$number_of_quests++;
				$main_content .= '<TR BGCOLOR="' . $bgcolor . '"><TD WIDTH=95%>' . $questName . '</TD>';
				if($player->getStorage($storageID) === null)
				{
					$main_content .= '<TD><img src="images/false.png"/></TD></TR>';
				}
				else
				{
					$main_content .= '<TD><img src="images/true.png"/></TD></TR>';
				}
			}
			$main_content .= '</TABLE></td></tr></table><br />';
		}

		$deads = 0;

		//deaths list
		$player_deaths = $SQL->query('SELECT ' . $SQL->fieldName('id') . ', ' . $SQL->fieldName('date') . ', ' . $SQL->fieldName('level') . ' FROM ' . $SQL->tableName('player_deaths') . ' WHERE ' . $SQL->fieldName('player_id') . ' = '.$player->getId().' ORDER BY ' . $SQL->fieldName('date') . ' DESC LIMIT 10');
		foreach($player_deaths as $death)
		{
			$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
			$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 ' . $SQL->tableName('environment_killers') . '.' . $SQL->fieldName('name') . ' AS monster_name, ' . $SQL->tableName('players') . '.' . $SQL->fieldName('name') . ' AS player_name, ' . $SQL->tableName('players') . '.' . $SQL->fieldName('deleted') . ' AS player_exists FROM ' . $SQL->tableName('killers') . ' LEFT JOIN ' . $SQL->tableName('environment_killers') . ' ON ' . $SQL->tableName('killers') . '.' . $SQL->fieldName('id') . ' = ' . $SQL->tableName('environment_killers') . '.' . $SQL->fieldName('kill_id') . ' LEFT JOIN ' . $SQL->tableName('player_killers') . ' ON ' . $SQL->tableName('killers') . '.' . $SQL->fieldName('id') . ' = ' . $SQL->tableName('player_killers') . '.' . $SQL->fieldName('kill_id') . ' LEFT JOIN ' . $SQL->tableName('players') . ' ON ' . $SQL->tableName('players') . '.' . $SQL->fieldName('id') . ' = ' . $SQL->tableName('player_killers') . '.' . $SQL->fieldName('player_id') . '  WHERE ' . $SQL->tableName('killers') . '.' . $SQL->fieldName('death_id') . ' = ' . $SQL->quote($death['id']) . ' ORDER BY ' . $SQL->tableName('killers') . '.' . $SQL->fieldName('final_hit') . ' DESC, ' . $SQL->tableName('killers') . '.' . $SQL->fieldName('id') . ' ASC')->fetchAll();

			$i = 0;
			$count = count($killers);
			foreach($killers as $killer)
			{
				$i++;
				if($i == 1)
				{
					if($count <= 4)
						$dead_add_content .= "killed at level <b>".$death['level']."</b> by ";
					elseif($count > 4 and $count < 10)
						$dead_add_content .= "slain at level <b>".$death['level']."</b> by ";
					elseif($count > 9 and $count < 15)
						$dead_add_content .= "crushed at level <b>".$death['level']."</b> by ";
					elseif($count > 14 and $count < 20)
						$dead_add_content .= "eliminated at level <b>".$death['level']."</b> by ";
					elseif($count > 19)
						$dead_add_content .= "annihilated at level <b>".$death['level']."</b> by ";
				}
				elseif($i == $count)
					$dead_add_content .= " and ";
				else
					$dead_add_content .= ", ";

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

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

					$dead_add_content .= htmlspecialchars($killer['player_name']);
					if($killer['player_exists'] == 0)
						$dead_add_content .= "</a>";
				}
				else
					$dead_add_content .= htmlspecialchars($killer['monster_name']);
			}

			$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 />';

		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())
			{
				$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
				$main_content .= '<TR BGCOLOR="' . $bgcolor . '"><TD WIDTH=20%>Real name:</TD><TD>' . $account->getRLName() . '</TD></TR>';
			}
			if($account->getLocation())
			{
				$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
				$main_content .= '<TR BGCOLOR="' . $bgcolor . '"><TD WIDTH=20%>Location:</TD><TD>' . $account->getLocation() . '</TD></TR>';
			}
			$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
			if($account->getLastLogin())
				$main_content .= '<TR BGCOLOR="' . $bgcolor . '"><TD WIDTH=20%>Last login:</TD><TD>' . date("j F Y, g:i a", $account->getLastLogin()) . '</TD></TR>';
			else
				$main_content .= '<TR BGCOLOR="' . $bgcolor . '"><TD WIDTH=20%>Last login:</TD><TD>Never logged in.</TD></TR>';
			if($account->getCreateDate())
			{
				$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
				$main_content .= '<TR BGCOLOR="' . $bgcolor . '"><TD WIDTH=20%>Created:</TD><TD>' . date("j F Y, g:i a", $account->getCreateDate()) . '</TD></TR>';
			}
			$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
			$main_content .= '<TR BGCOLOR="' . $bgcolor . '"><TD>Account&#160;Status:</TD><TD>';
			$main_content .= ($account->isPremium() > 0) ? '<b><font color="green">Premium Account</font></b>' : '<b><font color="red">Free 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="' . $bgcolor . '"><TD><B>Name</B></TD><TD><B>World</B></TD><TD><B>Level</B></TD><TD><b>Status</b></TD><TD><B>&#160;</B></TD></TR>';
			$account_players = $account->getPlayersList();
			$player_number = 0;
			foreach($account_players as $player_list)
			{
				if(!$player_list->getHideChar())
				{
					$player_number++;
					$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $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.'.&#160;'.htmlspecialchars($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().' '.htmlspecialchars($vocation_name[$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=Jogadores" METHOD=post><TR><TD><INPUT TYPE="hidden" NAME="name" VALUE="'.htmlspecialchars($player_list->getName()).'"><INPUT TYPE=image NAME="View '.htmlspecialchars($player_list->getName()).'" ALT="View '.htmlspecialchars($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/blank.gif" WIDTH=10 HEIGHT=1 BORDER=0></TD></TR></TABLE>';
		}
	}
	else
		$search_errors[] = 'Character <b>'.htmlspecialchars($name).'</b> does not exist.';	
}
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><BR><FORM ACTION="?subtopic=Jogadores" 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>';

 

Mas, tipo, penso que irá haver erros por que sua tabela 'accounts' tem colunas com nomes diferentes.

 

Você tá montando seu OT sozinho?

Sim, estou sozinho

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo