aboutsummaryrefslogtreecommitdiffstats
path: root/config/filemgr/rbfminc/session.php
diff options
context:
space:
mode:
Diffstat (limited to 'config/filemgr/rbfminc/session.php')
-rw-r--r--config/filemgr/rbfminc/session.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/config/filemgr/rbfminc/session.php b/config/filemgr/rbfminc/session.php
new file mode 100644
index 00000000..7cfc133d
--- /dev/null
+++ b/config/filemgr/rbfminc/session.php
@@ -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!";
+ }
+}
+
+?>