Beispiel #1
0
 public static function getFileSize($file)
 {
     $sizeInBytes = filesize($file);
     // If filesize() fails (with larger files), try to get the size from unix command line.
     if (EncodeExplorer::getConfig("large_files") == true || !$sizeInBytes || $sizeInBytes < 0) {
         $sizeInBytes = exec("ls -l '{$file}' | awk '{print \$5}'");
     }
     return $sizeInBytes;
 }
 public static function emailNotification($path, $isFile)
 {
     if (strlen(EncodeExplorer::getConfig('upload_email')) > 0) {
         $message = "This is a message to let you know that " . GateKeeper::getUserName() . " ";
         $message .= ($isFile ? "uploaded a new file" : "created a new directory") . " in Encode Explorer.\n\n";
         $message .= "Path : " . $path . "\n";
         $message .= "IP : " . $_SERVER['REMOTE_ADDR'] . "\n";
         mail(EncodeExplorer::getConfig('upload_email'), "Upload notification", $message);
     }
 }
 public static function createThumbnail($file)
 {
     if (is_int(EncodeExplorer::getConfig('thumbnails_width'))) {
         $max_width = EncodeExplorer::getConfig('thumbnails_width');
     } else {
         $max_width = 200;
     }
     if (is_int(EncodeExplorer::getConfig('thumbnails_height'))) {
         $max_height = EncodeExplorer::getConfig('thumbnails_height');
     } else {
         $max_height = 200;
     }
     if (File::isPdfFile($file)) {
         $image = ImageServer::openPdf($file);
     } else {
         $image = ImageServer::openImage($file);
     }
     if ($image == null) {
         return;
     }
     imagealphablending($image, true);
     imagesavealpha($image, true);
     $width = imagesx($image);
     $height = imagesy($image);
     $new_width = $max_width;
     $new_height = $max_height;
     if ($width / $height > $new_width / $new_height) {
         $new_height = $new_width * ($height / $width);
     } else {
         $new_width = $new_height * ($width / $height);
     }
     if ($new_width >= $width && $new_height >= $height) {
         $new_width = $width;
         $new_height = $height;
     }
     $new_image = ImageCreateTrueColor($new_width, $new_height);
     imagealphablending($new_image, true);
     imagesavealpha($new_image, true);
     $trans_colour = imagecolorallocatealpha($new_image, 0, 0, 0, 127);
     imagefill($new_image, 0, 0, $trans_colour);
     imagecopyResampled($new_image, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
     return $new_image;
 }
Beispiel #4
0
    function outputHtml()
    {
        global $_ERROR;
        global $_START_TIME;
        ?>
<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php 
        print $this->getConfig('lang');
        ?>
" lang="<?php 
        print $this->getConfig('lang');
        ?>
">
<head>
<meta name="viewport" content="width=device-width" />
<meta http-equiv="Content-Type" content="text/html; charset=<?php 
        print $this->getConfig('charset');
        ?>
">
<?php 
        css();
        ?>
<!-- <meta charset="<?php 
        print $this->getConfig('charset');
        ?>
" /> -->
<?php 
        if ($this->getConfig('log_file') != null && strlen($this->getConfig('log_file')) > 0 || $this->getConfig('thumbnails') != null && $this->getConfig('thumbnails') == true && $this->mobile == false || GateKeeper::isDeleteAllowed()) {
            ?>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
<?php 
            if (GateKeeper::isDeleteAllowed()) {
                ?>
	$('td.del a').click(function(){
		var answer = confirm('Are you sure you want to delete : \'' + $(this).attr("data-name") + "\' ?");
		return answer;
	});
<?php 
            }
            if ($this->logging == true) {
                ?>
		function logFileClick(path)
		{
			 $.ajax({
					async: false,
					type: "POST",
					data: {log: path},
					contentType: "application/x-www-form-urlencoded; charset=UTF-8",
					cache: false
				});
		}

		$("a.file").click(function(){
			logFileClick("<?php 
                print $this->location->getDir(true, true, false, 0);
                ?>
" + $(this).html());
			return true;
		});
<?php 
            }
            if (EncodeExplorer::getConfig("thumbnails") == true && $this->mobile == false) {
                ?>
		function positionThumbnail(e) {
			xOffset = 30;
			yOffset = 10;
			$("#thumb").css("left",(e.clientX + xOffset) + "px");

			diff = 0;
			if(e.clientY + $("#thumb").height() > $(window).height())
				diff = e.clientY + $("#thumb").height() - $(window).height();

			$("#thumb").css("top",(e.pageY - yOffset - diff) + "px");
		}

		$("a.thumb").hover(function(e){
			$("#thumb").remove();
			$("body").append("<div id=\"thumb\"><img src=\"?thumb="+ $(this).attr("href") +"\" alt=\"Preview\" \/><\/div>");
			positionThumbnail(e);
			$("#thumb").fadeIn("medium");
		},
		function(){
			$("#thumb").remove();
		});

		$("a.thumb").mousemove(function(e){
			positionThumbnail(e);
			});

		$("a.thumb").click(function(e){$("#thumb").remove(); return true;});
<?php 
            }
            ?>
	});
//]]>
</script>
<?php 
        }
        ?>
<title><?php 
        if (EncodeExplorer::getConfig('main_title') != null) {
            print EncodeExplorer::getConfig('main_title');
        }
        ?>
</title>
</head>
<body class="<?php 
        print $this->mobile == true ? "mobile" : "standard";
        ?>
">
<?php 
        //
        // Print the error (if there is something to print)
        //
        if (isset($_ERROR) && strlen($_ERROR) > 0) {
            print "<div id=\"error\">" . $_ERROR . "</div>";
        }
        ?>
<div id="frame">
<?php 
        if (EncodeExplorer::getConfig('show_top') == true) {
            ?>
<div id="top">
	<a href="<?php 
            print $this->makeLink(false, false, null, null, null, "");
            ?>
"><span><?php 
            if (EncodeExplorer::getConfig('main_title') != null) {
                print EncodeExplorer::getConfig('main_title');
            }
            ?>
</span></a>
<?php 
            if (EncodeExplorer::getConfig("secondary_titles") != null && is_array(EncodeExplorer::getConfig("secondary_titles")) && count(EncodeExplorer::getConfig("secondary_titles")) > 0 && $this->mobile == false) {
                $secondary_titles = EncodeExplorer::getConfig("secondary_titles");
                print "<div class=\"subtitle\">" . $secondary_titles[array_rand($secondary_titles)] . "</div>\n";
            }
            ?>
</div>
<?php 
        }
        // Checking if the user is allowed to access the page, otherwise showing the login box
        if (!GateKeeper::isAccessAllowed()) {
            $this->printLoginBox();
        } else {
            if ($this->mobile == false && EncodeExplorer::getConfig("show_path") == true) {
                ?>
<div class="breadcrumbs">
<a href="?dir="><?php 
                print $this->getString("root");
                ?>
</a>
<?php 
                for ($i = 0; $i < count($this->location->path); $i++) {
                    print "&gt; <a href=\"" . $this->makeLink(false, false, null, null, null, $this->location->getDir(false, true, false, count($this->location->path) - $i - 1)) . "\">";
                    print $this->location->getPathLink($i, true);
                    print "</a>\n";
                }
                ?>
</div>
<?php 
            }
            ?>

<!-- START: List table -->
<table class="table">
<?php 
            if ($this->mobile == false) {
                ?>
<tr class="row one header">
	<td class="icon"> </td>
	<td class="name"><?php 
                print $this->makeArrow("name");
                ?>
</td>
	<td class="size"><?php 
                print $this->makeArrow("size");
                ?>
</td>
	<td class="changed"><?php 
                print $this->makeArrow("mod");
                ?>
</td>
	<?php 
                if ($this->mobile == false && GateKeeper::isDeleteAllowed()) {
                    ?>
	<td class="del"><?php 
                    print EncodeExplorer::getString("del");
                    ?>
</td>
	<?php 
                }
                ?>
</tr>
<?php 
            }
            ?>
<tr class="row two">
	<td class="icon"><img alt="dir" src="?img=directory" /></td>
	<td colspan="<?php 
            print $this->mobile == true ? 1 : (GateKeeper::isDeleteAllowed() ? 4 : 3);
            ?>
" class="long">
		<a class="item" href="<?php 
            print $this->makeLink(false, false, null, null, null, $this->location->getDir(false, true, false, 1));
            ?>
">..</a>
	</td>
</tr>
<?php 
            //
            // Ready to display folders and files.
            //
            $row = 1;
            //
            // Folders first
            //
            if ($this->dirs) {
                foreach ($this->dirs as $dir) {
                    $row_style = $row ? "one" : "two";
                    print "<tr class=\"row " . $row_style . "\">\n";
                    print "<td class=\"icon\"><img alt=\"dir\" src=\"?img=directory\" /></td>\n";
                    print "<td class=\"name\" colspan=\"" . ($this->mobile == true ? 1 : 2) . "\">\n";
                    print "<a href=\"" . $this->makeLink(false, false, null, null, null, $this->location->getDir(false, true, false, 0) . $dir->getNameEncoded()) . "\" class=\"item dir\">";
                    print $dir->getNameHtml();
                    print "</a>\n";
                    print "</td>\n";
                    if ($this->mobile != true) {
                        print "<td class=\"changed\">" . $this->formatModTime($dir->getModTime()) . "</td>\n";
                    }
                    if ($this->mobile == false && GateKeeper::isDeleteAllowed()) {
                        print "<td class=\"del\"><a data-name=\"" . htmlentities($dir->getName()) . "\" href=\"" . $this->makeLink(false, false, null, null, $this->location->getDir(false, true, false, 0) . $dir->getNameEncoded(), $this->location->getDir(false, true, false, 0)) . "\"><img src=\"?img=del\" alt=\"Delete\" /></a></td>";
                    }
                    print "</tr>\n";
                    $row = !$row;
                }
            }
            //
            // Now the files
            //
            if ($this->files) {
                $count = 0;
                foreach ($this->files as $file) {
                    $row_style = $row ? "one" : "two";
                    print "<tr class=\"row " . $row_style . (++$count == count($this->files) ? " last" : "") . "\">\n";
                    print "<td class=\"icon\"><img alt=\"" . $file->getType() . "\" src=\"" . $this->makeIcon($file->getType()) . "\" /></td>\n";
                    print "<td class=\"name\" colspan=\"1\">\n";
                    print "\t\t<a href=\"" . $this->location->getDir(false, true, false, 0) . $file->getNameEncoded() . "\"";
                    if (EncodeExplorer::getConfig('open_in_new_window') == true) {
                        print "target=\"_blank\"";
                    }
                    print " class=\"item file";
                    if ($file->isValidForThumb()) {
                        print " thumb";
                    }
                    print "\">";
                    print $file->getNameHtml();
                    if ($this->mobile == true) {
                        print "<span class =\"size\">" . $this->formatSize($file->getSize()) . "</span>";
                    }
                    print "</a>\n";
                    print "</td>\n";
                    if ($this->mobile != true) {
                        print "<td class=\"size\">" . $this->formatSize($file->getSize()) . "</td>\n";
                        print "<td class=\"changed\">" . $this->formatModTime($file->getModTime()) . "</td>\n";
                    }
                    if ($this->mobile == false && GateKeeper::isDeleteAllowed()) {
                        print "<td class=\"del\">\n\t\t\t\t<a data-name=\"" . htmlentities($file->getName()) . "\" href=\"" . $this->makeLink(false, false, null, null, $this->location->getDir(false, true, false, 0) . $file->getNameEncoded(), $this->location->getDir(false, true, false, 0)) . "\">\n\t\t\t\t\t<img src=\"?img=del\" alt=\"Delete\" />\n\t\t\t\t</a>\n\t\t\t</td>";
                    }
                    print "</tr>\n";
                    $row = !$row;
                }
            }
            //
            // The files and folders have been displayed
            //
            ?>

</table>
<!-- END: List table -->
<?php 
        }
        ?>
</div>

<?php 
        if (GateKeeper::isAccessAllowed() && GateKeeper::showLoginBox()) {
            ?>
<!-- START: Login area -->
<form enctype="multipart/form-data" method="post">
	<div id="login_bar">
	<?php 
            print $this->getString("username");
            ?>
:
	<input type="text" name="user_name" value="" id="user_name" />
	<?php 
            print $this->getString("password");
            ?>
:
	<input type="password" name="user_pass" id="user_pass" />
	<input type="submit" class="submit" value="<?php 
            print $this->getString("log_in");
            ?>
" />
	<div class="bar"></div>
	</div>
</form>
<!-- END: Login area -->
<?php 
        }
        if (GateKeeper::isAccessAllowed() && $this->location->uploadAllowed() && (GateKeeper::isUploadAllowed() || GateKeeper::isNewdirAllowed())) {
            ?>
<!-- START: Upload area -->
<form enctype="multipart/form-data" method="post">
	<div id="upload">
		<?php 
            if (GateKeeper::isNewdirAllowed()) {
                ?>
		<div id="newdir_container">
			<input name="userdir" type="text" class="upload_dirname" />
			<input type="submit" value="<?php 
                print $this->getString("make_directory");
                ?>
" />
		</div>
		<?php 
            }
            if (GateKeeper::isUploadAllowed()) {
                ?>
		<div id="upload_container">
			<input name="userfile" type="file" class="upload_file" />
			<input type="submit" value="<?php 
                print $this->getString("upload");
                ?>
" class="upload_sumbit" />
		</div>
		<?php 
            }
            ?>
		<div class="bar"></div>
	</div>
</form>
<!-- END: Upload area -->
<?php 
        }
        ?>
<!-- START: Info area -->
<div id="info">
<?php 
        if (GateKeeper::isUserLoggedIn()) {
            print "<a href=\"" . $this->makeLink(false, true, null, null, null, "") . "\">" . $this->getString("log_out") . "</a> | ";
        }
        if (EncodeExplorer::getConfig("mobile_enabled") == true) {
            print "<a href=\"" . $this->makeLink(true, false, null, null, null, $this->location->getDir(false, true, false, 0)) . "\">\n";
            print $this->mobile == true ? $this->getString("standard_version") : $this->getString("mobile_version") . "\n";
            print "</a> | \n";
        }
        if (GateKeeper::isAccessAllowed() && $this->getConfig("calculate_space_level") > 0 && $this->mobile == false) {
            print $this->getString("total_used_space") . ": " . $this->spaceUsed . " MB | ";
        }
        if ($this->mobile == false && $this->getConfig("show_load_time") == true) {
            printf($this->getString("page_load_time") . " | ", (microtime(TRUE) - $_START_TIME) * 1000);
        }
        ?>
<a href="http://encode-explorer.siineiolekala.net">Encode Explorer</a>
</div>
<!-- END: Info area -->
</body>
</html>

<?php 
    }
