Problème d'appel de fonction

Résolu/Fermé
Nanashi17 Messages postés 193 Date d'inscription mardi 28 mars 2017 Statut Membre Dernière intervention 19 juin 2017 - 8 juin 2017 à 16:18
Nanashi17 Messages postés 193 Date d'inscription mardi 28 mars 2017 Statut Membre Dernière intervention 19 juin 2017 - 13 juin 2017 à 09:35
Bonjour,

J'ai un problème d'appel de fonction dans mon code mais je n'arrive pas à savoir pourquoi ni d'où ça vient, ma console ne m'affiche rien.

Je vais vous expliquer l'architecture de mon code tout d'abord nous avons admin.php qui contient un simple menu qui nous emmène vers gestion.php mais en fonction du lien dans lequel on clique ça nous transfère soit vers gestionChamps.php (mais nous ne nous occuperons pas de ce fichier) soit il nous emmène vers gestionDemandes.php. Or dans gestionDemandes.php nous faisons appel à la fonction PageGestionDemande() qui est sensé m'afficher mes éléments sur ma page mais en l'occurrence il n'a y a rien sur ma page.

Voici mon code:
admin.php
  <tr>
            <td><div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><? echo "<a href=\"../../wp-admin/Plugin_ARPAE/Administration/gestion.php?numlien_ad=100\">"."Gestion études"."</a>" ?> | <? echo "<a href=\"../../wp-admin/Plugin_ARPAE/Administration/gestion.php?numlien_ad=101\">"."Gestion demandes"."</a>" ?></font></div></td>
          </tr>


lien_ad.php
<?php
$numlien_ad = @$_GET["numlien_ad"];
// On récupère la variable $numlien_ad (si register_globals à off)

switch ($numlien_ad)
//On vérifie le numéro de lien cliqué par l'utilisateur
{
   case 100 :
   $page = "../Inscriptions/gestionChamps.php";
   $title =  "Gestion des études";
   break; 
    
   case 101 :
   $page = "../Inscriptions/gestionDemandes.php";
   $title =  "Gestion des Demandes";
   break;
}
?>


gestion.php
<?php
error_reporting(E_ALL);
ini_set('display-errors','on');
require("../protec/passe/conf.php");
$db_link = mysqli_connect($sql_serveur,$sql_user,$sql_passwd,$sql_bdd);
if (!$db_link) {
    die('Erreur de connexion : ' . mysqli_connect_error());
}
// SELECTION DE L'ENREGISTREMENT CONTENANT L'ID EN COURS
//$requete=mysqli_query($db_link,"select * from $table where id=\"$id\"");

// SI L'ID N'EXISTE PAS
/*if(mysqli_num_rows($requete)==0){

	header("Location:$url_erreur");
}*/
require ("lien_ad.php"); 

?>



gestionDemandes.php
<?php
	require('adminFonctions.php');
	pageGestionDemandes(FALSE);
	
?>


adminFonctions.php
function pageGestionDemandes($utf8)
{
	echo"<div id=\"bureau\"  >";
	echo"</div>";
	echo"<div id=\"retourSelections\" >";
	echo"</div>";
	echo"<div id=\"fenetreColonnesDiv\">";
	echo"</div>";
	echo"<div id=\"fenetreFiltresDiv\">";
	echo"</div>";
	echo"<div id=\"launchBarDiv\">";
	echo"</div>";
	echo"<div id=\"sousTitreDiv\">";
	echo"</div>";
	echo"<div id=\"fenetreConfigDiv\">";
	echo"</div>";
	echo"<div id=\"fenetreSousConfigDiv\">";
	echo"</div>";
	echo"<table id=\"tableBas\">";
		echo"<tbody>";
			echo"<tr>";
				echo"<td>";
					echo"<div id=\"actionDiv\">";
					echo"</div>";
				echo"</td>";
			echo"</tr>";
			echo"<tr>";
				echo"<td>";
					echo"<div id=\"barreBasDiv\">";
					echo"</div>";
				echo"</td>";
			echo"</tr>";
		echo"</tbody>";
	echo"</table>";
}


Pouvez vous m'aider s'il vous plaît ? Merci d'avance.

A voir également:

4 réponses

Felice_ Messages postés 265 Date d'inscription mardi 25 avril 2017 Statut Membre Dernière intervention 20 juillet 2017 11
Modifié le 8 juin 2017 à 19:22
Bonjour,

Je ne me rappelle plus si le « switch » prend en compte le type, mais essai une fois ça :
$numlien_ad = (int) $_GET["numlien_ad"];


à la place de :
$numlien_ad = @$_GET["numlien_ad"];


Parce que la valeur de ton get est une chaîne de caractères pas un entier…
0
Nanashi17 Messages postés 193 Date d'inscription mardi 28 mars 2017 Statut Membre Dernière intervention 19 juin 2017 99
Modifié le 9 juin 2017 à 08:49
Ca n'a rien changé malheureusmeent :/
0
Nanashi17 Messages postés 193 Date d'inscription mardi 28 mars 2017 Statut Membre Dernière intervention 19 juin 2017 99
Modifié le 9 juin 2017 à 08:52
Je crois avoir détecter une partie de mon problème, mon fichier gestionDemande.php n'est pas chargé en entier, il ne manque que la partie PHP qui justement contient l'appel de ma fonction.

Le problème étant à présent comment faire pour prendre en compte la totalité du fichier ?
0
Felice_ Messages postés 265 Date d'inscription mardi 25 avril 2017 Statut Membre Dernière intervention 20 juillet 2017 11
Modifié le 9 juin 2017 à 09:50
Vous avez bien les balises php dans : adminFonctions.php ? :

<?php

function pageGestionDemandes($utf8)
{
 echo"<div id=\"bureau\"  >";
 echo"</div>";
 echo"<div id=\"retourSelections\" >";
 echo"</div>";
 echo"<div id=\"fenetreColonnesDiv\">";
 echo"</div>";
 echo"<div id=\"fenetreFiltresDiv\">";
 echo"</div>";
 echo"<div id=\"launchBarDiv\">";
 echo"</div>";
 echo"<div id=\"sousTitreDiv\">";
 echo"</div>";
 echo"<div id=\"fenetreConfigDiv\">";
 echo"</div>";
 echo"<div id=\"fenetreSousConfigDiv\">";
 echo"</div>";
 echo"<table id=\"tableBas\">";
  echo"<tbody>";
   echo"<tr>";
    echo"<td>";
     echo"<div id=\"actionDiv\">";
     echo"</div>";
    echo"</td>";
   echo"</tr>";
   echo"<tr>";
    echo"<td>";
     echo"<div id=\"barreBasDiv\">";
     echo"</div>";
    echo"</td>";
   echo"</tr>";
  echo"</tbody>";
 echo"</table>";
}

?>
0
Nanashi17 Messages postés 193 Date d'inscription mardi 28 mars 2017 Statut Membre Dernière intervention 19 juin 2017 99 > Felice_ Messages postés 265 Date d'inscription mardi 25 avril 2017 Statut Membre Dernière intervention 20 juillet 2017
9 juin 2017 à 10:02
Oui ces balises sont bien dans adminFonctions.php
0
Felice_ Messages postés 265 Date d'inscription mardi 25 avril 2017 Statut Membre Dernière intervention 20 juillet 2017 11 > Nanashi17 Messages postés 193 Date d'inscription mardi 28 mars 2017 Statut Membre Dernière intervention 19 juin 2017
9 juin 2017 à 10:18
Que donne ceci ? :
<?php
$numlien_ad = @$_GET["numlien_ad"];
// On récupère la variable $numlien_ad (si register_globals à off)

switch ($numlien_ad)
//On vérifie le numéro de lien cliqué par l'utilisateur
{
   case 100 :
   $page = "../Inscriptions/gestionChamps.php";
   $title =  "Gestion des études";
   break; 
    
   case 101 :
   echo 'Hello';
   $page = "../Inscriptions/gestionDemandes.php";
   $title =  "Gestion des Demandes";
   break;
}
?>
0
Nanashi17 Messages postés 193 Date d'inscription mardi 28 mars 2017 Statut Membre Dernière intervention 19 juin 2017 99 > Felice_ Messages postés 265 Date d'inscription mardi 25 avril 2017 Statut Membre Dernière intervention 20 juillet 2017
9 juin 2017 à 10:35
Le Hello s'affiche correctement en haut de la page.
0
Felice_ Messages postés 265 Date d'inscription mardi 25 avril 2017 Statut Membre Dernière intervention 20 juillet 2017 11 > Nanashi17 Messages postés 193 Date d'inscription mardi 28 mars 2017 Statut Membre Dernière intervention 19 juin 2017
9 juin 2017 à 11:01
D'accord et t'es variables « $page » et « $title » elles sont utilisées où ?
0
Nanashi17 Messages postés 193 Date d'inscription mardi 28 mars 2017 Statut Membre Dernière intervention 19 juin 2017 99
12 juin 2017 à 09:09
Je up mon sujet.

Récapitulatif: Dans mon fichier gestionDemandes.php se trouve ma fonction require qui (selon moi) ne fonctionne pas car tout ce que je met après cette fonction ne fonctionne plus mais ce require ne m'affiche aucun message d'erreur dans ma console.
0
Felice_ Messages postés 265 Date d'inscription mardi 25 avril 2017 Statut Membre Dernière intervention 20 juillet 2017 11
12 juin 2017 à 14:28
Cela donne quoi, ceci :
<?php
        echo 'Hello 1';
        require('adminFonctions.php');
        echo 'Hello 2';
        pageGestionDemandes(FALSE);
        echo 'Hello 3';
