A tumblelog CMS built on AJAX, PHP and MySQL.

entry.php 2.6KB

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