".__('OPML Import').""; print "
"; print "
"; $owner_uid = $_SESSION["uid"]; db_query($link, "BEGIN"); /* create Imported feeds category just in case */ $result = db_query($link, "SELECT id FROM ttrss_feed_categories WHERE title = 'Imported feeds' AND owner_uid = '$owner_uid' LIMIT 1"); if (db_num_rows($result) == 0) { db_query($link, "INSERT INTO ttrss_feed_categories (title,owner_uid) VALUES ('Imported feeds', '$owner_uid')"); } db_query($link, "COMMIT"); /* Handle OPML import by DOMXML/DOMDocument */ if (function_exists('domxml_open_file')) { print ""; } else if (PHP_VERSION >= 5) { print ""; } else { print_error(__("DOMXML extension is not found. It is required for PHP versions below 5.")); } print "
"; print "
"; print ""; print "
"; print ""; print "
"; return; } if ($id == "editPrefProfiles") { print "
".__('Settings Profiles')."
"; print "
"; print "
"; print "

"; $result = db_query($link, "SELECT title,id FROM ttrss_settings_profiles WHERE owner_uid = ".$_SESSION["uid"]." ORDER BY title"); print __('Select:')." ".__('All').", ".__('None').""; print "

"; print "
"; print ""; print ""; print ""; if (!$_SESSION["profile"]) { $is_active = __("(active)"); } else { $is_active = ""; } print ""; print ""; $lnum = 1; while ($line = db_fetch_assoc($result)) { $class = ($lnum % 2) ? "even" : "odd"; $cat_id = $line["id"]; $this_row_id = "id=\"FCATR-$cat_id\""; print ""; $edit_title = htmlspecialchars($line["title"]); print ""; if ($_SESSION["profile"] == $line["id"]) { $is_active = __("(active)"); } else { $is_active = ""; } print ""; print ""; ++$lnum; } print "
" . __("Default profile") . " $is_active
" . $edit_title . " $is_active
"; print "
"; print "
"; print "
"; print ""; print "
"; return; } if ($id == "pubUrl") { print "
".__('Published Articles')."
"; print "
"; $url_path = article_publish_url($link); print __("Your Published articles feed URL is:"); print "
"; print "$url_path"; print "
"; print "
"; print " "; print ""; print "
"; return; } if ($id == "pubOPMLUrl") { print "
".__('Public OPML URL')."
"; print "
"; $url_path = opml_publish_url($link); print __("Your Public OPML URL is:"); print "
"; print "$url_path"; print "
"; print "
"; print " "; print ""; print "
"; return; } if ($id == "explainError") { print "
".__('Notice')."
"; print "
"; print "
"; if ($param == 1) { 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."); $stamp = (int) file_get_contents(LOCK_DIRECTORY . "/update_daemon.stamp"); print "

" . __("Last update:") . " " . date("Y.m.d, G:i", $stamp); } if ($param == 2) { $msg = check_for_update($link); if (!$msg) { print __("You are running the latest version of Tiny Tiny RSS. The fact that you are seeing this dialog is probably a bug."); } else { print $msg; } } if ($param == 3) { 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."); $stamp = (int) file_get_contents(LOCK_DIRECTORY . "/update_daemon.stamp"); print "

" . __("Last update:") . " " . date("Y.m.d, G:i", $stamp); } print "

"; print "
"; print ""; print "
"; return; } if ($id == "quickAddFeed") { print "
".__('Subscribe to Feed')."
"; print "
"; print "
"; print ""; print ""; //print ""; print "
".__("Feed")."
"; print "
"; print __("URL:") . " "; print ""; print "
"; if (get_pref($link, 'ENABLE_FEED_CATS')) { print __('Place in category:') . " "; print_feed_cat_select($link, "cat"); } print "
"; print ""; print "
"; print "
"; print "
"; return; } if ($id == "feedBrowser") { print "
".__('Feed Browser')."
"; print "
"; $browser_search = db_escape_string($_REQUEST["search"]); print "
"; print ""; print ""; print "
"; print " "; print __("limit:"); print " "; print "

"; $owner_uid = $_SESSION["uid"]; /* print __('Select:')." ".__('All').", ".__('None').""; */ print "

    "; print_feed_browser($link, $search, 25); print "
