index.php 2.0 KB

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