Размер файла: 3.94Kb
<?
require("functionChat.ssp");
$r = GetRandom();
$nn=ReplaceChar($nn);
if (empty($nn))
{
LogResult($ErrorMess,$EmptyMess,"index.php?p=$r");
}
openDB();
if ($log=="old") // зарегистрированный пользователь
{
$result = checkpass($nn,$pass,"email,subjectlen,names,vals");
InitParam(mysql_result($result,0, "names"),mysql_result($result,0, "vals"));
$usetrans = GetParam('usetrans');
$width = GetParam('width');
$image = GetParam('image');
$email = mysql_result($result,0, "email");
$subjectlen = mysql_result($result,0, "subjectlen");
if (!($subjectlen >= 0 and $subjectlen <= 255)) { $subjectlen = $DefSubjectLen;}
}
else
{
if ($log=="new")
{
$sqlSel="select * from users where nick = '$nn'";
$result=mysql_query($sqlSel) or die(mysql_error());
$Count=mysql_num_rows($result);
if ($Count != 0)
{
LogResult($ErrorMess,$NNRegMess,"index.php?p=$r");
}
$email = "";
$messlim = $DefMessLim;
$subjectlen = $DefSubjectLen;
$usetrans = 0;
$width = 128;
$image = 2;
}
else
{
LogResult($ErrorMess,$InvalidCallMess,"index.php?p=$r");
}
}
mysql_close();
require("headerwml.ssp");
echo "<card id=\"$MagMail\" title=\"$MagMail\">";
echo "<onevent type=\"onenterforward\">\n";
echo "<refresh>\n";
echo "<setvar name=\"password\" value=\"\"/>\n";
echo "<setvar name=\"email\" value=\"\"/>\n";
echo "<setvar name=\"subjectlen\" value=\"\"/>\n";
echo "<setvar name=\"lang\" value=\"\"/>\n";
echo "</refresh>\n";
echo "</onevent>\n";
echo "<p align=\"center\">";
// Правильный синтаксис ников
echo "$menu[0]:<br/>(a-Z,0-9,_)<br/><b>$nn</b><br/>\n";
echo "$menu[1]:<br/>(a-Z,0-9)<br/>";
echo "<input name=\"password\" title=\"=\" type=\"text\" value=\"$pass\" maxlength=\"10\"/>";
echo "$menu[9]<br/>";
echo "<input name=\"email\" title=\"=\" emptyok=\"true\" type=\"text\" value=\"$email\" maxlength=\"50\"/>";
echo $menu[14].".<br/>".$menu[36]."<br/>(1-255):<br/>";
echo "<input name=\"subjectlen\" format=\"*N\" title=\"=\" type=\"text\" value=\"$subjectlen\" maxlength=\"3\"/>";
echo $menu[43].":<br/>";
if ($usetrans == $NOT_SET) $usetrans = 0;
echo "<select name=\"lang\" value=\"$usetrans\" title=\"=\">\n";
echo "<option value=\"0\">Off</option>\n";
echo "<option value=\"1\">On</option>\n";
echo "</select>\n";
if ($image == $NOT_SET) $image = $defimage;
echo "$menu[59]:<br/>";
echo "<select name=\"image\" value=\"$image\" title=\":\">\n";
echo "<option value=\"1\">$types[1]</option>\n";
echo "<option value=\"2\">$types[2]</option>\n";
echo "<option value=\"3\">$types[3]</option>\n";
echo "<option value=\"4\">$types[4]</option>\n";
echo "</select>\n";
if ($width == $NOT_SET) $width = $defwidth;
echo $menu[58].":<br/>";
echo "<input name=\"w\" title=\"$menu[58]:\" format=\"*N\" value=\"$width\" type=\"text\" maxlength=\"3\"/>";
echo "</p>";
echo "<p>";
echo "<a href=\"index.php?p=$r\">- $menu[8]</a><br/>\n";
echo "<anchor>- $menu[12]";
echo "<go method=\"post\" href=\"savereg.php?log=$log\">\n";
echo "<postfield name=\"email\" value=\"$(email)\"/>\n";
echo "<postfield name=\"subjectlen\" value=\"$(subjectlen)\"/>\n";
echo "<postfield name=\"refrint\" value=\"$(refrint)\"/>\n";
echo "<postfield name=\"lang\" value=\"$(lang)\"/>\n";
echo "<postfield name=\"w\" value=\"$(w)\"/>\n";
echo "<postfield name=\"image\" value=\"$(image)\"/>\n";
echo "<postfield name=\"pass\" value=\"$pass\"/>\n";
echo "<postfield name=\"nn\" value=\"$nn\"/>\n";
echo "<postfield name=\"newpass\" value=\"$(password)\"/>\n";
echo "<postfield name=\"newnn\" value=\"$nn\"/>\n";
echo "</go>\n";
echo "</anchor>\n";
//if ((strtolower($nn) == "admin") || ($nn == "77"))
//{
echo "<br/><a href=\"redir.php?p=$r&login=$nn&pass=$pass\">- Переадресация</a><br/>\n";
//}
echo "</p>";
include ("bottom.inc");
?>