Îa¡¢ Óû§µÇ¼£¨login.php£(C)
ÔÚ¿ªÊ¼µÄʱºo£¬ÎÒÃÇ˵¹ýÓÎÏ*µÄÈe¿ÚÊÇindex.phpÎļþ£»ÎÒÃÇÒѾ°²×°ºÃÁË£¬×ÔȻתÏoµÇ¼Á÷³Ì£¬¿ªÊ¼¿´¡£
Ç°ÃaeÕÕÀýÊÇÒ»¶ÎÎÒÃÇÇ°½ø½eÉܹýµÄ´uÂe£¬ÎÒÃǾͲ»ÔÙÏeϸ½²ÁË£»²»Í¬µÄÊÇʹÓõÄÓiÑÔÎļþÊÇlogin.mo£¬»¹ÓÐÒ»¸oLOGINµÄ³£Á¿¡£ÈçÏÂ
define('INSIDE' , true);
define('INSTALL' , false);
define('LOGIN' , true);
$InLogin = true;
$xnova_root_path = './';
include($xnova_root_path . 'extension.inc');
include($xnova_root_path . 'common.' . $phpEx);
includeLang('login');
½ÓÏÂÀ´ÓÖÊÇÎÒÃÇÇ°Ãae½²¹ýµÄ½a¹¹£¬ÎÒÃÇ¿´³o´Î½øÈeµÄ*ÖÖ§ÊÇÏÂÃae´uÂe£º
$parse = $lang;
$Count = doquery('SELECT COUNT(*) as `players` FROM {{table}} WHERE 1', 'users', true);
$LastPlayer = doquery('SELECT `username` FROM {{table}} ORDER BY `register_time` DESC', 'users', true);
$parse['last_user'] = $LastPlayer['username'];
$PlayersOnline = doquery("SELECT COUNT(DISTINCT(id)) as `onlinenow` FROM {{table}} WHERE `onlinetime` > '" . (time()-900) ."';", 'users', true);
$parse['online_users'] = $PlayersOnline['onlinenow'];
$parse['users_amount'] = $Count['players'];
$parse['servername'] = $game_config['game_name'];
$parse['forum_url'] = $game_config['forum_url'];
$parse['PasswordLost'] = $lang['PasswordLost'];
$page = parsetemplate(gettemplate('login_body'), $parse);
// Test pour prendre le nombre total de joueur et le nombre de joueurs connectes
if ($_GET['ucount'] == 1) {
$page = $PlayersOnline['onlinenow']."/".$Count['players'];
die ( $page );
} else {
display($page, $lang['Login']);
}
Ö÷ÒªÊÇÈ¡µÃ×¢²aÓû§Êý¡¢×iºo×¢²aÓû§¡¢µ±Ç°ÔÚÏßÊý£»²¢ÏÔʾµÇ½»¶ÓÒ³Ãae£¬°uÀ¨Ç°ÃaeÈ¡µÃµÄÕaÐ(C)Óû§Êý¾Ý¡£
ºÃÁË£¬ÏÖÔÚÓû§¿ÉÒÔÑ¡Ôñ×¢²a²¢×ªÏoÇ°ÃaeÕ½ÚÁ÷³Ì£¬»oÕßÊÇÊaÈeÓû§ÃuºÍÃÜÂeתÈeµÇ¼Á÷³Ì¡£
1. Ïȸu¾ÝÊaÈeµÄÓû§£¬´ÓÊý¾Ý¿aÈ¡µÃ´ËÓû§µÄ¼Ç¼
2. Èç¹uÓмǼ£¬ÔoʹÓÃmd5ÅжÏÓû§µÄÃÜÂeÊÇñÕýÈ
3. Èç¹uÃÜÂeÕýÈ£¬Ôo¿´Óû§ÊÇñÑ¡ÔñÁ˼ÇסÃÜÂe¹¦ÄÜ£¬ºoÃaeÓõ½
4. includeÊý¾Ý¿aÅaÖÃÎļþconfig
5. Setcookie£¬ÀiÃaeÓÐÓû§Ãu¡¢ÃÜÂeµÈ
6. Öض¨Ïoµ½frames.phpÎļþ
ÆaÖÐÇ°ÃaeµÄ¼¸¸oÅжÏÊÇ*ñµÄ»°£¬¾ÍÒª³oÏÖÒ»Ð(C)´iÎoÌaʾÐÅÏ¢£¬²¢½aÊøµÇ¼¹ý³Ì£¬Ê¹ÓõÄÊÇmessage£¨£(C)º¯ÊýÌaʾ£¬Ç°ÃaeÒ²½²¹ý¡£