This is a Top Guild points script page for Modern AAC. Thx to Mipo91.
How to include the page?
*Manually* create a file guildpoints.php in system/pages
Go to this page http://127.0.0.1/index.php/admin/createPage
create a page guildpoints
input there the code
Then you can go into \templates\default and add somewhere in the menu
Download the attach
gp.rar (291.5 KB)
And extract in \public\images\
Put there the folder gp.
Regards rep me
How to include the page?
*Manually* create a file guildpoints.php in system/pages
Go to this page http://127.0.0.1/index.php/admin/createPage
create a page guildpoints
input there the code
PHP:
<?php
#################################################################################
## CONFIGURATION PAGE ##
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- #
## ---------------------------------------------------------------------------- #
## Script created by Kavvson (http://otland.net/members/kavvson/) and MiPo91 #
## Author & developer: MiPo91 and Kavvson #
## #
## Helpers: MiPo91 <http://www.otland.net> #
#################################################################################
########################
## Connection ##
########################
## Leave these values ##
########################
require("config.php");
$ots = POT::getInstance();
$ots->connect(POT::DB_MYSQL, connection());
$SQL = $ots->getDBHandle();
echo '<div style="background:url('.WEBSITE.'/public/images/gp/statstabs_bg.png); width:555px; height:200px;"><p style="font-weight: bold;text-align:justify;text-align:center;font-family: Georgia, "Times New Roman", Times, serif; font-weight: bold; color: #ffffff;">Top Guild Rating</p>';
echo '<table align="center" border="0" cellspacing="3" cellpadding="4" width="100%" style="text-align: center;"><tr>';
$i = 0;
foreach($SQL->query('
SELECT
`g`.`id` AS `id`,
`g`.`name` AS `name`,
SUM(`p`.`level`) AS `level`,
COUNT(`p`.`name`) AS `count`,
AVG(`p`.`level`) AS `average`,
MIN(`p`.`level`) AS `min`,
MAX(`p`.`level`) AS `max`
FROM `players` p
LEFT JOIN `guild_ranks` gr ON `p`.`rank_id` = `gr`.`id`
LEFT JOIN `guilds` g ON `gr`.`guild_id` = `g`.`id`
WHERE `g`.`id` = `g`.`id`
GROUP BY `name`
ORDER BY `level` DESC
LIMIT 3
') as $guild)
{
$Points = $guild['level'] + $guild['count'] + round($guild['average']) + $guild['min'] + $guild['max'];
echo '
<td style="padding-right:20px;padding-top:3px">
Top Rating :
<p style="color:#336600;display:inline;padding: 0 0 3px 0;font-weight: bold;">'.$Points.'</p>
<a href="'.WEBSITE.'/index.php/guilds/view/' . $guild['id'] . '"><img src="'.WEBSITE.'/public/images/gp/'. $i = $i + 1 .'.png" width="90" height="90" border="0"/>
<br /><b>' . $guild['name'] . '</b></a><br />
</td>';
}
echo '</tr></table>';
echo '</div>';
?>
Code:
<li><a href="{$path}/index.php/p/v/guildpoints">Top Guild Rating</a></li>
gp.rar (291.5 KB)
And extract in \public\images\
Put there the folder gp.
Regards rep me
Attachments
-
gp.rar291.5 KB · Views: 153 · VirusTotal
Last edited by a moderator: