]>
Commit | Line | Data |
---|---|---|
e9e95dae | 1 | <?php |
793185a9 AD |
2 | error_reporting(E_ERROR | E_WARNING | E_PARSE); |
3 | ||
3dd46f19 | 4 | require_once "../config.php"; |
ca35939d | 5 | require_once "functions.php"; |
3dd46f19 | 6 | require_once "../functions.php"; |
9338b88c | 7 | |
9338b88c AD |
8 | require_once "../sessions.php"; |
9 | ||
10 | require_once "../version.php"; | |
11 | require_once "../config.php"; | |
12 | require_once "../db-prefs.php"; | |
13 | ||
14 | $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME); | |
ca35939d | 15 | |
793185a9 | 16 | login_sequence($link, true); |
ca35939d | 17 | |
42096f52 AD |
18 | /* perform various redirect-needing subops */ |
19 | ||
20 | $subop = db_escape_string($_GET["subop"]); | |
21 | $go = $_GET["go"]; | |
22 | ||
23 | if ($subop == "tc" && !$go) { | |
24 | ||
25 | $cat_id = db_escape_string($_GET["id"]); | |
26 | ||
27 | if ($cat_id != 0) { | |
28 | db_query($link, "UPDATE ttrss_feed_categories SET | |
29 | collapsed = NOT collapsed WHERE id = '$cat_id' AND owner_uid = " . | |
30 | $_SESSION["uid"]); | |
b750d485 AD |
31 | } else { |
32 | if ($_COOKIE["ttrss_vf_uclps"] != 1) { | |
33 | setcookie("ttrss_vf_uclps", 1); | |
34 | } else { | |
35 | setcookie("ttrss_vf_uclps", 0); | |
36 | } | |
42096f52 | 37 | } |
b750d485 AD |
38 | |
39 | header("Location: tt-rss.php"); | |
40 | return; | |
42096f52 AD |
41 | } |
42 | ||
24ac6776 AD |
43 | $ts_id = db_escape_string($_GET["ts"]); |
44 | ||
45 | if ($go == "vf" && $ts_id) { | |
46 | $result = db_query($link, "UPDATE ttrss_user_entries SET marked = NOT marked | |
47 | WHERE ref_id = '$ts_id' AND owner_uid = " . $_SESSION["uid"]); | |
48 | $query_string = preg_replace("/&ts=[0-9]*/", "", $_SERVER["QUERY_STRING"]); | |
49 | header("Location: tt-rss.php?$query_string"); | |
50 | return; | |
51 | } | |
9338b88c AD |
52 | ?> |
53 | <html> | |
54 | <head> | |
55 | <title>Tiny Tiny RSS - Mobile</title> | |
56 | <link rel="stylesheet" type="text/css" href="mobile.css"> | |
2f468537 | 57 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
9338b88c AD |
58 | </head> |
59 | <body> | |
60 | ||
8e3f7217 | 61 | <div id="content"> |
e9e95dae | 62 | <?php |
42096f52 | 63 | if (!$go) { |
ca35939d | 64 | render_feeds_list($link); |
2f468537 AD |
65 | } else if ($go == "vf") { |
66 | render_headlines($link); | |
42096f52 AD |
67 | } else if ($go == "view") { |
68 | render_article($link); | |
0809065e AD |
69 | } else if ($go == "sform") { |
70 | render_search_form($link, $_GET["aid"], $_GET["ic"]); | |
8e3f7217 | 71 | } else { |
793185a9 | 72 | print __("Internal error: Function not implemented"); |
ca35939d AD |
73 | } |
74 | ||
75 | ?> | |
8e3f7217 AD |
76 | </div> |
77 | ||
78 | <div id="footer"> | |
e9e95dae | 79 | <a href="http://tt-rss.spb.ru/">Tiny-Tiny RSS</a> v<?php echo VERSION ?> © 2005-2006 Andrew Dolgov |
8e3f7217 | 80 | </div> |
ca35939d | 81 | |
9338b88c AD |
82 | </body> |
83 | </html> |