]> git.wh0rd.org - tt-rss.git/blob - mobile/index.php
overall directory tree cleanup
[tt-rss.git] / mobile / index.php
1 <?php
2 error_reporting(E_ERROR | E_WARNING | E_PARSE);
3
4 header('Content-Type: text/html; charset=utf-8');
5
6 define('MOBILE_VERSION', true);
7
8 require_once "../config.php";
9 require_once "mobile-functions.php";
10
11 $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
12
13 init_connection($link);
14
15 login_sequence($link, true);
16 ?>
17 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
18 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
19
20 <html xmlns="http://www.w3.org/1999/xhtml">
21 <head>
22 <title>Tiny Tiny RSS</title>
23 <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>
24 <link rel="apple-touch-icon" href="../lib/iui/iui-logo-touch-icon.png" />
25 <meta name="apple-touch-fullscreen" content="YES" />
26 <style type="text/css" media="screen">@import "../lib/iui/iui.css";</style>
27 <script type="application/x-javascript" src="../lib/iui/iui.js"></script>
28 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
29 <script type="text/javascript" src="../lib/prototype.js"></script>
30 <script type="text/javascript" src="mobile.js"></script>
31 <style type="text/css" media="screen">@import "mobile.css";</style>
32 </head>
33
34 <style type="text/css">
35 img { max-width : 75%; }
36
37 li.oldItem {
38 color : gray;
39 }
40
41 #myBackButton {
42 display: none;
43 left: 6px;
44 right: auto;
45 padding: 0;
46 max-width: 55px;
47 border-width: 0 8px 0 14px;
48 -webkit-border-image: url(../lib/iui/backButton.png) 0 8 0 14;
49 }
50
51 img.tinyIcon {
52 max-width : 16px;
53 max-height : 16px;
54 margin-right : 10px;
55 vertical-align : middle;
56 }
57
58 a img {
59 border-width : 0px;
60 }
61 </style>
62
63 <body>
64 <div class="toolbar">
65 <h1 id="pageTitle"></h1>
66 <a id="myBackButton" class="button" href="#"></a>
67 <a class="button" href="prefs.php">Preferences</a>
68 </div>
69
70 <?php
71 $use_cats = mobile_get_pref($link, 'ENABLE_CATS');
72 $offset = (int) db_escape_string($_REQUEST["skip"]);
73
74 if ($use_cats) {
75 render_categories_list($link);
76 } else {
77 render_flat_feed_list($link, $offset);
78 }
79 ?>
80
81 </body>
82 </html>