";
if ($id == "importOpml") {
print "
";
header("Content-Type: text/html"); # required for iframe
$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 "";
//return;
}
if ($id == "editPrefProfiles") {
print "";
# TODO: depends on selectTableRows() being broken for this list
# print "
".
# "
" . __('Select')." ";
# print "
";
# print "
".__('All')."
";
# print "
".__('None')."
";
# print "
";
# print "
";
print "
".
__('Create profile')."
";
# print "
";
$result = db_query($link, "SELECT title,id FROM ttrss_settings_profiles
WHERE owner_uid = ".$_SESSION["uid"]." ORDER BY title");
print "";
print "";
}
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 == 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 "".
__('Close this window')." ";
print "
";
print "]]> ";
//return;
}
if ($id == "quickAddFeed") {
print " ";
print " ";
print "".__("Feed")."
";
print "";
print " ";
print "
";
if (get_pref($link, 'ENABLE_FEED_CATS')) {
print __('Place in category:') . " ";
print_feed_cat_select($link, "cat", false, 'dojoType="dijit.form.Select"');
}
print "";
print '
' . __('Available feeds') . '
'.
'
'.
'
';
print "";
print "
".
__('This feed requires authentication.')."
";
print "";
print "
".__('Subscribe')."
".__('More feeds')."
".__('Cancel')."
";
//return;
}
if ($id == "feedBrowser") {
$browser_search = db_escape_string($_REQUEST["search"]);
# print "