A tumblelog CMS built on AJAX, PHP and MySQL.

entry.php 2.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. require($configFile);
  46. require_once("classes/configuration.class.php");
  47. require_once("classes/textile.class.php");
  48. require_once("classes/gelato.class.php");
  49. require_once("classes/templates.class.php");
  50. require_once("classes/pagination.class.php");
  51. require_once("classes/user.class.php");
  52. require_once("classes/comments.class.php");
  53. require_once("classes/feeds.class.php");
  54. require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'mysql_connection.class.php');
  55. require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'streams.class.php');
  56. require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'gettext.class.php');
  57. require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'lang.functions.php');
  58. if($installed){
  59. // Globals to be used throughout the application
  60. $user = new user();
  61. $tumble = new gelato();
  62. $conf = new configuration();
  63. $db = new Conexion_Mysql(DB_name, DB_Server, DB_User, DB_Password);
  64. session_start();
  65. $feeds = new feeds();
  66. $feeds->updateFeeds();
  67. unset($feeds);
  68. }
  69. ?>