Beispiel #5
0
$_IMAGES["wmv"] = $_IMAGES["video"];
$_IMAGES["xcf"] = $_IMAGES["graphics"];
$_IMAGES["xls"] = $_IMAGES["spreadsheet"];
$_IMAGES["xlsx"] = $_IMAGES["spreadsheet"];
$_IMAGES["xml"] = $_IMAGES["code"];
$_IMAGES["zip"] = $_IMAGES["archive"];
require "inc/EncodeExplorer.php";
require "inc/Dir.php";
require "inc/FileManager.php";
require "inc/File.php";
require "inc/GateKeeper.php";
require "inc/ImageServer.php";
require "inc/Location.php";
require "inc/Logger.php";
//
// This is where the system is activated.
// We check if the user wants an image and show it. If not, we show the explorer.
//
$encodeExplorer = new EncodeExplorer();
$encodeExplorer->init();
GateKeeper::init();
if (!ImageServer::showImage() && !Logger::logQuery()) {
    $location = new Location();
    $location->init();
    if (GateKeeper::isAccessAllowed()) {
        Logger::logAccess($location->getDir(true, false, false, 0), true);
        $fileManager = new FileManager();
        $fileManager->run($location);
    }
    $encodeExplorer->run($location);
}
 public static function showLoginBox()
 {
     if (!GateKeeper::isUserLoggedIn() && count(EncodeExplorer::getConfig("users")) > 0) {
         return true;
     }
     return false;
 }
