Subversion Repositories personal-webbase

Rev

Go to most recent revision | Blame | Last modification | View Log | RSS feed

  1. <?php
  2.  
  3. //////////////////////////////////////////////////////////////////////////////
  4. // MODULINITIALISIERUNG                                                     //
  5. //////////////////////////////////////////////////////////////////////////////
  6.  
  7. // 1. Modulliste laden
  8.  
  9. function liste_module()
  10. {
  11.         $ary = array();
  12.         $i = 0;
  13.         $v = 'modules/';
  14.         $verz = opendir($v);
  15.  
  16.         while ($file = readdir($verz))
  17.         {
  18.                 if (($file != '.') && ($file != '..') && (is_dir($v.$file)))
  19.                 {
  20.                         $i++;
  21.                         $ary[$i] = $file;
  22.                 }
  23.         }
  24.  
  25.         closedir($verz);
  26.         sort($ary);
  27.  
  28.         return $ary;
  29. }
  30.  
  31. $modules = liste_module();
  32.  
  33. // 2. Modul-Autostarts ausführen
  34.  
  35. for ($st=0; true; $st++)
  36. {
  37.         $erf = false;
  38.  
  39.         foreach ($modules AS $m1 => $m2)
  40.         {
  41.                 $module_information = WBModuleHandler::get_module_information($m2);
  42.  
  43.                 if (file_exists('modules/'.$m2.'/autostart/'.$st.'.inc.php'))
  44.                 {
  45.                         include 'modules/'.$m2.'/autostart/'.$st.'.inc.php';
  46.                         $erf = true;
  47.                 }
  48.         }
  49.  
  50.         unset($m1);
  51.         unset($m2);
  52.  
  53.         if (!$erf) break;
  54. }
  55.  
  56. ?>