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, true);
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 = " .
35 if ($_COOKIE["ttrss_vf_uclps"] != 1) {
36 setcookie("ttrss_vf_uclps", 1);
38 setcookie("ttrss_vf_uclps", 0);
42 header("Location: tt-rss.php");
46 $ts_id = db_escape_string($_GET["ts"]);
48 if ($go == "vf" && $ts_id) {
50 toggleMarked($link, $ts_id);
52 $query_string = preg_replace("/&ts=[0-9]*/", "", $_SERVER["QUERY_STRING"]);
53 header("Location: tt-rss.php?$query_string");
57 $tp_id = db_escape_string($_GET["tp"]);
59 if ($go == "vf" && $tp_id) {
61 togglePublished($link, $tp_id);
63 $query_string = preg_replace("/&tp=[0-9]*/", "", $_SERVER["QUERY_STRING"]);
64 header("Location: tt-rss.php?$query_string");
68 $sop = db_escape_string($_GET["sop"]);
72 $a_id = db_escape_string($_GET["id"]);
73 } elseif ($go == "vf") {
74 $a_id = db_escape_string($_GET["aid"]);
80 togglePublished($link, $a_id);
84 toggleMarked($link, $a_id);
88 markUnread($link, $a_id);
91 $query_string = str_replace("&sop=$sop", "", $_SERVER["QUERY_STRING"]);
92 header("Location: tt-rss.php?$query_string");
99 <title
>Tiny Tiny RSS
- Mobile
</title
>
100 <link rel
="stylesheet" type
="text/css" href
="mobile.css">
101 <meta http
-equiv
="Content-Type" content
="text/html; charset=utf-8">
102 <script type
="text/javascript" src
="tt-rss.js"></script
>
104 <?php
$user_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?
>
105 <?php
if ($user_css_url) { ?
>
106 <link rel
="stylesheet" type
="text/css" href
="<?php echo $user_css_url ?>"/>
109 <body id
="ttrssMobile">
114 render_feeds_list($link);
115 } else if ($go == "vf") {
116 render_headlines($link);
117 } else if ($go == "view") {
118 render_article($link);
119 } else if ($go == "sform") {
120 render_search_form($link, $_GET["aid"], $_GET["ic"]);
122 print __("Internal error: Function not implemented");
131 <a href
="http://tt-rss.org/">Tiny
-Tiny RSS
</a
>
132 <?php
if (!defined('HIDE_VERSION')) { ?
>
133 v
<?php
echo VERSION ?
>
135 ©
; 2005-2009 Andrew Dolgov