";
if ($id == "importOpml") {
print "
".__('OPML Import')." ";
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 "";
print "".__("Importing using DOMXML.")." ";
require_once "opml_domxml.php";
opml_import_domxml($link, $owner_uid);
print " ";
} else if (PHP_VERSION >= 5) {
print "";
print "".__("Importing using DOMDocument.")." ";
require_once "opml_domdoc.php";
opml_import_domdoc($link, $owner_uid);
print " ";
} else {
print_error(__("DOMXML extension is not found. It is required for PHP versions below 5."));
}
print "";
print "";
print "".
__('Close this window')." ";
print "
";
print "";
print "";
print "]]> ";
//return;
}
if ($id == "editPrefProfiles") {
print "".__('Settings Profiles')." ";
print "
".
__('Create profile')." ";
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 "]]> ";
//return;
}
if ($id == "pubOPMLUrl") {
print "".__('Public OPML URL')." ";
print "";
print "$url_path ";
print "";
print "";
print "".
__('Generate new URL')." ";
print "".
__('Close this window')." ";
print "
";
print "]]> ";
//return;
}
if ($id == "explainError") {
print "".__('Notice')." ";
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 "
";
print "]]> ";
//return;
}
if ($id == "quickAddFeed") {
print "".__('Subscribe to Feed')." ";
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 '
' . __('Available feeds') . '
'
. ' '
. '
';
print "";
print "
".
__('This feed requires authentication.')."
";
print "";
print "
".__('Subscribe')."
".__('More feeds')."
".__('Cancel')."
";
print "]]> ";
//return;
}
if ($id == "feedBrowser") {
print "".__('Feed Browser')." ";
print "";
print " ";
print " ";
print "
";
print "
" . __('Popular feeds') . "
" . __('Feed archive') . "
";
print __("limit:");
print " ";
foreach (array(25, 50, 100, 200) as $l) {
$issel = ($l == $limit) ? "selected" : "";
print "$l ";
}
print " ";
print "";
$owner_uid = $_SESSION["uid"];
print "
";
print_feed_browser($link, $search, 25);
print " ";
print "
".__('Subscribe')."
".__('Remove')."
".__('Cancel')."
";
print "]]> ";
//return;
}
if ($id == "search") {
print "".__('Search')." ";
print "";
#$active_feed_id = db_escape_string($_REQUEST["param"]);
$params = explode(":", db_escape_string($_REQUEST["param"]), 2);
$active_feed_id = sprintf("%d", $params[0]);
$is_cat = (bool) $params[1];
print "".__('Look for')."
";
print "";
if (!SPHINX_ENABLE) {
print " ";
print " " . __('match on')." ";
$search_fields = array(
"title" => __("Title"),
"content" => __("Content"),
"both" => __("Title or content"));
print_select_hash("match_on", 3, $search_fields);
} else {
print " ";
}
print " ".__('Limit search to:')." ";
print "
".__('All feeds')." ";
$feed_title = getFeedTitle($link, $active_feed_id);
if (!$is_cat) {
$feed_cat_title = getFeedCatTitle($link, $active_feed_id);
} else {
$feed_cat_title = getCategoryTitle($link, $active_feed_id);
}
if ($active_feed_id && !$is_cat) {
print "$feed_title ";
} else {
print "".__('This feed')." ";
}
if ($is_cat) {
$cat_preselected = "selected";
}
if (get_pref($link, 'ENABLE_FEED_CATS') && ($active_feed_id > 0 || $is_cat)) {
print "$feed_cat_title ";
} else {
//print "".__('This category')." ";
}
print " ";
print "
";
print "";
print "
".__('Search')."
".__('Cancel')."
";
print "]]> ";
//return;
}
if ($id == "quickAddFilter") {
$active_feed_id = db_escape_string($_REQUEST["param"]);
print "".__('Create Filter')." ";
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 " ".
__('Check it')." ";
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 "";
$result = db_query($link, "SELECT id,description FROM ttrss_filter_actions
ORDER BY name");
while ($line = db_fetch_assoc($result)) {
printf("%s ", $line["id"], __($line["description"]));
}
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 "