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 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
|
<?php
$contenu = '0'; // le contenu de votre cookie
//setcookie("nom_cookie", $contenu, time()+36000);
// test l'existance d'un cookie apelé "nom_cookie"
if (!isset($_COOKIE["nom_cookie"])){
$_COOKIE["nom_cookie"] = "rien";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Document sans nom</title>
<script language="javascript">
function hideDiv() { //fonction pour fermer le popup
<?php
$_COOKIE["nom_cookie"] = "dejaouvert";
?>
if (document.getElementById) { // DOM3 = IE5, NS6
document.getElementById('hideshow').style.visibility = 'hidden';
} else {
if (document.layers) { // Netscape 4
document.hideshow.visibility = 'hidden';
} else { // IE 4
document.all.hideshow.style.visibility = 'hidden';
}
}
}
function showDiv() { //fonction qui affiche le popup
if (document.getElementById) { // DOM3 = IE5, NS6
document.getElementById('hideshow').style.visibility = 'visible';
} else {
if (document.layers) { // Netscape 4
document.hideshow.visibility = 'visible';
} else { // IE 4
document.all.hideshow.style.visibility = 'visible';
}
}
}
</script>
<style type="text/css">
body {
}
#hideshow {
position:absolute;
width:100%;
height:100%;
top:0;
left:0;
}
.popup_block {
/* background:url(167985-capture.png);*/
background: #369;
padding:10px 120px; /*taille du popup*/
border:1px solid #fff; /*taille de la bordure*/
float:left;
width:480px;
position:fixed;
top:20%; /*positionnement verticlale*/
left:40%; /*positionnement horizontale*/
margin:0 0 0 -250px;
z-index:100;
}
.cntrl { /*image quitte le popup*/
position:absolute;
right:-10px;
top:-5px;
}
.closeperso { /*image quitte le popup*/
position:absolute;
right:-20px;
top:-20px;
}
* html #fade {
position:absolute;
top:expression(eval(document.compatMode && document.compatMode == 'CSS1Compat') ? documentElement.scrollTop : document.body.scrollTop );
}
* html .popup_block {
position: absolute;
top: expression(eval(document.compatMode && document.compatMode == 'CSS1Compat') ? documentElement.scrollTop + (( documentElement.clientHeight-this.clientHeight )/2 ) : document.body.scrollTop + (( document.body.clientHeight-this.clientHeight )/2 ) ) ;
left: expression(eval(document.compatMode && document.compatMode == 'CSS1Compat') ? documentElement.scrollLeft + ( document.body.clientWidth/2 ) : document.body.scrollLeft + ( document.body.offsetWidth/2 ) );
}
</style>
</head>
<body>
<script type="text/javascript">
window.onload=function() {
<?php
echo $_COOKIE["nom_cookie"];
if ($_COOKIE["nom_cookie"] != "dejaouvert"){
echo "showDiv();\n\r";
}
else
{
echo "showDiv();\n\r";
}
?>
showDiv();
}
</script>
<a href="javascript:showDiv()">Cliquez moi pour voir la
popup</a>
<div id="hideshow" style="visibility: hidden;">
<div id="fade"></div>
<div class="popup_block"> <a href="javascript:hideDiv()"><img src="close.png" class="cntrl" height="50" width="50" /> </a>
<h3>Inscrivez-vous à notre Newsletter</h3>
<table border="0" cellpadding="3" width="471">
<tbody>
<tr>
<td> <img src="newsletter.png" alt="NewsLetter de bert-achat.com" height="150" width="150" /> </td>
<td>
<form action="record_mail/recordmails.php" target="_blank" method="post" onsubmit="<?php echo $fonctiona;?>">
<b> Votre E-Mail :</b><br />
<input name="email" id="email" size="50" type="text" /> <input name="mail" id="recordmail" value="Enregistrée." type="submit" />
</form>
</td>
</tr>
<tr>
<td> </td>
<td> <small>
Jaccepte de recevoir des offres promotionnelles de vos partenaires
</small> </td>
</tr>
</tbody>
</table>
</div>
</div>
<?php
echo $_COOKIE["nom_cookie"];
?>
</body>
</html> |
Partager