?>
0
Nanashi17 Messages postés 193 Date d'inscription mardi 28 mars 2017 Statut Membre Dernière intervention 19 juin 2017 99 > Felice_ Messages postés 265 Date d'inscription mardi 25 avril 2017 Statut Membre Dernière intervention 20 juillet 2017
12 juin 2017 à 14:46
seul hello 1 s'affiche
0
jordane45 Messages postés 38144 Date d'inscription mercredi 22 octobre 2003 Statut Modérateur Dernière intervention 21 avril 2024 4 650
12 juin 2017 à 15:04
Bonjour,
Je remets mon nez dans le bousin ....

Pourrais-tu, via ton navigateur, (une fois la page affichée) en afficher le code source (celui qui est généré par ton navigateur) et nous le coller sur le forum ??

De plus, pourrais tu t'assurer que tes différents fichiers sont bien en utf8 sans BOM ?
Voir le chapitre 1 ici :
https://forums.commentcamarche.net/forum/affich-37584944-php-html-caracteres-accentues-et-l-utf8

Et enfin.. il serait bien que tu ajoutes au début de CHAQUE page php de ton site, les lignes suivantes :
error_reporting(E_ALL);
ini_set('display-errors','on');




En complément : Dans le code de ton fichier adminFonctions.php que tu nous as montré .. je ne vois pas les balises PHP ... les as tu bien mises ??

Pourrais tu nous remontrer l'intégralité de tes fichiers tels qu'ils sont écrit dans ton site ?
0
Nanashi17 Messages postés 193 Date d'inscription mardi 28 mars 2017 Statut Membre Dernière intervention 19 juin 2017 99
12 juin 2017 à 15:31
<TITLE>Gestion des Demandes</TITLE>
<script>
function hidestatus(){
  window.status='A.R.P.A.E';
  return true;
}
if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT | Event.MOUSEDOWN);
document.onmouseover=hidestatus;
document.onmouseout=hidestatus;
document.onmousedown=hidestatus;
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Keywords" CONTENT="logement, étudiant, univ, LR, avenue, Jean, Monnet, Minimes, CROUS, IUT, Fac, Université, ARPAE, Sup de Co, EIGSI, Lavoisier, Platin, Francophonie, Maison, La Rochelle, jeunes, études, école, résidences, CRI, nouvelle"> 
<meta name="Description" CONTENT="Nos Résidences hébergent plus de 1000 étudiants par an pour leurs études dans un cadre de détente et de convivialité"> 
<meta name="author" content="benni"> 
<meta name="robots" CONTENT="index,follow">
<meta http-equiv="Content-Language" content="Français">
<link rel="stylesheet" type="text/css" href="../Inscriptions/adminCss.css">
<STYLE type=text/css>
A {
	FONT-WEIGHT: bold; 
  COLOR: #3B6CEE; 
  TEXT-DECORATION: none
}
A:hover {
	FONT-WEIGHT: bold;
	TEXT-DECORATION: underline;
	COLOR: #FF0000;
}
TD {
	FONT-SIZE: 7.5pt; 
  FONT-FAMILY: Verdana,Geneva,Arial,Helvetica,sans-serif;
}
TD.menu {
	FONT-SIZE: 7.5pt; 
  FONT-FAMILY: Verdana,Geneva,Arial,Helvetica,sans-serif; 
  FONT-WEIGHT: bold; 
  COLOR: #FFFFFF;
}
.Style1 {
	font-size: 36pt;
	color: #FFFFFF;
}
.Style2 {
	font-size: 12pt;
	font-weight: bold;
}
.Style3 {font-size: 10pt;}

.Style4 {font-size: 12pt;}

