2004-10-16 00:28:17 +00:00
< ? /*
2008-04-06 19:45:09 +00:00
LibreSSL - CAcert web application
Copyright ( C ) 2004 - 2008 CAcert Inc .
2004-10-16 00:28:17 +00:00
2008-04-06 19:45:09 +00:00
This program is free software ; you can redistribute it and / or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; version 2 of the License .
2004-10-16 00:28:17 +00:00
2008-04-06 19:45:09 +00:00
This program is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
GNU General Public License for more details .
2004-10-16 00:28:17 +00:00
2008-04-06 19:45:09 +00:00
You should have received a copy of the GNU General Public License
along with this program ; if not , write to the Free Software
Foundation , Inc . , 51 Franklin Street , Fifth Floor , Boston , MA 02110 - 1301 USA
2004-10-16 00:28:17 +00:00
*/ ?>
2008-08-17 23:26:18 +00:00
2008-09-23 22:20:26 +00:00
< ?
2008-10-07 15:49:57 +00:00
if ( ! array_key_exists ( 'mconn' , $_SESSION ) || ! $_SESSION [ 'mconn' ])
2008-09-23 22:20:26 +00:00
{
echo _ ( " This function is currently unavailable. Please come back later. " );
exit ;
}
?>
2005-03-12 19:40:24 +00:00
< ? if ( $_SESSION [ '_config' ][ 'hostname' ] == $_SESSION [ '_config' ][ 'securehostname' ]) { ?>
2008-06-08 15:29:08 +00:00
< 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>
2004-10-16 00:28:17 +00:00
< ? } else { ?>
2007-01-10 04:01:15 +00:00
< style >
2007-01-28 18:37:19 +00:00
. box2 { width : 100 % ; text - align : center ;}
2008-03-23 01:48:04 +00:00
. box { background : #F5F7F7;border:2px solid #cccccc;margin:0px auto;height:250px;width:300px;padding:1em;}
2007-01-10 04:01:15 +00:00
. smalltext { font - size : 10 px ;}
label { width : 100 px ; display : block ; float : left ;}
text { width : 166 px ; display : block ; float : left ;}
br { clear : left ;}
h1 { font - size : 1.9 em ; text - align : center ;}
</ style >
2007-01-28 18:37:19 +00:00
< div class = 'box2' >
2007-01-10 04:01:15 +00:00
< div class = 'box' >
2008-08-17 23:26:18 +00:00
< form action = 'index.php' method = 'post' < ? if ( array_key_exists ( " noauto " , $_REQUEST ) && $_REQUEST [ 'noauto' ] == 1 ) echo " autocomplete='off' " ; ?> >
< ? if ( array_key_exists ( " noauto " , $_REQUEST ) && $_REQUEST [ 'noauto' ] == 1 ) { ?> <input type="hidden" name="noauto" value="1"><? } ?>
2007-01-10 04:01:15 +00:00
< h1 >< ? = _ ( " Login " ) ?> </h1>
< 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>
2008-10-02 21:24:13 +00:00
< 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 />
< label for = " pword " >< ? = _ ( " Pass Phrase " ) ?> :</label><input type='password' name='pword' autocomplete="off"/><br />
2007-01-10 04:01:15 +00:00
< input type = 'submit' name = " process " value = " <?=_( " Login " )?> " />< br />< br />
2009-09-19 23:20:08 +00:00
< a href = 'https://<?=$_SESSION[' _config '][' normalhostname ']?>/index.php?id=4' >< ? = _ ( " Password Login " ) ?> </a> -
< a href = 'https://<?=$_SESSION[' _config '][' normalhostname ']?>/index.php?id=5' >< ? = _ ( " Lost Password " ) ?> </a> -
< a href = 'https://<?=$_SESSION[' _config '][' normalhostname ']?>/index.php?id=4&noauto=1' >< ? = _ ( " Net Cafe Login " ) ?> </a><br />
2007-01-10 04:01:15 +00:00
< 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>
2004-10-16 00:28:17 +00:00
< input type = " hidden " name = " oldid " value = " <?= $id ?> " >
2007-01-10 04:01:15 +00:00
</ form >
</ div >
2007-01-28 18:37:19 +00:00
</ div >
2008-07-31 21:27:26 +00:00
< ? }
2008-08-17 23:26:18 +00:00
if ( array_key_exists ( " oldlocation " , $_SESSION [ '_config' ]) && $_SESSION [ '_config' ][ 'oldlocation' ] != " " )
2008-07-31 21:27:26 +00:00
{
2009-05-31 16:50:24 +00:00
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> " ;
2008-07-31 21:27:26 +00:00
}
?>