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