<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="ja">
<head>
<link rel="stylesheet" href="/<?php echo $this->data['baseurlpath']; ?>resources/tkt.css">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<div align="center">
<h1>ログイン</h1>
<form name="login" method="post">
<table border="0" cellpadding="5">
<tr><th align="right">ユーザ名:</th><td align="left">
<?php
echo '<input type="text" name="username" class="login" ';
if (isset($this->data['username'])) {
    echo 'value="'.htmlspecialchars($this->data['username']).'"';
}
echo ' />';
?>
</td></tr>
<tr><th align="right">パスワード:</th><td align="left"><input type="password" name="password" class="login" /></td></tr>
<tr><td colspan="2" align="center">
<input type="hidden" name="RelayState" value="<?php echo htmlspecialchars($this->data['relaystate']); ?>" />
<input type="submit" value="ログイン" />
</td></tr>
</table>
</form>
<p class="error">
<?php if (isset($this->data['error'])) {
    $error = $this->data['error'];
    if ($error == 'error_wrongpassword' || preg_match('/^LDAP search returned zero entries/', $error)) {
        $message = "ユーザ名またはパスワードが間違っています";
    } else {
        $message = "内部エラーが発生しました";
    }
    echo "$message<br>";
}
?>
</p>
</div>
</body>
</html>
