Om du fixar till koden så den är läsbar (ta bort allt onödigt och lägga till [kod]-taggar till exempel) så finns det säkert folk som kan ta sig en titt.
Jag vill att det script ska lista det uppifrån och ner och inte tvätom. hur gör man....
<%@EnableSessionState=True%>
<html>
<head>
<title>Upload</title>
<style type="text/css">
<!--
a:link {color: #5881CA; text-decoration: none; font-family: arial}
a:visited {color: #5881CA; text-decoration: none}
a:hover {color: #800000; text-decoration: underline}
body {background: #000000; font-family:arial; font-size:8pt; letter-spacing:0.05em}
td { font-family: arial; font-size: 8pt}
-->
</style>
</head>
<table width="750" border="0" cellspacing="0" cellpadding="1" align="center" bgcolor="#003366" id="table2">
<tr>
<td>
<table width="750" border="0" cellspacing="0" cellpadding="3" bgcolor=#000000 id="table3">
<tr>
<td>
<table width="750" border="0" cellspacing="0" cellpadding="5" bgcolor="#000000" id="table4">
<tr valign="top">
<td>
<table border="0" width="750" id="table5" cellspacing="0" cellpadding="0">
<tr>
<td></td>
</tr>
<tr>
<td>
<p align="left">
<font face="Arial" size="4">New uploaded nfo´s</font></td></tr><tr><td>
<FONT FACE="<%=font%>" SIZE="-1">
<hr color="#FF9900" size="1">
</font>
</td>
</tr>
<tr>
<td>
<body OnLoad="<%=Mess%>" text="#FFFFFF" style="background-color: #000000">
<div align="center">
<table width="750" border="0">
<form name="frmUpload" method="post" enctype="multipart/form-data" action="lista.asp?do=upload">
<%
'###################################################
'-------------MAPPEN DU LADDAR UPP FILERNA TILL----------------------
'###################################################
Mappen = Server.MapPath("uploads")
Set MappKoll = Server.CreateObject("Scripting.FileSystemObject")
Set Mapp = MappKoll.getFolder(Mappen)
PS = 15
If Mapp.Files.Count Mod PS Then
Sidor = Mapp.Files.Count \ PS + 1
Else
Sidor = Mapp.Files.Count \ PS
End If
Sida = Request.QueryString("sida")
If Sida = "" Then
Sida = 1
End If
Start = (Sida - 1) * PS
Slut = Start + PS
If Mapp.Files.Count = 0 Then%>
<tr>
<td>
<p align="center">No covers!</td>
</tr>
<%Else
For Each File In Mapp.Files
bild = InStrRev(LCase(File.Name), "." )
If bild < 1 Then bild = "" Else bild = Mid(LCase(File.Name),bild+1 )
If X < Start Then
ElseIf X < Slut Then%>
<tr>
<td><a href="<%=Mappen%>/<%=File.Name%>" target="_blank">
<p align="center"><%=File.Name%></b>
- <%=Round(File.Size/1000, 1)%> kb</td>
</tr>
<%Else
Exit For
End If
X = X + 1
Next
End If
If Sidor < 1 Then%>
<tr>
<td>
<FONT FACE="<%=font%>" SIZE="-1">
<hr color="#FF9900" size="1">
</font>
</td>
</tr>
<tr>
<td>
<%For i = 1 To Sidor
If i = CInt(Sida) Then
Response.Write "<b>" & i & "</b>"
Else
Response.Write " <a href=lista.asp?sida=" & i & ">" & i & "</a> "
End If
Next%>
</td>
</tr>
<tr>
<td><hr></td>
</tr>
<%End If%>
<tr>
<td>
<p align="center"><b>file:</b> <input type="file" name="upload" size="35"></td>
</tr>
<tr>
<td>
<FONT FACE="<%=font%>" SIZE="-1">
<hr color="#FF9900" size="1">
</font>
</td>
</tr>
<tr>
<td>
<p align="center"><input type="submit" value="- upload -"></td>
</tr>
<%If Session("mess") <> "" Then%>
<tr>
<td>
<FONT FACE="<%=font%>" SIZE="-1">
<hr color="#FF9900" size="1">
</font>
</td>
</tr>
<tr>
<td align="center"><b>
<%Response.Write Session("mess")
Session("mess") = ""%></b></td>
</tr>
<%End If%>
</form>
</table>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p align="center"><a href="lista.asp">lista.asp</a></p>
<p align="center"><a href="archive.asp">pic.asp</a></p>
<p align="center"><a href="sok.asp">sok.asp</a></p>
</body>
</html>
<%If Request.QueryString("do") = "upload" Then
Response.Buffer=True
Response.Expires=0
Set Upload = Hamta_filer()
files = Upload("upload").Item("content")
If MappKoll.FileExists(Mappen & "\" & extract_filename(Upload("upload").Item("filename"))) Then
Session("mess") = "This looks like a dupe!"
Response.Redirect "lista.asp"
Else
Set File = MappKoll.CreateTextFile(Mappen & "\" & extract_filename(Upload("upload").Item("filename")))
End If
For i = 1 to LenB(files)
File.Write chr(ASCB(MidB(files, i, 1)))
Next
Response.Redirect "lista.asp"
File.Close: Set File = Nothing
Function Hamta_filer()
Set filer = Server.CreateObject("Scripting.Dictionary")
Binaries = Request.BinaryRead(Request.TotalBytes)
start = 1
slut = InstrB(start, Binaries, hamta_strang_size(chr(13)))
boundary = MidB(Binaries, start, (start - slut))
b_position = InstrB(1, Binaries, boundary)
Do Until (b_position = InstrB(Binaries, boundary & hamta_strang_size("--")))
If Not(Response.IsClientConnected) Then Response.End
start = (InstrB(InstrB(b_position, Binaries, hamta_strang_size("Content-Disposition")), Binaries, hamta_strang_size("name=")) + 6)
slut = InstrB(start, Binaries, hamta_strang_size(chr(34)))
name = hamta_strang(MidB(Binaries, start, (slut - start)))
pos_file = InstrB(b_position, Binaries, hamta_strang_size("filename="))
If ((pos_file <> 0) AND (pos_file < InstrB(slut, Binaries, boundary))) Then
filer.Add name, Server.CreateObject("Scripting.Dictionary")
start = (pos_file + 10)
slut = InstrB(start, Binaries, hamta_strang_size(chr(34)))
filer.item(name).Add "filename", hamta_strang(MidB(Binaries, start, (slut - start)))
start = (InstrB(slut, Binaries, hamta_strang_size("Content-Type:")) + 14)
slut = InstrB(start, Binaries, hamta_strang_size(chr(13)))
filer.item(name).Add "content-type", hamta_strang(MidB(Binaries, start, (slut - start)))
start = (slut + 4)
slut = InstrB(start, Binaries, boundary) - 2
filer.item(name).Add "size", ((slut - start))
filer.item(name).Add "content", MidB(Binaries, start, (slut - start))
End If
b_position = InstrB(b_position + LenB(boundary), Binaries, boundary)
Loop
Set Hamta_filer = filer
End Function
Function hamta_strang_size(str)
For cnt = 1 to Len(str)
hamta_strang_size = hamta_strang_size & chrB(ASCB(Mid(str, cnt, 1)))
Next
End Function
Function hamta_strang(str)
For cnt = 1 to LenB(str)
hamta_strang = hamta_strang & chr(ASCB(MidB(str, cnt, 1)))
Next
End Function
Function extract_filename(filename)
extract_filename = Right(filename, Len(filename) - InStrRev(filename, "\", -1, 1))
End Function
End If%>
RED. Fixade till koden. //OveRRidE




