require_once('Connections/boulevardstyle.php');?>
<?php require_once('Connections/boulevardstyle.php');?>
<?php require_once( "WA_SecurityAssist/Helper_PHP.php" ); ?>
<?php
if(isset($_POST["button_x"])){
$WA_Auth_Parameter = array(
"connection" => $boulevardstyle,
"database" => $database_boulevardstyle,
"tableName" => "users",
"columns" => explode($WA_Auth_Separator,"emailaddress".$WA_Auth_Separator."password"),
"columnValues" => explode($WA_Auth_Separator,"".$row_users[''] ."".$WA_Auth_Separator."".((isset($_POST["password"]))?$_POST["password"]:"") .""),
"columnTypes" => explode($WA_Auth_Separator,"text".$WA_Auth_Separator."text"),
"sessionColumns" => explode($WA_Auth_Separator,"1st_name"),
"sessionNames" => explode($WA_Auth_Separator,"first_name"),
"successRedirect" => "index1.php",
"failRedirect" => "re_userLogIn.php",
"gotoPreviousURL" => TRUE,
"keepQueryString" => FALSE
);
WA_AuthenticateUser($WA_Auth_Parameter);
}
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;
}
}
mysql_select_db($database_boulevardstyle, $boulevardstyle);
$query_users = "SELECT * FROM users";
$users = mysql_query($query_users, $boulevardstyle) or die(mysql_error());
$row_users = mysql_fetch_assoc($users);
$totalRows_users = mysql_num_rows($users);
?>
<?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['emailaddress'])) {
$loginUsername=$_POST['emailaddress'];
$password=$_POST['password'];
$MM_fldUserAuthorization = "";
$MM_redirectLoginSuccess = "index1.php";
$MM_redirectLoginFailed = "re_userLogin.php";
$MM_redirecttoReferrer = false;
mysql_select_db($database_boulevardstyle, $boulevardstyle);
$LoginRS__query=sprintf("SELECT emailaddress, password FROM users WHERE emailaddress=%s AND password=%s",
GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));
$LoginRS = mysql_query($LoginRS__query, $boulevardstyle) 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"><!-- InstanceBegin template="/Templates/dynamics.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>User Log In | boulevardstyle.com</title>
<!-- InstanceEndEditable -->
<style type="text/css">
<!--
body,td,th {
font-family: Arial, Helvetica, sans-serif;
color: #333333;
-->
</style>
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
<link href="boulevard_style.css" rel="stylesheet" type="text/css" />
<link href="SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style2 {color: #FF0000}
-->
</style>
<style type="text/css">
<!--
.style3 {color: #EE1C25}
.style4 {font-size: 12px}
-->
</style>
<!-- InstanceBeginEditable name="head" -->
<script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style7 {color: #134D92}
-->
</style>
<!-- InstanceEndEditable -->
</head>
<body>
<div id="top">
<div id="logo"><img src="images/logo.jpg" width="147" height="152" /></div>
<!-- InstanceBeginEditable name="EditRegion5" -->
<div id="dynamicInfo"><?php echo $_SESSION['first_name']; ?>| <a href="#">Your Account</a> |<a href="#"><img src="images/shopping_cart-32.png" width="34" height="30" border="0" align="absbottom" /></a> <a href="#">Cart</a> </div>
<!-- InstanceEndEditable -->
<div id="search">
<form id="form1" name="form1" method="post" action="">
<label>
<input name="search" type="text" id="search2" />
</label>
<label>
<input name="button" type="image" id="button" value="Submit" src="images/arrow_right.gif" align="bottom" />
</label>
</form>
</div>
<div id="navigation">
<ul id="MenuBar1" class="MenuBarHorizontal">
<li><a href="index.html">Boulevard Style</a> </li>
<li><a href="product_gallery.html">Product Gallery</a></li>
<li><a href="comunity_fund.html">Community Fund Raising</a> </li>
<li><a href="about_us.html">About Us</a></li>
<li><a href="contact_us.html">Contact Us</a></li>
</ul>
</div>
</div>
<div id="main">
<div id="bodypage_contact"><!-- InstanceBeginEditable name="left_nav" -->
<div id="left">
<p><strong>About Boulevard<br />
<br />
<img src="images/mail_32.gif" width="32" height="32" align="absmiddle" /> E-mail:</strong><a href="mailto:info@boulevardstyle.com">info@boulevardstyle.com</a></p>
<p>ORDER BOULEVARD FASHIONS<br />
<span class="style3">Online ordering coming soon!</span></p>
<p><a href="comunity_fund.html">Community Fund Raising</a><br />
<a href="sales_rep.html">Become a Sales Rep</a><br />
<a href="fashion_icon.html">Become a Boulevard Fashion Icon</a><br />
<a href="boulevard_community.html">Join the Boulevard Community</a><span class="style4"><br />
</span></p>
</div>
<!-- InstanceEndEditable -->
<div id="right"><!-- InstanceBeginEditable name="rightConts" -->
<div id="c_left">
<p class="style2"><span class="ShoeName style7">Log In</span><br />
</p>
<form ACTION="<?php echo $loginFormAction; ?>" id="form2" name="form2" method="POST">
<table width="331">
i dragged the session variable first_name to tha place where i want it to be displayed but i did not get any result...
any help would be highly appreciated
thanks