вот полностю код
[code]function check($msg) {
if (is_array($msg)) {
foreach($msg as $key => $val) {
$msg[$key] = check($val);
}
} else {
$msg = htmlspecialchars($msg);
$search = array('|', '\'', '$', '\\', '^', '%', '`', "\0", "\x00", "\x1A", chr(226) . chr(128) . chr(174));
$replace = array('|', ''', '$', '\', '^', '%', '`', '', '', '', '');
$msg = str_replace($search, $replace, $msg);
$msg = stripslashes(trim($msg));
}
return $msg;
}
function sint($in){
$in=abs(intval($in));
return $in;
}
function userr($id){
$reqi = mysql_query("SELECT lvl,storona,usr FROM `users` WHERE `id` = '$id' LIMIT 1"
;
$ref = mysql_fetch_assoc($reqi);
$seti = mysql_query("SELECT vip FROM `set` WHERE `usr` = '$ref[usr]' LIMIT 1"
;
$refi = mysql_fetch_assoc($seti);
// //////////////////////////
$avto = mysql_num_rows($reqi);
if($avto>=1){
if($refi[vip]==on){echo' <img src="pic/vip.gif" alt="#"/>';}else
{echo' <img src="pic/main/'.$ref['storona'].'.png" alt="#"/>';}
echo'<a href="search.php?nick='.$ref[usr].'&go=go"><font color="white">'.$ref[usr].'</font>';
echo'<img src="pic/main/up.png" alt="lvl"/>'.$ref['lvl'].'<font color="white"></a>';
}
}
function cus($id,$idr){
$reqi = mysql_query("SELECT * FROM `catacomb_user` WHERE `id` = '$id' and `id_room` = '$idr' LIMIT 1"
;
if(mysql_num_rows($reqi)){return 1;}else{return 0;}
}
function cuss($id){
$reqi = mysql_query("SELECT * FROM `catacomb_user` WHERE `id` = '$id' LIMIT 1"
;
if(mysql_num_rows($reqi)){return 1;}else{return 0;}
}
if(cuss($udata[id]))
{
$reqir = mysql_query("SELECT * FROM `catacomb_user` WHERE `id` = '$udata[id]' LIMIT 1"
;
$cvvcr = mysql_fetch_assoc($reqir);
$reqi = mysql_query("SELECT * FROM `catacomb_room` WHERE `id` = '$cvvcr[id_room]' LIMIT 1"
;
$cvvc = mysql_fetch_assoc($reqi);
if($cvvc[level]==0){;if($_SERVER['PHP_SELF']!="/catacomb_room.php"
{ header("Location: /catacomb_room.php?id=$cvvc[id]"
;}}
if($cvvc[level]>0){if($_SERVER['PHP_SELF']!="/catacomb.php"
{ header("Location: /catacomb.php?"
;}}
}
$cset_time=60; //время старта
$cset_urovni=3; //колличество уровней
$cset_min_user=5; //минимум в комнату
$cset_max_user=8; //максимально в комнату
$catacomb_rock=10; //стоимость пропуска[/code]