Calque et php

marcoeea Messages postés 8 Date d'inscription mercredi 20 septembre 2006 Statut Membre Dernière intervention 11 octobre 2006 - 11 oct. 2006 à 00:02
marcoeea Messages postés 8 Date d'inscription mercredi 20 septembre 2006 Statut Membre Dernière intervention 11 octobre 2006 - 11 oct. 2006 à 18:42
bonjour,

je voudrais afficher ou masquer un calque en fonction d'une information que je reçoie par méthode GET sur ma page; par exemple

Videotheque.php?ChoixFilm=2&Submit=Envoyer

le problème : je ne réussis pas du tout à changer les propriétés du calque pour l'afficher ou le masquer ; par exemple en faisant :

>Liste Films

avec $choixstyle="visibilty:hidden"; ne fonctionne pas.

Avez-vous d'autres idées? en javascript ou autre

Merci beaucoup

8 réponses

cs_bultez Messages postés 13615 Date d'inscription jeudi 13 février 2003 Statut Membre Dernière intervention 15 octobre 2013 30
11 oct. 2006 à 07:21
Bonjour,
   et avec ça :
">Liste Films
?
<hr />
            Cordialement    Bul    [mon Site]    [M'écrire]
<hr />
0
marcoeea Messages postés 8 Date d'inscription mercredi 20 septembre 2006 Statut Membre Dernière intervention 11 octobre 2006
11 oct. 2006 à 10:07
    Non, ce n'est pas ça. L'erreur de frappe est venue pendant l'écriture du message.

Ce qui ne va pas, c'est le fait de mettre du code php dans la partie STYLE  (style="<?php echo $choixstyle;?>". Dreamweaver, dans ce cas, ne semble pas reconnaitre le code php.

Existe t'il un moyen de faire autrement.

Merci encore
0
cs_bultez Messages postés 13615 Date d'inscription jeudi 13 février 2003 Statut Membre Dernière intervention 15 octobre 2013 30
11 oct. 2006 à 10:20
>>Ce qui ne va pas, c'est le fait de mettre du code php dans la partie STYLE

si, si... ça ça baigne,  heureusement.

mais donnes nous donc   un extrait de la page générée.

car ce qui suit fonctionne   :

<?php
$choixstyle= 'visibility:hidden'; /* ou visible ! */
?>

">Liste Films

par exemple

<hr />
            Cordialement    Bul    [
mon Site
]    [
=Bul
M'écrire

]
<hr />
0
marcoeea Messages postés 8 Date d'inscription mercredi 20 septembre 2006 Statut Membre Dernière intervention 11 octobre 2006
11 oct. 2006 à 10:53
Salut, 

 Bon voilà ce que je fais :

en début de page , je récupère l'information voulue en php :

if (isset($_GET['ChoixFilm'])) { 
    $choixfilm = $_GET['ChoixFilm'] ;
    $choix = 1;                  
    $selection_url=sprintf("Videotheque_Imprime_Selection.php?Choix=1&Numero=%s",$choixfilm);
    $hauteur = 500;
    $largeur = 760;
 }
if (isset($_GET['ChoixPersonnalite'])) { 
    $choixpersonnalite = $_GET['ChoixPersonnalite'] ;
    $choix = 2;
    $selection_url=sprintf("Videotheque_Imprime_Selection.php?Choix=2&Numero=%s",$choixpersonnalite);
    $hauteur = 250;
    $largeur = 750;
}
 (j'ai comme ça 6 choix possibles)

puis au début de la page proprement dite, j'essaie de choisir le calque que je veux afficher :

<?php switch ($choix) {
case 1 : $choixstyle='visibilty:visible'; //essai sur un seul calque pour l'instant
         echo "bonjour" // pour le test simplement;?>
<?
break;
case 2 :
break;
case 3 :
break;
case 4 :
break;
case 5 :
break;
case 6 :
break;
}
?>

enfin pour le calque voulu :

avec
">Liste Films
// ca ne fonctionne pas

avec
">Liste Films
// le code php est reconnu en rajoutant un espace mais ça ne fonctionne toujours pas, le calque n'apparait pas.

Remarque :
dans la déclaration des "styles CSS", j'ai mis :
#ListeFilm {
    position:absolute;
    left:236px;
    top:114px;
    width:747px;
    height:786px;
    z-index:8;
    background-color: #CCCCFF;
    visibility: hidden;
}

Est ce ça peut poser un problème???

Merci et Cordialement
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
cs_bultez Messages postés 13615 Date d'inscription jeudi 13 février 2003 Statut Membre Dernière intervention 15 octobre 2013 30
11 oct. 2006 à 11:16
      pas simple de te répondre avec uniquement
                  des petits bouts de PHP.

donnes nous   soit la page html résultante ( enfin un extrait ! petit ! )
                        soit une adresse où voir.
<hr />
            Cordialement       Bul       [mon Site]       [M'écrire]
<hr />
0
marcoeea Messages postés 8 Date d'inscription mercredi 20 septembre 2006 Statut Membre Dernière intervention 11 octobre 2006
11 oct. 2006 à 11:37
voici le code complet, j'espère qu'il pourra t'aider. Pour l'instant, je ne suis référencé nulle part.

    <?php require_once('../Connections/Videotheque.php'); ?>
<?php
    $hauteur = 0;
    $largeur = 0;
$choix = 0;
$choixfilm = 0;
$choixpersonnalite = 0;
$selection_url='';
$lance_url='';

if (!function_exists("GetSQLValueString")) {function GetSQLValueString($theValue, $theType, $theDefinedValue "", $theNotDefinedValue "")
{
  $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;
}
}

if (isset($_GET['ChoixFilm'])) { 
    $choixfilm = $_GET['ChoixFilm'] ;
    $choix = 1;                  
    $selection_url=sprintf("Videotheque_Imprime_Selection.php?Choix=1&Numero=%s",$choixfilm);
    $hauteur = 500;
    $largeur = 760;
 }
if (isset($_GET['ChoixPersonnalite'])) { 
    $choixpersonnalite = $_GET['ChoixPersonnalite'] ;
    $choix = 2;
    $selection_url=sprintf("Videotheque_Imprime_Selection.php?Choix=2&Numero=%s",$choixpersonnalite);
    $hauteur = 250;
    $largeur = 750;
}

if (isset($_GET['ChoixGenre'])) { 
    $choixgenre = $_GET['ChoixGenre'] ;
    $choix = 3;
}
if (isset($_GET['ChoixRealisateur'])) { 
    $choixrealisateur = $_GET['ChoixRealisateur'] ;
    $choix = 4;
}
if (isset($_GET['ChoixScenariste'])) { 
    $choixscenariste = $_GET['ChoixScenariste'] ;
    $choix = 5;
}
if (isset($_GET['ChoixProduction'])) { 
    $choixproduction = $_GET['ChoixProduction'] ;
    $choix = 6;
}

mysql_select_db($database_Videotheque, $Videotheque);
$query_ListeFilm = "SELECT NumFilm, Titre,Annee,Heures,Minutes FROM principal ORDER BY Titre ASC";
$ListeFilm = mysql_query($query_ListeFilm, $Videotheque) or die(mysql_error());
$row_ListeFilm = mysql_fetch_assoc($ListeFilm);
$totalRows_ListeFilm = mysql_num_rows($ListeFilm);

mysql_select_db($database_Videotheque, $Videotheque);
$query_ListeFilm_Stats = "SELECT NumFilm, Titre,Annee,Heures,Minutes FROM principal ORDER BY Titre ASC";
$ListeFilm_Stats = mysql_query($query_ListeFilm_Stats, $Videotheque) or die(mysql_error());
$row_ListeFilm_Stats = mysql_fetch_assoc($ListeFilm_Stats);
$totalRows_ListeFilm_Stats = mysql_num_rows($ListeFilm_Stats);

$Annee_Stats = $row_ListeFilm_Stats['Annee'];
$Heures_Stats = $row_ListeFilm_Stats['Heures'];
$Minutes_Stats = $row_ListeFilm_Stats['Minutes'];
$FilmVieux = $row_ListeFilm_Stats['Annee'];
$NumFilmVieux = $row_ListeFilm_Stats['NumFilm'];
$FilmLong = $Minutes_Stats + 60 * $Heures_Stats;
$NumFilmLong = $row_ListeFilm_Stats['NumFilm'];
while ($row_ListeFilm_Stats = mysql_fetch_assoc($ListeFilm_Stats)) {
    $Annee_Stats += $row_ListeFilm_Stats['Annee'];
    $Heures_Stats += $row_ListeFilm_Stats['Heures'];
    $Minutes_Stats += $row_ListeFilm_Stats['Minutes'];
    $Test_Temps = $Minutes_Stats + 60 * $Heures_Stats;
    if ($FilmVieux > $row_ListeFilm_Stats['Annee']) {
            $FilmVieux = $row_ListeFilm_Stats['Annee'];
            $NumFilmVieux = $row_ListeFilm_Stats['NumFilm'];
    }
    if ($FilmLong > $Test_Temps) {
            $FilmLong = $Test_Temps;
            $NumFilmLong = $row_ListeFilm_Stats['NumFilm'];
    }
 }
$Annee_Stats = (int)($Annee_Stats / $totalRows_ListeFilm_Stats) ;
$Temps_Total = (60 * $Heures_Stats + $Minutes_Stats)/$totalRows_ListeFilm_Stats;
$Heure_Moyenne = (int)($Temps_Total / 60);
$Minutes_Moyenne = (int)($Temps_Total - 60 * $Heure_Moyenne);

mysql_select_db($database_Videotheque, $Videotheque);
$query_ListePersonnalite = "SELECT NumPersonnalite, Nom, Prenom FROM personnalite ORDER BY Nom ASC";
$ListePersonnalite = mysql_query($query_ListePersonnalite, $Videotheque) or die(mysql_error());
$row_ListePersonnalite = mysql_fetch_assoc($ListePersonnalite);
$totalRows_ListePersonnalite = mysql_num_rows($ListePersonnalite);
mysql_select_db($database_Videotheque, $Videotheque);$query_ListeComedien "SELECT NumPersonnalite, Nom, Prenom FROM personnalite WHERE NumFonction 1 ORDER BY Nom ASC";
$ListeComedien = mysql_query($query_ListeComedien, $Videotheque) or die(mysql_error());
$row_ListeComedien = mysql_fetch_assoc($ListeComedien);
$totalRows_ListeComedien = mysql_num_rows($ListeComedien);

mysql_select_db($database_Videotheque, $Videotheque);$query_ListeRealisateur "SELECT NumPersonnalite, Nom, Prenom FROM personnalite WHERE NumFonction 2 OR NumFonction = 5 ORDER BY Nom ASC";
$ListeRealisateur = mysql_query($query_ListeRealisateur, $Videotheque) or die(mysql_error());
$row_ListeRealisateur = mysql_fetch_assoc($ListeRealisateur);
$totalRows_ListeRealisateur = mysql_num_rows($ListeRealisateur);

mysql_select_db($database_Videotheque, $Videotheque);$query_ListeScenariste "SELECT NumPersonnalite, Nom, Prenom FROM personnalite WHERE NumFonction 3 OR NumFonction = 5 ORDER BY Nom ASC";
$ListeScenariste = mysql_query($query_ListeScenariste, $Videotheque) or die(mysql_error());
$row_ListeScenariste = mysql_fetch_assoc($ListeScenariste);
$totalRows_ListeScenariste = mysql_num_rows($ListeScenariste);

mysql_select_db($database_Videotheque, $Videotheque);$query_ListeProducteur "SELECT NumPersonnalite, Nom, Prenom FROM personnalite WHERE NumFonction 4 ORDER BY Nom ASC";
$ListeProducteur = mysql_query($query_ListeProducteur, $Videotheque) or die(mysql_error());
$row_ListeProducteur = mysql_fetch_assoc($ListeProducteur);
$totalRows_ListeProducteur = mysql_num_rows($ListeProducteur);

do {
$choix_acteur = mt_rand(0, $totalRows_ListePersonnalite);
$query_ActeurAleatoire = sprintf("SELECT * from personnalite WHERE NumPersonnalite=%s AND NumFonction = 1",$choix_acteur);
$ActeurAleatoire = mysql_query($query_ActeurAleatoire,$Videotheque);
$row_ActeurAleatoire = mysql_fetch_assoc($ActeurAleatoire);
$totalRows_ActeurAleatoire = mysql_num_rows($ActeurAleatoire);
} while ($totalRows_ActeurAleatoire == 0);

do {
$choix_album = mt_rand(0, $totalRows_ListeFilm);$query_FilmAleatoire sprintf("SELECT principal.NumFilm,principal.Jaquette,principal.Annee,principal.Heures,principal.Minutes,principal.Titre,principal.NumNationalite1,principal.NumNationalite2,principal.NumFormat,genre.NumGenre,genre.Genre from principal,genre WHERE principal.NumFilm %s AND principal.NumGenre = genre.NumGenre",$choix_album);
$FilmAleatoire = mysql_query($query_FilmAleatoire,$Videotheque);
$row_FilmAleatoire = mysql_fetch_assoc($FilmAleatoire);
$totalRows_FilmAleatoire = mysql_num_rows($FilmAleatoire);
} while ($totalRows_FilmAleatoire == 0);
$query_SelectFilmVieux sprintf("SELECT principal.NumFilm,principal.Jaquette,principal.Annee,principal.Heures,principal.Minutes,principal.Titre,principal.NumNationalite1,principal.NumNationalite2,principal.NumFormat,genre.NumGenre,genre.Genre from principal,genre WHERE principal.NumFilm %s AND principal.NumGenre = genre.NumGenre",$NumFilmVieux);
$SelectFilmVieux = mysql_query($query_SelectFilmVieux,$Videotheque);
$row_SelectFilmVieux = mysql_fetch_assoc($SelectFilmVieux);
$totalRows_SelectFilmVieux = mysql_num_rows($SelectFilmVieux);$query_SelectFilmLong sprintf("SELECT principal.NumFilm,principal.Jaquette,principal.Annee,principal.Heures,principal.Minutes,principal.Titre,principal.NumNationalite1,principal.NumNationalite2,principal.NumFormat,genre.NumGenre,genre.Genre from principal,genre WHERE principal.NumFilm %s AND principal.NumGenre = genre.NumGenre",$NumFilmLong);
$SelectFilmLong = mysql_query($query_SelectFilmLong,$Videotheque);
$row_SelectFilmLong  = mysql_fetch_assoc($SelectFilmLong);
$totalRows_SelectFilmLong = mysql_num_rows($SelectFilmLong);

mysql_select_db($database_Videotheque, $Videotheque);
$query_VideoGenre = "SELECT * FROM genre ORDER BY Genre ASC";
$VideoGenre = mysql_query($query_VideoGenre, $Videotheque) or die(mysql_error());
$row_VideoGenre = mysql_fetch_assoc($VideoGenre);
$totalRows_VideoGenre = mysql_num_rows($VideoGenre);

mysql_select_db($database_Videotheque, $Videotheque);$query_VideoRealisateur "SELECT NumPersonnalite,Nom, Prenom FROM personnalite WHERE NumFonction 2 OR NumFonction = 5 ORDER BY Nom ASC";
$VideoRealisateur = mysql_query($query_VideoRealisateur, $Videotheque) or die(mysql_error());
$row_VideoRealisateur = mysql_fetch_assoc($VideoRealisateur);
$totalRows_VideoRealisateur = mysql_num_rows($VideoRealisateur);

mysql_select_db($database_Videotheque, $Videotheque);$query_VideoScenariste "SELECT NumPersonnalite, Nom, Prenom FROM personnalite WHERE NumFonction 3 OR NumFonction = 5 ORDER BY Nom ASC";
$VideoScenariste = mysql_query($query_VideoScenariste, $Videotheque) or die(mysql_error());
$row_VideoScenariste = mysql_fetch_assoc($VideoScenariste);
$totalRows_VideoScenariste = mysql_num_rows($VideoScenariste);

mysql_select_db($database_Videotheque, $Videotheque);
$query_VideoProduction = "SELECT * FROM production ORDER BY Production ASC";
$VideoProduction = mysql_query($query_VideoProduction, $Videotheque) or die(mysql_error());
$row_VideoProduction = mysql_fetch_assoc($VideoProduction);
$totalRows_VideoProduction = mysql_num_rows($VideoProduction);

function Affichage($valeur) {
    $valeur ="/jaquettes/Video/Affiches/".$valeur;
    return $valeur; }
function Affichageflags($valeur) {
    $valeur ="/Jaquettes/Video/Drapeaux/".$valeur;
    return $valeur; }
function AffichagePhoto($valeur) {
    $valeur ="/jaquettes/Video/Photos/".$valeur;
    return $valeur; }
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Videotheque.gif</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i', '_blank','width=<?php echo $largeur;?>,height=<?php echo $hauteur;?>,menubar=yes,scrollbars=yes, resizable = yes');");
  mm_menu_0927234250_1.addMenuItem("Par&nbsp;Acteur");
  mm_menu_0927234250_1.addMenuItem("Par&nbsp;Film");
  mm_menu_0927234250_1.addMenuItem("Par&nbsp;Genre");
  mm_menu_0927234250_1.addMenuItem("Par&nbsp;Sc&eacute;nariste");
  mm_menu_0927234250_1.addMenuItem("Par&nbsp;R&eacute;alisateur");
   mm_menu_0927234250_1.bgImageUp="images/mmmenu2_156x20_up.gif";
   mm_menu_0927234250_1.bgImageOver="images/mmmenu2_156x20_over.gif";
   mm_menu_0927234250_1.fontWeight="bold";
   mm_menu_0927234250_1.hideOnMouseOut=true;
   mm_menu_0927234250_1.bgColor='#ffff00';
  window.mm_menu_0927234354_2 = new Menu("root",156,20,"Verdana, Arial, Helvetica, sans-serif",10,"#ffffff","#ff0000","#333333","#ffff99","center","middle",3,0,650,-5,7,true,false,true,0,false,true);
  mm_menu_0927234354_2.addMenuItem("Par&nbsp;Ann&eacute;e","window.open('Videoscope.php?choix=1','_blank');");
  mm_menu_0927234354_2.addMenuItem("Par&nbsp;Film","window.open('Videoscope.php?choix=2', '_blank');");
  mm_menu_0927234354_2.addMenuItem("Par&nbsp;Distributeur","window.open('Videoscope.php?choix=3', '_blank');");
  mm_menu_0927234354_2.addMenuItem("Par&nbsp;R&eacute;alisateur","window.open('Videoscope.php?choix=4', '_blank');");
  mm_menu_0927234354_2.addMenuItem("Les&nbsp;Acteurs","window.open('Videoscope.php?choix=5', '_blank');");
   mm_menu_0927234354_2.bgImageUp="images/mmmenu1_156x20_up.gif";
   mm_menu_0927234354_2.bgImageOver="images/mmmenu1_156x20_over.gif";
   mm_menu_0927234354_2.fontWeight="bold";
   mm_menu_0927234354_2.hideOnMouseOut=true;
   mm_menu_0927234354_2.bgColor='#ffff00';

  mm_menu_0927234354_2.writeMenus();
} // mmLoadMenus()

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

//-->
</script>
<script language="JavaScript1.2" type="text/javascript" src="mm_menu.js"></script>
<style type="text/css">
<!--
.Style1 {
    color: #FFFFFF;
    font-family: "Eras Ult BT";
    font-size: 20px;
}
.Style2 {
    font-family: Arial, Helvetica, sans-serif;
    color: #CCCCCC;
    font-size: 14px;
    font-weight: bold;
    font-style: italic;
}
.Style3 {
    font-family: "Bauhaus 93";
    color: #000000;
    font-weight: bold;
}
.Style8 {font-style: italic; font-family: Arial, Helvetica, sans-serif; font-size: 14px;}
.Style11 {
    font-size: 14px;
    font-weight: bold;
    font-family: Arial, Helvetica, sans-serif;
    font-style: italic;
}
#Genre {
    position:absolute;
    left:993px;
    top:74px;
    width:255px;
    height:303px;
    z-index:1;
    background-color: #CCCCCC;
    visibility: hidden;
}
#Genre {
    border: medium outset #CCCCCC;
}
#Genre select {
    background-color: #CCCCCC;
    width: 250px;
}
#Realisateur {
    position:absolute;
    left:993px;
    top:74px;
    width:255px;
    height:303px;
    z-index:2;
    background-color: #CCCCCC;
    visibility: hidden;
}
#Realisateur select {
    background-color: #CCCCCC;
    width: 250px;
}
#Realisateur {
    border: medium outset #CCCCCC;
}
#Scenariste {
    position:absolute;
    left:994px;
    top:73px;
    width:262px;
    height:309px;
    z-index:3;
    background-color: #CCCCCC;
    visibility: hidden;
}
#Scenariste form {
    background-color: #CCCCCC;
    width: 250px;
}
#Scenariste {
    height: 303px;
    width: 255px;
    border-top-style: outset;
    border-right-style: outset;
    border-bottom-style: outset;
    border-left-style: outset;
    border-top-color: #CCCCCC;
    border-right-color: #CCCCCC;
    border-bottom-color: #CCCCCC;
    border-left-color: #CCCCCC;
    background-color: #CCCCCC;
}
#Scenariste select {
    background-color: #CCCCCC;
    width: 250px;
}
#Layer1 {
    position:absolute;
    left:862px;
    top:65px;
    width:261px;
    height:313px;
    z-index:4;
    background-color: #CCCCCC;
}
#Layer2 {
    position:absolute;
    left:414px;
    top:209px;
    width:1px;
    height:1px;
    z-index:4;
}
#Production {
    position:absolute;
    left:565px;
    top:158px;
    width:323px;
    height:224px;
    z-index:4;
    background-color: #CCCCCC;
    visibility: hidden;
}
#Production {
    left: 993px;
    top: 74px;
    height: 303px;
    width: 255px;
    border-top-style: outset;
    border-right-style: outset;
    border-bottom-style: outset;
    border-left-style: outset;
}
#Production select {
    background-color: #CCCCCC;
    width: 250px;
}
.ListeFilm {
    background-color: #000000;
    width: 220px;
    color: #FFFFFF;
    border-top-color: #000000;
    border-right-color: #000000;
    border-bottom-color: #000000;
    border-left-color: #000000;
    border-top-style: none;
    border-right-style: none;
    border-bottom-style: none;
    border-left-style: none;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
}
.ListePersonne {
    background-color: #000000;
    width: 220px;
    border-top-style: none;
    border-right-style: none;
    border-bottom-style: none;
    border-left-style: none;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    color: #FFFFFF;
}
body {
    background-color: #000000;
}
.Style12 {
    color: #FFFF00;
    font-family: "LED BOARD REVERSED";
    font-size: 9px;
}
.Style13 {
    font-family: "Raspoutine Classic";
    font-size: 12px;
    color: #FF9900;
}
#ListeGenre {
    position:absolute;
    left:242px;
    top:117px;
    width:747px;
    height:783px;
    z-index:5;
    background-color: #C6CBD4;
    visibility: hidden;
}
#ListeRealisateur {
    position:absolute;
    left:243px;
    top:116px;
    width:745px;
    height:784px;
    z-index:6;
    background-color: #FFCCFF;
    visibility: hidden;
}
#ListeScenariste {
    position:absolute;
    left:239px;
    top:117px;
    width:746px;
    height:785px;
    z-index:7;
    background-color: #FFFFCC;
    visibility: hidden;
}
#ListeFilm {
    position:absolute;
    left:236px;
    top:114px;
    width:747px;
    height:786px;
    z-index:8;
    background-color: #CCCCFF;
    visibility: hidden;
}
#ListeActeur {
    position:absolute;
    left:234px;
    top:112px;
    width:749px;
    height:788px;
    z-index:9;
    background-color: #CC99FF;
    visibility: hidden;
}
.Style14 {color: #FF0000}
.Style15 {color: #FF00FF}
-->
</style>
<script src="../scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>

<?php switch ($choix) {
case 1 : $choixstyle="visibilty:visible";
         echo "bonjour";?>
<?
break;
case 2 :
break;
case 3 :
break;
case 4 :
break;
case 5 :
break;
case 6 :
break;
}
?>

      ----

      Les Genres de Film,
      ,
   
    ----

      <form name="form3" method="get" action="">
       

          <select name="ChoixGenre" size="13">
            <?php
do { 
?>
            <option value="<?php echo $row_VideoGenre['NumGenre']?>"><?php echo $row_VideoGenre['Genre']?></option>
            <?php
} while ($row_VideoGenre = mysql_fetch_assoc($VideoGenre));
  $rows = mysql_num_rows($VideoGenre);
  if($rows > 0) {
      mysql_data_seek($VideoGenre, 0);
      $row_VideoGenre = mysql_fetch_assoc($VideoGenre);
  }
?>
          </select>
         

         
         

      </form>
     ,
   
 

      ----

      Les R&eacute;alisateurs,
      ,
   
    ----

      <form name="form3" method="get" action="">
       

          <select name="ChoixRealisateur" size="13">
            <?php
do { 
?>
            <option value="<?php echo $row_VideoRealisateur['NumPersonnalite']?>"><?php echo $row_VideoRealisateur['Nom'],' ',$row_VideoRealisateur['Prenom']?></option>
            <?php
} while ($row_VideoRealisateur = mysql_fetch_assoc($VideoRealisateur));
  $rows = mysql_num_rows($VideoRealisateur);
  if($rows > 0) {
      mysql_data_seek($VideoRealisateur, 0);
      $row_VideoRealisateur = mysql_fetch_assoc($VideoRealisateur);
  }
?>
          </select>
         

         
         

      </form>     ,
   
 

      ----

      Les Sc&eacute;naristes,
      ,
   
    ----

      <form name="form3" method="get" action="">
       

          <select name="ChoixScenariste" size="13">
            <?php
do { 
?>
            <option value="<?php echo $row_VideoScenariste['NumPersonnalite']?>"><?php echo $row_VideoScenariste['Nom'],' ',$row_VideoScenariste['Prenom']?></option>
            <?php
} while ($row_VideoScenariste = mysql_fetch_assoc($VideoScenariste));
  $rows = mysql_num_rows($VideoScenariste);
  if($rows > 0) {
      mysql_data_seek($VideoScenariste, 0);
      $row_VideoScenariste = mysql_fetch_assoc($VideoScenariste);
  }
?>
          </select>
         

         
         

      </form>     ,
   
 

        Les Productions,
      ,
   
   <form name=\"form3\" method=\"get\" action=\"\"> ----

    ----

      <select name="ChoixProduction" size="13">
        <?php
do { 
?>
        <option value="<?php echo $row_VideoProduction['NumProduction']?>"><?php echo $row_VideoProduction['Production'];?></option>
        <?php
} while ($row_VideoProduction = mysql_fetch_assoc($VideoProduction));
  $rows = mysql_num_rows($VideoProduction);
  if($rows > 0) {
      mysql_data_seek($VideoProduction, 0);
      $row_VideoProduction = mysql_fetch_assoc($VideoProduction);
  }
      $lance_url = sprintf('Videotheque.php?ChoixProduction=6&Submit=Envoyer');
?>
      </select>
,
   
    </form>
 

Liste des Films d'un genre

Liste des Films d'un R&eacute;alisateur

SListe des Films d'un Scenariste

">Liste Films

Acteur

<script language="JavaScript1.2">mmLoadMenus();</script>

  <!--DWLayoutTable-->
<!-- fwtable fwsrc=\"Videotheque_vide.png\" fwbase=\"Videotheque.gif\" fwstyle=\"Dreamweaver\" fwdocid = \"742308039\" fwnested=\"0\" -->
  ----

   ,
   ,
   ,
   ,
   ,
   ,
   ,
   ,
   ,
   ,
   ,
   ,
   ,
   ,
   ,
   ,
   ,
   ,
   ,
   ,
   ,
   ,
   ,
   ,
 

  ----

   <script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','width','210','height','50','src','flash/Médiatheque','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','flash/Médiatheque' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="210" height="50">
    
    
    
   </object></noscript>,
   ,
   <!--DWLayoutEmptyCell-->&nbsp;,
   ,
   <!--DWLayoutEmptyCell-->&nbsp;,
   <!--DWLayoutEmptyCell-->&nbsp;,
   ,
 
  ----

   ,
   ,
 
  ----

   ,
   ,
   ,
   ,
   ,
 
  ----

   ,
   ,
 
  ----

   ,
   ,
   ,
   ,
   ,
 
  ----

   ,
   ,
 
  ----

   ,
   ,
   <!--DWLayoutEmptyCell-->&nbsp;,
   ,
   ,
   ,
 
  ----

   ,
   ,
   ,
   ,
 
  ----

   ,
   ,
   ,
   Recherche,
   <form name="form1" method="post" action="">
    
    
   </form>  ,
   ,
   ,
 
  ----

   <?php echo $totalRows_ListeFilm?>,
   ,
   Films,
   ,
 
  ----

   ,
   ,
   ,
   ,
 
  ----

   <!--DWLayoutEmptyCell-->&nbsp;,
   <?php echo $totalRows_ListeComedien?>,
   ,
   Acteurs,
   ,
 
  ----

   ,
   <?php echo $choix;?>,
   &nbsp;,
   ,
 
  ----

   <?php echo $totalRows_ListeRealisateur?>,
   ,
   R&eacute;alisateurs,
   ,
 
  ----

   ,
   ,
   ,
 
  ----

   <?php echo $totalRows_ListeScenariste?>,
   &nbsp;,
   Sc&eacute;narites,
   ,
 
  ----

   <?php echo $totalRows_ListeProducteur?>,
   ,
   Productions,
   ,
 
  ----

   ,
   ,
   ,
 
  ----

   ,
   ,
 
  ----

   ,
   ,
   ,
   ,
 
  ----

   ,
   ,
 
  ----

   ,
   ,
   ,
   ,
 
  ----

   ,
   ,
 
  ----

   <form name="form1" method="get" action="">
    

      
         <select name="ChoixFilm" size="20" class="ListeFilm">
           <?php
do { 
?>
           <option value="<?php echo $row_ListeFilm['NumFilm']?>"><?php echo $row_ListeFilm['Titre']?></option>
           <?php
} while ($row_ListeFilm = mysql_fetch_assoc($ListeFilm));
  $rows = mysql_num_rows($ListeFilm);
  if($rows > 0) {
      mysql_data_seek($ListeFilm, 0);
      $row_ListeFilm = mysql_fetch_assoc($ListeFilm);
  }
?>
         </select>
      

      
        
        

    

   </form>,
   ,
 
  ----

   ,
 
  ----

   Ann&eacute;e Moyenne,
   <?php echo $Annee_Stats;?>,
   ,
 
  ----

   Dur&eacute;e Moyenne,
   <?php echo $Heure_Moyenne," hrs ",$Minutes_Moyenne," mn";?>,
   ,
 
  ----

   ,
   ,
 
  ----

   ,
   ,
   ,
   ,
 
  ----

   ,
   ,
 
  ----

   ,
   Le Film du Moment,
   ,
   ,
 
  ----

   ,
   ,
 
  ----

   <?php $envoi_url =  sprintf ("Videotheque.php?ChoixFilm=%s",$row_FilmAleatoire['NumFilm']); ?>
   <form id="form7" name="form7" method="get" action="">
     " width="95" height="109" onClick="MM_goToURL('parent','<?php echo $envoi_url; ?>');return document.MM_returnValue"/>
   </form>,
   ,
  
     <?php $DureeAleatoire = 60*$row_FilmAleatoire['Heures'] + $row_FilmAleatoire['Minutes'];
                                                         echo $row_FilmAleatoire['Titre']; ?>
    

                                                   <?php echo $row_FilmAleatoire['Annee'],' / ',$DureeAleatoire,' mn'; ?>

                                                <?php echo $row_FilmAleatoire['Genre']; ?>

                                               

                                                       <?php
    mysql_select_db($database_Videotheque, $Videotheque);
$query_ChoixNationAleatoire = sprintf("SELECT * FROM nationalite WHERE NumNationalite=%s ",$row_FilmAleatoire['NumNationalite1']);
$ChoixNationAleatoire = mysql_query($query_ChoixNationAleatoire, $Videotheque) or die(mysql_error());
$row_ChoixNationAleatoire = mysql_fetch_assoc($ChoixNationAleatoire);
$totalRows_ChoixNationAleatoire = mysql_num_rows($ChoixNationAleatoire);
$flag = $row_ChoixNationAleatoire['Pays'].'.jpg';?>
      " width="30" height="21">
      <?php
if ($row_FilmAleatoire['NumNationalite2']!=1) {    mysql_select_db($database_Videotheque, $Videotheque);
$query_ChoixNationAleatoire = sprintf("SELECT * FROM nationalite WHERE NumNationalite=%s ",$row_FilmAleatoire['NumNationalite2']);
$ChoixNationAleatoire = mysql_query($query_ChoixNationAleatoire, $Videotheque) or die(mysql_error());
$row_ChoixNationAleatoire = mysql_fetch_assoc($ChoixNationAleatoire);
$totalRows_ChoixNationAleatoire = mysql_num_rows($ChoixNationAleatoire);
$flag = $row_ChoixNationAleatoire['Pays'].'.jpg';?>
      " width="30" height="21">
      <?php } ?>
      <?php
    mysql_select_db($database_Videotheque, $Videotheque);
$query_ChoixFormatAleatoire = sprintf("SELECT * FROM format WHERE NumFormat=%s ",$row_FilmAleatoire['NumFormat']);
$ChoixFormatAleatoire = mysql_query($query_ChoixFormatAleatoire, $Videotheque) or die(mysql_error());
$row_ChoixFormatAleatoire= mysql_fetch_assoc($ChoixFormatAleatoire);
$totalRows_ChoixFormatAleatoire = mysql_num_rows($ChoixFormatAleatoire);
$flag = $row_ChoixFormatAleatoire['Format'].'.jpg';?>
    " width="30" height="21">,
   ,
   ,
 
  ----

   ,
   ,
   ,
 
  ----

   ,
   ,
   ,
   ,
 
  ----

   ,
   ,
 
  ----

   ,
   L'Acteur / Actrice du Moment,
   ,
   ,
 
  ----

   ,
   ,
 
  ----

   <?php $envoi_url =  sprintf ("Videotheque.php?ChoixPersonnalite=%s",$row_ActeurAleatoire['NumPersonnalite']); ?>
   <form id="form7" name="form7" method="get" action="">
     " width="95" height="95" onClick="MM_goToURL('parent','<?php echo $envoi_url; ?>');return document.MM_returnValue"/>
   </form>,
   ,
        <?php  echo $row_ActeurAleatoire['Prenom']; ?>
    

     <?php  echo $row_ActeurAleatoire['Nom']; ?>
    

     <?php  if ($row_ActeurAleatoire['LieuNaissance'] != NULL) 
                                                            { echo 'N&eacute;(e) &agrave; ',$row_ActeurAleatoire['LieuNaissance']; } ?>
    

     <?php   if ($row_ActeurAleatoire['Annee'] != NULL) {
                                                                if ($row_ActeurAleatoire['MortEn'] != 0) {
                                                                    $Age = $row_ActeurAleatoire['MortEn']-$row_ActeurAleatoire['Annee'];
                                                                    echo "Mort &agrave; ",$Age," ans";}
                                                                else {
                                                                    $aujourdhui = getdate();
                                                                $Age = $aujourdhui['year'] - $row_ActeurAleatoire['Annee'];
                                                                echo $Age," Ans";}
                                                            }
                                                   
                                                     ?>
    

     <?php
    mysql_select_db($database_Videotheque, $Videotheque);
$query_ChoixNationAleatoire = sprintf("SELECT * FROM nationalite WHERE NumNationalite=%s ",$row_ActeurAleatoire['NumNationalite']);
$ChoixNationAleatoire = mysql_query($query_ChoixNationAleatoire, $Videotheque) or die(mysql_error());
$row_ChoixNationAleatoire = mysql_fetch_assoc($ChoixNationAleatoire);
$totalRows_ChoixNationAleatoire = mysql_num_rows($ChoixNationAleatoire);
$flag = $row_ChoixNationAleatoire['Pays'].'.jpg';?>
    " width="30" height="21"> ,
   ,
   ,
 
  ----

   ,
   ,
 
  ----

   <form name="ChoixPersonnalite" method="get" action="">
    

      
         <select name="ChoixPersonnalite" size="20" class="ListePersonne">
           <?php
do { 
?>
           <option value="<?php echo $row_ListePersonnalite['NumPersonnalite']?>"><?php echo $row_ListePersonnalite['Prenom']," ",$row_ListePersonnalite['Nom']?></option>
           <?php
} while ($row_ListePersonnalite = mysql_fetch_assoc($ListePersonnalite));
  $rows = mysql_num_rows($ListePersonnalite);
  if($rows > 0) {
      mysql_data_seek($ListePersonnalite, 0);
      $row_ListePersonnalite = mysql_fetch_assoc($ListePersonnalite);
  }
?>
         </select>
      

      
        
      

    

   </form>,
   ,
 
  ----

   ,
   ,
 
  ----

   ,
   ,
 
  ----

   ,
   ,
   ,
   ,
 
  ----

   ,
   ,
 
  ----

   ,
   Le Film le Plus Long,
   ,
   ,
 
  ----

   ,
   ,
 
  ----

   <?php $envoi_url =  sprintf ("Videotheque.php?ChoixFilm=%s",$row_SelectFilmLong['NumFilm']); ?>
   <form id="form7" name="form7" method="get" action="">
    " width="95" height="109" onclick="MM_goToURL('parent','<?php echo $envoi_url; ?>');return document.MM_returnValue"/>
   </form>,
   ,
  
     <?php $DureeSelectFilmLong = 60*$row_SelectFilmLong['Heures'] + $row_SelectFilmLong['Minutes'];
                                                         echo $row_SelectFilmLong['Titre']; ?>
    

     <?php echo $row_SelectFilmLong['Annee'],' / ',$DureeSelectFilmLong,' mn'; ?>

     <?php echo $row_SelectFilmLong['Genre']; ?>

    

     <?php
    mysql_select_db($database_Videotheque, $Videotheque);
$query_ChoixNationAleatoire = sprintf("SELECT * FROM nationalite WHERE NumNationalite=%s ",$row_SelectFilmLong['NumNationalite1']);
$ChoixNationAleatoire = mysql_query($query_ChoixNationAleatoire, $Videotheque) or die(mysql_error());
$row_ChoixNationAleatoire = mysql_fetch_assoc($ChoixNationAleatoire);
$totalRows_ChoixNationAleatoire = mysql_num_rows($ChoixNationAleatoire);
$flag = $row_ChoixNationAleatoire['Pays'].'.jpg';?>
     " width="30" height="21">
     <?php
if ($row_FilmAleatoire['NumNationalite2']!=1) {    mysql_select_db($database_Videotheque, $Videotheque);
$query_ChoixNationAleatoire = sprintf("SELECT * FROM nationalite WHERE NumNationalite=%s ",$row_SelectFilmLong['NumNationalite2']);
$ChoixNationAleatoire = mysql_query($query_ChoixNationAleatoire, $Videotheque) or die(mysql_error());
$row_ChoixNationAleatoire = mysql_fetch_assoc($ChoixNationAleatoire);
$totalRows_ChoixNationAleatoire = mysql_num_rows($ChoixNationAleatoire);
$flag = $row_ChoixNationAleatoire['Pays'].'.jpg';?>
     " width="30" height="21">
     <?php } ?>
     <?php
    mysql_select_db($database_Videotheque, $Videotheque);
$query_ChoixFormatAleatoire = sprintf("SELECT * FROM format WHERE NumFormat=%s ",$row_SelectFilmLong['NumFormat']);
$ChoixFormatAleatoire = mysql_query($query_ChoixFormatAleatoire, $Videotheque) or die(mysql_error());
$row_ChoixFormatAleatoire= mysql_fetch_assoc($ChoixFormatAleatoire);
$totalRows_ChoixFormatAleatoire = mysql_num_rows($ChoixFormatAleatoire);
$flag = $row_ChoixFormatAleatoire['Format'].'.jpg';?>
     " width="30" height="21">,
   ,
   ,
 
  ----

   ,
   ,
   ,
 
  ----

   ,
   ,
   ,
   ,
 
  ----

   ,
   ,
 
  ----

   ,
   Le Film le Plus Vieux,
   ,
   ,
 
  ----

   ,
   ,
 
  ----

   <?php $envoi_url =  sprintf ("Videotheque.php?ChoixFilm=%s",$row_SelectFilmVieux['NumFilm']); ?>
   <form id="form7" name="form7" method="get" action="">
    " width="95" height="109" onclick="MM_goToURL('parent','<?php echo $envoi_url; ?>');return document.MM_returnValue"/>
   </form>,
   ,
        <?php $DureeSelectFilmVieux = 60*$row_SelectFilmVieux['Heures'] + $row_SelectFilmVieux['Minutes'];
                                                         echo $row_SelectFilmVieux['Titre']; ?>
    

     <?php echo $row_SelectFilmVieux['Annee'],' / ',$DureeSelectFilmVieux,' mn'; ?>

     <?php echo $row_SelectFilmVieux['Genre']; ?>

    

     <?php
    mysql_select_db($database_Videotheque, $Videotheque);
$query_ChoixNationAleatoire = sprintf("SELECT * FROM nationalite WHERE NumNationalite=%s ",$row_SelectFilmVieux['NumNationalite1']);
$ChoixNationAleatoire = mysql_query($query_ChoixNationAleatoire, $Videotheque) or die(mysql_error());
$row_ChoixNationAleatoire = mysql_fetch_assoc($ChoixNationAleatoire);
$totalRows_ChoixNationAleatoire = mysql_num_rows($ChoixNationAleatoire);
$flag = $row_ChoixNationAleatoire['Pays'].'.jpg';?>
     " width="30" height="21">
     <?php
if ($row_FilmAleatoire['NumNationalite2']!=1) {    mysql_select_db($database_Videotheque, $Videotheque);
$query_ChoixNationAleatoire = sprintf("SELECT * FROM nationalite WHERE NumNationalite=%s ",$row_SelectFilmVieux['NumNationalite2']);
$ChoixNationAleatoire = mysql_query($query_ChoixNationAleatoire, $Videotheque) or die(mysql_error());
$row_ChoixNationAleatoire = mysql_fetch_assoc($ChoixNationAleatoire);
$totalRows_ChoixNationAleatoire = mysql_num_rows($ChoixNationAleatoire);
$flag = $row_ChoixNationAleatoire['Pays'].'.jpg';?>
     " width="30" height="21">
     <?php } ?>
     <?php
    mysql_select_db($database_Videotheque, $Videotheque);
$query_ChoixFormatAleatoire = sprintf("SELECT * FROM format WHERE NumFormat=%s ",$row_SelectFilmVieux['NumFormat']);
$ChoixFormatAleatoire = mysql_query($query_ChoixFormatAleatoire, $Videotheque) or die(mysql_error());
$row_ChoixFormatAleatoire= mysql_fetch_assoc($ChoixFormatAleatoire);
$totalRows_ChoixFormatAleatoire = mysql_num_rows($ChoixFormatAleatoire);
$flag = $row_ChoixFormatAleatoire['Format'].'.jpg';?>
     " width="30" height="21">,
   ,
   ,
 
  ----

   ,
   ,
 
  ----

   ,
   ,
 
  ----

   ,
   ,
 
  ----

   ,
   ,
 
  ----

   ,
   ,
   ,
   ,
 
  ----

   ,
   ,
 

</html>
<?php
mysql_free_result($VideoGenre);

mysql_free_result($VideoRealisateur);

mysql_free_result($VideoScenariste);

mysql_free_result($VideoProduction);
?>
0
cs_bultez Messages postés 13615 Date d'inscription jeudi 13 février 2003 Statut Membre Dernière intervention 15 octobre 2013 30
11 oct. 2006 à 11:58
>>



voici le code complet, j'espère qu'il pourra t'aider.


je me cite : donnes nous   ( enfin un extrait ! petit ! )
   c'est à dire les quelques lignes en cause du html/javascript générés et non pas le PHP
   ( je n'ai pas les include/require... et encore moins la base de données )
<hr />
            Cordialement       Bul       [
mon Site
]       [
M'écrire
]
<hr />
0
marcoeea Messages postés 8 Date d'inscription mercredi 20 septembre 2006 Statut Membre Dernière intervention 11 octobre 2006
11 oct. 2006 à 18:42
    En final, j'ai résolu le problème en ne mélangeant du php avec des styles en javascript formaté par dreamweaver.

Merci pour l'aide quand même.
0
Rejoignez-nous