3 function batch_edit_cbox($elem, $label = false) {
4 print "<input type=\"checkbox\" title=\"".__("Check to enable field")."\"
5 onchange=\"batchFeedsToggleField(this, '$elem', '$label')\">";
8 function module_pref_feeds($link) {
10 global $update_intervals;
11 global $purge_intervals;
12 global $update_methods;
14 $subop = $_REQUEST["subop"];
15 $quiet = $_REQUEST["quiet"];
16 $mode = $_REQUEST["mode"];
18 if ($subop == "uploadicon") {
19 print "<script type=\"text/javascript\">";
20 print "parent.uploadIconHandler(this);";
25 /* if ($subop == "massSubscribe") {
26 $ids = split(",", db_escape_string($_REQUEST["ids"]));
28 $subscribed = array();
30 foreach ($ids as $id) {
33 $result = db_query($link, "SELECT feed_url,title FROM ttrss_feeds
35 } else if ($mode == 2) {
36 $result = db_query($link, "SELECT * FROM ttrss_archived_feeds
37 WHERE id = '$id' AND owner_uid = " . $_SESSION["uid"]);
38 $orig_id = db_escape_string(db_fetch_result($result, 0, "id"));
39 $site_url = db_escape_string(db_fetch_result($result, 0, "site_url"));
42 $feed_url = db_escape_string(db_fetch_result($result, 0, "feed_url"));
43 $title = db_escape_string(db_fetch_result($result, 0, "title"));
45 $title_orig = db_fetch_result($result, 0, "title");
47 $result = db_query($link, "SELECT id FROM ttrss_feeds WHERE
48 feed_url = '$feed_url' AND owner_uid = " . $_SESSION["uid"]);
50 if (db_num_rows($result) == 0) {
52 $result = db_query($link,
53 "INSERT INTO ttrss_feeds (owner_uid,feed_url,title,cat_id)
54 VALUES ('".$_SESSION["uid"]."', '$feed_url', '$title', NULL)");
55 } else if ($mode == 2) {
56 $result = db_query($link,
57 "INSERT INTO ttrss_feeds (id,owner_uid,feed_url,title,cat_id,site_url)
58 VALUES ('$orig_id','".$_SESSION["uid"]."', '$feed_url', '$title', NULL, '$site_url')");
60 array_push($subscribed, $title_orig);
64 if (count($subscribed) > 0) {
65 $msg = "<b>".__('Subscribed to feeds:')."</b>".
66 "<ul class=\"nomarks\">";
68 foreach ($subscribed as $title) {
69 $msg .= "<li>$title</li>";
73 print format_notice($msg);
79 /* if ($subop == "browse") {
81 print "<div id=\"infoBoxTitle\">".__('Feed Browser')."</div>";
83 print "<div class=\"infoBoxContents\">";
85 $browser_search = db_escape_string($_REQUEST["search"]);
87 //print "<p>".__("Showing top 25 registered feeds, sorted by popularity:")."</p>";
89 print "<form onsubmit='return false;' display='inline' name='feed_browser' id='feed_browser'>";
92 <div style='float : right'>
93 <img style='display : none'
94 id='feed_browser_spinner' src='images/indicator_white.gif'>
95 <input name=\"search\" size=\"20\" type=\"search\"
96 onchange=\"javascript:updateFeedBrowser()\" value=\"$browser_search\">
97 <button onclick=\"javascript:updateFeedBrowser()\">".__('Search')."</button>
100 print " <select name=\"mode\" onchange=\"updateFeedBrowser()\">
101 <option value='1'>" . __('Popular feeds') . "</option>
102 <option value='2'>" . __('Feed archive') . "</option>
107 print " <select name=\"limit\" onchange='updateFeedBrowser()'>";
109 foreach (array(25, 50, 100, 200) as $l) {
110 $issel = ($l == $limit) ? "selected" : "";
111 print "<option $issel>$l</option>";
118 $owner_uid = $_SESSION["uid"];
120 print "<ul class='browseFeedList' id='browseFeedList'>";
121 print_feed_browser($link, $search, 25);
124 print "<div align='center'>
125 <button onclick=\"feedBrowserSubscribe()\">".__('Subscribe')."</button>
126 <button onclick=\"closeInfoBox()\" >".__('Cancel')."</button></div>";
132 if ($subop == "editfeed") {
133 $feed_id = db_escape_string($_REQUEST["id"]);
135 $result = db_query($link,
136 "SELECT * FROM ttrss_feeds WHERE id = '$feed_id' AND
137 owner_uid = " . $_SESSION["uid"]);
139 $title = htmlspecialchars(db_fetch_result($result,
142 $icon_file = ICONS_DIR
. "/$feed_id.ico";
144 if (file_exists($icon_file) && filesize($icon_file) > 0) {
145 $feed_icon = "<img width=\"16\" height=\"16\"
146 src=\"" . ICONS_URL
. "/$feed_id.ico\">";
151 print "<div id=\"infoBoxTitle\">".__('Feed Editor')."</div>";
153 print "<div class=\"infoBoxContents\">";
155 print "<form id=\"edit_feed_form\" onsubmit=\"return false\">";
157 print "<input type=\"hidden\" name=\"id\" value=\"$feed_id\">";
158 print "<input type=\"hidden\" name=\"op\" value=\"pref-feeds\">";
159 print "<input type=\"hidden\" name=\"subop\" value=\"editSave\">";
161 print "<div class=\"dlgSec\">".__("Feed")."</div>";
162 print "<div class=\"dlgSecCont\">";
166 print "<input style=\"font-size : 16px\" size=\"40\" onkeypress=\"return filterCR(event, feedEditSave)\"
167 name=\"title\" value=\"$title\">";
171 $feed_url = db_fetch_result($result, 0, "feed_url");
172 $feed_url = htmlspecialchars(db_fetch_result($result,
177 print __('URL:') . " ";
178 print "<input size=\"40\" onkeypress=\"return filterCR(event, feedEditSave)\"
179 name=\"feed_url\" value=\"$feed_url\">";
183 if (get_pref($link, 'ENABLE_FEED_CATS')) {
185 $cat_id = db_fetch_result($result, 0, "cat_id");
189 print __('Place in category:') . " ";
191 $parent_feed = db_fetch_result($result, 0, "parent_feed");
193 if (sprintf("%d", $parent_feed) > 0) {
194 $disabled = "disabled";
199 print_feed_cat_select($link, "cat_id", $cat_id, $disabled);
206 print __('Link to feed:') . " ";
208 $tmp_result = db_query($link, "SELECT COUNT(id) AS count
209 FROM ttrss_feeds WHERE parent_feed = '$feed_id'");
211 $linked_count = db_fetch_result($tmp_result, 0, "count");
213 $parent_feed = db_fetch_result($result, 0, "parent_feed");
215 if ($linked_count > 0) {
216 $disabled = "disabled";
221 print "<select $disabled name=\"parent_feed\">";
223 print "<option value=\"0\">".__('Not linked')."</option>";
225 if (get_pref($link, 'ENABLE_FEED_CATS')) {
227 $cat_qpart = "AND cat_id = '$cat_id'";
229 $cat_qpart = "AND cat_id IS NULL";
233 $tmp_result = db_query($link, "SELECT id,title FROM ttrss_feeds
234 WHERE id != '$feed_id' AND owner_uid = ".$_SESSION["uid"]." AND
235 (SELECT COUNT(id) FROM ttrss_feeds AS T2 WHERE T2.id = ttrss_feeds.parent_feed) = 0
236 $cat_qpart ORDER BY title");
238 if (db_num_rows($tmp_result) > 0) {
239 print "<option disabled>--------</option>";
242 while ($tmp_line = db_fetch_assoc($tmp_result)) {
243 if ($tmp_line["id"] == $parent_feed) {
244 $is_selected = "selected";
249 $linked_title = truncate_string(htmlspecialchars($tmp_line["title"]), 40);
251 printf("<option $is_selected value='%d'>%s</option>",
252 $tmp_line["id"], $linked_title);
260 print "<div class=\"dlgSec\">".__("Update")."</div>";
261 print "<div class=\"dlgSecCont\">";
263 /* Update Interval */
265 $update_interval = db_fetch_result($result, 0, "update_interval");
267 print_select_hash("update_interval", $update_interval, $update_intervals);
271 if (ALLOW_SELECT_UPDATE_METHOD
) {
272 $update_method = db_fetch_result($result, 0, "update_method");
274 print " " . __('using') . " ";
275 print_select_hash("update_method", $update_method, $update_methods);
278 $purge_interval = db_fetch_result($result, 0, "purge_interval");
280 if (FORCE_ARTICLE_PURGE
== 0) {
286 print __('Article purging:') . " ";
288 print_select_hash("purge_interval", $purge_interval, $purge_intervals);
291 print "<input type='hidden' name='purge_interval' value='$purge_interval'>";
296 print "<div class=\"dlgSec\">".__("Authentication")."</div>";
297 print "<div class=\"dlgSecCont\">";
299 $auth_login = htmlspecialchars(db_fetch_result($result, 0, "auth_login"));
303 print "<tr><td>" . __('Login:') . "</td><td>";
305 print "<input size=\"20\" onkeypress=\"return filterCR(event, feedEditSave)\"
306 name=\"auth_login\" value=\"$auth_login\">";
308 print "</tr><tr><td>" . __("Password:") . "</td><td>";
310 $auth_pass = htmlspecialchars(db_fetch_result($result, 0, "auth_pass"));
312 print "<input size=\"20\" type=\"password\" name=\"auth_pass\"
313 onkeypress=\"return filterCR(event, feedEditSave)\"
314 value=\"$auth_pass\">";
316 print "</td></tr></table>";
319 print "<div class=\"dlgSec\">".__("Options")."</div>";
320 print "<div class=\"dlgSecCont\">";
322 print "<div style=\"line-height : 100%\">";
324 $private = sql_bool_to_bool(db_fetch_result($result, 0, "private"));
327 $checked = "checked";
332 print "<input type=\"checkbox\" name=\"private\" id=\"private\"
333 $checked> <label for=\"private\">".__('Hide from Popular feeds')."</label>";
335 $rtl_content = sql_bool_to_bool(db_fetch_result($result, 0, "rtl_content"));
338 $checked = "checked";
343 print "<br/><input type=\"checkbox\" id=\"rtl_content\" name=\"rtl_content\"
344 $checked> <label for=\"rtl_content\">".__('Right-to-left content')."</label>";
346 $include_in_digest = sql_bool_to_bool(db_fetch_result($result, 0, "include_in_digest"));
348 if ($include_in_digest) {
349 $checked = "checked";
354 print "<br/><input type=\"checkbox\" id=\"include_in_digest\"
355 name=\"include_in_digest\"
356 $checked> <label for=\"include_in_digest\">".__('Include in e-mail digest')."</label>";
359 $always_display_enclosures = sql_bool_to_bool(db_fetch_result($result, 0, "always_display_enclosures"));
361 if ($always_display_enclosures) {
362 $checked = "checked";
367 print "<br/><input type=\"checkbox\" id=\"always_display_enclosures\"
368 name=\"always_display_enclosures\"
369 $checked> <label for=\"always_display_enclosures\">".__('Always display image attachments')."</label>";
372 $cache_images = sql_bool_to_bool(db_fetch_result($result, 0, "cache_images"));
375 $checked = "checked";
380 if (ENABLE_SIMPLEPIE
&& SIMPLEPIE_CACHE_IMAGES
) {
384 $disabled = "disabled";
385 $label_class = "class='insensitive'";
388 print "<br/><input type=\"checkbox\" id=\"cache_images\"
389 name=\"cache_images\" $disabled
390 $checked> <label $label_class for=\"cache_images\">".
391 __('Cache images locally')."</label>";
403 /* print "<div class=\"dlgSec\">".__("Icon")."</div>";
404 print "<div class=\"dlgSecCont\">";
406 print "<iframe name=\"icon_upload_iframe\"
407 style=\"width: 400px; height: 100px; display: none;\"></iframe>";
409 print "<form style='display : block' target=\"icon_upload_iframe\"
410 enctype=\"multipart/form-data\" method=\"POST\"
411 action=\"backend.php\">
412 <input id=\"icon_file\" name=\"icon_file\" type=\"file\">
413 <input type=\"hidden\" name=\"op\" value=\"pref-feeds\">
414 <input type=\"hidden\" name=\"subop\" value=\"uploadicon\">
415 <button onclick=\"return uploadFeedIcon();\"
416 type=\"submit\">".__('Replace')."</button>
421 $title = htmlspecialchars($title, ENT_QUOTES
);
423 print "<div class='dlgButtons'>
424 <div style=\"float : left\">
425 <button onclick='return unsubscribeFeed($feed_id, \"$title\")'>".
426 __('Unsubscribe')."</button>
428 <button onclick=\"return feedEditSave()\">".__('Save')."</button>
429 <button onclick=\"return feedEditCancel()\">".__('Cancel')."</button>
435 if ($subop == "editfeeds") {
437 $feed_ids = db_escape_string($_REQUEST["ids"]);
439 print "<div id=\"infoBoxTitle\">".__('Multiple Feed Editor')."</div>";
441 print "<div class=\"infoBoxContents\">";
443 print "<form id=\"batch_edit_feed_form\" onsubmit=\"return false\">";
445 print "<input type=\"hidden\" name=\"ids\" value=\"$feed_ids\">";
446 print "<input type=\"hidden\" name=\"op\" value=\"pref-feeds\">";
447 print "<input type=\"hidden\" name=\"subop\" value=\"batchEditSave\">";
449 print "<div class=\"dlgSec\">".__("Feed")."</div>";
450 print "<div class=\"dlgSecCont\">";
454 print "<input disabled style=\"font-size : 16px\" size=\"35\" onkeypress=\"return filterCR(event, feedEditSave)\"
455 name=\"title\" value=\"$title\">";
457 batch_edit_cbox("title");
463 print __('URL:') . " ";
464 print "<input disabled size=\"40\" onkeypress=\"return filterCR(event, feedEditSave)\"
465 name=\"feed_url\" value=\"$feed_url\">";
467 batch_edit_cbox("feed_url");
471 if (get_pref($link, 'ENABLE_FEED_CATS')) {
475 print __('Place in category:') . " ";
477 print_feed_cat_select($link, "cat_id", $cat_id, "disabled");
479 batch_edit_cbox("cat_id");
485 print "<div class=\"dlgSec\">".__("Update")."</div>";
486 print "<div class=\"dlgSecCont\">";
488 /* Update Interval */
490 print_select_hash("update_interval", $update_interval, $update_intervals,
493 batch_edit_cbox("update_interval");
497 if (ALLOW_SELECT_UPDATE_METHOD
) {
498 print " " . __('using') . " ";
499 print_select_hash("update_method", $update_method, $update_methods,
501 batch_edit_cbox("update_method");
506 if (FORCE_ARTICLE_PURGE
!= 0) {
510 print __('Article purging:') . " ";
512 print_select_hash("purge_interval", $purge_interval, $purge_intervals,
515 batch_edit_cbox("purge_interval");
519 print "<div class=\"dlgSec\">".__("Authentication")."</div>";
520 print "<div class=\"dlgSecCont\">";
522 print __('Login:') . " ";
523 print "<input disabled size=\"15\" onkeypress=\"return filterCR(event, feedEditSave)\"
524 name=\"auth_login\" value=\"$auth_login\">";
526 batch_edit_cbox("auth_login");
528 print " " . __("Password:") . " ";
530 print "<input disabled size=\"15\" type=\"password\" name=\"auth_pass\"
531 onkeypress=\"return filterCR(event, feedEditSave)\"
532 value=\"$auth_pass\">";
534 batch_edit_cbox("auth_pass");
537 print "<div class=\"dlgSec\">".__("Options")."</div>";
538 print "<div class=\"dlgSecCont\">";
540 print "<div style=\"line-height : 100%\">";
542 print "<input disabled type=\"checkbox\" name=\"private\" id=\"private\"
543 $checked> <label id=\"private_l\" class='insensitive' for=\"private\">".__('Hide from Popular feeds')."</label>";
545 print " "; batch_edit_cbox("private", "private_l");
547 print "<br/><input disabled type=\"checkbox\" id=\"rtl_content\" name=\"rtl_content\"
548 $checked> <label class='insensitive' id=\"rtl_content_l\" for=\"rtl_content\">".__('Right-to-left content')."</label>";
550 print " "; batch_edit_cbox("rtl_content", "rtl_content_l");
552 print "<br/><input disabled type=\"checkbox\" id=\"include_in_digest\"
553 name=\"include_in_digest\"
554 $checked> <label id=\"include_in_digest_l\" class='insensitive' for=\"include_in_digest\">".__('Include in e-mail digest')."</label>";
556 print " "; batch_edit_cbox("include_in_digest", "include_in_digest_l");
558 print "<br/><input disabled type=\"checkbox\" id=\"always_display_enclosures\"
559 name=\"always_display_enclosures\"
560 $checked> <label id=\"always_display_enclosures_l\" class='insensitive' for=\"always_display_enclosures\">".__('Always display image attachments')."</label>";
562 print " "; batch_edit_cbox("always_display_enclosures", "always_display_enclosures_l");
564 print "<br/><input disabled type=\"checkbox\" id=\"cache_images\"
565 name=\"cache_images\"
566 $checked> <label class='insensitive' id=\"cache_images_l\"
567 for=\"cache_images\">".
568 __('Cache images locally')."</label>";
571 if (ENABLE_SIMPLEPIE
&& SIMPLEPIE_CACHE_IMAGES
) {
572 print " "; batch_edit_cbox("cache_images", "cache_images_l");
580 print "<div class='dlgButtons'>
581 <input type=\"submit\" class=\"button\"
582 onclick=\"return feedsEditSave()\" value=\"".__('Save')."\">
583 <input type='submit' class='button'
584 onclick=\"return feedEditCancel()\" value=\"".__('Cancel')."\">
590 if ($subop == "editSave" ||
$subop == "batchEditSave") {
592 $feed_title = db_escape_string(trim($_POST["title"]));
593 $feed_link = db_escape_string(trim($_POST["feed_url"]));
594 $upd_intl = db_escape_string($_POST["update_interval"]);
595 $purge_intl = db_escape_string($_POST["purge_interval"]);
596 $feed_id = db_escape_string($_POST["id"]); /* editSave */
597 $feed_ids = db_escape_string($_POST["ids"]); /* batchEditSave */
598 $cat_id = db_escape_string($_POST["cat_id"]);
599 $auth_login = db_escape_string(trim($_POST["auth_login"]));
600 $auth_pass = db_escape_string(trim($_POST["auth_pass"]));
601 $parent_feed = db_escape_string($_POST["parent_feed"]);
602 $private = checkbox_to_sql_bool(db_escape_string($_POST["private"]));
603 $rtl_content = checkbox_to_sql_bool(db_escape_string($_POST["rtl_content"]));
604 $include_in_digest = checkbox_to_sql_bool(
605 db_escape_string($_POST["include_in_digest"]));
606 $cache_images = checkbox_to_sql_bool(
607 db_escape_string($_POST["cache_images"]));
608 $update_method = (int) db_escape_string($_POST["update_method"]);
610 $always_display_enclosures = checkbox_to_sql_bool(
611 db_escape_string($_POST["always_display_enclosures"]));
613 if (get_pref($link, 'ENABLE_FEED_CATS')) {
614 if ($cat_id && $cat_id != 0) {
615 $category_qpart = "cat_id = '$cat_id',";
616 $category_qpart_nocomma = "cat_id = '$cat_id'";
618 $category_qpart = 'cat_id = NULL,';
619 $category_qpart_nocomma = 'cat_id = NULL';
622 $category_qpart = "";
623 $category_qpart_nocomma = "";
626 if ($parent_feed && $parent_feed != 0) {
627 $parent_qpart = "parent_feed = '$parent_feed'";
629 $parent_qpart = 'parent_feed = NULL';
632 if (ENABLE_SIMPLEPIE
&& SIMPLEPIE_CACHE_IMAGES
) {
633 $cache_images_qpart = "cache_images = $cache_images,";
635 $cache_images_qpart = "";
638 if ($subop == "editSave") {
640 $result = db_query($link, "UPDATE ttrss_feeds SET
641 $category_qpart $parent_qpart,
642 title = '$feed_title', feed_url = '$feed_link',
643 update_interval = '$upd_intl',
644 purge_interval = '$purge_intl',
645 auth_login = '$auth_login',
646 auth_pass = '$auth_pass',
648 rtl_content = $rtl_content,
650 include_in_digest = $include_in_digest,
651 always_display_enclosures = $always_display_enclosures,
652 update_method = '$update_method'
653 WHERE id = '$feed_id' AND owner_uid = " . $_SESSION["uid"]);
655 if (get_pref($link, 'ENABLE_FEED_CATS')) {
656 # update linked feed categories
657 $result = db_query($link, "UPDATE ttrss_feeds SET
658 $category_qpart_nocomma WHERE parent_feed = '$feed_id' AND
659 owner_uid = " . $_SESSION["uid"]);
661 } else if ($subop == "batchEditSave") {
662 $feed_data = array();
664 foreach (array_keys($_POST) as $k) {
665 if ($k != "op" && $k != "subop" && $k != "ids") {
666 $feed_data[$k] = $_POST[$k];
670 db_query($link, "BEGIN");
672 foreach (array_keys($feed_data) as $k) {
678 $qpart = "title = '$feed_title'";
682 $qpart = "feed_url = '$feed_link'";
685 case "update_interval":
686 $qpart = "update_interval = '$upd_intl'";
689 case "purge_interval":
690 $qpart = "purge_interval = '$purge_intl'";
694 $qpart = "auth_login = '$auth_login'";
698 $qpart = "auth_pass = '$auth_pass'";
702 $qpart = "private = '$private'";
705 case "include_in_digest":
706 $qpart = "include_in_digest = '$include_in_digest'";
709 case "always_display_enclosures":
710 $qpart = "always_display_enclosures = '$always_display_enclosures'";
714 $qpart = "cache_images = '$cache_images'";
718 $qpart = "rtl_content = '$rtl_content'";
721 case "update_method":
722 $qpart = "update_method = '$update_method'";
726 $qpart = $category_qpart_nocomma;
733 "UPDATE ttrss_feeds SET $qpart WHERE id IN ($feed_ids)
734 AND owner_uid = " . $_SESSION["uid"]);
739 db_query($link, "COMMIT");
744 if ($subop == "remove") {
746 $ids = split(",", db_escape_string($_REQUEST["ids"]));
748 foreach ($ids as $id) {
749 remove_feed($link, $id, $_SESSION["uid"]);
755 if ($subop == "clear") {
756 $id = db_escape_string($_REQUEST["id"]);
757 clear_feed_articles($link, $id);
760 if ($subop == "rescore") {
761 $ids = split(",", db_escape_string($_REQUEST["ids"]));
763 foreach ($ids as $id) {
765 $filters = load_filters($link, $id, $_SESSION["uid"], 6);
767 $result = db_query($link, "SELECT title, content, link, ref_id FROM
768 ttrss_user_entries, ttrss_entries
769 WHERE ref_id = id AND feed_id = '$id' AND
770 owner_uid = " .$_SESSION['uid']."
775 while ($line = db_fetch_assoc($result)) {
777 $article_filters = get_article_filters($filters, $line['title'],
778 $line['content'], $line['link']);
780 $new_score = calculate_article_score($article_filters);
782 if (!$scores[$new_score]) $scores[$new_score] = array();
784 array_push($scores[$new_score], $line['ref_id']);
787 foreach (array_keys($scores) as $s) {
789 db_query($link, "UPDATE ttrss_user_entries SET score = '$s',
791 ref_id IN (" . join(',', $scores[$s]) . ")");
792 } else if ($s < -500) {
793 db_query($link, "UPDATE ttrss_user_entries SET score = '$s',
795 ref_id IN (" . join(',', $scores[$s]) . ")");
797 db_query($link, "UPDATE ttrss_user_entries SET score = '$s' WHERE
798 ref_id IN (" . join(',', $scores[$s]) . ")");
803 print __("All done.");
807 if ($subop == "rescoreAll") {
809 $result = db_query($link,
810 "SELECT id FROM ttrss_feeds WHERE owner_uid = " . $_SESSION['uid']);
812 while ($feed_line = db_fetch_assoc($result)) {
814 $id = $feed_line["id"];
816 $filters = load_filters($link, $id, $_SESSION["uid"], 6);
818 $tmp_result = db_query($link, "SELECT title, content, link, ref_id FROM
819 ttrss_user_entries, ttrss_entries
820 WHERE ref_id = id AND feed_id = '$id' AND
821 owner_uid = " .$_SESSION['uid']."
826 while ($line = db_fetch_assoc($tmp_result)) {
828 $article_filters = get_article_filters($filters, $line['title'],
829 $line['content'], $line['link']);
831 $new_score = calculate_article_score($article_filters);
833 if (!$scores[$new_score]) $scores[$new_score] = array();
835 array_push($scores[$new_score], $line['ref_id']);
838 foreach (array_keys($scores) as $s) {
840 db_query($link, "UPDATE ttrss_user_entries SET score = '$s',
842 ref_id IN (" . join(',', $scores[$s]) . ")");
844 db_query($link, "UPDATE ttrss_user_entries SET score = '$s' WHERE
845 ref_id IN (" . join(',', $scores[$s]) . ")");
850 print __("All done.");
854 if ($subop == "add") {
856 $feed_url = db_escape_string(trim($_REQUEST["feed_url"]));
857 $cat_id = db_escape_string($_REQUEST["cat_id"]);
858 $p_from = db_escape_string($_REQUEST["from"]);
860 /* only read authentication information from POST */
862 $auth_login = db_escape_string(trim($_POST["auth_login"]));
863 $auth_pass = db_escape_string(trim($_POST["auth_pass"]));
865 if ($p_from != 'tt-rss') {
868 <title>Tiny Tiny RSS</title>
869 <link rel=\"stylesheet\" type=\"text/css\" href=\"utility.css\">
872 <img class=\"floatingLogo\" src=\"images/ttrss_logo.png\"
873 alt=\"Tiny Tiny RSS\"/>
874 <h1>Subscribe to feed...</h1>";
877 $rc = subscribe_to_feed($link, $feed_url, $cat_id, $auth_login, $auth_pass);
881 print_notice(T_sprintf("Subscribed to <b>%s</b>.", $feed_url));
884 print_error(T_sprintf("Could not subscribe to <b>%s</b>.", $feed_url));
887 print_warning(T_sprintf("Already subscribed to <b>%s</b>.", $feed_url));
891 if ($p_from != 'tt-rss') {
892 $tt_uri = ($_SERVER['HTTPS'] != "on" ?
'http://' : 'https://') . $_SERVER['HTTP_HOST'] . preg_replace('/backend\.php.*$/', 'tt-rss.php', $_SERVER["REQUEST_URI"]);
895 $tp_uri = ($_SERVER['HTTPS'] != "on" ?
'http://' : 'https://') . $_SERVER['HTTP_HOST'] . preg_replace('/backend\.php.*$/', 'prefs.php', $_SERVER["REQUEST_URI"]);
897 $result = db_query($link, "SELECT id FROM ttrss_feeds WHERE
898 feed_url = '$feed_url' AND owner_uid = " . $_SESSION["uid"]);
900 $feed_id = db_fetch_result($result, 0, "id");
905 print "<form method=\"GET\" style='display: inline'
907 <input type=\"hidden\" name=\"tab\" value=\"feedConfig\">
908 <input type=\"hidden\" name=\"subop\" value=\"editFeed\">
909 <input type=\"hidden\" name=\"subopparam\" value=\"$feed_id\">
910 <input type=\"submit\" value=\"".__("Edit subscription options")."\">
914 print "<form style='display: inline' method=\"GET\" action=\"$tt_uri\">
915 <input type=\"submit\" value=\"".__("Return to Tiny Tiny RSS")."\">
918 print "</body></html>";
923 if ($subop == "categorize") {
925 if (!WEB_DEMO_MODE
) {
927 $ids = split(",", db_escape_string($_REQUEST["ids"]));
929 $cat_id = db_escape_string($_REQUEST["cat_id"]);
932 $cat_id_qpart = 'NULL';
934 $cat_id_qpart = "'$cat_id'";
937 db_query($link, "BEGIN");
939 foreach ($ids as $id) {
941 db_query($link, "UPDATE ttrss_feeds SET cat_id = $cat_id_qpart
942 WHERE id = '$id' AND parent_feed IS NULL
943 AND owner_uid = " . $_SESSION["uid"]);
945 # update linked feed categories
946 db_query($link, "UPDATE ttrss_feeds SET
947 cat_id = $cat_id_qpart WHERE parent_feed = '$id' AND
948 owner_uid = " . $_SESSION["uid"]);
952 db_query($link, "COMMIT");
957 if ($subop == "editCats") {
959 $action = $_REQUEST["action"];
961 if ($action == "save") {
963 $cat_title = db_escape_string(trim($_REQUEST["value"]));
964 $cat_id = db_escape_string($_REQUEST["cid"]);
966 db_query($link, "BEGIN");
968 $result = db_query($link, "SELECT title FROM ttrss_feed_categories
969 WHERE id = '$cat_id' AND owner_uid = ".$_SESSION["uid"]);
971 if (db_num_rows($result) == 1) {
973 $old_title = db_fetch_result($result, 0, "title");
975 if ($cat_title != "") {
976 $result = db_query($link, "UPDATE ttrss_feed_categories SET
977 title = '$cat_title' WHERE id = '$cat_id' AND
978 owner_uid = ".$_SESSION["uid"]);
985 print $_REQUEST["value"];
988 db_query($link, "COMMIT");
994 print "<div id=\"infoBoxTitle\">".__('Category editor')."</div>";
996 print "<div class=\"infoBoxContents\">";
999 if ($action == "add") {
1001 if (!WEB_DEMO_MODE
) {
1003 $feed_cat = db_escape_string(trim($_REQUEST["cat"]));
1005 $result = db_query($link,
1006 "SELECT id FROM ttrss_feed_categories
1007 WHERE title = '$feed_cat' AND owner_uid = ".$_SESSION["uid"]);
1009 if (db_num_rows($result) == 0) {
1011 $result = db_query($link,
1012 "INSERT INTO ttrss_feed_categories (owner_uid,title)
1013 VALUES ('".$_SESSION["uid"]."', '$feed_cat')");
1017 print_warning(T_sprintf("Category <b>$%s</b> already exists in the database.",
1024 if ($action == "remove") {
1026 $ids = split(",", db_escape_string($_REQUEST["ids"]));
1028 foreach ($ids as $id) {
1029 remove_feed_category($link, $id, $_SESSION["uid"]);
1034 <input id=\"fadd_cat\"
1035 onkeypress=\"return filterCR(event, addFeedCat)\"
1037 <button onclick=\"javascript:addFeedCat()\">".
1038 __('Create category')."</button></div>";
1040 $result = db_query($link, "SELECT title,id FROM ttrss_feed_categories
1041 WHERE owner_uid = ".$_SESSION["uid"]."
1046 if (db_num_rows($result) != 0) {
1048 print __('Select:')."
1049 <a href=\"javascript:selectPrefRows('fcat', true)\">".__('All')."</a>,
1050 <a href=\"javascript:selectPrefRows('fcat', false)\">".__('None')."</a>";
1052 print "<div class=\"prefFeedCatHolder\">";
1054 print "<form id=\"feed_cat_edit_form\" onsubmit=\"return false\">";
1056 print "<table width=\"100%\" class=\"prefFeedCatList\"
1057 cellspacing=\"0\" id=\"prefFeedCatList\">";
1061 while ($line = db_fetch_assoc($result)) {
1063 $class = ($lnum %
2) ?
"even" : "odd";
1065 $cat_id = $line["id"];
1066 $this_row_id = "id=\"FCATR-$cat_id\"";
1068 print "<tr class=\"$class\" $this_row_id>";
1070 $edit_title = htmlspecialchars($line["title"]);
1072 print "<td width='5%' align='center'><input
1073 onclick='toggleSelectPrefRow(this, \"fcat\");'
1074 type=\"checkbox\" id=\"FCCHK-$cat_id\"></td>";
1076 print "<td><span id=\"FCATT-$cat_id\">" .
1077 $edit_title . "</span></td>";
1091 print "<p>".__('No feed categories defined.')."</p>";
1094 print "<div class='dlgButtons'>
1095 <div style='float : left'>
1096 <button onclick=\"return removeSelectedFeedCats()\">".
1097 __('Remove')."</button>
1100 print "<button onclick=\"selectTab('feedConfig')\">".
1101 __('Close this window')."</button></div>";
1111 set_pref($link, "_PREFS_ACTIVE_TAB", "feedConfig");
1113 $result = db_query($link, "SELECT COUNT(id) AS num_errors
1114 FROM ttrss_feeds WHERE last_error != '' AND owner_uid = ".$_SESSION["uid"]);
1116 $num_errors = db_fetch_result($result, 0, "num_errors");
1118 if ($num_errors > 0) {
1120 print format_notice("<a href=\"javascript:showFeedsWithErrors()\">".
1121 __('Some feeds have update errors (click for details)')."</a>");
1124 $feed_search = db_escape_string($_REQUEST["search"]);
1126 if (array_key_exists("search", $_REQUEST)) {
1127 $_SESSION["prefs_feed_search"] = $feed_search;
1129 $feed_search = $_SESSION["prefs_feed_search"];
1132 print "<div style='float : right'>
1133 <input id=\"feed_search\" size=\"20\" type=\"search\"
1134 onfocus=\"javascript:disableHotkeys();\"
1135 onblur=\"javascript:enableHotkeys();\"
1136 onchange=\"javascript:updateFeedList()\" value=\"$feed_search\">
1137 <button onclick=\"javascript:updateFeedList()\">".
1138 __('Search')."</button>
1141 print "<button onclick=\"javascript:displayDlg('quickAddFeed')\">"
1142 .__('Subscribe to feed')."</button> ";
1144 print "<button onclick=\"javascript:editSelectedFeed()\">".
1145 __('Edit feeds')."</button> ";
1147 if (get_pref($link, 'ENABLE_FEED_CATS')) {
1149 print "<button onclick=\"javascript:editFeedCats()\">".
1150 __('Edit categories')."</button> ";
1153 print "<button onclick=\"javascript:removeSelectedFeeds()\">"
1154 .__('Unsubscribe')."</button> ";
1156 /* print "<select id=\"feedActionChooser\" onchange=\"feedActionChange()\">
1157 <option value=\"facDefault\" selected>".__('Other actions...')."</option>";
1159 if (FORCE_ARTICLE_PURGE == 0) {
1161 "<option value=\"facPurge\">".__('Manual purge')."</option>";
1165 <option value=\"facClear\">".__('Clear feed data')."</option>
1166 <option value=\"facRescore\">".__('Rescore articles')."</option>
1167 <option value=\"facUnsubscribe\">".__('Unsubscribe')."</option>";
1169 print "</select>"; */
1171 /* if (ENABLE_FEED_BROWSER && !SINGLE_USER_MODE) {
1172 print " <input type=\"submit\" class=\"button\"
1173 id=\"top25_feeds_btn\"
1174 onclick=\"javascript:browseFeeds()\" value=\"".__('More feeds')."\">";
1177 $feeds_sort = db_escape_string($_REQUEST["sort"]);
1179 if (!$feeds_sort ||
$feeds_sort == "undefined") {
1180 $feeds_sort = $_SESSION["pref_sort_feeds"];
1181 if (!$feeds_sort) $feeds_sort = "title";
1184 $_SESSION["pref_sort_feeds"] = $feeds_sort;
1188 $feed_search = split(" ", $feed_search);
1191 foreach ($feed_search as $token) {
1193 $token = trim($token);
1195 array_push($tokens, "(UPPER(F1.title) LIKE UPPER('%$token%') OR
1196 UPPER(C1.title) LIKE UPPER('%$token%') OR
1197 UPPER(F1.feed_url) LIKE UPPER('%$token%'))");
1200 $search_qpart = "(" . join($tokens, " AND ") . ") AND ";
1206 $show_last_article_info = false;
1207 $show_last_article_checked = "";
1208 $show_last_article_qpart = "";
1210 if ($_REQUEST["slat"] == "true") {
1211 $show_last_article_info = true;
1212 $show_last_article_checked = "checked";
1213 $show_last_article_qpart = ", (SELECT ".SUBSTRING_FOR_DATE
."(MAX(updated),1,16) FROM ttrss_user_entries,
1214 ttrss_entries WHERE ref_id = ttrss_entries.id
1215 AND feed_id = F1.id) AS last_article";
1216 } else if ($feeds_sort == "last_article") {
1217 $feeds_sort = "title";
1220 if (get_pref($link, 'ENABLE_FEED_CATS')) {
1221 $order_by_qpart = "category,$feeds_sort,title";
1223 $order_by_qpart = "$feeds_sort,title";
1226 $result = db_query($link, "SELECT
1230 ".SUBSTRING_FOR_DATE
."(F1.last_updated,1,16) AS last_updated,
1236 F2.title AS parent_title,
1237 C1.title AS category,
1238 F1.include_in_digest
1239 $show_last_article_qpart
1242 LEFT JOIN ttrss_feeds AS F2
1243 ON (F1.parent_feed = F2.id)
1244 LEFT JOIN ttrss_feed_categories AS C1
1245 ON (F1.cat_id = C1.id)
1247 $search_qpart F1.owner_uid = '".$_SESSION["uid"]."'
1248 ORDER by $order_by_qpart");
1250 if (db_num_rows($result) != 0) {
1252 // print "<div id=\"infoBoxShadow\"><div id=\"infoBox\">PLACEHOLDER</div></div>";
1254 print "<p><table width=\"100%\" cellspacing=\"0\"
1255 class=\"prefFeedList\" id=\"prefFeedList\">";
1256 print "<tr><td class=\"selectPrompt\" colspan=\"8\">".
1257 "<div style='float : right'>".
1258 "<input id='show_last_article_times' type='checkbox' onchange='feedlistToggleSLAT()'
1259 $show_last_article_checked><label
1260 for='show_last_article_times'>".__('Show last article times')."</label></div>".
1262 <a href=\"javascript:selectPrefRows('feed', true)\">".__('All')."</a>,
1263 <a href=\"javascript:selectPrefRows('feed', false)\">".__('None')."</a>
1266 if (!get_pref($link, 'ENABLE_FEED_CATS')) {
1267 print "<tr class=\"title\">
1268 <td width='5%' align='center'> </td>";
1270 if (get_pref($link, 'ENABLE_FEED_ICONS')) {
1271 print "<td width='3%'> </td>";
1274 print "<td width='60%'><a href=\"javascript:updateFeedList('title')\">".__('Title')."</a></td>";
1276 if ($show_last_article_info) {
1277 print "<td width='20%' align='right'><a href=\"javascript:updateFeedList('last_article')\">".__('Last Article')."</a></td>";
1280 print "<td width='20%' align='right'><a href=\"javascript:updateFeedList('last_updated')\">".__('Updated')."</a></td>";
1287 while ($line = db_fetch_assoc($result)) {
1289 $feed_id = $line["id"];
1290 $cat_id = $line["cat_id"];
1292 $edit_title = htmlspecialchars($line["title"]);
1293 $edit_cat = htmlspecialchars($line["category"]);
1295 $last_error = $line["last_error"];
1297 if (!$edit_cat) $edit_cat = __("Uncategorized");
1299 $last_updated = $line["last_updated"];
1301 if (!$last_updated) {
1302 $last_updated = "—";
1303 } else if (get_pref($link, 'HEADLINES_SMART_DATE')) {
1304 $last_updated = smart_date_time(strtotime($last_updated));
1306 $short_date = get_pref($link, 'SHORT_DATE_FORMAT');
1307 $last_updated = date($short_date, strtotime($last_updated));
1310 $last_article = $line["last_article"];
1312 if (!$last_article) {
1313 $last_article = "—";
1314 } else if (get_pref($link, 'HEADLINES_SMART_DATE')) {
1315 $last_article = smart_date_time(strtotime($last_article));
1317 $short_date = get_pref($link, 'SHORT_DATE_FORMAT');
1318 $last_article = date($short_date, strtotime($last_article));
1321 if (get_pref($link, 'ENABLE_FEED_CATS') && $cur_cat_id != $cat_id) {
1324 print "<tr><td colspan=\"6\" class=\"feedEditCat\">$edit_cat</td></tr>";
1326 print "<tr class=\"title\">
1327 <td width='5%'> </td>";
1329 if (get_pref($link, 'ENABLE_FEED_ICONS')) {
1330 print "<td width='3%'> </td>";
1333 print "<td width='60%'><a href=\"javascript:updateFeedList('title')\">".__('Title')."</a></td>";
1335 if ($show_last_article_info) {
1336 print "<td width='20%' align='right'>
1337 <a href=\"javascript:updateFeedList('last_article')\">".__('Last Article')."</a></td>";
1340 print "<td width='20%' align='right'>
1341 <a href=\"javascript:updateFeedList('last_updated')\">".__('Updated')."</a></td>";
1343 $cur_cat_id = $cat_id;
1346 $class = ($lnum %
2) ?
"even" : "odd";
1347 $this_row_id = "id=\"FEEDR-$feed_id\"";
1349 print "<tr class=\"$class\" $this_row_id>";
1351 $icon_file = ICONS_DIR
. "/$feed_id.ico";
1353 if (file_exists($icon_file) && filesize($icon_file) > 0) {
1354 $feed_icon = "<img class=\"tinyFeedIcon\" src=\"" . ICONS_URL
. "/$feed_id.ico\">";
1356 $feed_icon = "<img class=\"tinyFeedIcon\" src=\"images/blank_icon.gif\">";
1359 print "<td class='feedSelect'><input onclick='toggleSelectPrefRow(this, \"feed\");'
1360 type=\"checkbox\" id=\"FRCHK-".$line["id"]."\"></td>";
1362 $onclick = "onclick='editFeed($feed_id)' title='".__('Click to edit')."'";
1364 if (get_pref($link, 'ENABLE_FEED_ICONS')) {
1365 print "<td $onclick class='feedIcon'>$feed_icon</td>";
1369 $edit_title = "<span class=\"feed_error\">$edit_title</span>";
1370 $last_updated = "<span class=\"feed_error\">$last_updated</span>";
1371 $last_article = "<span class=\"feed_error\">$last_article</span>";
1374 $parent_title = $line["parent_title"];
1375 if ($parent_title) {
1376 $linked_to = sprintf(__("(linked to %s)"), $parent_title);
1377 $parent_title = "<span class='groupPrompt'>$linked_to</span>";
1380 print "<td $onclick>" . "$edit_title $parent_title" . "</td>";
1382 if ($show_last_article_info) {
1383 print "<td align='right' $onclick>" .
1384 "$last_article</td>";
1387 print "<td $onclick align='right'>$last_updated</td>";
1402 if (!$feed_search) {
1403 print_warning(__("You don't have any subscribed feeds."));
1405 print_warning(__('No matching feeds found.'));
1411 print "<h3>".__('OPML')."</h3>";
1413 /* print "<div style='float : left'>
1414 <form enctype=\"multipart/form-data\" method=\"POST\" action=\"opml.php\">
1415 ".__('File:')." <input id=\"opml_file\" name=\"opml_file\" type=\"file\">
1416 <input type=\"hidden\" name=\"op\" value=\"Import\">
1417 <button onclick=\"return validateOpmlImport();\"
1418 type=\"submit\">".__('Import')."</button>
1423 print "<iframe name=\"upload_iframe\"
1424 style=\"width: 400px; height: 100px; display: none;\"></iframe>";
1426 print "<div style='float : left'>";
1427 print "<form style='display : block' target=\"upload_iframe\"
1428 enctype=\"multipart/form-data\" method=\"POST\"
1429 action=\"backend.php\">
1430 <input id=\"opml_file\" name=\"opml_file\" type=\"file\">
1431 <input type=\"hidden\" name=\"op\" value=\"dlg\">
1432 <input type=\"hidden\" name=\"id\" value=\"importOpml\">
1433 <button onclick=\"return opmlImport();\"
1434 type=\"submit\">".__('Import')."</button>
1436 print "</div> ";
1438 print "<button onclick=\"gotoExportOpml()\">".
1439 __('Export OPML')."</button>";
1442 print "<h3>" . __("Firefox Integration") . "</h3>";
1444 print "<p>" . __('This Tiny Tiny RSS site can be used as a Firefox Feed Reader by clicking the link below.') . "</p>";
1448 print "<button onclick='window.navigator.registerContentHandler(" .
1449 "\"application/vnd.mozilla.maybe.feed\", " .
1450 "\"" . add_feed_url() . "\", " . " \"Tiny Tiny RSS\")'>" .
1451 __('Click here to register this site as a feed reader.') .
1456 print "<h3>".__("Published articles")."</h3>";
1458 if (!get_pref($link, "_PREFS_PUBLISH_KEY")) {
1459 set_pref($link, "_PREFS_PUBLISH_KEY", generate_publish_key());
1462 print "<p>".__('Published articles are exported as a public RSS feed and can be subscribed by anyone who knows the URL specified below.')."</p>";
1464 print "<button onclick=\"return displayDlg('pubUrl')\">".
1465 __('Display URL')."</button> ";
1470 function print_feed_browser($link, $search, $limit, $mode = 1) {
1472 $owner_uid = $_SESSION["uid"];
1475 $search_qpart = "AND (UPPER(feed_url) LIKE UPPER('%$search%') OR
1476 UPPER(title) LIKE UPPER('%$search%'))";
1482 $result = db_query($link, "SELECT feed_url, subscribers FROM
1483 ttrss_feedbrowser_cache WHERE (SELECT COUNT(id) = 0 FROM ttrss_feeds AS tf
1484 WHERE tf.feed_url = ttrss_feedbrowser_cache.feed_url
1485 AND owner_uid = '$owner_uid') $search_qpart
1486 ORDER BY subscribers DESC LIMIT $limit");
1487 } else if ($mode == 2) {
1488 $result = db_query($link, "SELECT *,
1489 (SELECT COUNT(*) FROM ttrss_user_entries WHERE
1490 orig_feed_id = ttrss_archived_feeds.id) AS articles_archived
1492 ttrss_archived_feeds
1494 (SELECT COUNT(*) FROM ttrss_feeds
1495 WHERE ttrss_feeds.feed_url = ttrss_archived_feeds.feed_url AND
1496 owner_uid = '$owner_uid') = 0 AND
1497 owner_uid = '$owner_uid' $search_qpart
1498 ORDER BY id DESC LIMIT $limit");
1503 while ($line = db_fetch_assoc($result)) {
1507 $feed_url = htmlspecialchars($line["feed_url"]);
1508 $subscribers = $line["subscribers"];
1510 $det_result = db_query($link, "SELECT site_url,title,id
1511 FROM ttrss_feeds WHERE feed_url = '$feed_url' LIMIT 1");
1513 $details = db_fetch_assoc($det_result);
1515 $icon_file = ICONS_DIR
. "/" . $details["id"] . ".ico";
1517 if (file_exists($icon_file) && filesize($icon_file) > 0) {
1518 $feed_icon = "<img class=\"tinyFeedIcon\" src=\"" . ICONS_URL
.
1519 "/".$details["id"].".ico\">";
1521 $feed_icon = "<img class=\"tinyFeedIcon\" src=\"images/blank_icon.gif\">";
1524 $check_box = "<input onclick='toggleSelectListRow(this)'
1525 class='feedBrowseCB'
1526 type=\"checkbox\" id=\"FBCHK-" . $details["id"] . "\">";
1528 $class = ($feedctr %
2) ?
"even" : "odd";
1530 if ($details["site_url"]) {
1531 $site_url = "<a target=\"_blank\" href=\"".
1532 htmlspecialchars($details["site_url"])."\">
1533 <img style='border-width : 0px' src='images/www.png' alt='www'></a>";
1538 print "<li title=\"".htmlspecialchars($details["site_url"])."\"
1539 class='$class' id=\"FBROW-".$details["id"]."\">$check_box".
1540 "$feed_icon " . htmlspecialchars($details["title"]) .
1541 " <span class='subscribers'>($subscribers)</span>
1544 } else if ($mode == 2) {
1545 $feed_url = htmlspecialchars($line["feed_url"]);
1546 $site_url = htmlspecialchars($line["site_url"]);
1547 $title = htmlspecialchars($line["title"]);
1549 $icon_file = ICONS_DIR
. "/" . $line["id"] . ".ico";
1551 if (file_exists($icon_file) && filesize($icon_file) > 0) {
1552 $feed_icon = "<img class=\"tinyFeedIcon\" src=\"" . ICONS_URL
.
1553 "/".$line["id"].".ico\">";
1555 $feed_icon = "<img class=\"tinyFeedIcon\" src=\"images/blank_icon.gif\">";
1558 $check_box = "<input onclick='toggleSelectListRow(this)' class='feedBrowseCB'
1559 type=\"checkbox\" id=\"FBCHK-" . $line["id"] . "\">";
1561 $class = ($feedctr %
2) ?
"even" : "odd";
1563 if ($line['articles_archived'] > 0) {
1564 $archived = sprintf(__("%d archived articles"), $line['articles_archived']);
1565 $archived = " <span class='subscribers'>($archived)</span>";
1570 if ($line["site_url"]) {
1571 $site_url = "<a target=\"_blank\" href=\"$site_url\">
1572 <img style='border-width : 0px' src='images/www.png' alt='www'></a>";
1577 print "<li title='".$line['site_url']."' class='$class'
1578 id=\"FBROW-".$line["id"]."\">".
1579 $check_box . "$feed_icon " . $title . $archived . $site_url . "</li>";
1587 if ($feedctr == 0) {
1588 print "<li style=\"text-align : center\"><p>".__('No feeds found.')."</p></li>";