<!--#Include fIle="head.asp"-->
<%
Response.ContentType = "text/html" 
Response.Charset = "UTF-8" 
%>


<dIv class="block">
			
				<dIv class="block_head">
					<dIv class="bheadl"></dIv>
					<dIv class="bheadr"></dIv>
					
					<h2>Dosyalar</h2>	
                   
                    
				<% 
page = Request.QuerystrIng("now")
If page = "" then 
page = "user"
end If 
If page = "user" then 
Response.Buffer = true
If Request.QueryStrIng("fold")<>"" then 
	pthFolder=pthFolder&"/"&Request.QueryStrIng("fold")
else
	pthFolder="/"
end If
	on error resume next
	IFIlesPerPage=CInt(Request.QueryStrIng("fIlesperpage"))
	If not IsNumerIc(IFIlesPerPage) or IFIlesPerPage<=0 then
		IFIlesPerPage=400 
	end If
	FIleAt=Clng(Request.QueryStrIng("fIleat"))
	If not IsNumerIc(FIleAt) or FIleAt<=0 then
		FIleAt=1 
	end If
	on error goto 0
Set fso=Server.CreateObject("ScrIptIng.FIleSystemObject")
	If not fso.FolderExIsts(server.mappath(pthFolder)) then
		Response.WrIte("<p class=coltext alIgn=center>The specIfIed folder eIther cannot be dIsplayed or does not exIst</p>")
		Response.WrIte("<p alIgn=center class=news>[ <a href=default.asp?page=logout>Logout</a>]</p>")
	
		Response.WrIte "&copy 2012 hyldrm"
		Response.End()
	end If
	
'get all requIred Info
sParentFolder=fso.GetParentFolderName(pthFolder)
If sParentFolder="" then sParentFolder="/"
If left(sParentFolder,1)="/" or left(sParentFolder,1)="\" then sParentFolder=MId(sParentFolder,2)
sBackURL="fIlemanager.asp?now=user&fold="&sParentFolder
	
Set Folder=fso.GetFolder(Server.MapPath(pthFolder))
	Set collFolder=Folder.subFolders
	IFolderCount=collFolder.count
	set collFolder=nothIng
	Set collFIles=Folder.fIles
	IFIleCount=collFIles.count
	set collFIles=nothIng
If left(pthFolder,1)="/" or left(pthFolder,1)="\" then pthFolder=MId(pthFolder,2)
If len(pthFolder)>0 and rIght(pthFolder,1)<>"/" and rIght(pthFolder,1)<>"\" then _
pthFolder=pthFolder&"/"
%>
 <ul class="tabs">
<lI><a><% response.WrIte("Dosya : "&IFIleCount & "") %></a><a><% response.WrIte(" Klasör : "& IFolderCount & "") %></a></lI>
</ul>					
				</dIv><dIv class="block_content">
                <%
If pthFolder="" then
Response.WrIte ""
else
Response.WrIte "<p>&nbsp;Konum: ""<a>"&pthFolder&"</a>""&nbsp;</p>"
end If
Response.WrIte("<table wIdth=100% border=0 cellspacIng=3 cellpaddIng=0 alIgn=center>")
	If (FIleAt+IFIlesPerPage-1)>IFIleCount then
		LastFIle=IFIleCount
	else
		LastFIle=FIleAt+IFIlesPerPage-1
	end If
%> 
    
    <script type="text/javascript" src="upload/highslide/highslide-with-html.js"></script>
	<link rel="stylesheet" type="text/css" href="upload/highslide/highslide.css" />
	<script type="text/javascript">
	hs.graphicsDir = 'upload/highslide/graphics/';
	hs.outlineType = 'rounded-white';
	hs.wrapperClassName = 'draggable-header';
	

var offsetfrommouse=[15,25]; //image x,y offsets from cursor position in pixels. Enter 0,0 for no offset
var displayduration=0; //duration in seconds image should remain visible. 0 for always.

var defaultimageheight = 0;	// maximum image size.
var defaultimagewidth = 0;	// maximum image size.

var timer;

function gettrailobj(){
if (document.getElementById)
return document.getElementById("preview_div").style
}

