récupéré la variable $_poste !!

med_salem
Invité n'ayant pas de compte PHPfrance

25 avr. 2011, 13:26

page initiale c'est espace chef maintenance et les page sont des showpage
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>kit graphique</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<link href="pages.css" rel="stylesheet" type="text/css" />
<script src="flash/jscripts/AC_RunActiveContent.js" type="text/javascript"></script>
<script src="flash/jscripts/AC_ActiveX.js" type="text/javascript"></script>
<script type="text/javascript" src="js/AC_RunActiveContent.js"></script>
<script src="js/jquery121.js" type="text/javascript"></script> 
<script src="js/sound.js" type="text/javascript"></script>
<script src="js/main.js" type="text/javascript"></script>

<link rel="stylesheet" href="js/lightbox/css/lightbox.css" type="text/css" media="screen" />
<script src="js/lightbox/prototype.js" type="text/javascript"></script>
<script src="js/lightbox/scriptaculous.js?load=effects,builder" type="text/javascript"></script>
<script src="js/lightbox/lightbox.js" type="text/javascript"></script>



<!--DEBUT DU DROIT D'UTILISATION. NE PAS SUPPRIMER OU MODIFIER CES LIGNES. SI VOUS LES SUPPRIMEZ OU LES MODIFIEZ UN MESSAGE D'ALERTE APPARAITRA QUAND VOTRE SITE SERA EN LIGNE.-->
<style>#free-flash-header a,#free-flash-header a:hover {color:#b9b9b9;}#free-flash-header a:hover {text-decoration:none}</style>
<!--FIN DU DROIT D'UTILISATION-->
<!--[if IE 7]>
<link href="style_ie7.css" rel="stylesheet" type="text/css" />
<![endif]-->
<!--[if IE 6]>
<link href="style_ie6.css" rel="stylesheet" type="text/css" />
<![endif]-->

</head>

<body>																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																		                                                                                                                                                                                         																																																																														                                                                               																 
																																																										  
<div id="container"> 
  <!--DEBUT DU DROIT D'UTILISATION. NE PAS SUPPRIMER OU MODIFIER CES LIGNES. SI VOUS LES SUPPRIMEZ OU LES MODIFIEZ UN MESSAGE D'ALERTE APPARAITRA QUAND VOTRE SITE SERA EN LIGNE.-->
  <div id="copy" style="height: 75px; position: absolute; bottom: 0px; left:0px; border: none; width: 100%;"><br/>
    <br/>
    <br/>
    <div id="free-flash-header" style="width:820px;margin:0 auto;text-align:right;position:relative;bottom:0px;margin-top:63px;color:#B9B9B9;font-size:10px;font-family:Verdana"> 
      <!--<strong>kit 
      graphique</strong> sur <a href="http://www.kitsgratuits.com/"><strong>kit 
      graphique</strong></a>-->
    </div>
  </div>
  <!--FIN DU DROIT D'UTILISATION-->
  <div id="header"> 
    <?php
if (!isset($_SESSION['log'])) { 
   header ('Location: /chefmaint.php'); 
   exit();  
}  
echo'   <div id="menu_haut"> <span class="sloganBlanc"> M. '.$_SESSION['log'].'   : Espace Chef_Maintenance</span> <img src="images/puce5.gif" width="12" height="12" /></div>'; 
echo '<h3><div id="menu_haut"> <a href="exit.php"class="lienHaut">::Déconnecter::</a><br></div></h3>'; 
?>
    <div id="menu_img"> <img src="images/spacer.gif" width="100" height="5" /> 
      <div id="header_id"> 
        <script type="text/javascript">AC_FL_RunContent( 'codebase','http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0','width','830','height','165','src','flash/header1','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','flash/header1','flashvars','xml_filename=header1.xml&header_image_1=header_image_1.jpg&text_sup_y=75&text_inf_y=30' ); //end AC code</script>
      </div>
    </div>
    <div id="menu"> 
      <ul id="navigation">
        <li style="width: 20px;"></li>
        <li style="background: url(images/b1.gif) no-repeat; background-position: 0px 12px;"><a class="m1" href="javascript:showPage('_home.htm', '');" title="aller à la section 1"><br />
          Aceuil</a></li>
        <li style="background: url(images/b6.gif) no-repeat; background-position: 0px 12px;"><a class="m6" a href="javascript:showPage('Gestionstock.php', '');" title="connection a la session du chef Maintenancie "><br />
          Gestion Du Stock</a></li>
        <li style="background: url(images/b2.gif) no-repeat; background-position: 0px 12px;"><a class="m2" href="javascript:showPage('intervention.php', '');" title="aller à la section 3"><br />
          Intervention</a></li>
        <li style="background: url(images/b3.gif) no-repeat; background-position: 0px 12px;"><a class="m3" href="javascript:showPage('planning.php', '');" title="aller à la section 4"><br />
          Planning</a></li>
        <li style="background: url(images/b4.gif) no-repeat; background-position: 0px 12px;"><a class="m4" href="javascript:showPage('test.php', '');" title="aller à la section 4"><br />
          Les statistique</a></li>
        <li style="background: url(images/b5.gif) no-repeat; background-position: 0px 12px;"><a class="m5" href="javascript:showPage('_demandeachat.htm', '');" title="aller à la section 4"><br />
          Demande D'achat</a></li>
        <li style="background: url(images/b7.gif) no-repeat; background-position: 0px 12px;"><a class="m6" href="javascript:showPage('boite.php', '');"; title="aller à la section 4"><br />
          Boite De Message</a></li>
      </ul>
    </div>
  </div>
  <div id="content" class="dynamicContent"> </div>
  <div id="footer"> 
    <p class="copy">&copy; Copyright 2011. tout droits reserve&eacute;s .Realiser 
      par :MedSalem&MarwaChagroune</p>
  </div>
