2 error_reporting(E_ERROR | E_WARNING | E_PARSE
);
4 require_once "../config.php";
5 require_once "functions.php";
6 require_once "../functions.php";
8 require_once "../sessions.php";
10 require_once "../version.php";
11 require_once "../db-prefs.php";
13 $link = db_connect(DB_HOST
, DB_USER
, DB_PASS
, DB_NAME
);
15 init_connection($link);
17 login_sequence($link, true);
19 /* perform various redirect-needing subops */
21 $subop = db_escape_string($_GET["subop"]);
24 if ($subop == "tc" && !$go) {
26 $cat_id = db_escape_string($_GET["id"]);
29 db_query($link, "UPDATE ttrss_feed_categories SET
30 collapsed = NOT collapsed WHERE id = '$cat_id' AND owner_uid = " .
33 if ($_COOKIE["ttrss_vf_uclps"] != 1) {
34 setcookie("ttrss_vf_uclps", 1);
36 setcookie("ttrss_vf_uclps", 0);
40 header("Location: tt-rss.php");
44 $ts_id = db_escape_string($_GET["ts"]);
46 if ($go == "vf" && $ts_id) {
48 toggleMarked($link, $ts_id);
50 $query_string = preg_replace("/&ts=[0-9]*/", "", $_SERVER["QUERY_STRING"]);
51 header("Location: tt-rss.php?$query_string");
55 $tp_id = db_escape_string($_GET["tp"]);
57 if ($go == "vf" && $tp_id) {
59 togglePublished($link, $tp_id);
61 $query_string = preg_replace("/&tp=[0-9]*/", "", $_SERVER["QUERY_STRING"]);
62 header("Location: tt-rss.php?$query_string");
66 $sop = db_escape_string($_GET["sop"]);
68 if ($sop && $go == "view") {
69 $a_id = db_escape_string($_GET["id"]);
74 togglePublished($link, $a_id);
78 toggleMarked($link, $a_id);
81 $query_string = preg_replace("/&sop=t[sp]/", "", $_SERVER["QUERY_STRING"]);
82 header("Location: tt-rss.php?$query_string");
89 <title
>Tiny Tiny RSS
- Mobile
</title
>
90 <link rel
="stylesheet" type
="text/css" href
="mobile.css">
91 <meta http
-equiv
="Content-Type" content
="text/html; charset=utf-8">
92 <script type
="text/javascript" src
="tt-rss.js"></script
>
94 <?php
$user_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?
>
95 <?php
if ($user_css_url) { ?
>
96 <link rel
="stylesheet" type
="text/css" href
="<?php echo $user_css_url ?>"/>
99 <body id
="ttrssMobile">
104 render_feeds_list($link);
105 } else if ($go == "vf") {
106 render_headlines($link);
107 } else if ($go == "view") {
108 render_article($link);
109 } else if ($go == "sform") {
110 render_search_form($link, $_GET["aid"], $_GET["ic"]);
112 print __("Internal error: Function not implemented");
121 <a href
="http://tt-rss.org/">Tiny
-Tiny RSS
</a
>
122 <?php
if (!defined('HIDE_VERSION')) { ?
>
123 v
<?php
echo VERSION ?
>
125 ©
; 2005-2008 Andrew Dolgov