İyinet'e Hoşgeldiniz!

Türkiye'nin En Eski Webmaster Forum'una Hemen Kayıt Olun!

Kayıt Ol!

Buna nasil bir sayfalama yapabiliriz ?

scrol

0
İyinet Üyesi
Katılım
4 Şubat 2007
Mesajlar
66
Reaction score
0
merhaba arkadaslar free bi tane script buldum fso ile klasor listeleme scripti. bunu wml ye cevirdim ama 10 lu sayfalama yapmak istiyorum aramizda yardimci olabilecek var mi acaba ? sadece sonraki ve onceki seklinde sayfalama yapmasi lazim simdiden herkese tskler

Kod:
<%@ ENABLESESSIONSTATE = False %>
<% Option Explicit %>
<%
'----------------------------------------------------
' Author: Fx
' Website: http://www11.brinkster.com/fx01
' Last Updated: May 9, 2003
' Version: 1.0
'----------------------------------------------------

'--USER SETTINGS-------------------------------------
' Show this script's name and all images associated
' with it in the list of files?
dim ShowScriptInFiles
ShowScriptInFiles = false ' true for yes, false for no

' Calculate and show time taken to process page?
dim ShowTime
ShowTime = false ' true for yes, false for no
'----------------------------------------------------

' Get filename of page running script
dim cur_filename, filename
cur_filename = split(request.servervariables("SCRIPT_NAME"),"/")
filename = cur_filename(ubound(cur_filename))

