$tblstart"; if(!$action){ $txt.="
$tccellh width=150> $tccellh>  $tccell1>User name: $tccell2l>$inpt=username SIZE=25 MAXLENGTH=25> $tccell1>Password: $tccell2l>$inpp=password SIZE=13 MAXLENGTH=32> $tccell1> $tccell2l> $inph=action VALUE=login> $inps=submit VALUE=Login> "; } if($_POST[action]=='login'){ $userid=checkuser($username,$password); if($userid!=-1){ setcookie('loguserid',$userid,2147483647); setcookie('logpassword',shenc($password),2147483647); $msg="You are now logged in as $username."; }else $msg="Couldn't login. Either you didn't enter an existing username, or you haven't entered the right password for the username."; $txt.="$tccell1>$msg
".redirect('index.php','return to the board',0); } if($_POST[action]=='logout'){ setcookie('loguserid',0); setcookie('logpassword',''); $txt.="$tccell1> You are now logged out.
".redirect('index.php','return to the board',0); } print $txt.$tblend.$footer; printtimedif($startingtime); ?>