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
: #88b0f0;
68 border
-width
: 1px
0px
0px
0px
;
70 border
-color
: #88b0f0;
79 display
: inline
-block
;
99 padding
: 0px
0px
5px
0px
;
105 padding
: 0px
0px
5px
0px
;
111 <body id
="ttrssLogin" class="claro">
113 <script type
="text/javascript">
116 require(['dojo/parser','dijit/form/Button','dijit/form/CheckBox','dijit/form/Form',
117 'dijit/form/Select','dijit/form/TextBox','dijit/form/ValidationTextBox'],function(parser
){
119 //show tooltip node only after this widget is instaniated.
120 dojo
.query('div[dojoType="dijit.Tooltip"]').style({
124 dijit
.byId("bw_limit").attr("checked", getCookie("ttrss_bwlimit") == 'true');
125 document
.forms
.loginForm
.login
.focus();
130 function fetchProfiles() {
132 var query
= "op=getProfiles&login=" +
param_escape(document
.forms
["loginForm"].login
.value
);
135 new Ajax
.Request("public.php", {
137 onComplete
: function(transport
) {
138 if (transport
.responseText
.match("select")) {
139 $
('profile_box').innerHTML
= transport
.responseText
;
140 dojo
.parser
.parse('profile_box');
146 exception_error("fetchProfiles", e
);
151 function gotoRegForm() {
152 window
.location
.href
= "register.php";
156 function bwLimitChange(elem
) {
158 var limit_set
= elem
.checked
;
160 setCookie("ttrss_bwlimit", limit_set
,
161 <?php
print SESSION_COOKIE_LIFETIME ?
>);
164 exception_error("bwLimitChange", e
);
169 <?php
$return = urlencode($_SERVER["REQUEST_URI"]) ?
>
171 <form action
="public.php?return=<?php echo $return ?>"
172 dojoType
="dijit.form.Form" method
="POST" id
="loginForm" name
="loginForm">
174 <input dojoType
="dijit.form.TextBox" style
="display : none" name
="op" value
="login">
177 <img src
="images/logo_wide.png">
183 <?php
if ($_SESSION["login_error_msg"]) { ?
>
184 <div
class="row-error">
185 <?php
echo $_SESSION["login_error_msg"] ?
>
187 <?php
$_SESSION["login_error_msg"] = ""; ?
>
190 <label
><?php
echo __("Login:") ?
></label
>
191 <input name
="login" class="input"
192 onchange
="fetchProfiles()" onfocus
="fetchProfiles()" onblur
="fetchProfiles()"
193 style
="width : 220px"
195 value
="<?php echo $_SESSION["fake_login
"] ?>" />
200 <label
><?php
echo __("Password:") ?
></label
>
201 <input type
="password" name
="password" required
="1"
202 style
="width : 220px" class="input"
203 value
="<?php echo $_SESSION["fake_password
"] ?>"/>
205 <?php
if (strpos(PLUGINS
, "auth_internal") !== FALSE) { ?
>
206 <a
class='forgotpass' href
="public.php?op=forgotpass"><?php
echo __("I forgot my password") ?
></a
>
212 <label
><?php
echo __("Profile:") ?
></label
>
214 <span id
='profile_box'><select disabled
='disabled' dojoType
='dijit.form.Select'
215 style
='width : 220px; margin : 0px'>
216 <option
><?php
echo __("Default profile") ?
></option
></select
></span
>
221 <label
> 
;</label
>
222 <input dojoType
="dijit.form.CheckBox" name
="bw_limit" id
="bw_limit" type
="checkbox"
223 onchange
="bwLimitChange(this)">
224 <label id
="bw_limit_label" style
='display : inline' for="bw_limit"><?php
echo __("Use less traffic") ?
></label
>
227 <div dojoType
="dijit.Tooltip" connectId
="bw_limit_label" position
="below" style
="display:none">
228 <?php
echo __("Does not display images in articles, reduces automatic refreshes."); ?
>
231 <?php
if (SESSION_COOKIE_LIFETIME
> 0) { ?
>
234 <label
> 
;</label
>
235 <input dojoType
="dijit.form.CheckBox" name
="remember_me" id
="remember_me" type
="checkbox">
236 <label style
='display : inline' for="remember_me"><?php
echo __("Remember me") ?
></label
>
241 <div
class="row" style
='text-align : right'>
242 <button dojoType
="dijit.form.Button" type
="submit"><?php
echo __('Log in') ?
></button
>
243 <?php
if (defined('ENABLE_REGISTRATION') && ENABLE_REGISTRATION
) { ?
>
244 <button onclick
="return gotoRegForm()" dojoType
="dijit.form.Button">
245 <?php
echo __("Create new account") ?
></button
>
255 <a href
="http://tt-rss.org/">Tiny Tiny RSS
</a
>
256 ©
; 2005&ndash
;<?php
echo date('Y') ?
> <a href
="http://fakecake.org/">Andrew Dolgov
</a
>