This repository was archived by the owner on Jan 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathauth.php
More file actions
82 lines (71 loc) · 1.79 KB
/
auth.php
File metadata and controls
82 lines (71 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?php
include ("includes/config.php");
$validate = new validate();
$uname = $_POST['username'];
$redirect = $_GET['redirect'];
$pwd = $cipher->cipherpwd($_POST['password']);
$logmein = $validate->validate_user($uname,$pwd);
if ($logmein == true){
if (!$redirect){
echo '<html>
<head>
<title>Validating Account</title>
<META http-equiv="refresh" content="0;URL=http://wise.er.usgs.gov/'.$dir.'/?t='.$token.'">
</head>
<body>
<center>
Validating Your Account ...
</center>
</body>
</html>';
}else{
if ($redirect == "internal"){
echo '<html>
<head>
<title>Validating Account</title>
<META http-equiv="refresh" content="0;URL=http://wise.er.usgs.gov/'.$dir.'/?q=int">
</head>
<body>
<center>
Validating Your Account ...
</center>
</body>
</html>';
}elseif ($redirect == "settings"){
echo '<html>
<head>
<title>Validating Account</title>
<META http-equiv="refresh" content="0;URL=https://wise.er.usgs.gov/'.$dir.'/accounts/account_settings">
</head>
<body>
<center>
Validating Your Account ... re-directing to settings...
</center>
</body>
</html>';
}elseif($redirect == "wells"){
echo '<html>
<head>
<title>Validating Account</title>
<META http-equiv="refresh" content="0;URL=https://wise.er.usgs.gov/'.$dir.'/wells">
</head>
<body>
<center>
Validating Your Account ... re-directing to settings...
</center>
</body>
</html>';
}
}
}else{
if ($redirect != "internal"){
echo "<script> alert('Unable to Login (Invalid Username/Password).');
window.location = '/wateruse/accounts/';
</script>";
}else{
echo "<script> alert('Unable to Login (Invalid Username/Password).');
window.location = '/wateruse/accounts/?redirect=internal';
</script>";
}
}
?>