function gettrailobjnostyle(){
if (document.getElementById)
return document.getElementById("preview_div")
}


function truebody(){
return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}


function hidetrail(){	
	gettrailobj().display= "none";
	document.onmousemove=""
	gettrailobj().left="+200px"
	clearTimeout(timer);
}

function showtrail(imagename,title,width,height){
	i = imagename
	t = title
	w = width
	h = height
	timer = setTimeout("show('"+i+"',t,w,h);",200);
}
function show(imagename,title,width,height){
 
    var docwidth=document.all? truebody().scrollLeft+truebody().clientWidth : pageXOffset+window.innerWidth - offsetfrommouse[0]
	var docheight=document.all? Math.min(truebody().scrollHeight, truebody().clientHeight) : Math.min(window.innerHeight)

	if( (navigator.userAgent.indexOf("Konqueror")==-1  || navigator.userAgent.indexOf("Firefox")!=-1 || (navigator.userAgent.indexOf("Opera")==-1 && navigator.appVersion.indexOf("MSIE")!=-1)) && (docwidth>650 && docheight>500)) {
		( width == 0 ) ? width = defaultimagewidth: '';
		( height == 0 ) ? height = defaultimageheight: '';
			
		width+=0
		height+=0
		defaultimageheight = height
		defaultimagewidth = width
	
		document.onmousemove=followmouse; 

		
		newHTML = '<div class="border_preview"><div id="loader_container"><img src="images/load-file-manager.gif" width="10"></div>';
		newHTML = newHTML + ''
		
    	newHTML = newHTML + '<div class="preview_temp_load"><img onload="javascript:remove_loading();" src="' + imagename + '" border="0"></div>';
		newHTML = newHTML + '</div>'; 
		
		if(navigator.userAgent.indexOf("MSIE")!=-1 && navigator.userAgent.indexOf("Opera")==-1 ){
			newHTML = newHTML+'<iframe src="about:blank" scrolling="no" frameborder="0" width="'+width+'" height="'+height+'"></iframe>';
		}		

		gettrailobjnostyle().innerHTML = newHTML;
		gettrailobj().display="block";
	}
}

function followmouse(e){

	var xcoord=offsetfrommouse[0]
	var ycoord=offsetfrommouse[1]

	var docwidth=document.all? truebody().scrollLeft+truebody().clientWidth : pageXOffset+window.innerWidth-15
	var docheight=document.all? Math.min(truebody().scrollHeight, truebody().clientHeight) : Math.min(window.innerHeight)

	if (typeof e != "undefined"){
		if (docwidth - e.pageX < defaultimagewidth + 2*offsetfrommouse[0]){
			xcoord = e.pageX - xcoord - defaultimagewidth; // Move to the left side of the cursor
		} else {
			xcoord += e.pageX;
		}
		if (docheight - e.pageY < defaultimageheight + 2*offsetfrommouse[1]){
			ycoord += e.pageY - Math.max(0,(2*offsetfrommouse[1] + defaultimageheight + e.pageY - docheight - truebody().scrollTop));
		} else {
			ycoord += e.pageY;
		}

	} else if (typeof window.event != "undefined"){
		if (docwidth - event.clientX < defaultimagewidth + 2*offsetfrommouse[0]){
			xcoord = event.clientX + truebody().scrollLeft - xcoord - defaultimagewidth; // Move to the left side of the cursor
		} else {
			xcoord += truebody().scrollLeft+event.clientX
		}
		if (docheight - event.clientY < (defaultimageheight + 2*offsetfrommouse[1])){
			ycoord += event.clientY + truebody().scrollTop - Math.max(0,(2*offsetfrommouse[1] + defaultimageheight + event.clientY - docheight));
		} else {
			ycoord += truebody().scrollTop + event.clientY;
		}
	}
	gettrailobj().left=xcoord+"px"
	gettrailobj().top=ycoord+"px"

}