.Style5 {
	font-size: 10pt;
	font-weight: bold;
}
.Style13 {color: #FFFFFF; font-weight: bold; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 15px; }
</STYLE>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function move(){
  if (Math.abs(ex-x0)>=10) { x0+=Math.floor((ex-x0)*0.1) }
  else if (ex!=x0) { x0+=Math.abs(ex-x0)/(ex-x0) }
  if (Math.abs(ey-y0)>=10) { y0+=Math.floor((ey-y0)*0.1) }
  else if (ey!=y0) { y0+=Math.abs(ey-y0)/(ey-y0) }
  imagesrc=""
  if ( (ex<x0) && ( (x0-ex) > Math.abs(y0-ey)/2 ) )
  { 
    imagesrc="Theme_Noel/pere_g.gif"
    if ( (x0-ex) < Math.abs(y0-ey)*2 )
    { 
      if (ey<y0) imagesrc="Theme_Noel/pere_g.gif"
      if (ey>y0) imagesrc="Theme_Noel/pere_g.gif"
    }
  } 
  if ( (ex>x0) && ( (ex-x0) > Math.abs(y0-ey)/2) )
  { 
    imagesrc="Theme_Noel/pere_d.gif"
    if ( (ex-x0) < Math.abs(y0-ey)*2 )
    { 
      if (ey<y0) imagesrc="Theme_Noel/pere_d.gif"
      if (ey>y0) imagesrc="Theme_Noel/pere_d.gif"
    }
  }
  if (imagesrc=="")
  { 
    if (ey<y0) imagesrc="Theme_Noel/pere_d.gif"
    if (ey>y0) imagesrc="Theme_Noel/pere_d.gif"
    if ((ex==x0)&&(ey==y0)) imagesrc="Theme_Noel/pere.gif"
  }

  if (Ver4){
    if (!IE)
    {
      document.curseurLayer.document.images.curseur.src=imagesrc 
    }
    else document.all.curseurLayer.document.images.curseur.src=imagesrc
  }
  //Position de la souris
  al.left=x0-47
  al.top=y0+40
  //Vitesse du Traineau du Pere Noel
  setTimeout("move();",100)
}
function MoveWindow(event)
{
  if(move==1)
  {
  //alert('positionXDepartSouris'+positionXDepartSouris+'positionYDepartSouris'+positionYDepartSouris);
    var fenetre=getDomObject(selectedWindow);
    var eventY=event.clientY;
    var deltaY=eventY-positionYDepartSouris;
    var nouveauY=positionYDepartFenetre+deltaY+'px';
    if(deltaY<0)
    {
      var nouveauY=(Math.abs(positionYDepartFenetre)-Math.abs(deltaY))+'px';
    }
    else
    {
      var nouveauY=(Math.abs(positionYDepartFenetre)+Math.abs(deltaY))+'px';
    }
    var eventX=event.clientX;
  //  alert('eventX'+eventX+'eventY'+eventY);
  //  alert('positionXDepartFenetre'+positionXDepartFenetre+'positionYDepartFenetre'+positionYDepartFenetre);
    var deltaX=eventX-positionXDepartSouris;
    if(deltaX<0)
    {
      var nouveauX=(Math.abs(positionXDepartFenetre)-Math.abs(deltaX))+'px';
    }
    else
    {
      var nouveauX=(Math.abs(positionXDepartFenetre)+Math.abs(deltaX))+'px';
    }
    //alert('nouveauX'+nouveauX+'nouveauY'+nouveauY);
    fenetre.style.top=nouveauY;
    fenetre.style.left=nouveauX;
  }
}
//-->
</script>
<body onLoad="loadDesktopConfig();" onmousemove="MoveWindow(event);">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="69" align="center" valign="middle" ><table width="100%" border="0" cellpadding="0" cellspacing="0" background="../Image/haut.gif">
      <tr>
        <td width="152" height="65"><div align="center"> <a href="index.htm" rel="nofollow noopener noreferrer" target="_blank"><img src="../Image/logo.gif" width="55" height="58" border="0" /></a></div></td>
        <td width="569" height="65" valign="bottom"><div align="center" class="Style1">
          <div align="center"><span class="Style2">Association Rochelaise pour l'Accueil des Etudiants</span></div>
        </div></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="18"> </td>
  </tr>
  <tr>
    <td height="22" background="../Image/title.gif" class="menu"><div align="center">......:::::
      <script language=JavaScript>
<!-- Hide the script from non-Javascript browsers
var date_statement="";
var time_statement="";
var today=new Date();
var month="";
var day="";
var annee;

if (navigator.appName=="Netscape"){
	annee=1900;
}
if (navigator.appName=="Microsoft Internet Explorer"){
	annee=0;
}
function todays_date() {
var month=today.getMonth();
var day_of_week=today.getDay();
date_statement=""
document.month=""
month++; // So it's now between 1 - 12.
if(month==1) {
january(today.getDate());
document.month="janvier";
}
if(month==2) {
february(today.getDate());
document.month="fevrier";
}
if(month==3) {
march(today.getDate());
document.month="mars";
}
if(month==4) {
april(today.getDate());
document.month="avril";
}
if(month==5) {
may(today.getDate());
document.month="mai";
}
if(month==6) {
june(today.getDate());
document.month="juin";
}
if(month==7) {
july(today.getDate());
document.month="juillet";
}
if(month==8) {
august(today.getDate());
document.month="aout";
}
if(month==9) {
september(today.getDate());
document.month="septembre";
}
if(month==10) {
october(today.getDate());
document.month="octobre";
}
if(month==11) {
november(today.getDate());
document.month="novembre";
}
if(month==12) {
december(today.getDate());
document.month="decembre";
}
document.day=""
if(day_of_week==0)
document.day="dimanche";
if(day_of_week==1)
document.day="lundi";
if(day_of_week==2)
document.day="mardi";
if(day_of_week==3)
document.day="mercredi";
if(day_of_week==4)
document.day="jeudi";
if(day_of_week==5)
document.day="vendredi";
if(day_of_week==6)
document.day="samedi";
}
function january(date) {
if(date==1)
date_statement="";
if(date==26)
date_statement="";
}
function february(date) {
if(date==14)
date_statement="";
}
function march(date) {
if(date==15)
date_statement="";
if(date==17)
date_statement="";
}
function march(date) {
if(date==21)
date_statement="";
if(date==25)
date_statement="";
}
function april(date) {
if(date==1)
date_statement="";
if(date==30)
date_statement="";
}
function may(date) {
if(date==1)
date_statement="";
if(date==17)
date_statement="";
}
function june(date) {
if(date==2)
date_statement="";
if(date==5)
date_statement="";
if(date==10)
date_statement="";
if(date==17)
date_statement="";
if(date==21)
date_statement="";
if(date==23)
date_statement="";
if(date==24)
date_statement="";
}
function july(date) {
if(date==1)
date_statement="";
if(date==4)
date_statement="";
if(date==14)
date_statement="";
if(date==21)
date_statement="";
if(date==23)
date_statement="";
}
function august(date) {
if(date==1)
date_statement="";
}
function september(date) {
if(date==7)
date_statement="";
if(date==21)
date_statement="C'est l'automne !";
}
function october(date) {
if(date==3)
date_statement="";
if(date==12)
date_statement="";
if(date==31)
date_statement="Happy Halloween.";
}
function november(date) {
}
function december(date) {
if(date==21)
date_statement+="Couvrez-vous c'est l'hiver !";
if(date==23)
date_statement+="";
if(date==25)
date_statement="Joyeux Noël!";
if(date==31)
date_statement="Bon réveillon !";
}

function time_of_day() {
var time=today.getHours();
time_statement=""
if(time>=6 && time<8)
time_statement="Déja sur le Net !,"
if(time>=8 && time<12)
time_statement="Bonne matinée,"
if(time>=12 && time<13)
time_statement="Bon appétit,"
if(time>=13 && time<17)
time_statement="Bon après-midi,"
if(time>=17 && time<18)
time_statement="Bon fin d'après-midi,"
if(time>=18 && time<20)
time_statement="Bonsoir et bon appétit,"
if(time>=20 && time<22)
time_statement="Bonsoir,"
if(time>=22 || time<6)
time_statement="Salut les couche-tard,"
}
// -- End Hiding Here -->
    </script>
            <script language=JavaScript>
		<!-- Hide the script from non-Javascript browsers
time_of_day();
todays_date();
document.writeln(""+time_statement+" nous sommes le "+document.day+" "+today.getDate()+" "+document.month+" "+date_statement+" "+(annee+today.getYear())+"");
// -- End Hiding Here -->
    </script>
      :::::......</div></td>
  </tr>
  <tr>
    <td height="18" align="center" valign="top"> </td>
  </tr>
  <tr>
    <td>
      <table width="100%" border="0" cellpadding="0" cellspacing="0" >
        <tr cellpading="0" cellspacing="0">
          <td height="18" align="left" valign="top">
            <table width="100%" height="100%"  border="0" cellpading="0" cellspacing="0">
              <tr valign="top">
                <td>
                  <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td height="22" background="../Image/title.gif" class="menu"><div align="center"><span class="Style13">Gestion des Demandes</span></div></td>
                    </tr>
                    <tr>
                      <td align="center" valign="top" bgcolor="78B1F3">
                        <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="1">
                          <tr>
                            <td height="360" align="center" valign="top" bgcolor="#FFFFFF">
                              <table width="100%"  border="0">
                                <tr>
                                  <td height="20"><html>
<body>
<script type="text/JavaScript" src="/wp-admin/Plugin_ARPAE/Inscriptions/scriptDemandes.js"></script>


voilà le code source de mon navigateur.

Ensuite tout mes fichiers sont bien codé en UTF8 sans BOM et les lignes de codes sont bien ajoutés dans tout mes fichiers.

Oui dans mon fichier adminFonctions.php il y a bien les balises php c'est juste que le fichier est juste énorme et contient des information personnels à mon entreprise comme les accès à la base de données ou les adresse ftp du serveur alors je n'ai mis que la fonction qui nous intéressait.

admin.php
<?php
/*
Plugin Name: arpae_plugin
Plugin URI: http://arpae.info/wp-admin/arpae_plugin
Description: Un plugin pour gérer les demandes de logements
Version: 0.1
Author: Gautron Alexandre
Author URI: http://arpae.info
*/
error_reporting(E_ALL);
ini_set('display-errors','on');
require("/home/arpaeinfbf/www/wp-admin/Plugin_ARPAE/protec/passe/conf.php");
$db_link = mysqli_connect($sql_serveur,$sql_user,$sql_passwd,$sql_bdd);

// SELECTION DE L'ENREGISTREMENT CONTENANT L'ID EN COURS
//$requete=mysqli_query($db_link,"select * from bd_admin where id=\"$id\"");


add_action( 'admin_menu', 'my_plugin_menu' );


function my_plugin_menu() {
 add_options_page( 'My Plugin Options', 'Plugin ARPAE', 'manage_options', 'my-unique-identifier', 'my_plugin_options' );
}


function my_plugin_options() {
  if ( !current_user_can( 'manage_options' ) )  
  {
    wp_die( __( 'You do not have sufficient permissions to access this page.' ) );
  }

?>
<style type="text/css">
<!--
.Style1 {	font-size: 18px;
	font-weight: bold;
	font-family: Verdana, Arial, Helvetica, sans-serif;
}
.Style3 {font-weight: bold; font-size: 18px;}
-->
</style>
<table width="100%" border="1" cellspacing="2" cellpadding="2" bordercolor="#FFFFFF">
  <tr>
    <td> </td>
  </tr>
  <tr bgcolor="#6699CC" bordercolor="#000000">
    <td><div align="center"><font face="Verdana, Arial, Helvetica, sans-serif"><span class="Style1">Bienvenue dans la partie ADMINISTRATION </span></font></div></td>
  </tr>
  <tr bordercolor="#000000">
    <td><div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">
	  </font>
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td bgcolor="#DAE1E9"><div align="center" class="Style2">Gestion du contenu du site </div></td>
          </tr>
          <tr>
            <td><div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><? echo "<a href=\"../../wp-admin/Plugin_ARPAE/Administration/gestion.php?numlien_ad=2\">"."Modification fiches résidences"."</a>" ?> | <? echo "<a href=\"../../wp-admin/Plugin_ARPAE/Administration/gestion.php?numlien_ad=3\">"."Modification fiches logements"."</a>" ?></font></div></td>
          </tr>
          <tr>
            <td height="20"> </td>
          </tr>
          <tr>
            <td bgcolor="#DAE1E9"><div align="center"><span class="Style2">Gestion des comptes administrateurs</span></div></td>
          </tr>
          <tr>
            <td><div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><? echo "<a href=\"../../wp-admin/Plugin_ARPAE/Administration/gestion.php?numlien_ad=32\">"."Création / Modification / Suppression Mot de Passe"."</a>" ?></font></div></td>
          </tr>
          <tr>
            <td height="20"> </td>
          </tr>
          <tr>
            <td bgcolor="#DAE1E9"><div align="center" class="Style2">Gestion des demandes de logement </div></td>
          </tr>
          <tr>
            <td><div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><? echo "<a href=\"../../wp-admin/Plugin_ARPAE/Administration/gestion.php?numlien_ad=100\">"."Gestion études"."</a>" ?> | <? echo "<a href=\"../../wp-admin/Plugin_ARPAE/Administration/gestion.php?numlien_ad=101\">"."Gestion demandes"."</a>" ?> |<? echo "<a href=\"../../wp-admin/Plugin_ARPAE/Inscriptions/recuperation_inscriptions_historique.php\">"."récupérer les demandes"."</a>" ?></font></div></td>
          </tr>
        </table>
        </div></td>
  </tr>
</table>
<?php
echo ("<center><font face=\"verdana\"><h3>".("Choisissez un menu de gestion")."</h3></font></center>");
}

?>


gestion.php
<?php
error_reporting(E_ALL);
ini_set('display-errors','on');
require("../protec/passe/conf.php");
$db_link = mysqli_connect($sql_serveur,$sql_user,$sql_passwd,$sql_bdd);
if (!$db_link) {
    die('Erreur de connexion : ' . mysqli_connect_error());
}
require ("lien_ad.php"); 
?>

<TITLE><? echo "$title"; ?></TITLE>
<script>
function hidestatus(){
  window.status='A.R.P.A.E';
  return true;
}
if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT | Event.MOUSEDOWN);
document.onmouseover=hidestatus;
document.onmouseout=hidestatus;
document.onmousedown=hidestatus;
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Keywords" CONTENT="logement, étudiant, univ, LR, avenue, Jean, Monnet, Minimes, CROUS, IUT, Fac, Université, ARPAE, Sup de Co, EIGSI, Lavoisier, Platin, Francophonie, Maison, La Rochelle, jeunes, études, école, résidences, CRI, nouvelle"> 
<meta name="Description" CONTENT="Nos Résidences hébergent plus de 1000 étudiants par an pour leurs études dans un cadre de détente et de convivialité"> 
<meta name="author" content="benni"> 
<meta name="robots" CONTENT="index,follow">
<meta http-equiv="Content-Language" content="Français">
<link rel="stylesheet" type="text/css" href="../Inscriptions/adminCss.css">
<STYLE type=text/css>
A {
	FONT-WEIGHT: bold; 
  COLOR: #3B6CEE; 
  TEXT-DECORATION: none
}
A:hover {
	FONT-WEIGHT: bold;
	TEXT-DECORATION: underline;
	COLOR: #FF0000;
}
TD {
	FONT-SIZE: 7.5pt; 
  FONT-FAMILY: Verdana,Geneva,Arial,Helvetica,sans-serif;
}
TD.menu {
	FONT-SIZE: 7.5pt; 
  FONT-FAMILY: Verdana,Geneva,Arial,Helvetica,sans-serif; 
  FONT-WEIGHT: bold; 
  COLOR: #FFFFFF;
}
.Style1 {
	font-size: 36pt;
	color: #FFFFFF;
}
.Style2 {
	font-size: 12pt;
	font-weight: bold;
}
.Style3 {font-size: 10pt;}

