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