install_files.inc.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php // $Id: install_files.inc.php 22577 2009-08-03 04:31:24Z yannoo $
  2. /* For licensing terms, see /dokeos_license.txt */
  3. /**
  4. ==============================================================================
  5. * Install the Dokeos files
  6. * Notice : This script has to be included by install/index.php
  7. *
  8. * The script creates two files:
  9. * - configuration.php, the file that contains very important info for Dokeos
  10. * such as the database names.
  11. * - .htaccess file (in the courses directory) that is optional but improves
  12. * security
  13. *
  14. * @package dokeos.install
  15. ==============================================================================
  16. */
  17. if(defined('DOKEOS_INSTALL'))
  18. {
  19. // Write the Dokeos config file
  20. write_dokeos_config_file('../inc/conf/configuration.php');
  21. // Write a distribution file with the config as a backup for the admin
  22. write_dokeos_config_file('../inc/conf/configuration.dist.php');
  23. // Write a .htaccess file in the course repository
  24. write_courses_htaccess_file($urlAppendPath);
  25. //copy distribution files into right names for Dokeos install
  26. copy('../inc/conf/add_course.conf.dist.php','../inc/conf/add_course.conf.php');
  27. copy('../inc/conf/course_info.conf.dist.php','../inc/conf/course_info.conf.php');
  28. copy('../inc/conf/mail.conf.dist.php','../inc/conf/mail.conf.php');
  29. copy('../inc/conf/profile.conf.dist.php','../inc/conf/profile.conf.php');
  30. }
  31. else
  32. {
  33. echo 'You are not allowed here !';
  34. }
  35. ?>