X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=classes%2Fpref%2Fprefs.php;h=cc523092f4af3996110f6582d2d6edea988889b1;hb=9d76e754513ec1119a010ab2e9abcf9fb9df52d1;hp=21b25c6319d44e3b3fc4d070d7b978612e002d7f;hpb=7a5103ae90370884c31746b778de0bf9b2664431;p=tt-rss.git diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php index 21b25c63..cc523092 100644 --- a/classes/pref/prefs.php +++ b/classes/pref/prefs.php @@ -2,7 +2,7 @@ class Pref_Prefs extends Handler_Protected { function csrf_ignore($method) { - $csrf_ignored = array("index", "updateself", "customizecss"); + $csrf_ignored = array("index", "updateself", "customizecss", "editprefprofiles"); return array_search($method, $csrf_ignored) !== false; } @@ -898,5 +898,122 @@ class Pref_Prefs extends Handler_Protected { } + function editPrefProfiles() { + print "
"; + + print "
". + "" . __('Select').""; + print "
"; + print "
".__('All')."
"; + print "
".__('None')."
"; + print "
"; + + print "
"; + + print " +
"; + + print "
"; + + $result = db_query($this->link, "SELECT title,id FROM ttrss_settings_profiles + WHERE owner_uid = ".$_SESSION["uid"]." ORDER BY title"); + + print "
"; + + print "
"; + + print ""; + + print ""; #odd + + 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"; + + $profile_id = $line["id"]; + $this_row_id = "id=\"FCATR-$profile_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 "
"; + + } + + } ?>