index.php 2.2 KB

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