3 <title>Tiny Tiny RSS : Login</title>
4 <link rel="stylesheet" type="text/css" href="lib/dijit/themes/claro/claro.css"/>
5 <link rel="stylesheet" type="text/css" href="tt-rss.css">
6 <link rel="shortcut icon" type="image/png" href="images/favicon.png">
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
8 <script type="text/javascript" src="lib/dojo/dojo.js" djConfig="parseOnLoad: true"></script>
9 <script type="text/javascript" src="lib/prototype.js"></script>
10 <script type="text/javascript" src="lib/scriptaculous/scriptaculous.js?load=effects,dragdrop,controls"></script>
11 <script type="text/javascript" src="functions.js"></script>
12 <script type="text/javascript" charset="utf-8" src="errors.php?mode=js"></script>
15 <body id="ttrssLogin" class="claro">
17 <script type="text/javascript">
20 dojo.require("dijit.Dialog");
22 var test = setCookie("ttrss_test", "TEST");
24 if (getCookie("ttrss_test") != "TEST") {
28 var limit_set = getCookie("ttrss_bwlimit");
30 if (limit_set == "true") {
31 document.forms["loginForm"].bw_limit.checked = true;
34 document.forms["loginForm"].login.focus();
37 function fetchProfiles() {
39 var params = Form.serialize('loginForm');
40 var query = "?op=getProfiles&" + params;
43 new Ajax.Request("backend.php", {
45 onComplete: function(transport) {
46 if (transport.responseText.match("select")) {
47 $('profile_box').innerHTML = transport.responseText;
53 exception_error("fetchProfiles", e);
58 function languageChange(elem) {
60 document.forms['loginForm']['click'].disabled = true;
62 var lang = elem[elem.selectedIndex].value;
63 setCookie("ttrss_lang", lang, <?php print SESSION_COOKIE_LIFETIME ?>);
64 window.location.reload();
66 exception_error("languageChange", e);
70 function gotoRegForm() {
71 window.location.href = "register.php";
75 function bwLimitChange(elem) {
77 var limit_set = elem.checked;
79 setCookie("ttrss_bwlimit", limit_set,
80 <?php print SESSION_COOKIE_LIFETIME ?>);
83 exception_error("bwLimitChange", e);
87 function validateLoginForm(f) {
90 if (f.login.value.length == 0) {
91 new Effect.Highlight(f.login);
95 if (f.password.value.length == 0) {
96 new Effect.Highlight(f.password);
100 document.forms['loginForm']['click'].disabled = true;
104 exception_error("validateLoginForm", e);
110 <script type="text/javascript">
111 Event.observe(window, 'load', function() {
116 <form action="" method="POST" id="loginForm" name="loginForm" onsubmit="return validateLoginForm(this)">
117 <input type="hidden" name="login_action" value="do_login">
119 <table width="100%" class="loginForm2">
121 <td class="loginTop" valign="bottom" align="left">
122 <img src="images/logo_wide.png">
125 <td align="center" valign="middle" class="loginMiddle" height="100%">
126 <?php if ($_SESSION['login_error_msg']) { ?>
127 <div class="loginError"><?php echo $_SESSION['login_error_msg'] ?></div>
128 <?php $_SESSION['login_error_msg'] = ""; ?>
131 <tr><td align="right"><?php echo __("Login:") ?></td>
132 <td align="right"><input name="login"
133 onchange="fetchProfiles()" onfocus="fetchProfiles()"
134 value="<?php echo get_remote_user($link) ?>"></td></tr>
135 <tr><td align="right"><?php echo __("Password:") ?></td>
136 <td align="right"><input type="password" name="password"
137 onchange="fetchProfiles()" onfocus="fetchProfiles()"
138 value="<?php echo get_remote_fakepass($link) ?>"></td></tr>
139 <tr><td align="right"><?php echo __("Language:") ?></td>
142 print_select_hash("language", $_COOKIE["ttrss_lang"], get_translations(),
143 "style='width : 100%' onchange='languageChange(this)'");
148 <tr><td align="right"><?php echo __("Profile:") ?></td>
149 <td align="right" id="profile_box">
150 <select style='width : 100%' disabled='1'>
151 <option><?php echo __("Default profile") ?></option></select>
154 <!-- <tr><td colspan="2">
155 <input type="checkbox" name="remember_me" id="remember_me">
156 <label for="remember_me">Remember me on this computer</label>
159 <tr><td colspan="2" align="right" class="innerLoginCell">
161 <button type="submit" name='click'><?php echo __('Log in') ?></button>
162 <?php if (defined('ENABLE_REGISTRATION') && ENABLE_REGISTRATION) { ?>
163 <button onclick="return gotoRegForm()">
164 <?php echo __("Create new account") ?></button>
167 <input type="hidden" name="action" value="login">
168 <input type="hidden" name="rt"
169 value="<?php if ($return_to != 'none') { echo $return_to; } ?>">
172 <tr><td colspan="2" align="right" class="innerLoginCell">
175 <input name="bw_limit" id="bw_limit" type="checkbox"
176 onchange="bwLimitChange(this)">
177 <label for="bw_limit">
178 <?php echo __("Use less traffic") ?></label></div>
186 <td align="center" class="loginBottom">
187 <a href="http://tt-rss.org/">Tiny Tiny RSS</a>
188 <?php if (!defined('HIDE_VERSION')) { ?>
189 v<?php echo VERSION ?>
191 © 2005–<?php echo date('Y') ?> <a href="http://fakecake.org/">Andrew Dolgov</a>