Source code taken from cacert-20130227.tar.bz2
[cacert.git] / pages / index / 4.php
1 <? /*
2 LibreSSL - CAcert web application
3 Copyright (C) 2004-2008 CAcert Inc.
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; version 2 of the License.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */ ?>
18
19 <?
20 if(!array_key_exists('mconn',$_SESSION) || !$_SESSION['mconn'])
21 {
22 echo _("This function is currently unavailable. Please come back later.");
23 exit;
24 }
25 ?>
26
27 <? if($_SESSION['_config']['hostname'] == $_SESSION['_config']['securehostname']) { ?>
28 <p><?=_("Warning! You've attempted to log into the system with a client certificate, but the login failed due to the certificate being expired, revoked, disabled for certificate login, or simply not valid for this site. You can login using your Email/Pass Phrase to get a new certificate, by clicking on 'Normal Login' to the right of your screen.")?></p>
29 <? } else { ?>
30 <style>
31 .box2 {width:100%;text-align:center;}
32 .box {background:#F5F7F7;border:2px solid #cccccc;margin:0px auto;height:auto;width:300px;padding:1em;}
33 .smalltext {font-size:10px;}
34 label {width:100px;display:block;float:left;}
35 text {width:166px;display:block;float:left;}
36 br {clear:left;}
37 h1 {font-size:1.9em;text-align:center;}
38 </style>
39 <div class='box2'>
40 <div class='box'>
41 <form action='index.php' method='post'<? if(array_key_exists("noauto",$_REQUEST) && $_REQUEST['noauto'] == 1) echo " autocomplete='off'"; ?>>
42 <? if(array_key_exists("noauto",$_REQUEST) && $_REQUEST['noauto'] == 1) { ?><input type="hidden" name="noauto" value="1"><? } ?>
43 <h1><?=_("Login")?></h1>
44 <p class='smalltext'><?=_("Warning! This site requires cookies to be enabled to ensure your privacy and security. This site uses session cookies to store temporary values to prevent people from copying and pasting the session ID to someone else exposing their account, personal details and identity theft as a result.")?></p>
45 <label for="email"><?=_("Email Address")?>:</label><input type='text' name="email" value="<?=sanitizeHTML(array_key_exists("email",$_REQUEST)?$_REQUEST['email']:"")?>" <? if(array_key_exists('notauto',$_REQUEST) && $_REQUEST['noauto'] == 1) echo " autocomplete='off'"; ?>/><br />
46 <label for="pword"><?=_("Pass Phrase")?>:</label><input type='password' name='pword' autocomplete="off"/><br />
47 <input type='submit' name="process" value="<?=_("Login")?>" /><br /><br />
48 <a href='https://<?=$_SESSION['_config']['normalhostname']?>/index.php?id=4'><?=_("Password Login")?></a> -
49 <a href='https://<?=$_SESSION['_config']['normalhostname']?>/index.php?id=5'><?=_("Lost Password")?></a> -
50 <a href='https://<?=$_SESSION['_config']['normalhostname']?>/index.php?id=4&amp;noauto=1'><?=_("Net Cafe Login")?></a><br />
51 <p class='smalltext'><?=sprintf(_("If you are having trouble with your username or password, please visit our %swiki page%s for more information"), "<a href='http://wiki.cacert.org/wiki/FAQ/LostPasswordOrAccount' target='_new'>", "</a>");?></p>
52 <input type="hidden" name="oldid" value="<?=$id?>">
53 </form>
54 </div>
55 </div>
56 <? }
57 if(array_key_exists("oldlocation",$_SESSION['_config']) && $_SESSION['_config']['oldlocation']!="")
58 {
59 echo "<br/><center>"._("If you want to use certificate login instead of username+password, please")." <a href='https://secure.cacert.org/".sanitizeHTML($_SESSION['_config']['oldlocation'])."'>"._("click here")."</a></center>";
60 }
61 ?>