X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=modules%2Fpopup-dialog.php;h=13abc947f1febcfca57b7b9844f3f4a76d94721d;hb=667a82727cd95cc75e006b8509b6249e3f7f46e6;hp=351d4b0f90717638cfa8e18df6d7c75f30d9926f;hpb=11b9d0becdfc894c04afaa912798917911ff35a8;p=tt-rss.git
diff --git a/modules/popup-dialog.php b/modules/popup-dialog.php
index 351d4b0f..13abc947 100644
--- a/modules/popup-dialog.php
+++ b/modules/popup-dialog.php
@@ -6,10 +6,8 @@
print "";
if ($id == "importOpml") {
- print "".__('OPML Import')."";
- print "";
+ print "";
+ header("Content-Type: text/html"); # required for iframe
$owner_uid = $_SESSION["uid"];
@@ -23,7 +21,7 @@
if (db_num_rows($result) == 0) {
db_query($link, "INSERT INTO ttrss_feed_categories
- (title,owner_uid)
+ (title,owner_uid)
VALUES ('Imported feeds', '$owner_uid')");
}
@@ -50,54 +48,56 @@
print "
";
print "";
-
- print "
";
- print "";
-
print "";
- print "]]>";
//return;
}
if ($id == "editPrefProfiles") {
- print "".__('Settings Profiles')."";
- print "
- ".
+ print "";
+
+# TODO: depends on selectTableRows() being broken for this list
+# print "
".
+# "
" . __('Select')."";
+# print "
";
+# print "
".__('All')."
";
+# print "
".__('None')."
";
+# print "
";
+
+# print "
";
+ print "
+ ".
__('Create profile')."
";
- 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 "";
@@ -782,6 +909,214 @@
//return;
}
- print "";
+ if ($id == "newVersion") {
+ $version_data = check_for_update($link);
+ $version = $version_data['version'];
+ $id = $version_data['version_id'];
+
+ print "
";
+
+ print T_sprintf("New version of Tiny Tiny RSS is available (%s).",
+ "$version");
+
+ print "
";
+
+ $details = "http://tt-rss.org/redmine/versions/show/$id";
+ $download = "http://tt-rss.org/#Download";
+
+ print "";
+ print "".__("Details")."";
+ print "".__("Download")."";
+ print "".
+ __('Close this window')."";
+ print "
";
+
+ }
+
+ if ($id == "customizeCSS") {
+
+ $value = get_pref($link, "USER_STYLESHEET");
+
+ $value = str_replace("
", "\n", $value);
+
+ print T_sprintf("You can override colors, fonts and layout of your currently selected theme with custom CSS declarations here. This file can be used as a baseline.", "tt-rss.css");
+
+ print "";
+ print "";
+ print "";
+
+ print "";
+ print "";
+ print " |
";
+
+ print "";
+ print "".__('Save')." ";
+ print "".__('Cancel')."";
+ print "
";
+
+ }
+
+ if ($id == "editArticleNote") {
+
+ $result = db_query($link, "SELECT note FROM ttrss_user_entries WHERE
+ ref_id = '$param' AND owner_uid = " . $_SESSION['uid']);
+
+ $note = db_fetch_result($result, 0, "note");
+
+ print "";
+ print "";
+ print "";
+
+ print "";
+ print "";
+ print " |
";
+
+ print "";
+ print "".__('Save')." ";
+ print "".__('Cancel')."";
+ print "
";
+
+ }
+
+ if ($id == "about") {
+ print "";
+ print "";
+ print " | ";
+ print "";
+
+ print "Tiny Riny RSS
+ Version ".VERSION."
+ Copyright © 2005-".date('Y')."
+ Andrew Dolgov
+ and other contributors.
+ Licensed under GNU GPL version 2. ";
+
+ print "
+ Official site —
+
+ Support the project. ";
+
+ print " |
";
+ print "
";
+
+ print "";
+ print "".
+ __('Close this window')."";
+ print "
";
+ }
+
+ if ($id == "addInstance") {
+
+ print "";
+ print "";
+
+ print "".__("Instance")."
";
+
+ print "";
+
+ print "";
+
+ return;
+ }
+
+ if ($id == "shareArticle") {
+
+ $result = db_query($link, "SELECT uuid, ref_id FROM ttrss_user_entries WHERE int_id = '$param'
+ AND owner_uid = " . $_SESSION['uid']);
+
+ if (db_num_rows($result) == 0) {
+ print "Article not found.";
+ } else {
+
+ $uuid = db_fetch_result($result, 0, "uuid");
+ $ref_id = db_fetch_result($result, 0, "ref_id");
+
+ if (!$uuid) {
+ $uuid = db_escape_string(sha1(uniqid(rand(), true)));
+ db_query($link, "UPDATE ttrss_user_entries SET uuid = '$uuid' WHERE int_id = '$param'
+ AND owner_uid = " . $_SESSION['uid']);
+ }
+
+ print __("You can share this article by the following unique URL:");
+
+ $url_path = get_self_url_prefix();
+ $url_path .= "/public.php?op=share&key=$uuid";
+
+ print "";
+
+ /* if (!label_find_id($link, __('Shared'), $_SESSION["uid"]))
+ label_create($link, __('Shared'), $_SESSION["uid"]);
+
+ label_add_article($link, $ref_id, __('Shared'), $_SESSION['uid']); */
+ }
+
+ print "";
+
+ print "".
+ __('Close this window')."";
+
+ print "
";
+
+ return;
+ }
+
+ print "";
+
}
?>