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/default.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">
10 foreach (array("lib/prototype.js",
12 "lib/dojo/tt-rss-layer.js",
14 "errors.php?mode=js") as $jsfile) {
16 echo javascript_tag($jsfile);
20 <script type
="text/javascript">
22 Event
.observe(window
, 'load', function() {
26 <style type
="text/css">
43 display
: inline
-block
;
49 border
: 0px solid
#0088cc;
50 border
-bottom
-width
: 1px
;
58 border
: 0px solid
#0088cc;
59 border
-top
-width
: 1px
;
68 display
: inline
-block
;
73 text
-decoration
: none
;
79 text
-decoration
: underline
;
91 padding
: 0px
0px
5px
0px
;
97 padding
: 0px
0px
5px
0px
;
103 <body
class="claro ttrss_main ttrss_login">
105 <script type
="text/javascript">
108 require(['dojo/parser','dijit/form/Button','dijit/form/CheckBox','dijit/form/Form',
109 'dijit/form/Select','dijit/form/TextBox','dijit/form/ValidationTextBox'],function(parser
){
111 //show tooltip node only after this widget is instaniated.
112 dojo
.query('div[dojoType="dijit.Tooltip"]').style({
116 dijit
.byId("bw_limit").attr("checked", getCookie("ttrss_bwlimit") == 'true');
117 document
.forms
.loginForm
.login
.focus();
122 function fetchProfiles() {
124 var query
= "op=getProfiles&login=" +
param_escape(document
.forms
["loginForm"].login
.value
);
127 new Ajax
.Request("public.php", {
129 onComplete
: function(transport
) {
130 if (transport
.responseText
.match("select")) {
131 $
('profile_box').innerHTML
= transport
.responseText
;
132 //dojo.parser.parse('profile_box');
138 exception_error("fetchProfiles", e
);
143 function gotoRegForm() {
144 window
.location
.href
= "register.php";
148 function bwLimitChange(elem
) {
150 var limit_set
= elem
.checked
;
152 setCookie("ttrss_bwlimit", limit_set
,
153 <?php
print SESSION_COOKIE_LIFETIME ?
>);
156 exception_error("bwLimitChange", e
);
161 <?php
$return = urlencode($_SERVER["REQUEST_URI"]) ?
>
163 <form action
="public.php?return=<?php echo $return ?>"
164 dojoType
="dijit.form.Form" method
="POST" id
="loginForm" name
="loginForm">
166 <input dojoType
="dijit.form.TextBox" style
="display : none" name
="op" value
="login">
169 <img src
="images/logo_wide.png">
175 <?php
if ($_SESSION["login_error_msg"]) { ?
>
176 <div
class="row-error">
177 <?php
echo $_SESSION["login_error_msg"] ?
>
179 <?php
$_SESSION["login_error_msg"] = ""; ?
>
182 <label
><?php
echo __("Login:") ?
></label
>
183 <input name
="login" class="input input-text" type
="text"
184 onchange
="fetchProfiles()" onfocus
="fetchProfiles()" onblur
="fetchProfiles()"
185 style
="width : 220px"
187 value
="<?php echo $_SESSION["fake_login
"] ?>" />
192 <label
><?php
echo __("Password:") ?
></label
>
193 <input type
="password" name
="password" required
="1"
194 style
="width : 220px" class="input input-text"
195 value
="<?php echo $_SESSION["fake_password
"] ?>"/>
197 <?php
if (strpos(PLUGINS
, "auth_internal") !== FALSE) { ?
>
198 <a
class='forgotpass' href
="public.php?op=forgotpass"><?php
echo __("I forgot my password") ?
></a
>
204 <label
><?php
echo __("Profile:") ?
></label
>
206 <span id
='profile_box'><select disabled
='disabled' dojoType
='dijit.form.Select'
207 style
='width : 220px; margin : 0px'>
208 <option
><?php
echo __("Default profile") ?
></option
></select
></span
>
213 <label
> 
;</label
>
214 <input dojoType
="dijit.form.CheckBox" name
="bw_limit" id
="bw_limit" type
="checkbox"
215 onchange
="bwLimitChange(this)">
216 <label id
="bw_limit_label" style
='display : inline' for="bw_limit"><?php
echo __("Use less traffic") ?
></label
>
219 <div dojoType
="dijit.Tooltip" connectId
="bw_limit_label" position
="below" style
="display:none">
220 <?php
echo __("Does not display images in articles, reduces automatic refreshes."); ?
>
223 <?php
if (SESSION_COOKIE_LIFETIME
> 0) { ?
>
226 <label
> 
;</label
>
227 <input dojoType
="dijit.form.CheckBox" name
="remember_me" id
="remember_me" type
="checkbox">
228 <label style
='display : inline' for="remember_me"><?php
echo __("Remember me") ?
></label
>
233 <div
class="row" style
='text-align : right'>
234 <button dojoType
="dijit.form.Button" type
="submit"><?php
echo __('Log in') ?
></button
>
235 <?php
if (defined('ENABLE_REGISTRATION') && ENABLE_REGISTRATION
) { ?
>
236 <button onclick
="return gotoRegForm()" dojoType
="dijit.form.Button">
237 <?php
echo __("Create new account") ?
></button
>
247 <a href
="http://tt-rss.org/">Tiny Tiny RSS
</a
>
248 ©
; 2005&ndash
;<?php
echo date('Y') ?
> <a href
="http://fakecake.org/">Andrew Dolgov
</a
>