Размер файла: 1.48Kb
<?php
include 'mylib.php';
session_start();
$reg=0;
$lang=$_GET['lang'];
if ((trim($_COOKIE['Login'])!='')&&(trim($_COOKIE['Password'])!='')) {
$login=htmlspecialchars(trim($_COOKIE['Login']),ENT_QUOTES);
$pass=htmlspecialchars(trim($_COOKIE['Password']),ENT_QUOTES);
if (uauth($login,$pass)) $reg=1;
}
if (!checkagent($_SERVER['HTTP_USER_AGENT'])) { noemul(); exit; }
header("Content-type: text/vnd.wap.wml");
?>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" "http://www.wapforum.org/DTD/wml_1.2.dtd">
<wml>
<?php
if ($lang=='eng')
print "<card id=\"Sign\" title=\"Sign\">\n";
else
print "<card id=\"Sign\" title=\"Написать\">\n";
print "<p>\n";
if (!$reg) {
print "Login:\n";
print "<input name=\"login\" title=\"Login\" maxlength=\"15\"/><br/>\n";
print "Password: <input name=\"pass\" type=\"password\" title=\"Password\" emptyok=\"false\" maxlength=\"15\"/><br/>\n";
}
if ($lang=='eng')
print "Your comments:\n";
else
print "Комментарий:\n";
?>
<input name="message" title="Text" emptyok="false" maxlength="350"/><br/>
<anchor title="Ok">Ok<go href="sign.php" method="post">
<?php if (!$reg) {
print "<postfield name=\"login\" value=\"$(login)\"/>\n";
print "<postfield name=\"pass\" value=\"$(pass)\"/>\n";
} ?>
<postfield name="message" value="$(message)"/>
</go></anchor>
</p>
</card>
</wml>