Example #1
0
 function collapse()
 {
     $cat_id = db_escape_string($_REQUEST["cid"]);
     $mode = (int) db_escape_string($_REQUEST['mode']);
     toggle_collapse_cat($this->link, $cat_id, $mode);
 }
Example #2
0
define('MOBILE_VERSION', true);
require_once "../../config.php";
require_once "functions.php";
require_once "../../functions.php";
require_once "../../sessions.php";
require_once "../../version.php";
require_once "../../db-prefs.php";
$link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
init_connection($link);
login_sequence($link, 2);
/* perform various redirect-needing subops */
$subop = db_escape_string($_GET["subop"]);
$go = $_GET["go"];
if ($subop == "tc" && !$go) {
    $cat_id = db_escape_string($_GET["id"]);
    toggle_collapse_cat($link, $cat_id);
    header("Location: index.php");
    return;
}
$ts_id = db_escape_string($_GET["ts"]);
if ($go == "vf" && $ts_id) {
    toggleMarked($link, $ts_id);
    $query_string = preg_replace("/&ts=[0-9]*/", "", $_SERVER["QUERY_STRING"]);
    header("Location: index.php?{$query_string}");
    return;
}
$tp_id = db_escape_string($_GET["tp"]);
if ($go == "vf" && $tp_id) {
    togglePublished($link, $tp_id);
    $query_string = preg_replace("/&tp=[0-9]*/", "", $_SERVER["QUERY_STRING"]);
    header("Location: index.php?{$query_string}");
Example #3
0
     handle_rpc_request($link);
     break;
     // rpc
 // rpc
 case "feeds":
     $subop = $_REQUEST["subop"];
     $root = (bool) $_REQUEST["root"];
     switch ($subop) {
         case "catchupAll":
             db_query($link, "UPDATE ttrss_user_entries SET\n\t\t\t\t\t\tlast_read = NOW(),unread = false WHERE owner_uid = " . $_SESSION["uid"]);
             ccache_zero_all($link, $_SESSION["uid"]);
             break;
         case "collapse":
             $cat_id = db_escape_string($_REQUEST["cid"]);
             $mode = (int) db_escape_string($_REQUEST['mode']);
             toggle_collapse_cat($link, $cat_id, $mode);
             return;
             break;
     }
     if (!$root) {
         print json_encode(outputFeedList($link));
     } else {
         $feeds = outputFeedList($link, false);
         $root = array();
         $root['id'] = 'root';
         $root['name'] = __('Feeds');
         $root['items'] = $feeds['items'];
         $fl = array();
         $fl['identifier'] = 'id';
         $fl['label'] = 'name';
         $fl['items'] = array($root);