<?php
// ------------------------------------------------------------------------- //
//                       myblocksadmin.php (altsys)                          //
//                - XOOPS block admin for each modules -                     //
//                       GIJOE <http://www.peak.ne.jp/>                      //
// ------------------------------------------------------------------------- //
require_once dirname(__FILE__).'/class/AltsysBreadcrumbs.class.php' ;
require_once dirname(__FILE__).'/include/gtickets.php' ;
include_once dirname(__FILE__).'/include/altsys_functions.php' ;
include_once dirname(__FILE__).'/include/mygrouppermform.php' ;


// language file
altsys_include_language_file( 'myblocksadmin' ) ;

// fork by core types
switch( altsys_get_core_type() ) {
	case ALTSYS_CORE_TYPE_X22 :
		include_once dirname(__FILE__).'/class/MyBlocksAdminForX22.class.php' ;
		$BA = new MyBlocksAdminForX22();
		$myba =& $BA -> getInstance() ;
		break ;
	case ALTSYS_CORE_TYPE_XCL21 :
		include_once dirname(__FILE__).'/class/MyBlocksAdminForXCL21.class.php' ;
		$BA = new MyBlocksAdminForXCL21();
		$myba =& $BA -> getInstance() ;
		break ;
	case ALTSYS_CORE_TYPE_ICMS :
		include_once dirname(__FILE__).'/class/MyBlocksAdminForICMS.class.php' ;
		$BA = new MyBlocksAdminForICMS();
		$myba =& $BA -> getInstance() ;
		break ;
	case ALTSYS_CORE_TYPE_X20S :
	case ALTSYS_CORE_TYPE_X23P :
		include_once dirname(__FILE__).'/class/MyBlocksAdminForX20S.class.php' ;
		$BA = new MyBlocksAdminForX20S();
		$myba =& $BA -> getInstance() ;
		break ;
	default :
		include_once dirname(__FILE__).'/class/MyBlocksAdmin.class.php' ;
		$BA = new MyBlocksAdmin();
		$myba =& $BA -> getInstance() ;
		break ;
}

// permission
$myba->checkPermission() ;

// set parameters target_mid , target_dirname etc.
$myba->init( $xoopsModule ) ;


//
// transaction stage
//

if( ! empty( $_POST ) ) {
	$myba->processPost() ;
}

//
// form stage
//

// header
icms_cp_header() ;

// mymenu
altsys_include_mymenu() ;

$myba->processGet() ;

// footer
icms_cp_footer() ;


?>
