]> git.wh0rd.org - tt-rss.git/blame - modules/popup-dialog.php
neon: add disabled controls
[tt-rss.git] / modules / popup-dialog.php
CommitLineData
ef8be8ea
AD
1<?php
2 function module_popup_dialog($link) {
b4e75b2a
AD
3 $id = $_REQUEST["id"];
4 $param = db_escape_string($_REQUEST["param"]);
ef8be8ea 5
b6a6e262
AD
6 if ($id == "importOpml") {
7 print "<div id=\"infoBoxTitle\">".__('OPML Import')."</div>";
8 print "<div class=\"infoBoxContents\">";
9
10 print "<div class=\"prefFeedCatHolder\">";
11
12 $owner_uid = $_SESSION["uid"];
13
14 db_query($link, "BEGIN");
15
16 /* create Imported feeds category just in case */
17
18 $result = db_query($link, "SELECT id FROM
19 ttrss_feed_categories WHERE title = 'Imported feeds' AND
20 owner_uid = '$owner_uid' LIMIT 1");
21
22 if (db_num_rows($result) == 0) {
23 db_query($link, "INSERT INTO ttrss_feed_categories
24 (title,owner_uid)
25 VALUES ('Imported feeds', '$owner_uid')");
26 }
27
28 db_query($link, "COMMIT");
29
30 /* Handle OPML import by DOMXML/DOMDocument */
31
32 if (function_exists('domxml_open_file')) {
33 print "<ul class='nomarks'>";
34 print "<li>".__("Importing using DOMXML.")."</li>";
35 require_once "modules/opml_domxml.php";
36 opml_import_domxml($link, $owner_uid);
37 print "</ul>";
38 } else if (PHP_VERSION >= 5) {
39 print "<ul class='nomarks'>";
40 print "<li>".__("Importing using DOMDocument.")."</li>";
41 require_once "modules/opml_domdoc.php";
42 opml_import_domdoc($link, $owner_uid);
43 print "</ul>";
44 } else {
45 print_error(__("DOMXML extension is not found. It is required for PHP versions below 5."));
46 }
47
48 print "</div>";
49
50 print "<div align='center'>";
51
f94ba975
AD
52 print "<button onclick=\"return opmlImportDone()\">".
53 __('Close this window')."</button>";
b6a6e262
AD
54
55 print "</div>";
56
57 print "<script type=\"text/javascript\">";
c3b7b797 58 print "parent.opmlImportHandler(this)";
b6a6e262
AD
59 print "</script>";
60
61 print "</div></div>";
62
63 return;
64 }
65
d9084cf2
AD
66 if ($id == "editPrefProfiles") {
67
68 print "<div id=\"infoBoxTitle\">".__('Settings Profiles')."</div>";
69 print "<div class=\"infoBoxContents\">";
70
71 print "<div><input id=\"fadd_profile\"
72 onkeypress=\"return filterCR(event, addPrefProfile)\"
73 size=\"40\">
74 <button onclick=\"javascript:addPrefProfile()\">".
75 __('Create profile')."</button></div>";
76
77 print "<p>";
78
79 $result = db_query($link, "SELECT title,id FROM ttrss_settings_profiles
47179c0e 80 WHERE owner_uid = ".$_SESSION["uid"]." ORDER BY title");
d9084cf2
AD
81
82 print __('Select:')."
83 <a href=\"javascript:selectPrefRows('fcat', true)\">".__('All')."</a>,
84 <a href=\"javascript:selectPrefRows('fcat', false)\">".__('None')."</a>";
85
86 print "<div class=\"prefFeedCatHolder\">";
87
88 print "<form id=\"profile_edit_form\" onsubmit=\"return false\">";
89
90 print "<table width=\"100%\" class=\"prefFeedCatList\"
91 cellspacing=\"0\" id=\"prefFeedCatList\">";
92
93 print "<tr class=\"odd\" id=\"FCATR-0\">";
94
95 print "<td width='5%' align='center'><input
96 onclick='toggleSelectPrefRow(this, \"fcat\");'
97 type=\"checkbox\" id=\"FCCHK-0\"></td>";
98
ac9dbf85
AD
99 if (!$_SESSION["profile"]) {
100 $is_active = __("(active)");
101 } else {
102 $is_active = "";
103 }
104
d9084cf2 105 print "<td><span id=\"FCATT-0\">" .
ac9dbf85 106 __("Default profile") . " $is_active</span></td>";
d9084cf2
AD
107
108 print "</tr>";
109
110 $lnum = 1;
111
112 while ($line = db_fetch_assoc($result)) {
113
114 $class = ($lnum % 2) ? "even" : "odd";
115
116 $cat_id = $line["id"];
117 $this_row_id = "id=\"FCATR-$cat_id\"";
118
119 print "<tr class=\"$class\" $this_row_id>";
120
121 $edit_title = htmlspecialchars($line["title"]);
122
123 print "<td width='5%' align='center'><input
124 onclick='toggleSelectPrefRow(this, \"fcat\");'
125 type=\"checkbox\" id=\"FCCHK-$cat_id\"></td>";
126
127 if ($_SESSION["profile"] == $line["id"]) {
128 $is_active = __("(active)");
129 } else {
130 $is_active = "";
131 }
132
133 print "<td><span id=\"FCATT-$cat_id\">" .
134 $edit_title . "</span> $is_active</td>";
135
136 print "</tr>";
137
138 ++$lnum;
139 }
140
141 print "</table>";
142 print "</form>";
143 print "</div>";
144
145 print "<div class='dlgButtons'>
146 <div style='float : left'>
147 <button onclick=\"return removeSelectedPrefProfiles()\">".
148 __('Remove')."</button>
149 <input class=\"button\"
150 type=\"submit\" onclick=\"return activatePrefProfile()\"
151 value=\"".__('Activate')."\">
152 </div>";
153
154 print "<input class=\"button\"
155 type=\"submit\" onclick=\"return closeInfoBox()\"
156 value=\"".__('Close this window')."\">";
157
158 print "</div></div>";
159
160 return;
161 }
162
cf9dc032
AD
163 if ($id == "pubUrl") {
164
165 print "<div id=\"infoBoxTitle\">".__('Published Articles')."</div>";
166 print "<div class=\"infoBoxContents\">";
167
168 $url_path = article_publish_url($link);
169
170 print __("Your Published articles feed URL is:");
171
172 print "<div class=\"tagCloudContainer\">";
173 print "<a id='pub_feed_url' href='$url_path' target='_blank'>$url_path</a>";
174 print "</div>";
175
176 print "<div align='center'>";
177
178 print "<button onclick=\"return pubRegenKey()\">".
179 __('Generate new URL')."</button> ";
180
181 print "<input class=\"button\"
182 type=\"submit\" onclick=\"return closeInfoBox()\"
183 value=\"".__('Close this window')."\">";
184
185 print "</div></div>";
186
187 return;
188 }
189
ef16ae37
AD
190 if ($id == "explainError") {
191
cc17c205 192 print "<div id=\"infoBoxTitle\">".__('Notice')."</div>";
ef16ae37
AD
193 print "<div class=\"infoBoxContents\">";
194
73495fd1
AD
195 print "<div class=\"errorExplained\">";
196
ef16ae37 197 if ($param == 1) {
73495fd1 198 print __("Update daemon is enabled in configuration, but daemon process is not running, which prevents all feeds from updating. Please start the daemon process or contact instance owner.");
f6854e44
AD
199
200 $stamp = (int)read_stampfile("update_daemon.stamp");
201
202 print "<p>" . __("Last update:") . " " . date("Y.m.d, G:i", $stamp);
203
ef16ae37
AD
204 }
205
d9fa39f1 206 if ($param == 2) {
73495fd1 207 $msg = check_for_update($link);
4d1d0a45
AD
208
209 if (!$msg) {
73495fd1 210 print __("You are running the latest version of Tiny Tiny RSS. The fact that you are seeing this dialog is probably a bug.");
4d1d0a45
AD
211 } else {
212 print $msg;
213 }
d9fa39f1
AD
214
215 }
216
8e00ae9b 217 if ($param == 3) {
73495fd1 218 print __("Update daemon is taking too long to perform a feed update. This could indicate a problem like crash or a hang. Please check the daemon process or contact instance owner.");
f6854e44
AD
219
220 $stamp = (int)read_stampfile("update_daemon.stamp");
221
222 print "<p>" . __("Last update:") . " " . date("Y.m.d, G:i", $stamp);
223
8e00ae9b
AD
224 }
225
ef16ae37 226 print "</div>";
73495fd1 227
ef16ae37
AD
228 print "<div align='center'>";
229
73495fd1
AD
230 print "<input class=\"button\"
231 type=\"submit\" onclick=\"return visitOfficialSite()\"
232 value=\"".__('Visit official site')."\"> ";
233
ef16ae37
AD
234 print "<input class=\"button\"
235 type=\"submit\" onclick=\"return closeInfoBox()\"
cc17c205 236 value=\"".__('Close this window')."\">";
ef16ae37 237
73495fd1 238 print "</div></div>";
ef16ae37 239
5e6f933a 240 return;
ef16ae37
AD
241 }
242
ef8be8ea
AD
243 if ($id == "quickAddFeed") {
244
ecace165 245 print "<div id=\"infoBoxTitle\">".__('Subscribe to Feed')."</div>";
ef8be8ea
AD
246 print "<div class=\"infoBoxContents\">";
247
e6312f6c 248 print "<form id='feed_add_form' onsubmit='return false'>";
ef8be8ea 249
a5819bb3
AD
250 print "<input type=\"hidden\" name=\"op\" value=\"rpc\">";
251 print "<input type=\"hidden\" name=\"subop\" value=\"addfeed\">";
252 //print "<input type=\"hidden\" name=\"from\" value=\"tt-rss\">";
ef8be8ea 253
ecace165
AD
254 print "<div class=\"dlgSec\">".__("Feed")."</div>";
255 print "<div class=\"dlgSecCont\">";
256
257 print __("URL:") . " ";
258
f88c7814 259 print "<input size=\"40\"
18ab3d7a 260 onkeypress=\"return filterCR(event, subscribeToFeed)\"
a5819bb3 261 name=\"feed\" id=\"feed_url\"></td></tr>";
ecace165
AD
262
263 print "<br/>";
264
ef8be8ea 265 if (get_pref($link, 'ENABLE_FEED_CATS')) {
ecace165 266 print __('Place in category:') . " ";
a5819bb3 267 print_feed_cat_select($link, "cat");
ef8be8ea
AD
268 }
269
ecace165
AD
270 print "</div>";
271
b9073cd9 272 print "<div id='fadd_login_container' style='display:none'>
ecace165
AD
273
274 <div class=\"dlgSec\">".__("Authentication")."</div>
275 <div class=\"dlgSecCont\">".
276
a5819bb3 277 __('Login:') . " <input name='login' size=\"20\"
ecace165
AD
278 onkeypress=\"return filterCR(event, subscribeToFeed)\"> ".
279 __('Password:') . "<input type='password'
a5819bb3 280 name='pass' size=\"20\"
ecace165
AD
281 onkeypress=\"return filterCR(event, subscribeToFeed)\">
282 </div></div>";
283
284
285 print "<div style=\"clear : both\">
286 <input type=\"checkbox\" id=\"fadd_login_check\"
287 onclick='checkboxToggleElement(this, \"fadd_login_container\")'>
288 <label for=\"fadd_login_check\">".
289 __('This feed requires authentication.')."</div>";
f27de515 290
ef8be8ea
AD
291 print "</form>";
292
ecace165 293 print "<div class=\"dlgButtons\">
f88c7814
AD
294 <button class=\"button\" id=\"fadd_submit_btn\"
295 onclick=\"return subscribeToFeed()\">".__('Subscribe')."</button>
296 <button onclick=\"return browseFeeds()\">".__('More feeds')."</button>
297 <button onclick=\"return closeInfoBox()\">".__('Cancel')."</button></div>";
ecace165 298
5e6f933a 299 return;
ef8be8ea
AD
300 }
301
ef88b1cc
AD
302 if ($id == "feedBrowser") {
303
304 print "<div id=\"infoBoxTitle\">".__('Feed Browser')."</div>";
305
306 print "<div class=\"infoBoxContents\">";
307
308 $browser_search = db_escape_string($_REQUEST["search"]);
309
310 print "<form onsubmit='return false;' display='inline'
311 name='feed_browser' id='feed_browser'>";
312
313 print "<input type=\"hidden\" name=\"op\" value=\"rpc\">";
314 print "<input type=\"hidden\" name=\"subop\" value=\"updateFeedBrowser\">";
315
316 print "
317 <div style='float : right'>
318 <img style='display : none'
319 id='feed_browser_spinner' src='images/indicator_white.gif'>
320 <input name=\"search\" size=\"20\" type=\"search\"
321 onchange=\"javascript:updateFeedBrowser()\" value=\"$browser_search\">
322 <button onclick=\"javascript:updateFeedBrowser()\">".__('Search')."</button>
323 </div>";
324
325 print " <select name=\"mode\" onchange=\"updateFeedBrowser()\">
326 <option value='1'>" . __('Popular feeds') . "</option>
327 <option value='2'>" . __('Feed archive') . "</option>
328 </select> ";
329
330 print __("limit:");
331
332 print " <select name=\"limit\" onchange='updateFeedBrowser()'>";
333
334 foreach (array(25, 50, 100, 200) as $l) {
335 $issel = ($l == $limit) ? "selected" : "";
336 print "<option $issel>$l</option>";
337 }
338
339 print "</select> ";
340
341 print "<p>";
342
343 $owner_uid = $_SESSION["uid"];
344
d9084cf2
AD
345/* print __('Select:')."
346 <a href=\"javascript:selectPrefRows('fbrowse', true)\">".__('All')."</a>,
347 <a href=\"javascript:selectPrefRows('fbrowse', false)\">".__('None')."</a>"; */
348
ef88b1cc
AD
349 print "<ul class='browseFeedList' id='browseFeedList'>";
350 print_feed_browser($link, $search, 25);
351 print "</ul>";
352
353 print "<div align='center'>
354 <button onclick=\"feedBrowserSubscribe()\">".__('Subscribe')."</button>
d9084cf2 355 <button style='display : none' id='feed_archive_remove' onclick=\"feedArchiveRemove()\">".__('Remove')."</button>
ef88b1cc
AD
356 <button onclick=\"closeInfoBox()\" >".__('Cancel')."</button></div>";
357
358 print "</div>";
359 return;
360 }
361
ef8be8ea
AD
362 if ($id == "search") {
363
cc17c205 364 print "<div id=\"infoBoxTitle\">".__('Search')."</div>";
ef8be8ea
AD
365 print "<div class=\"infoBoxContents\">";
366
e6312f6c 367 print "<form id='search_form' onsubmit='return false'>";
ef8be8ea 368
b4e75b2a 369 #$active_feed_id = db_escape_string($_REQUEST["param"]);
ef8be8ea 370
b4e75b2a 371 $params = split(":", db_escape_string($_REQUEST["param"]));
ef8be8ea
AD
372
373 $active_feed_id = sprintf("%d", $params[0]);
374 $is_cat = $params[1] == "true";
375
de85cac2 376 print "<div class=\"dlgSec\">".__('Look for')."</div>";
5bac8c29
AD
377
378 print "<div class=\"dlgSecCont\">";
379
ad491d75 380 print "<input name=\"query\" size=\"20\" type=\"search\" value=''>";
5bac8c29 381
b1710666 382 print " " . __('match on')." ";
5bac8c29
AD
383
384 $search_fields = array(
385 "title" => __("Title"),
386 "content" => __("Content"),
387 "both" => __("Title or content"));
388
389 print_select_hash("match_on", 3, $search_fields);
390
391
392 print "<br/>".__('Limit search to:')." ";
ef8be8ea
AD
393
394 print "<select name=\"search_mode\">
cc17c205 395 <option value=\"all_feeds\">".__('All feeds')."</option>";
ef8be8ea
AD
396
397 $feed_title = getFeedTitle($link, $active_feed_id);
398
399 if (!$is_cat) {
400 $feed_cat_title = getFeedCatTitle($link, $active_feed_id);
401 } else {
402 $feed_cat_title = getCategoryTitle($link, $active_feed_id);
403 }
404
405 if ($active_feed_id && !$is_cat) {
cc17c205 406 print "<option selected value=\"this_feed\">$feed_title</option>";
ef8be8ea 407 } else {
cc17c205 408 print "<option disabled>".__('This feed')."</option>";
ef8be8ea
AD
409 }
410
411 if ($is_cat) {
412 $cat_preselected = "selected";
413 }
414
415 if (get_pref($link, 'ENABLE_FEED_CATS') && ($active_feed_id > 0 || $is_cat)) {
cc17c205 416 print "<option $cat_preselected value=\"this_cat\">$feed_cat_title</option>";
ef8be8ea 417 } else {
c4b0f96c 418 //print "<option disabled>".__('This category')."</option>";
ef8be8ea
AD
419 }
420
5bac8c29 421 print "</select>";
ef8be8ea 422
5bac8c29 423 print "</div>";
ef8be8ea
AD
424
425 print "</form>";
426
5bac8c29 427 print "<div class=\"dlgButtons\">
d60009cd 428 <button onclick=\"javascript:search()\">".__('Search')."</button>
ad491d75
AD
429 <button onclick=\"javascript:searchCancel()\">".__('Cancel')."</button>
430 </div>";
ef8be8ea
AD
431
432 print "</div>";
433
5e6f933a
AD
434 return;
435
ef8be8ea
AD
436 }
437
ef8be8ea
AD
438 if ($id == "quickAddFilter") {
439
b4e75b2a 440 $active_feed_id = db_escape_string($_REQUEST["param"]);
ef8be8ea 441
ecace165 442 print "<div id=\"infoBoxTitle\">".__('Create Filter')."</div>";
ef8be8ea
AD
443 print "<div class=\"infoBoxContents\">";
444
e6312f6c 445 print "<form id=\"filter_add_form\" onsubmit='return false'>";
ef8be8ea
AD
446
447 print "<input type=\"hidden\" name=\"op\" value=\"pref-filters\">";
448 print "<input type=\"hidden\" name=\"quiet\" value=\"1\">";
449 print "<input type=\"hidden\" name=\"subop\" value=\"add\">";
ef8be8ea
AD
450
451 $result = db_query($link, "SELECT id,description
452 FROM ttrss_filter_types ORDER BY description");
453
454 $filter_types = array();
455
456 while ($line = db_fetch_assoc($result)) {
457 //array_push($filter_types, $line["description"]);
89cb787e 458 $filter_types[$line["id"]] = __($line["description"]);
ef8be8ea
AD
459 }
460
10fa6615
AD
461 print "<div class=\"dlgSec\">".__("Match")."</div>";
462
463 print "<div class=\"dlgSecCont\">";
464
d0da85c2 465 print "<span id=\"filter_dlg_date_mod_box\" style=\"display : none\">";
6e278744 466 print __("Date") . " ";
44d0e774
AD
467
468 $filter_params = array(
469 "before" => __("before"),
470 "after" => __("after"));
471
472 print_select_hash("filter_date_modifier", "before", $filter_params);
473
474 print "&nbsp;</span>";
d0da85c2 475
8df90057 476 print "<input onkeypress=\"return filterCR(event, createFilter)\"
ad491d75 477 name=\"reg_exp\" size=\"30\" value=\"$reg_exp\">";
10fa6615 478
6e278744 479 print "<span id=\"filter_dlg_date_chk_box\" style=\"display : none\">";
d0da85c2
AD
480 print "&nbsp;<input class=\"button\"
481 type=\"submit\" onclick=\"return filterDlgCheckDate()\"
6e278744 482 value=\"".__('Check it')."\">";
d0da85c2
AD
483 print "</span>";
484
485 print "<br/> " . __("on field") . " ";
486 print_select_hash("filter_type", 1, $filter_types,
487 'onchange="filterDlgCheckType(this)"');
10fa6615
AD
488
489 print "<br/>";
490
491 print __("in") . " ";
492 print_feed_select($link, "feed_id", $active_feed_id);
493
494 print "</div>";
495
ecace165 496 print "<div class=\"dlgSec\">".__("Perform Action")."</div>";
10fa6615
AD
497
498 print "<div class=\"dlgSecCont\">";
499
500 print "<select name=\"action_id\"
501 onchange=\"filterDlgCheckAction(this)\">";
502
503 $result = db_query($link, "SELECT id,description FROM ttrss_filter_actions
504 ORDER BY name");
505
506 while ($line = db_fetch_assoc($result)) {
507 printf("<option value='%d'>%s</option>", $line["id"], __($line["description"]));
508 }
509
510 print "</select>";
511
143a4973
AD
512 print "<span id=\"filter_dlg_param_box\" style=\"display : none\">";
513 print " " . __("with parameters:") . " ";
514 print "<input size=\"20\"
074bf20c 515 onkeypress=\"return filterCR(event, createFilter)\"
143a4973 516 name=\"action_param\">";
6427a306
AD
517
518 print_label_select($link, "action_param_label", $action_param);
519
143a4973 520 print "</span>";
10fa6615 521
143a4973 522 print "&nbsp;"; // tiny layout hack
10fa6615
AD
523
524 print "</div>";
525
526 print "<div class=\"dlgSec\">".__("Options")."</div>";
527 print "<div class=\"dlgSecCont\">";
528
ecace165
AD
529 print "<div style=\"line-height : 100%\">";
530
10fa6615
AD
531 print "<input type=\"checkbox\" name=\"enabled\" id=\"enabled\" checked=\"1\">
532 <label for=\"enabled\">".__('Enabled')."</label><br/>";
533
534 print "<input type=\"checkbox\" name=\"inverse\" id=\"inverse\">
535 <label for=\"inverse\">".__('Inverse match')."</label>";
536
537 print "</div>";
ecace165 538 print "</div>";
10fa6615 539
ef8be8ea
AD
540 print "</form>";
541
10fa6615 542 print "<div class=\"dlgButtons\">";
ef8be8ea 543
ad491d75
AD
544 print "<button onclick=\"return createFilter()\">".
545 __('Create')."</button> ";
ef8be8ea 546
ad491d75
AD
547 print "<button onclick=\"return closeInfoBox()\">".__('Cancel').
548 "</button>";
ef8be8ea
AD
549
550 print "</div>";
551
552// print "</td></tr></table>";
553
5e6f933a 554 return;
ef8be8ea
AD
555 }
556
a3656a41
AD
557 if ($id == "feedUpdateErrors") {
558
cc17c205 559 print "<div id=\"infoBoxTitle\">".__('Update Errors')."</div>";
a3656a41
AD
560 print "<div class=\"infoBoxContents\">";
561
cc17c205 562 print __("These feeds have not been updated because of errors:");
a3656a41
AD
563
564 $result = db_query($link, "SELECT id,title,feed_url,last_error
565 FROM ttrss_feeds WHERE last_error != '' AND owner_uid = ".$_SESSION["uid"]);
566
e8dd519b 567 print "<ul class='feedErrorsList'>";
a3656a41
AD
568
569 while ($line = db_fetch_assoc($result)) {
570 print "<li><b>" . $line["title"] . "</b> (" . $line["feed_url"] . "): " .
571 "<em>" . $line["last_error"] . "</em>";
572 }
573
574 print "</ul>";
a3656a41
AD
575
576 print "<div align='center'>";
577
578 print "<input class=\"button\"
579 type=\"submit\" onclick=\"return closeInfoBox()\"
cc17c205 580 value=\"".__('Close')."\">";
a3656a41
AD
581
582 print "</div>";
583
aa330b93 584 return;
a3656a41
AD
585 }
586
0b126ac2
AD
587 if ($id == "editArticleTags") {
588
cc17c205 589 print "<div id=\"infoBoxTitle\">".__('Edit Tags')."</div>";
0b126ac2
AD
590 print "<div class=\"infoBoxContents\">";
591
e6312f6c 592 print "<form id=\"tag_edit_form\" onsubmit='return false'>";
0b126ac2 593
cc17c205 594 print __("Tags for this article (separated by commas):")."<br>";
0b126ac2
AD
595
596 $tags = get_article_tags($link, $param);
597
598 $tags_str = join(", ", $tags);
599
d62a3b63
AD
600 print "<table width='100%'>";
601
602 print "<tr><td colspan='2'><input type=\"hidden\" name=\"id\" value=\"$param\"></td></tr>";
603
05fcdf52
AD
604 print "<tr><td colspan='2'><textarea rows='4' class='iedit' id='tags_str'
605 name='tags_str'>$tags_str</textarea>
606 <div class=\"autocomplete\" id=\"tags_choices\"
607 style=\"display:none\"></div>
608 </td></tr>";
d62a3b63 609
d62a3b63 610 print "</table>";
0b126ac2
AD
611
612 print "</form>";
613
614 print "<div align='right'>";
615
2ae69126
AD
616 print "<button onclick=\"return editTagsSave()\">".__('Save')."</button> ";
617 print "<button onclick=\"return closeInfoBox()\">".__('Cancel')."</button>";
0b126ac2
AD
618
619 print "</div>";
620
5e6f933a 621 return;
0b126ac2
AD
622 }
623
0979b696 624 if ($id == "printTagCloud") {
d60009cd 625 print "<div id=\"infoBoxTitle\">".__('Tag Cloud')."</div>";
0979b696
AD
626 print "<div class=\"infoBoxContents\">";
627
dcac082b 628 print __("Showing most popular tags ")." (<a
326469fc 629 href='javascript:toggleTags(true)'>".__('more tags')."</a>):<br/>";
0979b696
AD
630
631 print "<div class=\"tagCloudContainer\">";
632
633 printTagCloud($link);
634
635 print "</div>";
636
637 print "<div align='center'>";
d60009cd
AD
638 print "<button onclick=\"return closeInfoBox()\">".
639 __('Close this window')."</button>";
0979b696
AD
640 print "</div>";
641
642 print "</div>";
643
644 return;
645 }
646
51f6f917 647/* if ($id == "offlineDownload") {
87b16a0a
AD
648 print "<div id=\"infoBoxTitle\">".__('Download articles')."</div>";
649 print "<div class=\"infoBoxContents\">";
650
651 print "<form name='download_ops_form' id='download_ops_form'>";
652
653 print "<div class=\"dlgSec\">".__("Download")."</div>";
654
655 print "<div class=\"dlgSecCont\">";
656
657 $amount = array(
658 50 => 50,
659 100 => 100,
fe8f2f0c
AD
660 250 => 250,
661 500 => 500);
87b16a0a
AD
662
663 print_select_hash("amount", 50, $amount);
664
6a2034f9 665 print " " . __("latest articles for offline reading.");
87b16a0a 666
6a1cd591
AD
667 print "<br/>";
668
669 print "<input checked='yes' type='checkbox' name='unread_only' id='unread_only'>";
670 print "<label for='unread_only'>".__('Only include unread articles')."</label>";
671
87b16a0a
AD
672 print "</div>";
673
674 print "</form>";
675
676 print "<div class=\"dlgButtons\">
6a2034f9
AD
677 <input class=\"button\"
678 type=\"submit\" onclick=\"return initiate_offline_download(0, this)\" value=\"".__('Download')."\">
87b16a0a
AD
679 <input class=\"button\"
680 type=\"submit\" onclick=\"return closeInfoBox()\"
681 value=\"".__('Cancel')."\"></div>";
682
683 print "</div>";
684
685 return;
51f6f917 686 } */
87b16a0a
AD
687
688
5e6f933a
AD
689 print "<div id='infoBoxTitle'>Internal Error</div>
690 <div id='infoBoxContents'>
691 <p>Unknown dialog <b>$id</b></p>
692 </div></div>";
693
ef8be8ea
AD
694 }
695?>