hmm den siger der er fejl på siden. Jeg kan ikke helt forstå det. Jeg prøver lige at kopiere det hele ind.
Efter indsat:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "
http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="
http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<? // MENU ?>
<style type="text/css">
#dropmenudiv{
position:absolute;
border:1px solid black;
border-bottom-width: 0;
font:normal 12px Verdana;
line-height:18px;
z-index:100;
}
#dropmenudiv a{
width: 100%;
display: block;
text-indent: 3px;
border-bottom: 1px solid black;
padding: 1px 0;
text-decoration: none;
font-weight: bold;
}
#dropmenudiv a:hover{ /*hover background color*/
background-color: grey;
}
</style>
<?
//ARTIKEL
$sql = "SELECT * FROM oelfam WHERE niveau='2' AND folder='4' ORDER BY id DESC LIMIT 5";
$query_menu = mysql_query($sql) or die(mysql_error());
echo '
<script type="text/javascript">
//Contents for menu 1
var menu1=new Array()
';
$arrayIdx = 0;
while ($r_menu = mysql_fetch_array($query_menu))
{
$url = $r_menu["url"];
$titel = $r_menu["overskrift"];
echo "menu1[$arrayIdx]='<a href=\"$url\">$titel</a>'\n";
$arrayIdx++;
}
?>
</script>
<script type="text/javascript">
/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (
www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit
http://www.dynamicdrive.com/ for full source code
***********************************************/
//Contents for menu 2, and so on
var menu2=new Array()
menu2[0]='<a href="
http://cnn.com">CNN</a>'menu2[1]='<a href="
http://msnbc.com">MSNBC</a>'menu2[2]='<a href="
http://news.bbc.co.uk">BBC News</a>'
var menuwidth='165px' //default menu width
var menubgcolor='lightyellow' //menu bgcolor
var disappeardelay=250 //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?
/////No further editting needed
var ie4=document.all
var ns6=document.getElementById&&!document.all
if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')
function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}
function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top="-500px"
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}
function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}
function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}
function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)
if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}
return clickreturnvalue()
}
function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}
function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}
function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}
function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}
function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}
function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}
if (hidemenu_onclick=="yes")
document.onclick=hidemenu
</script>
<? // MENU SLUT ?>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="description" content="Your description goes here" />
<meta name="keywords" content="your,keywords,goes,here" />
<meta name="author" content="Your Name / Original design: Gerhard Erbes - gw@actamail.com/" />
<link rel="stylesheet" type="text/css" href="./css/style.css" />
<title>Oelfam.com</title>
</head>
<body>
<div id="wrap">
<!-- HEADER -->
<!-- Background -->
<div id="header-section">
<?
$top = mysql_fetch_array(mysql_query("SELECT * FROM `oelfam_top` ORDER BY id DESC limit 1"));
$top2 = rand(1, $top['id']);
$top3 = mysql_fetch_array(mysql_query("SELECT * FROM `oelfam_top` WHERE `id` = '$top2'"));
?>
<a href="#"><img id="header-background-left" src="./img/img_logo.png" alt=""/></a>
<img id="header-background-right" src="<? echo $top3['url']; ?>" alt=""/>
</div>
<!-- Navigation -->
<div id="header">
<div align="center"><ul>
<li><a href="?">Main</a></li>
<? //UPPER MENU ?>
<?
//ARTIKEL
$query_menu = mysql_query("SELECT * FROM `oelfam` WHERE `niveau` = '2' and `folder` = '4' ORDER BY id DESC limit 1");
while($r_menu = mysql_fetch_array($query_menu)) { ?>
<li><a href="?visnyhed=1&id=<? echo $r_menu['id']; ?>" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu1, '150px')" onMouseout="delayhidemenu()">Nyeste Artikel</a></li>
<? }
//BIOGRAPHY
$query_menu = mysql_query("SELECT * FROM `oelfam` WHERE `niveau` = '2' and `folder` = '4' ORDER BY id DESC limit 1");
while($r_menu = mysql_fetch_array($query_menu)) { ?>
<li><a href="?visnyhed=1&id=<? echo $r_menu['id']; ?>" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu2, '150px')" onMouseout="delayhidemenu()">Nyeste Artikel</a></li>
<? }
//WORD
$query_menu = mysql_query("SELECT * FROM `oelfam` WHERE `niveau` = '2' and `folder` = '6' ORDER BY id DESC limit 1");
while($r_menu = mysql_fetch_array($query_menu)) {
if($_GET['visnyhed'] == 1 and $_GET['id'] == $r_menu['id']){?>
<li class="selected">Nyeste Ord</li><? }else{ ?>
<li><a href="?visnyhed=1&id=<? echo $r_menu['id']; ?>">Nyeste Ord</a></li><? } }
//MEDIA
$query_menu = mysql_query("SELECT * FROM `oelfam` WHERE `niveau` = '2' and `folder` = '7' ORDER BY id DESC limit 1");
while($r_menu = mysql_fetch_array($query_menu)) {
if($_GET['visnyhed'] == 1 and $_GET['id'] == $r_menu['id']){?>
<li class="selected">Nyeste Fil</li><? }else{ ?>
<li><a href="?visnyhed=1&id=<? echo $r_menu['id']; ?>">Nyeste Fil</a></li><? } }
//EKSPERTRÅD
$query_menu = mysql_query("SELECT * FROM `oelfam` WHERE `niveau` = '2' and `folder` = '471' ORDER BY id DESC limit 1");
while($r_menu = mysql_fetch_array($query_menu)) {
if($_GET['visnyhed'] == 1 and $_GET['id'] == $r_menu['id']){?>
<li class="selected">Nyeste Råd</li><? }else{ ?>
<li><a href="?visnyhed=1&id=<? echo $r_menu['id']; ?>">Nyeste Råd</a></li><? } }
//PROFIL
$query_menu = mysql_query("SELECT * FROM `oelfam` WHERE `niveau` = '2' and `folder` = '144' ORDER BY id DESC limit 1");
while($r_menu = mysql_fetch_array($query_menu)) {
if($_GET['visnyhed'] == 1 and $_GET['id'] == $r_menu['id']){?>
<li class="selected">Nyeste Profil</li><? }else{ ?>
<li><a href="?visnyhed=1&id=<? echo $r_menu['id']; ?>">Nyeste Profil</a></li><? } }
//UPPER MENU SLUT ?>
</ul></div>
</div>
<!-- LEFT COLUMN -->
<!-- Navigation -->
<div id="left-column">
<ul>
<? //MENU 1 ?>
<li class="left-navheader-first">Menu</li>
<? $query_menu = mysql_query("SELECT * FROM `oelfam` WHERE `niveau` = '0' and `type` = 1 and `id` != '12' and `id` != '13' and `id` != '14' ORDER BY prioritet ASC");
echo mysql_error();
while($r_menu = mysql_fetch_array($query_menu)) {
$id_menu = $r_menu['id'];
$overskrift_menu = $r_menu['overskrift'];
$indhold_menu = $r_menu['indhold'];
$kode_menu = $r_menu['kode'];
?>
<li><a class="left-navheader" href="?"><big>Home</big><i>(at Oels)</i></a></li>
<?
//KODER!!!
echo $indhold_menu;
eval($kode_menu);
if($_SESSION['loggedind'] == "ok"){
$query_menu2 = mysql_query("SELECT * FROM `oelfam` WHERE `folder` = '140' or `id` = '144' or `folder` = '$id_menu' ORDER BY prioritet ASC");
}else{
$query_menu2 = mysql_query("SELECT * FROM `oelfam` WHERE `folder` = '$id_menu' or `id` = '144' ORDER BY overskrift ASC");
}
echo mysql_error();
while($r_menu2 = mysql_fetch_array($query_menu2)) {
$id_menu2 = $r_menu2['id'];
$overskrift_menu2 = $r_menu2['overskrift'];
$indhold_menu2 = $r_menu2['indhold'];
$manchet_menu2 = $r_menu2['manchet'];
$type_menu2 = $r_menu2['type'];
if($id_menu2 == $_GET['id'] && $_GET['niveau'] == '1'){?>
<li class="selected"><? echo $overskrift_menu2; ?><small><em><? if($manchet_menu2){?>(<? echo $manchet_menu2; ?>)<? } ?></em></small></li>
<? }else{
if($id_menu2 == 396 or $id_menu2 == 2){}else{
?>
<li><a href="<? echo '?niveau=1&id=' . $id_menu2 . '&type=' . $type_menu2; ?>"><? echo $overskrift_menu2; ?><small><em><? if($manchet_menu2){?>(<? echo $manchet_menu2; ?>)<? } ?></em></small></a></li>
<? } } }
} ?>
</ul>
</div>
<!-- RIGHT COLUMN -->
<div id="right-column">
<?
if($_SESSION['loggedind'] == "ok"){
$query_nyhed = mysql_query("SELECT * FROM `oelfam` WHERE `id` = '142' or `id` = '12' or `id` = 140 ORDER BY prioritet asc");
}else{
$query_nyhed = mysql_query("SELECT * FROM `oelfam` WHERE `id` = '142' or `id` = '12' or `id` = 140 ORDER BY prioritet asc");
}
while($r_nyhed1 = mysql_fetch_array($query_nyhed)) {
?>
<? if($r_nyhed1['farve'] == 'ww'){?> <div class="right-column-box-white"><div class="right-column-box-title-grey"><?
}elseif($r_nyhed1['farve'] == 'bw'){?> <div class="right-column-box-white"><div class="right-column-box-title-blue"><?
}elseif($r_nyhed1['farve'] == 'bb'){?> <div class="right-column-box-blue"><div class="right-column-box-title-blue"><?
}elseif($r_nyhed1['farve'] == 'gw'){?> <div class="right-column-box-white"><div class="right-column-box-title-green"><?
}elseif($r_nyhed1['farve'] == 'gg'){?> <div class="right-column-box-green"><div class="right-column-box-title-green"><?
}elseif($r_nyhed1['farve'] == 'rw'){?> <div class="right-column-box-white"><div class="right-column-box-title-red"><?
}elseif($r_nyhed1['farve'] == 'rr'){?> <div class="right-column-box-red"><div class="right-column-box-title-red"><?
}elseif($r_nyhed1['farve'] == 'yw'){?> <div class="right-column-box-white"><div class="right-column-box-title-yellow"><?
}elseif($r_nyhed1['farve'] == 'yy'){?> <div class="right-column-box-yellow"><div class="right-column-box-title-yellow"><?
}else{?> <div class="right-column-box-white"><div class="right-column-box-title-grey"><? } ?>
<? echo $r_nyhed1['overskrift']; ?></div>
<? echo $r_nyhed1['indhold'];
eval($r_nyhed1['kode']); ?>
</div>
<? } ?>
</div>