"; print "
"; print "
"; return; } if ($id == "search") { print "
".__('Search')."
"; print "
"; print ""; #$active_feed_id = db_escape_string($_REQUEST["param"]); $params = split(":", db_escape_string($_REQUEST["param"])); $active_feed_id = sprintf("%d", $params[0]); $is_cat = $params[1] == "true"; print "
".__('Look for')."
"; print "
"; print ""; print " " . __('match on')." "; $search_fields = array( "title" => __("Title"), "content" => __("Content"), "both" => __("Title or content")); print_select_hash("match_on", 3, $search_fields); print "
".__('Limit search to:')." "; print ""; print "
"; print ""; print "
"; print "
"; return; } if ($id == "quickAddFilter") { $active_feed_id = db_escape_string($_REQUEST["param"]); print "
".__('Create Filter')."
"; print "
"; print "
"; print ""; print ""; print ""; $result = db_query($link, "SELECT id,description FROM ttrss_filter_types ORDER BY description"); $filter_types = array(); while ($line = db_fetch_assoc($result)) { //array_push($filter_types, $line["description"]); $filter_types[$line["id"]] = __($line["description"]); } print "
".__("Match")."
"; print "
"; print ""; print __("Date") . " "; $filter_params = array( "before" => __("before"), "after" => __("after")); print_select_hash("filter_date_modifier", "before", $filter_params); print " "; print ""; print ""; print " "; print ""; print "
" . __("on field") . " "; print_select_hash("filter_type", 1, $filter_types, 'onchange="filterDlgCheckType(this)"'); print "
"; print __("in") . " "; print_feed_select($link, "feed_id", $active_feed_id); print "
"; print "
".__("Perform Action")."
"; print "
"; print ""; print ""; print " " . __("with parameters:") . " "; print ""; print_label_select($link, "action_param_label", $action_param); print ""; print " "; // tiny layout hack print "
"; print "
".__("Options")."
"; print "
"; print "
"; print "
"; print " "; print "
"; print "
"; print "
"; print "
"; print " "; print ""; print "
"; // print ""; return; } if ($id == "feedUpdateErrors") { print "
".__('Update Errors')."
"; print "
"; print __("These feeds have not been updated because of errors:"); $result = db_query($link, "SELECT id,title,feed_url,last_error FROM ttrss_feeds WHERE last_error != '' AND owner_uid = ".$_SESSION["uid"]); print "
    "; while ($line = db_fetch_assoc($result)) { print "
  • " . $line["title"] . " (" . $line["feed_url"] . "): " . "" . $line["last_error"] . ""; } print "
"; print "
"; print ""; print "
"; return; } if ($id == "editArticleTags") { print "
".__('Edit Tags')."
"; print "
"; print "
"; print __("Tags for this article (separated by commas):")."
"; $tags = get_article_tags($link, $param); $tags_str = join(", ", $tags); print ""; print ""; print ""; print "
"; print "
"; print "
"; print " "; print ""; print "
"; return; } if ($id == "printTagCloud") { print "
".__('Tag Cloud')."
"; print "
"; print __("Showing most popular tags ")." (".__('more tags')."):
"; print "
"; printTagCloud($link); print "
"; print "
"; print ""; print "
"; print "
"; return; } if ($id == "emailArticle") { print "
".__('Forward article by email')."
"; print "
"; print "
"; $secretkey = sha1(make_password(10)); $_SESSION['email_secretkey'] = $secretkey; print ""; print ""; print ""; require_once "lib/MiniTemplator.class.php"; $tpl = new MiniTemplator; $tpl_t = new MiniTemplator; $tpl->readTemplateFromFile("templates/email_article_template.txt"); $result = db_query($link, "SELECT link, content, title FROM ttrss_user_entries, ttrss_entries WHERE id = ref_id AND id = '$param' AND owner_uid = " . $_SESSION["uid"]); $line = db_fetch_assoc($result); $subject = htmlspecialchars(__("[Forwarded]") . " " . $line["title"]); $tpl->setVariable('ARTICLE_TITLE', strip_tags($line["title"])); /* $tpl->setVariable('ARTICLE_EXCERPT', truncate_string(strip_tags($line["content"]), 200)); */ $tpl->setVariable('ARTICLE_URL', strip_tags($line["link"])); $result = db_query($link, "SELECT email FROM ttrss_users WHERE id = " . $_SESSION["uid"]); $user_email = htmlspecialchars(db_fetch_result($result, 0, "email")); $user_name = htmlspecialchars($_SESSION["name"]); //print ""; //print ""; $_SESSION['email_replyto'] = $user_email; $_SESSION['email_fromname'] = $user_name; $tpl->setVariable('USER_NAME', $_SESSION["name"]); $tpl->setVariable('USER_EMAIL', $user_email); $tpl->setVariable('TTRSS_HOST', $_SERVER["HTTP_HOST"]); $tpl->addBlock('email'); $content = ""; $tpl->generateOutputToString($content); print "
"; print __('From:'); print ""; print "\">"; print "
"; print __('To:'); print ""; print ""; print "
"; print "
"; print __('Subject:'); print ""; print ""; print "
"; print ""; print "
"; print "
"; print " "; print ""; print "
"; return; } print "
Internal Error

Unknown dialog $id

"; } ?>