A tumblelog CMS built on AJAX, PHP and MySQL.

entry.php 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <?php
  2. if(!defined('entry') || !entry) die('Not a valid page');
  3. /*
  4. * Created on Sep 15, 2007
  5. * Modified on Sep 22, 2007
  6. *
  7. * Known Entry Points
  8. * api.php
  9. * install.php
  10. * index.php
  11. * login.php
  12. * update.php
  13. * rss.php
  14. * admin/bm.php
  15. * admin/index.php
  16. * admin/close.php
  17. * admin/ajax.php
  18. * admin/settings.php
  19. * admin/options.php
  20. * admin/admin.php
  21. * admin/comments.php
  22. * admin/user.php
  23. * admin/feeds.php
  24. * classes/imgsize.php
  25. */
  26. // PHP settings specific to Gelato
  27. ini_set('pcre.backtrack_limit', '10000');
  28. // Globals to be used throughout the application
  29. define('Absolute_Path', dirname(__FILE__).DIRECTORY_SEPARATOR);
  30. $installed = true;
  31. $configFile = Absolute_Path.'config.php';
  32. if(strpos($_SERVER['REQUEST_URI'],'/admin'))$dir = "../"; else $dir = "";
  33. if (!file_exists($configFile) and basename($_SERVER['PHP_SELF'])!='install.php'){
  34. header("Location: {$dir}install.php");exit;
  35. }else{
  36. include(Absolute_Path.'classes/install.class.php');
  37. $install = new Install();
  38. if(!$install->is_gelato_installed()){
  39. if(basename($_SERVER['PHP_SELF'])!='install.php'){
  40. header("Location: {$dir}install.php");exit;
  41. }
  42. $installed = false;
  43. }
  44. }
  45. if($installed)
  46. require($configFile);
  47. require_once("classes/configuration.class.php");
  48. require_once("classes/textile.class.php");
  49. require_once("classes/gelato.class.php");
  50. require_once("classes/templates.class.php");
  51. require_once("classes/pagination.class.php");
  52. require_once("classes/user.class.php");
  53. require_once("classes/comments.class.php");
  54. require_once("classes/feeds.class.php");
  55. require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'mysql_connection.class.php');
  56. require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'streams.class.php');
  57. require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'gettext.class.php');
  58. require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'lang.functions.php');
  59. if($installed){
  60. // Globals to be used throughout the application
  61. $user = new user();
  62. $tumble = new gelato();
  63. $conf = new configuration();
  64. $db = new Conexion_Mysql(DB_name, DB_Server, DB_User, DB_Password);
  65. session_start();
  66. $feeds = new feeds();
  67. $feeds->updateFeeds();
  68. unset($feeds);
  69. }
  70. ?>