PHPÍøÒ³ÓÎϷѧϰ֮Xnova(ogame)Ô´Âë½â¶Á£¨ËÄ£©

5年以前  |  阅读数:1043 次  |  编程语言:PHP 

Î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Ò²½²¹ý¡£

 相关文章:
PHP分页显示制作详细讲解
SSH 登录失败:Host key verification failed
获取IMSI
将二进制数据转为16进制以便显示
获取IMEI
文件下载
贪吃蛇
双位运算符
PHP自定义函数获取搜索引擎来源关键字的方法
Java生成UUID
发送邮件
年的日历图
提取后缀名
在Zeus Web Server中安装PHP语言支持
让你成为最历害的git提交人
Yii2汉字转拼音类的实例代码
再谈PHP中单双引号的区别详解
指定应用ID以获取对应的应用名称
Python 2与Python 3版本和编码的对比
php封装的page分页类完整实例