Размер файла: 2.55Kb
<?
session_start();
$title="Авторизация\n";
include ("../header.php");
if (empty($mod)) $mod="form";
$date=date("d.m.Y");
switch ($mod) {
case "form":
echo $div["header"];
echo "Авторизация для клиентов<br/>";
echo $div["end"];
echo $div["div"];
if ($_SESSION['wap']!="xml") {echo "---<br/>";}
echo $div["end"];
if ($_SESSION['wap']=="xml")
{
echo "<form action=\"index.php?mod=enter&".session_name()."=".session_id()."\" method=\"post\">";
echo $div["ten"];
echo "<img src=\"../pics/st.gif\" alt=\"*\"/>";echo "ID: <br/>";
echo "<input name=\"id\" maxlength=\"11\" title=\"Text\"/><br/>";
echo "<img src=\"../pics/st.gif\" alt=\"*\"/>";echo "Пароль: <br/>";
echo "<input name=\"passw\" maxlength=\"20\" type=\"password\"/><br/>";
echo "<input class=\"ibutton\" type=\"submit\" value=\"Войти\"/>";
echo $div["end"];
echo "</form>";
}
else
{
echo "<img src=\"../pics/st.gif\" alt=\"*\"/>";echo "ID: <br/>";
echo "</small><input name=\"id\" maxlength=\"11\" title=\"Text\"/><br/><small>";
echo "<img src=\"../pics/st.gif\" alt=\"*\"/>";echo "Пароль: <br/>";
echo "</small><input name=\"passw\" maxlength=\"20\" type=\"password\"/><br/><small>";
echo "<anchor title=\"send\">Войти<go href=\"index.php?mod=enter&".session_name()."=".session_id()."\" method=\"post\">";
echo "<postfield name=\"id\" value=\"$(id)\"/>";
echo "<postfield name=\"passw\" value=\"$(passw)\"/>";
echo "</go></anchor><br/>";
}
echo $div["div"];
if ($_SESSION['wap']!="xml") {echo "---<br/>";}
echo $div["end"];
break;
case "enter":
echo $div["ten"];
if ($client)
{
$_SESSION['id']=$id;
$_SESSION['passw']=$passw;
echo "Вы успешно авторизованы!<br/>";
echo "<a href=\"enter.php?".session_name()."=".session_id()."\">Войти</a><br/>";
echo $div["end"];
}
else
{
echo "Авторизация провалена!<br/>";
echo "<a href=\"index.php\">Назад</a><br/>";
echo $div["end"];
}
break;
}
include ("../footer.php");
?>