optional cookie identification

git-svn-id: http://piwigo.org/svn/trunk@45 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
z0rglub
2003-07-27 08:24:10 +00:00
parent 4e775187b8
commit 45a8139acd
9 changed files with 170 additions and 44 deletions
+4 -6
View File
@@ -18,10 +18,9 @@
//----------------------------------------------------------- personnal include
include_once( "./include/init.inc.php" );
//-------------------------------------------------------------- identification
$error = array();
$errors = array();
if ( isset( $_POST['login'] ) )
{
$i = 0;
// retrieving the encrypted password of the login submitted
$query = 'select password';
$query.= ' from '.PREFIX_TABLE.'users';
@@ -38,7 +37,7 @@ if ( isset( $_POST['login'] ) )
}
else
{
$error[$i++] = $lang['invalid_pwd'];
array_push( $errors, $lang['invalid_pwd'] );
}
}
//----------------------------------------------------- template initialization
@@ -63,10 +62,9 @@ initialize_template();
if ( sizeof( $error ) != 0 )
{
$vtp->addSession( $handle, 'errors' );
for ( $i = 0; $i < sizeof( $error ); $i++ )
{
foreach ( $errors as $error ) {
$vtp->addSession( $handle, 'li' );
$vtp->setVar( $handle, 'li.li', $error[$i] );
$vtp->setVar( $handle, 'li.li', $error );
$vtp->closeSession( $handle, 'li' );
}
$vtp->closeSession( $handle, 'errors' );