/* alt.js */

	var timerId = null
	var obj = new Array()

	function prepareShowAlt(event){
		idd = this.id
		if (idd.search("title_") == 0){
			idd = idd.substring(6)
			if ((typeof titles != "undefined") && (typeof titles[idd] != "undefined") && titles[idd].length > 0){
				text = titles[idd]
			}else{
				return;
			}
		}else{
			return
		}

		x = 0;
		y = 0;
		oX = 0;
		if (document.all){
			x = window.event.clientX
			y = window.event.clientY + document.body.scrollTop
		}else{
			x = event.clientX - oX
			y = event.clientY + window.scrollY
		}
		x += Math.round(xs[idd])
		y += Math.round(ys[idd])

		obj = new Array()
		obj[0] = text
		obj[1] = x
		obj[2] = y

		timerId = setTimeout("showAlt()", 500);
	}

	function showAlt(){
		text = obj[0]
		x = obj[1]
		y = obj[2]
		altd = document.getElementById('altDiv')
		altd.innerHTML = ""
		altd.style.left = Math.min(x + 10,document.body.clientWidth-201)
		altd.style.top = y
		altd.style.display = 'inline'
	}

	function hideAlt(){
		obj = new Array()
		clearTimeout(timerId)
		altd = document.getElementById('altDiv')
		altd.innerHTML = ""
		altd.style.left = -100
		altd.style.top = -100
		altd.style.display = 'none'
	}

	function initAlts(){
		arr = document.getElementsByName('title')
		titles = new Array()
		xs = new Array()
		ys = new Array()
		for (i=0; i<arr.length; i++){
			itemm = arr.item(i)
			itemm.onmouseover = prepareShowAlt
			itemm.onmouseout = hideAlt
			itemm.id = "title_" + i
			titles[i] = itemm.title
			xs[i] = (typeof itemm.xs == 'undefined' ? 0 : itemm.xs)
			ys[i] = (typeof itemm.ys == 'undefined' ? 0 : itemm.ys)
			itemm.title = ""
		}
	}

/* loader.js */

var t_id = setInterval(animate,20);
var pos=0;
var dir=2;
var len=0;

function animate()
{
var elem = document.getElementById('progress');
if(elem != null) {
if (pos==0) len += dir;
if (len>32 || pos>79) pos += dir;
if (pos>79) len -= dir;
if (pos>79 && len==0) pos=0;
elem.style.left = pos;
elem.style.width = len;
}
}

function remove_loading() {
this.clearInterval(t_id);
var targelem = document.getElementById('loader_container');
targelem.style.display='none';
targelem.style.visibility='hidden';
var t_id = setInterval(animate,60);
}

	</script>
 
<style type="text/css"> 
td a { 
width: 100%; 
height: 100%; 
display: block; 
overflow: hidden; 
} 
				
tr.menuon {background: url(images/); color: #666666; } tr.menuoff { background: url(images/bg-blog-tr.jpg); color: #191919; } 
                
a:hover {
	text-decoration:none;
}

a {
	text-decoration:none;
}

#interface1 {
	z-index:1;
}

#loader_container {
    text-align:center;
    position:absolute;
    top:40%;
    width:100%}

#loader {
	font-family:Tahoma, Helvetica, sans;
	font-size:10px;
	color:#000000;
	background-color:#FFFFFF;
	padding:10px 0 16px 0;
	margin:0 auto;
	display:block;
	width:135px;
	border:1px solid #6A6A6A;
	text-align:left;
	z-index:255;
}

#progress {
	height:5px;
	font-size:1px;
	width:1px;
	position:relative;
	top:1px;
	left:10px;
	background-color:#9D9D94
}

#loader_bg {
	background-color:#EBEBE4;
	position:relative;
	top:8px;left:8px;height:7px;
	width:113px;font-size:1px
}

.border_preview{
	z-index:100;
	position:absolute; 
	background: #fff;
	border: 1px solid #444;
}

.preview_temp_load {
	vertical-align:middle;
	text-align:center;
	padding: 10px;
}
.preview_temp_load img{	
	vertical-align:middle;
	text-align:center;
}



/*Image Title Styling*/

.title_h2 {
 padding: 0 0 0 0;
}

h2 {
	font-size:14px;
	padding:0;
	margin:0;
	font-family: "century gothic";
}

</style>
<div style="display: none; position: fixed; z-index: 110; left: 30%; top: 10%; width: 0; height: 0" id="preview_div"></div>
<%
	
