<?php
@ini_set('session.use_cookies','0');
@ini_set('session.use_trans_sid','0');
@ini_set('url_rewriter.tags','');
if(@$str!='wml' and @$str!='xhtml')
{
if(strstr($_SERVER['HTTP_ACCEPT'], 'wml') and !strstr($_SERVER['HTTP_ACCEPT'], 'html'))
$str='wml';
else
$str='xhtml';
}
if(@$str=='wml')
{header('Content-type: text/vnd.wap.wml');
$begin='<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml_1.3.xml">
<wml><card id="main" title="Ы =)"><p align="center"><small>';
$razd='------<br/>';
$endpage='<a href="http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?str=xhtml&cl='.@$ses.'&ref='.@$ref.'">WAP 2.0</a>| WAP 1.1<br/></small>'.$_SERVER['HTTP_HOST'].'</p></card></wml>';
$str='wml';
}
else
{
$begin='<?xml version="1.0" encoding="utf-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<style type="text/css">
body{ font-weight: normal; font-size: small; color: #FFFFFF; font-family: sans-serif; background-color: #000000}
a{ color: #F00000; text-decoration: none }
a:hover{ text-decoration: underline }
div{ margin: 0px; padding: 0px 0px 0px 2px }
div.f{ font-weight: normal; font-size: small; color: #FFFFFF; font-family: sans-serif; background-color: #000000; text-align: center}
div.main{background-color: #FFFB8E; border: 0px solid #91DB12; color: #FFFFFF }
div.sec{padding:2px 1px 1px 2px; background-color: #8BD712; border: 1px solid #91DB12; color: #FFFFFF }
div.news{padding:2px 1px 1px 2px; background-color: #CCFD69; border: 1px solid #91DB12; color: #A7051B }
div.news2{padding:2px 1px 1px 2px; background-color: #CCFD69; border: 1px solid #91DB12; font-size: smaller; color: #A7051B }
div.men{padding:2px 1px 1px 2px; background-color: #FFFFFF; border: 0px solid #91DB12; color: #A7051B }
div.ten{padding:2px 1px 1px 2px; background-color: #FFC337; border: 1px solid #AC5959; color: #FFFFFF }
div.zero{padding:2px 1px 1px 2px; background-color: #FFFB8E; border: 0px solid #FFFB8E; color: #A7051B }
div.quat{ color: #00D900 }
div.ie {padding:2px 1px 1px 2px; background-color: #FFFB8E; border: 0px solid #FFFB8E; color: #A7051B; text-align: center}
.c1{ color: #FF0000 }
.c2{ color: #FFFF00 }
</style>
<title>Ы =)</title>
</head>
<body><div class="f">';
$razd='<hr/>';
$endpage='WAP 2.0 |<a href="http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?str=wml&cl='.@$ses.'&ref='.@$ref.'">WAP 1.1</a><br/>'.$_SERVER['HTTP_HOST'].'</div></body></html>';
$str='xhtml';
}
require_once('db.php');
print $begin;
print '<b>Текстовая сеть!</b><br/>Мы - лучшие!<br/>';
print '<a href="help.php?str='.$str.'&ref='.@$ref.'">Что это ?</a><br/>';
print '<a href="reg.php?str='.$str.'&ref='.@$ref.'">Регистрация</a><br/>';
if($str=='wml')
{
echo "<input name=\"id\" type=\"text\" title=\"ID\" value=\"\" maxlength=\"10\"/><br/>";
print 'Пароль:<br/>';
echo "<input name=\"pass\" type=\"text\" title=\"Pass\" value=\"\" maxlength=\"50\"/><br/>";
echo "<anchor title=\"go\">Войти<go href=\"enter.php?str=$str\" method=\"post\">\n";
echo "<postfield name=\"pass\" value=\"$(pass)\"/>\n";
echo "<postfield name=\"id\" value=\"$(id)\"/>\n";
echo "</go></anchor><br/>\n";
}
else
{
print
'Ваш id:<br/>
<form method="post" action="enter.php">
<input name="id" maxlength="20" value=""/><br/>
Пароль:<br/>
<input name="pass" maxlength="30" value=""/><br/>
<input value="Войти" name="do" type="submit"/></form><br/>';
}
print $razd;
print '<a href="vostpass.php?ref='.@$ref.'&str='.$str.'">Забыли пароль?</a><br/>------<br/>';
print '<a href="stat.php?ref='.@$ref.'&str='.$str.'">Статистика сети</a><br/>';
print '<a href="topall.php?ref='.@$ref.'&str='.$str.'">Рейтинг участников</a><br/>';
print '<a href="provip.php?str='.@$str.'&ref='.@$ref.'">Проверить свой ip</a><br/>';
$count=mysql_fetch_row(mysql_query("SELECT count(*) from `user`"));
print "Участников: $count[0]<br/>";
print $razd;
print '<a href="http://wapinet.ru">Здесь Дают Пезды</a><br/>';
print $endpage;
?>