[Share] Working Ranking page

Newbie Spellweaver
Joined
Feb 18, 2007
Messages
83
Reaction score
1
Hello !

I have make ranking page for all in php.

Installation:
- extract rar file in your ftp or local serveur
- go "inc" folder and open config.inc.php
- edit following lines:
PHP:
$sHost      = '127.0.0.1'; // Default: 127.0.0.1 EN:Host/IP  FR:HOST/IP
$sLogin     = 'root'; // Default: root EN:Login  FR: Identifiant
$sPass      = ''; // Default:  EN:Password  FR: Mot de passe
$sDatabase  = 'flyff'; // Default: flyff EN:Database Name  FR: Nom de la base de donn
 
Last edited:
Mmmhh can you help me making a ranking page .

i dont know how really , i mean like what is the page to see those ranks?

and there comes a error at line one , at $sHost: or something like that :S plz help =D
 
Thanks for the share, But Im stilling Learning my PHP, And I was wondering if you could Edit the Code a little bit So I can edit it to Allow more than 1 access, Example:Currently Its set to Only Show Accounts with 1000 Access, And I wanted to edit it to Allow Access from 100-1000.
 
You can totaly edit my code if you want, i fyou want allow accessfor all juste edit query line:
PHP:
$sQuery     = "SELECT t2.channelnum, t2.charname, t2.level, t2.class FROM accounts AS t1 INNER JOIN characters AS t2 ON t1.username = t2.accountname WHERE t1.accesslevel = 1000";

To

For Show player, gm and Admin:
PHP:
$sQuery     = "SELECT t2.channelnum, t2.charname, t2.level, t2.class FROM accounts AS t1 INNER JOIN characters AS t2 ON t1.username = t2.accountname WHERE t1.accesslevel >= 100";

For Show player, gm only:
PHP:
$sQuery     = "SELECT t2.channelnum, t2.charname, t2.level, t2.class FROM accounts AS t1 INNER JOIN characters AS t2 ON t1.username = t2.accountname WHERE t1.accesslevel >= 100 AND t1.accesslevel <= 800";

For Show player only:
PHP:
$sQuery     = "SELECT t2.channelnum, t2.charname, t2.level, t2.class FROM accounts AS t1 INNER JOIN characters AS t2 ON t1.username = t2.accountname WHERE t1.accesslevel = 100";

For Show gm only:
PHP:
$sQuery     = "SELECT t2.channelnum, t2.charname, t2.level, t2.class FROM accounts AS t1 INNER JOIN characters AS t2 ON t1.username = t2.accountname WHERE t1.accesslevel = 800";

For Show Admin only:
PHP:
$sQuery     = "SELECT t2.channelnum, t2.charname, t2.level, t2.class FROM accounts AS t1 INNER JOIN characters AS t2 ON t1.username = t2.accountname WHERE t1.accesslevel = 1000";

Enjoy !
 
Last edited:
Sorry for bumping but, Elverloon, You think you can help me put this onto my site, Its in HTML, And I want the Ranking on one of the pages, Anyway to do this?
 
would be easier if you just do <= 400 on t1.accesslevel to remove gm/admins and add only the players

as for the 100 limit

look for this around line 72

$iNo = 1;

while( $iNo <= $iNbOfResult )


$iNbOfResult is basically all the ids on your rank. so you can change that to 100
so if its like this
$iNo = 10;

while( $iNo <= 100)
itll show ranks 10-100
$iNo = 1;

while( $iNo <= 500)
this one ranks 1-500
so the one on the above while is the starting, and the $inbofresult inside while is the end point

@Aximili, i think you can try including php on html, not really sure tho
<html>
<?php
include('./rank.php');
?>
</html>
 
Back