--- index.php 2001/01/04 14:56:48 1.6 +++ index.php 2001/01/05 13:31:04 1.7 @@ -31,7 +31,7 @@ if ($row=$sth->fetchrow_hash()) { if ($row && $row[passwd] == $PHP_AUTH_PW) { $md5user=md5($PHP_AUTH_USER.$PHP_AUTH_PW); - $osoba_id=$row[id]; + $osoba_id=$row[id]; if ($row[analitical] == "t") { $analitical_room=1; $tpl->assign(array( ROOM => "You are member of analitical room" )); @@ -54,7 +54,7 @@ if($pop3->connect("intranet.pliva.hr")) { $Count = $pop3->login($PHP_AUTH_USER,$PHP_AUTH_PW); - if ( $Count != -1 ) { + if ( $Count && $Count != -1 ) { $pop3->quit(); // o.k., user exists now insert it in db! include("finger.inc"); @@ -66,7 +66,7 @@ $md5user=md5($PHP_AUTH_USER.$PHP_AUTH_PW); $osoba_id=$row[id]; $tpl->assign(array( - FULL_NAME => $row[full_name], + FULL_NAME => $full_name, RELOGIN => "$PHP_SELF?relogin=$md5user" )); } @@ -80,6 +80,8 @@ $tpl->parse(MAIN, "main"); $tpl->FastPrint(); exit ; +} else { + $dbh->dbh_do("update osobe set last_login=now() where login='$PHP_AUTH_USER'"); } //---- insert reply into database