所有用户均可免费下载OGameCN源代码
源代码在线查看: chat.php.svn-base
/**
* chat.php
*
* @version 1
* @copyright 2008 By e-Zobar for XNova
*/
define('INSIDE' , true);
define('INSTALL' , false);
define('IN_ADMIN', true);
$xnova_root_path = './../';
include($xnova_root_path . 'extension.inc');
include($xnova_root_path . 'common.'.$phpEx);
includeLang('admin');
$parse = $lang;
if ($user['authlevel'] >= 3) {
// Syst猫me de suppression
extract($_GET);
if (isset($delete)) {
doquery("DELETE FROM {{table}} WHERE `messageid`=$delete", 'chat');
} elseif ($deleteall == 'yes') {
doquery("DELETE FROM {{table}}", 'chat');
}
// Affichage des messages
$query = doquery("SELECT * FROM {{table}} ORDER BY messageid DESC LIMIT 25", 'chat');
$i = 0;
while ($e = mysql_fetch_array($query)) {
$i++;
$parse['msg_list'] .= stripslashes("" . date('h:i:s', $e['timestamp']) . "".
"". $e['user'] . "".
"" . nl2br($e['message']) . "".
"");
}
$parse['msg_list'] .= "{$i} ".$lang['adm_ch_nbs']."";
display(parsetemplate(gettemplate('admin/chat_body'), $parse), "Chat", false, '', true);
} else {
message( $lang['sys_noalloaw'], $lang['sys_noaccess'] );
}
?>