Beispiel #7
0
 function uploadFile($location, $userfile)
 {
     global $encodeExplorer;
     $name = basename($userfile['name']);
     if (get_magic_quotes_gpc()) {
         $name = stripslashes($name);
     }
     $upload_dir = $location->getFullPath();
     $upload_file = $upload_dir . $name;
     if (function_exists("finfo_open") && function_exists("finfo_file")) {
         $mime_type = File::getFileMime($userfile['tmp_name']);
     } else {
         $mime_type = $userfile['type'];
     }
     $extension = File::getFileExtension($userfile['name']);
     if (!$location->uploadAllowed()) {
         $encodeExplorer->setErrorString("upload_not_allowed");
     } else {
         if (!$location->isWritable()) {
             $encodeExplorer->setErrorString("upload_dir_not_writable");
         } else {
             if (!is_uploaded_file($userfile['tmp_name'])) {
                 $encodeExplorer->setErrorString("failed_upload");
             } else {
                 if (is_array(EncodeExplorer::getConfig("upload_allow_type")) && count(EncodeExplorer::getConfig("upload_allow_type")) > 0 && !in_array($mime_type, EncodeExplorer::getConfig("upload_allow_type"))) {
                     $encodeExplorer->setErrorString("upload_type_not_allowed");
                 } else {
                     if (is_array(EncodeExplorer::getConfig("upload_reject_extension")) && count(EncodeExplorer::getConfig("upload_reject_extension")) > 0 && in_array($extension, EncodeExplorer::getConfig("upload_reject_extension"))) {
                         $encodeExplorer->setErrorString("upload_type_not_allowed");
                     } else {
                         if (!@move_uploaded_file($userfile['tmp_name'], $upload_file)) {
                             $encodeExplorer->setErrorString("failed_move");
                         } else {
                             chmod($upload_file, EncodeExplorer::getConfig("upload_file_mode"));
                             Logger::logCreation($location->getDir(true, false, false, 0) . $name, false);
                             Logger::emailNotification($location->getDir(true, false, false, 0) . $name, true);
                         }
                     }
                 }
             }
         }
     }
 }
Beispiel #8
0
    function outputHtml()
    {
        global $_ERROR;
        global $_START_TIME;
        ?>

<!DOCTYPE HTML>

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php 
        print $this->getConfig('lang');
        ?>
" lang="<?php 
        print $this->getConfig('lang');
        ?>
">

<head>

<meta name="viewport" content="width=device-width" />

<meta http-equiv="Content-Type" content="text/html; charset=<?php 
        print $this->getConfig('charset');
        ?>
">

<!-- <link rel="stylesheet" type="text/css" media="screen" href="localhost.css" /> -->


<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
            CSS
     ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
     ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->

<style type="text/css">
    body
{
    background-color:#FFF;
    background-image: url("bg.jpg");  no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    font-family:Verdana;
    font-size:small
}

a
{
    color:#232323;
    text-decoration:none;
    display:block
}

a:hover
{
    text-decoration:underline
}

#top
{
    width:100%;
    padding-bottom:20px;
    background:none repeat scroll 0 0 #B6B7C6;
    text-align: center;

}

/*#top a span,#top a:hover,#top a span:hover
{
    color:#4493C4;
    text-align:center;
    font-size:large
}

#top a
{
    display:block;
    padding:20px 0 0
}

#top span
{
    display:block;
    letter-spacing:9px
}*/

div.subtitle
{
    width:80%;
    margin:0 auto;
    color:#68a9d2;
    text-align:center;
}

#frame
{
    background-color:#F2F2F2;
    border:1px solid #CDD2D6;
    margin:0 auto;
    max-width: 1010px;
    opacity: 0.8;
    /*overflow: auto;*/
    text-align:left;

    /*position: absolute;*/
    /*top: 10%;*/
    height: 90%;
    left: 8%;
    width: 80%;

}

#error
{
    max-width:450px;
    background-color:#FFE4E1;
    color:#000;
    padding:7pt;
    position:relative;
    margin:10pt auto;
    text-align:center;
    border:1px dotted #CDD2D6
}

input
{
    border:1px solid #CDD2D6
}

.bar
{
    width:100%;
    clear:both;
    height:1px
}

/* File list */
table.table
{
    width:100%;
    border-collapse:collapse
}

table.table td
{
    padding:3px;
    width:200px
}

table.table tr.row.two
{
    background-color:#c2c2c2;
    width:200px;
    float:left
}

table.table tr.row.one
{
    background-color:#c2c2c2;
    width:200px;
    float:left
}

table.table tr.row td.icon
{
    width:25px;
    padding-top:3px;
    padding-bottom:1px
}

table.table td.del
{
    width:25px
}

table.table tr.row td.size
{
    width:100px;
    text-align:right
}

table.table tr.row td.changed
{
    width:150px;
    text-align:center
}

table.table tr.header img
{
    vertical-align:bottom
}

table.table tr.row:hover
{
    background-color:#eee
}

table.table tr.row a:hover
{
    color:#EF4646;
    text-decoration:none
}

table img
{
    border:0
}

table.table tr
{
    margin-bottom:5px
}

/* Info area */
#info
{
    color:#000;
    font-family:Verdana;
    max-width:680px;
    position:relative;
    margin:0 auto;
    text-align:center
}

/* Thumbnail area */
#thumb
{
    position:absolute;
    border:1px solid #CDD2D6;
    background:#f8f9fa;
    display:none;
    padding:3px
}

#thumb img
{
    display:block
}

/* Login bar (at the bottom of the page) */
#login_bar
{
    margin:0 auto;
    margin-top:2px;
    max-width:680px
}

#login_bar input.submit
{
    float:right
}

/* Upload area */
#upload
{
    margin:0 auto;
    margin-top:2px;
    max-width:680px
}

#upload #password_container
{
    margin-right:20px
}

#upload #newdir_container,#upload #password_container
{
    float:left
}

#upload #upload_container
{
    float:right
}

#upload input.upload_dirname,#upload input.upload_password
{
    width:140px
}

#upload input.upload_file
{
    font-size:small
}

/* Breadcrumbs */
div.breadcrumbs
{
    display:block;
    padding:1px 3px;
    color:#676767;
    font-size:x-small
}

div.breadcrumbs a
{
    display:inline-block;
    color:#949494;
    padding:2px 0;
    font-size:small
}

/* Login area */
#login
{
    max-width:280px;
    text-align:right;
    margin:15px auto 50px
}

#login div
{
    display:block;
    width:100%;
    margin-top:5px
}

#login label
{
    width:120px;
    text-align:right
}

/* Mobile interface */
body.mobile #frame,body.mobile #info,body.mobile #upload
{
    max-width:none
}

body.mobile
{
    font-size:medium
}

body.mobile a.item
{
    display:block;
    padding:10px 0
}

body.mobile a.item span.size
{
    float:right;
    margin-left:10px
}

body.mobile table.table
{
    margin-bottom:30px
}

body.mobile table.table tr td
{
    border-top:1px solid #CDD2D6
}

body.mobile table.table tr.last td
{
    border-bottom:1px solid #CDD2D6
}

body.mobile #top
{
    padding-bottom:3px
}

body.mobile #top a
{
    padding-top:3px
}

body.mobile #upload #password_container,body.mobile #upload #upload_container,body.mobile #upload #newdir_container
{
    float:none;
    margin-top:5px
}

body.mobile #upload input.upload_dirname,body.mobile #upload input.upload_password
{
    width:240px
}

body.mobile #upload
{
    margin-bottom:15px
}

/* ::::::: Footer
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
.keyboard_key,#footer,#top
{
    background-color:#EEE;
    background-image:-moz-linear-gradient(top,whiteSmoke 0,#EEE 100%);
    background-image:-ms-linear-gradient(top,whiteSmoke 0,#EEE 100%);
    background-image:-o-linear-gradient(top,whiteSmoke 0,#EEE 100%);
    background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0%,whiteSmoke),color-stop(100%,#eee));
    background-image:-webkit-linear-gradient(top,whiteSmoke 0,#EEE 100%);
    background-image:linear-gradient(top,whiteSmoke 0,#eee 100%);
    background-repeat:repeat-x;
    color:#555;
    display:inline-block;
    filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f5f5f5',endColorstr='#eeeeee',GradientType=0);
    font-size:11px;
    height:25px;
    line-height:15px;
    width:20em;
    padding:0 4px;
    text-align:left;
    border:1px solid #CCC;
    -webkit-border-radius:3px;
    -moz-border-radius:3px;
    border-radius:3px;
    -webkit-box-shadow:inset 0 1px 0 white,0 1px 0 #CCC;
    -moz-box-shadow:inset 0 1px 0 #fff,0 1px 0 #ccc;
    box-shadow:inset 0 1px 0 white,0 1px 0 #CCC;
    margin-right:5px;
/* added by dean */
    cursor:pointer
}

.keyboard_key:hover
{
    background:#e9e9ce;
/* Old browsers */
    background-image:-moz-linear-gradient(top,#EEE 0,#B3B5A8 100%);
    background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#EEE),color-stop(100%,#B3B5A8));
    background-image:-webkit-linear-gradient(top,#EEE 0,#B3B5A8 100%);
    background-image:-ms-linear-gradient(top,#EEE 0,#B3B5A8 100%);
    background-image:-o-linear-gradient(top,#EEE 0,#B3B5A8 100%);
    filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee',endColorstr='#f5f5f5',GradientType=0);
    background-image:linear-gradient(top,eee 0,#B3B5A8 100%)
}

.keyboard_key a
{
    width:17em
}

.icon
{
    max-width:2em
}

.name,.header,.back
{
/*max-width: 200px;*/
}

.header,.back
{
/*min-width: 231px;*/
}

#frame
{
    max-width:90%;
    padding:1.7%
}

#footer
{
    text-align:center;
    margin:0 40%;
    line-height:25px;
    background-image:-moz-linear-gradient(center top,#D2D2D2,#939393);
    background-image:-ms-linear-gradient(top,#D2D2D2,#939393);
    background-image:-o-linear-gradient(top,#D2D2D2,#939393);
    background-image:-webkit-gradient(linear,0% 0%,0% 100%,from(#D2D2D2),to(#939393));
    background-image:-webkit-linear-gradient(top,#D2D2D2,#939393);
    min-width:20%
}

#top
{
    background-image:-moz-linear-gradient(center top,#FAFAFA 0px,#FFF 100%);
    background-image:-ms-linear-gradient(top,#FAFAFA,#FFF);
    background-image:-o-linear-gradient(top,#FAFAFA,#FFF);
    background-image:-webkit-gradient(linear,0% 0%,0% 100%,from(#FAFAFA),to(#FFF));
    background-image:-webkit-linear-gradient(top,#FAFAFA,#FFF);
    margin-bottom:20px;
    width:97%;
    text-align: center;
    font-size: 1.4em;
}

#top a
{
    display:block;
    padding:0
}
#top .tl {
    position: relative;
    top: -7px;
    color: #BFC0CB;
}
.stylesHtml
{
    background-color:#E6EDF9;
    background-image:-moz-linear-gradient(top,#E6EDF9,#DAE5F5);
    background-image:-ms-linear-gradient(top,#E6EDF9,#DAE5F5);
    background-image:-o-linear-gradient(top,#E6EDF9,#DAE5F5);
    background-image:-webkit-gradient(linear,0% 0%,0% 100%,from(#E6EDF9),to(#DAE5F5));
    background-image:-webkit-linear-gradient(top,#E6EDF9,#DAE5F5)
}

.stylesIndex
{
    background-color:#BAC1CD;
    background-image:-moz-linear-gradient(top,#BAC1CD,#D1D7DE);
    background-image:-ms-linear-gradient(top,#BAC1CD,#D1D7DE);
    background-image:-o-linear-gradient(top,#BAC1CD,#D1D7DE);
    background-image:-webkit-gradient(linear,0% 0%,0% 100%,from(#BAC1CD),to(#D1D7DE));
    background-image:-webkit-linear-gradient(top,#BAC1CD,#D1D7DE)
}


/* :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: *\
            Camios
\* :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */

#frame {
    max-width: 90%;
    padding: 1.7%;
}


</style>



<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
            END CSS
    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>

<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
            JS
    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->

<script type="text/javascript">
 $(document).ready(function() {
    $("tr td:contains('.html')").parent().addClass('stylesHtml');
    $("tr td:contains('index')").parent().addClass('stylesIndex');
});
</script>

<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
            END JS
    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->


<!-- <meta charset="<?php 
        print $this->getConfig('charset');
        ?>
" /> -->

<?php 
        if ($this->getConfig('log_file') != null && strlen($this->getConfig('log_file')) > 0 || $this->getConfig('thumbnails') != null && $this->getConfig('thumbnails') == true && $this->mobile == false || GateKeeper::isDeleteAllowed()) {
            ?>

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>

<script type="text/javascript">

//<![CDATA[

$(document).ready(function() {

<?php 
            if (GateKeeper::isDeleteAllowed()) {
                ?>

    $('td.del a').click(function(){

        var answer = confirm('Are you sure you want to delete : \'' + $(this).attr("data-name") + "\' ?");

        return answer;

    });

<?php 
            }
            if ($this->logging == true) {
                ?>

        function logFileClick(path)

        {

             $.ajax({

                    async: false,

                    type: "POST",

                    data: {log: path},

                    contentType: "application/x-www-form-urlencoded; charset=UTF-8",

                    cache: false

                });

        }



        $("a.file").click(function(){

            logFileClick("<?php 
                print $this->location->getDir(true, true, false, 0);
                ?>
" + $(this).html());

            return true;

        });

<?php 
            }
            if (EncodeExplorer::getConfig("thumbnails") == true && $this->mobile == false) {
                ?>

        function positionThumbnail(e) {

            xOffset = 30;

            yOffset = 10;

            $("#thumb").css("left",(e.clientX + xOffset) + "px");



            diff = 0;

            if(e.clientY + $("#thumb").height() > $(window).height())

                diff = e.clientY + $("#thumb").height() - $(window).height();



            $("#thumb").css("top",(e.pageY - yOffset - diff) + "px");

        }



        $("a.thumb").hover(function(e){

            $("#thumb").remove();

            $("body").append("<div id=\"thumb\"><img src=\"?thumb="+ $(this).attr("href") +"\" alt=\"Preview\" \/><\/div>");

            positionThumbnail(e);

            $("#thumb").fadeIn("medium");

        },

        function(){

            $("#thumb").remove();

        });



        $("a.thumb").mousemove(function(e){

            positionThumbnail(e);

            });



        $("a.thumb").click(function(e){$("#thumb").remove(); return true;});

<?php 
            }
            ?>

    });

//]]>

</script>

<?php 
        }
        ?>

<title><?php 
        if (EncodeExplorer::getConfig('main_title') != null) {
            print EncodeExplorer::getConfig('main_title');
        }
        ?>
</title>

</head>

<body class="<?php 
        print $this->mobile == true ? "mobile" : "standard";
        ?>
">

<?php 
        //
        // Print the error (if there is something to print)
        //
        if (isset($_ERROR) && strlen($_ERROR) > 0) {
            print "<div id=\"error\">" . $_ERROR . "</div>";
        }
        ?>

<div id="frame">

<?php 
        if (EncodeExplorer::getConfig('show_top') == true) {
            ?>

    <div id="top">
        <img src="localhost.jpg" alt="">
        <span class="tl">Mayccoll</span>


        <a href="<?php 
            // print $this->makeLink(false, false, null, null, null, "");
            ?>
"><span><?php 
            // if (EncodeExplorer::getConfig('main_title') != null)
            // print EncodeExplorer::getConfig('main_title');
            ?>
</span>
        </a>



    <?php 
            if (EncodeExplorer::getConfig("secondary_titles") != null && is_array(EncodeExplorer::getConfig("secondary_titles")) && count(EncodeExplorer::getConfig("secondary_titles")) > 0 && $this->mobile == false) {
                $secondary_titles = EncodeExplorer::getConfig("secondary_titles");
                print "<div class=\"subtitle\">" . $secondary_titles[array_rand($secondary_titles)] . "</div>\n";
            }
            ?>

    </div>
<div id="footer">
    <a href="phpmyadmin" target="_BLANK">phpmyadmin</a>
</div>
<?php 
        }
        // Checking if the user is allowed to access the page, otherwise showing the login box
        if (!GateKeeper::isAccessAllowed()) {
            $this->printLoginBox();
        } else {
            if ($this->mobile == false && EncodeExplorer::getConfig("show_path") == true) {
                ?>

    <div class="breadcrumbs">

    <a href="?dir="><?php 
                print $this->getString("root");
                ?>
</a>

    <?php 
                for ($i = 0; $i < count($this->location->path); $i++) {
                    print "&gt; <a href=\"" . $this->makeLink(false, false, null, null, null, $this->location->getDir(false, true, false, count($this->location->path) - $i - 1)) . "\">";
                    print $this->location->getPathLink($i, true);
                    print "</a>\n";
                }
                ?>

    </div>

<?php 
            }
            ?>



<!-- START: List table -->

<table class="table">

<?php 
            if ($this->mobile == false) {
                ?>

<tr class="header keyboard_key">
    <td class="icon">
        <img src="?img=directoryHome" alt="dir">
    </td>
    <td class="name">
        <?php 
                //print $this->makeArrow("name");
                ?>
        <a href="
            <?php 
                print $this->makeLink(false, false, null, null, null, "");
                ?>
        ">
            <span>
                <?php 
                if (EncodeExplorer::getConfig('main_title') != null) {
                    print EncodeExplorer::getConfig('main_title');
                }
                ?>
            </span>
        </a>
    </td>
    <td class="size">
        <?php 
                //print $this->makeArrow("size");
                ?>
    </td>
    <td class="changed">
        <?php 
                //print $this->makeArrow("mod");
                ?>
    </td>


    <?php 
                if ($this->mobile == false && GateKeeper::isDeleteAllowed()) {
                    ?>
    <td class="del">
        <?php 
                    // print EncodeExplorer::getString("del");
                    ?>
    </td>
    <?php 
                }
                ?>
</tr>

<?php 
            }
            ?>

<tr class="back keyboard_key">

    <td class="icon"><img alt="dir" src="?img=directory" /></td>

    <td colspan="<?php 
            print $this->mobile == true ? 2 : (GateKeeper::isDeleteAllowed() ? 4 : 3);
            ?>
" class="long">

        <a class="item" href="<?php 
            print $this->makeLink(false, false, null, null, null, $this->location->getDir(false, true, false, 1));
            ?>
">..</a>

    </td>

</tr>

<?php 
            //
            // Ready to display folders and files.
            //
            $row = 1;
            //
            // Folders first
            //
            if ($this->dirs) {
                foreach ($this->dirs as $dir) {
                    $row_style = $row ? "" : "";
                    print "<tr class=\" keyboard_key" . $row_style . "\">\n";
                    print "<td class=\"icon\"><img alt=\"dir\" src=\"?img=directory\" /></td>\n";
                    print "<td class=\"name\" colspan=\"" . ($this->mobile == true ? 2 : 3) . "\">\n";
                    print "<a href=\"" . $this->makeLink(false, false, null, null, null, $this->location->getDir(false, true, false, 0) . $dir->getNameEncoded()) . "\" class=\"item dir\">";
                    print $dir->getNameHtml();
                    print "</a>\n";
                    print "</td>\n";
                    if ($this->mobile == false && GateKeeper::isDeleteAllowed()) {
                        print "<td class=\"del\"><a data-name=\"" . htmlentities($dir->getName()) . "\" href=\"" . $this->makeLink(false, false, null, null, $this->location->getDir(false, true, false, 0) . $dir->getNameEncoded(), $this->location->getDir(false, true, false, 0)) . "\"><img src=\"?img=del\" alt=\"Delete\" /></a></td>";
                    }
                    print "</tr>\n";
                    $row = !$row;
                }
            }
            //
            // Now the files
            //
            if ($this->files) {
                $count = 0;
                foreach ($this->files as $file) {
                    $row_style = $row ? "" : "";
                    print "<tr class=\" keyboard_key" . $row_style . (++$count == count($this->files) ? " last" : "") . "\">\n";
                    print "<td class=\"icon\"><img alt=\"" . $file->getType() . "\" src=\"" . $this->makeIcon($file->getType()) . "\" /></td>\n";
                    print "<td class=\"name\">\n";
                    print "\t\t<a href=\"" . $this->location->getDir(false, true, false, 0) . $file->getNameEncoded() . "\"";
                    if (EncodeExplorer::getConfig('open_in_new_window') == true) {
                        print "target=\"_blank\"";
                    }
                    print " class=\"item file";
                    if ($file->isValidForThumb()) {
                        print " thumb";
                    }
                    print "\">";
                    print $file->getNameHtml();
                    if ($this->mobile == true) {
                        //print "<span class =\"size\">".$this->formatSize($file->getSize())."</span>";
                    }
                    print "</a>\n";
                    print "</td>\n";
                    if ($this->mobile != true) {
                        //print "<td class=\"size\">".$this->formatSize($file->getSize())."</td>\n";
                        //print "<td class=\"changed\">".$this->formatModTime($file->getModTime())."</td>\n";
                    }
                    if ($this->mobile == false && GateKeeper::isDeleteAllowed()) {
                        print "<td class=\"del\">\n\n                <a data-name=\"" . htmlentities($file->getName()) . "\" href=\"" . $this->makeLink(false, false, null, null, $this->location->getDir(false, true, false, 0) . $file->getNameEncoded(), $this->location->getDir(false, true, false, 0)) . "\">\n\n                    <img src=\"?img=del\" alt=\"Delete\" />\n\n                </a>\n\n            </td>";
                    }
                    print "</tr>\n";
                    $row = !$row;
                }
            }
            //
            // The files and folders have been displayed
            //
            ?>



</table>


<!-- END: List table

<?php 
        }
        ?>

</div> <!-- END frame -->



<?php 
        if (GateKeeper::isAccessAllowed() && GateKeeper::showLoginBox()) {
            ?>

<!-- START: Login area -->

<form enctype="multipart/form-data" method="post">

    <div id="login_bar">

    <?php 
            print $this->getString("username");
            ?>
:

    <input type="text" name="user_name" value="" id="user_name" />

    <?php 
            print $this->getString("password");
            ?>
:

    <input type="password" name="user_pass" id="user_pass" />

    <input type="submit" class="submit" value="<?php 
            print $this->getString("log_in");
            ?>
" />

    <div class="bar"></div>

    </div>

</form>

<!-- END: Login area -->

<?php 
        }
        if (GateKeeper::isAccessAllowed() && $this->location->uploadAllowed() && (GateKeeper::isUploadAllowed() || GateKeeper::isNewdirAllowed())) {
            ?>

<!-- START: Upload area -->

<form enctype="multipart/form-data" method="post">

    <div id="upload">

        <?php 
            if (GateKeeper::isNewdirAllowed()) {
                ?>

        <div id="newdir_container">

            <input name="userdir" type="text" class="upload_dirname" />

            <input type="submit" value="<?php 
                print $this->getString("make_directory");
                ?>
" />

        </div>

        <?php 
            }
            if (GateKeeper::isUploadAllowed()) {
                ?>

        <div id="upload_container">

            <input name="userfile" type="file" class="upload_file" />

            <input type="submit" value="<?php 
                print $this->getString("upload");
                ?>
" class="upload_sumbit" />

        </div>

        <?php 
            }
            ?>

        <div class="bar"></div>

    </div>

</form>

<!-- END: Upload area -->

<?php 
        }
        ?>

<!-- START: Info area -->

<!--

<div id="info">

<?php 
        if (GateKeeper::isUserLoggedIn()) {
            print "<a href=\"" . $this->makeLink(false, true, null, null, null, "") . "\">" . $this->getString("log_out") . "</a> | ";
        }
        if (EncodeExplorer::getConfig("mobile_enabled") == true) {
            print "<a href=\"" . $this->makeLink(true, false, null, null, null, $this->location->getDir(false, true, false, 0)) . "\">\n";
            print $this->mobile == true ? $this->getString("standard_version") : $this->getString("mobile_version") . "\n";
            print "</a> | \n";
        }
        if (GateKeeper::isAccessAllowed() && $this->getConfig("calculate_space_level") > 0 && $this->mobile == false) {
            print $this->getString("total_used_space") . ": " . $this->spaceUsed . " MB | ";
        }
        if ($this->mobile == false && $this->getConfig("show_load_time") == true) {
            printf($this->getString("page_load_time") . " | ", (microtime(TRUE) - $_START_TIME) * 1000);
        }
        ?>

<a href="http://encode-explorer.siineiolekala.net">Encode Explorer</a>

</div>

-->

<!-- END: Info area -->


</body>
</html>


<?php 
    }
Beispiel #9
0
<?php

require_once 'config.php';
require_once 'users.php';
require_once 'class.php';
require_once 'remember.php';
$cookies = new Cookies();
$encodeExplorer = new EncodeExplorer();
$encodeExplorer->init();
$gateKeeper = new GateKeeper();
$gateKeeper->init();
$setUp = new SetUp();
$timeconfig = $setUp->getConfig('default_timezone');
$timezone = strlen($timeconfig) > 0 ? $timeconfig : "UTC";
date_default_timezone_set($timezone);
$downloader = new Downloader();
$utils = new Utils();
$logger = new Logger();
$actions = new Actions();
$getcloud = $_POST["setdel"];
$hash = filter_input(INPUT_POST, "h", FILTER_SANITIZE_STRING);
$doit = filter_input(INPUT_POST, "doit", FILTER_SANITIZE_STRING);
$time = filter_input(INPUT_POST, "t", FILTER_SANITIZE_STRING);
if ($doit != $time * 12) {
    die('Direct access not permitted');
}
$alt = $setUp->getConfig('salt');
$altone = $setUp->getConfig('session_name');
if ($hash && $time && $gateKeeper->isUserLoggedIn() && $gateKeeper->isAllowed('delete_enable')) {
    if (md5($alt . $time) === $hash && $downloader->checkTime($time) == true) {
        foreach ($getcloud as $pezzo) {
Beispiel #10
0
<?php

require 'mail/PHPMailerAutoload.php';
require 'config.php';
require 'users.php';
require 'token.php';
require 'class.php';
session_name($_CONFIG["session_name"]);
session_start();
$lang = filter_input(INPUT_POST, 'thislang', FILTER_SANITIZE_STRING);
require 'translations/' . $lang . '.php';
$setUp = new SetUp();
$utils = new Utils();
$updater = new Updater();
$resetter = new Resetter();
$encodeExplorer = new EncodeExplorer();
$dest = filter_input(INPUT_POST, "user_email", FILTER_VALIDATE_EMAIL);
$pulito = filter_input(INPUT_POST, 'cleanurl', FILTER_SANITIZE_STRING);
$postcaptcha = filter_input(INPUT_POST, "captcha", FILTER_SANITIZE_STRING);
global $_USERS;
global $_TOKENS;
if (!$dest || $setUp->getConfig("show_captcha_reset") == true && !$postcaptcha) {
    print "<div class=\"alert alert-warning\">" . $encodeExplorer->getString("fill_all_fields") . "</div>";
    exit;
}
if (Utils::checkCaptchaReset($postcaptcha) !== true) {
    print "<div class=\"alert alert-danger\">" . $encodeExplorer->getString("wrong_captcha") . "</div>";
    exit;
}
if (!$updater->findEmail($dest)) {
    print "<div class=\"alert alert-danger\">" . $encodeExplorer->getString("email_not_exist") . "</div>";
Beispiel #11
0
<?php

$encodeExplorer = new EncodeExplorer();
$setUp = new SetUp();
$updater = new Updater();
$timeconfig = $setUp->getConfig('default_timezone');
$timezone = strlen($timeconfig) > 0 ? $timeconfig : "UTC";
date_default_timezone_set($timezone);
global $baselang;
$baselang = $_TRANSLATIONS;
$posteditlang = filter_input(INPUT_POST, "editlang", FILTER_SANITIZE_STRING);
$postnewlang = filter_input(INPUT_POST, "newlang", FILTER_SANITIZE_STRING);
$thelang = $posteditlang ? $posteditlang : "en";
$thenewlang = $postnewlang ? $postnewlang : null;
$editlang = $thenewlang ? $thenewlang : $thelang;
global $_TRANSLATIONSEDIT;
if ($posteditlang) {
    include 'translations/' . $editlang . '.php';
    $_TRANSLATIONSEDIT = $_TRANSLATIONS;
} else {
    $_TRANSLATIONSEDIT = $baselang;
}
/**
* Get lang
*/
if (isset($_GET['lang'])) {
    $lang = $_GET['lang'];
    $_SESSION['lang'] = $_GET['lang'];
}
if (isset($_SESSION['lang'])) {
    $lang = $_SESSION['lang'];
 function uploadAllowed()
 {
     if (EncodeExplorer::getConfig('upload_enable') != true) {
         return false;
     }
     if (EncodeExplorer::getConfig('upload_dirs') == null || count(EncodeExplorer::getConfig('upload_dirs')) == 0) {
         return true;
     }
     $upload_dirs = EncodeExplorer::getConfig('upload_dirs');
     for ($i = 0; $i < count($upload_dirs); $i++) {
         if ($this->isSubDir($upload_dirs[$i])) {
             return true;
         }
     }
     return false;
 }
Beispiel #13
0
<?php

error_reporting(E_ALL ^ E_NOTICE);
// error_reporting(E_ALL);
// ini_set('display_errors', 1);
require 'config.php';
session_name($_CONFIG["session_name"]);
session_start();
if (isset($_GET['logout'])) {
    unset($_SESSION['doc_admin_name']);
    unset($_SESSION['doc_admin_pass']);
}
require 'users.php';
require 'class.php';
$encodeExplorer = new EncodeExplorer();
$setUp = new SetUp();
$timeconfig = $setUp->getConfig('default_timezone');
$timezone = strlen($timeconfig) > 0 ? $timeconfig : "UTC";
date_default_timezone_set($timezone);
$template = new Template();
$gateKeeper = new GateKeeper();
$logged = false;
$error = null;
$captchaerror = null;
if (isset($_SESSION['doc_admin_name'])) {
    $logged = true;
}
$postusername = filter_input(INPUT_POST, "doc_admin_name", FILTER_SANITIZE_STRING);
$postuserpass = filter_input(INPUT_POST, "doc_admin_pass", FILTER_SANITIZE_STRING);
if ($postusername && $postuserpass) {
    if (logIn($postusername, $postuserpass)) {
Beispiel #14
0
<?php

require_once 'config.php';
require_once 'users.php';
require_once 'class.php';
require_once 'remember.php';
$cookies = new Cookies();
$encodeExplorer = new EncodeExplorer();
$encodeExplorer->init();
require_once 'translations/' . $encodeExplorer->lang . '.php';
$gateKeeper = new GateKeeper();
$gateKeeper->init();
$setUp = new SetUp();
$downloader = new Downloader();
$utils = new Utils();
$logger = new Logger();
$actions = new Actions();
$timeconfig = $setUp->getConfig('default_timezone');
$timezone = strlen($timeconfig) > 0 ? $timeconfig : "UTC";
date_default_timezone_set($timezone);
$script_url = $setUp->getConfig('script_url');
$getfile = filter_input(INPUT_GET, "q", FILTER_SANITIZE_STRING);
$getfilelist = filter_input(INPUT_GET, "dl", FILTER_SANITIZE_STRING);
$getcloud = filter_input(INPUT_GET, "d", FILTER_SANITIZE_STRING);
$hash = filter_input(INPUT_GET, "h", FILTER_SANITIZE_STRING);
$supah = filter_input(INPUT_GET, "sh", FILTER_SANITIZE_STRING);
$playmp3 = filter_input(INPUT_GET, "audio", FILTER_SANITIZE_STRING);
$getpass = filter_input(INPUT_GET, "pw", FILTER_SANITIZE_STRING);
if ($getpass) {
    $getpass = urldecode($getpass);
}
Beispiel #15
0
 /**
  * Get full directory path
  *
  * @return path name
  */
 public function getFullPath()
 {
     $fullpath = (strlen(SetUp::getConfig('basedir')) > 0 ? SetUp::getConfig('basedir') : str_replace('\\', '/', dirname($_SERVER['SCRIPT_FILENAME']))) . "/" . $this->getDir(false, false, false, 0);
     $fullpath = EncodeExplorer::extraChars($fullpath);
     return $fullpath;
 }
Beispiel #16
0
<?php

require 'mail/PHPMailerAutoload.php';
require 'config.php';
require 'class.php';
$lang = filter_input(INPUT_POST, 'thislang', FILTER_SANITIZE_STRING);
require 'translations/' . $lang . '.php';
$setUp = new SetUp();
$utils = new Utils();
$encodeExplorer = new EncodeExplorer();
$from = filter_input(INPUT_POST, "mitt", FILTER_VALIDATE_EMAIL);
$dest = filter_input(INPUT_POST, "dest", FILTER_VALIDATE_EMAIL);
$link = filter_input(INPUT_POST, "sharelink", FILTER_SANITIZE_STRING);
$attachments = explode(",", filter_input(INPUT_POST, "attach", FILTER_SANITIZE_STRING));
$text_message = filter_input(INPUT_POST, "message", FILTER_SANITIZE_STRING);
$passlink = filter_input(INPUT_POST, "passlink", FILTER_SANITIZE_STRING);
$bcc = filter_input(INPUT_POST, 'send_cc', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY);
if ($from && $dest && $link) {
    $setfrom = $setUp->getConfig('email_from');
    $mail = new PHPMailer();
    $mail->CharSet = 'UTF-8';
    if ($setUp->getConfig('smtp_enable') == true) {
        $timeconfig = $setUp->getConfig('default_timezone');
        $timezone = strlen($timeconfig) > 0 ? $timeconfig : "UTC";
        date_default_timezone_set($timezone);
        $mail->isSMTP();
        $mail->SMTPDebug = 0;
        $smtp_auth = $setUp->getConfig('smtp_auth');
        $mail->Host = $setUp->getConfig('smtp_server');
        $mail->Port = (int) $setUp->getConfig('port');
        if ($setUp->getConfig('secure_conn') !== "none") {