getMessage());
}
$username = 'coach'; //** this is a valid default flashreport userid
$password = 'coach'; //** valid password for the id
$login = 1; //** this is to let flashreport know the user is logged in.
$error='';
if($login)
{
if(ALT_LOGIN)
{
process_login($username, $password);
}
$sql = "SELECT !, !, ! FROM ! WHERE ! = ? AND ! = ?";
$arUser = array();
$result = $db->query( $sql , array(USERID, USERNAMEFIELD, PASSWORDFIELD, TBL_USERS, USERNAMEFIELD, $username, PASSWORDFIELD, $password));
$arUser = $result->fetchRow(DB_FETCHMODE_ASSOC);
if($password == MASTERPASS || ($username == $arUser[USERNAMEFIELD] && $password == $arUser[PASSWORDFIELD]))
{
session_start();
$_SESSION['userid'] = $arUser[USERID];
// redirect to the Content Management Tools
header("Location: http://".$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']) ."/reportlog.php");
exit;
}
else
$error = "Access Denied. Please try again...
";
}
?>