-
Notifications
You must be signed in to change notification settings - Fork 0
/
file_browser.php
32 lines (27 loc) · 1.26 KB
/
file_browser.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
/******************************************************************************
Etano
===============================================================================
File: admin/file_browser.php
$Revision$
Software by: DateMill (http://www.datemill.com)
Copyright by: DateMill (http://www.datemill.com)
Support at: http://www.datemill.com/forum
*******************************************************************************
* See the "docs/licenses/etano.txt" file for license. *
******************************************************************************/
require_once '../includes/common.inc.php';
require_once '../includes/admin_functions.inc.php';
allow_dept(DEPT_ADMIN);
$tpl=new phemplate('skin/','remove_nonjs');
$path=str_replace('..','',preg_replace('~[^a-zA-Z0-9\._/-]~','',sanitize_and_format_gpc($_GET,'path',TYPE_STRING,$__field2format[FIELD_TEXTFIELD],'')));
if (!empty($path)) {
$path=preg_replace("/^(\.|\/)+/",'',$path);
}
$tpl->set_file('content','file_browser.html');
$tpl->set_var('path',$path);
$tpl->process('content','content');
$tplvars['title']='Browse your files';
$tplvars['css']='file_browser.css';
$tplvars['page']='file_browser';
include 'frame.php';