Siden hvor uploaded foregår er det viste kode, der er ikke mere der. Her er så koden fra siden uploader fra:
<%
IF NOT Session("scdkcomuseron") >= 2 THEN
Response.Redirect "community_log_error.asp?e=3"
END IF
%>
<html>
<head>
<meta http-equiv="Content-Language" content="da">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<link rel="stylesheet" type="text/css" href="style.css">
<title>:: S c o o t e r S n a k . d k ::</title>
<%
strError = Request.Querystring("error")
IF strError = 1 THEN
%>
<script LANGUAGE="JavaScript">
alert("Billedet skal enten være af typen .jpg eller .gif");
</script>
<%
END IF
IF strError = 2 THEN
%>
<script LANGUAGE="JavaScript">
alert("Billedet fylder for meget! Må højst være på 300 kb");
</script>
<%
END IF
%>
<script LANGUAGE="JavaScript">
//Popup
function popup(url,name,win_height,win_width) {
pos_horizon = ((screen.width/2)-(win_width/2));
pos_vertical = ((screen.height/2)-(win_height/2));
window.open(url,name,"width="+win_width+",height="+win_height+",top="+pos_vertical+",left="+pos_horizon);
}
//Galleri slet
function galleryDelete() {
if (document.galleryEdit.files.value == 1) {
alert('Du kan ikke slette billedet, der skal mindst være 1 billede!');
return false;
}
if (document.galleryEdit.files.value > 1) {
return confirm('Du er igang med at slette billedet, vil du fortsætte?');
}
}
//Galleri upload
function validateUpload() {
//Galleri upload
if (document.galleryupload.file.value.length == 0) {
alert("Du skal vælge et billede du vil uploade");
document.galleryupload.file.focus();
return false;
}
return true;
}
</script>
</head>
<body link="#000000" vlink="#000000" alink="#000000" topmargin="0" leftmargin="0" bgcolor="#E5E5E5">
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open("driver={MySQL};server=****;uid=****;pwd=****;database=****")
%>
<table border="0" width="810" height="100%" cellspacing="0" cellpadding="0" style="border-left: 1 solid #000000; border-right: 1 solid #000000" align="center" bgcolor="#FFFFFF">
<tr>
<td width="810" valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="174">
<tr>
<td width="100%" background="images/bgt4.jpg" height="139" valign="middle"> <a href="index.asp"> </a>
<table border="0" width="225" height="100" cellspacing="0" cellpadding="0" align="right">
<tr>
<td width="100%" valign="middle" height="81"><iframe src="inc_chief.asp" width="90%" height="100%" frameborder="0" scrolling="auto" marginheight="5" marginwidth="2" allowTransparency="true" style="filter:alpha(opacity=75); background-color:#8E3238"></iframe></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" height="21" bgcolor="#6A1616" style="border-top: 1 solid #000000; border-bottom: 1 solid #000000"><!--#include file="inc_menu.asp"--></td>
</tr>
<tr>
<!--#include file="inc_status.asp"-->
</tr>
<tr>
<td width="100%" height="5" background="images/line.jpg"></td>
</tr>
<tr>
<td width="100%" height="21">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="659" valign="top">
<table border="0" width="100%" cellspacing="1" cellpadding="0">
<tr>
<td width="100%">
<% Set rs = Conn.Execute("SELECT * FROM gar WHERE id = " & Request.Querystring("id") & " AND author_id = " & Session("id") & "") %>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="45%">
<table border="0" cellpadding="0" cellspacing="1" width="100%">
<tr>
<td width="100%" class="p_overskrift">Redigere galleri</td>
</tr>
<tr>
<td width="100%">
<%
strMotor = Replace(rs("motor"),"<br>",vbCrLf)
strHorsePower = Replace(rs("horsepower"),"<br>",vbCrLf)
strTire = Replace(rs("tire"),"<br>",vbCrLf)
strStyling = Replace(rs("styling"),"<br>",vbCrLf)
strExtra = Replace(rs("extra"),"<br>",vbCrLf)
strComment = Replace(rs("comment"),"<br>",vbCrLf)
%>
<table border="0" cellpadding="0" cellspacing="3" width="100%" style="border-collapse: collapse" bordercolor="#111111">
<form name="gallery" method="POST" action="gallery_edit_save.asp?id=<%=rs("id") %>">
<tr>
<td width="100%" valign="top" class="tekst" colspan="2">Hej med dig, du kan redigere dit galleri her. Man kan ikke ændre mærkte, model eller årgang.</td>
</tr>
<tr>
<td width="27%" valign="top" class="overskrift">Mærke:</td>
<td width="73%" class="tekst_disabled"><%=rs("brand") %></td>
</tr>
<tr>
<td width="27%" valign="top" class="overskrift">Model:</td>
<td width="73%" class="tekst_disabled"><%=rs("model") %></td>
</tr>
<tr>
<td width="27%" valign="top" class="overskrift">Årgang:</td>
<td width="73%" class="tekst_disabled"><%=rs("year") %></td>
</tr>
<tr>
<td width="27%" valign="top" class="overskrift">Motor:</td>
<td width="73%"><textarea rows="5" name="motor" cols="29" class="form"><%=strMotor %></textarea></td>
</tr>
<tr>
<td width="27%" valign="top" class="overskrift">Hestekræfter:</td>
<td width="73%"><textarea rows="5" name="horsepower" cols="29" class="form"><%=strHorsePower %></textarea></td>
</tr>
<tr>
<td width="27%" valign="top" class="overskrift">Dæk:</td>
<td width="73%"><textarea rows="5" name="tire" cols="29" class="form"><%=strTire %></textarea></td>
</tr>
<tr>
<td width="27%" valign="top" class="overskrift">Styling:</td>
<td width="73%"><textarea rows="5" name="styling" cols="29" class="form"><%=strStyling %></textarea></td>
</tr>
<tr>
<td width="27%" valign="top" class="overskrift">Ekstra tilbehør:</td>
<td width="73%"><textarea rows="5" name="extra" cols="29" class="form"><%=strExtra %></textarea></td>
</tr>
<tr>
<td width="27%" valign="top" class="overskrift">Bemærkninger:</td>
<td width="73%"><textarea rows="5" name="comment" cols="29" class="form"><%=strComment %></textarea></td>
</tr>
<tr>
<td width="27%"></td>
<td width="73%"><input type="submit" value="Gem" name="b1" class="button"> <input type="reset" value="Fortryd" name="b2" class="button"></td>
</tr>
</form>
</table>
</td>
</tr>
</table>
</td>
<td background="images/line2.jpg"> </td>
<td width="55%" valign="top">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%">
<table border="0" cellpadding="0" cellspacing="1" width="100%">
<tr>
<td width="100%" class="p_overskrift">Billede(r)</td>
</tr>
<tr>
<td width="100%">
<%
Set rs2 = Conn.Execute("SELECT * FROM gar_upload WHERE g_id = " & rs("id") & " AND status = 10 ORDER BY id")
Set count = Conn.Execute("SELECT COUNT(id) AS records FROM gar_upload WHERE g_id = " & rs("id") & " AND status = 10")
%>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%"><p align="center"><img border="0" src="images/upload/gar/<%=rs2("id") %>.jpg" width="317" height="239" id="foto"></p></td>
</tr>
<tr>
<td width="100%"><br>
<table border="0" cellpadding="0" cellspacing="1" width="100%" class="tekst">
<form name="galleryEdit"><input type="hidden" name="files" value="<%=count("records") %>"></form>
<%
DO WHILE NOT rs2.EOF
%>
<tr>
<td width="11%"><img src="images/upload/gar/<%=rs2("id") %>.jpg" width="60" height="45" onmouseover="document.getElementById('foto').src='images/upload/gar/<%=rs2("id") %>.jpg'" onmouseout="document.getElementById('foto').src='images/upload/gar/<%=rs2("id") %>.jpg';"></td>
<td width="77%"><a href="#" onclick="popup('gallery_upload_text.asp?id=<%=rs2("id") %>','mitvindue','20','200');">Indsæt/Ret billedetekst</a><br>Billedetekst: <%=rs2("text") %></td>
<td width="12%"><a href="gallery_edit_delete.asp?id=<%=rs2("id") & "&g_id=" & rs2("g_id") %>" onClick="return galleryDelete();">Slet</a></td>
</tr>
<%
rs2.MoveNext
LOOP
%>
</table>
</td>
</tr>
<form name="galleryupload" method="POST" action="gallery_edit_upload.asp?id=<%=rs("id") %>" enctype="multipart/form-data" onSubmit="return validateUpload();">
<tr>
<td width="100%"><p align="center"><br><input type="file" name="file" size="30" class="form"> <input type="submit" value="Upload" name="b1" class="button"></p></td>
</tr>
</form>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" height="2" background="images/line2.jpg"></td>
</tr>
<tr>
<td width="100%" class="tekst">
<p align="center"><br><a href="
http://www.partner-ads.com/dk/klikbanner.php?partnerid=896&bannerid=1032" target=_blank><img src="
http://www.partner-ads.com/dk/visbanner.php?partnerid=896&bannerid=1032" border="0"></a></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" height="2" background="images/line2.jpg"></td>
</tr>
<tr>
<td width="100%" align="center" height="70"><a href="
http://www.partner-ads.com/dk/klikbanner.php?partnerid=896&bannerid=204" target=_blank><img src="
http://www.partner-ads.com/dk/visbanner.php?partnerid=896&bannerid=204" border=0></a></td>
</tr>
</table>
</td>
<td width="3" background="images/line2.jpg"></td>
<td width="198" valign="top"><!--#include file="inc_right.asp"--></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" height="5" bgcolor="#6A1616"> </td>
</tr>
</table>
</td>
</tr>
</table>
</body>
<%
rs.Close
rs2.Close
Conn.Close
Set rs = Nothing
Set rs2 = Nothing
Set Conn = Nothing
%>
</html>