.Style4 {font-size: 12pt;}

.Style5 {
	font-size: 10pt;
	font-weight: bold;
}
.Style13 {color: #FFFFFF; font-weight: bold; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 15px; }
</STYLE>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function move(){
  if (Math.abs(ex-x0)>=10) { x0+=Math.floor((ex-x0)*0.1) }
  else if (ex!=x0) { x0+=Math.abs(ex-x0)/(ex-x0) }
  if (Math.abs(ey-y0)>=10) { y0+=Math.floor((ey-y0)*0.1) }
  else if (ey!=y0) { y0+=Math.abs(ey-y0)/(ey-y0) }
  imagesrc=""
  if ( (ex<x0) && ( (x0-ex) > Math.abs(y0-ey)/2 ) )
  { 
    imagesrc="Theme_Noel/pere_g.gif"
    if ( (x0-ex) < Math.abs(y0-ey)*2 )
    { 
      if (ey<y0) imagesrc="Theme_Noel/pere_g.gif"
      if (ey>y0) imagesrc="Theme_Noel/pere_g.gif"
    }
  } 
  if ( (ex>x0) && ( (ex-x0) > Math.abs(y0-ey)/2) )
  { 
    imagesrc="Theme_Noel/pere_d.gif"
    if ( (ex-x0) < Math.abs(y0-ey)*2 )
    { 
      if (ey<y0) imagesrc="Theme_Noel/pere_d.gif"
      if (ey>y0) imagesrc="Theme_Noel/pere_d.gif"
    }
  }
  if (imagesrc=="")
  { 
    if (ey<y0) imagesrc="Theme_Noel/pere_d.gif"
    if (ey>y0) imagesrc="Theme_Noel/pere_d.gif"
    if ((ex==x0)&&(ey==y0)) imagesrc="Theme_Noel/pere.gif"
  }

  if (Ver4){
    if (!IE)
    {
      document.curseurLayer.document.images.curseur.src=imagesrc 
    }
    else document.all.curseurLayer.document.images.curseur.src=imagesrc
  }
  //Position de la souris
  al.left=x0-47
  al.top=y0+40
  //Vitesse du Traineau du Pere Noel
  setTimeout("move();",100)
}
function MoveWindow(event)
{
  if(move==1)
  {
  //alert('positionXDepartSouris'+positionXDepartSouris+'positionYDepartSouris'+positionYDepartSouris);
    var fenetre=getDomObject(selectedWindow);
    var eventY=event.clientY;
    var deltaY=eventY-positionYDepartSouris;
    var nouveauY=positionYDepartFenetre+deltaY+'px';
    if(deltaY<0)
    {
      var nouveauY=(Math.abs(positionYDepartFenetre)-Math.abs(deltaY))+'px';
    }
    else
    {
      var nouveauY=(Math.abs(positionYDepartFenetre)+Math.abs(deltaY))+'px';
    }
    var eventX=event.clientX;
  //  alert('eventX'+eventX+'eventY'+eventY);
  //  alert('positionXDepartFenetre'+positionXDepartFenetre+'positionYDepartFenetre'+positionYDepartFenetre);
    var deltaX=eventX-positionXDepartSouris;
    if(deltaX<0)
    {
      var nouveauX=(Math.abs(positionXDepartFenetre)-Math.abs(deltaX))+'px';
    }
    else
    {
      var nouveauX=(Math.abs(positionXDepartFenetre)+Math.abs(deltaX))+'px';
    }
    //alert('nouveauX'+nouveauX+'nouveauY'+nouveauY);
    fenetre.style.top=nouveauY;
    fenetre.style.left=nouveauX;
  }
}
//-->
</script>
<body onLoad="loadDesktopConfig();" onmousemove="MoveWindow(event);">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="69" align="center" valign="middle" ><table width="100%" border="0" cellpadding="0" cellspacing="0" background="../Image/haut.gif">
      <tr>
        <td width="152" height="65"><div align="center"> <a href="index.htm" rel="nofollow noopener noreferrer" target="_blank"><img src="../Image/logo.gif" width="55" height="58" border="0" /></a></div></td>
        <td width="569" height="65" valign="bottom"><div align="center" class="Style1">
          <div align="center"><span class="Style2">Association Rochelaise pour l'Accueil des Etudiants</span></div>
        </div></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="18"> </td>
  </tr>
  <tr>
    <td height="22" background="../Image/title.gif" class="menu"><div align="center">......:::::
      <script language=JavaScript>
<!-- Hide the script from non-Javascript browsers
var date_statement="";
var time_statement="";
var today=new Date();
var month="";
var day="";
var annee;

if (navigator.appName=="Netscape"){
	annee=1900;
}
if (navigator.appName=="Microsoft Internet Explorer"){
	annee=0;
}
function todays_date() {
var month=today.getMonth();
var day_of_week=today.getDay();
date_statement=""
document.month=""
month++; // So it's now between 1 - 12.
if(month==1) {
january(today.getDate());
document.month="janvier";
}
if(month==2) {
february(today.getDate());
document.month="fevrier";
}
if(month==3) {
march(today.getDate());
document.month="mars";
}
if(month==4) {
april(today.getDate());
document.month="avril";
}
if(month==5) {
may(today.getDate());
document.month="mai";
}
if(month==6) {
june(today.getDate());
document.month="juin";
}
if(month==7) {
july(today.getDate());
document.month="juillet";
}
if(month==8) {
august(today.getDate());
document.month="aout";
}
if(month==9) {
september(today.getDate());
document.month="septembre";
}
if(month==10) {
october(today.getDate());
document.month="octobre";
}
if(month==11) {
november(today.getDate());
document.month="novembre";
}
if(month==12) {
december(today.getDate());
document.month="decembre";
}
document.day=""
if(day_of_week==0)
document.day="dimanche";
if(day_of_week==1)
document.day="lundi";
if(day_of_week==2)
document.day="mardi";
if(day_of_week==3)
document.day="mercredi";
if(day_of_week==4)
document.day="jeudi";
if(day_of_week==5)
document.day="vendredi";
if(day_of_week==6)
document.day="samedi";
}
function january(date) {
if(date==1)
date_statement="";
if(date==26)
date_statement="";
}
function february(date) {
if(date==14)
date_statement="";
}
function march(date) {
if(date==15)
date_statement="";
if(date==17)
date_statement="";
}
function march(date) {
if(date==21)
date_statement="";
if(date==25)
date_statement="";
}
function april(date) {
if(date==1)
date_statement="";
if(date==30)
date_statement="";
}
function may(date) {
if(date==1)
date_statement="";
if(date==17)
date_statement="";
}
function june(date) {
if(date==2)
date_statement="";
if(date==5)
date_statement="";
if(date==10)
date_statement="";
if(date==17)
date_statement="";
if(date==21)
date_statement="";
if(date==23)
date_statement="";
if(date==24)
date_statement="";
}
function july(date) {
if(date==1)
date_statement="";
if(date==4)
date_statement="";
if(date==14)
date_statement="";
if(date==21)
date_statement="";
if(date==23)
date_statement="";
}
function august(date) {
if(date==1)
date_statement="";
}
function september(date) {
if(date==7)
date_statement="";
if(date==21)
date_statement="C'est l'automne !";
}
function october(date) {
if(date==3)
date_statement="";
if(date==12)
date_statement="";
if(date==31)
date_statement="Happy Halloween.";
}
function november(date) {
}
function december(date) {
if(date==21)
date_statement+="Couvrez-vous c'est l'hiver !";
if(date==23)
date_statement+="";
if(date==25)
date_statement="Joyeux Noël!";
if(date==31)
date_statement="Bon réveillon !";
}

function time_of_day() {
var time=today.getHours();
time_statement=""
if(time>=6 && time<8)
time_statement="Déja sur le Net !,"
if(time>=8 && time<12)
time_statement="Bonne matinée,"
if(time>=12 && time<13)
time_statement="Bon appétit,"
if(time>=13 && time<17)
time_statement="Bon après-midi,"
if(time>=17 && time<18)
time_statement="Bon fin d'après-midi,"
if(time>=18 && time<20)
time_statement="Bonsoir et bon appétit,"
if(time>=20 && time<22)
time_statement="Bonsoir,"
if(time>=22 || time<6)
time_statement="Salut les couche-tard,"
}
// -- End Hiding Here -->
    </script>
            <script language=JavaScript>
		<!-- Hide the script from non-Javascript browsers
time_of_day();
todays_date();
document.writeln(""+time_statement+" nous sommes le "+document.day+" "+today.getDate()+" "+document.month+" "+date_statement+" "+(annee+today.getYear())+"");
// -- End Hiding Here -->

    </script>
      :::::......</div></td>
  </tr>
  <tr>
    <td height="18" align="center" valign="top"> </td>
  </tr>
  <tr>
    <td>
      <table width="100%" border="0" cellpadding="0" cellspacing="0" >
        <tr cellpading="0" cellspacing="0">
          <td height="18" align="left" valign="top">
            <table width="100%" height="100%"  border="0" cellpading="0" cellspacing="0">
              <tr valign="top">
                <td>
                  <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td height="22" background="../Image/title.gif" class="menu"><div align="center"><span class="Style13"><?php echo "$title"; ?></span></div></td>
                    </tr>
                    <tr>
                      <td align="center" valign="top" bgcolor="78B1F3">
                        <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="1">
                          <tr>
                            <td height="360" align="center" valign="top" bgcolor="#FFFFFF">
                              <table width="100%"  border="0">
                                <tr>
                                  <td height="20"><?php include $page ; // <----------------------------------------- L'execution s'arrête là ! ----------------------------------------------->?></td>
                                </tr>
                              </table>
                              <div align="center"> </div>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
        <tr>
          <td height="18" align="left" valign="top"><div align="right"> </div></td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td height="22" background="../Image/title.gif" class="menu"><div align="center">Copyright 
      © 2007 - Tous droits réservés.</div></td>
  </tr>
</table>
</body>


lien_ad.php
<?php
error_reporting(E_ALL);
ini_set('display-errors','on');
$numlien_ad = @$_GET["numlien_ad"];
// On récupère la variable $numlien_ad (si register_globals à off)

switch ($numlien_ad)
//On vérifie le numéro de lien cliqué par l'utilisateur
    {
 default :
//page par défaut
   $page = "../../admin.php";
   $title =  "Aministration";
   break;

	case 100 :
   $page = "../Inscriptions/gestionChamps.php";
   $title =  "Gestion des études";
   break; 
    
   case 101 :
   $page = "../Inscriptions/gestionDemandes.php";
   $title =  "Gestion des Demandes";
   break;
   
   case 102 :
   $page = "../Inscriptions/recuperation_Inscriptions.php";
   $title =  "Gestion des Demandes";
   break;
   
   case 103:
   $page = "../Inscriptions/gestionDemandesHisto.php";
   $title =  "Gestion des Demandes";
   break;
   
   case 104:
   $page = "../Inscriptions/migrer.php";
   $title =  "migrer la base";
   break;
    }
?>


gestionDemande.php
<html>
<body>
<?php
error_reporting(E_ALL);
ini_set('display-errors','on');
	echo '<script type="text/JavaScript" src="/wp-admin/Plugin_ARPAE/Inscriptions/scriptDemandes.js"></script>';
	/*les couleurs de fond des menus*/
	$bgcolor='#006699';
	$bgcolor2='#6699CC';

	//Ca ne va pas plus loin dans l'execution
	require'adminFonctions.php';
	pageGestionDemandes(FALSE);
?>
</body>
</html>


scriptDemandes.js
window.onload = function()
{
var deplacement;

function loadDesktopConfig()
{
	displayLaunchBar();
	afficherBarreBas();
}
/*mettre à jour la champ remarque arpae des demandes selectionnées avec la valeur du texte contenu dans 'remarque'*/
function envoyerRemarque()
{
	var ajax = getAjax();	 
	ajax.open("POST", "../Inscriptions/envoyerRemarque.php", true); 
	ajax.onreadystatechange = updateContent(ajax,'actionDiv');	 
	ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
	var champRemarque=getDomObject('remarque');
 	var data='remarque='+champRemarque.value;
	ajax.send(data); 
}
/*charger la barre de lancement*/
function displayLaunchBar()
{
	var ajax = getAjax();	 
	ajax.open("POST", "../Inscriptions/loadLaunchBar.php", true); 
	ajax.onreadystatechange = updateContent(ajax,'launchBarDiv');	
	ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
 	var launchBar=getDomObject('launchBarDiv');
 	launchBar.style.visibility="visible";
 	
	ajax.send('default');
}
function setFilterOuverture(index)
{
	//alert(mode);
	var ajax = getAjax();	 
	ajax.open("POST", "../Inscriptions/setFilterOuverture.php", true); 
	
	ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
	/*on choppe le select*/
	var toto=getDomObject('ouvertureFiltre'+index);
 	var data = 'index='+index;
 	data+='&mode='+toto.options[toto.selectedIndex].value;
 	
 	//alert(data);
	ajax.send(data);
}
function setFilterFermeture(index)
{
	//alert(mode);
	var ajax = getAjax();	 
	ajax.open("POST", "../Inscriptions/setFilterFermeture.php", true); 
	
	ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
	/*on choppe le select*/
	var toto=getDomObject('fermetureFiltre'+index);
 	var data = 'index='+index;
 	data+='&mode='+toto.options[toto.selectedIndex].value;
 	
 	//alert(data);
	ajax.send(data);
}
function setFilterETOUOption(index)
{
	//alert(mode);
	var ajax = getAjax();	 
	ajax.open("POST", "../Inscriptions/setFilterETOUOption.php", true); 
	
	ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
	/*on choppe le select*/
	var toto=getDomObject('optionETOUFiltre'+index);
 	var data = 'index='+index;
 	data+='&mode='+toto.options[toto.selectedIndex].value;
 	
 	//alert(data);
	ajax.send(data);
}
function getRemarquesEditor()
{
	var ajax = getAjax();	 
	ajax.open("POST", "../Inscriptions/getRemarquesEditor.php", true); 
	ajax.onreadystatechange = updateContent(ajax,'actionDiv');	 
	ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
	/*puis on envoie!!*/
 	var data = 'indice=rien';
	ajax.send(data); 
}
function mettreAttente(etat)
{
	var ajax = getAjax();	 
	ajax.open("POST", "../Inscriptions/mettreAttente.php", true); 
	ajax.onreadystatechange = updateContent(ajax,'actionDiv');	
	ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
	/*puis on envoie!!*/
	ajax.send('etat='+etat); 
}

var t;



function obtienFocus(toto)
{
	toto.style.background="#6699CC";
	toto.style.cursor="pointer";
}
function perdFocus(toto)
{
	toto.style.background="#006699";
	toto.style.cursor="default";
}

function getAbsolutePosition(element) {
    var r = { x: element.offsetLeft, y: element.offsetTop };
    if (element.offsetParent) {
      var tmp = getAbsolutePosition(element.offsetParent);
      r.x += tmp.x;
      r.y += tmp.y;
    }
    return r;
  };


function openConfigBox()
{
	hideBox('fenetreSousConfigDiv');
	var fenetre = getDomObject('fenetreConfigDiv');
	
	fenetre.style.display = 'block';
	fenetre.style.position= 'absolute';
	fenetre.style.top=250;
	fenetre.style.left=300;
	fenetre.style.visibility='visible';
	var ajax = getAjax();	 
	ajax.open("POST", "../Inscriptions/loadConfigBox.php", true); 
	ajax.onreadystatechange = updateContent(ajax,'fenetreConfigDiv');	
	ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
	ajax.send('default');
}
function loadSection(menu)
{
	hideBox('fenetreSousConfigDiv');
	var fenetre = getDomObject('fenetreConfigDiv');
	
	fenetre.style.display = 'block';
	fenetre.style.position= 'absolute';
	fenetre.style.top=250;
	fenetre.style.left=300;
	fenetre.style.visibility='visible';
	var ajax = getAjax();	 
	ajax.open("POST", "../Inscriptions/loadSection.php", true); 
	ajax.onreadystatechange = updateContent(ajax,'fenetreConfigDiv');	
	ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
	ajax.send('menu='+menu);
}

function loadChamp(menu,indiceSection)
{
	var fenetre = getDomObject('fenetreSousConfigDiv');
	var configBox = getDomObject('fenetreConfigDiv');
	var configBoxPos=getAbsolutePosition(configBox).x;
	if(configBoxPos==140)
	{
		clearTimeout(deplacement);
		fenetre.style.visibility='visible';
		fenetre.style.display = 'block';
		fenetre.style.position= 'absolute';
		fenetre.style.top=250;
		fenetre.style.left=300;
		var ajax = getAjax();	 
		ajax.open("POST", "../Inscriptions/loadChamp.php", true); 
		ajax.onreadystatechange = updateContent(ajax,'fenetreSousConfigDiv');	
		ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
		var data='menu='+menu+'&indiceSection='+indiceSection;
		ajax.send(data);
	}
	else
	{
		deplacement=setTimeout("moveBox('fenetreConfigDiv','140','loadChamp("+menu+","+indiceSection+")')",100);
	}	
}

function preChargerConfig()
{
	
	var fenetre = getDomObject('fenetreSousConfigDiv');
	var configBox = getDomObject('fenetreConfigDiv');
	var configBoxPos=getAbsolutePosition(configBox).x;
	if(configBoxPos==75)
	{
		clearTimeout(deplacement);
		fenetre.style.visibility='visible';
		fenetre.style.display = 'block';
		fenetre.style.position= 'absolute';
		fenetre.style.top=250;
		fenetre.style.left=300;
		var ajax = getAjax();	 
		ajax.open("POST", "../Inscriptions/preChargerConfig.php", true); 
		ajax.onreadystatechange = updateContent(ajax,'fenetreSousConfigDiv');	
		ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
		ajax.send('default');
	}
	else
	{
		deplacement=setTimeout("moveBox('fenetreConfigDiv','75','preChargerConfig()')",100);
	}	
}
function sauverConfiguration()
{
	hideBox('fenetreSousConfigDiv');
	var ajax = getAjax();	 
	ajax.open("POST", "../Inscriptions/saveConfig.php", true); 
	ajax.onreadystatechange = updateContent(ajax,'barreConfig');	 
	ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
	var nomConfig=getDomObject('nomConfiguration');
	var data='nom_config='+nomConfig.value;
	ajax.send(data);
}
function preSauverConfig()
{
	var fenetre = getDomObject('fenetreSousConfigDiv');
	var configBox = getDomObject('fenetreConfigDiv');
	var configBoxPos=getAbsolutePosition(configBox).x;
	if(configBoxPos==75)
	{
		clearTimeout(deplacement);
		fenetre.style.visibility='visible';
		fenetre.style.display = 'block';
		fenetre.style.position= 'absolute';
		fenetre.style.top=250;
		fenetre.style.left=300;
		var ajax = getAjax();	 
		ajax.open("POST", "../Inscriptions/preSauverConfig.php", true); 
		ajax.onreadystatechange = updateContent(ajax,'fenetreSousConfigDiv');	
		ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
		ajax.send('default');
	}
	else
	{
		deplacement=setTimeout("moveBox('fenetreConfigDiv','75','preSauverConfig()')",100);
	}	
}
/*remplir un input avec la valeur passée*/
function remplirChamp(idChamp,valeur)
{
	var champ=getDomObject(idChamp);
	champ.value=valeur;
}
function preEffacerConfig()
{
	var fenetre = getDomObject('fenetreSousConfigDiv');
	var configBox = getDomObject('fenetreConfigDiv');
	var configBoxPos=getAbsolutePosition(configBox).x;
	if(configBoxPos==75)
	{
		clearTimeout(deplacement);
		fenetre.style.visibility='visible';
		fenetre.style.display = 'block';
		fenetre.style.position= 'absolute';
		fenetre.style.top=250;
		fenetre.style.left=300;
		var ajax = getAjax();	 
		ajax.open("POST", "../Inscriptions/preEffacerConfig.php", true); 
		ajax.onreadystatechange = updateContent(ajax,'fenetreSousConfigDiv');	
		ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
		ajax.send('default');
	}
	else
	{
		deplacement=setTimeout("moveBox('fenetreConfigDiv','75','preEffacerConfig()')",100);
	}
}
function effacerConfiguration()
{
var input=getDomObject('nomConfigurationSupprimer');
	var data='nom_config='+input.value;
	var confirmation=confirm("Supprimer: "+input.value+" ?");
	if(confirmation==true)
	{
		var ajax = getAjax(); 
		ajax.open("POST", "../Inscriptions/deleteConfig.php", true); 
		ajax.onreadystatechange = updateContent(ajax,'barreConfig');	 
		ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
		ajax.send(data);
		hideBox('fenetreSousConfigDiv');
	}
	
}
function hideAllBoxes()
{
	var tableauBoxes=new Array('fenetreConfigDiv','fenetreSousConfigDiv');
	var i=0;	
	var longueurTableau=tableauBoxes.length;
	
	for(i=0;i<=longueurTableau;i++)
	{
		var boxTemp=getDomObject(tableauBoxes[i]);
		if(boxTemp)
		{
			hideBox(tableauBoxes[i]);
		}
	}	
}
/*masquer toutes les boites dont les id sont passés par tableau*/
function hideBoxes(tableauBoxes)
{
	var i=0;	
	var longueurTableau=tableauBoxes.length;
	
	for(i=0;i<=longueurTableau;i++)
	{
		var boxTemp=getDomObject(tableauBoxes[i]);
		if(boxTemp)
		{
			hideBox(tableauBoxes[i]);
		}
	}
}
/*replacer une boite à sa position d'origine*/
function resetBox(idBox)
{
	tableauOriginesBoxes[0]
	var box=getDomObject(idBox);
	
	var position=getAbsolutePosition(box);
}
function hideBox(fenetreId)
{
	var fenetre=getDomObject(fenetreId);
	fenetre.style.visibility='hidden';
	fenetre.style.display = 'none';
	if(fenetreId=='fenetreConfigDiv')
	{
		var fenetreTemp=getDomObject('fenetreSousConfigDiv');
		fenetreTemp.style.visibility='hidden';
		fenetreTemp.style.display = 'none';
	}
	if(fenetreId=='fenetreSousConfigDiv')
	{
		moveBox('fenetreConfigDiv',300,null);
	}
}
function moveBox(idFenetre,destination,exec)
{
	var fenetre = getDomObject(idFenetre);
	var position=getAbsolutePosition(fenetre);
	//alert(idFenetre+','+destination+','+position.x);
	if(Math.abs(position.x-destination)<15)
	{
		clearTimeout(deplacement);
		fenetre.style.left=destination;
		if(exec!=null)
		eval(exec);
		return ;
	}
	
	if(position.x<destination)
	{
		fenetre.style.left=position.x+15;		
	}
	else
	{
		fenetre.style.left=position.x-15;		
	}
	deplacement=setTimeout("moveBox('"+idFenetre+"','"+destination+"','"+exec+"')",100);
	
}
function obtienFocusBase(element)
{
	element.style.cursor="pointer";
}
function perdFocusBase(element)
{
	element.style.cursor="default";
}
function obtienFocusLB(element,sousTitre)
{	
	element.style.cursor="pointer";
	
	var soustitreDiv=getDomObject('sousTitreDiv');
	soustitreDiv.innerHTML=sousTitre;
	soustitreDiv.style.position="absolute";
	var position=getAbsolutePosition(element);
	//alert(position.x,position.y);
	soustitreDiv.style.top=position.y+35;
	soustitreDiv.style.left=position.x-15;
	soustitreDiv.style.visibility="visible";
}
function perdFocusLB(element)
{
	element.style.cursor="default";
	soustitreDiv=getDomObject('sousTitreDiv');
	soustitreDiv.style.visibility="hidden";
}
/*indice code pour le numéro de tableau(demandeur,parents,garant...)
 et index pour la position dans le tableau (nom,prenom...)*/
function ajouterColonne(indice,index)
{
	var ajax = getAjax();	 
	ajax.open("POST", "../Inscriptions/ajouterColonne.php", true); 
	ajax.onreadystatechange = function()
	{
		if(ajax.readyState == 4)
		{	
			afficherConfiguration(2);
		}	
	} 
	ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
	/*puis on envoie!!*/
 	var data = 'indice='+indice;
 	data+='&index='+index;
	ajax.send(data); 
}
function ajouterFiltre(indice,index,typeFiltre)
{
	var ajax = getAjax();	 
	ajax.open("POST", "../Inscriptions/ajouterFiltre.php", true); 
	ajax.onreadystatechange = function()
	{
		if(ajax.readyState == 4)
		{	
			afficherConfiguration(2);
		}	
	}  
	ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
	/*puis on envoie!!*/
 	var data = 'indice='+indice;
 	data+='&index='+index;
 	data+='&typeFiltre='+typeFiltre;
 
	ajax.send(data); 
}
/*va retourner un pointeur vers une fonction qui remplira le innerHTML de l'objet dom passé
par le retour de l'objet ajax passé*/
function updateContent(ajax,idDomObject)
{
	return function()
	{
		if(ajax.readyState == 1)
		{
			var monObjet=getDomObject(idDomObject);
			var inner="<img src=\"/Inscriptions/i_animated_loading_32_2.gif\" width=\"32\" height=\"32\" border=\"0\" >";
			monObjet.innerHTML=inner;
		}
		if(ajax.readyState == 4)
		{	
			var monObjet=getDomObject(idDomObject);
			monObjet.innerHTML=ajax.responseText;
		
		}
		
	}
}
/*retirer une entrée du le tableau des colonnes et réactualiser l'affichage*/
function retirerColonne(indice)
{
	var ajax = getAjax();	 
	ajax.open("POST", "../Inscriptions/retirerColonne.php", true); 
	ajax.onreadystatechange = function()
	{
		if(ajax.readyState == 4)
		{	
			afficherConfiguration(2);
		}	
	}
	
	ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
	/*puis on envoie!!*/
 	var data = 'indice='+indice;
	ajax.send(data);
	
	
}
/*retirer une entrée dans le tableau des filtres*/
function retirerFiltre(indice)
{
	var ajax = getAjax();	 
	ajax.open("POST", "../Inscriptions/retirerFiltre.php", true); 
	ajax.onreadystatechange = function()
	{
		if(ajax.readyState == 4)
		{	
			afficherConfiguration(2);
		}	
	} 
	ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
	/*puis on envoie!!*/
 	var data = 'indice='+indice;
	ajax.send(data); 
}
function setFilterOption(index)
{
	var ajax = getAjax();	 
	ajax.open("POST", "../Inscriptions/setFilterOption.php", true); 
	
	ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
	/*on choppe le select*/
	var toto=getDomObject('optionFiltre'+index);
 	var data = 'index='+index;
 	data+='&valeur='+toto.options[toto.selectedIndex].value;
	ajax.send(data);
}
function setFilterOperand(toto,index)
{
	var ajax = getAjax(); 
	ajax.open("POST", "../Inscriptions/setFilterOperand.php", true); 
	
	ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
	/*on choppe le select*/
	var select=getDomObject('optionFiltre'+index);
	var valeur=toto.value;
 	var data = 'index='+index;
 	data+='&valeur='+valeur;
	ajax.send(data);
}
function selectInView(option,toto)
{
	var ajax = getAjax();
	ajax.open("POST", "../Inscriptions/selectInView.php", true); 
	
	ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
	var selectDemandes=getDomObject('selectDemandes');
	selectDemandes.selectedIndex=0;
 	var data = 'option='+option;
 	if((option=='all')||(option=='none')||(option=='invert'))
 	{
 		/*alors je les choppe tous*/
 		var go=0;
 		while(1)
 		{
 			var checkBoxTemp=getDomObject('checkLine'+go);
 			if(checkBoxTemp==null)
 			{
 				break;
 			}
 			if(option=='all')
 			{
 				checkBoxTemp.checked=true;
 			}
 			else if(option=='none')
 			{
 				checkBoxTemp.checked=false;
 			}
 			else if(checkBoxTemp.checked==false)
 			{
 				checkBoxTemp.checked=true;
 			}
 			else
 			{
 				checkBoxTemp.checked=false;
 			}
 			go++;
 		}
 		
 	}
	ajax.send(data);
}
function cursorMoveOn(monDiv)
{
	monDiv.style.cursor="move";
}
function cursorMoveOff(monDiv)
{
	monDiv.style.cursor="default";
}
function cursorOn(monDiv)
{
	monDiv.style.cursor="pointer";
}
function cursorOff(monDiv)
{
	monDiv.style.cursor="default";
}
/*renvoie l'object dom correspondant à l'id passé en paramètre
normalement marche quelque soit le navigateur*/
function getDomObject(domObjectId)
{
	
	if (document.getElementById)
	{
		var domObject=document.getElementById(domObjectId);	
		return domObject;
	}
	if (document.all && !document.getElementById)
	{
		var domObject=document.all[domObjectId];
		return domObject;
	}
	if (document.layers)
	{
		var domObject=document.layers[domObjectId];
		return domObject;
	}
	return NULL;
}
function unselectAllColumnsOnScreen()
{
	/*je récupère le tableau*/
	var tableau=getDomObject('tabColonnes');
	var lignes=tableau.rows;
	/*puis pour toutes les lignes*/
	for(i=0;i<lignes.length;i++)
	{
		lignes[i].cells[0].style.background="#006699";
	}
}
function selectColonne(toto,indice)
{
	var ajax = getAjax();
	ajax.open("POST", "../Inscriptions/selectColonne.php", true);  
	ajax.onreadystatechange = function(){ 
	   if(ajax.readyState == 4)
	   {	
			toto.style.background="#6699CC";
	   }
	} 
	ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
	/*puis on envoie!!*/
 	var data = 'indice='+indice;
 	unselectAllColumnsOnScreen();
	ajax.send(data); 
}
function focusEntreeColonne(indice)
{
	indice=parseInt(indice)+2;
	/*je récupère le tableau*/
	var tableau=getDomObject('tableauColonnes');
	var lignes=tableau.rows;
	/*puis pour toutes les lignes*/
	var i=2;
	for(i=2;i<lignes.length;i++)
	{
		if(i==indice)
		{
			lignes[i].cells[1].style.backgroundColor="#49a6f2";
			lignes[i].cells[1].style.backgroundImage="none";
		}
		else
		{
			lignes[i].cells[1].style.backgroundColor="";
			lignes[i].cells[1].style.backgroundImage="url('../Inscriptions/images_admin/fenetreBloc.png')";
		}
	}
}
function selectionnerEntreeFenetreColonne(indice)
{
	var ajax = getAjax();
	ajax.open("POST", "../Inscriptions/selectColonne.php", true);  
	ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
	/*puis on envoie!!*/
 	var data = 'indice='+indice;
 	focusEntreeColonne(indice);
	ajax.send(data); 
}
function getAjax()
{
	var ajax = null;
	if(window.XMLHttpRequest) // Firefox
	{
	   ajax = new XMLHttpRequest();
	}
	else
	{
		if(window.ActiveXObject) // Internet Explorer 
		{
	   		ajax = new ActiveXObject("Microsoft.XMLHTTP");
	    } 
		else
		{ // XMLHttpRequest non supporté par le navigateur 
		    alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest..."); 
   			return NULL; 
		}
	}
	return ajax;
	
}
function moveSelected(direction)
{
	var ajax = getAjax();
	ajax.open("POST", "../Inscriptions/moveColumn.php", true); 
	ajax.onreadystatechange = function(){ 
	   if(ajax.readyState == 4)
	   {	
	   	afficherConfiguration(2);
	   	//alert('ok');
	   }
	} 
	ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
	/*puis on envoie!!*/
 	var data = 'direction='+direction;
 	//unselectAllColumnsOnScreen();
	ajax.send(data); 
}
/*la fonction qui va provoquer la requette avec les colonnes voulues (et les filtres)*/
function appliquer()
{
	var ajax = getAjax();	 
	ajax.open("POST", "../Inscriptions/appliquer.php", true); 
	ajax.onreadystatechange = updateContent(ajax,'retourSelections');	 
	ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
	/*puis on envoie!!*/
 	var data = 'indice=rien';
	ajax.send(data); 
}
function displayMailEditor()
{
	var ajax = getAjax();	 
	ajax.open("POST", "../Inscriptions/getMailEditor.php", true); 
	ajax.onreadystatechange = updateContent(ajax,'actionDiv');	 
	ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
	/*puis on envoie!!*/
 	var data = 'indice=rien';
	ajax.send(data); 
}
function saveMail()
{
	var ajax = getAjax();	 
	ajax.open("POST", "../Inscriptions/saveMail.php", true); 
	ajax.onreadystatechange = updateContent(ajax,'actionDiv');	 
	ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
	/*on choppe le contenu du champ de texte*/
	var champTexte=getDomObject('corpsMail');
 	var data='corps='+champTexte.value;
 	var nomProto=getDomObject('protoName');
 	data+='&nom='+nomProto.value;
  	var selectPieceJointe=getDomObject('selectPieceJointe');
  	if(selectPieceJointe.selectedIndex!=0)
  	{
  		var nomPieceJointe=selectPieceJointe.options[selectPieceJointe.selectedIndex].value;
  	}
  	else
  	{
  		var nomPieceJointe='';
  	}
  	data+='&nomPieceJointe='+nomPieceJointe;
	ajax.send(data); 
}
function deleteMail()
{
	var ajax = getAjax();	 
	ajax.open("POST", "../Inscriptions/deleteMail.php", true); 
	ajax.onreadystatechange = updateContent(ajax,'actionDiv');	 
	ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
 	var nomProto=getDomObject('protoName');
 	var data='nom='+nomProto.value;
	ajax.send(data); 
}
function loadMail(proto_id)
{
	var ajax = getAjax();	 
	ajax.open("POST", "../Inscriptions/loadMail.php", true); 
	ajax.onreadystatechange = updateContent(ajax,'actionDiv');	 
	ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
 	var data='proto_id='+proto_id;	
	ajax.send(data); 
}
function resetMailEditor()
{
	var corps=getDomObject('corpsMail');
	corps.value='';
	var nom=getDomObject('protoName');
	nom.value='';
}
function sendMail()
{
	var ajax = getAjax();	 
	ajax.open("POST", "../Inscriptions/sendMail.php", true); 
	ajax.onreadystatechange = updateContent(ajax,'actionDiv');	 
	ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
	var champTexte=getDomObject('corpsMail');
 	var data='corps='+champTexte.value;
 	var nomProto=getDomObject('protoName');
 	data+='&nom='+nomProto.value;
 	var selectPieceJointe=getDomObject('selectPieceJointe');
 	var nomPieceJointe=selectPieceJointe.options[selectPieceJointe.selectedIndex].value;
 	if(selectPieceJointe.selectedIndex==0)
 	{
 		nomPieceJointe='';
 	}
  	data+='&nomPieceJointe='+nomPieceJointe;
	ajax.send(data); 
}
function displayFileEditor()
{
	var ajax = getAjax();	 
	ajax.open("POST", "../Inscriptions/displayFileEditor.php", true); 
	ajax.onreadystatechange = updateContent(ajax,'actionDiv');	 
	ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
	
	ajax.send('params=rien'); 
}
function displayStatusEditor()
{
	var ajax = getAjax();	 
	ajax.open("POST", "../Inscriptions/displayStatutEditor.php", true); 
	ajax.onreadystatechange = updateContent(ajax,'actionDiv');	 
	ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
	
	ajax.send('params=rien'); 
}
function changeStatut()
{
	var ajax = getAjax();	 
	ajax.open("POST", "../Inscriptions/changeStatut.php", true); 
	ajax.onreadystatechange = updateContent(ajax,'actionDiv');	 
	ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
	/*on récupère le paramètre à passer*/
	var selectStatut=getDomObject('selectStatut');
	var indice=selectStatut.options[selectStatut.selectedIndex].value;
	var data='indice='+indice;
	ajax.send(data);
}
function supprimerDemande()
{
	if(confirm('Voulez vous vraiment supprimer?(les demandes selectionnées seront effacées de façon définitive)'))
	{
		var ajax = getAjax();	 
		ajax.open("POST", "../Inscriptions/supprimerDemande.php", true); 
		ajax.onreadystatechange = updateContent(ajax,'actionDiv');	 
		ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
		ajax.send('rien');
		/*puis on raffraichi l'affichage*/
		//appliquer();
	}
	
}
function saveConfig()
{
	var ajax = getAjax();	 
	ajax.open("POST", "../Inscriptions/saveConfig.php", true); 
	ajax.onreadystatechange = updateContent(ajax,'barreConfig');	 
	ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
	var nomConfig=getDomObject('configName');
	var data='nom_config='+nomConfig.value;
	ajax.send(data);
}
function chargerConfiguration()
{
	var ajax = getAjax();	 
	ajax.open("POST", "../Inscriptions/loadConfig.php", true); 
	ajax.onreadystatechange =function()
	{
		if(ajax.readyState == 4)
		{	
			afficherConfiguration(2);
		}	
	}	 
	ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
	var selectConfig=getDomObject('selectConfiguration');
	var indice=selectConfig.selectedIndex;
	var data='nom_config='+selectConfig.options[indice].value;
	ajax.send(data);
	
}
function loadConfig()
{
	var ajax = getAjax();	 
	ajax.open("POST", "../Inscriptions/loadConfig.php", true); 
	ajax.onreadystatechange = updateContent(ajax,'barreConfig');	 
	ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
	var selectConfig=getDomObject('selectConfig');
	var indice=selectConfig.selectedIndex;
	var data='nom_config='+selectConfig.options[indice].value;
	ajax.send(data);
}
/*deplacer la fenetre avec la souris*/
var positionXDepartSouris;
var positionYDepartSouris;
var positionXDepartFenetre;
var positionYDepartFenetre;
var selectedWindow;
var move=0;
function startMoveWindow(event,fenetreId)
{
	selectedWindow=fenetreId;
	move=1;
	positionXDepartSouris=event.clientX;
	positionYDepartSouris=event.clientY;
	var fenetre=getDomObject(fenetreId);
	var temp=fenetre.style.left;
	//alert(temp);
	positionXDepartFenetre=temp.substr(0,temp.indexOf('px'));
	var temp=fenetre.style.top;
	positionYDepartFenetre=temp.substr(0,temp.indexOf('px'));
	
	//alert('positionXDepartFenetre'+positionXDepartFenetre+'positionYDepartFenetre'+positionYDepartFenetre+'positionXDepartSouris'+positionXDepartSouris+'positionYDepartSouris'+positionYDepartSouris);
}
function stopMoveWindow()
{
	if(move==1)
	{
		//alert('stop');
		move=0;
	}
}
function MoveWindow(event)
{
	if(move==1)
	{
	//alert('positionXDepartSouris'+positionXDepartSouris+'positionYDepartSouris'+positionYDepartSouris);
		var fenetre=getDomObject(selectedWindow);
		var eventY=event.clientY;
		var deltaY=eventY-positionYDepartSouris;
		var nouveauY=positionYDepartFenetre+deltaY+'px';
		if(deltaY<0)
		{
			var nouveauY=(Math.abs(positionYDepartFenetre)-Math.abs(deltaY))+'px';
		}
		else
		{
			var nouveauY=(Math.abs(positionYDepartFenetre)+Math.abs(deltaY))+'px';
		}
		var eventX=event.clientX;
	//	alert('eventX'+eventX+'eventY'+eventY);
	//	alert('positionXDepartFenetre'+positionXDepartFenetre+'positionYDepartFenetre'+positionYDepartFenetre);
		var deltaX=eventX-positionXDepartSouris;
		if(deltaX<0)
		{
			var nouveauX=(Math.abs(positionXDepartFenetre)-Math.abs(deltaX))+'px';
		}
		else
		{
			var nouveauX=(Math.abs(positionXDepartFenetre)+Math.abs(deltaX))+'px';
		}
		//alert('nouveauX'+nouveauX+'nouveauY'+nouveauY);
		fenetre.style.top=nouveauY;
		fenetre.style.left=nouveauX;
	}
}
/*rendre visible ou cacher
suivant la valeur d'option=> 0 pour juste la fenetre des colonnes
1 pour les filtres
2 pour les colonnes & les filtres
*/
function alternerAffichageConfiguration(option)
{
	if((option==0)||(option==2))
	{
		//fenetreColonnes=getDomObject('fenetreColonnesDiv');
		fenetreColonnes=document.getElementById("fenetreColonnesDiv");
		if(fenetreColonnes.style.visibility=="visible")
		{
	   	fenetreColonnes.style.visibility="hidden"
	   	fenetreColonnes.style.display="none"
	 	}
		else
		{
			afficherConfiguration(option);
	 	}
	}
	if((option==1)||(option==2))
	{
		//fenetreFiltre=getDomObject('fenetreFiltresDiv');
		fenetreFiltre=document.getElementById("fenetreFiltresDiv");
		if(fenetreFiltre.style.visibility=="visible")
		{
	   	fenetreFiltre.style.visibility="hidden"
	   	fenetreFiltre.style.display="none"
	 	}
		else
		{
			afficherConfiguration(option);
	 	}
	}
}
/*charger le contenu de la fenetre de colonnes et de filtres
suivant la valeur d'option=> 0 pour juste la fenetre des colonnes
1 pour les filtres
2 pour les colonnes & les filtres
*/
function afficherConfiguration(option)
{
	var ajax = getAjax();	 
	ajax.open("POST", "../Inscriptions/afficherConfiguration.php", true);  
	ajax.onreadystatechange = function(){ 
	   if(ajax.readyState == 4)
	   {
	   	/*on choppe la partie sur fenetreColonne cad entre <fenetreColonne> et</fenetreColonne>*/
	   	var retour=ajax.responseText;
	   	var positionDebutC=retour.indexOf('<fenetreColonnes>',0);
	   	positionDebutC+=17;
	   	var positionFinC=retour.indexOf('</fenetreColonnes>',0);
	   	var partieColonnes=retour.substring(positionDebutC,positionFinC);
	   	var positionDebutF=retour.indexOf('<fenetreFiltres>',0);
	   	positionDebutF+=16;
	   	var positionFinF=retour.indexOf('</fenetreFiltres>',0);
	   	var fenetreColonnes=getDomObject('fenetreColonnesDiv');
	   	var partieFiltres=retour.substring(positionDebutF,positionFinF);
	   	var fenetreFiltres=getDomObject('fenetreFiltresDiv');
	   	
	   	if((option==0)||(option==2))
	   	{
		   	fenetreColonnes.innerHTML=partieColonnes;
		   	fenetreColonnes.style.top=10;
		   	fenetreColonnes.style.left=15;
		   	fenetreColonnes.style.visibility="visible"
	   		fenetreColonnes.style.display="block"  		
		   }
	   	if((option==1)||(option==2))
	   	{
	   		fenetreFiltres.innerHTML=partieFiltres;
	   		fenetreFiltres.style.top=15;
	   		fenetreFiltres.style.left=250;
	   		fenetreFiltres.style.visibility="visible"
	   		fenetreFiltres.style.display="block"
	   	}
	   	/*on récupère l'indice selectioné*/
	   	var positionDebutS=retour.indexOf('<selected>',0);
	   	positionDebutS+=10;
	   	var positionFinS=retour.indexOf('</selected>',0);
	   	if(positionDebutS!=positionFinS)
	   	{
	   		var indice=retour.substring(positionDebutS,positionFinS);
	   		focusEntreeColonne(indice);
	   	}
	   }
	}
	ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
	ajax.send('');
}

function deleteConfig()
{
	var ajax = getAjax();	 
	ajax.open("POST", "../Inscriptions/deleteConfig.php", true); 
	ajax.onreadystatechange = updateContent(ajax,'barreConfig');	 
	ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
	var selectConfig=getDomObject('selectConfig');
	var indice=selectConfig.selectedIndex;
	var data='nom_config='+selectConfig.options[indice].value;
	ajax.send(data);
}

}



Voilà l'intégralité de mon code comme il est dans mon site. Merci encore de m'aider vous ne savez pas à quel point c'est important pour moi.
0
jordane45 Messages postés 38144 Date d'inscription mercredi 22 octobre 2003 Statut Modérateur Dernière intervention 21 avril 2024 4 650 > Nanashi17 Messages postés 193 Date d'inscription mardi 28 mars 2017 Statut Membre Dernière intervention 19 juin 2017
12 juin 2017 à 15:59
Dans le code généré ... je ne vois pas :
Le début des balises HTML
Il y a deux <body>
...

Sans parler du code un peu bordélique ....
Pourquoi mettre du STYLE directement dans tes fichiers au lieu d'utiliser des fichiers CSS ??
Pourquoi faire du code redondant comme la connexion à la bdd ?? (alors que tu le placerais dans un fichier qui tu importerais dans tes différentes page ça serait plus propore ...)

... et puis... visiblement ton code est lié à du WordPress ......
Je pense que le mieux serait de poser la question dans le forum dédié à wordpress non ??


A tout hasard pourtant .... pourquoi avoir mis du html dans ton fichier admin ??
<html>
<body>
<?php
error_reporting(E_ALL);
ini_set('display-errors','on');
	echo '<script type="text/JavaScript" src="/wp-admin/Plugin_ARPAE/Inscriptions/scriptDemandes.js"></script>';
	/*les couleurs de fond des menus*/
	$bgcolor='#006699';
	$bgcolor2='#6699CC';

	//Ca ne va pas plus loin dans l'execution
	require'adminFonctions.php';
	pageGestionDemandes(FALSE);
?>
</body>
</html>

Les balises html et body sont en trop !!! c'est même une grosse erreur de débutant !
0
Nanashi17 Messages postés 193 Date d'inscription mardi 28 mars 2017 Statut Membre Dernière intervention 19 juin 2017 99 > jordane45 Messages postés 38144 Date d'inscription mercredi 22 octobre 2003 Statut Modérateur Dernière intervention 21 avril 2024
13 juin 2017 à 09:35
Il s'agit du vieux code d'il y a plus de 10 ans c'est pour cela. Regarde dans le code source que je t'ai donnée, il n'y a pas 2 body. Le deuxième apparait lors de l'execution je ne comprend rien.

Enfin bref, ça ne sert plus à rien de perdre du temps j'ai appris que j'étais viré donc ce sujet peut-être fermé. Merci quand même d'avoir essayé de m'aider.
0