]> git.wh0rd.org - tt-rss.git/blame - mobile/tt-rss.php
more mobile prototyping (2) - add collapse support, etc
[tt-rss.git] / mobile / tt-rss.php
CommitLineData
9338b88c
AD
1<?
2 require_once "../functions.php";
ca35939d 3 require_once "functions.php";
9338b88c
AD
4
5 basic_nosid_redirect_check();
6
7 require_once "../sessions.php";
8
9 require_once "../version.php";
10 require_once "../config.php";
11 require_once "../db-prefs.php";
12
13 $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
ca35939d
AD
14
15 login_sequence($link);
16
42096f52
AD
17 /* perform various redirect-needing subops */
18
19 $subop = db_escape_string($_GET["subop"]);
20 $go = $_GET["go"];
21
22 if ($subop == "tc" && !$go) {
23
24 $cat_id = db_escape_string($_GET["id"]);
25
26 if ($cat_id != 0) {
27 db_query($link, "UPDATE ttrss_feed_categories SET
28 collapsed = NOT collapsed WHERE id = '$cat_id' AND owner_uid = " .
29 $_SESSION["uid"]);
30 header("Location: tt-rss.php");
31 return;
32 }
33 }
34
9338b88c
AD
35?>
36<html>
37<head>
38 <title>Tiny Tiny RSS - Mobile</title>
39 <link rel="stylesheet" type="text/css" href="mobile.css">
2f468537 40 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
9338b88c
AD
41</head>
42<body>
43
8e3f7217 44<div id="content">
ca35939d 45<?
42096f52 46 if (!$go) {
ca35939d 47 render_feeds_list($link);
2f468537
AD
48 } else if ($go == "vf") {
49 render_headlines($link);
42096f52
AD
50 } else if ($go == "view") {
51 render_article($link);
8e3f7217
AD
52 } else {
53 print "Function not implemented";
ca35939d
AD
54 }
55
56?>
8e3f7217
AD
57</div>
58
59<div id="footer">
60 <a href="http://tt-rss.spb.ru/">Tiny-Tiny RSS</a> v<?= VERSION ?> &copy; 2005-2006 Andrew Dolgov
61</div>
ca35939d 62
9338b88c
AD
63</body>
64</html>