her der koden for at rediger
<%Call Security()%>
<%
If intMode = "" Then
intMode = "form1"
End If
intID = request("id")
If intID = "" Then
response.redirect "index.asp?page=info&id=0"
End If
If intMode = "gem" Then
intOrigTitle = request.form("orig_title")
intTitle = request.form("Title")
intAbstract = request.form("Abstract")
intGenre = Replace(request.form("Genre"), " ", "")
intNR = request.form("NR")
If intNR = "" Then
intNR = "Original"
End If
intTID = request.form("TID")
If intTID = "" Then
intTID = "UKENDT"
End If
intLink = "
http://"&Replace(request.form("Link"), "
http://", "")
If Replace(intLink, "
http://", "") = "" Then
intLink = "about:blank"
End If
intPart1_title = request.form("Part1_title")
intPart1_loc = request.form("Part1_loc")
intPart2_title = request.form("Part2_title")
intPart2_loc = request.form("Part2_loc")
intSynopsis = request.form("Synopsis")
intTALE = request.form("TALE")
intMedie = request.form("Medie")
intSub = request.form("SUB")
intUdlaant = request.form("Udlaant")
intLaaner = request.form("Laaner")
intRating = abs(request.form("Rating"))
intError = ""
If intOrigTitle <> intTitle AND CheckTitle(intTitle) = "True" Then
intError = "Der er allerede oprettet en film med titlen: "&intTitle&". Giv filmen en anden titel!"
ElseIf intTitle = "" Then
intError = "Du skal give filmen en titel..."
ElseIf len(intTitle) > 255 Then
intError = "Filmens titel må max være 255 tegn"
ElseIf intGenre = "" Then
intError = "Du skal give filmen en genre..."
ElseIf len(intGenre) > 255 Then
intError = "Genren må max være 255 tegn"
End If
If intError = "" Then
tempConn = "PROVIDER=MSDASQL;DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("data/movies.mdb")
Set rs = Server.CreateObject("ADODB.RecordSet")
strSQL = "SELECT * FROM movies WHERE (ID = "&intID&")"
rs.Open strSQL, tempConn, 1, 3
If NOT (rs.BOF Or rs.EOF) Then
rs("Abstract") = intAbstract
rs("Title") = intTitle
rs("Genre") = intGenre
rs("Sub") = intSUB
rs("NR") = intNR
rs("TID") = intTID
rs("Link") = intLink
rs("TALE") = intTALE
rs("Medie") = intMedie
If intUdlaant = "TRUE" Then
rs("Udlaant") = True
Else
rs("Udlaant") = False
End If
If intLaaner <> "" Then
rs("Laaner") = intLaaner
Else
rs("Laaner") = ""
End If
rs("Rating") = intRating
rs.Update
response.redirect "index.asp?page=edit&mode=form2&id="&intID
End If
rs.Close
End If
End If
If intMode = "form1" OR intMode = "gem" Then
%>
<p align="center" style="margin-top: 0; margin-bottom: 0"> </p>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border: 1px solid #000000" bordercolor="#111111" width="450" id="AutoNumber1">
<form method="POST" action="index.asp?page=edit&mode=gem&id=<%=intID%>" NAME="Movie">
<tr>
<td colspan="2" bgcolor="#C5C5C5" style="border-bottom: 1px solid #000000" width="448">
<p align="right"><font size="1"><b> - Redigér Film</b></font></td>
</tr>
<tr>
<td width="83" bgcolor="#E9E9E9"><font size="1"> Titel:</font></td>
<td width="365" bgcolor="#E9E9E9">
<p align="center">
<input type="TEXT" name="Title" size="50" style="font-family: Verdana; font-size: 8pt; border: 1px solid #000000" value="<%If request("Title") <> "" Then%><%=intTitle%><%Else%><%=GetData("movies", "Title", intID)%><%End If%>"></td>
</tr>
<tr>
<td width="83" ><font size="1"> Genre:</font></td>
<td width="365" >
<p align="center">
<select size="1" name="Genre" style="font-family: Verdana; font-size: 8pt">
<option selected value="<%If request("Genre") <> "" Then%><%=intGenre%><%Else%><%=GetData("movies", "Genre", intID)%><%End If%>"><%If request("Genre") <> "" Then%><%=intGenre%><%Else%><%=GetData("movies", "Genre", intID)%><%End If%>
</option>
<option value="Action">Action</option>
<option value="Andet">Andet</option>
<option value="Biografi">Biografi</option>
<option value="Box set">Box set</option>
<option value="Dansk film">Dansk film</option>
<option value="Dokumentar">Dokumentar</option>
<option value="Drama">Drama</option>
<option value="Erotik">Erotik</option>
<option value="Eventyr">Eventyr</option>
<option value="Familie">Familie</option>
<option value="Gyser">Gyser</option>
<option value="Komedie">Komedie</option>
<option value="Musik">Musik</option>
<option value="Romantik">Romantik</option>
<option value="ScienceFiction">ScienceFiction</option>
<option value="Stand up">Stand up</option>
<option value="Tegnefilm">Tegnefilm</option>
<option value="Thriller">Thriller</option>
<option value="Western">Western</option>
</select></td>
</tr>
<tr>
<td width="83" bgcolor="#E9E9E9"><font size="1"> Nr:</font></td>
<td width="365" bgcolor="#E9E9E9">
<p align="center">
<input type="TEXT" name="NR" size="50" style="font-family: Verdana; font-size: 8pt; border: 1px solid #000000" value="<%If request("NR") <> "" Then%><%=intNR%><%Else%><%=GetData("movies", "NR", intID)%><%End If%>"></td>
</tr>
<tr>
<td width="83"><font size="1"> Dansk Sub:</font></td>
<td width="365">
<p align="center">
<%
If request("SUB") <> "" Then
intSUB = request("SUB")
Else
intSUB = GetData("movies", "SUB", intID)
End If
%>
<select size="1" name="SUB" style="font-family: Verdana; font-size: 8pt">
<option <%If intSUB = "NEJ" Then%>selected<%End If%>>NEJ</option>
<option <%If intSUB = "JA" Then%>selected<%End If%>>JA</option>
</select></td>
</tr>
<tr>
<td width="83" bgcolor="#E9E9E9"><font size="1"> Link:</font></td>
<td width="365" bgcolor="#E9E9E9">
<p align="center">
<input type="TEXT" name="Link" size="50" style="font-family: Verdana; font-size: 8pt; border: 1px solid #000000" value="<%If request("Link") <> "" Then%><%=intLink%><%Else%><%=GetData("movies", "Link", intID)%><%End If%>"></td>
</tr>
<tr>
<td width="83"><font size="1"> DK Tale:</font></td>
<td width="365">
<p align="center">
<%
If request("TALE") <> "" Then
intTALE = request("TALE")
Else
intTALE = GetData("movies", "TALE", intID)
End If
%>
<select size="1" name="TALE" style="font-family: Verdana; font-size: 8pt">
<option <%If intTALE = "NEJ" Then%>selected<%End If%>>NEJ</option>
<option <%If intTALE = "JA" Then%>selected<%End If%>>JA</option>
</select></td>
</tr>
<tr>
<td width="83" bgcolor="#E9E9E9"><font size="1"> Spille tid:</font></td>
<td width="365" bgcolor="#E9E9E9">
<p align="center">
<input type="TEXT" name="TID" size="50" style="font-family: Verdana; font-size: 8pt; border: 1px solid #000000" value="<%If request("TID") <> "" Then%><%=intTID%><%Else%><%=GetData("movies", "TID", intID)%><%End If%>"></td>
</tr>
<tr>
<td width="83"><font size="1"> Medie:</font></td>
<td width="365">
<p align="center">
<%
If request("Medie") <> "" Then
intMedie = request("Medie")
Else
intMedie = GetData("movies", "Medie", intID)
End If
%>
<select size="1" name="Medie" style="font-family: Verdana; font-size: 8pt">
<option <%If intMedie = "HD" Then%>selected<%End If%>>HD</option>
<option <%If intMedie = "CD" Then%>selected<%End If%>>CD</option>
</select></td>
</tr>
<tr>
<td width="83" bgcolor="#E9E9E9"><font size="1"> Udlånt:</font></td>
<td width="365" bgcolor="#E9E9E9">
<p align="center">
<%
If request("Udlaant") <> "" Then
intUdlaant = request("Udlaant")
Else
intUdlaant = GetData("movies", "Udlaant", intID)
End If
%>
<input type="checkbox" name="Udlaant" value="TRUE" <%If intUdlaant = TRUE Then%>checked<%End If%>></td>
</tr>
<tr>
<td width="83" ><font size="1"> Låner:</font></td>
<td width="365" >
<p align="center">
<input type="TEXT" name="Laaner" size="50" style="font-family: Verdana; font-size: 8pt; border: 1px solid #000000" value="<%If request("Laaner") <> "" Then%><%=intLaaner%><%Else%><%=GetData("movies", "Laaner", intID)%><%End If%>"></td>
</tr>
<tr>
<td width="83" bgcolor="#E9E9E9"><font size="1"> Bedømmelse:</font></td>
<td width="365" bgcolor="#E9E9E9">
<p align="center">
<%
If request("Rating") <> "" Then
intRating = request("Rating")
Else
intRating = GetData("movies", "Rating", intID)
End If
%>
<select size="1" name="Rating" style="font-family: Verdana; font-size: 8pt">
<option <%If intRating = 0 OR intRating = "" Then%>selected<%End If%> value="0">IKKE BEDØMT</option>
<option <%If intRating = 1 Then%>selected<%End If%>>1</option>
<option <%If intRating = 2 Then%>selected<%End If%>>2</option>
<option <%If intRating = 3 Then%>selected<%End If%>>3</option>
<option <%If intRating = 4 Then%>selected<%End If%>>4</option>
<option <%If intRating = 5 Then%>selected<%End If%>>5</option>
</select></td>
</tr>
<tr>
<td colspan="2" width="448">
<p align="center">
<input type="submit" value="Gem" name="Gem" style="font-family: Verdana; font-size: 8pt; font-weight: bold"></td>
</tr>
<input type="HIDDEN" name="orig_title" size="50" style="font-family: Verdana; font-size: 8pt; border: 1px solid #000000" value="<%=GetData("movies", "Title", intID)%>">
</form>
</table>
</center>
</div>
<p align="center" style="margin-top: 0; margin-bottom: 0"> </p>
<p align="center" style="margin-top: 0; margin-bottom: 0">
<font size="2" color="#FF6600"><b>
<%If intError <> "" Then%>
FEJL!<br>
<%End If%>
<%=intError%>
</b></font></p>
<%ElseIf intMode = "form2" Then%>
<p align="center" style="margin-top: 0; margin-bottom: 0"> </p>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border: 1px solid #000000" bordercolor="#111111" width="450" id="AutoNumber2">
<form method="POST" action="html/upload_cover.asp?id=<%=intID%>" ENCTYPE="multipart/form-data">
<tr>
<td bgcolor="#c5c5c5" style="border-bottom: 1px solid #000000">
<p align="right"><font size="1"><b> - Upload Cover</b></font></td>
</tr>
<tr>
<td>
<p align="center" style="margin-top: 5; margin-bottom: 5"><font size="1"><INPUT TYPE="FILE" NAME="Cover" SIZE="20" style="font-family: Tahoma; font-size: 8pt; border-style: solid; border-width: 1; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1"></font></td>
</tr>
<tr>
<td>
<p align="center" style="margin-top: 0; margin-bottom: 5">
<input type="submit" value="Upload" name="Upload" style="font-family: Verdana; font-size: 8pt; font-weight: bold"><p align="center" style="margin-top: 0; margin-bottom: 5">
<b><font size="2">
<a href="index.asp?page=message&message=Filmen er nu opdateret<br>Der blev ikke uploadet noget nyt cover">
SKIP</a></font></b></td>
</tr>
</form>
</table>
</center>
</div>
<p align="center"> </p>
<%End If%>