84 lines
2 KiB
PHTML
84 lines
2 KiB
PHTML
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||
|
<html>
|
||
|
<head>
|
||
|
<title>Zend OpenID Server Example</title>
|
||
|
<style>
|
||
|
input.openid_login {
|
||
|
background: url(login-bg.gif) no-repeat;
|
||
|
background-color: #fff;
|
||
|
background-position: 0 50%;
|
||
|
color: #000;
|
||
|
padding-left: 18px;
|
||
|
width: 220px;
|
||
|
margin-right: 10px;
|
||
|
}
|
||
|
input.openid_password {
|
||
|
background-color: #fff;
|
||
|
color: #000;
|
||
|
padding-left: 18px;
|
||
|
width: 220px;
|
||
|
margin-right: 10px;
|
||
|
}
|
||
|
</style>
|
||
|
<script language="JavaScript">
|
||
|
function init() {
|
||
|
<?php
|
||
|
if (isset($this->error)) {
|
||
|
echo ' alert("' . $this->error . '");' . "\n";
|
||
|
}
|
||
|
?>
|
||
|
if (document.forms['login'].elements['openid_url'].value == '') {
|
||
|
document.forms['login'].elements['openid_url'].focus();
|
||
|
} else {
|
||
|
document.forms['login'].elements['openid_password'].focus();
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
</head>
|
||
|
<body onLoad="init()">
|
||
|
<?php
|
||
|
if (isset($this->error)) {
|
||
|
echo '<noscript><div><b><font color="#ff0000">Error: ' . $this->error . '</font></b></div></noscript>';
|
||
|
}
|
||
|
?>
|
||
|
<div>
|
||
|
<form name="login" action="<?php echo $_SERVER['REQUEST_URI']; ?>"
|
||
|
method="post" onsubmit="this.login.disabled=true;">
|
||
|
<fieldset id="openid">
|
||
|
<legend>OpenID Login</legend>
|
||
|
<input type="hidden" name="openid_action" value="login">
|
||
|
<table border="0"><tr><td>
|
||
|
<label>OpenID URL:</label>
|
||
|
</td><td>
|
||
|
<input type="text" class="openid_login"
|
||
|
<?php
|
||
|
if (isset($this->id)) {
|
||
|
echo ' value="' . $this->id . '"';
|
||
|
}
|
||
|
if (isset($this->ro)) {
|
||
|
echo ' readonly="1" disabled="1">'."\n";
|
||
|
echo '<input type="hidden" name="openid_url" value="' . $this->id . '"';
|
||
|
} else {
|
||
|
echo ' name="openid_url"';
|
||
|
}
|
||
|
?>>
|
||
|
</td></tr><tr><td>
|
||
|
<label>Password:</label>
|
||
|
</td><td>
|
||
|
<input type="password" name="openid_password" class="openid_password">
|
||
|
</td><td></tr><tr><td> </td><td>
|
||
|
<input type="submit" name="login" value="login">
|
||
|
</td></tr></table>
|
||
|
<?php
|
||
|
if (!isset($this->ro)) {
|
||
|
echo '<br>';
|
||
|
echo '<a href="?openid.action=register">register</a>';
|
||
|
}
|
||
|
|
||
|
?>
|
||
|
</fieldset>
|
||
|
</form>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|