Code:
<?php
$homepage = 'http://'.$_SERVER["HTTP_HOST"].'/';
if ($_REQUEST['act'] == "setLang") {
//check to see if the form has been submitted!
if ($_REQUEST['lang'] == "") {
header('Location: '.$_SERVER["PHP_SELF"]);
//if language selection is empty, redirect to form!
}
else {
//if language was selected, save it in a cookie, then redirect to appropriate page!
$lang = $_REQUEST['lang'];
setcookie("language, $lang, time()+3600);
header('Location: '.$homepage.$lang.'/index'.$lang.'.html');
}
}
else {
//if form has not been submitted
if (@$_COOKIE['language'] != "") {
/* check to see if language cookie is empty. If not, redirect to appropriate page. */
header('Location: '.$homepage.$_COOKIE["language"].'/index'.$_COOKIE["language"].'.html');
}
else {
//if cookie is empty, display form
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Welcome to the official website of Ceci Casariego Mazereel</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="imagetoolbar" content="no">
<link href="stylesheet.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.id {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 8px;
color: #000000;
}
-->
</style>
</head>
<style>
a:hover{text-decoration:none}
</style>
<style type="text/css">
<!--
body
{
scrollbar-face-color:white;
scrollbar-arrow-color:white;
scrollbar-track-color:white;
scrollbar-shadow-color:white;
scrollbar-highlight-color:white;
scrollbar-3dlight-color:white;
scrollbar-darkshadow-Color:white;
background-attachment: fixed;
}
-->
</style>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<script language=JavaScript>
<!--
var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu=new Function("return false")
// -->
</script>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td align="center" valign="middle">
<table width="500" border="0" cellpadding="0" cellspacing="0">
<tr><td height="410">
<table width="500" height="410" border="0" cellpadding="0" cellspacing="0" bgcolor=white>
<tr><td>
<div style="width:490px;height:400px;overflow:auto;">
<table width=90% height=100% align=center valign=middle>
<tr><td align=center valign=middle style="padding-top:10px; padding-bottom:10px;">
<img src="indexlogo.jpg" border="0">
<br>
<br>
<ilayer width=98% height=20 name="dep1">
<layer name="dep2" width=98% height=20>
</layer>
</ilayer>
<div id="describe" style="bgcolor:'white';width:200px;height:32px" onMouseover="clear_delayhide()" onMouseout="resetit(event)"></div>
<script language="JavaScript1.2">
var submenu=new Array()
submenu[0]='<font color="5A6673">Welcome to the official site of<br>Ceci Casariego-Mazereel</font>'
submenu[1]='<font color="5A6673">Bienvenu au site officiel de<br>Ceci Casariego-Mazereel</font>'
submenu[2]='<font color="5A6673">Welkom op de officiële site van<br>Ceci Casariego-Mazereel</font>'
var delay_hide=10
var menuobj=document.getElementById? document.getElementById("describe") : document.all? document.all.describe : document.layers? document.dep1.document.dep2 : ""
function showit(which){
clear_delayhide()
thecontent=(which==-1)? "" : submenu[which]
if (document.getElementById||document.all)
menuobj.innerHTML=thecontent
else if (document.layers){
menuobj.document.write(thecontent)
menuobj.document.close()
}
}
function resetit(e){
if (document.all&&!menuobj.contains(e.toElement))
delayhide=setTimeout("showit(-1)",delay_hide)
else if (document.getElementById&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhide=setTimeout("showit(-1)",delay_hide)
}
function clear_delayhide(){
if (window.delayhide)
clearTimeout(delayhide)
}
function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}
</script>
<a href="?act=setLang&lang=EN" onMouseover="showit(0)"><img src="NL/img/icon/vlagEN.gif" style="border:0"></a>
<a href="?act=setLang&lang=FR" onMouseover="showit(1)"><img src="NL/img/icon/vlagFR.gif" style="border:0"></a>
<a href="?act=setLang&lang=NL" onMouseover="showit(2)"><img src="EN/img/icon/vlagNL.gif" style="border:0"></a>
<p>
<font class="id">
all content and visuals copyright 2004-2007<br>
best viewed with IE 5+ in 1280*1024 </font>
</td></tr></table>
</div>
</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
<?php
}
}
?>
Try that, it should work, but let me know if it doesn't.
Bookmarks