<?php
/* 
   ======================================================================
   Copyright © 2007 by Francisco Burzi
   http://phpnuke.org             
                                                                  
   AntiSlaed CMS based on:                                          
                                                                    
   RNuke (http://rusnuke.com)                                        
   EdogsNuke (http://edogs.ru)                                       
   XNuke (http://xnuke.info)                                         
   phpBB (http://phpbb.com)                                      
   Code modifications by AntiSlaed Team, March 2008                  
   http://antislaedcms.ru                                        
                                                                     
   Please contact us, if you have any questions about AntiSlaedCMS
   mailto: admin@antislaedcms.ru      
                                                                       
   AntiSlaed CMS is free software. You can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by 
   the Free Software Foundation; either version 2 of the License.
   ======================================================================
*/
/**
 * SPAW Editor v.2 Main include file
 * 
 * Include this file in your script
 *   
 * @package spaw2
 * @author Alan Mendelevich <alan@solmetra.lt> 
 * @copyright UAB Solmetra   
 */ 
require_once(str_replace('\\\\','/',dirname(__FILE__)).'/config/config.php');
require_once(str_replace('\\\\','/',dirname(__FILE__)).'/class/editor.class.php');

// load plugin configs
$spaw_pgdir = SpawConfig::getStaticConfigValue('SPAW_ROOT').'plugins/';
if (is_dir($spaw_pgdir)) 
{
  if ($spaw_dh = opendir($spaw_pgdir)) 
  {
    while (($spaw_pg = readdir($spaw_dh)) != false) 
    {
      if ($spaw_pg != '.' && $spaw_pg != '..')
      {
        if (is_dir($spaw_pgdir.$spaw_pg.'/config'))
        {
          if ($spaw_pgdh = opendir($spaw_pgdir.$spaw_pg.'/config')) 
          {
            while (($spaw_fn = readdir($spaw_pgdh)) !== false) 
            {
              if ($spaw_fn != '.' && $spaw_fn != '..' && !is_dir($spaw_pgdir.$spaw_pg.'/config/'.$spaw_fn))
                include($spaw_pgdir.$spaw_pg.'/config/'.$spaw_fn);
            }
            closedir($spaw_pgdh);
          }
        }
      }
    }
    closedir($spaw_dh);
  }
}    
?>
