Bonjour à toutes et à tous,

pour mon site j'ai réaliser un petit bandeau que j'affiche grâce à une include. Ce bandeau apparait dans le haut de ma page.

et voici son code:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
 
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
 
 
<style type="text/css">
 
#ex5 { width: 100%; margin: 0 auto; min-height: 200px; }   #ex5 img { margin: 25px; opacity: 0.8; border: 10px solid #eee;   /*Transition*/ -webkit-transition: all 0.5s ease; -moz-transition: all 0.5s ease; -o-transition: all 0.5s ease;   /*Reflection*/ -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.1))); }     #ex5 img:hover { opacity: 1;   /*Reflection*/ -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.4)));   /*Glow*/ -webkit-box-shadow: 0px 0px 20px rgba(255,255,255,0.8); -moz-box-shadow: 0px 0px 20px rgba(255,255,255,0.8); box-shadow: 0px 0px 20px rgba(255,255,255,0.8); }
 
			#text h2 {
        color: #fff;
        text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff, 0 0 20px #ff2d95, 0 0 30px #ff2d95, 0 0 40px #ff2d95, 0 0 50px #ff2d95, 0 0 75px #ff2d95;
        letter-spacing: 5px;
		font-size:26px;
        font:  'MisoRegular';
}
 
	</style>
	<!--[if IE]>
	<style>
		.example-date .example-year {
			filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
			right:-15px; top:5px;
		}
	</style>
	<![endif]-->
  <script type="text/javascript">
function afficher_cacher(id)
{
        if(document.getElementById(id).style.display=="none")
        {
                document.getElementById(id).style.display="block";
                document.getElementById('bouton_'+id).innerHTML='Cacher le texte';
        }
        else
        {
                document.getElementById(id).style.display="none";
                document.getElementById('bouton_'+id).innerHTML='Afficher le texte';
        }
        return true;
}
  </script>
</head>
 
<body >
<div id="acacher">
<div id="containerEx5" style="width:100%; text-align:center">
 
	    <div id="ex5" style="text-align:center" align="center"> 
	      <p><a href="http://localhost/NEOGETCASH/PARAMETRES"><img src="images/administrator.png" onmouseover="admin()" onmouseout="admin2()"></a>
	        <a href="http://localhost/NEOGETCASH/COMPTA"><img src="images/compta.png"  onmouseover="compta()" onmouseout="compta2()"></a>
	        <a href="http://localhost/NEOGETCASH/COMMERCIAL"><img src="images/commercial.png" onmouseover="com()" onmouseout="com2()"></a>
	        <a href="http://localhost/NEOGETCASH/GESTIONNAIRE"><img src="images/gestionnaire.png" onmouseover="ges()" onmouseout="ges2()"></a>
	        <a href="http://localhost/NEOGETCASH/GESTIONNAIRE/DOSSIERS/deconnection.php"><img src="images/246.png" onmouseover="deco()" onmouseout="ges2()"></a>
          </p>
 
    </div>
 
    </div>
       <script type="text/javascript">
	function admin()
	{
		  var txt=document.getElementById("text")
  		  txt.innerHTML="<h2><center>Acc&egrave;s Administrateur</center></h2>";
	}
		function admin2()
	{
		  var txt=document.getElementById("text")
  		  txt.innerHTML="";
	}
		function compta()
	{
		  var txt=document.getElementById("text")
  		  txt.innerHTML="<h2><center>Acc&egrave;s Comptable</center></h2>";
	}
		function compta2()
	{
		  var txt=document.getElementById("text")
  		  txt.innerHTML="";
	}
			function com()
	{
		  var txt=document.getElementById("text")
  		  txt.innerHTML="<h2><center>Acc&egrave;s Commercial</center></h2>";
	}
		function com2()
	{
		  var txt=document.getElementById("text")
  		  txt.innerHTML="";
	}
			function ges()
	{
		  var txt=document.getElementById("text")
  		  txt.innerHTML="<h2><center>Acc&egrave;s Gestionnaire</center></h2>";
	}
		function ges2()
	{
		  var txt=document.getElementById("text")
  		  txt.innerHTML="";
	}
	function deco()
	{
		  var txt=document.getElementById("text")
  		  txt.innerHTML="<h2><center>D&eacute;connexion</center></h2>";
	}
    </script>
      <div id="text" style="text-align:center; ">
      </div></div>
      <span class="bouton" id="bouton_texte" onclick="javascript:afficher_cacher('acacher');" style="text-align:right"><img src='images/Display.png' /></span>
</body>
</html>
ce code est donc affiché dans toutes mes pages grâce à la fonction include.

j'ai donc dans ce code ci une fonction qui permet de rétracter ce bandeau afin de le cacher, grâce à un display:none.

Le soucis c'est que lorsque je change de page, il réapparait. Ce que je souhaiterais, c'est garder en mémoire le choix de l'utilisateur. mais cela étant je ne sais pas combiner javascript et php, étant donné que je ne sais pas utiliser ajax.

Je pens&ais utiliser les variables globales mais je ne sais pas encore comment procéder.

Pouvez vous m'aider sur ce qui est le mieux.

Par avance merci.