1 <?php startup_gettext(); ?>
4 <title>Tiny Tiny RSS : Login</title>
5 <link rel="stylesheet" type="text/css" href="lib/dijit/themes/claro/claro.css"/>
6 <link rel="stylesheet" type="text/css" href="css/tt-rss.css">
7 <link rel="shortcut icon" type="image/png" href="images/favicon.png">
8 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
9 <script type="text/javascript" src="lib/dojo/dojo.js"></script>
10 <script type="text/javascript" src="lib/dojo/tt-rss-layer.js"></script>
11 <script type="text/javascript" src="lib/prototype.js"></script>
12 <script type="text/javascript" src="js/functions.js"></script>
13 <script type="text/javascript" charset="utf-8" src="errors.php?mode=js"></script>
14 <script type="text/javascript">
16 Event.observe(window, 'load', function() {
20 <style type="text/css">
35 font-family : sans-serif;
38 border : 1px solid #b5bcc7;
45 display : inline-block;
51 border-width : 0px 0px 1px 0px;
53 border-color : #88b0f0;
61 border-width : 1px 0px 0px 0px;
63 border-color : #88b0f0;
72 display : inline-block;
92 padding : 0px 0px 5px 0px;
98 padding : 0px 0px 5px 0px;
104 <body id="ttrssLogin" class="claro">
106 <script type="text/javascript">
109 require(['dojo/parser','dijit/form/Button','dijit/form/CheckBox','dijit/form/Form',
110 'dijit/form/Select','dijit/form/TextBox','dijit/form/ValidationTextBox'],function(parser){
112 //show tooltip node only after this widget is instaniated.
113 dojo.query('div[dojoType="dijit.Tooltip"]').style({
117 dijit.byId("bw_limit").attr("checked", getCookie("ttrss_bwlimit") == 'true');
118 document.forms.loginForm.login.focus();
123 function fetchProfiles() {
125 var query = "op=getProfiles&login=" + param_escape(document.forms["loginForm"].login.value);
128 new Ajax.Request("public.php", {
130 onComplete: function(transport) {
131 if (transport.responseText.match("select")) {
132 $('profile_box').innerHTML = transport.responseText;
133 dojo.parser.parse('profile_box');
139 exception_error("fetchProfiles", e);
144 function gotoRegForm() {
145 window.location.href = "register.php";
149 function bwLimitChange(elem) {
151 var limit_set = elem.checked;
153 setCookie("ttrss_bwlimit", limit_set,
154 <?php print SESSION_COOKIE_LIFETIME ?>);
157 exception_error("bwLimitChange", e);
162 <?php $return = urlencode($_SERVER["REQUEST_URI"]) ?>
164 <form action="public.php?return=<?php echo $return ?>"
165 dojoType="dijit.form.Form" method="POST" id="loginForm" name="loginForm">
167 <input dojoType="dijit.form.TextBox" style="display : none" name="op" value="login">
170 <img src="images/logo_wide.png">
176 <?php if ($_SESSION["login_error_msg"]) { ?>
177 <div class="row-error">
178 <?php echo $_SESSION["login_error_msg"] ?>
180 <?php $_SESSION["login_error_msg"] = ""; ?>
183 <label><?php echo __("Login:") ?></label>
184 <input name="login" class="input"
185 onchange="fetchProfiles()" onfocus="fetchProfiles()" onblur="fetchProfiles()"
186 style="width : 220px"
188 value="<?php echo $_SESSION["fake_login"] ?>" />
193 <label><?php echo __("Password:") ?></label>
194 <input type="password" name="password" required="1"
195 style="width : 220px" class="input"
196 value="<?php echo $_SESSION["fake_password"] ?>"/>
198 <?php if (strpos(PLUGINS, "auth_internal") !== FALSE) { ?>
199 <a class='forgotpass' href="public.php?op=forgotpass"><?php echo __("I forgot my password") ?></a>
205 <label><?php echo __("Profile:") ?></label>
207 <span id='profile_box'><select disabled='disabled' dojoType='dijit.form.Select'
208 style='width : 220px; margin : 0px'>
209 <option><?php echo __("Default profile") ?></option></select></span>
214 <label> </label>
215 <input dojoType="dijit.form.CheckBox" name="bw_limit" id="bw_limit" type="checkbox"
216 onchange="bwLimitChange(this)">
217 <label id="bw_limit_label" style='display : inline' for="bw_limit"><?php echo __("Use less traffic") ?></label>
220 <div dojoType="dijit.Tooltip" connectId="bw_limit_label" position="below" style="display:none">
221 <?php echo __("Does not display images in articles, reduces automatic refreshes."); ?>
224 <?php if (SESSION_COOKIE_LIFETIME > 0) { ?>
227 <label> </label>
228 <input dojoType="dijit.form.CheckBox" name="remember_me" id="remember_me" type="checkbox">
229 <label style='display : inline' for="remember_me"><?php echo __("Remember me") ?></label>
234 <div class="row" style='text-align : right'>
235 <button dojoType="dijit.form.Button" type="submit"><?php echo __('Log in') ?></button>
236 <?php if (defined('ENABLE_REGISTRATION') && ENABLE_REGISTRATION) { ?>
237 <button onclick="return gotoRegForm()" dojoType="dijit.form.Button">
238 <?php echo __("Create new account") ?></button>
248 <a href="http://tt-rss.org/">Tiny Tiny RSS</a>
249 <?php if (!defined('HIDE_VERSION')) { ?>
250 v<?php echo VERSION ?>
252 © 2005–<?php echo date('Y') ?> <a href="http://fakecake.org/">Andrew Dolgov</a>