<?php include('Connections/Login.php'); ?>
<?php
//initialize the session
if (!isset($_SESSION)) {
session_start();
}
// ** Logout the current user. **
$logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){
$logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){
//to fully log out a visitor we need to clear the session varialbles
$_SESSION['MM_Username'] = NULL;
$_SESSION['MM_UserGroup'] = NULL;
$_SESSION['PrevUrl'] = NULL;
unset($_SESSION['MM_Username']);
unset($_SESSION['MM_UserGroup']);
unset($_SESSION['PrevUrl']);
$logoutGoTo = "/index.php";
if ($logoutGoTo) {
header("Location: $logoutGoTo");
exit;
}
}
?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
?>
<?php
// *** Validate request to login to this site.
if (!isset($_SESSION)) {
session_start();
}
$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) {
$_SESSION['PrevUrl'] = $_GET['accesscheck'];
}
if (isset($_POST['username'])) {
$loginUsername=$_POST['username'];
$password=$_POST['password'];
$MM_fldUserAuthorization = "";
$MM_redirectLoginSuccess = "/index.php";
$MM_redirectLoginFailed = "/fail.php";
$MM_redirecttoReferrer = false;
mysql_select_db($database_Login, $Login);
$LoginRS__query=sprintf("SELECT username, password FROM Users WHERE username=%s AND password=%s",
GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));
$LoginRS = mysql_query($LoginRS__query, $Login) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = "";
//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;
if (isset($_SESSION['PrevUrl']) && false) {
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
}
header("Location: " . $MM_redirectLoginSuccess );
}
else {
header("Location: ". $MM_redirectLoginFailed );
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Member Login</title>
<script type="text/javascript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script><style type="text/css">
<!--
.style1 {font-size: 18px}
-->
</style></head>
<body onload="MM_preloadImages('/Images/Buttons/Home2.gif','/Images/Buttons/About-Us2.gif','/Images/Buttons/Consulting2.gif','/Images/Buttons/Contacts2.gif','/Images/Buttons/Growblog2.gif','/Images/Buttons/Members2.gif','/Images/Buttons/Store2.gif','/Images/Buttons/FAQ2.gif')">
<table width="1156" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="200" rowspan="3" valign="top"><!--DWLayoutEmptyCell--> </td>
<td colspan="8" rowspan="3" valign="top"><img src="/Images/Banner2.gif" width="749" height="138" /></td>
<td width="56" height="1"></td>
<td width="149"></td>
</tr>
<tr>
<td height="24" valign="top"><form id="form2" name="form2" method="post" action="">
<a href="<?php echo $logoutAction ?>">Log out</a>
</form></td>
<td></td>
</tr>
<tr>
<td height="113"> </td>
<td></td>
</tr>
<tr>
<td rowspan="5" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="200" height="51" valign="top"><a href="/index.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Home Button','','/Images/Buttons/Home2.gif',1)"><img src="/Images/Buttons/Home.gif" name="Home Button" width="200" height="50" border="0" id="Home Button" /></a></td>
</tr>
<tr>
<td height="51" valign="top"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('About Us','','/Images/Buttons/About-Us2.gif',1)"><img src="/Images/Buttons/About-Us.gif" name="About Us" width="200" height="50" border="0" id="About Us" /></a></td>
</tr>
<tr>
<td height="51" valign="top"><a href="consulting.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Consulting','','/Images/Buttons/Consulting2.gif',1)"><img src="/Images/Buttons/Consulting.gif" name="Consulting" width="200" height="50" border="0" id="Consulting" /></a></td>
</tr>
<tr>
<td height="51" valign="top"><a href="contactform.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image4','','/Images/Buttons/Contacts2.gif',1)"><img src="/Images/Buttons/Contacts.gif" name="Image4" width="200" height="50" border="0" id="Image4" /></a></td>
</tr>
<tr>
<td height="51" valign="top"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Grow Blog','','/Images/Buttons/Growblog2.gif',1)"><img src="/Images/Buttons/Growblog.gif" name="Grow Blog" width="200" height="50" border="0" id="Grow Blog" /></a></td>
</tr>
<tr>
<td height="51" valign="top"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Members','','/Images/Buttons/Members2.gif',1)"><img src="/Images/Buttons/Members.gif" name="Members" width="200" height="50" border="0" id="Members" /></a></td>
</tr>
<tr>
<td height="51" valign="top"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Store','','/Images/Buttons/Store2.gif',1)"><img src="/Images/Buttons/Store.gif" name="Store" width="200" height="50" border="0" id="Store" /></a></td>
</tr>
<tr>
<td height="51" valign="top"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('FAQ','','/Images/Buttons/FAQ2.gif',1)"><img src="/Images/Buttons/FAQ.gif" name="FAQ" width="200" height="50" border="0" id="FAQ" /></a></td>
</tr>
<tr>
<td height="51" valign="top"><!--DWLayoutEmptyCell--> </td>
</tr>
<tr>
<td height="51" valign="top"><!--DWLayoutEmptyCell--> </td>
</tr>
<tr>
<td height="51" valign="top"><!--DWLayoutEmptyCell--> </td>
</tr>
<tr>
<td height="3"></td>
</tr>