hmmm hvad er der galt her
*Tekniske oplysninger (for supportteknikere)Fejltype:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access-driver] Handlingen skal bruge en opdaterbar forespørgsel.
/reservationssystem/bookingsystemtime.asp, line 75
Browsertype:
Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
Side:
POST 68 bytes to /reservationssystem/bookingsystemtime.asp?dato=05-10-2001&room=1&submit=1
POST Data:
initialer=fghfhf&klokken=4&klassen=jhjkhjk&formaal=hjkghjk&submit=OK
Klokkeslæt:
4. oktober 2001, 11:40:06
Yderligere oplysninger:
Microsoft Support
**************
kode
**************
<%
Response.Expires = 0
dato = Request(\"dato\")
if dato <> \"\" then
datonumber = replace(replace(dato, \"-\",\"\"), \"/\",\"\")
datonumber = clng(datonumber)
end if
room = Request(\"room\")
initialer = Request.Form(\"initialer\")
if initialer <> \"\" then
initialer = replace(initialer, \"\'\", \"\")
end if
klokken = Request.Form(\"klokken\")
if klokken <> \"\" then
klokken = cint(klokken)
end if
klassen = Request.Form(\"klassen\")
if klassen <> \"\" then
klassen = replace(klassen, \"\'\", \"\")
end if
formaal = Request.Form(\"formaal\")
if formaal <> \"\" then
formaal = replace(formaal, \"\'\", \"\")
end if
submit = Request(\"submit\")
if room <> \"\" then
room = cint(room)
end if
if room = \"\" or dato = \"\" then
Response.Redirect(\"bookingsystem.asp\")
end if
function tidsbeskrivelse(tidid)
dim tekst
tekst = \"\"
Select Case tidid
Case \"1\"
tekst = \"08:00 - 08:45\"
Case \"2\"
tekst = \"08:55 - 09:40\"
Case \"3\"
tekst = \"09:50 - 10:35\"
Case \"4\"
tekst = \"10:45 - 11:30\"
Case \"5\"
tekst = \"11:55 - 12:40\"
Case \"6\"
tekst = \"12:50 - 13:35\"
Case \"7\"
tekst = \"13:45 - 14:30\"
Case \"8\"
tekst = \"15:00 - 16:00\"
Case \"9\"
tekst = \"16:00 - 17:00\"
Case \"10\"
tekst = \"17:00 - 18:00\"
Case \"11\"
tekst = \"18:00 - 19:00\"
Case \"12\"
tekst = \"19:00 - 20:00\"
Case \"13\"
tekst = \"20:00 - 21:00\"
Case \"14\"
tekst = \"21:00 - 22:00\"
Case else
tekst = \"08:00 - 08:45\"
End Select
Response.Write(tekst)
end function
DBQ=Server.MapPath(\"bookingsystem.mdb\")
Set Conn = createObject(\"ADODB.Connection\")
Conn.open \"driver={Microsoft Access Driver (*.mdb)};dbq=\"&DBQ
if room <> \"\" and initialer <> \"\" and klokken <> \"\" and klassen <> \"\" then
Conn.Execute(\"Insert Into booking (dato, oprettet, initialer, formaal, lokalenr, tid, klasse) Values (\'\"& datonumber &\"\', \'\"& date() &\"\', \'\"& initialer &\"\', \'\"& formaal &\"\', \"& room &\", \"& klokken &\", \'\"& klassen &\"\')\")
end if
Set bookingroom=Conn.Execute(\"Select * from booking where lokalenr=\"&room&\" and dato=\"&datonumber&\" order by tid\")
Set lokalenavn=Conn.Execute(\"Select lokale from lokaler where id=\"&room&\"\")
Set tider=Conn.Execute(\"Select * from tider\")
Set bookingroomall=Conn.Execute(\"Select * from booking where lokalenr=\"&room&\" and dato=\"&datonumber&\" order by tid\")
%>
<html>
<head>
<title>Bookingsystem</title>
<META HTTP-EQUIV=\"Expires\" CONTENT=\"Fri, Jun 12 1981 08:20:00 GMT\">
<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">
<META HTTP-EQUIV=\"Cache-Control\" CONTENT=\"no-cache\">
<%
\' WRITES THE CLIENT-SIDE SCRIPT:
response.write \"<script language=\'javascript\'>\" & vbCrLF
response.write \"<!--\" & vbCrLF
Response.write \"function optaget(formen)\" & vbCrLF
Response.write \"{\" & vbCrLF
If Not bookingroomall.EoF Then
Do while Not bookingroomall.EoF
Response.write \"if (formen.klokken.options[formen.klokken.selectedIndex].value == \" & bookingroomall(\"tid\") & \")\" & vbCrLF
Response.write \"{alert(\'Tidspunktet er desværre ikke ledigt \'); return false;}\" & vbCrLF
bookingroomall.MoveNext
Loop
else
Response.write \"if (formen.klokken.options[formen.klokken.selectedIndex].value == 0)\" & vbCrLF
Response.write \"{alert(\'Tidspunktet er desværre ikke ledigt \'); return false;}\" & vbCrLF
end if
Response.write \"else {return true;}\" & vbCrLF
Response.write \"}\" & vbCrLF
Response.write \"function emptyvalidation(entered, alertbox)\" & vbCrLF
Response.write \"{\" & vbCrLF
Response.write \"with (entered)\" & vbCrLF
Response.write \"{\" & vbCrLF
Response.write \"if (value==null || value==\"\"\"\")\" & vbCrLF
Response.write \"{if (alertbox!=\"\"\"\") {alert(alertbox);} return false;}\" & vbCrLF
Response.write \"else {return true;}\" & vbCrLF
Response.write \"}\" & vbCrLF
Response.write \"}\" & vbCrLF
Response.write \"function formvalidation(thisform)\" & vbCrLF
Response.write \"{\" & vbCrLF
Response.write \"with (thisform)\" & vbCrLF
Response.write \"{\" & vbCrLF
Response.write \"if (emptyvalidation(initialer,\"\"Du skal skrive dine initialer\"\")==false) {initialer.focus(); return false;};\" & vbCrLF
Response.write \"if (emptyvalidation(klassen,\"\"Du skal skrive klassen, som skal benytte lokalet\"\")==false) {klassen.focus(); return false;};\" & vbCrLF
Response.write \"if (emptyvalidation(klokken,\"\"Du skal vælge et tidspunkt\"\")==false) {klokken.focus(); return false;};\" & vbCrLF
Response.write \"if (optaget(this.form)==false) {klokken.focus(); return false;};\" & vbCrLF
Response.write \"}\" & vbCrLF
Response.write \"}\" & vbCrLF
response.write \"//-->\" & vbCrLF
response.write \"</script>\" & vbCrLF
%>
<script Language=\"Javascript\">
//-->
</script>
</head>
<style type=\"text/css\">
<!--
BODY
{
BACKGROUND-COLOR: white;
COLOR: black;
FONT-FAMILY: Verdana;
}
A
{
color: #000000;
FONT-FAMILY: Verdana;
font-size: 10px;
text-decoration: none:
}
A:hover
{
color: #888888
}
A
{
COLOR: black
}
A:active
{
COLOR: black
}
A:link
{
COLOR: black
}
A:visited
{
COLOR: black
}
-->
</style>
<body>
<table cellspacing=\"0\" cellpadding=\"2\" border=\"0\" valign=\"top\"
style=\"border: 1px solid rgb(0,0,0)\" align=center>
<tr>
<td>
<% if submit <> \"\" then %>
<%=initialer%> har nu booket <u><%=lokalenavn(\"lokale\")%></u> d. <u><%=dato%></u><br>
i tidsrummet <%tidsbeskrivelse(bookingroom(\"tid\"))%><br>
<%if formaal = \"\" then%>
<br>
<A HREF=\"bookingsystemtime.asp?dato=<%=dato%>&room=<%=room%>\">Ønsker du at booke lokalet flere timer - tryk her</A>
<br>
<%else%>
Formål:<br>
<%=replace(formaal, vbCrLf, \"<br>\")%><br>
<A HREF=\"bookingsystemtime.asp?dato=<%=dato%>&room=<%=room%>\">Ønsker du at booke lokalet flere timer - tryk her</A>
<br>
<br>
<%end if%>
<%else%>
Du er ved at booke <u><%=lokalenavn(\"lokale\")%></u> d. <u><%=dato%></u><br>
<font color=Red>Det er vigtig at du ser nederst på siden om tiden er fri</font>
<form action=\"bookingsystemtime.asp?dato=<%=dato%>&room=<%=room%>&submit=1\" method=\"post\" id=form name=form onsubmit=\"return formvalidation(this)\">
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td>Intialer </td>
<td><INPUT type=\"text\" id=initialer name=initialer size=24 maxlength=100></td>
</tr>
<tr>
<td>Tidspunkt</td>
<td>
<SELECT id=klokken name=klokken>
<%
If Not tider.EoF Then
%>
<OPTION value=\"\">Vælg et ledigt tidspunkt </OPTION>
<%
Do while Not tider.EoF
%>
<OPTION value=\"<%=tider(\"id\")%>\"><%=tider(\"tid\")%></OPTION>
<%
tider.MoveNext
Loop
%>
<%else%>
<OPTION value=\"\">Der blev ikke fundet ledige tider</OPTION>
<%end if%>
</SELECT>
</td>
</tr>
<tr>
<td>Klasse</td>
<td><INPUT type=\"text\" id=klassen name=klassen size=24 maxlength=100></td>
</tr>
<tr valign=top>
<td>Formål</td>
<Td>
<INPUT type=\"text\" id=formaal name=formaal size=24 maxlength=200></td>
</tr>
<tr>
<td> </td>
<td><br><INPUT type=\"Submit\" value=\"OK\" id=submit name=submit> <INPUT type=\"reset\" value=\"Ryd felter\" id=reset name=reset></td>
</tr>
</table>
<form>
<%end if%>
<%
If Not bookingroom.EoF Then
%>
<br>Samtlige bookninger for lokalet <u><%=lokalenavn(\"lokale\")%></u> d. <u><%=dato%></u><br><br>
<table border=0 cellpadding=4 cellspacing=4>
<tr valign=top>
<td><font size=1>Initialer</font></td><td><font size=1>Oprettet</font></td><td><font size=1>Tidsrummet</font></td><td><font size=1>Klasse</font></td><td><font size=1>Formål</font></td><% if Session(\"admin\") = \"pass\" then %><td><font size=1>Slet</font></td><%end if%>
</tr>
<%
Do while Not bookingroom.EoF
%>
<tr>
<td><font size=1><%=bookingroom(\"initialer\")%></font></td><td><font size=1><nobr><%=bookingroom(\"oprettet\")%></nobr></font></td><td><font size=1><nobr><%tidsbeskrivelse(bookingroom(\"tid\"))%></nobr></font></td><td><font size=1><%=bookingroom(\"klasse\")%></font></td>
<%if len(bookingroom(\"formaal\")) > 1 then%>
<td><font size=1><%=replace(bookingroom(\"formaal\"), vbCrLf, \"<br>\")%></font></td>
<%else%>
<td> </td>
<%end if%>
<% if Session(\"admin\") = \"pass\" then %><td><A HREF=\"bookingsystemslet.asp?dato=<%=dato%>&room=<%=room%>&sletid=<%=bookingroom(\"id\")%>\"><font size=1>Slet</font></A></td><%end if%>
</tr>
<%
bookingroom.MoveNext
Loop
%>
</table>
<%else%>
<br>
Der er endnu ingen bookninger
<br>
<%end if%>
<A HREF=\"bookingsystem.asp\">Tilbage</A>
<br>
</td>
</tr>
</table>
</body>
</html>
<%
Conn.Close
Set Conn = Nothing
%>