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