2 error_reporting(E_ERROR | E_WARNING | E_PARSE);
4 define('MOBILE_VERSION', true);
6 require_once "../../config.php";
7 require_once "functions.php";
8 require_once "../../functions.php";
10 require_once "../../sessions.php";
12 require_once "../../version.php";
13 require_once "../../db-prefs.php";
15 $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
17 init_connection($link);
19 login_sequence($link, 2);
21 /* perform various redirect-needing subops */
23 $subop = db_escape_string($_GET["subop"]);
26 if ($subop == "tc" && !$go) {
28 $cat_id = db_escape_string($_GET["id"]);
31 db_query($link, "UPDATE ttrss_feed_categories SET
32 collapsed = NOT collapsed WHERE id = '$cat_id' AND owner_uid = " .
39 $pref_name = '_COLLAPSED_SPECIAL';
42 $pref_name = '_COLLAPSED_LABELS';
45 $pref_name = '_COLLAPSED_UNCAT';
50 if (get_pref($link, $pref_name)) {
51 set_pref($link, $pref_name, 'false');
53 set_pref($link, $pref_name, 'true');
58 header("Location: index.php");
62 $ts_id = db_escape_string($_GET["ts"]);
64 if ($go == "vf" && $ts_id) {
66 toggleMarked($link, $ts_id);
68 $query_string = preg_replace("/&ts=[0-9]*/", "", $_SERVER["QUERY_STRING"]);
69 header("Location: index.php?$query_string");
73 $tp_id = db_escape_string($_GET["tp"]);
75 if ($go == "vf" && $tp_id) {
77 togglePublished($link, $tp_id);
79 $query_string = preg_replace("/&tp=[0-9]*/", "", $_SERVER["QUERY_STRING"]);
80 header("Location: index.php?$query_string");
84 $sop = db_escape_string($_GET["sop"]);
88 $a_id = db_escape_string($_GET["id"]);
89 } elseif ($go == "vf") {
90 $a_id = db_escape_string($_GET["aid"]);
96 togglePublished($link, $a_id);
100 toggleMarked($link, $a_id);
104 markUnread($link, $a_id);
107 $query_string = str_replace("&sop=$sop", "", $_SERVER["QUERY_STRING"]);
108 header("Location: index.php?$query_string");
115 <title>Tiny Tiny RSS</title>
116 <link rel="stylesheet" type="text/css" href="mobile.css">
117 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
118 <script type="text/javascript" src="mobile.js"></script>
120 <?php $user_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?>
121 <?php if ($user_css_url) { ?>
122 <link rel="stylesheet" type="text/css" href="<?php echo $user_css_url ?>"/>
125 <body id="ttrssMobile">
130 render_feeds_list($link);
131 } else if ($go == "vf") {
132 render_headlines($link);
133 } else if ($go == "view") {
134 render_article($link);
135 } else if ($go == "sform") {
136 render_search_form($link, $_GET["aid"], $_GET["ic"]);
138 print __("Internal error: Function not implemented");
146 <!-- <div id="footer">
147 <a href="http://tt-rss.org/">Tiny-Tiny RSS</a>
148 © 2005-2009 Andrew Dolgov