Quote:
|
Originally Posted by MACTEP
опять мне удача показала спину... что-же делать, нинаодном форуме никто не умеет php регистрацию делать, и статистику играющих... =((
|
[php:1:3f0c1d895e]<?
include("config.php");
mssql_connect($mssql_server,$mssql_user,$mssql_pas s);
mssql_select_db($mssql_db);
$result=mssql_query("
select
char_name, Lev, builder,
class, use_time,
PK, Duel,gender
from user_data
where char_name not in (".("'".join("','",$exclude_from_top)."'").") and account_id>0 and login>logout
order by Lev 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);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<META HTTP-EQUIV="Expires" CONTENT="Fri, Jan 01 1900 00:00:00 GMT">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META http-equiv="Content-Type" content="text/html; charset=windows-1251">
<META http-equiv="content-language" content="en">
<META name="author" content="">
<META HTTP-EQUIV="Reply-to" CONTENT="@.com">
<META name="generator" content="PHPEd 3.1">
<META NAME="description" CONTENT="">
<META name="keywords" content="">
<META NAME="Creation_Date" CONTENT="08/15/2000">
<META name="revisit-after" content="15 days">
<title>Online</title>
</head>
<body>
<table border="1" align=center size=5>
<tr>
<td colspan="5"><H5>Сейчас играют в Lineage 2:</H5></td>
</tr>
<tr>
<td>Ник</td>
<td>Уровень</td>
<td>Класс</td>
<td>Всего в игре</td>
<td>PvP/PK</td>
</tr>
<?for($x=0;$x<count($online_users);$x++){?>
<tr>
<td style="color:<?=$online_users[$x]["gender"]?"#FF8080":"#8080FF"?>"><?=$online_users[$x]["char_name"]?></td>
<td><?=$online_users[$x]["Lev"]?></td>
<td><?=$class_list[$online_users[$x]["class"]]?></td>
<td><?=$online_users[$x]["use_time_h"]?></td>
<td><?=$online_users[$x]["Duel"]?>/<?=$online_users[$x]["PK"]?></td>
</tr>
<?}?>
<tr>
<td colspan="3"><H5>Игроков Online:</H5></td>
<td><H5><?=count($online_users)?></H5></td>
</tr>
<tr>
<tr>
<td></td>
</tr><tr>
<td></td>
</tr>
<td colspan="5"><H5>На сервере зарегистрировано</H5></td>
</tr>
<tr>
<td colspan="3">Всего Аккаунтов:</td>
<td><?=$accounts?></td>
</tr>
<tr>
<td colspan="3">Всего Героев:</td>
<td><?=$heroes?></td>
</tr>
</table>
</body>
</html>
[/php:1:3f0c1d895e]
Так лучше? для CP - сделано.
Глянуть что и как :
http://1xx.xx5.xx.xx8/