
Forum » » Le coin des codeurs » » Variable globale !!!!
Posté : 13-01-2011 09:19 
<html>
<head>
<link type="text/css" rel="stylesheet" href="./themes/light box_effect.css">
<script>
function OuvrePopup()
{
document.ge tElementById('Page').style.display='block';
document.ge tElementById('Lettre').style.display='block';
}
function FermePopup()
{
document.getElementById('Page').style.display='none';
document.getElementById('Lettre').style.display='none';
}
</script>
</head>
</html>
<body>
<!-- AFFICHAGE D'UNE LIGHTBOX -->
<div id='Page'></div>
<div id='Lettre'>
<p align='center'>
<br><br>
<div align='center'>
<h1>Template des fiches individuelles en const ruction </h1>
<? php
// c'est ici que j'ai besoin de ré cupérer $reprod_id pour faire de nouvelles requà ªtes et les afficher
?>
<p align='center'><img src='images/consgrl2.jpg'&nb sp;width='300' border='0'></p>
<p align='center'>
<font face='Arial Black' size='4' co lor='red'>
Merci de reve nir prochainement
</font>
</p>
</div>
<p> Â </p>
<p align='center'><b>
<input type='button' value='Fermer' !onclick!='FermePopup() ' style='cursor:pointer'>
</b></p>
</div>
<!-- FIN D'AFFICHAGE DE LIGHTBOX -->
</body>
</html>
<?php
$strSQL = 'SELECT `Titre`, `Id_parent` FROM `elev_menu`  ;WHERE `Id_page` = '.$_ENV['id_page'];
$resultat = requete _SQL($strSQL);
$tabl_result = mysq l_fetch_array($resultat);
if ($tabl_result['Titre' ] == 'Nos femelles'){
$race = "";
} else {
$race = $tabl_result['Titre'];
}
$content = "<h1>Test pour gestion multiraces&n bsp;- femelles ".$race." </h1>
<TABLE WIDTH=100% ALIGN='CENTER'><TR><TD align='center'>\n";
if ($race == '') {
$content .= "Vous trouverez ici&n bsp;la liste des reproducteurs présents à l'él evage<br /><br />Choisissez la race";
} else {
$result = mysql_query("SELECT * FROM elev_reproducte urs WHERE reprod_race='$race' AND reprod_sexe='F'&nbs p;AND reprod_present='O' ORDER BY reprod_nom") or  ;die(mysql_error());
if (mysql_num_rows($result) > 0)
{
$content .= "<ta ble id = 'tableau' width = '100%' border&nbs p;rules = 'rows' align = 'center'><tr heigh t = '40'><th align = 'center'>Photos</th&g t;<th align = 'center' width = '22%'>Nom&nb sp;& Affixe</th><th align='center' width='8%'>Nà ©e le</th><th align='center' width='20%'>Père</t h><th align='center' width='20%'>Mère</th><th  ;align='center' width='25%'>Producteur</th></tr>";
while (list($reprod_id,& nbsp;$reprod_nom, $reprod_affixe, $reprod_affixeplace, $reprod_r ace, $reprod_variete, $reprod_poil, $reprod_couleur, $repro d_taille, $reprod_poids, $reprod_sexe,$reprod_naissance, $reprod _deces, $reprod_identification, $reprod_present, $reprod_pere_id , $reprod_mere_id, $reprod_producteur_id, $reprod_photos) = mysql_fetch_row($result))
{
  ;$content .= "<tr><td align = 'center' h eight = '80'>";
if&nb sp;($reprod_photos) {
  ; $content .= "
  ; <div class=\"thumb\">
  ; <a href=\"#\">
  ; <img src=\"./photos/".$reprod_photos."\" width= \"80\" border=\"0\" style=\"cursor:pointer\" />
  ; </a>
  ; </div>
  ; ";
}
$cont ent .= "</td>";
$cont ent .= "<td align = 'center' height =&nbs p;'80'>";
//&nb sp;Nom et affixe
if&nb sp;($reprod_affixeplace == 'B') {
  ; $content .= "<a href='#' !oncli ck!='OuvrePopup()'>".$reprod_affixe." ".$reprod_nom."</a>";
}&nbs p;else {
  ; $content .= "<a href='#' !oncli ck!='OuvrePopup()'>".$reprod_nom." ".$reprod_affixe."</a>"; & nbsp;
}
$cont ent .= "</td>";
Message édité par : PhilGuen / 13-01-2011 09:34
Cet article provient de NPDS REvolution 16
https://lab.grottes-et-karsts-de-chine.org/viewtopic.php?topic=25002&forum=5