Er der virkelig ikke en der kan hjælpe ?????????????????????
Jeg prøver lige at stille spørgsmålet igen !!Jeg har lavet et reservationssystem hvor man kan booke baner over nettet. Det virker fint og jeg kan sagtens sætte et login på så alle brugere har deres eget password og brugernavn. Jeg vil bare gerne have at når brugeren logger ind skal han kunne slette eller ændre på sine reservationer, og kun sine egne !
Er der en der kan hjælpe med mit problem ?
Her er koden til reservationssystemet :
<%
Response.expires = 0
administrator = Request.Form("administrator")
If administrator = "webmasteren" then
Session("admin") = "pass"
end if
dtmToday = Date
dtmDate = Request.QueryString("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)
function maanednavn(plusmaaned)
plusmaaned = cint(plusmaaned)
maaned = Month(dtmDate)+plusmaaned
aar = intYear
if maaned > 12 then
maaned = maaned -12
aar = aar + 1
end if
maaned = replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(MonthName(maaned),"January","januar"),"February","februar"),"March","marts"),"April","april"),"May","maj"),"June","juni"),"July","juli"),"August","august"),"September","september"),"October","oktober"),"November","november"),"December","december")
Response.Write(aar)
Response.Write(" - ")
Response.write(maaned)
end function
%>
<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">
</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 colspan="7" align="center" valign="middle" bgcolor="#000000"><font face="Verdana"
size="3" color="#ffffff"><b>Bookingsystem</b></font></td>
</tr>
<tr>
<td colspan="7" align="center" valign="middle" bgcolor="#000000"><font face="Verdana"
size="2" color="#ffffff"><strong><%=replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(strMonth,"January","januar"),"February","februar"),"March","marts"),"April","april"),"May","maj"),"June","juni"),"July","juli"),"August","august"),"September","september"),"October","oktober"),"November","november"),"December","december")%> <%=intYear%></strong></font></td>
</tr>
<tr>
<td align="center"><font face="verdana" size="2">Man</font></td>
<td align="center"><font face="verdana" size="2">Tir</font></td>
<td align="center"><font face="verdana" size="2">Ons</font></td>
<td align="center"><font face="verdana" size="2">Tor</font></td>
<td align="center"><font face="verdana" size="2">Fre</font></td>
<td align="center"><font face="verdana" size="2">Lør</font></td>
<td align="center"><font face="verdana" size="2">Søn</font></td>
</tr>
<%
For y = 1 to 6
If blnLast <> True Then
Response.Write "<tr>"
For x = 1 to 7
intLoopDay = intLoopDay + 1
If intLoopDay >= intFirstDay Then
dtmCurDate = DateAdd("d", intLoopDay-intFirstDay, dtmFirstDate)
If Month(dtmCurDate) = Month(dtmFirstDate) Then
If dtmCurDate = dtmToday Then
Response.Write "<td align=center bgcolor=#0000ff><a href=bookingsystemroom.asp?dato="&dtmCurDate&"><font face=verdana size=2 color=#ffffff><strong>" & Day(dtmCurDate) & "</strong></font></a></td>"
Else
Response.Write "<td align=center><a href=bookingsystemroom.asp?dato="&dtmCurDate&"><font face=verdana size=2><strong>" & Day(dtmCurDate) & "</strong></font></a></td>"
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 bgcolor="#000000" colspan="3"><a href="bookingsystem.asp?date=<%=DateAdd("m",-1,dtmFirstDate)%>"><font face="verdana" size="2" color="#ffffff"><b>Forrige</b></font></a></td>
<td bgcolor="#000000"> </td>
<td bgcolor="#000000" colspan="3" align="right"><a href="bookingsystem.asp?date=<%=DateAdd("m",1,dtmFirstDate)%>"><font face="verdana" size="2" color="#ffffff"><b>Næste</b></font></a></td>
</tr>
<tr>
<td bgcolor="#000000" colspan="7" align=center>
<FORM>
<select name="theSelect" size=1 onChange="if (this.selectedIndex >0) window.location=this.options[this.selectedIndex].value">
<OPTION value="">Vælg en måned</OPTION>
<OPTION value="bookingsystem.asp?date=<%=DateAdd("m",1,dtmFirstDate)%>"><%maanednavn(1)%></OPTION>
<OPTION value="bookingsystem.asp?date=<%=DateAdd("m",2,dtmFirstDate)%>"><%maanednavn(2)%></OPTION>
<OPTION value="bookingsystem.asp?date=<%=DateAdd("m",3,dtmFirstDate)%>"><%maanednavn(3)%></OPTION>
<OPTION value="bookingsystem.asp?date=<%=DateAdd("m",4,dtmFirstDate)%>"><%maanednavn(4)%></OPTION>
<OPTION value="bookingsystem.asp?date=<%=DateAdd("m",5,dtmFirstDate)%>"><%maanednavn(5)%></OPTION>
<OPTION value="bookingsystem.asp?date=<%=DateAdd("m",6,dtmFirstDate)%>"><%maanednavn(6)%></OPTION>
<OPTION value="bookingsystem.asp?date=<%=DateAdd("m",7,dtmFirstDate)%>"><%maanednavn(7)%></OPTION>
<OPTION value="bookingsystem.asp?date=<%=DateAdd("m",8,dtmFirstDate)%>"><%maanednavn(8)%></OPTION>
<OPTION value="bookingsystem.asp?date=<%=DateAdd("m",9,dtmFirstDate)%>"><%maanednavn(9)%></OPTION>
<OPTION value="bookingsystem.asp?date=<%=DateAdd("m",10,dtmFirstDate)%>"><%maanednavn(10)%></OPTION>
<OPTION value="bookingsystem.asp?date=<%=DateAdd("m",11,dtmFirstDate)%>"><%maanednavn(11)%></OPTION>
<OPTION value="bookingsystem.asp?date=<%=DateAdd("m",12,dtmFirstDate)%>"><%maanednavn(12)%></OPTION>
</SELECT>
</FORM>
</td>
</tr>
<tr>
<td colspan="7" align=center>
<% if Session("admin") = "pass" then %>
<font size=1 color=Red><br>Du er logget ind som administrator<br><br></font>
<%else%>
<FORM action="bookingsystem.asp" method=POST id=form name=form><font size=1><br>Log på som administrator</font><br><INPUT type="text" id=administrator name=administrator size=8><INPUT type="submit" value="OK" id=submit name=submit></FORM>
<%end if%>
</td>
</tr>
</table>
</body>
</html>