Avatar billede Heidi Juniormester
20. juli 2011 - 11:03

En god træ menu til PHP side?

Jeg har søgt og søgt, men kan ikke finde en god træ menu som fungere ordenligt til en PHP side.

Jeg er på udkig efter noget som ligner denne som jeg plejer at bruge på mine asp sider. Men den virker desværre ikke med php:

<%

Menupunkt1 = "<B>Front page</B>"
Link1 = "http://www.LINK.dk"

'--------------------------------------------
%>

<%

Menupunkt2 = "<B>LINK</B>"
Link2 = "http://www.link.asp?menupunkt=2"



'--------------------------------------------
%>

<%

Menupunkt3 = "<B>LINK</B>"
Link3 = "http://www.link.asp?menupunkt=3"

Undermenu3_1 = "undermenu"
    Underlink3_1 = "http://www.link.asp?menupunkt=3&undermenu=1"




'--------------------------------------------
%>



<%
   

'Disse variabler og funktioner skal der ikke
'pilles ved.
'--------------------------------------------
Selectedmenu = request("menupunkt")
Selectedunder = request("undermenu")
'--------------------------------------------
'Skulle du mod forventninger få problemer med
'scriptet ydes der support på email:
'td@vejen-net.dk
'--------------------------------------------
'Dette script må frit bruges sålænge der ikke
'ændres i nogen af script-kommentarene!!!
%>

<table border="0" cellpadding="0" cellspacing="0" width="100%">

<%If Menupunkt1 <> "" Then%>
  <TR VALIGN="top">
    <TD VALIGN="top" WIDTH="100%">
    <p align="left" style="word-spacing: 0; margin-left: 2; margin-right: 0; margin-top: 0; margin-bottom: 0"> <FONT STYLE="font size: 10pt; font-family: verdana"><%If Selectedmenu = 1 Then%><b><a href="<%=Link1%>" onFocus="if(this.blur)this.blur()" STYLE="text-decoration: none"><%=Menupunkt1%></a></b><%Else%><a href="<%=Link1%>" onFocus="if(this.blur)this.blur()" STYLE="text-decoration: none"><%=Menupunkt1%></a><%End If%></font></p>
      <%If Selectedmenu = 1 Then%>
      <%If Undermenu1_1 <> "" Then%><p align="left" style="word-spacing: 0; margin-left: 10; margin-right: 0; margin-top: 0; margin-bottom: 0"> <FONT STYLE="font size: 8pt; font-family: verdana">-
      <%If Selectedmenu = 1 AND Selectedunder = 1 Then%><b><a href="<%=Underlink1_1%>"  ><%=Undermenu1_1%></a></b><%Else%><a href="<%=Underlink1_1%>"  ><%=Undermenu1_1%></a><%End If%></I></font></p><%End If%>
      <%If Undermenu1_2 <> "" Then%><p align="left" style="word-spacing: 0; margin-left: 10; margin-right: 0; margin-top: 0; margin-bottom: 0"> <FONT STYLE="font size: 8pt; font-family: verdana"><I>-
      <%If Selectedmenu = 1 AND Selectedunder = 2 Then%><b><a href="<%=Underlink1_2%>"><%=Undermenu1_2%></a></b><%Else%><a href="<%=Underlink1_2%>"><%=Undermenu1_2%></a><%End If%></font></p><%End If%>
      <%If Undermenu1_3 <> "" Then%><p align="left" style="word-spacing: 0; margin-left: 10; margin-right: 0; margin-top: 0; margin-bottom: 0"> <FONT STYLE="font size: 8pt; font-family: verdana"><I>-
      <%If Selectedmenu = 1 AND Selectedunder = 3 Then%><b><a href="<%=Underlink1_3%>"><%=Undermenu1_3%></a></b><%Else%><a href="<%=Underlink1_3%>"><%=Undermenu1_3%></a><%End If%></I></font></p><%End If%>
      <%If Undermenu1_4 <> "" Then%><p align="left" style="word-spacing: 0; margin-left: 10; margin-right: 0; margin-top: 0; margin-bottom: 0"> <FONT STYLE="font size: 8pt; font-family: verdana">-
      <%If Selectedmenu = 1 AND Selectedunder = 4 Then%><b><a href="<%=Underlink1_4%>"><%=Undermenu1_4%></a></b><%Else%><a href="<%=Underlink1_4%>"><%=Undermenu1_4%></a><%End If%></I></font></p><%End If%>
      <%If Undermenu1_5 <> "" Then%><p align="left" style="word-spacing: 0; margin-left: 10; margin-right: 0; margin-top: 0; margin-bottom: 0"> <FONT STYLE="font size: 8pt; font-family: verdana"><I>-
      <%If Selectedmenu = 1 AND Selectedunder = 5 Then%><b><a href="<%=Underlink1_5%>"><%=Undermenu1_5%></a></b><%Else%><a href="<%=Underlink1_5%>"><%=Undermenu1_5%></a><%End If%></I></font></p><%End If%>
      <%End If%>
  </tr>
