install_files.inc.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php // $Id: install_files.inc.php 6030 2005-08-17 13:56:28Z bmol $
  2. /*
  3. ==============================================================================
  4. Dokeos - elearning and course management software
  5. Copyright (c) 2004 Dokeos S.A.
  6. Copyright (c) 2003 Ghent University (UGent)
  7. Copyright (c) 2001 Universite catholique de Louvain (UCL)
  8. For a full list of contributors, see "credits.txt".
  9. The full license can be read in "license.txt".
  10. This program is free software; you can redistribute it and/or
  11. modify it under the terms of the GNU General Public License
  12. as published by the Free Software Foundation; either version 2
  13. of the License, or (at your option) any later version.
  14. See the GNU General Public License for more details.
  15. Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
  16. Mail: info@dokeos.com
  17. ==============================================================================
  18. */
  19. /**
  20. ==============================================================================
  21. * Install the Dokeos files
  22. * Notice : This script has to be included by install/index.php
  23. *
  24. * The script creates two files:
  25. * - claro_main.conf.php, the file that contains very important info for Dokeos
  26. * such as the database names.
  27. * - .htaccess file (in the courses directory) that is optional but improves
  28. * security
  29. *
  30. * @package dokeos.install
  31. ==============================================================================
  32. */
  33. if(defined('DOKEOS_INSTALL'))
  34. {
  35. // Write the Dokeos config file
  36. write_dokeos_config_file('../inc/conf/claro_main.conf.php');
  37. // Write a distribution file with the config as a backup for the admin
  38. write_dokeos_config_file('../inc/conf/claro_main.conf.dist.php');
  39. // Write a .htaccess file in the course repository
  40. write_courses_htaccess_file($urlAppendPath);
  41. }
  42. else
  43. {
  44. echo 'You are not allowed here !';
  45. }
  46. ?>