1 <?php
startup_gettext(); ?
>
4 <title
>Tiny Tiny RSS
: Login
</title
>
5 <?php
echo stylesheet_tag("lib/dijit/themes/claro/claro.css") ?
>
6 <?php
echo stylesheet_tag("css/tt-rss.css") ?
>
7 <?php
echo stylesheet_tag("css/dijit.css") ?
>
8 <link rel
="shortcut icon" type
="image/png" href
="images/favicon.png">
9 <meta http
-equiv
="Content-Type" content
="text/html; charset=utf-8">
11 foreach (array("lib/prototype.js",
13 "lib/dojo/tt-rss-layer.js",
15 "errors.php?mode=js") as $jsfile) {
17 echo javascript_tag($jsfile);
21 <script type
="text/javascript">
23 Event
.observe(window
, 'load', function() {
27 <style type
="text/css">
42 font-family : sans-serif;
45 border : 1px solid #b5bcc7;
52 display
: inline
-block
;
58 border
-width
: 0px
0px
1px
0px
;
60 border
-color
: #0088cc;
68 border
-width
: 1px
0px
0px
0px
;
70 border
-color
: #0088cc;
79 display
: inline
-block
;
88 text
-decoration
: none
;
94 text
-decoration
: underline
;
106 padding
: 0px
0px
5px
0px
;
112 padding
: 0px
0px
5px
0px
;
118 <body id
="ttrssLogin" class="claro">
120 <script type
="text/javascript">
123 require(['dojo/parser','dijit/form/Button','dijit/form/CheckBox','dijit/form/Form',
124 'dijit/form/Select','dijit/form/TextBox','dijit/form/ValidationTextBox'],function(parser
){
126 //show tooltip node only after this widget is instaniated.
127 dojo
.query('div[dojoType="dijit.Tooltip"]').style({
131 dijit
.byId("bw_limit").attr("checked", getCookie("ttrss_bwlimit") == 'true');
132 document
.forms
.loginForm
.login
.focus();
137 function fetchProfiles() {
139 var query
= "op=getProfiles&login=" +
param_escape(document
.forms
["loginForm"].login
.value
);
142 new Ajax
.Request("public.php", {
144 onComplete
: function(transport
) {
145 if (transport
.responseText
.match("select")) {
146 $
('profile_box').innerHTML
= transport
.responseText
;
147 dojo
.parser
.parse('profile_box');
153 exception_error("fetchProfiles", e
);
158 function gotoRegForm() {
159 window
.location
.href
= "register.php";
163 function bwLimitChange(elem
) {
165 var limit_set
= elem
.checked
;
167 setCookie("ttrss_bwlimit", limit_set
,
168 <?php
print SESSION_COOKIE_LIFETIME ?
>);
171 exception_error("bwLimitChange", e
);
176 <?php
$return = urlencode($_SERVER["REQUEST_URI"]) ?
>
178 <form action
="public.php?return=<?php echo $return ?>"
179 dojoType
="dijit.form.Form" method
="POST" id
="loginForm" name
="loginForm">
181 <input dojoType
="dijit.form.TextBox" style
="display : none" name
="op" value
="login">
184 <img src
="images/logo_wide.png">
190 <?php
if ($_SESSION["login_error_msg"]) { ?
>
191 <div
class="row-error">
192 <?php
echo $_SESSION["login_error_msg"] ?
>
194 <?php
$_SESSION["login_error_msg"] = ""; ?
>
197 <label
><?php
echo __("Login:") ?
></label
>
198 <input name
="login" class="input input-text" type
="text"
199 onchange
="fetchProfiles()" onfocus
="fetchProfiles()" onblur
="fetchProfiles()"
200 style
="width : 220px"
202 value
="<?php echo $_SESSION["fake_login
"] ?>" />
207 <label
><?php
echo __("Password:") ?
></label
>
208 <input type
="password" name
="password" required
="1"
209 style
="width : 220px" class="input input-text"
210 value
="<?php echo $_SESSION["fake_password
"] ?>"/>
212 <?php
if (strpos(PLUGINS
, "auth_internal") !== FALSE) { ?
>
213 <a
class='forgotpass' href
="public.php?op=forgotpass"><?php
echo __("I forgot my password") ?
></a
>
219 <label
><?php
echo __("Profile:") ?
></label
>
221 <span id
='profile_box'><select disabled
='disabled' dojoType
='dijit.form.Select'
222 style
='width : 220px; margin : 0px'>
223 <option
><?php
echo __("Default profile") ?
></option
></select
></span
>
228 <label
> 
;</label
>
229 <input dojoType
="dijit.form.CheckBox" name
="bw_limit" id
="bw_limit" type
="checkbox"
230 onchange
="bwLimitChange(this)">
231 <label id
="bw_limit_label" style
='display : inline' for="bw_limit"><?php
echo __("Use less traffic") ?
></label
>
234 <div dojoType
="dijit.Tooltip" connectId
="bw_limit_label" position
="below" style
="display:none">
235 <?php
echo __("Does not display images in articles, reduces automatic refreshes."); ?
>
238 <?php
if (SESSION_COOKIE_LIFETIME
> 0) { ?
>
241 <label
> 
;</label
>
242 <input dojoType
="dijit.form.CheckBox" name
="remember_me" id
="remember_me" type
="checkbox">
243 <label style
='display : inline' for="remember_me"><?php
echo __("Remember me") ?
></label
>
248 <div
class="row" style
='text-align : right'>
249 <button dojoType
="dijit.form.Button" type
="submit"><?php
echo __('Log in') ?
></button
>
250 <?php
if (defined('ENABLE_REGISTRATION') && ENABLE_REGISTRATION
) { ?
>
251 <button onclick
="return gotoRegForm()" dojoType
="dijit.form.Button">
252 <?php
echo __("Create new account") ?
></button
>
262 <a href
="http://tt-rss.org/">Tiny Tiny RSS
</a
>
263 ©
; 2005&ndash
;<?php
echo date('Y') ?
> <a href
="http://fakecake.org/">Andrew Dolgov
</a
>