Hej jeg skal til at oprettet et bookingsystem og til det har jeg
fundet et script, men jeg kunne godt tænke mig at få ændret i det
så det kun viser en uge af gangen, i stedet for en hel måned, og
den skal selvfølgelig vise den uge man er inde i, i øjeblikket!
fx. sådan her!
Uge dag: Mandag - Tirsdag - Onsdag - Torsdag - Fredag - Lørdag -
Søndag
Dato: (22) (23) (24) (25) (26) (27)
(28)
min kode ser sådan her ud.
-------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Resevation-dansk</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
</head>
<body>
<p>:: <a href="../Default.htm">Forsiden</a> :: <a
href="login.asp">Log ind</a>
::</p>
<p align="center"> <%
DBQ=Server.MapPath("../kalender.mdb")
Set oConn = createObject("ADODB.Connection")
oConn.open "driver={Microsoft Access Driver (*.mdb)};dbq="&DBQ
dtmDate = Request.QueryString("date")
dtmToday = Date
If dtmDate = "" Then
dtmDate = Date
Else
dtmDate = CDate(dtmDate)
End if
intYear = Year(dtmDate)
strMonth = MonthName(Month(dtmDate))
intDayOfMonth = Day(dtmDate)
dtmFirstDate = DateAdd("d", (-intDayOfMonth)+1, dtmDate)
intFirstDay = Weekday(dtmFirstDate, vbMonday)
CurWeek = DatePart("ww", Now, vbMonday, vbFirstFourDays)
%>
</div>
<div align="center">
<table border="0" cellpadding="2"
cellspacing="0" bgcolor="#FFFFFF"
style="border: 1px solid rgb(0,0,0)" valign="top">
<!--DWLayoutTable-->
<tr bgcolor="#FFFFFF">
<td colspan="7" align="center"
valign="middle"><font face="Verdana"
size="2"
color="#000000"><strong><%=strMonth%> <%=intYear%></strong><
/font></td>
</tr>
<tr>
<td align="center"
bgcolor="#FFFFFF"><font face="verdana" size="2">Man</font></td>
<td align="center"
bgcolor="#FFFFFF"><font face="verdana" size="2">Tir</font></td>
<td align="center"
bgcolor="#FFFFFF"><font face="verdana" size="2">Ons</font></td>
<td width="22" align="center"
bgcolor="#FFFFFF"><font face="verdana" size="2">Tor</font></td>
<td align="center"
bgcolor="#FFFFFF"><font face="verdana" size="2">Fre</font></td>
<td align="center"
bgcolor="#FFFFFF"><font face="verdana" size="2">Lør</font></td>
<td align="center"
bgcolor="#FFFFFF"><font face="verdana" size="2">Søn</font></td>
</tr>
<%
For y = 1 to 1
If blnLast <> True Then
Response.Write "<tr>"
For x = 1 to 7
intLoopDay = intLoopDay + 1
If intLoopDay >= intFirstDay Then
CurWeek = DatePart("ww", Now, vbMonday, vbFirstFourDays)
If vbMonday(dtmCurDate) = vbMonday(dtmFirstDate) Then
Set foddagbarn=oConn.Execute("Select * from kalender where
dag="&day(dtmCurDate)&" and mdr="&month(dtmCurDate))
If dtmCurDate = dtmToday Then
If Not foddagbarn.EoF Then
Response.Write "<td align=center bgcolor=#0000ff><a
href=resevationer.asp?dato="&dtmCurDate&"><font face=verdana
size=2 color=#ff0000><strong>" & Day(dtmCurDate) &
"</strong></font></a></td>"
Else
Response.Write "<td align=center bgcolor=#0000ff><a
href=resevationer.asp?dato="&dtmCurDate&"><font face=verdana
size=2 color=#ffffff><strong>" & Day(dtmCurDate) &
"</strong></font></a></td>"
End If
Else
If Not foddagbarn.EoF Then
Response.Write "<td align=center bgcolor=#ff0000><a
href=resevationer.asp?dato="&dtmCurDate&"><font face=verdana
size=2><strong>" & Day(dtmCurDate) & "</strong></font></a></td>"
Else
Response.Write "<td align=center><a
href=resevationer.asp?dato="&dtmCurDate&"><font face=verdana
size=2><strong>" & Day(dtmCurDate) & "</strong></font></a></td>"
End If
End If
blnLast = False
Else
Response.Write "<td align=center><font face=verdana
size=2>-</td>"
blnLast = True
End If
Else
Response.Write "<td align=center><font face=verdana
size=2>-</td>"
blnLast = True
End if
Next
End If
Next
Response.Write "</font></td></tr>"
%>
<tr>
<td height="23" colspan="3"
bgcolor="#FFFFFF"><a
href="resevation.asp?date=<%=DateAdd("m",-1,dtmFirstDate)%>"><fon
t face="verdana" size="2"
color="#000000"><strong>F</strong><b>orrige</b></font></a></td>
<td valign="top"
bgcolor="#FFFFFF"><!--DWLayoutEmptyCell--> </td>
<td bgcolor="#FFFFFF" colspan="3"
align="right"><a
href="resevation.asp?date=<%=DateAdd("m",1,dtmFirstDate)%>"><font
face="verdana" size="2"
color="#000000"><b>Næste</b></font></a></td>
</tr>
</table>
<br>
<font color="#FF0000" size="2"
face="Verdana, Arial, Helvetica, sans-serif">Se
<a href="infomationer.asp">Infomationer</a>
før bestiling</font><br>
<font color="#FF0000" size="2"
face="Verdana, Arial, Helvetica, sans-serif">Klik på en
dato for at Resevere</font></div>
<div align="center">
<table>
<tr>
<td bgcolor="#0000ff" align="center">
<font face="arial" size="1" color="#ffffff">Dags
dato</font> </td>
</tr>
<tr>
<td bgcolor="#ff0000" align="center">
<font face="arial" size="1" color="#ffffff">Reseveret</font>
</td>
</tr>
</table>
</div></TD>
</TR>
<TR>
</div>
</body>
</html>
--------------------------
--
Vil du lære at kode HTML, XHTML, CSS, SSI eller ASP?
- Pædagogiske tutorials på dansk
- Kom godt i gang med koderne
KLIK HER! =>
http://www.html.dk/tutorials