aboutsummaryrefslogtreecommitdiffstats
path: root/identification.php
diff options
context:
space:
mode:
authorz0rglub <z0rglub@piwigo.org>2003-07-27 08:24:10 +0000
committerz0rglub <z0rglub@piwigo.org>2003-07-27 08:24:10 +0000
commit45a8139acdc9a175f8f8e1536d42fa36bc57ff4c (patch)
treedf7b51fc1b5063cdbcd46856cd16d0dacc28acd7 /identification.php
parent4e775187b8d054835b179ff136ccd5ad5393711f (diff)
optional cookie identification
git-svn-id: http://piwigo.org/svn/trunk@45 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'identification.php')
-rw-r--r--identification.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/identification.php b/identification.php
index c88719d03..2c8901a05 100644
--- a/identification.php
+++ b/identification.php
@@ -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' );