diff options
author | doktornotor <notordoktor@gmail.com> | 2015-08-12 00:16:37 +0200 |
---|---|---|
committer | doktornotor <notordoktor@gmail.com> | 2015-08-12 00:16:37 +0200 |
commit | d97ed5ab8182728c78b03ab6ea94d57effa7722a (patch) | |
tree | 81771a1c9dffc25a190fd2314219c480106a6938 /config/filemgr/rbfminc/session.php | |
parent | 5444a37af5a09032bd4332f64423787c2473cb8f (diff) | |
download | pfsense-packages-d97ed5ab8182728c78b03ab6ea94d57effa7722a.tar.gz pfsense-packages-d97ed5ab8182728c78b03ab6ea94d57effa7722a.tar.bz2 pfsense-packages-d97ed5ab8182728c78b03ab6ea94d57effa7722a.zip |
Rename session.tmp to session.php
Diffstat (limited to 'config/filemgr/rbfminc/session.php')
-rw-r--r-- | config/filemgr/rbfminc/session.php | 32 |
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!"; + } +} + +?> |