<?php
# Version 1.0
require_once('../include/config.inc.php');
$auth = new auth();
// Check to see if someone is already logged in or not
if( $auth->check() )
echo 'Logged In';
else
echo 'Not Logged In';
// Log someone in
// Optional 2 params of login function are for using a cookie instead of a session
// Use a cookie and set it for 36 hours
// if( $auth->login( $f->method['login'], md5( $f->method['password'] ), 1, 36 ) )
if( $auth->login( $f->method['login'], md5( $f->method['password'] ) ) )
echo 'Login Success';
else
echo 'Login Failed';
// Log someone out
$auth->logout();
?>
|