Doggynub
LUA / C++
- Joined
- Sep 28, 2008
- Messages
- 2,541
- Reaction score
- 186
Footall highscores :]--Gesior link at end of page--
--To let you know , I dont know a shit about web related codings so this is only simple edits to cyber's tetris system, you can change it as you want--
Important You need to see this page before installing this in your site( to add needed qurys):
>>Football lua script<<
1- Go to "Public---> Images" [and paste theses]
Football image
As that link is dead go to this image Click and Save right click and save the image to the place i said up.[Save in the name of "ball.gif"]
2- Creat this through your adminPanel in moder acc / go to "System-->pages---> make new football.php"
[make sure to edit the $min varible in php file]
URL :
For gesior visit this : Credits to the post poster
--To let you know , I dont know a shit about web related codings so this is only simple edits to cyber's tetris system, you can change it as you want--
Important You need to see this page before installing this in your site( to add needed qurys):
>>Football lua script<<
1- Go to "Public---> Images" [and paste theses]
Football image
As that link is dead go to this image Click and Save right click and save the image to the place i said up.[Save in the name of "ball.gif"]
2- Creat this through your adminPanel in moder acc / go to "System-->pages---> make new football.php"
[make sure to edit the $min varible in php file]
PHP:
<?php
//Script by Damadgerz based on Cyber's tetris
//Tetris Highscores Page for Modern AAC
//OTland.net
$min = 1;
require("config.php");
$ots = POT::getInstance();
$ots->connect(POT::DB_MYSQL, connection());
$SQL = $ots->getDBHandle();
$record = $SQL->query('SELECT `name`,`goals`,`total`,`wins` FROM `players` ORDER BY (`wins`/`total`)*(`goals`+`wins`) DESC LIMIT 1')->fetch();
if ($record['total'] < $min ) {
echo'<div style="text-align: left; font-weight: bold">No highscore yet, to be on list: <br/>1- you need to participate in '.$min.'+ matches<br/>2- Have atleast 1 win.<br/>3- Have scored atleast 1 goal. <br/></div>';
}else {
$rati = $record['wins']/$record['total'] * 100;
$ratio = ceil($rati);
echo'<div style="text-align: center; font-weight: bold">Football Highscores in '.$config['server_name'].'<br/></div>
<br/><center><table border="0" cellspacing="0" cellpadding="2" width="60%">
<tr bgcolor="black"><td style="text-align: left; font-weight: bold; font-size:medium;color : white">Top player</td><td></td></tr>
<tr ><td><span style="font-size:small;"><strong><script>
var text="'.$record['name'].' : '.$ratio.'%." // YOUR TEXT
var speed=100 // SPEED OF FADE
if (document.all || document.getElementById) {
document.write(\'<span id="highlight">\' + text + \'</span>\')
var storetext=document.getElementById ? document.getElementById("highlight") : document.all.highlight
var hex = new Array("00","14","28","3C","50","64","78","8C","A0","B4","C8","DC","F0")
var r=1
var g=1
var b=1
var seq=1
function changetext2() {
rainbow = "#"+hex[r]+hex[g]+hex[b]
storetext.style.color=rainbow
}
function change() {
if (seq==6) {
b--
if (b==0) {
seq=1
}
}
if (seq==5) {
r++
if (r==12) {
seq=6
}
}
if (seq==4) {
g--
if (g==0) {
seq=5
}
}
if (seq==3) {
b++
if (b==12) {
seq=4
}
}
if (seq==2) {
r--
if (r==0) {
seq=3
}
}
if (seq==1){
g++
if (g==12) {
seq=2
}
}
changetext2()
}
if (document.all || document.getElementById) {
flash = setInterval("change()", speed)
}
}
</script></strong></span><br/> Wins : ' . $record['wins'] . ' | Total : ' . $record['total'] . ' | Goals : ' . $record['goals'] . ' </a></td><td><img src="'.WEBSITE.'/public/images/ball.gif"></td></tr></table>
';
echo'<br/><center><table border="1" cellspacing="1" cellpadding="2" width="100%">
<tr bgcolor="black">
<td width="5%" class="white" style="text-align: left; font-weight: bold;color : white"></td>
<td width="45%" class="white" style="text-align: left; font-weight: bold;color : white">Player</td>
<td width="15%" class="white" style="text-align: left; font-weight: bold;color : white">Win%</td>
<td width="10%" class="white" style="text-align: left; font-weight: bold;color : white">Goals</td>
<td width="10%" class="white" style="text-align: left; font-weight: bold;color : white">Total</td>
<td width="10%" class="white" style="text-align: left; font-weight: bold;color : white">Wins</td>
</tr> ';
$i = 0;
foreach($SQL->query('SELECT `name`,`total`,`goals`,`wins` FROM `players` ORDER BY (`wins`/`total`)*(`goals`+`wins`) DESC') as $result)
{
if ($result['total'] >= $min && $result['goals'] >=1 && $result['wins'] >=1 ){
$i++;
echo'<tr class="highlight"><td style="text-align: left;">' . $i . '</td>
<td><a href="'.WEBSITE.'/index.php/character/view/'.$result['name'].'">'.$result['name'].'</a></td>
<td style="text-align: center;">'.ceil($result['wins']/$result['total']*100).'%</td>
<td style="text-align: center;">'.$result['goals'].'</td>
<td style="text-align: center;">'. abs($result['total']) .'</td>
<td style="text-align: center;">'.$result['wins'].'</td>
</tr>'; }}}
echo '</table><br/><br/><div align="right"><span style="font-size:smaller;text-align:left"><a href="http://otland.net/members/cybershot/">Made by : Damadger <br/>Based on :Cyber\'s tetris</a></span></div>';
?>
URL :
Code:
[URL]http://127.0.0.1//index.php/p/v/football[/URL]
For gesior visit this : Credits to the post poster
Last edited: