Пример #1
0
function Dirtree($path, $name = "Upload to: Home", $prefix = "")
{
    if (isset($_SESSION["tinymce_upload_directory"]) and $_SESSION["tinymce_upload_directory"] == $path) {
        $list = '<option value="' . $path . '" selected="selected">' . $prefix . '' . $name . '</option>';
    } else {
        $list = '<option value="' . $path . '">' . $prefix . '' . $name . '</option>';
    }
    $dircont = scandir($path);
    if (count($dircont) > 0) {
        foreach ($dircont as $file) {
            if (is_file($path . $file)) {
                //do nothing
            } elseif ($file !== '.' && $file !== '..') {
                $list .= Dirtree($path . $file . '/', $file, $prefix . '&hellip; ');
            }
        }
    }
    return $list;
}
Пример #2
0
});
</script>
<div>
<div class="pull-left">
	<p class="muted">Maximum upload file size: <?php 
echo $upload_mb;
?>
 MB</p>
</div>
<div class="pull-right">
<p>
<span id="select-dir-msg"></span>
<select  id="select-dir" class="input-medium">
<?php 
echo Dirtree(LIBRARY_FOLDER_PATH);
?>
</select>&nbsp;&nbsp;&nbsp;<a href="" title="refresh folders list" id="refresh-dirs"><i class="icon-refresh"></i></a>
</p>
</div>
<div class="clearfix"></div>
</div>
<form id="upload" method="post" action="upload.php" enctype="multipart/form-data">
			
			<div id="drop">
				

				<a class="btn">Click Or Drop</a>
				<input type="file" name="upl" multiple />
			</div>
			<br/>
<?php

/***********************************************************************
| Avactis (TM) Shopping Cart software developed by HBWSL.
| http://www.avactis.com
| -----------------------------------------------------------------------
| All source codes & content (c) Copyright 2004-2010, HBWSL.
| unless specifically noted otherwise.
| =============================================
| This source code is released under the Avactis License Agreement.
| The latest version of this license can be found here:
| http://www.avactis.com/license.php
|
| By using this software, you acknowledge having read this license agreement
| and agree to be bound thereby.
|
 ***********************************************************************/
require_once 'asc-config.php';
require_once 'functions.php';
$output = array();
$output["success"] = 1;
$output["html"] = Dirtree(LIBRARY_FOLDER_PATH);
header("Content-type: text/plain;");
echo json_encode($output);
exit;