Example #1
0
								<div class="pull-left" style="padding-left: 11px;">
									<button class="btn" disabled id="lib-back" rel="<?php 
echo LIBRARY_FOLDER_PATH;
?>
"><i class="icon-hand-left"></i> Back</button>&nbsp;&nbsp;&nbsp;<a href="" title="refresh" rel="<?php 
echo LIBRARY_FOLDER_PATH;
?>
" id="refresh"><i class="icon-refresh"></i></a>
					
								</div>
								
								<div class="pull-right" style="padding-right: 12px;">
									<input type="text" class="input-medium" id="search" placeholder="Search">
								</div>
								<?php 
if (CanCreateFolders()) {
    ?>
								<div class="pull-right" style="padding-right: 12px;">
									<span id="new-folder-msg"></span>
									<div class="input-append">
										<input class="input-medium" id="newfolder_name" type="text" placeholder="Create folder here">
										<button id="newfolder_btn" class="btn" type="button"><i class="icon-plus"></i></button>
									</div>
								</div>
								<?php 
}
?>
								<div style="clear: both;"></div>
								</div>
								<div>
								<p class="pull-left muted" id="lib-title" style="padding-left: 12px;">Home</p>
Example #2
0
$output = array();
$output["success"] = 1;
$output["msg"] = "";
if (isset($_GET["path"]) and $_GET["path"] != "") {
    $current_folder = urldecode(clean($_GET["path"]));
} else {
    $current_folder = LIBRARY_FOLDER_PATH;
}
if (!is_writable($current_folder)) {
    $output["success"] = 0;
    $output["msg"] = lang('the_current_folder_is_not_writable');
    header("Content-type: text/plain;");
    echo json_encode($output);
    exit;
}
if (!CanCreateFolders()) {
    $output["success"] = 0;
    $output["msg"] = lang('you_do_not_have_permission_to_create_folders');
    header("Content-type: text/plain;");
    echo json_encode($output);
    exit;
}
if (isset($_GET["folder"]) and $_GET["folder"] != "") {
    $new_folder = $current_folder . '/' . clean($_GET["folder"]);
} else {
    $output["success"] = 0;
    $output["msg"] = lang('the_new_folder_name_is_required');
    header("Content-type: text/plain;");
    echo json_encode($output);
    exit;
}