Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела

Notices

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 26.02.2007, 20:49   #4
yokohiro
Архивный участник
 
Join Date: Jan 2007
Posts: 18
Default

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>
yokohiro is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 17:26.