1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
|
<?php
//
// otrs location
//
$starthost='http://otrs.example.com/otrs/index.pl';
//
// logout messages
//
$reason = $GLOBALS['HTTP_GET_VARS']['Reason'];
$reasons = array(
'' => '',
'InvalidSessionID' => _("Your session has expired. Please login again."),
'Logout' => _("You have been logged out.<br />Thank you for using the system."),
'LoginFailed' => _("Login failed for some reason. Most likely your username or password was entered incorrectly."),
'SystemError' => _("System error! Contact your admin!")
);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<title>Welcome</title>
</head>
<body onload="setFocus()" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<script language="JavaScript" type="text/javascript">
<!--
function setFocus()
{
document.login.User.focus();
}
function submit_login()
{
if (document.login.User.value == "") {
alert("Please provide your username and password");
document.login.User.focus();
return false;
} else if (document.login.Password.value == "") {
alert("Please provide your username and password");
document.login.Password.focus();
return false;
} else {
return true;
}
}
//-->
</script>
<center>
<form action="<?= $starthost ?>" method="post" name="login">
<input type="hidden" name="Action" value="Login" />
<input type="hidden" name="RequestedURL" value="<?= $GLOBALS['HTTP_GET_VARS']['RequestedURL'] ?>" />
<table align="center" border="0" width="260" cellspacing="4" cellpadding="2">
<tr>
<td align="center" colspan="2">Welcome to OTRS</td>
</tr>
<?
//
// print reason if needed
//
if ($reasons[$reason] != '') {
echo '<tr>';
echo '<td align="center" colspan="2">'. $reasons[$reason] .'</td>';
echo '</tr>';
}
?>
<tr>
<td align="right"><b>Username</b></td>
<td align="left"><input type="text" tabindex="1" name="User" value="" /></td>
</tr>
<tr>
<td align="right"><b>Password</b></td>
<td align="left"><input type="password" tabindex="2" name="Password" /></td>
</tr>
<tr>
<td> </td>
<td align="left"><input type="submit" name="button" tabindex="4" value="Log in" onclick="return submit_login();" /></td>
</tr>
</table>
</form>
</center>
</body>
</html>
|