3 <title>Tiny Tiny RSS : Login</title>
4 <link rel="stylesheet" type="text/css" href="tt-rss.css">
5 <link rel="shortcut icon" type="image/png" href="images/favicon.png">
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
7 <script type="text/javascript" src="lib/prototype.js"></script>
8 <script type="text/javascript" src="lib/scriptaculous/scriptaculous.js"></script>
9 <script type="text/javascript" src="functions.js"></script>
14 <script type="text/javascript">
17 var limit_set = getCookie("ttrss_bwlimit");
19 if (limit_set == "true") {
20 document.forms["loginForm"].bw_limit.checked = true;
23 document.forms["loginForm"].login.focus();
26 function fetchProfiles() {
28 var params = Form.serialize('loginForm');
29 var query = "?op=getProfiles&" + params;
32 new Ajax.Request("backend.php", {
34 onComplete: function(transport) {
35 if (transport.responseText.match("select")) {
36 $('profile_box').innerHTML = transport.responseText;
42 exception_error("fetchProfiles", e);
47 function languageChange(elem) {
49 document.forms['loginForm']['click'].disabled = true;
51 var lang = elem[elem.selectedIndex].value;
52 setCookie("ttrss_lang", lang, <?php print SESSION_COOKIE_LIFETIME ?>);
53 window.location.reload();
55 exception_error("languageChange", e);
59 function gotoRegForm() {
60 window.location.href = "register.php";
64 function bwLimitChange(elem) {
66 var limit_set = elem.checked;
68 setCookie("ttrss_bwlimit", limit_set,
69 <?php print SESSION_COOKIE_LIFETIME ?>);
72 exception_error("bwLimitChange", e);
76 function validateLoginForm(f) {
79 if (f.login.value.length == 0) {
80 new Effect.Highlight(f.login);
84 if (f.password.value.length == 0) {
85 new Effect.Highlight(f.password);
89 document.forms['loginForm']['click'].disabled = true;
93 exception_error("validateLoginForm", e);
99 <script type="text/javascript">
100 Event.observe(window, 'load', function() {
105 <form action="" method="POST" id="loginForm" name="loginForm" onsubmit="return validateLoginForm(this)">
106 <input type="hidden" name="login_action" value="do_login">
108 <table width="100%" class="loginForm2">
110 <td class="loginTop" valign="bottom" align="left">
111 <img src="images/ttrss_logo_big.png" alt="Logo">
114 <td align="center" valign="middle" class="loginMiddle" height="100%">
115 <?php if ($_SESSION['login_error_msg']) { ?>
116 <div class="loginError"><?php echo $_SESSION['login_error_msg'] ?></div>
117 <?php $_SESSION['login_error_msg'] = ""; ?>
120 <tr><td align="right"><?php echo __("Login:") ?></td>
121 <td align="right"><input name="login"
122 onchange="fetchProfiles()" onfocus="fetchProfiles()"
123 value="<?php echo $_SERVER["REMOTE_USER"] ?>"></td></tr>
124 <tr><td align="right"><?php echo __("Password:") ?></td>
125 <td align="right"><input type="password" name="password"
126 onchange="fetchProfiles()" onfocus="fetchProfiles()"
127 value="<?php echo $_SERVER["REMOTE_USER"] ?>"></td></tr>
128 <?php if (ENABLE_TRANSLATIONS) { ?>
129 <tr><td align="right"><?php echo __("Language:") ?></td>
132 print_select_hash("language", $_COOKIE["ttrss_lang"], get_translations(),
133 "style='width : 100%' onchange='languageChange(this)'");
139 <tr><td align="right"><?php echo __("Profile:") ?></td>
140 <td align="right" id="profile_box">
141 <select style='width : 100%' disabled='1'>
142 <option><?php echo __("Default profile") ?></option></select>
145 <!-- <tr><td colspan="2">
146 <input type="checkbox" name="remember_me" id="remember_me">
147 <label for="remember_me">Remember me on this computer</label>
150 <tr><td colspan="2" align="right" class="innerLoginCell">
152 <button type="submit" name='click'><?php echo __('Log in') ?></button>
153 <?php if (defined('ENABLE_REGISTRATION') && ENABLE_REGISTRATION) { ?>
154 <button onclick="return gotoRegForm()">
155 <?php echo __("Create new account") ?></button>
158 <input type="hidden" name="action" value="login">
159 <input type="hidden" name="rt"
160 value="<?php if ($return_to != 'none') { echo $return_to; } ?>">
163 <tr><td colspan="2" align="right" class="innerLoginCell">
166 <input name="bw_limit" id="bw_limit" type="checkbox"
167 onchange="bwLimitChange(this)">
168 <label for="bw_limit">
169 <?php echo __("Limit bandwidth usage") ?></label></div>
177 <td align="center" class="loginBottom">
178 <a href="http://tt-rss.org/">Tiny Tiny RSS</a> © 2005–2010 <a href="http://fakecake.org/">Andrew Dolgov</a>