<?
header("Content-type:text/html; charset=utf-8");
echo "<?xml version=\"1.0\"?>";
echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head>";
echo "<title>MotoFan.pp.ru</title>";
echo "<style type=\"text/css\">";
echo " body {font-family: arial; font-size: 11px; color: #000000; background-color: #ffffff}";
echo " a {color:#2C75B1}";
echo " a:hover {color: #228B22;}";
echo " div {margin: 0px; 0px; 0px; 0px}";
echo " div.v {color: #FFFFFF; padding: 3px; background-color: #2F5436; border-bottom: 1px solid #B1CADE}"; // верх
echo " div.b1 { padding: 3px; background-color: #2F5436; color:#FFFFFF; border: 0px}"; // низ
echo " div.b2 { padding: 3px; background-color: #F4F8FB; border-bottom: 1px dotted #AFCDDC}";
echo " div.hr { padding: 3px; background-color: #FFFFFF; border-bottom: 1px dotted #AFCDDC}";
echo "input.it {background-color: #FFF;border-top: 1px solid #000;border-left: 1px solid #000;border-right: 1px solid #CCC;border-bottom: 1px solid #CCC;font-size: 8pt;}";
echo "input.ib {color: #FFF;background-color: #4098d9;border: 1px solid #FFFFFF;padding: 0px 3px 0px 3px;}";
echo "</style></head><body>";
# низочег
function xhtml_n(){
echo "<div class=\"n\">";
echo "<b>© 7wap.ru</b> <br/>";
echo "</div>";
echo "</body></html>";
}
# форма регистраци
function xhtml_reg_form($on_reg, $r){
if($on_reg == 0)
{
# блокировка реги
$_SESSION['reg_lock'] = true;
echo "<div class=\"pay\">";
echo "<small>Все поля обязательны для заполнения! Необходимо указывать существующий Email. В логине и пароле можно использовать буквы латинского алфавита (a - Z) и цифры (0-9).</small>";
echo "</div>";
echo "<div class=\"body\">";
echo "<form name=\"\" action=\"reg.php?".$r."\" method=\"post\">";
echo "Логин: <small>(от 4 до 14 симв)</small><br/>";
echo "<input name=\"login\" class=\"it\" type=\"text\" size=\"18\" maxlength=\"14\"><br/>";
echo "Ваш Email:<br/>";
echo "<input name=\"mail\" class=\"it\" type=\"text\" size=\"18\" value=\"@mail.ru\" maxlength=\"45\"><br/>";
echo "Пароль: <small>(от 5 до 9 симв)</small><br/>";
echo "<input name=\"pass\" class=\"it\" type=\"password\" size=\"18\" maxlength=\"9\"><br/>";
echo "Название Сайта:<br/>";
echo "<input name=\"title\" class=\"it\" type=\"text\" size=\"18\" maxlength=\"20\"><br/>";
echo "Ссылка:<br/>";
echo "<input name=\"link\" class=\"it\" type=\"text\" size=\"18\" value=\"http://\" maxlength=\"50\"><br/>";
echo "Описание(80):<br/>";
echo "<input name=\"about\" class=\"it\" type=\"text\" size=\"18\" value=\"\" maxlength=\"80\"><br/>";
echo "<select class=\"it\" name=\"k\">";
echo "<option value=\"3\">Загрузки</option>";
echo "<option value=\"4\">Для взрослых</option>";
echo "<option value=\"5\">Общение</option>";
echo "<option value=\"6\">Знакомства</option>";
echo "<option value=\"7\">Развлечения</option>";
echo "<option value=\"8\">Персональные</option>";
echo "<option value=\"9\">Сервисы</option>";
echo "<option value=\"10\">Халява</option>";
echo "<option value=\"11\">Спорт</option>";
echo "<option value=\"12\">Прочие</option>";
echo "</select><br/>";
echo "<input name=\"sid\" type=\"hidden\" value=\"".session_id()."\">";
echo "<input type=\"submit\" class=\"ib\" value=\"Регестрировать\">";
echo "</form>";
echo "</div>";
}
else
{
echo "<div class=\"pay\">";
echo "Технические работы<br/>";
echo "</div>";
echo "<div class=\"body\">";
echo 'Извините но по техническим причинам регистрация временно приостоновлена.<br/>';
echo 'Зайдите через 2 часа.<br/>';
echo "</div>";
}
}
# форма для поиска
function xhtml_search_form($r){
echo '<div class="pay">';
echo "<b>Поиск в каталоге</b><br/>";
echo "</div>";
echo "<div class=\"body\">";
echo "<form name=\"q\" action=\"search.php?".$r."\" method=\"post\">";
echo "Введите запрос:<br/>";
echo "<input name=\"q\" type=\"password\" size=\"12\" maxlength=\"25\"><br/>";
echo "<input type=\"submit\" value=\" Найти \">";
echo "</form>";
echo "</div>";
echo "<div class=\"pay\">";
echo "<img src=\"../img/h.gif\" alt=\"\"/> <a href=\"index.php?$r\">В каталог</a><br/>";
echo "</div>";
}
# форма xhtml авторизации
function xhtml_auth_form($r){
echo "<form name=\"\"action=\"enter.php?".$r."\" method=\"post\">";
echo " Логин: <br/>";
echo " <input name=\"login\" class=\"it\" type=\"text\" size=\"15\" maxlength=\"14\"><br/>";
echo " Пароль: <br/>";
echo " <input name=\"pass\" class=\"it\" type=\"password\" size=\"15\" maxlength=\"9\"><br/>";
echo "<input name=\"sid\" type=\"hidden\" value=\"".session_id()."\">";
echo " <input type=\"submit\" class=\"ib\" value=\"Войти\">";
echo "</form>";
}
# перевод utf в нижний регистр
function utf_char_n($text){
$str_1 = array("А","Б","В","Г","Д","Е","Ё","Ж","З","И","Й","К","Л","М","Н","О","П","Р","С","Т","У","Ф","Х","Ц","Ч","Ш","Щ","Ю","Я","Ь","Ъ","Ы");
$str_2 = array("а","б","в","г","д","е","ё","ж","з","и","й","к","л","м","н","о","п","р","с","т","у","ф","х","ц","ч","ш","щ","ю","я","ь","ъ","ы");
$text = str_replace($str_1,$str_2,$text);
return $text;
}
?>