Files
resatennis_tyroltenn/www/site_marchand/navigation.php

178 lines
2.9 KiB
PHP
Executable File

<?php
session_start();
$deconnect=$HTTP_GET_VARS["deconnect"];
$deconnetc=$HTTP_GET_VARS["deconnetc"];
// session_unregister("compt");
?>
<html>
<head>
<title></title>
</head>
<?php
require("connexion.php");
$conn = mysql_connect($host, $user, $password);
mysql_select_db($bdd) or die("Impossible d'ouvrir la base de donnee $bdd");
?>
<?php
if (isset($_SESSION['idadm']))
{
if($deconnect==1)
{
session_unregister("idadm");
}
}
if (isset($_SESSION['idcli']))
{
if($deconnetc==1)
{
session_unregister("idcli");
}
}
?>
<body>
<?php
if ( !isset($_SESSION['idcli']) )
{
?>
<a href="membres/login.php">Membres</a>
<?php
} else {
?>
<a href="membres/index.php">Membres</a>
<?php
}
?>
<br>
<br>
<?php
if ( !(isset($_SESSION['idcli']) || isset($_SESSION['idadm'])) )
{
?>
<a href="inscription/inscription1.php">Inscription</a>
<br>
<br>
<?php
}
?>
<?php
if (!isset($_SESSION['idadm']))
{
?>
<a href="admin/login.php">Administrateur</a>
<?php
} else {
?>
<a href="admin/index.php">Administrateur</a>
<?php
}
?>
<br>
<br>
<a href="produit/index.php">Produits</a>
<br>
<?php
if (isset($_SESSION['idadm']))
{
if($deconnect)
{
session_unregister("idadm");
} else {
?>
<br>
<br>
<a href="navigation.php?deconnect=1">Deconnection Administrateur</a>
<br>
<?php
}
}
if (isset($_SESSION['idcli']))
{
if($deconnetc)
{
session_unregister("idcli");
} else {
?>
<br>
<br>
<a href="navigation.php?deconnetc=1">Deconnection membre</a>
<br>
<?php
}
}
?>
<table align="center" border=0>
<form name="frech" action="produit/recherche.php" method="POST">
<tr>
<td>
<?php
if ($type=="marq")
{
?>
<h4>Recherche par marque : </h4>
<?php
} else {
?>
<h4>Recherche rapide : </h4>
<?php
}
?>
</td>
<td>
<?php
if ($type=="marq")
{
$requete = "select idmarque,marque from marques";
$result=mysql_query($requete) or die ("Erreur SQL :$requete<br>".mysql_error()."...");
?>
<h4><select name="marq">
<?php
while ($ligne=mysql_fetch_row($result))
{
$idmarque=$ligne[0];
$marque=$ligne[1];
?>
<option value="<?php print $idmarque?>"><?php print $marque?></option>
<?php
}
?>
</select></h4>
<?php
} else {
?>
<h4><h4><h4><h4><input type="text" name="rech"/></h4>
<?php
}
?>
</td>
<td>
<h4><input type="submit" value="Go"/></h4>
</td>
</tr>
<tr>
<td colspan=3 align=center>
<?php
if ($type=="marq")
{
?>
<h6><a href="index.php">Recherche rapide</a></h6>
<?php
} else {
?>
<h6><a href="index.php?type=marq">Recherche par marques</a></h6>
<?php
}
?>
</td>
</tr>
</form>
</table>
</body>
</html>