changes to remove embedded styles and use CSS instead
[openemr.git] / interface / login / login.php
blob41ad3acd96b03d3ca4beb09941351df645856149
1 <?php
2 $ignoreAuth=true;
3 include_once("../globals.php");
4 include_once("$srcdir/md5.js");
5 include_once("$srcdir/sql.inc");
6 ?>
7 <html>
8 <head>
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();
21 <?php } ?>
22 return true;
25 </script>
27 </head>
28 <body <?php echo $login_body_line;?> onload="javascript:document.login_form.authUser.focus();" >
30 <span class="text"></span>
32 <center>
34 <form method="POST" action="../main/main_screen.php?auth=login" target="_top"
35 name="login_form" onsubmit="return imsubmitted();">
37 <?php
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%">
48 <tr>
49 <td valign=middle width=33%>
50 <?php echo $logocode;?>
51 </td>
52 <td align='center' valign='middle' width=34%>
53 <table>
54 <?php
55 if (count($result) != 1) {
57 <tr>
58 <td><span class="text"><?php xl('Group:','e'); ?></span></td>
59 <td>
60 <select name=authProvider>
61 <?php
62 foreach ($result as $iter) {
63 echo "<option value='".$iter{"name"}."'>".$iter{"name"}."</option>\n";
66 </select>
67 </td></tr>
68 <?php
71 <tr>
72 <td><span class="text"><?php xl('Username:','e'); ?></span></td>
73 <td>
74 <input type="entry" size=10 name=authUser>
75 </td></tr><tr>
76 <td><span class="text"><?php xl('Password:','e'); ?></span></td>
77 <td>
78 <input type="password" size=10 name=clearPass>
79 </td></tr>
80 <tr><td>&nbsp;</td><td>
81 <input type="hidden" name="authPass">
82 <?php if ($GLOBALS['use_adldap_auth'] == true): ?>
83 <input type="submit" onClick="javascript:this.form.authPass.value=MD5(this.form.clearPass.value);" value=<?php xl('Login','e');?>>
84 <?php else: ?>
85 <input type="submit" onClick="javascript:this.form.authPass.value=MD5(this.form.clearPass.value);this.form.clearPass.value='';" value=<?php xl('Login','e');?>>
86 <?php endif; ?>
87 </td></tr>
88 </table>
90 </td>
91 <td width=33%>
93 <!-- Uncomment this for the OpenEMR demo installation
94 <p><center>login = admin
95 <br>password = pass
96 -->
98 </center></p>
100 </td>
101 </table>
103 </form>
105 <address>
106 <a href="copyright_notice.html" target="main"><?php xl('Copyright Notice','e'); ?></a><br />
107 </address>
109 </center>
110 </body>
111 </html>