' List folder contents
sub ListFolderContents(path)
	dim fs, folder, item, k, StripDown, i, upfunction, upfunctionend, gotopath, upfolderpath, fldrfilesize, fldrdircount, fldrfilecount
	set fs = CreateObject("Scripting.FileSystemObject")
	if fs.FolderExists(path) = false then response.redirect(filename & "?fexists=false")
	set folder = fs.GetFolder(path)
	
	' List subfolders
	if request.querystring("folder") <> "" then
		StripDown = split(request.querystring("folder"),"/")
		for k = 0 to ubound(StripDown)
			if StripDown(k) = ".." or StripDown(k) = "." then
				response.redirect(filename & "?k=1")
			end if
		next
		For i = 0 to ubound(StripDown)-1
			if upfolderpath <> "" then upfolderpath = upfolderpath & "/" & StripDown(i) else upfolderpath = StripDown(i)
		next
		if upfolderpath <> "" then
			upfunction = "<a href=""" & filename & "?folder=" & replace(upfolderpath," ","%20") & """>"
			upfunctionend = "</a>"
		else
			upfunction = "<a href=""" & filename & "?folder="">"
			upfunctionend = "</a>"
		end if
	end if
	for each item in folder.subfolders
		if item.Files.count > 0 then
			if Round(item.Size / 1024 / 1024 / 1024,2) >= 1 then
				fldrfilesize = round(item.size / 1024 / 1024 / 1024,2) & " GB in directory"
			elseif Round(item.Size / 1024 / 1024,2) >= 1 then
				fldrfilesize = round(item.size / 1024 / 1024,2) & " MB in directory"
			else
				fldrfilesize = Round(item.Size / 1024) & " KB in directory"
			end if
		else
			fldrfilesize = " 0 KB in directory"
		end if
		if item.subfolders.count > 0 then fldrdircount = item.subfolders.count
		if item.subfolders.count > 1 then fldrdircount = fldrdircount & " directories, " else fldrdircount = "0 directories, "
		if item.files.count > 0 then fldrfilecount = item.files.count
		if item.files.count > 1 then fldrfilecount = fldrfilecount & " içerik<b>)</b> " else fldrfilecount = "0 files, "
		if request.querystring("folder") <> "" then gotopath = request.querystring("folder") & "/" & item.name else gotopath = item.name
		response.write "<img src=""http://aycep.com/wap/images/nokta.gif"" alt=""""/><b><a href=""" & filename & "?folder=" & server.URLEncode(gotopath) & """>" & item.name & "</a></b> <b>(</b>" & fldrfilecount & "<br/>" & vbcrlf
		fldrdircount = ""
		fldrfilesize = ""
		fldrfilecount = ""
	next

	' List files in current folder
	dim filepath, DNSI, filesize
	for each item in folder.files
		' if ShowScriptInFiles is false and item.name equals one of the script's files, do not show it in files list.
		if not ShowScriptInFiles and lcase(item.name) = lcase(filename) and request.querystring("folder") = "" then
			DNSI = true
		elseif not ShowScriptInFiles and lcase(item.name) = "dirlisttile1.gif" and request.querystring("folder") = "" then
			DNSI = true
		elseif not ShowScriptInFiles and lcase(item.name) = "dirlisttile2.gif" and request.querystring("folder") = "" then
			DNSI = true
		elseif not ShowScriptInFiles and lcase(item.name) = "dirlisttile3.gif" and request.querystring("folder") = "" then
			DNSI = true
		elseif not ShowScriptInFiles and lcase(item.name) = "valid.gif" and request.querystring("folder") = "" then
			DNSI = true
		else
			DNSI = false
		end if
		if not DNSI then
			dim GetVirDirPath, GetVirDirPath2, a, ff
			if round(item.size / 1024 / 1024 / 1024,2) >= 1 then
				filesize = round(item.size / 1024 / 1024 / 1024,1) & " Gb)"
			elseif round(item.size / 1024 / 1024,2) >= 1 then
				filesize = round(item.size / 1024 / 1024,1) & " Mb)"
			elseif round(item.size / 1024,2) >= 1 then
				filesize = Round(item.Size / 1024,1) & " Kb)"
			elseif item.size < 1024 then
				filesize = round(item.size) & " Bytes)"
			end if
			GetVirDirPath = split(request.ServerVariables("URL"),"/")
			GetVirDirPath2 = request.querystring("folder")
			for a = 1 to ubound(GetVirDirPath)-1
				ff = GetVirDirPath(a)
			next
			if GetVirDirPath2 <> "" then filepath = GetVirDirPath2 & "/" & item.name else filepath = item.name
			filepath = replace(filepath,"%","%25")
			filepath = replace(filepath," ","%20")
			response.write "<a href=""" & filepath & """>" & item.name & "</a> (" & filesize & " <br/>" & vbcrlf
		end if
	next
	
	' Cleanup
	set fs = nothing
	set folder = nothing
end sub
%>
<?xml version="1.0" encoding="ISO-8859-9"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">

<%
Response.ContentType = "text/vnd.wap.wml"
 %>



<wml>
<card id="w"  title="Aycep.Com">
<p align="center">
<img src="http://aycep.com/wap/images/logo.gif" alt="AyCep.Com"/><br/>
<strong><small>AyCep.Com</small></strong><br/>
<small>Bedava Symbian Programlar</small><br/>
<img src="http://aycep.com/wap/images/cizgi.gif" alt="---"/><br/>
</p>

<p align="left">
<b><small>Icerikler/Contents</small></b><br/>
<small>
<%
dim dirtraversal, nStartTime, nEndTime, nTime
if left(trim(request.querystring("folder")),1) = "/" then dirtraversal = true
if left(trim(request.querystring("folder")),2) = ".." then dirtraversal = true
if left(trim(request.querystring("folder")),1) = "." then dirtraversal = true
if left(trim(request.querystring("folder")),3) = "/.." then dirtraversal = true
if left(trim(request.querystring("folder")),2) = "/." then dirtraversal = true
if left(trim(request.querystring("folder")),4) = "/../" then dirtraversal = true
if left(trim(request.querystring("folder")),3) = "/./" then dirtraversal = true
if left(trim(request.querystring("folder")),3) = "../" then dirtraversal = true
if left(trim(request.querystring("folder")),2) = "./" then dirtraversal = true
if right(trim(request.querystring("folder")),3) = "/.." then dirtraversal = true
if right(trim(request.querystring("folder")),4) = "/../" then dirtraversal = true
if right(trim(request.querystring("folder")),2) = "/." then dirtraversal = true
if right(trim(request.querystring("folder")),3) = "/./" then dirtraversal = true

if dirtraversal = true then
	response.redirect(filename & "?k=1")
elseif trim(request.querystring("folder")) = "" then
	if ShowTime then nStartTime = Timer()
	if request.querystring("k") = 1 then
		response.write "<strong>Error in path!</strong><br/>" & vbcrlf
	elseif request.querystring("fexists") = "false" then
		response.write "<strong>Folder not found!</strong><br/>" & vbcrlf
	end if
	ListFolderContents server.MapPath(".")
	if ShowTime then
		nEndTime = Timer()
		nTime = nEndTime - nStartTime
		response.write "Display took <strong>" & round(nTime,2) & "</strong> seconds.<br/>"
	end if
else
	if ShowTime then nStartTime = Timer()
	ListFolderContents Server.MapPath(request.querystring("folder"))
	if ShowTime then
		nEndTime = Timer()
		nTime = nEndTime - nStartTime
		response.write "Display took <strong>" & round(nTime,2) & "</strong> seconds.<br/>"
	end if
end if
%>


</small>
<img src="http://aycep.com/wap/images/cizgi.gif" alt="---"/><br/>
<img src="http://aycep.com/wap/images/home.gif" alt=""/><small><b><a href="http://aycep.com">Ana Sayfa</a></b></small><br/>

</p>

<p align="center">

<b><small>Copyright</small></b><br/>
<b><small>AyCep.COm</small></b><br/>
</p>
</card></wml>
 

Türkiye’nin ilk webmaster forum sitesi iyinet.com'da forum üyeleri tarafından yapılan tüm paylaşımlardan; Türk Ceza Kanunu’nun 20. Maddesinin, 5651 Sayılı Kanununun 4. maddesinin 2. fıkrasına göre, paylaşım yapan üyeler sorumludur.

Üst