]>
Commit | Line | Data |
---|---|---|
01a87dff AD |
1 | <html> |
2 | <head> | |
3 | <title>Tiny Tiny RSS : Login</title> | |
68535211 | 4 | <link rel="stylesheet" type="text/css" href="lib/dijit/themes/claro/claro.css"/> |
01a87dff AD |
5 | <link rel="stylesheet" type="text/css" href="tt-rss.css"> |
6 | <link rel="shortcut icon" type="image/png" href="images/favicon.png"> | |
01a87dff | 7 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
675f198a AD |
8 | <script type="text/javascript" src="lib/dojo/dojo.js"></script> |
9 | <script type="text/javascript" src="lib/dijit/dijit.js"></script> | |
10 | <script type="text/javascript" src="lib/dojo/tt-rss-layer.js"></script> | |
fe7537b5 | 11 | <script type="text/javascript" src="lib/prototype.js"></script> |
c4c74732 | 12 | <script type="text/javascript" src="js/functions.js"></script> |
68535211 | 13 | <script type="text/javascript" charset="utf-8" src="errors.php?mode=js"></script> |
675f198a AD |
14 | <script type="text/javascript"> |
15 | Event.observe(window, 'load', function() { | |
16 | init(); | |
17 | }); | |
18 | </script> | |
19 | <style type="text/css"> | |
20 | body#ttrssLogin { | |
21 | padding : 2em; | |
22 | font-size : 14px; | |
23 | } | |
01a87dff | 24 | |
675f198a AD |
25 | fieldset { |
26 | margin-left : auto; | |
27 | margin-right : auto; | |
28 | display : block; | |
29 | width : 400px; | |
30 | border-width : 0px; | |
31 | } | |
01a87dff | 32 | |
675f198a AD |
33 | label { |
34 | width : 120px; | |
35 | margin-right : 20px; | |
36 | display : inline-block; | |
37 | text-align : right; | |
38 | color : gray; | |
39 | } | |
01a87dff | 40 | |
675f198a AD |
41 | div.header { |
42 | border-width : 0px 0px 1px 0px; | |
43 | border-style : solid; | |
44 | border-color : #88b0f0; | |
45 | margin-bottom : 1em; | |
46 | padding-bottom : 5px; | |
47 | } | |
68535211 | 48 | |
675f198a AD |
49 | div.footer { |
50 | margin-top : 1em; | |
51 | padding-top : 5px; | |
52 | border-width : 1px 0px 0px 0px; | |
53 | border-style : solid; | |
54 | border-color : #88b0f0; | |
55 | text-align : center; | |
56 | color : gray; | |
57 | font-size : 12px; | |
58 | } | |
68535211 | 59 | |
675f198a AD |
60 | div.footer a { |
61 | color : gray; | |
68535211 AD |
62 | } |
63 | ||
675f198a AD |
64 | div.footer a:hover { |
65 | color : #88b0f0; | |
66 | } | |
a598370d | 67 | |
675f198a AD |
68 | div.row { |
69 | padding : 0px 0px 5px 0px; | |
a598370d | 70 | } |
eeee2ccf AD |
71 | |
72 | div.row-error { | |
73 | color : red; | |
74 | text-align : center; | |
75 | padding : 0px 0px 5px 0px; | |
76 | } | |
77 | ||
675f198a AD |
78 | </style> |
79 | </head> | |
a598370d | 80 | |
675f198a AD |
81 | <body id="ttrssLogin" class="claro"> |
82 | ||
83 | <script type="text/javascript"> | |
84 | function init() { | |
85 | dojo.require("dijit.form.Button"); | |
86 | dojo.require("dijit.form.CheckBox"); | |
87 | dojo.require("dijit.form.Form"); | |
88 | dojo.require("dijit.form.Select"); | |
89 | dojo.require("dijit.form.TextBox"); | |
90 | dojo.require("dijit.form.ValidationTextBox"); | |
91 | ||
92 | dojo.parser.parse(); | |
97acbaf1 AD |
93 | |
94 | fetchProfiles(); | |
675f198a AD |
95 | |
96 | dijit.byId("bw_limit").attr("checked", getCookie("ttrss_bwlimit") == 'true'); | |
01a87dff | 97 | } |
0456176a | 98 | |
d9084cf2 AD |
99 | function fetchProfiles() { |
100 | try { | |
97acbaf1 | 101 | var query = "?op=getProfiles&login=" + param_escape(document.forms["loginForm"].login.value); |
7b26a148 | 102 | |
d9084cf2 | 103 | if (query) { |
5334e1ec | 104 | new Ajax.Request("public.php", { |
d9084cf2 | 105 | parameters: query, |
97acbaf1 AD |
106 | onComplete: function(transport) { |
107 | if (transport.responseText.match("select")) { | |
108 | $('profile_box').innerHTML = transport.responseText; | |
675f198a | 109 | dojo.parser.parse('profile_box'); |
97acbaf1 AD |
110 | } |
111 | } }); | |
d9084cf2 AD |
112 | } |
113 | ||
114 | } catch (e) { | |
115 | exception_error("fetchProfiles", e); | |
116 | } | |
117 | } | |
118 | ||
119 | ||
0136468d AD |
120 | function gotoRegForm() { |
121 | window.location.href = "register.php"; | |
122 | return false; | |
123 | } | |
124 | ||
a598370d AD |
125 | function bwLimitChange(elem) { |
126 | try { | |
127 | var limit_set = elem.checked; | |
128 | ||
7b26a148 | 129 | setCookie("ttrss_bwlimit", limit_set, |
a598370d AD |
130 | <?php print SESSION_COOKIE_LIFETIME ?>); |
131 | ||
132 | } catch (e) { | |
133 | exception_error("bwLimitChange", e); | |
134 | } | |
135 | } | |
675f198a | 136 | </script> |
a598370d | 137 | |
675f198a | 138 | <?php $return = urlencode($_SERVER["REQUEST_URI"]) ?> |
ec6b7ada | 139 | |
675f198a AD |
140 | <form action="public.php?return=<?php echo $return ?>" |
141 | dojoType="dijit.form.Form" method="POST" id="loginForm" name="loginForm"> | |
ec6b7ada | 142 | |
675f198a | 143 | <input dojoType="dijit.form.TextBox" style="display : none" name="op" value="login"> |
ec6b7ada | 144 | |
675f198a AD |
145 | <div class='header'> |
146 | <img src="images/logo_wide.png"> | |
147 | </div> | |
a0b9990a | 148 | |
675f198a | 149 | <div class='form'> |
01a87dff | 150 | |
675f198a | 151 | <fieldset> |
eeee2ccf AD |
152 | <?php if ($_SESSION["login_error_msg"]) { ?> |
153 | <div class="row-error"> | |
154 | <?php echo $_SESSION["login_error_msg"] ?> | |
155 | </div> | |
156 | <?php $_SESSION["login_error_msg"] = ""; ?> | |
157 | <?php } ?> | |
675f198a AD |
158 | <div class="row"> |
159 | <label><?php echo __("Login:") ?></label> | |
160 | <input name="login" | |
97acbaf1 | 161 | onchange="fetchProfiles()" onfocus="fetchProfiles()" onblur="fetchProfiles()" |
eeee2ccf | 162 | style="width : 220px" |
675f198a AD |
163 | dojoType="dijit.form.TextBox" required="1" |
164 | value="<?php echo $_SESSION["fake_login"] ?>" /> | |
165 | </div> | |
166 | ||
167 | <div class="row"> | |
168 | <label><?php echo __("Password:") ?></label> | |
169 | <input type="password" name="password" dojoType="dijit.form.TextBox" required="1" | |
eeee2ccf | 170 | style="width : 220px" |
675f198a AD |
171 | value="<?php echo $_SESSION["fake_password"] ?>"/> |
172 | </div> | |
173 | ||
174 | <div class="row"> | |
175 | <label><?php echo __("Language:") ?></label> | |
f8c612d4 | 176 | <?php |
68659d98 | 177 | print_select_hash("language", $_COOKIE["ttrss_lang"], get_translations(), |
eeee2ccf | 178 | "style='width : 220px; margin : 0px' dojoType='dijit.form.Select'"); |
f8c612d4 | 179 | ?> |
675f198a AD |
180 | </div> |
181 | ||
182 | <div class="row"> | |
183 | <label><?php echo __("Profile:") ?></label> | |
d9084cf2 | 184 | |
eeee2ccf AD |
185 | <span id='profile_box'><select disabled='disabled' dojoType='dijit.form.Select' |
186 | style='width : 220px; margin : 0px'> | |
675f198a | 187 | <option><?php echo __("Default profile") ?></option></select></span> |
d9084cf2 | 188 | |
675f198a | 189 | </div> |
4fc1580a | 190 | |
675f198a AD |
191 | <div class="row"> |
192 | <label> </label> | |
193 | <input dojoType="dijit.form.CheckBox" name="bw_limit" id="bw_limit" type="checkbox" | |
194 | onchange="bwLimitChange(this)"> | |
195 | <label style='display : inline' for="bw_limit"><?php echo __("Use less traffic") ?></label> | |
196 | </div> | |
197 | ||
198 | <div class="row" style='text-align : right'> | |
199 | <button dojoType="dijit.form.Button" type="submit"><?php echo __('Log in') ?></button> | |
4f7956b3 | 200 | <?php if (defined('ENABLE_REGISTRATION') && ENABLE_REGISTRATION) { ?> |
675f198a | 201 | <button onclick="return gotoRegForm()" dojoType="dijit.form.Button"> |
2ec990ab | 202 | <?php echo __("Create new account") ?></button> |
4fc1580a | 203 | <?php } ?> |
675f198a | 204 | </div> |
4fc1580a | 205 | |
675f198a | 206 | </fieldset> |
a598370d | 207 | |
a598370d | 208 | |
675f198a | 209 | </div> |
a598370d | 210 | |
675f198a | 211 | <div class='footer'> |
ce72cb95 AD |
212 | <a href="http://tt-rss.org/">Tiny Tiny RSS</a> |
213 | <?php if (!defined('HIDE_VERSION')) { ?> | |
7b26a148 | 214 | v<?php echo VERSION ?> |
ce72cb95 AD |
215 | <?php } ?> |
216 | © 2005–<?php echo date('Y') ?> <a href="http://fakecake.org/">Andrew Dolgov</a> | |
675f198a | 217 | </div> |
01a87dff AD |
218 | |
219 | </form> | |
220 | ||
5a68dec1 | 221 | </body></html> |