forked from sahilsinha/openemr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
login.php
97 lines (78 loc) · 2.06 KB
/
login.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
<?php
$ignoreAuth=true;
include_once("../globals.php");
include_once("$srcdir/sha1.js");
include_once("$srcdir/sql.inc");
?>
<html>
<head>
<link rel=stylesheet href="<?echo $css_header;?>" type="text/css">
</head>
<body <?echo $login_body_line;?> topmargin=0 rightmargin=0 leftmargin=2 bottommargin=0 marginwidth=2 marginheight=0 onload="javascript:document.login_form.authUser.focus();" >
<span class="text"></span>
<center>
<form method="POST" action="../main/main_screen.php?auth=login" target="_top" name=login_form>
<?php
$res = sqlStatement("select distinct name from groups");
for ($iter = 0;$row = sqlFetchArray($res);$iter++)
$result[$iter] = $row;
if (count($result) == 1) {
$resvalue = $result[0]{"name"};
echo "<input type='hidden' name='authProvider' value='$resvalue' />\n";
}
?>
<table width=100% height="90%">
<tr>
<td valign=middle width=33%>
<?echo $logocode;?>
</td>
<td align='center' valign='middle' width=34%>
<table>
<?php
if (count($result) != 1) {
?>
<tr>
<td><span class="text"><?xl('Group:','e')?></span></td>
<td>
<select name=authProvider>
<?php
foreach ($result as $iter) {
echo "<option value='".$iter{"name"}."'>".$iter{"name"}."</option>\n";
}
?>
</select>
</td></tr>
<?php
}
?>
<tr>
<td><span class="text"><?xl('Username:','e')?></span></td>
<td>
<input type="entry" size=10 name=authUser>
</td></tr><tr>
<td><span class="text"><?xl('Password:','e')?></span></td>
<td>
<input type="password" size=10 name=clearPass>
</td></tr>
<tr><td> </td><td>
<input type="hidden" name="authPass">
<!-- ViCareplus : As per NIST standard, the SHA1 encryption algorithm is used-->
<input type="submit" onClick="javascript:this.form.authPass.value=SHA1(this.form.clearPass.value);this.form.clearPass.value='';" value="<?php xl('Login','e'); ?>">
</td></tr>
</table>
</td>
<td width=33%>
<!-- Uncomment this for the OpenEMR demo installation
<p><center>login = admin
<br>password = pass
-->
</center></p>
</td>
</table>
</form>
<address>
<a href="copyright_notice.html" target="main"><?xl('Copyright Notice','e')?></a><br />
</address>
</center>
</body>
</html>