diff options
author | jose.lausuch <jose.lausuch@ericsson.com> | 2016-09-01 10:44:01 +0200 |
---|---|---|
committer | jose.lausuch <jose.lausuch@ericsson.com> | 2016-09-01 10:44:01 +0200 |
commit | d6f164dc96576a93d5472a95878a79b8167b5898 (patch) | |
tree | 9d2918ade259342efa057b9b19db7400d4250dc9 /tools/infra-dashboard/utils/login.php | |
parent | dd44ecc402ca86cbcd02042229a42d3346e53d3d (diff) |
Remove first prototype of the Pharos Dashboard
The Dashboard implementation from Max is im progress and
more advanced than the initial one. It doesn't make sense
to maintain both of them.
Change-Id: Iabea63a7e5b6e8d64cb72b8de2264c5c4484eae8
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'tools/infra-dashboard/utils/login.php')
-rw-r--r-- | tools/infra-dashboard/utils/login.php | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/tools/infra-dashboard/utils/login.php b/tools/infra-dashboard/utils/login.php deleted file mode 100644 index 2ac7101d..00000000 --- a/tools/infra-dashboard/utils/login.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php - - include 'database.php'; - - - function login(){ - $email = $_POST['email']; - $password = $_POST['password']; - - $query = "SELECT * FROM user where EMAIL='".$email."';"; - $result = mysql_query($query); - - $user = array(); - if(mysql_num_rows($result) > 0) { - $query = "SELECT * FROM user where email='".$email."' and password='".$password."';"; - $result = mysql_query($query); - if(mysql_num_rows($result) > 0) { - while($row = mysql_fetch_assoc($result)) { - $user = $row; - $user["result"] = 0; - - $_SESSION['user_id'] = $user['user_id']; - $_SESSION['user_name'] = $user['name']; - $_SESSION['user_email'] = $user['email']; - } - } else { - $user["result"] = 1; //wrong password - } - } else { - $user["result"] = 2; //user not registered - } - echo json_encode($user); - - } - - - $action = $_POST['action']; - - connectDB(); - session_start(); - - if ($action == "login") { - login(); - } else if ($action == "logout") { - unset($_SESSION['user_id']); - unset($_SESSION['user_name']); - unset($_SESSION['user_email']); - session_destroy(); - } else { - echo "Invalid POST action."; - } - closeDB(); - -?> - - |