aboutsummaryrefslogtreecommitdiffstats
path: root/config/filemgr/rbfminc/session.tmp
diff options
context:
space:
mode:
Diffstat (limited to 'config/filemgr/rbfminc/session.tmp')
-rw-r--r--config/filemgr/rbfminc/session.tmp32
1 files changed, 32 insertions, 0 deletions
diff --git a/config/filemgr/rbfminc/session.tmp b/config/filemgr/rbfminc/session.tmp
new file mode 100644
index 00000000..8f3a666e
--- /dev/null
+++ b/config/filemgr/rbfminc/session.tmp
@@ -0,0 +1,32 @@
+<?php
+session_name("file_manager_session");
+
+session_start();
+
+/*************************************************************************************************/
+//create session
+if($_POST['login'] == 'login' and $_POST['username'] and $_POST['password']){
+ $_SESSION = array();
+ $_SESSION['username']=$_POST['username'];
+ $_SESSION['password']=$_POST['password'];
+}
+
+if($_GET['logout'] == "logout"){
+ setcookie('url_field', '', time()-3600);
+ setcookie('current_folder', '', time()-3600);
+ $_SESSION = array();
+ session_destroy();
+ session_unset();
+ header("Location: file_manager.php");
+}
+
+
+if($_SESSION['username'] and $_SESSION['password']){
+ if($_SESSION['username'] == $username and $_SESSION['password'] == $password){
+ $user_login = 'ok';
+ }else{
+ $error_message = "Incorect username or password!";
+ }
+}
+
+?> \ No newline at end of file