• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[Gesior ACC] Football Highscore

Joined
Feb 27, 2009
Messages
17
Reaction score
0
Mod by Damadger:
http://otland.net/f81/football-automatic-0-3-6-0-4-updated-99984/

ACC script for Modern ACC by Damadger:
http://otland.net/f118/modern-acc-football-highscores-100610/



ACC script for Gesior ACC by Me:

PHP:
 <?php
$main_content .= '<div style="text-align: center; font-weight: bold;">Top 20 Goals on ' . $config['server']['serverName'] . '</div>
<table border="0" cellspacing="1" cellpadding="4" width="100%">
    <tr bgcolor="' . $config['site']['vdarkborder'] . '">
        <td class="white" style="text-align: center; font-weight: bold;">Name</td>
        <td class="white" style="text-align: center; font-weight: bold;">Goals</td>
        <td class="white" style="text-align: center; font-weight: bold;">Wins</td>
    </tr>';

$i = 0;
foreach($SQL->query('SELECT `name`,`goals`,`total`,`wins` FROM `players`
GROUP BY `name`
 ORDER BY (`wins`/`total`)*(`goals`+`wins`) DESC LIMIT 0,20') as $player)
{
    $i++;
    $main_content .= '<tr bgcolor="' . (is_int($i / 2) ? $config['site']['lightborder'] : $config['site']['darkborder']) . '">
        <td><a href="?subtopic=characters&name=' . urlencode($player['name']) . '">' . $player['name'] . '</a></td>
        <td style="text-align: center;">' . $player['goals'] . '</td>
        <td style="text-align: center;">' . $player['wins'] . '</td>
    </tr>';
}

$main_content .= '</table>';
?>

Where in this part:
PHP:
(`wins`/`total`)*(`goals`+`wins`)

You can order my goals, wins, formulas etc.

like order just for goals:

just change:
PHP:
(`wins`/`total`)*(`goals`+`wins`)

for
PHP:
`goals`


For install just go to index.php and add:
PHP:
	case "goals";
   		 $topic = "Top Goals";
  		 $subtopic = "goals";
  		 include("goals.php");
	break;
 
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'goals' in 'field list'' in C:\Documents and Settings\Administrador\Escritorio\xampp\htdocs\goals.php:13 Stack trace: #0 C:\Documents and Settings\Administrador\Escritorio\xampp\htdocs\goals.php(13): PDO->query('SELECT `name`,`...') #1 C:\Documents and Settings\Administrador\Escritorio\xampp\htdocs\index.php(199): include('C:\Documents an...') #2 {main} thrown in C:\Documents and Settings\Administrador\Escritorio\xampp\htdocs\goals.php on line 13

o_O?
 
ALTER TABLE players ADD goals int(11) DEFAULT = 0; ALTER TABLE players ADD wins int(11) DEFAULT = 0; ALTER TABLE players ADD total int(11) DEFAULT = 0;
 
Kiel:
Error
consulta SQL:

ALTER TABLE players ADD goals INT( 11 ) DEFAULT =0;


MySQL ha dicho:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= 0' at line 1

Kekox: Tengo ese sistema xDD
 
so serious? or?
ALTER TABLE players ADD goals int(11) NULL = 0; ALTER TABLE players ADD wins int(11) NULL = 0; ALTER TABLE players ADD total int(11) NULL = 0;
 
Up¿?

in page..
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'goals' in 'field list'' in C:\Documents and Settings\Administrador\Escritorio\xampp\htdocs\goals.php:13 Stack trace: #0 C:\Documents and Settings\Administrador\Escritorio\xampp\htdocs\goals.php(13): PDO->query('SELECT `name`,`...') #1 C:\Documents and Settings\Administrador\Escritorio\xampp\htdocs\index.php(199): include('C:\Documents an...') #2 {main} thrown in C:\Documents and Settings\Administrador\Escritorio\xampp\htdocs\goals.php on line 13
 
and I got to fix the bug ...

as you can do to put more goals which take up?
and wins does not work either-or?
 
bugm.png


Img-- srry no can edit!
 
ok, try with this:

PHP:
<?php
$main_content .= '<div style="text-align: center; font-weight: bold;"><b>Top 20 Goals on ' . $config['server']['serverName'] . '</b></div>
<table border="0" cellspacing="1" cellpadding="4" width="100%">
    <tr bgcolor="' . $config['site']['vdarkborder'] . '">
        <td class="white" style="text-align: center; font-weight: bold;">Name</td>
        <td class="white" style="text-align: center; font-weight: bold;">Goals</td>
        <td class="white" style="text-align: center; font-weight: bold;">Wins</td>
    </tr>';

$i = 0;
foreach($SQL->query('SELECT `name`,`goals`,`total`,`wins` FROM `players`
GROUP BY `name`
 ORDER BY (`wins`/`total`)*(`goals`+`wins`) DESC LIMIT 0,20') as $player)
{
    $i++;
    $main_content .= '<tr bgcolor="' . (is_int($i / 2) ? $config['site']['lightborder'] : $config['site']['darkborder']) . '">
        <td><a href="?subtopic=characters&name=' . urlencode($player['name']) . '">' . $player['name'] . '</a></td>
        <td style="text-align: center;">' . $player['total'] . '</td>
        <td style="text-align: center;">' . $player['wins'] . '</td>
    </tr>';
}

$main_content .= '</table>';
?>


should work.
 
does not show the leading scorers in the first. and the brand also wins puts 0 at all :S
---------------------

no muestra a los máximos goleadores los primeros. y los partidos ganados tampoco los marca pone 0 en todos :S
 
Well first off, sorry for bumping an oldish thread... But seeing as it works fine with Gesior 2012 version: 1.0.1, I think it'll be okay =)

Secondly i would like to see if anyone could update this to remove certian characters, like first off the sample players and account manager, secondly maybe another function to remove those banned, higher then tutor, and others maybe like namelocked players... if anyone could do this i would be so thankful =)


Example of current Highscores..
Football - Forgotten
 
WOW VERY GOOD!
Hide acc id 1 ;p and characters samples
Change
Code:
foreach($SQL->query('SELECT `name`,`goals`,`total`,`wins` FROM `players` GROUP BY `name` ORDER BY (`wins`/`total`)*(`goals`+`wins`) DESC LIMIT 0,50') as $player)
for
Code:
foreach($SQL->query('SELECT `name`,`goals`,`total`,`wins` FROM `players` WHERE account_id != 1 GROUP BY `name` ORDER BY (`wins`/`total`)*(`goals`+`wins`) DESC LIMIT 0,50') as $player)
 
Sweet thanks, But is the also a way to keep banned players from being there also, theres a "block" in the accounts database, i tryed
Code:
foreach($SQL->query('SELECT `name`,`goals`,`total`,`wins` FROM `players` WHERE account_id != 1 AND account_block != 1  GROUP BY `name` ORDER BY (`wins`/`total`)*(`goals`+`wins`) DESC LIMIT 0,20') as $player)




[B][SIZE=4]and  [/SIZE][/B] 



 '.$SQL->tableName(bans).' . '.$SQL->tableName(active).' != 1

- - - Updated - - -

this is what it gives me

Warning: Invalid argument supplied for foreach() in D:\xampp\htdocs\pages\foozbal.php on line 12
 
Back
Top