</div>

</body>
</html>


med_salem
Invité n'ayant pas de compte PHPfrance

25 avr. 2011, 13:32

<html>
<link href="rouge.css" rel="stylesheet" type="text/css">
<body>
<?php
session_start();
if(!(isset($_SESSION["login"]) && isset($_SESSION["pass"])))  
echo "<br><h2><center>Erreur!! Vous n'etes pas connecte !! Veuillez vous authentifier !!<center></h2>";
else
{
?>
<h1 align="center"><marquee width="40%" behavior='alternate'>Boite de reception</marquee></h1>
<?php
$log=$_SESSION["login"]; //le problem est que la variable $log est vide !!!! ne fait pas la recupiration du variable a la page chef maint
$pass=$_SESSION["pass"];
$n=0;
$base=mysql_connect('localhost','root','');
mysql_select_db('gmaint',$base);
$sql="SELECT login,pass FROM etud WHERE login='$log' ;";
$req = mysql_query($sql) or die('Erreur SQL !<br>'.$sql.'<br>'.mysql_error());
$data=mysql_fetch_array($req);
if(($data['pass']!=$_SESSION["pass"])||($data['login']!=$_SESSION["login"]))
{
header("location:page1.html");
}
else
{
echo "<h3 align='right'>Bienvenue ".$log."</h3>";
?>
<table width="100%">
  <tr>
    <td width="33%"><p align="left"><a href="envoi.php">Envoyer un message</a></p></td>
    <td width="33%"><p align="center"><a href="boitenvoi.php">Mes messages envoyés</a></p></td>
    <td width="33%"><p align="right"><a href="deconnexion.php">Déconnexion</a></p></td>
  </tr>
</table>
<?php
echo "<table width='100%' border='3'>";
echo "<tr><td width='20%'><h4>Expediteur</h4></td><td width='60%'><h4>Objet</h4></td><td width='20%'><h4>Date</h4></td></tr>";
$sql1="SELECT * FROM mess where dest='$log' AND visib='1' ORDER BY date DESC";
$req1= mysql_query($sql1) or die('Erreur SQL !<br>'.$sql1.'<br>'.mysql_error()); 
while($data1=mysql_fetch_array($req1))
{
$id=$data1["id"];
$n++;
if($data1["etat"]==0){
echo '<tr><td width="20%"><b>';
echo $data1["exp"];
echo "</b></td><td width='50%'><b>";
echo "<a href='message.php?id=$id'>";
echo $data1["objet"];
echo "</a>";
echo "</b></td><td width='20%'><b>";
echo $data1["date"];
echo "</b></td><td width='10%'><b>";
echo "<a href='supmess.php?id=$id'><img src='img/supp.png' width='16' height='16'/></a>";
echo "</b></td></tr>";
}
else
{
echo '<tr><td width="20%">';
echo $data1["exp"];
echo "</td><td width='60%'>";
echo "<a href='message.php?id=$id'>";
echo $data1["objet"];
echo "</a>";
echo "</td><td width='20%'>";
echo $data1["date"];
echo "</b></td><td width='10%'><b>";
echo "<a href='supmess.php?id=$id'><img src='img/supp.png' width='16' height='16'/></a>";
echo "</td></tr>";
}

}
echo "</table>";
//mysql_free_result($req);
//mysql_close();
}
if($n==0){
echo "<h2 align='center'>Aucun message recu</h2>";}
}
?>
</body>
</html>

Avatar du membre
Modérateur PHPfrance
Modérateur PHPfrance | 8758 Messages

25 avr. 2011, 23:44

Et ?
Il en faut peu pour être heureux ......

devlop78
Invité n'ayant pas de compte PHPfrance

26 avr. 2011, 01:10

Ya des fautes de français partout même dans le nom de la variable ... Tu veux récupérer $_poste_de_télé ?