<?php
error_reporting(7);
include('start.php');
include("config.php");
include("./includes/constants/menu");
include("./includes/".$ver."/banned");
$ttl="Добро пожаловать!";
$old_msgs = 6; //HOURS
$fd = fopen("clear.dat", "r");
$clear_time = intval(fgets($fd));
fclose($fd);
if($clear_time < time())
{
$sql = mysql_query("SELECT `id` FROM `chat_rooms`;");
while($room = mysql_fetch_array($sql))
{
mysql_query("DELETE FROM `chat".$room['id']."` WHERE `seconds` < ".(time() - (3600 * $old_msgs)).";");
mysql_query("DELETE FROM `chat_intim` WHERE `seconds` < ".(time() - (3600 * $old_msgs)).";");
}
$fd = fopen("clear.dat", "w");
flock($fd, LOCK_EX);
$puts = fputs($fd, (time() + 3600 * $old_msgs));
flock($fd, LOCK_UN);
fclose($fd);
}
list($msec, $sec) = explode(chr(32), microtime());
$headtime = $sec + $msec;
$ref = rand(10000, 99999);
switch($ver)
{
////////////////////////////////////////////////////////
//WML VERSION
////////////////////////////////////////////////////////
case 'wml':
header("Content-type: text/vnd.wap.wml; charset=utf-8");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-cache, must-revalidate");
//AUTH
if(isset($_POST['action']))
{
if($_POST['translit'] == "yes")
{
$lat = array("''", "'", "\"\"", "\"", "CH", "ch", "SC", "sc", "YE", "ye", "YU", "yu", "YA", "ya", "YO", "yo", "A", "a", "B", "b", "C", "c", "D", "d", "E", "e", "F", "f", "G", "g", "H", "h", "I", "i", "J", "j", "K", "k", "L", "l", "M", "m", "N", "n", "O", "o", "P", "p", "R", "r", "S", "s", "T", "t", "U", "u", "V", "v", "H", "h", "Z", "z", "W", "w", "X", "x", "Y", "y");
$rus = array("Ь", "ь", "Ъ", "ъ", "Ч", "ч", "Щ", "щ", "Э", "э", "Ю", "ю", "Я", "я", "Ё", "ё", "А", "а", "Б", "б", "Ц", "ц", "Д", "д", "Е", "е", "Ф", "ф", "Г", "г", "Х", "х", "И", "и", "Ж", "ж", "К", "к", "Л", "л", "М", "м", "Н", "н", "О", "о", "П", "п", "Р", "р", "С", "с", "Т", "т", "У", "у", "В", "в", "Х", "х", "З", "з", "Ш", "ш", "Ы", "ы", "Й", "й");
$_POST['nickname'] = str_replace($lat, $rus, $_POST['nickname']);
}
$nickname = mysql_escape_string($_POST['nickname']);
$password = mysql_escape_string($_POST['password']);
$_SESSION['password'] = $password;
$q = mysql_query("SELECT * FROM `chat_users` WHERE `nickname` = '".$nickname."' AND `password` = '".md5($password)."' LIMIT 1;");
if(mysql_num_rows($q) == 0)
{
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.3//EN\" \"http://www.wapforum.org/DTD/wml13.dtd\"><wml>\n";
echo "<card title=\"ERROR\" ontimer=\"index.php?ver=wml\"><timer value=\"15\"/><p align=\"left\">\n";
echo "<small>Ошибка авторизации!<br/>\n";
echo "$wmlfoot";
echo "</small></p></card></wml>";
exit();
}
}
else
{
$id = intval($_SESSION['id']);
$password = mysql_escape_string($_SESSION['password']);
$q = mysql_query("SELECT * FROM `chat_users` WHERE `id` = '".$id."' AND `password` = '".md5($password)."';");
if(mysql_num_rows($q) == 0)
{
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.3//EN\" \"http://www.wapforum.org/DTD/wml13.dtd\"><wml>\n";
echo "<card title=\"ERROR\" ontimer=\"index.php?ver=wml\"><timer value=\"15\"/><p align=\"left\">\n";
echo "<small>Ошибка авторизации!<br/>\n";
echo "$wmlfoot";
echo "</small></p></card></wml>";
exit();
}
}
//END AUTH
//USER DATA
$user = mysql_fetch_array($q);
$id = $user['id'];
$nickname = $user['nickname'];
$level = $user['level'];
$status = $user['status'];
$posts = $user['posts'];
$time = $user['time'];
$ip = $user['ip'];
$ua = $user['ua'];
$security = $user['security'];
$fsize = $user['fsize'];
//END USER DATA
$_SESSION['id'] = $id;
//STATUS UPDATE
if($status == STATUS_NOVICE && $posts > 500 && $posts < 1000)
{
$query = mysql_query("UPDATE `chat_users` SET `status` = '".STATUS_USER."' WHERE `id` = '".$id."';");
}
if($status == STATUS_USER && $posts > 1000 && $posts < 3000)
{
$query = mysql_query("UPDATE `chat_users` SET `status` = '".STATUS_ADVANCED."' WHERE `id` = '".$id."';");
}
if($status == STATUS_ADVANCED && $posts > 3000 && $posts < 5000)
{
$query = mysql_query("UPDATE `chat_users` SET `status` = '".STATUS_CHATTER."' WHERE `id` = '".$id."';");
}
if($status == STATUS_CHATTER && $posts > 5000 && $posts < 7000)
{
$query = mysql_query("UPDATE `chat_users` SET `status` = '".STATUS_SUPER."' WHERE `id` = '".$id."';");
}
if($status == STATUS_SUPER && $posts > 7000 && $posts < 10000)
{
$query = mysql_query("UPDATE `chat_users` SET `status` = '".STATUS_MEGA."' WHERE `id` = '".$id."';");
}
//END STATUS UPDATE
if($fsize == 0)
{
$open_tag = "<small>";
$close_tag = "</small>";
}
if($fsize == 1)
{
$open_tag = "";
$close_tag = "";
}
if($fsize == 2)
{
$open_tag = "<big>";
$close_tag = "</big>";
}
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.3//EN\" \"http://www.wapforum.org/DTD/wml13.dtd\">\n<wml>\n";
echo "<card title=\"".$ttl."\"><p align=\"left\">\n";
echo $open_tag;
if($security == 1 && ($ip != getenv('REMOTE_ADDR') OR $ua != htmlspecialchars(getenv('HTTP_USER_AGENT'))))
{
echo'Ваш текущий IP и телефон не совпадают с теми, что использовались в последний раз. Предыдущий IP: '.getenv('REMOTE_ADDR').', предыдущий телефон: '.getenv('HTTP_USER_AGENT').'.<br/>';
$online = time() + 60;
mysql_query("UPDATE `chat_users` SET `time` = '".$online."', `place` = 0, `ip` = '".getenv('REMOTE_ADDR')."', `ua` = '".htmlspecialchars(getenv('HTTP_USER_AGENT'))."' WHERE `id` = '".$id."';");
}
//ONLINE
$online = time() + 60;
$update = mysql_query("UPDATE `chat_users` SET `time` = '".$online."', `place` = 0, `ip` = '".getenv('REMOTE_ADDR')."', `ua` = '".htmlspecialchars(getenv('HTTP_USER_AGENT'))."' WHERE `id` = '".$id."';");
//END ONLINE
if($level == 4) echo "<a href=\"admin.php?".SID."&ver=wml\">".MENU_ADMIN."</a><br/>\n";
if($level == 3) echo "<a href=\"smoder.php?".SID."&ver=wml\">".MENU_SMODER."</a><br/>\n";
if($level == 2) echo "<a href=\"moder.php?".SID."&ver=wml\">".MENU_MODER."</a><br/>\n";
if($level == 1) echo "<a href=\"vip.php?".SID."&ver=wml\">".MENU_VIP."</a><br/>\n";
if(time() > $time + 3600) echo "Привет, $nickname!<br/>";
//LETTERS
$query = mysql_query("SELECT COUNT(*) FROM `chat_letters` WHERE `id` = '".$id."' AND `to` = '".$id."' AND `read` = 0;");
$newto = mysql_result($query, 0);
$query = mysql_query("SELECT COUNT(*) FROM `chat_letters` WHERE `id` = '".$id."' AND `to` = '".$id."';");
$to = mysql_result($query, 0);
//END LETTERS
//ONLINE IN CHAT
$query = mysql_query("SELECT COUNT(*) FROM `chat_users` WHERE `time` > ".time().";");
$online = mysql_result($query, 0);
//END ONLINE
//Meets , news
$query = mysql_query("SELECT COUNT(*) FROM `chat_news`");
$news = mysql_result($query, 0);
$querym = mysql_query("SELECT COUNT(*) FROM `chat_meets`");
$mets = mysql_result($querym, 0);
//
$in_embassies = 0;
$sql = mysql_query("SELECT `id` FROM `chat_rooms` WHERE `type` = 2;");
while($array = mysql_fetch_array($sql))
{
$rid = $array['id'];
$query = mysql_query("SELECT COUNT(*) FROM `chat_users` WHERE `time` > ".time()." AND `place` = '".$rid."';");
$in_embassies = $in_embassies + mysql_result($query, 0);
}
echo'<a href="view_wew.php?'.SID.'&ver=wml">Умей предвидеть!</a><br/>';
echo "Информация <br/>";
echo "• <a href=\"rules.php?".SID."&ver=wml\">Правила чата </a><br/>\n";
if($news != 0)
echo "• <a href=\"allnews.php?".SID."&ver=wml\">Новости</a><br/>\n";
if($mets != 0)
echo "• <a href=\"meets.php?".SID."&ver=wml\">".MENU_MEETS."</a><br/>\n";
echo "<br/>Записки<br/>";
echo "• <a href=\"letters.php?".SID."&ver=wml\">".MENU_MAILBOX." ($newto)</a><br/>\n";
echo "<br/>Найти<br/>";
echo "• <a href=\"online.php?".SID."&ver=wml\">".MENU_ONLINE." ($online)</a><br/>\n";
echo "• <a href=\"search.php?".SID."&ver=wml\">".MENU_SEARCH."</a><br/>\n";
echo "<br/>Развлечения <br/>";
echo "• <a href=\"games/dice.php?".SID."&ver=wml\">".GAMES_DICE."</a><br/>\n";
echo "<br/>Комнаты<br/>";
echo "• <a href=\"embassies.php?".SID."&ver=wml\">".ROOMS_EMBASSIES." </a>(".$in_embassies.")<br/>";
//PUBLIC ROOMS
$q = mysql_query("SELECT * FROM `chat_rooms` WHERE `type` = 0 ORDER BY `position` ASC;");
if(mysql_num_rows($q) == 0)
{
echo EMPTY_ROOMS_LIST."<br/>\n";
}
while($room = mysql_fetch_array($q))
{
$rid = $room['id'];
$rname = $room['name'];
$query = mysql_query("SELECT COUNT(*) FROM `chat_users` WHERE `place` = ".$rid." AND `time` >= ".time().";");
$inroom = mysql_result($query, 0);
if($rid == $wicked_quiz or $rid == $unlim)
{
echo "• <a href=\"unlim.php?".SID."&rid=$rid&ver=wml\">".$rname." </a>(".$inroom.")<br/>\n";
}
else
{
echo "• <a href=\"room.php?".SID."&rid=$rid&ver=wml\">".$rname." </a>(".$inroom.")<br/>\n";
}
}
//END ROOMS
$sql = mysql_query("SELECT COUNT(*) FROM `chat_users` WHERE `intim` >= ".time().";");
$intim = mysql_result($sql, 0);
echo "• <a href=\"key.php?".SID."&ver=wml\">".ROOMS_INTIM."* </a>($intim)<br/>\n";
//ROOMS FOR MODERATORS
if($level != 0)
{
$q = mysql_query("SELECT * FROM `chat_rooms` WHERE `type` = 1 ORDER BY `position` ASC;");
while($room = mysql_fetch_array($q))
{
$rid = $room['id'];
$rname = $room['name'];
$query = mysql_query("SELECT COUNT(*) FROM `chat_users` WHERE `place` = ".$rid." AND `time` >= ".time().";");
$inroom = mysql_result($query, 0);
echo "• <a href=\"room.php?".SID."&rid=$rid&ver=wml\">".$rname." </a>(".$inroom.")<br/>\n";
}
if(mysql_num_rows($q) != 0)
{
}
}
//END ROOMS
echo "<br/>Другое<br/>";
echo "• <a href=\"faq.php?".SID."&mod=smiles&ver=wml\">Смайлы</a><br/>\n";
echo "• <a href=\"settings/?".SID."&ver=wml\">Настройки</a><br/>\n";
echo "• <a href=\"faq.php?".SID."&ver=wml\">".MENU_FAQ."</a><br/>\n";
echo"<br/>";
echo "<a href=\"menu.php?".SID."&ver=html\">".VERSION_HTML."</a> | ".VERSION_WML."<br/>\n";
echo $close_tag;
echo"$wmlfoot";
echo "</p></card></wml>";
break;
////////////////////////////////////////////////////////
//HTML VERSION
////////////////////////////////////////////////////////
case 'html':
header("Content-type: text/html; charset=utf-8");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-cache, must-revalidate");
//AUTH
if(isset($_POST['action']))
{
if($_POST['translit'] == "yes")
{
$lat = array("''", "'", "\"\"", "\"", "CH", "ch", "SC", "sc", "YE", "ye", "YU", "yu", "YA", "ya", "YO", "yo", "A", "a", "B", "b", "C", "c", "D", "d", "E", "e", "F", "f", "G", "g", "H", "h", "I", "i", "J", "j", "K", "k", "L", "l", "M", "m", "N", "n", "O", "o", "P", "p", "R", "r", "S", "s", "T", "t", "U", "u", "V", "v", "H", "h", "Z", "z", "W", "w", "X", "x", "Y", "y");
$rus = array("Ь", "ь", "Ъ", "ъ", "Ч", "ч", "Щ", "щ", "Э", "э", "Ю", "ю", "Я", "я", "Ё", "ё", "А", "а", "Б", "б", "Ц", "ц", "Д", "д", "Е", "е", "Ф", "ф", "Г", "г", "Х", "х", "И", "и", "Ж", "ж", "К", "к", "Л", "л", "М", "м", "Н", "н", "О", "о", "П", "п", "Р", "р", "С", "с", "Т", "т", "У", "у", "В", "в", "Х", "х", "З", "з", "Ш", "ш", "Ы", "ы", "Й", "й");
$_POST['nickname'] = str_replace($lat, $rus, $_POST['nickname']);
}
$nickname = mysql_escape_string($_POST['nickname']);
$password = mysql_escape_string($_POST['password']);
$_SESSION['password'] = $password;
$q = mysql_query("SELECT * FROM `chat_users` WHERE `nickname` = '".$nickname."' AND `password` = '".md5($password)."';");
if(mysql_num_rows($q) == 0)
{
echo "$css";
echo'<title>'.$ttl.'</title>';
echo'<div class="d3">Ошибка</div>';
echo "<div class=\"d5\">Ошибка авторизации!</div>\n";
echo'<div class="d3">';
echo"$sitefoot";
echo'</div>';
echo "</body></html>";
exit();
}
}
else
{
$id = intval($_SESSION['id']);
$password = mysql_escape_string($_SESSION['password']);
$q = mysql_query("SELECT * FROM `chat_users` WHERE `id` = '".$id."' AND `password` = '".md5($password)."';");
if(mysql_num_rows($q) == 0)
{
echo "$css";
echo'<title>'.$ttl.'</title>';
echo'<div class="d3">Ошибка</div>';
echo "<div class=\"d5\">Ошибка авторизации!</div>\n";
echo'<div class="d3">';
echo"$sitefoot";
echo'</div>';
echo "</body></html>";
exit();
}
}
//END AUTH
//USER DATA
$user = mysql_fetch_array($q);
$id = $user['id'];
$nickname = $user['nickname'];
$level = $user['level'];
$status = $user['status'];
$time = $user['time'];
$fsize = $user['fsize'];
$ip = $user['ip'];
$ua = $user['ua'];
$security = $user['security'];
//END USER DATA
$_SESSION['id'] = $id;
if($fsize == 0)
{
$fsize = "small";
}
if($fsize == 1)
{
$fsize = "normal";
}
if($fsize == 2)
{
$fsize = "large";
}
echo "$css";
echo'<title>'.$ttl.'</title>';
echo'<div class="d3">'.$ttl.'</div>';
echo'<div class="d1">';
//STATUS UPDATE
if($status == STATUS_NOVICE && $posts > 500 && $posts < 1000)
{
$query = mysql_query("UPDATE `chat_users` SET `status` = '".STATUS_USER."' WHERE `id` = '".$id."';");
}
if($status == STATUS_USER && $posts > 1000 && $posts < 3000)
{
$query = mysql_query("UPDATE `chat_users` SET `status` = '".STATUS_ADVANCED."' WHERE `id` = '".$id."';");
}
if($status == STATUS_ADVANCED && $posts > 3000 && $posts < 5000)
{
$query = mysql_query("UPDATE `chat_users` SET `status` = '".STATUS_CHATTER."' WHERE `id` = '".$id."';");
}
if($status == STATUS_CHATTER && $posts > 5000 && $posts < 7000)
{
$query = mysql_query("UPDATE `chat_users` SET `status` = '".STATUS_SUPER."' WHERE `id` = '".$id."';");
}
if($status == STATUS_SUPER && $posts > 7000 && $posts < 10000)
{
$query = mysql_query("UPDATE `chat_users` SET `status` = '".STATUS_MEGA."' WHERE `id` = '".$id."';");
}
//END STATUS UPDATE
if($security == 1 && ($ip != getenv('REMOTE_ADDR') OR $ua != htmlspecialchars(getenv('HTTP_USER_AGENT'))))
{
echo'</div>';
echo'<div class="d2">';
echo'Ваш текущий IP и телефон не совпадают с теми, что использовались в последний раз. Предыдущий IP: '.getenv('REMOTE_ADDR').', предыдущий телефон: '.getenv('HTTP_USER_AGENT').'.';
echo'</div>';
$online = time() + 60;
mysql_query("UPDATE `chat_users` SET `time` = '".$online."', `place` = 0, `ip` = '".getenv('REMOTE_ADDR')."', `ua` = '".htmlspecialchars(getenv('HTTP_USER_AGENT'))."' WHERE `id` = '".$id."';");
}
//ONLINE
$online = time() + 60;
$update = mysql_query("UPDATE `chat_users` SET `time` = '".$online."', `place` = 0, `ip` = '".getenv('REMOTE_ADDR')."', `ua` = '".htmlspecialchars(getenv('HTTP_USER_AGENT'))."' WHERE `id` = '".$id."';");
//END ONLINE
if($level == 4) echo "• <a href=\"admin.php?".SID."&ver=html\">Админка</a><br/>\n";
if($level == 3) echo "• <a href=\"smoder.php?".SID."&ver=html\">С-модерка</a><br/>\n";
if($level == 2) echo "• <a href=\"moder.php?".SID."&ver=html\">Модерка</a><br/>\n";
if($level == 1) echo "• <a href=\"vip.php?".SID."&ver=html\">VIP-меню</a><br/>\n";
if(time() > $time + 3600) echo "Привет, $nickname!<br/>";
echo'<a href="view_wew.php?'.SID.'&ver=html">Умей предвидеть!</a><br/>';
echo'</div>';
//
echo'<div class="d2">Информация</div>';
echo'<div class="d1">';
//LETTERS
$query = mysql_query("SELECT COUNT(*) FROM `chat_letters` WHERE `id` = '".$id."' AND `to` = '".$id."' AND `read` = 0;");
$newto = mysql_result($query, 0);
$query = mysql_query("SELECT COUNT(*) FROM `chat_letters` WHERE `id` = '".$id."' AND `to` = '".$id."';");
$to = mysql_result($query, 0);
//END LETTERS
//ONLINE IN CHAT
$query = mysql_query("SELECT COUNT(*) FROM `chat_users` WHERE `time` > ".time().";");
$online = mysql_result($query, 0);
//END ONLINE
$in_embassies = 0;
$sql = mysql_query("SELECT `id` FROM `chat_rooms` WHERE `type` = 2;");
while($array = mysql_fetch_array($sql))
{
$rid = $array['id'];
$query = mysql_query("SELECT COUNT(*) FROM `chat_users` WHERE `time` > ".time()." AND `place` = '".$rid."';");
$in_embassies = $in_embassies + mysql_result($query, 0);
}
//Meets , news
$query = mysql_query("SELECT COUNT(*) FROM `chat_news`");
$news = mysql_result($query, 0);
$querym = mysql_query("SELECT COUNT(*) FROM `chat_meets`");
$mets = mysql_result($querym, 0);
//
echo "• <a href=\"rules.php?".SID."&ver=html\">Правила чата</a><br/>\n";
if($news != 0)
echo "• <a href=\"allnews.php?".SID."&ver=html\">Новости</a><br/>\n";
if($mets != 0)
echo "• <a href=\"meets.php?".SID."&ver=html\">".MENU_MEETS."</a><br/>\n";
echo'</div>';
echo'<div class="d2">Записки</div>';
echo'<div class="d1">';
echo "• <a href=\"letters.php?".SID."&ver=html\">".MENU_MAILBOX." ($newto)</a><br/>\n";
echo'</div>';
echo'<div class="d2">Найти</div>';
echo'<div class="d1">';
echo "• <a href=\"online.php?".SID."&ver=html\">".MENU_ONLINE." ($online)</a><br/>\n";
echo "• <a href=\"search.php?".SID."&ver=html\">".MENU_SEARCH."</a><br/>\n";
echo' </div>';
echo'<div class="d2">Развлечения</div>';
echo'<div class="d1">';
echo "• <a href=\"games/dice.php?".SID."&ver=html\">".GAMES_DICE."</a><br/>\n";
echo'</div>';
echo'<div class="d2">Комнаты</div>';
echo'<div class="d1">';
echo "• <a href=\"embassies.php?".SID."&ver=html\">".ROOMS_EMBASSIES." </a>(".$in_embassies.")<br/>";
//PUBLIC ROOMS
$q = mysql_query("SELECT * FROM `chat_rooms` WHERE `type` = 0 ORDER BY `position` ASC;");
if(mysql_num_rows($q) == 0)
{
echo EMPTY_ROOMS_LIST."<br/>\n";
}
while($room = mysql_fetch_array($q))
{
$rid = $room['id'];
$rname = $room['name'];
$query = mysql_query("SELECT COUNT(*) FROM `chat_users` WHERE `place` = ".$rid." AND `time` >= ".time().";");
$inroom = mysql_result($query, 0);
if($rid == $wicked_quiz or $rid == $unlim)
{
echo "• <a href=\"unlim.php?".SID."&rid=$rid&ver=html\">".$rname." </a>(".$inroom.")<br/>\n";
}
else
{
echo "• <a href=\"room.php?".SID."&rid=$rid&ver=html\">".$rname." </a>(".$inroom.")<br/>\n";
}
}
//END ROOMS
$sql = mysql_query("SELECT COUNT(*) FROM `chat_users` WHERE `intim` >= ".time().";");
$intim = mysql_result($sql, 0);
echo "• <a href=\"key.php?".SID."&ver=html\">".ROOMS_INTIM."* </a>($intim)<br/>\n";
//ROOMS FOR MODERATORS
if($level != 0)
{
$q = mysql_query("SELECT * FROM `chat_rooms` WHERE `type` = 1 ORDER BY `position` ASC;");
while($room = mysql_fetch_array($q))
{
$rid = $room['id'];
$rname = $room['name'];
$query = mysql_query("SELECT COUNT(*) FROM `chat_users` WHERE `place` = ".$rid." AND `time` >= ".time().";");
$inroom = mysql_result($query, 0);
echo "• <a href=\"room.php?".SID."&rid=$rid&ver=html\">".$rname." </a>(".$inroom.")<br/>\n";
}
if(mysql_num_rows($q) != 0)
{
}
}
//END ROOMS
echo '</div>';
echo'<div class="d2">Другое</div>';
echo'<div class="d1">';
echo "• <a href=\"faq.php?".SID."&mod=smiles&ver=html\">Смайлы</a><br/>\n";
echo "• <a href=\"settings/?".SID."&ver=html\">Настройки</a><br/>\n";
echo "• <a href=\"fot.php?".SID."&ver=html\">Добавить фотo</a><br/>\n";
echo "• <a href=\"faq.php?".SID."&ver=html\">".MENU_FAQ."</a><br/>\n";
echo'</div>';
echo'<div class="d2">';
echo "<a href=\"menu.php?".SID."&ver=wml\">".VERSION_WML."</a> | ".VERSION_HTML."</div>\n";
echo'<div class="d3">';
echo"$sitemenu";
echo'</div>';
echo "</body></html>";
break;
}
?>