2007-03-01 10:43:54 +01:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>Tiny Tiny RSS : Login</title>
|
2011-02-18 10:28:03 +01:00
|
|
|
<link rel="stylesheet" type="text/css" href="lib/dijit/themes/claro/claro.css"/>
|
2007-03-01 10:43:54 +01:00
|
|
|
<link rel="stylesheet" type="text/css" href="tt-rss.css">
|
|
|
|
<link rel="shortcut icon" type="image/png" href="images/favicon.png">
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
2011-02-18 10:28:03 +01:00
|
|
|
<script type="text/javascript" src="lib/dojo/dojo.js" djConfig="parseOnLoad: true"></script>
|
2009-01-22 14:41:34 +01:00
|
|
|
<script type="text/javascript" src="lib/prototype.js"></script>
|
2010-11-07 11:34:39 +01:00
|
|
|
<script type="text/javascript" src="lib/scriptaculous/scriptaculous.js?load=effects,dragdrop,controls"></script>
|
2007-08-11 16:42:26 +02:00
|
|
|
<script type="text/javascript" src="functions.js"></script>
|
2011-02-18 10:28:03 +01:00
|
|
|
<script type="text/javascript" charset="utf-8" src="errors.php?mode=js"></script>
|
2007-03-01 10:43:54 +01:00
|
|
|
</head>
|
|
|
|
|
2011-02-18 10:28:03 +01:00
|
|
|
<body id="ttrssLogin" class="claro">
|
2007-03-01 10:43:54 +01:00
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
function init() {
|
|
|
|
|
2011-02-18 10:28:03 +01:00
|
|
|
dojo.require("dijit.Dialog");
|
|
|
|
|
|
|
|
var test = setCookie("ttrss_test", "TEST");
|
|
|
|
|
|
|
|
if (getCookie("ttrss_test") != "TEST") {
|
|
|
|
return fatalError(2);
|
|
|
|
}
|
|
|
|
|
2008-06-24 09:43:20 +02:00
|
|
|
var limit_set = getCookie("ttrss_bwlimit");
|
|
|
|
|
|
|
|
if (limit_set == "true") {
|
|
|
|
document.forms["loginForm"].bw_limit.checked = true;
|
|
|
|
}
|
|
|
|
|
2010-01-25 21:12:08 +01:00
|
|
|
document.forms["loginForm"].login.focus();
|
2007-03-01 10:43:54 +01:00
|
|
|
}
|
2010-01-25 21:12:08 +01:00
|
|
|
|
2010-01-13 16:31:51 +01:00
|
|
|
function fetchProfiles() {
|
|
|
|
try {
|
|
|
|
var params = Form.serialize('loginForm');
|
|
|
|
var query = "?op=getProfiles&" + params;
|
2011-03-18 17:25:06 +01:00
|
|
|
|
2010-01-13 16:31:51 +01:00
|
|
|
if (query) {
|
|
|
|
new Ajax.Request("backend.php", {
|
|
|
|
parameters: query,
|
|
|
|
onComplete: function(transport) {
|
|
|
|
if (transport.responseText.match("select")) {
|
|
|
|
$('profile_box').innerHTML = transport.responseText;
|
|
|
|
}
|
|
|
|
} });
|
|
|
|
}
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
exception_error("fetchProfiles", e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-08-11 16:42:26 +02:00
|
|
|
function languageChange(elem) {
|
2007-08-12 04:30:18 +02:00
|
|
|
try {
|
|
|
|
document.forms['loginForm']['click'].disabled = true;
|
2011-03-18 17:25:06 +01:00
|
|
|
|
2007-08-12 04:30:18 +02:00
|
|
|
var lang = elem[elem.selectedIndex].value;
|
|
|
|
setCookie("ttrss_lang", lang, <?php print SESSION_COOKIE_LIFETIME ?>);
|
|
|
|
window.location.reload();
|
|
|
|
} catch (e) {
|
|
|
|
exception_error("languageChange", e);
|
|
|
|
}
|
2007-08-11 16:42:26 +02:00
|
|
|
}
|
2007-08-20 07:10:03 +02:00
|
|
|
|
2008-10-31 08:01:16 +01:00
|
|
|
function gotoRegForm() {
|
|
|
|
window.location.href = "register.php";
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2008-06-24 09:43:20 +02:00
|
|
|
function bwLimitChange(elem) {
|
|
|
|
try {
|
|
|
|
var limit_set = elem.checked;
|
|
|
|
|
2011-03-18 17:25:06 +01:00
|
|
|
setCookie("ttrss_bwlimit", limit_set,
|
2008-06-24 09:43:20 +02:00
|
|
|
<?php print SESSION_COOKIE_LIFETIME ?>);
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
exception_error("bwLimitChange", e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-08-20 07:10:03 +02:00
|
|
|
function validateLoginForm(f) {
|
|
|
|
try {
|
|
|
|
|
|
|
|
if (f.login.value.length == 0) {
|
|
|
|
new Effect.Highlight(f.login);
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (f.password.value.length == 0) {
|
|
|
|
new Effect.Highlight(f.password);
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2007-11-21 18:43:55 +01:00
|
|
|
document.forms['loginForm']['click'].disabled = true;
|
|
|
|
|
2007-08-20 07:10:03 +02:00
|
|
|
return true;
|
|
|
|
} catch (e) {
|
|
|
|
exception_error("validateLoginForm", e);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
2007-03-01 10:43:54 +01:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
2010-01-25 21:12:08 +01:00
|
|
|
Event.observe(window, 'load', function() {
|
|
|
|
init();
|
|
|
|
});
|
2007-03-01 10:43:54 +01:00
|
|
|
</script>
|
|
|
|
|
2010-01-13 16:31:51 +01:00
|
|
|
<form action="" method="POST" id="loginForm" name="loginForm" onsubmit="return validateLoginForm(this)">
|
2007-03-01 10:43:54 +01:00
|
|
|
<input type="hidden" name="login_action" value="do_login">
|
|
|
|
|
|
|
|
<table width="100%" class="loginForm2">
|
|
|
|
<tr>
|
|
|
|
<td class="loginTop" valign="bottom" align="left">
|
2010-12-03 10:03:44 +01:00
|
|
|
<img src="images/logo_wide.png">
|
2007-03-01 10:43:54 +01:00
|
|
|
</td>
|
|
|
|
</tr><tr>
|
|
|
|
<td align="center" valign="middle" class="loginMiddle" height="100%">
|
2007-03-02 11:48:46 +01:00
|
|
|
<?php if ($_SESSION['login_error_msg']) { ?>
|
|
|
|
<div class="loginError"><?php echo $_SESSION['login_error_msg'] ?></div>
|
|
|
|
<?php $_SESSION['login_error_msg'] = ""; ?>
|
2007-03-01 10:43:54 +01:00
|
|
|
<?php } ?>
|
|
|
|
<table>
|
2007-03-05 13:50:46 +01:00
|
|
|
<tr><td align="right"><?php echo __("Login:") ?></td>
|
2011-03-18 17:25:06 +01:00
|
|
|
<td align="right"><input name="login"
|
2010-01-25 21:12:08 +01:00
|
|
|
onchange="fetchProfiles()" onfocus="fetchProfiles()"
|
2011-03-28 11:03:43 +02:00
|
|
|
value="<?php echo get_remote_user($link) ?>"></td></tr>
|
2007-03-05 13:50:46 +01:00
|
|
|
<tr><td align="right"><?php echo __("Password:") ?></td>
|
2008-08-01 05:47:16 +02:00
|
|
|
<td align="right"><input type="password" name="password"
|
2010-01-25 21:12:08 +01:00
|
|
|
onchange="fetchProfiles()" onfocus="fetchProfiles()"
|
2011-03-28 11:03:43 +02:00
|
|
|
value="<?php echo get_remote_fakepass($link) ?>"></td></tr>
|
2007-08-11 16:25:51 +02:00
|
|
|
<tr><td align="right"><?php echo __("Language:") ?></td>
|
|
|
|
<td align="right">
|
|
|
|
<?php
|
2007-08-11 16:42:26 +02:00
|
|
|
print_select_hash("language", $_COOKIE["ttrss_lang"], get_translations(),
|
|
|
|
"style='width : 100%' onchange='languageChange(this)'");
|
2007-08-11 16:25:51 +02:00
|
|
|
|
|
|
|
?>
|
|
|
|
</td></tr>
|
2010-01-13 16:31:51 +01:00
|
|
|
|
|
|
|
<tr><td align="right"><?php echo __("Profile:") ?></td>
|
|
|
|
<td align="right" id="profile_box">
|
|
|
|
<select style='width : 100%' disabled='1'>
|
|
|
|
<option><?php echo __("Default profile") ?></option></select>
|
|
|
|
</td></tr>
|
|
|
|
|
2007-03-02 12:05:17 +01:00
|
|
|
<!-- <tr><td colspan="2">
|
2007-03-01 10:43:54 +01:00
|
|
|
<input type="checkbox" name="remember_me" id="remember_me">
|
|
|
|
<label for="remember_me">Remember me on this computer</label>
|
2007-03-02 12:05:17 +01:00
|
|
|
</td></tr> -->
|
2008-06-24 09:43:20 +02:00
|
|
|
|
2007-03-01 10:43:54 +01:00
|
|
|
<tr><td colspan="2" align="right" class="innerLoginCell">
|
2008-04-30 17:30:27 +02:00
|
|
|
|
2010-01-25 21:25:56 +01:00
|
|
|
<button type="submit" name='click'><?php echo __('Log in') ?></button>
|
2009-01-19 08:13:36 +01:00
|
|
|
<?php if (defined('ENABLE_REGISTRATION') && ENABLE_REGISTRATION) { ?>
|
2010-01-12 16:50:08 +01:00
|
|
|
<button onclick="return gotoRegForm()">
|
|
|
|
<?php echo __("Create new account") ?></button>
|
2008-04-30 17:30:27 +02:00
|
|
|
<?php } ?>
|
|
|
|
|
2007-03-01 10:43:54 +01:00
|
|
|
<input type="hidden" name="action" value="login">
|
2011-03-18 17:25:06 +01:00
|
|
|
<input type="hidden" name="rt"
|
2007-03-01 10:43:54 +01:00
|
|
|
value="<?php if ($return_to != 'none') { echo $return_to; } ?>">
|
|
|
|
</td></tr>
|
2008-06-24 09:43:20 +02:00
|
|
|
|
|
|
|
<tr><td colspan="2" align="right" class="innerLoginCell">
|
|
|
|
|
|
|
|
<div class="small">
|
|
|
|
<input name="bw_limit" id="bw_limit" type="checkbox"
|
|
|
|
onchange="bwLimitChange(this)">
|
|
|
|
<label for="bw_limit">
|
2010-10-13 12:48:15 +02:00
|
|
|
<?php echo __("Use less traffic") ?></label></div>
|
2008-06-24 09:43:20 +02:00
|
|
|
|
|
|
|
</td></tr>
|
|
|
|
|
|
|
|
|
2007-03-01 10:43:54 +01:00
|
|
|
</table>
|
|
|
|
</td>
|
|
|
|
</tr><tr>
|
|
|
|
<td align="center" class="loginBottom">
|
2011-01-25 13:15:30 +01:00
|
|
|
<a href="http://tt-rss.org/">Tiny Tiny RSS</a>
|
|
|
|
<?php if (!defined('HIDE_VERSION')) { ?>
|
2011-03-18 17:25:06 +01:00
|
|
|
v<?php echo VERSION ?>
|
2011-01-25 13:15:30 +01:00
|
|
|
<?php } ?>
|
|
|
|
© 2005–<?php echo date('Y') ?> <a href="http://fakecake.org/">Andrew Dolgov</a>
|
2007-03-01 10:43:54 +01:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
</form>
|
|
|
|
|
2007-11-17 08:25:37 +01:00
|
|
|
</body></html>
|