aboutsummaryrefslogtreecommitdiffstats
path: root/config/filemgr/rbfminc/rename.php
diff options
context:
space:
mode:
authordoktornotor <notordoktor@gmail.com>2015-08-12 00:16:09 +0200
committerdoktornotor <notordoktor@gmail.com>2015-08-12 00:16:09 +0200
commit5444a37af5a09032bd4332f64423787c2473cb8f (patch)
treec4cb7bf847f4e6c5e33923ee84bd027e71fb2d5e /config/filemgr/rbfminc/rename.php
parentc0f717ffab5beb2206d21d1107077a55f34c8f94 (diff)
downloadpfsense-packages-5444a37af5a09032bd4332f64423787c2473cb8f.tar.gz
pfsense-packages-5444a37af5a09032bd4332f64423787c2473cb8f.tar.bz2
pfsense-packages-5444a37af5a09032bd4332f64423787c2473cb8f.zip
Rename rename.tmp to rename.php
Diffstat (limited to 'config/filemgr/rbfminc/rename.php')
-rw-r--r--config/filemgr/rbfminc/rename.php41
1 files changed, 41 insertions, 0 deletions
diff --git a/config/filemgr/rbfminc/rename.php b/config/filemgr/rbfminc/rename.php
new file mode 100644
index 00000000..5a2096ca
--- /dev/null
+++ b/config/filemgr/rbfminc/rename.php
@@ -0,0 +1,41 @@
+<?php
+include "config.php";
+include "session.php";
+
+if($user_login == 'ok'){
+
+ include "functions.php";
+
+?>
+<html>
+<head>
+<title>Rename</title>
+</head>
+<body>
+<script type="text/javascript">
+//<![CDATA[
+<?php
+//print_r($_POST);
+if($_POST['o'] != $_POST['n']){
+ if(@rename($_POST['cf'].$_POST['o'], $_POST['cf'].$_POST['n'])){
+ if($_POST['t'] == 'd'){
+ echo "alert('Directory successfuly renamed from \"{$_POST['o']}\" to \"{$_POST['n']}\"');";
+ }else{
+ echo "alert('File successfuly renamed from \"{$_POST['o']}\" to \"{$_POST['n']}\"');";
+ }
+ }else{
+ echo "
+ alert('Rename error');
+ window.parent.location.href = window.parent.location.href;
+ ";
+ }
+}
+
+?>
+//]]>
+</script>
+</body>
+</html>
+<?php
+}
+?>