<%End If%>
<%If Menupunkt2 <> "" Then%>
<tr>
    <td width="100%"><BR>
      <p style="word-spacing: 0; margin-left: 0; margin-right: 2; margin-top: 0; margin-bottom: 0"> <FONT STYLE="font size: 10pt; font-family: verdana"><%If Selectedmenu = 2 Then%><b><a href="<%=Link2%>" onFocus="if(this.blur)this.blur()" STYLE="text-decoration: none" TARGET="blank"><%=Menupunkt2%></a></b><%Else%><a href="<%=Link2%>" onFocus="if(this.blur)this.blur()" STYLE="text-decoration: none" TARGET="blank"><%=Menupunkt2%></a><%End If%></font></p>
      <%If Selectedmenu = 2 Then%>
      <%If Undermenu2_1 <> "" Then%><p align="left" style="word-spacing: 0; margin-left: 10; margin-right: 0; margin-top: 0; margin-bottom: 0"> <FONT STYLE="font size: 8pt; font-family: verdana">-
      <%If Selectedmenu = 2 AND Selectedunder = 1 Then%><b><a href="<%=Underlink2_1%>" STYLE="text-decoration: none" onFocus="if(this.blur)this.blur()"><%=Undermenu2_1%></a></b><%Else%><a href="<%=Underlink2_1%>" onFocus="if(this.blur)this.blur()" STYLE="text-decoration: none"><%=Undermenu2_1%></a><%End If%></font></p><%End If%>
      <%If Undermenu2_2 <> "" Then%><p align="left" style="word-spacing: 0; margin-left: 10; margin-right: 0; margin-top: 0; margin-bottom: 0"> <FONT STYLE="font size: 8pt; font-family: verdana">-
      <%If Selectedmenu = 2 AND Selectedunder = 2 Then%><b><a href="<%=Underlink2_2%>" STYLE="text-decoration: none"><%=Undermenu2_2%></a></b><%Else%><a href="<%=Underlink2_2%>" STYLE="text-decoration: none" onFocus="if(this.blur)this.blur()"><%=Undermenu2_2%></a><%End If%></font></p><%End If%>
      <%If Undermenu2_3 <> "" Then%><p align="left" style="word-spacing: 0; margin-left: 10; margin-right: 0; margin-top: 0; margin-bottom: 0"> <FONT STYLE="font size: 8pt; font-family: verdana">-
      <%If Selectedmenu = 2 AND Selectedunder = 3 Then%><b><a href="<%=Underlink2_3%>" STYLE="text-decoration: none"><%=Undermenu2_3%></a></b><%Else%><a href="<%=Underlink2_3%>" STYLE="text-decoration: none" onFocus="if(this.blur)this.blur()"><%=Undermenu2_3%></a><%End If%></font></p><%End If%>
      <%If Undermenu2_4 <> "" Then%><p align="left" style="word-spacing: 0; margin-left: 10; margin-right: 0; margin-top: 0; margin-bottom: 0"> <FONT STYLE="font size: 8pt; font-family: verdana">-
      <%If Selectedmenu = 2 AND Selectedunder = 4 Then%><b><a href="<%=Underlink2_4%>" STYLE="text-decoration: none"><%=Undermenu2_4%></a></b><%Else%><a href="<%=Underlink2_4%>" STYLE="text-decoration: none" onFocus="if(this.blur)this.blur()"><%=Undermenu2_4%></a><%End If%></font></p><%End If%>
      <%If Undermenu2_5 <> "" Then%><p align="left" style="word-spacing: 0; margin-left: 10; margin-right: 0; margin-top: 0; margin-bottom: 0"> <FONT STYLE="font size: 8pt; font-family: verdana">-
      <%If Selectedmenu = 2 AND Selectedunder = 5 Then%><b><a href="<%=Underlink2_5%>" STYLE="text-decoration: none" onFocus="if(this.blur)this.blur()"><%=Undermenu2_5%></a></b><%Else%><a href="<%=Underlink2_5%>" STYLE="text-decoration: none"><%=Undermenu2_5%></a><%End If%></font></p><%End If%>
      <%End If%>
  </tr>
