Source for file dbprefs.php

Documentation is available at dbprefs.php

  1. <?php
  2.  
  3. /*
  4. Program E
  5. Copyright 2002, Paul Rydell
  6.  
  7. This file is part of Program E.
  8.  
  9. Program E is free software; you can redistribute it and/or modify
  10. it under the terms of the GNU General Public License as published by
  11. the Free Software Foundation; either version 2 of the License, or
  12. (at your option) any later version.
  13.  
  14. Program E is distributed in the hope that it will be useful,
  15. but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. GNU General Public License for more details.
  18.  
  19. You should have received a copy of the GNU General Public License
  20. along with Program E; if not, write to the Free Software
  21. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  22. */
  23.  
  24. /**
  25. * Preferences file
  26. *
  27. * Contains the preferences settings for the database and the application itself. Constants
  28. * and the main MySQL connection.
  29. * @author Paul Rydell
  30. * @author Anne Kootstra
  31. * @copyright 2002 & 2004
  32. * @version 0.0.9
  33. * @package Settings
  34. */
  35.  
  36. // Turn this off in case people have it on.
  37. set_magic_quotes_runtime(0);
  38.  
  39. // Can't turn off magic quotes gpc so just redo what it did if it is on.
  40. if (get_magic_quotes_gpc()) {
  41. foreach($HTTP_GET_VARS as $k=>$v)
  42. $HTTP_GET_VARS[$k] = stripslashes($v);
  43. foreach($HTTP_POST_VARS as $k=>$v)
  44. $HTTP_POST_VARS[$k] = stripslashes($v);
  45. foreach($HTTP_COOKIE_VARS as $k=>$v)
  46. $HTTP_COOKIE_VARS[$k] = stripslashes($v);
  47. }
  48.  
  49. /**
  50. * The errormessage when a loop is detected.
  51. */
  52. define("LOOPINGERRORMSG", "Oops. I wasn't paying attention. Tell me again what is going on.");
  53.  
  54. /**
  55. * The number of times a loop may occur before the error is thrown. -1 equals to no limit.
  56. */
  57. define("LOOPINGLIMIT",150); // -1 for no limit
  58.  
  59. /**
  60. * Has something to do with the random generator
  61. */
  62. define("RANDOMCHANCECLEAN",100); // -1 to never check
  63.  
  64. /**
  65. * the amount of minutes certain data needs to be kept.
  66. */
  67. define("MINUTESTOKEEPDATA",120); // -1 to keep forever
  68.  
  69. /**
  70. * Minutes to keep the chatlot, standard set to -1, meaning forever.
  71. */
  72. define("MINUTESTOKEEPCHATLOG",-1); // -1 to keep forever
  73.  
  74. /**
  75. * standard value when a user predicate hasn't been set.
  76. */
  77. define("DEFAULTPREDICATEVALUE", "undefined");
  78.  
  79.  
  80. /**
  81. * wether or not to use the resonse caching mechanism. 1=yes, 0=no
  82. */
  83. define('CACHE_CONTROL', 0);
  84.  
  85. /**
  86. * version number of the application.
  87. */
  88. define("PROGRAMEVERSION","v0.09");
  89.  
  90. // This is where all the AIML and startup.xml resides
  91. $rootdir="../../aiml_test/";
  92.  
  93. $DB_HOST="localhost";
  94. $DB_UNAME="root";
  95. $DB_PWORD="";
  96. $DB_DB="prog_e";
  97.  
  98. $errors="";
  99.  
  100. mysql_connect($DB_HOST,$DB_UNAME,$DB_PWORD) or $errors = $errors . "Could not connect to database.\n";
  101. @mysql_select_db($DB_DB) or $errors = $errors . "Unable to select database\n";
  102.  
  103. ?>

Documentation generated on Wed, 12 Jan 2005 12:24:45 +0100 by phpDocumentor 1.3.0RC3