Source for file system_header.php

Documentation is available at system_header.php

  1. <?php
  2.  
  3.  
  4.  
  5. $root = rtrim( $_SERVER['DOCUMENT_ROOT'], '/' ).'/pi/';
  6.  
  7. $systemHeaderLoc = $root.'Modules/system_beta_1/Includes/';
  8.  
  9.  
  10.  
  11. //include upstream header
  12.  
  13. if( !in_array( $root."Core_Resources/core_header.php", get_included_files() ) ) {
  14.  
  15. //echo $root."Core_Resources/core_header.php<br>";
  16.  
  17. include_once $root."Core_Resources/core_header.php";
  18.  
  19. }
  20.  
  21.  
  22.  
  23.  
  24.  
  25. //include files in the folder
  26.  
  27. $includeArray = array();
  28.  
  29. if ($handle = opendir($systemHeaderLoc)) {
  30.  
  31. while (false !== ($file = readdir($handle))) {
  32.  
  33. $path_parts = pathinfo($file);
  34.  
  35. if ($file != "." && $file != ".." && ( $path_parts['extension'] == "php" ) ) {
  36.  
  37. array_push( $includeArray, $file );
  38.  
  39. }
  40.  
  41. }
  42.  
  43. closedir($handle);
  44.  
  45. }
  46.  
  47. if( count($includeArray) ) {
  48.  
  49. foreach( $includeArray as $include ) {
  50.  
  51. if( $include != "system_management.php" && $include != "new_object.php" ) {
  52.  
  53. //echo $systemHeaderLoc.$include;
  54. include_once $systemHeaderLoc.$include;
  55.  
  56. }
  57.  
  58. }
  59.  
  60. }
  61.  
  62.  
  63.  
  64. //include downstream headers
  65.  
  66. $activeModules = core_get_active_modules();
  67.  
  68. for($i=0;$i<count($activeModules);$i++) {
  69.  
  70. if( $activeModules[$i]['module_name'] != "system_beta_1" ) {
  71.  
  72. $requireString = $root."Modules/".$activeModules[$i]['module_location'].'/'.$activeModules[$i]['module_name']."_header.php";
  73.  
  74. include_once $requireString;
  75.  
  76. }
  77.  
  78. }
  79.  
  80.  
  81.  
  82. ?>

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