]>
Commit | Line | Data |
---|---|---|
ef8be8ea AD |
1 | <?php |
2 | function module_popup_dialog($link) { | |
3 | $id = $_GET["id"]; | |
0b126ac2 | 4 | $param = db_escape_string($_GET["param"]); |
ef8be8ea | 5 | |
ef16ae37 AD |
6 | if ($id == "explainError") { |
7 | ||
cc17c205 | 8 | print "<div id=\"infoBoxTitle\">".__('Notice')."</div>"; |
ef16ae37 AD |
9 | print "<div class=\"infoBoxContents\">"; |
10 | ||
11 | if ($param == 1) { | |
cc17c205 | 12 | print __("Update daemon is enabled in configuration, but daemon |
ef16ae37 AD |
13 | process is not running, which prevents all feeds from updating. Please |
14 | start the daemon process or contact instance owner."); | |
f6854e44 AD |
15 | |
16 | $stamp = (int)read_stampfile("update_daemon.stamp"); | |
17 | ||
18 | print "<p>" . __("Last update:") . " " . date("Y.m.d, G:i", $stamp); | |
19 | ||
ef16ae37 AD |
20 | } |
21 | ||
d9fa39f1 | 22 | if ($param == 2) { |
4d1d0a45 AD |
23 | $msg = check_for_update($link, false); |
24 | ||
25 | if (!$msg) { | |
cc17c205 | 26 | print __("You are running the latest version of Tiny Tiny RSS. The |
4d1d0a45 AD |
27 | fact that you are seeing this dialog is probably a bug."); |
28 | } else { | |
29 | print $msg; | |
30 | } | |
d9fa39f1 AD |
31 | |
32 | } | |
33 | ||
8e00ae9b AD |
34 | if ($param == 3) { |
35 | print __("TT-RSS has detected that update daemon is taking too long to | |
36 | perform a feed update. This could indicate a problem like crash | |
37 | or a hang. Please check the daemon process or contact instance | |
38 | owner."); | |
f6854e44 AD |
39 | |
40 | $stamp = (int)read_stampfile("update_daemon.stamp"); | |
41 | ||
42 | print "<p>" . __("Last update:") . " " . date("Y.m.d, G:i", $stamp); | |
43 | ||
8e00ae9b AD |
44 | } |
45 | ||
ef16ae37 AD |
46 | print "</div>"; |
47 | ||
48 | print "<div align='center'>"; | |
49 | ||
50 | print "<input class=\"button\" | |
51 | type=\"submit\" onclick=\"return closeInfoBox()\" | |
cc17c205 | 52 | value=\"".__('Close this window')."\">"; |
ef16ae37 AD |
53 | |
54 | print "</div>"; | |
55 | ||
5e6f933a | 56 | return; |
ef16ae37 AD |
57 | } |
58 | ||
ef8be8ea AD |
59 | if ($id == "quickAddFeed") { |
60 | ||
ecace165 | 61 | print "<div id=\"infoBoxTitle\">".__('Subscribe to Feed')."</div>"; |
ef8be8ea AD |
62 | print "<div class=\"infoBoxContents\">"; |
63 | ||
e6312f6c | 64 | print "<form id='feed_add_form' onsubmit='return false'>"; |
ef8be8ea AD |
65 | |
66 | print "<input type=\"hidden\" name=\"op\" value=\"pref-feeds\">"; | |
ef8be8ea | 67 | print "<input type=\"hidden\" name=\"subop\" value=\"add\">"; |
442d77f1 | 68 | print "<input type=\"hidden\" name=\"from\" value=\"tt-rss\">"; |
ef8be8ea | 69 | |
ecace165 AD |
70 | print "<div class=\"dlgSec\">".__("Feed")."</div>"; |
71 | print "<div class=\"dlgSecCont\">"; | |
72 | ||
73 | print __("URL:") . " "; | |
74 | ||
75 | print "<input size=\"40\" onblur=\"javascript:enableHotkeys()\" | |
18ab3d7a | 76 | onkeypress=\"return filterCR(event, subscribeToFeed)\" |
ef8be8ea | 77 | onkeyup=\"toggleSubmitNotEmpty(this, 'fadd_submit_btn')\" |
b5015f72 | 78 | onchange=\"toggleSubmitNotEmpty(this, 'fadd_submit_btn')\" |
ef8be8ea | 79 | onfocus=\"javascript:disableHotkeys()\" name=\"feed_url\"></td></tr>"; |
ecace165 AD |
80 | |
81 | print "<br/>"; | |
82 | ||
ef8be8ea | 83 | if (get_pref($link, 'ENABLE_FEED_CATS')) { |
ecace165 | 84 | print __('Place in category:') . " "; |
ef8be8ea | 85 | print_feed_cat_select($link, "cat_id"); |
ef8be8ea AD |
86 | } |
87 | ||
ecace165 AD |
88 | print "</div>"; |
89 | ||
90 | ||
21f4756a AD |
91 | /* print "<tr><td colspan='2'><div class='insensitive'>"; |
92 | ||
93 | print __("Some feeds require authentication. If you subscribe to such | |
94 | feed, you will have to enter your login and password in Feed Editor"); | |
95 | ||
96 | print "</div></td></tr>"; */ | |
97 | ||
b9073cd9 AD |
98 | /* print "<div id='fadd_login_prompt'><br/> |
99 | <a href='javascript:appearBlockElement(\"fadd_login_container\", | |
100 | \"fadd_login_prompt\")'>".__('Click here if this feed requires authentication.')."</a></div>"; */ | |
f27de515 | 101 | |
b9073cd9 | 102 | print "<div id='fadd_login_container' style='display:none'> |
ecace165 AD |
103 | |
104 | <div class=\"dlgSec\">".__("Authentication")."</div> | |
105 | <div class=\"dlgSecCont\">". | |
106 | ||
107 | __('Login:') . " <input name='auth_login' size=\"20\" | |
108 | onfocus=\"javascript:disableHotkeys()\" | |
109 | onfocus=\"javascript:disableHotkeys()\" | |
110 | onkeypress=\"return filterCR(event, subscribeToFeed)\"> ". | |
111 | __('Password:') . "<input type='password' | |
112 | name='auth_pass' size=\"20\" | |
113 | onfocus=\"javascript:disableHotkeys()\" | |
114 | onfocus=\"javascript:disableHotkeys()\" | |
115 | onkeypress=\"return filterCR(event, subscribeToFeed)\"> | |
116 | </div></div>"; | |
117 | ||
118 | ||
119 | print "<div style=\"clear : both\"> | |
120 | <input type=\"checkbox\" id=\"fadd_login_check\" | |
121 | onclick='checkboxToggleElement(this, \"fadd_login_container\")'> | |
122 | <label for=\"fadd_login_check\">". | |
123 | __('This feed requires authentication.')."</div>"; | |
f27de515 | 124 | |
ef8be8ea AD |
125 | print "</form>"; |
126 | ||
ecace165 | 127 | print "<div class=\"dlgButtons\"> |
ef8be8ea AD |
128 | <input class=\"button\" |
129 | id=\"fadd_submit_btn\" disabled=\"true\" | |
18ab3d7a | 130 | type=\"submit\" onclick=\"return subscribeToFeed()\" value=\"".__('Subscribe')."\"> |
ef8be8ea AD |
131 | <input class=\"button\" |
132 | type=\"submit\" onclick=\"return closeInfoBox()\" | |
ecace165 AD |
133 | value=\"".__('Cancel')."\"></div>"; |
134 | ||
5e6f933a | 135 | return; |
ef8be8ea AD |
136 | } |
137 | ||
138 | if ($id == "search") { | |
139 | ||
cc17c205 | 140 | print "<div id=\"infoBoxTitle\">".__('Search')."</div>"; |
ef8be8ea AD |
141 | print "<div class=\"infoBoxContents\">"; |
142 | ||
e6312f6c | 143 | print "<form id='search_form' onsubmit='return false'>"; |
ef8be8ea AD |
144 | |
145 | #$active_feed_id = db_escape_string($_GET["param"]); | |
146 | ||
147 | $params = split(":", db_escape_string($_GET["param"])); | |
148 | ||
149 | $active_feed_id = sprintf("%d", $params[0]); | |
150 | $is_cat = $params[1] == "true"; | |
151 | ||
5bac8c29 AD |
152 | print "<div class=\"dlgSec\">".__('Search')."</div>"; |
153 | ||
154 | print "<div class=\"dlgSecCont\">"; | |
155 | ||
156 | print "<input name=\"query\" size=\"30\" type=\"search\" | |
ef8be8ea | 157 | onkeypress=\"return filterCR(event, search)\" |
b5015f72 | 158 | onchange=\"toggleSubmitNotEmpty(this, 'search_submit_btn')\" |
ef8be8ea | 159 | onkeyup=\"toggleSubmitNotEmpty(this, 'search_submit_btn')\" |
5bac8c29 AD |
160 | value=\"\">"; |
161 | ||
162 | print " " . __('match on:')." "; | |
163 | ||
164 | $search_fields = array( | |
165 | "title" => __("Title"), | |
166 | "content" => __("Content"), | |
167 | "both" => __("Title or content")); | |
168 | ||
169 | print_select_hash("match_on", 3, $search_fields); | |
170 | ||
171 | ||
172 | print "<br/>".__('Limit search to:')." "; | |
ef8be8ea AD |
173 | |
174 | print "<select name=\"search_mode\"> | |
cc17c205 | 175 | <option value=\"all_feeds\">".__('All feeds')."</option>"; |
ef8be8ea AD |
176 | |
177 | $feed_title = getFeedTitle($link, $active_feed_id); | |
178 | ||
179 | if (!$is_cat) { | |
180 | $feed_cat_title = getFeedCatTitle($link, $active_feed_id); | |
181 | } else { | |
182 | $feed_cat_title = getCategoryTitle($link, $active_feed_id); | |
183 | } | |
184 | ||
185 | if ($active_feed_id && !$is_cat) { | |
cc17c205 | 186 | print "<option selected value=\"this_feed\">$feed_title</option>"; |
ef8be8ea | 187 | } else { |
cc17c205 | 188 | print "<option disabled>".__('This feed')."</option>"; |
ef8be8ea AD |
189 | } |
190 | ||
191 | if ($is_cat) { | |
192 | $cat_preselected = "selected"; | |
193 | } | |
194 | ||
195 | if (get_pref($link, 'ENABLE_FEED_CATS') && ($active_feed_id > 0 || $is_cat)) { | |
cc17c205 | 196 | print "<option $cat_preselected value=\"this_cat\">$feed_cat_title</option>"; |
ef8be8ea | 197 | } else { |
c4b0f96c | 198 | //print "<option disabled>".__('This category')."</option>"; |
ef8be8ea AD |
199 | } |
200 | ||
5bac8c29 | 201 | print "</select>"; |
ef8be8ea | 202 | |
5bac8c29 | 203 | print "</div>"; |
ef8be8ea AD |
204 | |
205 | print "</form>"; | |
206 | ||
5bac8c29 | 207 | print "<div class=\"dlgButtons\"> |
ef8be8ea AD |
208 | <input type=\"submit\" |
209 | class=\"button\" onclick=\"javascript:search()\" | |
210 | id=\"search_submit_btn\" disabled=\"true\" | |
cc17c205 | 211 | value=\"".__('Search')."\"> |
ef8be8ea AD |
212 | <input class=\"button\" |
213 | type=\"submit\" onclick=\"javascript:searchCancel()\" | |
cc17c205 | 214 | value=\"".__('Cancel')."\"></div>"; |
ef8be8ea AD |
215 | |
216 | print "</div>"; | |
217 | ||
5e6f933a AD |
218 | return; |
219 | ||
ef8be8ea AD |
220 | } |
221 | ||
222 | if ($id == "quickAddLabel") { | |
ecace165 | 223 | print "<div id=\"infoBoxTitle\">".__('Create Label')."</div>"; |
ef8be8ea AD |
224 | print "<div class=\"infoBoxContents\">"; |
225 | ||
e6312f6c | 226 | print "<form id=\"label_edit_form\" onsubmit='return false'>"; |
ef8be8ea AD |
227 | |
228 | print "<input type=\"hidden\" name=\"op\" value=\"pref-labels\">"; | |
229 | print "<input type=\"hidden\" name=\"subop\" value=\"add\">"; | |
230 | ||
10fa6615 | 231 | print "<div class=\"dlgSec\">".__("Caption")."</div>"; |
ef8be8ea | 232 | |
10fa6615 AD |
233 | print "<div class=\"dlgSecCont\">"; |
234 | ||
8df90057 | 235 | print "<input onkeypress=\"return filterCR(event, addLabel)\" |
b5015f72 AD |
236 | onkeyup=\"toggleSubmitNotEmpty(this, 'infobox_submit')\" |
237 | onchange=\"toggleSubmitNotEmpty(this, 'infobox_submit')\" | |
10fa6615 AD |
238 | name=\"description\" size=\"30\" value=\"$description\">"; |
239 | print "</div>"; | |
ef8be8ea | 240 | |
10fa6615 | 241 | print "<div class=\"dlgSec\">".__("Match SQL")."</div>"; |
ef8be8ea | 242 | |
10fa6615 | 243 | print "<div class=\"dlgSecCont\">"; |
ef8be8ea AD |
244 | |
245 | print "<textarea onkeyup=\"toggleSubmitNotEmpty(this, 'infobox_submit')\" | |
071ec48f AD |
246 | rows=\"6\" name=\"sql_exp\" class=\"labelSQL\" |
247 | cols=\"50\">$sql_exp</textarea>"; | |
248 | ||
249 | print "<br/>"; | |
250 | ||
251 | print_label_dlg_common_examples(); | |
252 | ||
10fa6615 AD |
253 | |
254 | print "</div>"; | |
ef8be8ea AD |
255 | |
256 | print "</form>"; | |
257 | ||
258 | print "<div style=\"display : none\" id=\"label_test_result\"></div>"; | |
259 | ||
10fa6615 | 260 | print "<div class=\"dlgButtons\">"; |
ef8be8ea | 261 | |
b44d8c51 | 262 | print "<div style='float : left'>"; |
6a5efb07 AD |
263 | print "<input type=\"submit\" |
264 | class=\"button\" onclick=\"return displayHelpInfobox(1)\" | |
265 | value=\"".__('Help')."\"> "; | |
b44d8c51 | 266 | print "</div>"; |
6a5efb07 | 267 | |
cc17c205 | 268 | print "<input type=\"submit\" onclick=\"labelTest()\" value=\"".__('Test')."\"> |
ef8be8ea AD |
269 | "; |
270 | ||
271 | print "<input type=\"submit\" | |
272 | id=\"infobox_submit\" | |
273 | disabled=\"true\" | |
274 | class=\"button\" onclick=\"return addLabel()\" | |
cc17c205 | 275 | value=\"".__('Create')."\"> "; |
ef8be8ea AD |
276 | |
277 | print "<input class=\"button\" | |
278 | type=\"submit\" onclick=\"return labelEditCancel()\" | |
cc17c205 | 279 | value=\"".__('Cancel')."\">"; |
5e6f933a AD |
280 | |
281 | return; | |
ef8be8ea AD |
282 | } |
283 | ||
284 | if ($id == "quickAddFilter") { | |
285 | ||
286 | $active_feed_id = db_escape_string($_GET["param"]); | |
287 | ||
ecace165 | 288 | print "<div id=\"infoBoxTitle\">".__('Create Filter')."</div>"; |
ef8be8ea AD |
289 | print "<div class=\"infoBoxContents\">"; |
290 | ||
e6312f6c | 291 | print "<form id=\"filter_add_form\" onsubmit='return false'>"; |
ef8be8ea AD |
292 | |
293 | print "<input type=\"hidden\" name=\"op\" value=\"pref-filters\">"; | |
294 | print "<input type=\"hidden\" name=\"quiet\" value=\"1\">"; | |
295 | print "<input type=\"hidden\" name=\"subop\" value=\"add\">"; | |
296 | ||
297 | // print "<div class=\"notice\"><b>Note:</b> filter will only apply to new articles.</div>"; | |
298 | ||
299 | $result = db_query($link, "SELECT id,description | |
300 | FROM ttrss_filter_types ORDER BY description"); | |
301 | ||
302 | $filter_types = array(); | |
303 | ||
304 | while ($line = db_fetch_assoc($result)) { | |
305 | //array_push($filter_types, $line["description"]); | |
89cb787e | 306 | $filter_types[$line["id"]] = __($line["description"]); |
ef8be8ea AD |
307 | } |
308 | ||
10fa6615 | 309 | /* print "<table width='100%'>"; |
ef8be8ea | 310 | |
cc17c205 | 311 | print "<tr><td>".__('Match:')."</td> |
18ab3d7a | 312 | <td><input onkeypress=\"return filterCR(event, createFilter)\" |
b5015f72 AD |
313 | onkeyup=\"toggleSubmitNotEmpty(this, 'infobox_submit')\" |
314 | onchange=\"toggleSubmitNotEmpty(this, 'infobox_submit')\" | |
8011ac36 AD |
315 | name=\"reg_exp\" class=\"iedit\">"; |
316 | ||
cc17c205 | 317 | print "</td></tr><tr><td>".__('On field:')."</td><td>"; |
8011ac36 AD |
318 | |
319 | print_select_hash("filter_type", 1, $filter_types, "class=\"_iedit\""); | |
ef8be8ea AD |
320 | |
321 | print "</td></tr>"; | |
cc17c205 | 322 | print "<tr><td>".__('Feed:')."</td><td colspan='2'>"; |
ef8be8ea AD |
323 | |
324 | print_feed_select($link, "feed_id", $active_feed_id); | |
325 | ||
326 | print "</td></tr>"; | |
327 | ||
cc17c205 | 328 | print "<tr><td>".__('Action:')."</td>"; |
ef8be8ea | 329 | |
073ca0e6 AD |
330 | print "<td colspan='2'><select name=\"action_id\" |
331 | onchange=\"filterDlgCheckAction(this)\">"; | |
ef8be8ea AD |
332 | |
333 | $result = db_query($link, "SELECT id,description FROM ttrss_filter_actions | |
334 | ORDER BY name"); | |
335 | ||
336 | while ($line = db_fetch_assoc($result)) { | |
89cb787e | 337 | printf("<option value='%d'>%s</option>", $line["id"], __($line["description"])); |
ef8be8ea AD |
338 | } |
339 | ||
340 | print "</select>"; | |
341 | ||
073ca0e6 AD |
342 | print "</td></tr>"; |
343 | ||
cc17c205 | 344 | print "<tr><td>".__('Params:')."</td>"; |
073ca0e6 AD |
345 | |
346 | print "<td><input disabled class='iedit' name='action_param'></td></tr>"; | |
347 | ||
cc17c205 | 348 | print "<tr><td valign='top'>".__('Options:')."</td><td>"; |
3f2ff803 AD |
349 | |
350 | print "<input type=\"checkbox\" name=\"inverse\" id=\"inverse\"> | |
cc17c205 | 351 | <label for=\"inverse\">".__('Inverse match')."</label></td></tr>"; |
3f2ff803 | 352 | |
073ca0e6 | 353 | print "</table>"; |
ef8be8ea | 354 | |
10fa6615 AD |
355 | print "</form>"; */ |
356 | ||
357 | print "<div class=\"dlgSec\">".__("Match")."</div>"; | |
358 | ||
359 | print "<div class=\"dlgSecCont\">"; | |
360 | ||
d0da85c2 | 361 | print "<span id=\"filter_dlg_date_mod_box\" style=\"display : none\">"; |
6e278744 | 362 | print __("Date") . " "; |
d0da85c2 | 363 | print "<select name=\"filter_date_modifier\">"; |
6e278744 AD |
364 | print "<option value=\"before\">".__('before')."</option>"; |
365 | print "<option value=\"after\">".__('after')."</option>"; | |
d0da85c2 AD |
366 | print "</select> </span>"; |
367 | ||
8df90057 | 368 | print "<input onkeypress=\"return filterCR(event, createFilter)\" |
10fa6615 AD |
369 | onkeyup=\"toggleSubmitNotEmpty(this, 'infobox_submit')\" |
370 | onchange=\"toggleSubmitNotEmpty(this, 'infobox_submit')\" | |
371 | name=\"reg_exp\" size=\"30\" value=\"$reg_exp\">"; | |
372 | ||
6e278744 | 373 | print "<span id=\"filter_dlg_date_chk_box\" style=\"display : none\">"; |
d0da85c2 AD |
374 | print " <input class=\"button\" |
375 | type=\"submit\" onclick=\"return filterDlgCheckDate()\" | |
6e278744 | 376 | value=\"".__('Check it')."\">"; |
d0da85c2 AD |
377 | print "</span>"; |
378 | ||
379 | print "<br/> " . __("on field") . " "; | |
380 | print_select_hash("filter_type", 1, $filter_types, | |
381 | 'onchange="filterDlgCheckType(this)"'); | |
10fa6615 AD |
382 | |
383 | print "<br/>"; | |
384 | ||
385 | print __("in") . " "; | |
386 | print_feed_select($link, "feed_id", $active_feed_id); | |
387 | ||
388 | print "</div>"; | |
389 | ||
ecace165 | 390 | print "<div class=\"dlgSec\">".__("Perform Action")."</div>"; |
10fa6615 AD |
391 | |
392 | print "<div class=\"dlgSecCont\">"; | |
393 | ||
394 | print "<select name=\"action_id\" | |
395 | onchange=\"filterDlgCheckAction(this)\">"; | |
396 | ||
397 | $result = db_query($link, "SELECT id,description FROM ttrss_filter_actions | |
398 | ORDER BY name"); | |
399 | ||
400 | while ($line = db_fetch_assoc($result)) { | |
401 | printf("<option value='%d'>%s</option>", $line["id"], __($line["description"])); | |
402 | } | |
403 | ||
404 | print "</select>"; | |
405 | ||
143a4973 AD |
406 | print "<span id=\"filter_dlg_param_box\" style=\"display : none\">"; |
407 | print " " . __("with parameters:") . " "; | |
408 | print "<input size=\"20\" | |
074bf20c | 409 | onkeypress=\"return filterCR(event, createFilter)\" |
143a4973 AD |
410 | name=\"action_param\">"; |
411 | print "</span>"; | |
10fa6615 | 412 | |
143a4973 | 413 | print " "; // tiny layout hack |
10fa6615 AD |
414 | |
415 | print "</div>"; | |
416 | ||
417 | print "<div class=\"dlgSec\">".__("Options")."</div>"; | |
418 | print "<div class=\"dlgSecCont\">"; | |
419 | ||
ecace165 AD |
420 | print "<div style=\"line-height : 100%\">"; |
421 | ||
10fa6615 AD |
422 | print "<input type=\"checkbox\" name=\"enabled\" id=\"enabled\" checked=\"1\"> |
423 | <label for=\"enabled\">".__('Enabled')."</label><br/>"; | |
424 | ||
425 | print "<input type=\"checkbox\" name=\"inverse\" id=\"inverse\"> | |
426 | <label for=\"inverse\">".__('Inverse match')."</label>"; | |
427 | ||
428 | print "</div>"; | |
ecace165 | 429 | print "</div>"; |
10fa6615 | 430 | |
ef8be8ea AD |
431 | print "</form>"; |
432 | ||
10fa6615 | 433 | print "<div class=\"dlgButtons\">"; |
ef8be8ea AD |
434 | |
435 | print "<input type=\"submit\" | |
436 | id=\"infobox_submit\" | |
18ab3d7a | 437 | class=\"button\" onclick=\"return createFilter()\" |
cc17c205 | 438 | disabled=\"true\" value=\"".__('Create')."\"> "; |
ef8be8ea AD |
439 | |
440 | print "<input class=\"button\" | |
441 | type=\"submit\" onclick=\"return closeInfoBox()\" | |
cc17c205 | 442 | value=\"".__('Cancel')."\">"; |
ef8be8ea AD |
443 | |
444 | print "</div>"; | |
445 | ||
446 | // print "</td></tr></table>"; | |
447 | ||
5e6f933a | 448 | return; |
ef8be8ea AD |
449 | } |
450 | ||
a3656a41 AD |
451 | if ($id == "feedUpdateErrors") { |
452 | ||
cc17c205 | 453 | print "<div id=\"infoBoxTitle\">".__('Update Errors')."</div>"; |
a3656a41 AD |
454 | print "<div class=\"infoBoxContents\">"; |
455 | ||
cc17c205 | 456 | print __("These feeds have not been updated because of errors:"); |
a3656a41 AD |
457 | |
458 | $result = db_query($link, "SELECT id,title,feed_url,last_error | |
459 | FROM ttrss_feeds WHERE last_error != '' AND owner_uid = ".$_SESSION["uid"]); | |
460 | ||
e8dd519b | 461 | print "<ul class='feedErrorsList'>"; |
a3656a41 AD |
462 | |
463 | while ($line = db_fetch_assoc($result)) { | |
464 | print "<li><b>" . $line["title"] . "</b> (" . $line["feed_url"] . "): " . | |
465 | "<em>" . $line["last_error"] . "</em>"; | |
466 | } | |
467 | ||
468 | print "</ul>"; | |
a3656a41 AD |
469 | |
470 | print "<div align='center'>"; | |
471 | ||
472 | print "<input class=\"button\" | |
473 | type=\"submit\" onclick=\"return closeInfoBox()\" | |
cc17c205 | 474 | value=\"".__('Close')."\">"; |
a3656a41 AD |
475 | |
476 | print "</div>"; | |
477 | ||
aa330b93 | 478 | return; |
a3656a41 AD |
479 | } |
480 | ||
0b126ac2 AD |
481 | if ($id == "editArticleTags") { |
482 | ||
cc17c205 | 483 | print "<div id=\"infoBoxTitle\">".__('Edit Tags')."</div>"; |
0b126ac2 AD |
484 | print "<div class=\"infoBoxContents\">"; |
485 | ||
e6312f6c | 486 | print "<form id=\"tag_edit_form\" onsubmit='return false'>"; |
0b126ac2 | 487 | |
cc17c205 | 488 | print __("Tags for this article (separated by commas):")."<br>"; |
0b126ac2 AD |
489 | |
490 | $tags = get_article_tags($link, $param); | |
491 | ||
492 | $tags_str = join(", ", $tags); | |
493 | ||
d62a3b63 AD |
494 | print "<table width='100%'>"; |
495 | ||
496 | print "<tr><td colspan='2'><input type=\"hidden\" name=\"id\" value=\"$param\"></td></tr>"; | |
497 | ||
05fcdf52 AD |
498 | print "<tr><td colspan='2'><textarea rows='4' class='iedit' id='tags_str' |
499 | name='tags_str'>$tags_str</textarea> | |
500 | <div class=\"autocomplete\" id=\"tags_choices\" | |
501 | style=\"display:none\"></div> | |
502 | </td></tr>"; | |
d62a3b63 | 503 | |
05fcdf52 | 504 | /* print "<tr><td>".__('Add existing tag:')."</td>"; |
0b126ac2 | 505 | |
d62a3b63 AD |
506 | $result = db_query($link, "SELECT DISTINCT tag_name FROM ttrss_tags |
507 | WHERE owner_uid = '".$_SESSION["uid"]."' ORDER BY tag_name"); | |
508 | ||
509 | $found_tags = array(); | |
510 | ||
511 | array_push($found_tags, ''); | |
512 | ||
513 | while ($line = db_fetch_assoc($result)) { | |
e4609ea9 | 514 | array_push($found_tags, truncate_string($line["tag_name"], 20)); |
d62a3b63 AD |
515 | } |
516 | ||
517 | print "<td align='right'>"; | |
518 | ||
519 | print_select("found_tags", '', $found_tags, "onchange=\"javascript:editTagsInsert()\""); | |
520 | ||
05fcdf52 | 521 | print "</td>"; |
d62a3b63 | 522 | |
05fcdf52 | 523 | print "</tr>"; */ |
d62a3b63 AD |
524 | |
525 | print "</table>"; | |
0b126ac2 AD |
526 | |
527 | print "</form>"; | |
528 | ||
529 | print "<div align='right'>"; | |
530 | ||
531 | print "<input class=\"button\" | |
532 | type=\"submit\" onclick=\"return editTagsSave()\" | |
cc17c205 | 533 | value=\"".__('Save')."\"> "; |
0b126ac2 AD |
534 | |
535 | print "<input class=\"button\" | |
536 | type=\"submit\" onclick=\"return closeInfoBox()\" | |
cc17c205 | 537 | value=\"".__('Cancel')."\">"; |
0b126ac2 AD |
538 | |
539 | ||
540 | print "</div>"; | |
541 | ||
5e6f933a | 542 | return; |
0b126ac2 AD |
543 | } |
544 | ||
0979b696 | 545 | if ($id == "printTagCloud") { |
27258a90 | 546 | print "<div id=\"infoBoxTitle\">".__('Tag cloud')."</div>"; |
0979b696 AD |
547 | print "<div class=\"infoBoxContents\">"; |
548 | ||
dcac082b | 549 | print __("Showing most popular tags ")." (<a |
ef1ac7c7 | 550 | href='javascript:toggleTags(true)'>".__('browse more')."</a>):<br/>"; |
0979b696 AD |
551 | |
552 | print "<div class=\"tagCloudContainer\">"; | |
553 | ||
554 | printTagCloud($link); | |
555 | ||
556 | print "</div>"; | |
557 | ||
558 | print "<div align='center'>"; | |
559 | print "<input class=\"button\" | |
560 | type=\"submit\" onclick=\"return closeInfoBox()\" | |
3076c7b8 | 561 | value=\"".__('Close this window')."\">"; |
0979b696 AD |
562 | print "</div>"; |
563 | ||
564 | print "</div>"; | |
565 | ||
566 | return; | |
567 | } | |
568 | ||
5e6f933a AD |
569 | print "<div id='infoBoxTitle'>Internal Error</div> |
570 | <div id='infoBoxContents'> | |
571 | <p>Unknown dialog <b>$id</b></p> | |
572 | </div></div>"; | |
573 | ||
ef8be8ea AD |
574 | } |
575 | ?> |