<?PHP
// Pushok's SEMA (Small Enterprise Management Application)
//
// Copyright (C) 2004 Pushok Software http://www.pushok.com
//
// LICENSE
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License (GPL)
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// To read the license please visit http://www.gnu.org/copyleft/gpl.html
/*
subscription: contain code to log a user in the system.
*/
class web_Login extends web_Layout
{
function Info()
{
$this->formStart(_LW("Login"));
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
echo "<FORM method=\"POST\">\n";
echo "<INPUT type=\"hidden\" name=\"idform\" value=\"FM_USER_LOGIN\"></INPUT>\n";
$sParams = web_GetPageGetParams();
if ( strlen($sParams) )
$sParams = "?".$sParams;
echo "<INPUT type=\"hidden\" name=\"onsuccess\" value=\"$sParams\"></INPUT>\n";
echo "<INPUT type=\"hidden\" name=\"onerror\" value=\"\"></INPUT>\n";
// if was some error then show the message about
$bError = isset($_SESSION['last_post']);
// login column
$sFieldValue = "";
if ( $bError )
$sFieldValue = $_SESSION['last_post']['data']['login'];
$this->formInputItem(_LW("Login"),"edit","login",$sFieldValue);
// password column
$sFieldValue = "";
if ( $bError )
$sFieldValue = $_SESSION['last_post']['data']['password'];
$this->formInputItem(_LW("Password"),"password","password",$sFieldValue);
$this->formInputItem(_LW("Login"),"submit");
echo "</FORM>\n";
$this->formEnd();
?>
<?PHP
}
}
$oPage = new web_Login;
$oPage->m_windowHeader = _LW("Login");
$oPage->RenderPage();
?>