<?php
echo "<table>";
include("inc_common.php");
$fp = fopen($user_data_file, "r");
flock($fp, LOCK_EX);
while ($data = fgets($fp, 4096)) {
$user = str_replace("\r","",str_replace("\n","",$data));
list($t_id, $t_nickname, $t_password, $t_class, $t_show_admin) = explode("\t",$user);
if ($t_class==2047) {
echo "<tr><td><a href=\"fullinfo.php?&user_id=$t_id\">$t_nickname</a> - администратор</td></tr>";
}
elseif ($t_class<2047 and $t_class>0) {
echo "<tr><td><a href=\"fullinfo.php?&user_id=$t_id\">$t_nickname</a> - модератор</td></tr>";
}
}
flock($fp, LOCK_UN);
fclose($fp);
$sh = fopen($data_path."shamans_list.tmp", "rb");
if($sh) {
while ($data = fgets($sh, 4096)) {
$user = str_replace("\r","",str_replace("\n","",$data));
list($t_id, $t_nickname) = explode("\t",$user);
echo "<tr><td><a href=\"fullinfo.php?&user_id=$t_id\">$t_nickname</a> - шаман чата</td></tr>";
}
fclose($sh);
}
echo "</table>";
?>
if(!$is_regist_complete) {
echo "<br><br><center>a href=".chat_url."registration_form.php>На регистрацию!</a>";
exit;}
if ($room_id == $quiz_config['room_id']) {
$flood_protection = 0;
$bot_nick = $quiz_config['bot_nick'];
$bot_htmlnick = ($quiz_config['bot_htmlnick'] != '') ? $quiz_config['bot_htmlnick'] : $bot_nick;
/* Add quiz to ignore */
if (trim(strip_tags($mesg)) == '!-') {
$messages_to_show = array();
$add_to_ignor = $quiz_config['bot_nick'];
include($engine_path."ignor_add.php");
echo '<script>alert("'.$w_quiz_disabled.'");</script>';
exit();
}
/* End add to ignore */
/* Remove quiz from ignore */
if (trim(strip_tags($mesg)) == '!+') {
$messages_to_show = array();
$remove_from_ignor = $quiz_config['bot_nick'];
include($engine_path."ignor_remove.php");
echo '<script>alert("'.$w_quiz_enabled.'");</script>';
exit();
}
/* End remove from ignore */
$w_quiz_disabled = 'Викторина ОТКЛЮЧЕНА!\nТеперь Вы не будете видеть вопросов викторины.\nЧтобы отменить игнор - команда !+';
$w_quiz_enabled = 'Викторина ВКЛЮЧЕНА!\nТеперь Вы можете видеть вопросы викторины.\nЧтобы игнорировать - команда !-';
<?php
include("inc_common.php");
include($file_path."inc_statistic.php");
echo "Нас уже: ".stat_total_users()."<br>";
?>
<?php
if ($current_user->registered && $current_user->is_member) {?>
Только для vip!
<?php } ?>
function addURLS($str)
{
global $chat_url;
$str2 = $str;
if (function_exists('preg_replace')){
$str2 = preg_replace("/(?<!<a href=\")(?<!\")(?<!\">)((http|https|ftp):\/\/[\w?=&.\/-~#-_]+)/e",
"'<a href=\"".$chat_url."go.php?url='.urlencode('\\1').'\" target=\"_blank\">\\1</a>'",
$str);
$str2 = preg_replace("/((?<!<a href=\"mailto:)(?<!\">)(?<=(>|\s))[\w_-]+@[\w_.-]+[\w]+)/","<a href=\"mailto:\\1\">\\1</a>",$str2);
}
return $str2;
}
function replaceURLS($str) {
global $w_no_links;
$str = preg_replace("/(?<!<a href=\")(?<!\")(?<!\">)((http|https|ftp):\/\/[\w?=&.\/-~#-_]+)/e", "'[$w_no_links]'", $str);
$str = preg_replace("/((?<!<a href=\"mailto:)(?<!\">)(?<=(>|\s))[\w_-]+@[\w_.-]+[\w]+)/","<a href=\"mailto:\\1\">\\1</a>", $str);
return $str;
}
$mesg = addURLS($mesg);
if ($current_user->registered && $current_user->online_time > 3600) {
$mesg = addURLS($mesg);
} else {
$mesg = replaceURLS($mesg);
}
В chat/languages/ru.php добавить
Код:
$w_no_links = '[Забаньте меня... Я рекламлю!]';
$mesg = addFaces($mesg);
if ( $current_user->nagrada_5) {
$mesg = addURLS($mesg);
} else {
$mesg = replaceURLS($mesg);
}
var $credits = 0;
var $rewards = "0";