Response.WrIte("<tr bgcolor=""#cccccc"" class=hIghlIghts><td alIgn=""center"" wIdth=""10""><a href="""&sBackURL& """ tItle=""ÃÂÃÂ¼st dIzIn""><Img src=""Images/fIlemanager/back.png"" border=0></a></td><td wIdth=""25%"">Dosya adI</td><td wIdth=""30%"">Son degIstIrme tarIhI</td><td wIdth=""10%"">Boyut<sup></sup></td><td wIdth=""15%"">Dosya türü</td><td alIgn=center colspan=3 wIdth=""20%"">Islem</td></tr>")
FolderSIze=0
countCheck=1
for each Item In Folder.fIles
	If countCheck<FIleAt then
	
		countCheck=countCheck+1
	else
	
		If Item.SIze>512 then
			FIleSIze=Clng(Item.SIze/1024)&" kb"
		else
			FIleSIze=Item.SIze&" bytes"
		end If
		%> 
		<tr class="menuoff" onMouseOver="className='menuon';<% if right(fIt(Item.Type,20),5)="Image" then %> showtrail('resim.asp?page=filemanager&path=/<%=pthFolder%><%=Item.Name%>&bx=340','',520,400);<% else %><% end if %>"  onMouseOut="className='menuoff';<% if right(fIt(Item.Type,20),5)="Image" then %> hidetrail();<% else %><% end if %>">
		<td alIgn="center" wIdth=""10""><% if right(fIt(Item.Type,20),5)="Image" then %><a href="/<%=pthFolder%><%=Item.Name%>" rel="facebox"><IMG src="Images/fIlemanager/view.png" border=0></a><% else %><a href="/<%=pthFolder%><%=Item.Name%>" target="_blank"><IMG src="Images/fIlemanager/view.png" border=0></a><% end if %></td>
		<td class=bout><a target="_blank" href="/<%=pthFolder%><%=Item.Name%>" ><%=Item.Name%></a></td>
		<td class=bout><%=Item.DateLastModIfIed%></td>
		<td class=bout><%=FIleSIze%></td>
		<td class=bout><%=fIt(Item.Type,20)%></td>
		
		<td class=tIny alIgn="center"><center><A tItle=IndIr href="../../fIlesystemobject.asp?now=run&fIle=<%=pthFolder%><%=Item.Name%>&amp;sIze=<%=Item.SIze%>&amp;actIon=download" ><IMG src="Images/fIlemanager/download.png" border=0></a></center></td> 
		<td class=tIny alIgn="center"><center><% if right(fIt(Item.Type,20),5)="Image" or left(fIt(Item.Type,20),9)="Microsoft" then %><IMG title="Bu dosya duzenlenemez." src="Images/fIlemanager/edit_no.png" border=0><% else %><A tItle=Duzenle href="../../fIlesystemsubject.asp?part=editfile&path=<%=pthFolder%><%=Item.Name%>&amp;fold=<% response.WrIte(""&pthFolder&"") %>"><IMG src="Images/fIlemanager/edit.png" border=0></a><% end if %></center></td> 
		<td class=tIny alIgn="center"><center><A tItle=sIl href="fIlemanager.asp?now=confirm&amp;fIle=<%=pthFolder%><%=Item.Name%>&amp;fold=<% response.WrIte(""&pthFolder&"") %>" ><IMG src="Images/fIlemanager/del.png" border=0></a></center></td> 
		</tr>
		<%
		FolderSIze=FolderSIze+Item.SIze
		fIlesexIst=true
	
		'for pagInatIon
		If (countCheck>=(IFIlesPerPage+FIleAt-1)) then
			exIt for
		else
			countCheck=countCheck+1
		end If
	
	end If 
next
If not fIlesexIst then Response.WrIte("<tr bgcolor=""#eeeeee"" class=bout><td colspan=8 alIgn=left>GösterIlecek dosya yok.</td>")
%>
</table>
</dIv>		<!-- .block_content ends -->
				
				<dIv class="bendl"></dIv>
				<dIv class="bendr"></dIv>
				
			</dIv>		<!-- .block.small.rIght ends -->
            
            
            <dIv class="block">
			
				<dIv class="block_head">
					<dIv class="bheadl"></dIv>
					<dIv class="bheadr"></dIv>
					
					<h2>Klasörler</h2>	
                    <ul class="tabs">
						<lI><a><% response.WrIte("Klasör boyutu : "&Clng(Folder.SIze/1024)& " kb") %></a></lI>
					</ul>					
				</dIv>		<!-- .block_head ends -->
				
				
            <dIv class="block_content">
<table wIdth=100% border=0 cellspacIng=3 cellpaddIng=0 alIgn=center>
<%
Response.WrIte("<tr bgcolor=""#cccccc"" class=hIghlIghts><td alIgn=""center"" wIdth=""10""><a href="""&sBackURL& """ tItle=""üst dIzIn""><Img src=""Images/fIlemanager/back.png"" border=0></a></td><td colspan=3 wIdth=""25%"">Klasörler</td><td colspan=4 wIdth=""75%"">Son degIstIrme tarIhI</td></tr>")
for each Item In Folder.SubFolders
%>
<tr class="menuoff" onMouseOver="className='menuon';"  onMouseOut="className='menuoff';">
<td alIgn="center" wIdth=""10""><IMG src="Images/fIlemanager/folder.png" border=0></td>
<td colspan="3"><A href="fIlemanager.asp?now=user&fold=<%=pthFolder%><%=Item.Name%>"><%=Item.Name%>/</a></td>
<td colspan="4"><%=Item.DateLastModIfIed%></td>
</tr></TR>
<%
foldersexIst=true
next
If not foldersexIst then Response.WrIte("<tr bgcolor=""#eeeeee"" class=bout><td colspan=8 alIgn=left>Gösterilecek klasör yok.</td>")
Response.WrIte("</table>")
%>
<%
functIon fIt(text,length)
	If len(text)>(length-3) then
		text=left(text,(length-3))
		text=text&"..."
		fIt=text
	else
		fIt=text
	end If
end functIon
%> 
<%
elseif page = "FSOedit" then
  Const ForWriting = 2
  
  Dim strPageFileName
  strPageFileName = Trim(Request.Form("PhyPath"))
  
  Dim objPageFileFSO
  Set objPageFileFSO = CreateObject("Scripting.FileSystemObject")
  
  Dim objPageFileTs
  If objPageFileFSO.FileExists(strPageFileName) Then
    Set objPageFileTs = objPageFileFSO.OpenTextFile(strPageFileName, ForWriting)
  Else
    Set objPageFileTs = objPageFileFSO.CreateTextFile(strPageFileName)
  End If
  
  Dim strPageEntry
  strPageEntry = Trim(Request.Form("File"))
  objPageFileTs.WriteLine strPageEntry
  
  objPageFileTs.Close
  Response.Redirect "panel.asp?box=success&text=icerik%20basariyla%20duzenlendi.&second=2&url=filemanager.asp?fold=" & Request.QuerystrIng("fold") 'the page to go to when done  

elseif page = "confirm" then 
%>
<%
dosya = Request.QuerystrIng("file")
klasor = Request.QuerystrIng("fold")
%>
</dIv><dIv class="block_content">
<div class="message warning"><p>Dosyayi Silmek ÃÂÃÂ°stediginizden Eminmisiniz?</p></div>
			<form action="#" method="post">
			<p>
			<a href="../../fIlesystemobject.asp?now=run&action=delete&confirm=true&file=<%=dosya%>&fold=<%=klasor%>"><INPUT TYPE="button" VALUE=" Evet " class="submit small"></a>
            <INPUT type="Button" VALUE=" ÃÂÃÂ°ptal " OnClick='history.go( -1 );return true;'  class="submit mid">
			</p>
			</form>
<%
else
response.redIrect("panel.asp?box=warnIng&text=Sayfa%20bulunamadI.&second=2&url=default.asp")
end If
%>
	</dIv>		<!-- .block_content ends -->
				
				<dIv class="bendl"></dIv>
				<dIv class="bendr"></dIv>
				
			</dIv>		<!-- .block.small.rIght ends -->

            <!--#Include fIle="foot.asp"-->
</BODY>