<%End If%><BR>
<%If Menupunkt3 <> "" Then%>
<tr>
    <td width="100%"><BR>
      <p align="left" style="word-spacing: 0; margin-left: 2; margin-right: 0; margin-top: 0; margin-bottom: 0"> <FONT STYLE="font size: 10pt; font-family: verdana"><%If Selectedmenu = 3 Then%><b><a href="<%=Link3%>" onFocus="if(this.blur)this.blur()" STYLE="text-decoration: none"><%=Menupunkt3%></a></b><%Else%><a href="<%=Link3%>" onFocus="if(this.blur)this.blur()" STYLE="text-decoration: none"><%=Menupunkt3%></a><%End If%></font></p>
      <%If Selectedmenu = 3 Then%>
      <%If Undermenu3_1 <> "" Then%><p align="left" style="word-spacing: 0; margin-left: 10; margin-right: 0; margin-top: 0; margin-bottom: 0"> <FONT STYLE="font size: 8pt; font-family: verdana">-
      <%If Selectedmenu = 3 AND Selectedunder = 1 Then%><b><a href="<%=Underlink3_1%>" STYLE="text-decoration: none" onFocus="if(this.blur)this.blur()"><%=Undermenu3_1%></a></b><%Else%><a href="<%=Underlink3_1%>" STYLE="text-decoration: none" onFocus="if(this.blur)this.blur()"><%=Undermenu3_1%></a><%End If%></font></p><%End If%>
      <%If Undermenu3_2 <> "" Then%><p align="left" style="word-spacing: 0; margin-left: 10; margin-right: 0; margin-top: 0; margin-bottom: 0"> <FONT STYLE="font size: 8pt; font-family: verdana">-
      <%If Selectedmenu = 3 AND Selectedunder = 2 Then%><b><a href="<%=Underlink3_2%>" STYLE="text-decoration: none" onFocus="if(this.blur)this.blur()"><%=Undermenu3_2%></a></b><%Else%><a href="<%=Underlink3_2%>" STYLE="text-decoration: none"><%=Undermenu3_2%></a><%End If%></font></p><%End If%>
      <%If Undermenu3_3 <> "" Then%><p align="left" style="word-spacing: 0; margin-left: 10; margin-right: 0; margin-top: 0; margin-bottom: 0"> <FONT STYLE="font size: 8pt; font-family: verdana">-
      <%If Selectedmenu = 3 AND Selectedunder = 3 Then%><b><a href="<%=Underlink3_3%>" STYLE="text-decoration: none"><%=Undermenu3_3%></a></b><%Else%><a href="<%=Underlink3_3%>" STYLE="text-decoration: none"><%=Undermenu3_3%></a><%End If%></font></p><%End If%>
      <%If Undermenu3_4 <> "" Then%><p align="left" style="word-spacing: 0; margin-left: 10; margin-right: 0; margin-top: 0; margin-bottom: 0"> <FONT STYLE="font size: 8pt; font-family: verdana">-
      <%If Selectedmenu = 3 AND Selectedunder = 4 Then%><b><a href="<%=Underlink3_4%>" STYLE="text-decoration: none"><%=Undermenu3_4%></a></b><%Else%><a href="<%=Underlink3_4%>" STYLE="text-decoration: none"><%=Undermenu3_4%></a><%End If%></font></p><%End If%>
      <%If Undermenu3_5 <> "" Then%><p align="left" style="word-spacing: 0; margin-left: 10; margin-right: 0; margin-top: 0; margin-bottom: 0"> <FONT STYLE="font size: 8pt; font-family: verdana">-
      <%If Selectedmenu = 3 AND Selectedunder = 5 Then%><b><a href="<%=Underlink3_5%>"><%=Undermenu3_5%></a></b><%Else%><a href="<%=Underlink3_5%>"><%=Undermenu3_5%></a><%End If%></font></p><%End If%>
      <%End If%>
  </tr>
<%End If%><BR>



  </table>
<br><br>


Nogen der kan hjælpe?
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester