<?php require_once('Connections/FitConnec.php'); ?>
<?php
if (!isset($_SESSION)) {
  session_start();
}
$MM_authorizedUsers = "0,1";
$MM_donotCheckaccess = "false";

// *** Restrict Access To Page: Grant or deny access to this page
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) { 
  // For security, start by assuming the visitor is NOT authorized. 
  $isValid = False; 

  // When a visitor has logged into this site, the Session variable MM_Username set equal to their username. 
  // Therefore, we know that a user is NOT logged in if that Session variable is blank. 
  if (!empty($UserName)) { 
    // Besides being logged in, you may restrict access to only certain users based on an ID established when they login. 
    // Parse the strings into arrays. 
    $arrUsers = Explode(",", $strUsers); 
    $arrGroups = Explode(",", $strGroups); 
    if (in_array($UserName, $arrUsers)) { 
      $isValid = true; 
    } 
    // Or, you may restrict access to only certain users based on their username. 
    if (in_array($UserGroup, $arrGroups)) { 
      $isValid = true; 
    } 
    if (($strUsers == "") && false) { 
      $isValid = true; 
    } 
  } 
  return $isValid; 
}

$MM_restrictGoTo = "Login.php";
if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {   
  $MM_qsChar = "?";
  $MM_referrer = $_SERVER['PHP_SELF'];
  if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
  if (isset($_SERVER['QUERY_STRING']) && strlen($_SERVER['QUERY_STRING']) > 0) 
  $MM_referrer .= "?" . $_SERVER['QUERY_STRING'];
  $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
  header("Location: ". $MM_restrictGoTo); 
  exit;
}
?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $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;
}
}

$colname_User = "-1";
if (isset($_SESSION['Matrix number'])) {
  $colname_User = $_SESSION['Matrix number'];
}
mysql_select_db($database_FitConnec, $FitConnec);
$query_User = sprintf("SELECT * FROM fit WHERE `Matrix number` = %s", GetSQLValueString($colname_User, "int"));
$User = mysql_query($query_User, $FitConnec) or die(mysql_error());
$row_User = mysql_fetch_assoc($User);
$totalRows_User = mysql_num_rows($User);
?>
<!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>FIT Store</title>
   <link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <meta name="viewport" content="width=device-width" />
<style type="text/css">
body {
	background-image: url(purple-galaxy.png);
}
body,td,th {
	color: #0FF;
	font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
	font-size: 18px;
	font-weight: bold;
}

</style>
<link href="SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
</head>

<body>
<script src="http://code.jquery.com/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
 
<div class="navbar navbar-inverse">
  <div class="navbar-inner">
  <a class="brand divider" 
  href="home.php">FIT Store</a>
  <ul class="nav">
  
    <li class="active"></li>
    <li><a href="About Us.php">About Us</a></li>
    <li><a href="Shopping Inventory.html">Cart/Inventory</a></li>
    <li ><a href="admin.php">Admin</a></li>
  </ul>
  </div>
</div>
<div class="dl-horizontal" id="box">
<table width="1059" border="0">
    <tr>
      <td width="584">&nbsp;</td>
      <td width="465">Action</td>
    </tr>
  </table>
</div>
<div id="Category"> </div>
<div class="dl-horizontal"></div>
<table width="1324" border="0">
  <tr>
    <td width="147" valign="top"><div class="dl-horizontal" id="catergory2">
      <ul id="MenuBar1" class="MenuBarVertical">
        <li><a href="home.php">Categories</a></li>
        <li><a href="apps.php" class="MenuBarItemSubmenu">Apps</a>
          <ul>
<li><a href="Education.php">Education</a></li>
<li><a href="Productivity.php">Productivity</a></li>
</ul>
          </li>
        <li><a class="MenuBarItemSubmenu" href="Games.php">Games</a>
          <ul>
            <li><a href="Action.php">Action</a></li>
            <li><a href="Puzzle.php">Puzzle</a></li>
</ul>
          </li>
        <li><a href="Books.php">Books</a></li>
      </ul>
</div></td>
    <td width="1167"><table width="908" height="378" border="1">

      <tr>
        
         <td>
          <p><img src="img/assassin creed.jpg" alt="" width="225" height="225" /></p>
          <p>Assassin's Creed </p>
          <p>Publish date:23/7/2011</p>
          <p>Latest version:2.45.2</p>
          <p>OS requirer:Windows,Mars,Linux,iOS,</p>
          <p>Android,Window Phone </p>
          <p>Price:$1.00</p>
          <p>&nbsp;</p></td>
          <td>
          <p><img src="img/dead trigger.jpg" /></p>
          <p>Dead Trigger </p>
          <p>Publish date:5/9/2011</p>
          <p>Latest version:3.4.5</p>
          <p>OS requirer:Windows,Mars,Linux,iOS,</p>
          <p>Android,Window Phone</p>
          <p>Price:$1.00 </p>
          <p>&nbsp;</p>
          </td>

    </table></td>
  </tr>
</table>
<p>&nbsp;</p>
<table width="1323" border="0">
  <tr>
    <td width="442">&nbsp;</td>
    <td width="871"><a href="update.php?Matrix number=<?php echo $row_User['Matrix number']; ?>">Update Information</a> | <a href="logout.php"> Logout</a> | <a href="admin.php">Admin</a></td>
  </tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<script type="text/javascript">
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
</script>
</body>
</html>
<?php
mysql_free_result($User);
?>
