Source for file core_header.php

Documentation is available at core_header.php

  1. <?php
  2.  
  3.  
  4.  
  5. $root = rtrim( $_SERVER['DOCUMENT_ROOT'], '/' ).'/pi/';
  6.  
  7. $coreHeaderLoc = $root.'Core_Resources/Includes/';
  8.  
  9. //hack: this is to make sure that extended classes are included before derived classes
  10. include_once 'Includes/class_base.php';
  11.  
  12.  
  13. //include files in the folder
  14.  
  15. $includeArray = array();
  16.  
  17. if ($handle = opendir($coreHeaderLoc)) {
  18.  
  19. while (false !== ($file = readdir($handle))) {
  20.  
  21. $path_parts = pathinfo($file);
  22.  
  23. if ($file != "." && $file != ".." && ( $path_parts['extension'] == "php" ) ) {
  24.  
  25. //echo $file.'<br>';
  26. $includeArray[] = $file;
  27.  
  28. }
  29.  
  30. }
  31.  
  32. closedir($handle);
  33.  
  34. }
  35.  
  36.  
  37.  
  38. if( count($includeArray) ) {
  39.  
  40. foreach( $includeArray as $include ) {
  41.  
  42. //helloecho $coreHeaderLoc.$include."<br>";
  43.  
  44. include_once $coreHeaderLoc.$include;
  45.  
  46. }
  47.  
  48. }
  49.  
  50.  
  51.  
  52. //include downstream headers
  53.  
  54. include_once $root."Modules/system_beta_1/system_header.php";
  55.  
  56.  
  57.  
  58.  
  59.  
  60. ?>

Documentation generated on Tue, 24 May 2005 03:57:48 -0400 by phpDocumentor 1.3.0RC3