3 include_once("../globals.php");
4 include_once("$srcdir/md5.js");
5 include_once("$srcdir/sql.inc");
9 <?php
html_header_show(); ?
>
10 <link rel
=stylesheet href
="<?php echo $css_header;?>" type
="text/css">
12 <script language
='JavaScript'>
14 function imsubmitted() {
15 <?php
if (!empty($GLOBALS['restore_sessions'])) { ?
>
16 // Delete the session cookie by setting its expiration date in the past.
17 // This forces the server to create a new session ID.
18 var olddate
= new Date();
19 olddate
.setFullYear(olddate
.getFullYear() - 1);
20 document
.cookie
= '<?php echo session_name() . '=' . session_id() ?>; path=/; expires=' + olddate
.toGMTString();
28 <body
<?php
echo $login_body_line;?
> onload
="javascript:document.login_form.authUser.focus();" >
30 <span
class="text"></span
>
34 <form method
="POST" action
="../main/main_screen.php?auth=login" target
="_top"
35 name
="login_form" onsubmit
="return imsubmitted();">
38 $res = sqlStatement("select distinct name from groups");
39 for ($iter = 0;$row = sqlFetchArray($res);$iter++
)
40 $result[$iter] = $row;
41 if (count($result) == 1) {
42 $resvalue = $result[0]{"name"};
43 echo "<input type='hidden' name='authProvider' value='$resvalue' />\n";
47 <table width
=100% height
="90%">
49 <td valign
=middle width
=33%
>
50 <?php
echo $logocode;?
>
52 <td align
='center' valign
='middle' width
=34%
>
54 <?php
if (count($result) != 1) { ?
>
56 <td
><span
class="text"><?php
xl('Group:','e'); ?
></span
></td
>
58 <select name
=authProvider
>
60 foreach ($result as $iter) {
61 echo "<option value='".$iter{"name"}."'>".$iter{"name"}."</option>\n";
68 <?php
if ($_SESSION['loginfailure'] == 1): ?
>
69 <tr
><td colspan
='2' class='text' style
='color:red'>
70 Invalid username
or password
75 <td
><span
class="text"><?php
xl('Username:','e'); ?
></span
></td
>
77 <input type
="text" size
="10" name
="authUser">
79 <td
><span
class="text"><?php
xl('Password:','e'); ?
></span
></td
>
81 <input type
="password" size
="10" name
="clearPass">
83 <tr
><td
> 
;</td
><td
>
84 <input type
="hidden" name
="authPass">
85 <?php
if ($GLOBALS['use_adldap_auth'] == true): ?
>
86 <input type
="submit" onClick
="javascript:this.form.authPass.value=MD5(this.form.clearPass.value);" value
=<?php
xl('Login','e');?
>>
88 <input type
="submit" onClick
="javascript:this.form.authPass.value=MD5(this.form.clearPass.value);this.form.clearPass.value='';" value
=<?php
xl('Login','e');?
>>
91 <tr
><td colspan
='2' class='text' style
='color:red'>
93 $ip=$_SERVER['REMOTE_ADDR'];
94 $query = "select user, date, comments from log where event like 'login' and comments like '%".$ip."' order by date desc limit 1";
95 $statement = sqlStatement($query);
96 if ($result = sqlFetchArray($statement)) {
97 if (strpos($result['comments'],"ailure")) {
98 echo $result['user']." attempted unauthorized login on this machine: ".$result['date'];
107 <!-- Uncomment this
for the OpenEMR demo installation
108 <p
><center
>login
= admin
120 <a href
="copyright_notice.html" target
="main"><?php
xl('Copyright Notice','e'); ?
></a
><br
/>