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 "../config.php";
12 require_once "../db-prefs.php";
14 $link = db_connect(DB_HOST
, DB_USER
, DB_PASS
, DB_NAME
);
16 if (DB_TYPE
== "pgsql") {
17 pg_query("set client_encoding = 'UTF-8'");
18 pg_set_client_encoding("UNICODE");
20 if (defined('MYSQL_CHARSET') && MYSQL_CHARSET
) {
21 db_query($link, "SET NAMES " . MYSQL_CHARSET
);
22 // db_query($link, "SET CHARACTER SET " . MYSQL_CHARSET);
26 login_sequence($link, true);
28 /* perform various redirect-needing subops */
30 $subop = db_escape_string($_GET["subop"]);
33 if ($subop == "tc" && !$go) {
35 $cat_id = db_escape_string($_GET["id"]);
38 db_query($link, "UPDATE ttrss_feed_categories SET
39 collapsed = NOT collapsed WHERE id = '$cat_id' AND owner_uid = " .
42 if ($_COOKIE["ttrss_vf_uclps"] != 1) {
43 setcookie("ttrss_vf_uclps", 1);
45 setcookie("ttrss_vf_uclps", 0);
49 header("Location: tt-rss.php");
53 $ts_id = db_escape_string($_GET["ts"]);
55 if ($go == "vf" && $ts_id) {
57 toggleMarked($link, $ts_id);
59 $query_string = preg_replace("/&ts=[0-9]*/", "", $_SERVER["QUERY_STRING"]);
60 header("Location: tt-rss.php?$query_string");
64 $tp_id = db_escape_string($_GET["tp"]);
66 if ($go == "vf" && $tp_id) {
68 togglePublished($link, $tp_id);
70 $query_string = preg_replace("/&tp=[0-9]*/", "", $_SERVER["QUERY_STRING"]);
71 header("Location: tt-rss.php?$query_string");
75 $sop = db_escape_string($_GET["sop"]);
77 if ($sop && $go == "view") {
78 $a_id = db_escape_string($_GET["id"]);
83 togglePublished($link, $a_id);
87 toggleMarked($link, $a_id);
90 $query_string = preg_replace("/&sop=t[sp]/", "", $_SERVER["QUERY_STRING"]);
91 header("Location: tt-rss.php?$query_string");
98 <title
>Tiny Tiny RSS
- Mobile
</title
>
99 <link rel
="stylesheet" type
="text/css" href
="mobile.css">
100 <meta http
-equiv
="Content-Type" content
="text/html; charset=utf-8">
101 <script type
="text/javascript" src
="tt-rss.js"></script
>
103 <?php
$user_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?
>
104 <?php
if ($user_css_url) { ?
>
105 <link rel
="stylesheet" type
="text/css" href
="<?php echo $user_css_url ?>"/>
108 <body id
="ttrssMobile">
113 render_feeds_list($link);
114 } else if ($go == "vf") {
115 render_headlines($link);
116 } else if ($go == "view") {
117 render_article($link);
118 } else if ($go == "sform") {
119 render_search_form($link, $_GET["aid"], $_GET["ic"]);
121 print __("Internal error: Function not implemented");
130 <a href
="http://tt-rss.spb.ru/">Tiny
-Tiny RSS
</a
>
131 <?php
if (!defined('HIDE_VERSION')) { ?
>
132 v
<?php
echo VERSION ?
>
134 ©
; 2005-2008 Andrew Dolgov