Post Pacific

Post Pacific (https://postpacific.loc-online.com/index.php)
-   Темы без сохранившегося раздела (https://postpacific.loc-online.com/forumdisplay.php?f=10001)
-   -   Help Php Scripts (Rankings) (https://postpacific.loc-online.com/showthread.php?t=6938)

fabiostavares 23.02.2007 09:39

Help Php Scripts (Rankings)
 
Hi :P

I Need Php Scripts

Top PK
Top 20
Top Noob
Top Clan
Top Adena

Help plz?

dirkr 23.02.2007 12:01

http://www.php.net
http://www.w3schools.com/sql/default.asp

empathon 23.02.2007 18:48

Quote:

Originally Posted by fabiostavares (Post 79369)
Hi :P

I Need Php Scripts

Top PK
Top 20
Top Noob
Top Clan
Top Adena

Help plz?

lol and how do u want to add this feature ?

madar 23.02.2007 19:20

Quote:

Originally Posted by empathon (Post 79443)
lol and how do u want to add this feature ?

maybe the lowbies (low level players :P)

RetaL 23.02.2007 19:58

Quote:

Originally Posted by fabiostavares (Post 79369)
Hi :P

I Need Php Scripts

Top PK
Top 20
Top Noob
Top Clan
Top Adena

Help plz?

Top clan means?

dirkr 23.02.2007 20:04

the only one that makes sense is top pk
even top adena is a weird one.. adena in inventory?wh?accounttotal?

Truffe 23.02.2007 23:40

"Help" "Give me those"

Sigh...

fabiostavares 25.02.2007 07:53

Help me plz =(

DevilsAssociate 25.02.2007 18:20

Quote:

Originally Posted by dirkr (Post 79381)

theres your help!

this forums is to help poeple not to ask for freebees

yokohiro 26.02.2007 20:49

I go post 3 examples. with this example you obtain to make the remain. t++ ps: if not to obtain is alone post that I will help you.

RANK LVL
Code:

<?
$mssql_addr="SERVER";
$mssql_user="USERDB";
$mssql_pass="PASS";
$mssql_db="lin2world";
mssql_connect($mssql_addr,$mssql_user,$mssql_pass);
mssql_select_db($mssql_db);
$result=mssql_query("
        select top 20
                char_name, Lev,
                use_time,
                PK, Duel,gender, EXP
        from user_data
        where char_name not in (".("'".join("','",$exclude_from_top)."'").") and account_id>0
        order by EXP desc");

$online_users=array();
for($x=0;$online_users[$x]=mssql_fetch_assoc($result);$x++){
        $online_users[$x]['use_time_h']=round($online_users[$x]['use_time']/3600,1)."h";
};
unset($online_users[count($online_users)-1]);

$result=mssql_query("SELECT count(*) FROM [user_data]");
list($heroes)=mssql_fetch_array($result);

mssql_select_db("lin2db");
$result=mssql_query("SELECT count(*) FROM [user_account]");
list($accounts)=mssql_fetch_array($result);

?>
<style type="text/css">
<!--
.style19 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; font-weight: bold; color: #CCCCCC; }
-->
</style>


<table width="100%" border="0" align=center size=5>
        <tr>
            <td><div align="left"><span class="style19">Char</span></div></td>
            <td><div align="center"><span class="style19">Level</span></div></td>
            <td><div align="center"><span class="style19">Tempo de Jogo</span></div></td>
            <td><div align="center"><span class="style19">PvP/PK</span></div></td>
        </tr>
        <?for($x=0;$x<count($online_users);$x++){?>
    <tr>
            <td style="color:<?=$online_users[$x]["gender"]?"#FF8080":"#8080FF"?>"><font face=verdana size=2 color#cccccc><?=$online_users[$x]["char_name"]?></td>
            <td><center><?=$online_users[$x]["Lev"]?></center></td>
           
            <td><center><?=$online_users[$x]["use_time_h"]?></center></td>
            <td><center><?=$online_users[$x]["Duel"]?>/<?=$online_users[$x]["PK"]?></center></td>
    </tr></font>
        <?}?>

</table>

======================================
RANKINK PK
Code:

<?
$mssql_addr="SERVER";
$mssql_user="USERDB";
$mssql_pass="PASS";
$mssql_db="lin2world";
mssql_connect($mssql_addr,$mssql_user,$mssql_pass);
mssql_select_db($mssql_db);
$result=mssql_query("
        select top 20
                char_name, Lev,
                use_time,
                PK, Duel,gender, EXP
        from user_data
        where char_name not in (".("'".join("','",$exclude_from_top)."'").") and account_id>0
        order by PK desc");

$online_users=array();
for($x=0;$online_users[$x]=mssql_fetch_assoc($result);$x++){
        $online_users[$x]['use_time_h']=round($online_users[$x]['use_time']/3600,1)."h";
};
unset($online_users[count($online_users)-1]);

$result=mssql_query("SELECT count(*) FROM [user_data]");
list($heroes)=mssql_fetch_array($result);

mssql_select_db("lin2db");
$result=mssql_query("SELECT count(*) FROM [user_account]");
list($accounts)=mssql_fetch_array($result);

?>
<style type="text/css">
<!--
.style19 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; font-weight: bold; color: #CCCCCC; }
-->
</style>


<table width="100%" border="0" align=center size=5>
        <tr>
            <td><div align="left"><span class="style19">Char</span></div></td>
            <td><div align="center"><span class="style19">Level</span></div></td>
            <td><div align="center"><span class="style19">Tempo de Jogo</span></div></td>
            <td><div align="center"><span class="style19">PK</span></div></td>
        </tr>
        <?for($x=0;$x<count($online_users);$x++){?>
    <tr>
            <td style="color:<?=$online_users[$x]["gender"]?"#FF8080":"#8080FF"?>"><font face=verdana size=2 color#cccccc><?=$online_users[$x]["char_name"]?></td>
            <td><center><?=$online_users[$x]["Lev"]?></center></td>
           
            <td><center><?=$online_users[$x]["use_time_h"]?></center></td>
            <td><center><?=$online_users[$x]["PK"]?></center></td>
    </tr></font>
        <?}?>

</table>

==============================
RANKINK PVP
Code:

<?
$mssql_addr="SERVER";
$mssql_user="USERDB";
$mssql_pass="PASS";
$mssql_db="lin2world";
mssql_connect($mssql_addr,$mssql_user,$mssql_pass);
mssql_select_db($mssql_db);
$result=mssql_query("
        select top 20
                char_name, Lev,
                use_time,
                PK, Duel,gender, EXP
        from user_data
        where char_name not in (".("'".join("','",$exclude_from_top)."'").") and account_id>0
        order by Duel desc");

$online_users=array();
for($x=0;$online_users[$x]=mssql_fetch_assoc($result);$x++){
        $online_users[$x]['use_time_h']=round($online_users[$x]['use_time']/3600,1)."h";
};
unset($online_users[count($online_users)-1]);

$result=mssql_query("SELECT count(*) FROM [user_data]");
list($heroes)=mssql_fetch_array($result);

mssql_select_db("lin2db");
$result=mssql_query("SELECT count(*) FROM [user_account]");
list($accounts)=mssql_fetch_array($result);

?>
<style type="text/css">
<!--
.style19 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; font-weight: bold; color: #CCCCCC; }
-->
</style>


<table width="100%" border="0" align=center size=5>
        <tr>
            <td><div align="left"><span class="style19">Char</span></div></td>
            <td><div align="center"><span class="style19">Level</span></div></td>
            <td><div align="center"><span class="style19">Tempo de Jogo</span></div></td>
            <td><div align="center"><span class="style19">PvP</span></div></td>
        </tr>
        <?for($x=0;$x<count($online_users);$x++){?>
    <tr>
            <td style="color:<?=$online_users[$x]["gender"]?"#FF8080":"#8080FF"?>"><font face=verdana size=2 color#cccccc><?=$online_users[$x]["char_name"]?></td>
            <td><center><?=$online_users[$x]["Lev"]?></center></td>
           
            <td><center><?=$online_users[$x]["use_time_h"]?></center></td>
            <td><center><?=$online_users[$x]["Duel"]?></center></td>
    </tr></font>
        <?}?>

</table>


fabiostavares 27.02.2007 04:16

yokohiro

Error in.

http://localhost/cadastro/toppk.php

Code: 0 order by PK desc"); $online_users=array(); for($x=0;$online_users[$x]=mssql_fetch_assoc($result);$x++){ $online_users[$x]['use_time_h']=round($online_users[$x]['use_time']/3600,1)."h"; }; unset($online_users[count($online_users)-1]); $result=mssql_query("SELECT count(*) FROM [user_data]"); list($heroes)=mssql_fetch_array($result); mssql_select_db("lin2db"); $result=mssql_query("SELECT count(*) FROM [user_account]"); list($accounts)=mssql_fetch_array($result); ?> Char Level Tempo de Jogo PK
">

dirkr 27.02.2007 17:16

happens when ppl just copy paste code instead of actually knowing what it does..

fabiostavares 28.02.2007 03:38

Share plz PHP Scripts for Rank.


All times are GMT. The time now is 15:59.