]>
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 | ||
cc17c205 | 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\">"; | |
365f95dc | 67 | /* print "<input type=\"hidden\" name=\"quiet\" value=\"1\">"; */ |
ef8be8ea | 68 | print "<input type=\"hidden\" name=\"subop\" value=\"add\">"; |
442d77f1 | 69 | print "<input type=\"hidden\" name=\"from\" value=\"tt-rss\">"; |
ef8be8ea AD |
70 | |
71 | print "<table width='100%'> | |
766d42ae | 72 | <tr><td width='20%'>".__('Feed URL:')."</td><td> |
ef8be8ea | 73 | <input class=\"iedit\" onblur=\"javascript:enableHotkeys()\" |
18ab3d7a | 74 | onkeypress=\"return filterCR(event, subscribeToFeed)\" |
ef8be8ea | 75 | onkeyup=\"toggleSubmitNotEmpty(this, 'fadd_submit_btn')\" |
b5015f72 | 76 | onchange=\"toggleSubmitNotEmpty(this, 'fadd_submit_btn')\" |
ef8be8ea AD |
77 | onfocus=\"javascript:disableHotkeys()\" name=\"feed_url\"></td></tr>"; |
78 | ||
79 | if (get_pref($link, 'ENABLE_FEED_CATS')) { | |
cc17c205 | 80 | print "<tr><td>".__('Category:')."</td><td>"; |
ef8be8ea AD |
81 | print_feed_cat_select($link, "cat_id"); |
82 | print "</td></tr>"; | |
83 | } | |
84 | ||
21f4756a AD |
85 | /* print "<tr><td colspan='2'><div class='insensitive'>"; |
86 | ||
87 | print __("Some feeds require authentication. If you subscribe to such | |
88 | feed, you will have to enter your login and password in Feed Editor"); | |
89 | ||
90 | print "</div></td></tr>"; */ | |
91 | ||
ef8be8ea | 92 | print "</table>"; |
f27de515 | 93 | |
b9073cd9 AD |
94 | /* print "<div id='fadd_login_prompt'><br/> |
95 | <a href='javascript:appearBlockElement(\"fadd_login_container\", | |
96 | \"fadd_login_prompt\")'>".__('Click here if this feed requires authentication.')."</a></div>"; */ | |
f27de515 | 97 | |
b9073cd9 | 98 | print "<div id='fadd_login_container' style='display:none'> |
f27de515 | 99 | <table width='100%'> |
18ab3d7a | 100 | <tr><td width='20%'>".__('Login:')."</td><td><input name='auth_login' class='iedit' onfocus=\"javascript:disableHotkeys()\" onfocus=\"javascript:disableHotkeys()\" onkeypress=\"return filterCR(event, subscribeToFeed)\"></td></tr> |
89cb787e | 101 | <tr><td>".__('Password:')."</td><td><input type='password' |
18ab3d7a | 102 | name='auth_pass' class='iedit' onfocus=\"javascript:disableHotkeys()\" onfocus=\"javascript:disableHotkeys()\" onkeypress=\"return filterCR(event, subscribeToFeed)\"></td></tr> |
f27de515 AD |
103 | </table> |
104 | </div>"; | |
105 | ||
ef8be8ea AD |
106 | print "</form>"; |
107 | ||
b9073cd9 | 108 | print "<div style='float : right'> |
ef8be8ea AD |
109 | <input class=\"button\" |
110 | id=\"fadd_submit_btn\" disabled=\"true\" | |
18ab3d7a | 111 | type=\"submit\" onclick=\"return subscribeToFeed()\" value=\"".__('Subscribe')."\"> |
ef8be8ea AD |
112 | <input class=\"button\" |
113 | type=\"submit\" onclick=\"return closeInfoBox()\" | |
b9073cd9 AD |
114 | value=\"".__('Cancel')."\"></div> |
115 | ||
116 | <div> | |
117 | <input type=\"checkbox\" id=\"fadd_login_check\" | |
118 | onclick='checkboxToggleElement(this, \"fadd_login_container\")'> | |
119 | <label for=\"fadd_login_check\">". | |
120 | __('This feed requires authentication.')."</div>"; | |
5e6f933a AD |
121 | |
122 | return; | |
ef8be8ea AD |
123 | } |
124 | ||
125 | if ($id == "search") { | |
126 | ||
cc17c205 | 127 | print "<div id=\"infoBoxTitle\">".__('Search')."</div>"; |
ef8be8ea AD |
128 | print "<div class=\"infoBoxContents\">"; |
129 | ||
e6312f6c | 130 | print "<form id='search_form' onsubmit='return false'>"; |
ef8be8ea AD |
131 | |
132 | #$active_feed_id = db_escape_string($_GET["param"]); | |
133 | ||
134 | $params = split(":", db_escape_string($_GET["param"])); | |
135 | ||
136 | $active_feed_id = sprintf("%d", $params[0]); | |
137 | $is_cat = $params[1] == "true"; | |
138 | ||
cc17c205 | 139 | print "<table width='100%'><tr><td>".__('Search:')."</td><td>"; |
ef8be8ea | 140 | |
3dc8ee84 | 141 | print "<input name=\"query\" class=\"iedit\" type=\"search\" |
ef8be8ea | 142 | onkeypress=\"return filterCR(event, search)\" |
b5015f72 | 143 | onchange=\"toggleSubmitNotEmpty(this, 'search_submit_btn')\" |
ef8be8ea AD |
144 | onkeyup=\"toggleSubmitNotEmpty(this, 'search_submit_btn')\" |
145 | value=\"\"> | |
146 | </td></tr>"; | |
147 | ||
cc17c205 | 148 | print "<tr><td>".__('Where:')."</td><td>"; |
ef8be8ea AD |
149 | |
150 | print "<select name=\"search_mode\"> | |
cc17c205 | 151 | <option value=\"all_feeds\">".__('All feeds')."</option>"; |
ef8be8ea AD |
152 | |
153 | $feed_title = getFeedTitle($link, $active_feed_id); | |
154 | ||
155 | if (!$is_cat) { | |
156 | $feed_cat_title = getFeedCatTitle($link, $active_feed_id); | |
157 | } else { | |
158 | $feed_cat_title = getCategoryTitle($link, $active_feed_id); | |
159 | } | |
160 | ||
161 | if ($active_feed_id && !$is_cat) { | |
cc17c205 | 162 | print "<option selected value=\"this_feed\">$feed_title</option>"; |
ef8be8ea | 163 | } else { |
cc17c205 | 164 | print "<option disabled>".__('This feed')."</option>"; |
ef8be8ea AD |
165 | } |
166 | ||
167 | if ($is_cat) { | |
168 | $cat_preselected = "selected"; | |
169 | } | |
170 | ||
171 | if (get_pref($link, 'ENABLE_FEED_CATS') && ($active_feed_id > 0 || $is_cat)) { | |
cc17c205 | 172 | print "<option $cat_preselected value=\"this_cat\">$feed_cat_title</option>"; |
ef8be8ea | 173 | } else { |
c4b0f96c | 174 | //print "<option disabled>".__('This category')."</option>"; |
ef8be8ea AD |
175 | } |
176 | ||
177 | print "</select></td></tr>"; | |
178 | ||
cc17c205 | 179 | print "<tr><td>".__('Match on:')."</td><td>"; |
ef8be8ea AD |
180 | |
181 | $search_fields = array( | |
cc17c205 AD |
182 | "title" => __("Title"), |
183 | "content" => __("Content"), | |
184 | "both" => __("Title or content")); | |
ef8be8ea AD |
185 | |
186 | print_select_hash("match_on", 3, $search_fields); | |
187 | ||
188 | print "</td></tr></table>"; | |
189 | ||
190 | print "</form>"; | |
191 | ||
192 | print "<div align=\"right\"> | |
193 | <input type=\"submit\" | |
194 | class=\"button\" onclick=\"javascript:search()\" | |
195 | id=\"search_submit_btn\" disabled=\"true\" | |
cc17c205 | 196 | value=\"".__('Search')."\"> |
ef8be8ea AD |
197 | <input class=\"button\" |
198 | type=\"submit\" onclick=\"javascript:searchCancel()\" | |
cc17c205 | 199 | value=\"".__('Cancel')."\"></div>"; |
ef8be8ea AD |
200 | |
201 | print "</div>"; | |
202 | ||
5e6f933a AD |
203 | return; |
204 | ||
ef8be8ea AD |
205 | } |
206 | ||
207 | if ($id == "quickAddLabel") { | |
cc17c205 | 208 | print "<div id=\"infoBoxTitle\">".__('Create label')."</div>"; |
ef8be8ea AD |
209 | print "<div class=\"infoBoxContents\">"; |
210 | ||
e6312f6c | 211 | print "<form id=\"label_edit_form\" onsubmit='return false'>"; |
ef8be8ea AD |
212 | |
213 | print "<input type=\"hidden\" name=\"op\" value=\"pref-labels\">"; | |
214 | print "<input type=\"hidden\" name=\"subop\" value=\"add\">"; | |
215 | ||
10fa6615 | 216 | print "<div class=\"dlgSec\">".__("Caption")."</div>"; |
ef8be8ea | 217 | |
10fa6615 AD |
218 | print "<div class=\"dlgSecCont\">"; |
219 | ||
220 | print "<input onkeypress=\"return filterCR(event, labelEditSave)\" | |
b5015f72 AD |
221 | onkeyup=\"toggleSubmitNotEmpty(this, 'infobox_submit')\" |
222 | onchange=\"toggleSubmitNotEmpty(this, 'infobox_submit')\" | |
10fa6615 AD |
223 | name=\"description\" size=\"30\" value=\"$description\">"; |
224 | print "</div>"; | |
ef8be8ea | 225 | |
10fa6615 | 226 | print "<div class=\"dlgSec\">".__("Match SQL")."</div>"; |
ef8be8ea | 227 | |
10fa6615 | 228 | print "<div class=\"dlgSecCont\">"; |
ef8be8ea AD |
229 | |
230 | print "<textarea onkeyup=\"toggleSubmitNotEmpty(this, 'infobox_submit')\" | |
10fa6615 AD |
231 | rows=\"6\" name=\"sql_exp\" class=\"labelSQL\" cols=\"50\">$sql_exp</textarea>"; |
232 | ||
233 | print "</div>"; | |
ef8be8ea AD |
234 | |
235 | print "</form>"; | |
236 | ||
237 | print "<div style=\"display : none\" id=\"label_test_result\"></div>"; | |
238 | ||
10fa6615 | 239 | print "<div class=\"dlgButtons\">"; |
ef8be8ea | 240 | |
b44d8c51 | 241 | print "<div style='float : left'>"; |
6a5efb07 AD |
242 | print "<input type=\"submit\" |
243 | class=\"button\" onclick=\"return displayHelpInfobox(1)\" | |
244 | value=\"".__('Help')."\"> "; | |
b44d8c51 | 245 | print "</div>"; |
6a5efb07 | 246 | |
cc17c205 | 247 | print "<input type=\"submit\" onclick=\"labelTest()\" value=\"".__('Test')."\"> |
ef8be8ea AD |
248 | "; |
249 | ||
250 | print "<input type=\"submit\" | |
251 | id=\"infobox_submit\" | |
252 | disabled=\"true\" | |
253 | class=\"button\" onclick=\"return addLabel()\" | |
cc17c205 | 254 | value=\"".__('Create')."\"> "; |
ef8be8ea AD |
255 | |
256 | print "<input class=\"button\" | |
257 | type=\"submit\" onclick=\"return labelEditCancel()\" | |
cc17c205 | 258 | value=\"".__('Cancel')."\">"; |
5e6f933a AD |
259 | |
260 | return; | |
ef8be8ea AD |
261 | } |
262 | ||
263 | if ($id == "quickAddFilter") { | |
264 | ||
265 | $active_feed_id = db_escape_string($_GET["param"]); | |
266 | ||
cc17c205 | 267 | print "<div id=\"infoBoxTitle\">".__('Create filter')."</div>"; |
ef8be8ea AD |
268 | print "<div class=\"infoBoxContents\">"; |
269 | ||
e6312f6c | 270 | print "<form id=\"filter_add_form\" onsubmit='return false'>"; |
ef8be8ea AD |
271 | |
272 | print "<input type=\"hidden\" name=\"op\" value=\"pref-filters\">"; | |
273 | print "<input type=\"hidden\" name=\"quiet\" value=\"1\">"; | |
274 | print "<input type=\"hidden\" name=\"subop\" value=\"add\">"; | |
275 | ||
276 | // print "<div class=\"notice\"><b>Note:</b> filter will only apply to new articles.</div>"; | |
277 | ||
278 | $result = db_query($link, "SELECT id,description | |
279 | FROM ttrss_filter_types ORDER BY description"); | |
280 | ||
281 | $filter_types = array(); | |
282 | ||
283 | while ($line = db_fetch_assoc($result)) { | |
284 | //array_push($filter_types, $line["description"]); | |
89cb787e | 285 | $filter_types[$line["id"]] = __($line["description"]); |
ef8be8ea AD |
286 | } |
287 | ||
10fa6615 | 288 | /* print "<table width='100%'>"; |
ef8be8ea | 289 | |
cc17c205 | 290 | print "<tr><td>".__('Match:')."</td> |
18ab3d7a | 291 | <td><input onkeypress=\"return filterCR(event, createFilter)\" |
b5015f72 AD |
292 | onkeyup=\"toggleSubmitNotEmpty(this, 'infobox_submit')\" |
293 | onchange=\"toggleSubmitNotEmpty(this, 'infobox_submit')\" | |
8011ac36 AD |
294 | name=\"reg_exp\" class=\"iedit\">"; |
295 | ||
cc17c205 | 296 | print "</td></tr><tr><td>".__('On field:')."</td><td>"; |
8011ac36 AD |
297 | |
298 | print_select_hash("filter_type", 1, $filter_types, "class=\"_iedit\""); | |
ef8be8ea AD |
299 | |
300 | print "</td></tr>"; | |
cc17c205 | 301 | print "<tr><td>".__('Feed:')."</td><td colspan='2'>"; |
ef8be8ea AD |
302 | |
303 | print_feed_select($link, "feed_id", $active_feed_id); | |
304 | ||
305 | print "</td></tr>"; | |
306 | ||
cc17c205 | 307 | print "<tr><td>".__('Action:')."</td>"; |
ef8be8ea | 308 | |
073ca0e6 AD |
309 | print "<td colspan='2'><select name=\"action_id\" |
310 | onchange=\"filterDlgCheckAction(this)\">"; | |
ef8be8ea AD |
311 | |
312 | $result = db_query($link, "SELECT id,description FROM ttrss_filter_actions | |
313 | ORDER BY name"); | |
314 | ||
315 | while ($line = db_fetch_assoc($result)) { | |
89cb787e | 316 | printf("<option value='%d'>%s</option>", $line["id"], __($line["description"])); |
ef8be8ea AD |
317 | } |
318 | ||
319 | print "</select>"; | |
320 | ||
073ca0e6 AD |
321 | print "</td></tr>"; |
322 | ||
cc17c205 | 323 | print "<tr><td>".__('Params:')."</td>"; |
073ca0e6 AD |
324 | |
325 | print "<td><input disabled class='iedit' name='action_param'></td></tr>"; | |
326 | ||
cc17c205 | 327 | print "<tr><td valign='top'>".__('Options:')."</td><td>"; |
3f2ff803 AD |
328 | |
329 | print "<input type=\"checkbox\" name=\"inverse\" id=\"inverse\"> | |
cc17c205 | 330 | <label for=\"inverse\">".__('Inverse match')."</label></td></tr>"; |
3f2ff803 | 331 | |
073ca0e6 | 332 | print "</table>"; |
ef8be8ea | 333 | |
10fa6615 AD |
334 | print "</form>"; */ |
335 | ||
336 | print "<div class=\"dlgSec\">".__("Match")."</div>"; | |
337 | ||
338 | print "<div class=\"dlgSecCont\">"; | |
339 | ||
340 | print "<input onkeypress=\"return filterCR(event, filterEditSave)\" | |
341 | onkeyup=\"toggleSubmitNotEmpty(this, 'infobox_submit')\" | |
342 | onchange=\"toggleSubmitNotEmpty(this, 'infobox_submit')\" | |
343 | name=\"reg_exp\" size=\"30\" value=\"$reg_exp\">"; | |
344 | ||
345 | print " " . __("on field") . " "; | |
346 | print_select_hash("filter_type", 1, $filter_types); | |
347 | ||
348 | print "<br/>"; | |
349 | ||
350 | print __("in") . " "; | |
351 | print_feed_select($link, "feed_id", $active_feed_id); | |
352 | ||
353 | print "</div>"; | |
354 | ||
355 | print "<div class=\"dlgSec\">".__("Perform action")."</div>"; | |
356 | ||
357 | print "<div class=\"dlgSecCont\">"; | |
358 | ||
359 | print "<select name=\"action_id\" | |
360 | onchange=\"filterDlgCheckAction(this)\">"; | |
361 | ||
362 | $result = db_query($link, "SELECT id,description FROM ttrss_filter_actions | |
363 | ORDER BY name"); | |
364 | ||
365 | while ($line = db_fetch_assoc($result)) { | |
366 | printf("<option value='%d'>%s</option>", $line["id"], __($line["description"])); | |
367 | } | |
368 | ||
369 | print "</select>"; | |
370 | ||
371 | print " " . __("with params") . " "; | |
372 | ||
373 | print "<input disabled size=\"20\" | |
374 | name=\"action_param\">"; | |
375 | ||
376 | print "</div>"; | |
377 | ||
378 | print "<div class=\"dlgSec\">".__("Options")."</div>"; | |
379 | print "<div class=\"dlgSecCont\">"; | |
380 | ||
381 | print "<input type=\"checkbox\" name=\"enabled\" id=\"enabled\" checked=\"1\"> | |
382 | <label for=\"enabled\">".__('Enabled')."</label><br/>"; | |
383 | ||
384 | print "<input type=\"checkbox\" name=\"inverse\" id=\"inverse\"> | |
385 | <label for=\"inverse\">".__('Inverse match')."</label>"; | |
386 | ||
387 | print "</div>"; | |
388 | ||
ef8be8ea AD |
389 | print "</form>"; |
390 | ||
10fa6615 | 391 | print "<div class=\"dlgButtons\">"; |
ef8be8ea AD |
392 | |
393 | print "<input type=\"submit\" | |
394 | id=\"infobox_submit\" | |
18ab3d7a | 395 | class=\"button\" onclick=\"return createFilter()\" |
cc17c205 | 396 | disabled=\"true\" value=\"".__('Create')."\"> "; |
ef8be8ea AD |
397 | |
398 | print "<input class=\"button\" | |
399 | type=\"submit\" onclick=\"return closeInfoBox()\" | |
cc17c205 | 400 | value=\"".__('Cancel')."\">"; |
ef8be8ea AD |
401 | |
402 | print "</div>"; | |
403 | ||
404 | // print "</td></tr></table>"; | |
405 | ||
5e6f933a | 406 | return; |
ef8be8ea AD |
407 | } |
408 | ||
a3656a41 AD |
409 | if ($id == "feedUpdateErrors") { |
410 | ||
cc17c205 | 411 | print "<div id=\"infoBoxTitle\">".__('Update Errors')."</div>"; |
a3656a41 AD |
412 | print "<div class=\"infoBoxContents\">"; |
413 | ||
cc17c205 | 414 | print __("These feeds have not been updated because of errors:"); |
a3656a41 AD |
415 | |
416 | $result = db_query($link, "SELECT id,title,feed_url,last_error | |
417 | FROM ttrss_feeds WHERE last_error != '' AND owner_uid = ".$_SESSION["uid"]); | |
418 | ||
e8dd519b | 419 | print "<ul class='feedErrorsList'>"; |
a3656a41 AD |
420 | |
421 | while ($line = db_fetch_assoc($result)) { | |
422 | print "<li><b>" . $line["title"] . "</b> (" . $line["feed_url"] . "): " . | |
423 | "<em>" . $line["last_error"] . "</em>"; | |
424 | } | |
425 | ||
426 | print "</ul>"; | |
427 | print "</div>"; | |
428 | ||
429 | print "<div align='center'>"; | |
430 | ||
431 | print "<input class=\"button\" | |
432 | type=\"submit\" onclick=\"return closeInfoBox()\" | |
cc17c205 | 433 | value=\"".__('Close')."\">"; |
a3656a41 AD |
434 | |
435 | print "</div>"; | |
436 | ||
aa330b93 | 437 | return; |
a3656a41 AD |
438 | } |
439 | ||
0b126ac2 AD |
440 | if ($id == "editArticleTags") { |
441 | ||
cc17c205 | 442 | print "<div id=\"infoBoxTitle\">".__('Edit Tags')."</div>"; |
0b126ac2 AD |
443 | print "<div class=\"infoBoxContents\">"; |
444 | ||
e6312f6c | 445 | print "<form id=\"tag_edit_form\" onsubmit='return false'>"; |
0b126ac2 | 446 | |
cc17c205 | 447 | print __("Tags for this article (separated by commas):")."<br>"; |
0b126ac2 AD |
448 | |
449 | $tags = get_article_tags($link, $param); | |
450 | ||
451 | $tags_str = join(", ", $tags); | |
452 | ||
d62a3b63 AD |
453 | print "<table width='100%'>"; |
454 | ||
455 | print "<tr><td colspan='2'><input type=\"hidden\" name=\"id\" value=\"$param\"></td></tr>"; | |
456 | ||
05fcdf52 AD |
457 | print "<tr><td colspan='2'><textarea rows='4' class='iedit' id='tags_str' |
458 | name='tags_str'>$tags_str</textarea> | |
459 | <div class=\"autocomplete\" id=\"tags_choices\" | |
460 | style=\"display:none\"></div> | |
461 | </td></tr>"; | |
d62a3b63 | 462 | |
05fcdf52 | 463 | /* print "<tr><td>".__('Add existing tag:')."</td>"; |
0b126ac2 | 464 | |
d62a3b63 AD |
465 | $result = db_query($link, "SELECT DISTINCT tag_name FROM ttrss_tags |
466 | WHERE owner_uid = '".$_SESSION["uid"]."' ORDER BY tag_name"); | |
467 | ||
468 | $found_tags = array(); | |
469 | ||
470 | array_push($found_tags, ''); | |
471 | ||
472 | while ($line = db_fetch_assoc($result)) { | |
e4609ea9 | 473 | array_push($found_tags, truncate_string($line["tag_name"], 20)); |
d62a3b63 AD |
474 | } |
475 | ||
476 | print "<td align='right'>"; | |
477 | ||
478 | print_select("found_tags", '', $found_tags, "onchange=\"javascript:editTagsInsert()\""); | |
479 | ||
05fcdf52 | 480 | print "</td>"; |
d62a3b63 | 481 | |
05fcdf52 | 482 | print "</tr>"; */ |
d62a3b63 AD |
483 | |
484 | print "</table>"; | |
0b126ac2 AD |
485 | |
486 | print "</form>"; | |
487 | ||
488 | print "<div align='right'>"; | |
489 | ||
490 | print "<input class=\"button\" | |
491 | type=\"submit\" onclick=\"return editTagsSave()\" | |
cc17c205 | 492 | value=\"".__('Save')."\"> "; |
0b126ac2 AD |
493 | |
494 | print "<input class=\"button\" | |
495 | type=\"submit\" onclick=\"return closeInfoBox()\" | |
cc17c205 | 496 | value=\"".__('Cancel')."\">"; |
0b126ac2 AD |
497 | |
498 | ||
499 | print "</div>"; | |
500 | ||
5e6f933a | 501 | return; |
0b126ac2 AD |
502 | } |
503 | ||
0979b696 | 504 | if ($id == "printTagCloud") { |
27258a90 | 505 | print "<div id=\"infoBoxTitle\">".__('Tag cloud')."</div>"; |
0979b696 AD |
506 | print "<div class=\"infoBoxContents\">"; |
507 | ||
dcac082b | 508 | print __("Showing most popular tags ")." (<a |
ef1ac7c7 | 509 | href='javascript:toggleTags(true)'>".__('browse more')."</a>):<br/>"; |
0979b696 AD |
510 | |
511 | print "<div class=\"tagCloudContainer\">"; | |
512 | ||
513 | printTagCloud($link); | |
514 | ||
515 | print "</div>"; | |
516 | ||
517 | print "<div align='center'>"; | |
518 | print "<input class=\"button\" | |
519 | type=\"submit\" onclick=\"return closeInfoBox()\" | |
3076c7b8 | 520 | value=\"".__('Close this window')."\">"; |
0979b696 AD |
521 | print "</div>"; |
522 | ||
523 | print "</div>"; | |
524 | ||
525 | return; | |
526 | } | |
527 | ||
5e6f933a AD |
528 | print "<div id='infoBoxTitle'>Internal Error</div> |
529 | <div id='infoBoxContents'> | |
530 | <p>Unknown dialog <b>$id</b></p> | |
531 | </div></div>"; | |
532 | ||
ef8be8ea AD |
533 | } |
534 | ?> |