-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
executable file
·130 lines (129 loc) · 3.2 KB
/
index.php
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<?php
/**
* Login page for OIS2.
* @package OIS2
* @author Sascha 'SieGeL' Pfalz <php@saschapfalz.de>
* @version 2.03 (31-Jan-2015)
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*/
require_once('inc/nocache.inc.php');
$sysd = checkSystemData();
$lerr = (isset($_GET['LERR'])) ? intval($_GET['LERR']) : 0;
$un = '';
if($lerr)
{
$errstr = '';
switch($lerr)
{
case 1:
$errstr = 'Empty username given?';
break;
case 2:
$dummy = Unserialize(Base64_Decode(strip_tags($_GET['D'])));
$errstr = $dummy['msg'];
$un = $dummy['uname'];
break;
default:
$errstr = 'Unknown Error '.$lerr.' - please inform the author!';
}
}
if(isset($_COOKIE['OIS2_LOGIN']) && $_COOKIE['OIS2_LOGIN'] != '')
{
$dummy = explode('|',$_COOKIE['OIS2_LOGIN']);
$uname = $dummy[0];
$tname = $dummy[1];
}
else
{
$uname = '';
$tname = '';
}
if($un == '')
{
$un = $uname;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title><?php echo(SITE_TITLE);?>: Login page</title>
<?php
require_once('inc/metatags.inc.php');
?>
<script>
$(document).ready(function() {
$("input:submit").button();
});
</script>
</head>
<body>
<?php
if(function_exists('json_encode')==FALSE)
{
Error('ERROR: YOUR PHP HAS NO SUPPORT FOR "JSON" - PLEASE RECOMPILE/REINSTALL!');
$db->disconnect();
exit;
}
?>
<div id="login_mask">
<h1>Welcome to <?php echo(SITE_TITLE);?></h1>
<small>Written 2009-2021 by <a href="https://www.saschapfalz.de/downloads_readme.php?FID=59&CAT=0" target="_blank" title="Click to visit my homepage to get new updates">Sascha 'SieGeL' Pfalz</a></small><br>
<br>
<form method="post" action="login_check.php" id="login_form">
<table class="tborder">
<caption>Please enter your login data:</caption>
<tr>
<td><label for="username">Username:</label></td>
<td><input type="text" name="USERNAME" id="username" value="<?php echo($un);?>" size="32" maxlength="32" required="required" autofocus="autofocus"></td>
</tr>
<tr>
<td><label for="password">Password:</label></td>
<td><input type="password" name="PASSWORD" id="password" value="" size="32" maxlength="100" required="required"></td>
</tr>
<tr>
<td><label for="database">Database:</label></td>
<td><select name="DATABASE" id="database" size="1">
<?php
for($i = 0; $i < count($OIS_DATABASES); $i++)
{
if($OIS_DATABASES[$i] == $tname)
{
$mysel = ' SELECTED';
}
else
{
$mysel = '';
}
echo(" <option value=\"".$OIS_DATABASES[$i]."\"".$mysel.">".$OIS_DATABASES[$i]."</option>\n");
}
?>
</select>
</td>
</tr>
<?php
if($sysd['PRIV_CONNECT'])
{
echo("<tr>\n");
echo(" <td><label for=\"conntype\">Connect as:</label></td>\n");
echo(" <td><select name=\"CONNTYPE\" id=\"conntype\" size=\"1\"><option value=\"".OCI_DEFAULT."\">Normal</option>\n<option value=\"".OCI_SYSOPER."\">SYSOPER</option><option value=\"".OCI_SYSDBA."\">SYSDBA</option></select></td>\n");
echo("</tr>\n");
}
?>
</table>
<br>
<input type="submit" value="Login">
</form>
<?php
if($lerr)
{
echo("<div id=\"login_error\">\n");
Error($errstr);
echo("</div>\n");
}
?>
</div>
<?php
require_once('inc/footer.inc.php');
?>
</body>
</html>