A tumblelog CMS built on AJAX, PHP and MySQL.

update.php 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. if(!defined('entry')) define('entry',true);
  3. /* ===========================
  4. gelato CMS - A PHP based tumblelog CMS
  5. development version
  6. http://www.gelatocms.com/
  7. gelato CMS is a free software licensed under the GPL 2.0
  8. Copyright (C) 2007 by Pedro Santana <pecesama at gmail dot com>
  9. =========================== */
  10. ?>
  11. <?php
  12. require('entry.php');
  13. global $configFile, $db;
  14. if (!file_exists($configFile)) {
  15. $mensaje = "
  16. <h3 class=\"important\">Error reading configuration file</h3>
  17. <p>There doesn't seem to be a <code>config.php</code> file. I need this before we can get started.</p>
  18. <p>This either means that you did not rename the <code>config-sample.php</code> file to <code>config.php</code>.</p>";
  19. die($mensaje);
  20. } else {
  21. require_once($configFile);
  22. }
  23. $sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('shorten_links', '0');";
  24. $db->ejecutarConsulta($sqlStr);
  25. $sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('rss_import_frec', '5 minutes');";
  26. $db->ejecutarConsulta($sqlStr);
  27. $sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('check_version', '1');";
  28. $db->ejecutarConsulta($sqlStr);
  29. $sqlStr = "CREATE TABLE `".Table_prefix."feeds` (
  30. `id_feed` int(11) NOT NULL auto_increment,
  31. `url` varchar(255) NOT NULL,
  32. `title` varchar(255) NOT NULL,
  33. `type` tinyint(4) NOT NULL default '1',
  34. `updated_at` datetime NOT NULL,
  35. `error` tinyint(1) NOT NULL default '0',
  36. `credits` int(1) NOT NULL default '0',
  37. `site_url` varchar(255) NOT NULL,
  38. `id_user` int(10) NOT NULL,
  39. PRIMARY KEY (`id_feed`)
  40. ) ENGINE=MyISAM ;";
  41. $db->ejecutarConsulta($sqlStr);
  42. if(!is_dir('upload/CACHE')){
  43. @mkdir('upload/CACHE');
  44. @chmod('upload/CACHE',777);
  45. }
  46. echo "<p><em>Finished!</em></p>";
  47. echo "<p>Now you are running on the new <strong>gelato cioccolato</strong> version!!!</p>";
  48. ?>