diff --git a/addfunctions.php b/addfunctions.php
new file mode 100644
index 0000000..734e055
--- /dev/null
+++ b/addfunctions.php
@@ -0,0 +1,33 @@
+2 ? '' : '.'.$ext);
+ @rename($rnm_dir, $n_file);
+ $out['name'] = $n_file;
+ echo json_encode($out);
+ } else {
+ $dir = dirname($rnm_dir);
+ $n_dir = $dir.'/'.$new_name;
+ @rename($rnm_dir, $n_dir);
+ $out['name'] = $n_dir;
+ echo json_encode($out);
+ }
+}
+
+if ($_REQUEST['function'] == 'rename'){
+ re_name();
+}
+
+?>
diff --git a/index.php b/index.php
index ef1d808..6f0568f 100644
--- a/index.php
+++ b/index.php
@@ -172,7 +172,7 @@
$_CONFIG['upload_enable'] = true;
$_CONFIG['newdir_enable'] = true;
$_CONFIG['delete_enable'] = false;
-
+$_CONFIG['rename_enable'] = true;
/*
* UPLOADING
*/
@@ -2045,6 +2045,12 @@ public static function isUploadAllowed(){
return true;
return false;
}
+
+ public static function isRenameAllowed(){
+ if(EncodeExplorer::getConfig("rename_enable") == true && GateKeeper::isUserLoggedIn() == true && GateKeeper::getUserStatus() == "admin")
+ return true;
+ return false;
+ }
public static function isNewdirAllowed(){
if(EncodeExplorer::getConfig("newdir_enable") == true && GateKeeper::isUserLoggedIn() == true && GateKeeper::getUserStatus() == "admin")
@@ -2953,7 +2959,7 @@ function outputHtml()
|| (GateKeeper::isDeleteAllowed()))
{
?>
-
+
+
+