Ir para conteúdo

Sistema de TopGuild Por Kills/GesiorACC


Pesilk

Posts Recomendados

Galera queria saber Onde encontro o script do GesiorACC, para mostrar na pagina principal as Top Guilds com Mais Kills...

 

Ultilizo o BaiakYourots 5.2 Sem Erro no Distro, do Luiz Baiak

Link para o comentário
Compartilhar em outros sites

Vamos lá.

 

Vá no seu latestnews.php e veja aonde quer colocá-lo (recomendo no começo)

 

 

 


// boas vindas - by matheusgrilo

$main_content .= '<table border="0" cellspacing="0" cellpadding="4" width="100%">
<tbody>
<tr bgcolor="#505050">
<td colspan="2"><span style="color: #ffffff;"><strong><center>Bem vindo ao '.$config['site']['worlds']['0'].'</center></strong></span></td>
</tr>
<tr bgcolor="#D4C0A1" style="text-align:center;">
<td>Último Char Criado: <a href="?subtopic=characters&name='.$SQL->query('select name from players order by id DESC')->fetchColumn().'">'.$SQL->query('select name from players order by id DESC')->fetchColumn().'</a>, player número '.$SQL->query('select count(*) from players')->fetchColumn().'. Boa sorte.</td>
</tr>
<tr bgcolor="#F1E0C6" style="text-align:center;">
<td>Atualmente, o top level do servidor é <a href="?subtopic=characters&name='.$SQL->query('select name from players order by experience DESC')->fetchColumn().'">'.$SQL->query('select name from players order by experience DESC')->fetchColumn().'</a> ('.$SQL->query('select level from players order by experience DESC')->fetchColumn().'). Parabéns.</td>
</tr>
<tr>
<td style="font-weight: bold; text-align: right; font-size: 65%;">
Script by <a href="http://pastebin.com/cxmg0dYm" target="_blank">MatheusGrilo</a>
</td>
</tr>
</tbody>
</table>
<br/>';
// top kills - guilds
$main_content .= '<div class="NewsHeadline">
	<div class="NewsHeadlineBackground" style="background-image:url(' . $layout_name . '/images/news/newsheadline_background.gif)">
		<table border="0">
			<tr>
				<td style="text-align: center; font-weight: bold;">
					<font color="white">Guilds mais poderosas</font>
				</td>
			</tr>
		</table>
	</div>
</div>
<table border="0" cellspacing="3" cellpadding="4" width="100%">
	<tr>';

foreach($SQL->query('SELECT ' . $SQL->tableName('g') . '.' . $SQL->fieldName('id') . ' AS ' . $SQL->fieldName('id') . ', ' . $SQL->tableName('g') . '.' . $SQL->fieldName('name') . ' AS ' . $SQL->fieldName('name') . ', COUNT(' . $SQL->tableName('g') . '.' . $SQL->fieldName('name') . ') AS ' . $SQL->fieldName('frags') . ' FROM ' . $SQL->tableName('killers') . ' k LEFT JOIN ' . $SQL->tableName('player_killers') . ' pk ON ' . $SQL->tableName('k') . '.' . $SQL->fieldName('id') . ' = ' . $SQL->tableName('pk') . '.' . $SQL->fieldName('kill_id') . ' LEFT JOIN ' . $SQL->tableName('players') . ' p ON ' . $SQL->tableName('pk') . '.' . $SQL->fieldName('player_id') . ' = ' . $SQL->tableName('p') . '.' . $SQL->fieldName('id') . ' LEFT JOIN ' . $SQL->tableName('guild_ranks') . ' gr ON ' . $SQL->tableName('p') . '.' . $SQL->fieldName('rank_id') . ' = ' . $SQL->tableName('gr') . '.' . $SQL->fieldName('id') . ' LEFT JOIN ' . $SQL->tableName('guilds') . ' g ON ' . $SQL->tableName('gr') . '.' . $SQL->fieldName('guild_id') . ' = ' . $SQL->tableName('g') . '.' . $SQL->fieldName('id') . ' WHERE ' . $SQL->tableName('g') . '.' . $SQL->fieldName('id') . ' > 0 AND ' . $SQL->tableName('k') . '.' . $SQL->fieldName('unjustified') . ' = 1 AND ' . $SQL->tableName('k') . '.' . $SQL->fieldName('final_hit') . ' = 1 GROUP BY ' . $SQL->fieldName('name') . ' ORDER BY ' . $SQL->fieldName('frags') . ' DESC, ' . $SQL->fieldName('name') . ' ASC LIMIT 4;') as $guild)
	$main_content .= '		<td style="width: 25%; text-align: center;">
			<a href="?subtopic=guilds&action=show&guild=' . $guild['id'] . '"><img src="guilds/' . ((!empty($guild['logo']) && file_exists('guilds/' . $guild['logo'])) ? $guild['logo'] : 'default_logo.gif') . '" width="64" height="64" border="0"/><br />' . $guild['name'] . '</a><br />' . $guild['frags'] . ' kills
		</td>';

$main_content .= '	</tr>
</table>';
$main_content .= '<table border="0" width="100%">
	<tr>
		<td style="text-align: center; font-weight: bold;">
			<center><font color="red">Most powerfull guilds</font></center>
		</td>
	</tr>
</table>';

 

 

 

Não tenho guilds em nenhum banco de dados aqui, veja se deu certo

 

thp9j71.jpg

Editado por MatheusGrilo
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...