<?php include "core/menu.php";
session_start();
error_reporting(0);
include ('config/config.php');

function deconnexion()
{
	$_SESSION = array(); //Destruction des variables.
	session_destroy(); //Destruction de la session.
	?>
	<script language="JavaScript">
	<!--
	window.location.href="index.php"
	//-->
	</script>
	<?php
}

 mysql_select_db($realmd);
  $points = mysql_query("SELECT * FROM account WHERE id = '$_SESSION[id]'");
  $donnees = mysql_fetch_array($points);
if ($_SESSION['logged'] == 0)
{ 
if ($_SESSION['logged'] == 0)
			{
			echo "
<h3><center><b>Vous devez &ecirc;tre connect&eacute; pour acceder &agrave; cette partie !</center></b></h3>
<center>
<form action=\"connexion.php?action=connexion\" method=\"post\">
<b>Nom de compte :</b></font><br /><input type=\"text\" name=\"pseudo\"><br />
<b>Mot de passe  :</b></font><br /><input type=\"password\" name=\"pass\"><br /><br />
<input type=\"submit\" value=\"Connexion\" name=\"connexion\" >
</center></form>";
			}
			else
			{
			echo "
<h3><center><b>Une erreur est survenue merci de la signaler au WebMaster</center></b></h3>
<center><a href=\"membre.php\">Retour</a></center>";
			}
}
else
{
if ($alow_connexion == 0)
{
?>
<meta http-equiv="refresh" content="5;url=index.php" />
<?php
}
else
{
?>
	<?php
mysql_select_db($realmd,$connexion) or die(mysql_error());
		$post = $_SESSION['id'];
			$sql="SELECT * FROM account WHERE id='$post'";
			$resultat=mysql_query($sql) or die ("Erreur requette SQL");
			$info=mysql_fetch_array($resultat);?>
<center><h2>Boutique Synarius RP :</h2><br />
	Bienvenue, <b><?php echo $_SESSION['username']; ?>!<br /></b>

	Point <img src="img/ptss.png" />: <b><?php echo $info["dp"]; ?>


</b>

	
	  <?php
mysql_select_db($realmd,$connexion) or die(include('install.php'));
if (!$_SESSION['logged'])
{
	$_SESSION['logged'] = false;
	$_SESSION['securite'] = 0;
}
if (isset($_GET['deconnexion']))
{
	deconnexion();
}
?>
      <hr size="1" noshade="noshade" />
<?php
switch ($_GET['select'])
		{
		case "":
      echo'
	  &nbsp;&nbsp;&nbsp;&nbsp;<a href="lvltwo.php"><img src="img/niveau.png" /></a><br />
	  &nbsp;&nbsp;&nbsp;&nbsp;<a href="goldtwo.php"><img src="img/money.png" /></a><br />
      &nbsp;&nbsp;&nbsp;&nbsp;<a href="membre.php" class="deconnexion">Retour</a>';
	  //&nbsp;&nbsp;&nbsp;&nbsp;<a href="boutique.php?select=pack"><img src="img/pack.png" /></a><br />
	  break;
		
	case "divers":
      echo'

	  &nbsp;&nbsp;&nbsp;&nbsp;<a href="acheter.php?action=compa"><img src="img/compa.png" /></a><br />
	  &nbsp;&nbsp;&nbsp;&nbsp;<a href="acheter.php?action=mount"><img src="img/mount.png" /></a><br />
      &nbsp;&nbsp;&nbsp;&nbsp;<a href="boutique.php" class="deconnexion">Retour</a>';
	  //&nbsp;&nbsp;&nbsp;&nbsp;<a href="compo.php"><img src="img/compo.png" /></a><br />
	  //&nbsp;&nbsp;&nbsp;&nbsp;<a href="mespersos.php"><img src="img/gemmes.png" /></a><br />
	  //&nbsp;&nbsp;&nbsp;&nbsp;<a href="acheter.php?action=bag"><img src="img/sacs.png" /></a><br />
	  break;
	  
		case "pack":
      echo'
	  &nbsp;&nbsp;&nbsp;&nbsp;<a href="mespersos.php"><img src="img/s6.png" /></a><br />
	  &nbsp;&nbsp;&nbsp;&nbsp;<a href="mespersos.php"><img src="img/t8.png" /></a><br />
      &nbsp;&nbsp;&nbsp;&nbsp;<a href="boutique.php" class="deconnexion">Retour</a>';
	  break; 
	  
	  case "armor":
      echo'
	  &nbsp;&nbsp;&nbsp;&nbsp;<a href="armor.php?action=plate"><img src="img/plate.png" /></a><br />
	  &nbsp;&nbsp;&nbsp;&nbsp;<a href="armor.php?action=mail"><img src="img/mailles.png" /></a><br />
	  &nbsp;&nbsp;&nbsp;&nbsp;<a href="armor.php?action=leather"><img src="img/cuir.png" /></a><br />
	  &nbsp;&nbsp;&nbsp;&nbsp;<a href="armor.php?action=cloth"><img src="img/tissu.png" /></a><br />
  	  &nbsp;&nbsp;&nbsp;&nbsp;<a href="armor.php?action=jewel"><img src="img/joai.png" /></a><br />
      &nbsp;&nbsp;&nbsp;&nbsp;<a href="boutique.php" class="deconnexion">Retour</a>';
	  break;
	  
	  case "weapon":
      echo'
	  &nbsp;&nbsp;&nbsp;&nbsp;<a href="boutique.php?select=onehand"><img src="img/onehand.png" /></a><br />
	  &nbsp;&nbsp;&nbsp;&nbsp;<a href="boutique.php?select=twohands"><img src="img/twohand.png" /></a><br />
	  &nbsp;&nbsp;&nbsp;&nbsp;<a href="boutique.php?select=ranged"><img src="img/dist.png" /></a><br />
	  &nbsp;&nbsp;&nbsp;&nbsp;<a href="other.php?action=shield"><img src="img/shield.png" /></a><br />
      &nbsp;&nbsp;&nbsp;&nbsp;<a href="boutique.php" class="deconnexion">Retour</a>';
	  break;
	  
	  	  case "onehand":
      echo'
	  &nbsp;&nbsp;&nbsp;&nbsp;<a href="weapon.php?action=axe"><img src="img/honehand.png" /></a><br />
	  &nbsp;&nbsp;&nbsp;&nbsp;<a href="weapon.php?action=mace"><img src="img/monehand.png" /></a><br />
	  &nbsp;&nbsp;&nbsp;&nbsp;<a href="weapon.php?action=sword"><img src="img/eonehand.png" /></a><br />
	  &nbsp;&nbsp;&nbsp;&nbsp;<a href="weapon.php?action=dagger"><img src="img/dagger.png" /></a><br />
      &nbsp;&nbsp;&nbsp;&nbsp;<a href="boutique.php">Retour</a>';
	  break;
	  
	  case "twohands":
      echo'
	  &nbsp;&nbsp;&nbsp;&nbsp;<a href="weapon.php?action=axet"><img src="img/htwo.png" /></a><br />
	  &nbsp;&nbsp;&nbsp;&nbsp;<a href="weapon.php?action=macet"><img src="img/mtwo.png" /></a><br />
	  &nbsp;&nbsp;&nbsp;&nbsp;<a href="weapon.php?action=swordt"><img src="img/etwo.png" /></a><br />
	  &nbsp;&nbsp;&nbsp;&nbsp;<a href="weapon.php?action=staff"><img src="img/staff.png" /></a><br />
      &nbsp;&nbsp;&nbsp;&nbsp;<a href="boutique.php">Retour</a>';
	  break;
	  
	  case "ranged":
      echo'
	  &nbsp;&nbsp;&nbsp;&nbsp;<a href="other.php?action=bow"><img src="img/bow.png" /></a><br />
	  &nbsp;&nbsp;&nbsp;&nbsp;<a href="other.php?action=crossbow"><img src="img/crossbow.png" /></a><br />
	  &nbsp;&nbsp;&nbsp;&nbsp;<a href="other.php?action=gun"><img src="img/gun.png" /></a><br />
	  &nbsp;&nbsp;&nbsp;&nbsp;<a href="other.php?action=thrown"><img src="img/thrown.png" /></a><br />
	  &nbsp;&nbsp;&nbsp;&nbsp;<a href="other.php?action=wand"><img src="img/wand.png" /></a><br />
      &nbsp;&nbsp;&nbsp;&nbsp;<a href="boutique.php">Retour</a>';
	  break;
		}
}
}
?>
</center>            </div>
            <div id="contenu_b"></div>
    </div>
        <div id="menu-v">
				<hr />
<?php include "core/menud.php" ?>
<?php include "core/end.php" ?>