Exemplo n.º 1
0
 public static function &getInstance()
 {
     static $instance;
     if (!isset($instance)) {
         $instance = new MyBlocksAdmin();
         $instance->construct();
     }
     return $instance;
 }
 function construct()
 {
     parent::construct();
     @(include_once XOOPS_ROOT_PATH . '/modules/system/language/' . $this->lang . '/admin/blocksadmin.php');
     $result = $this->db->query("SELECT id,pname,title FROM " . $this->db->prefix("block_positions"));
     while (list($id, $pname, $title) = $this->db->fetchRow($result)) {
         $this->block_positions[$id] = defined($title) ? constant($title) : $title;
     }
     $this->block_positions[-1] = _NONE;
 }
Exemplo n.º 3
0
 function construct()
 {
     parent::construct();
     @(include_once XOOPS_ROOT_PATH . '/modules/system/language/' . $this->lang . '/admin/blocksadmin.php');
 }
 function construct()
 {
     parent::construct();
     @(include_once XOOPS_ROOT_PATH . '/modules/system/language/' . $this->lang . '/admin/blocksadmin.php');
     $this->block_positions = array(-1 => _NONE, 0 => _AM_SBLEFT, 1 => _AM_SBRIGHT, 3 => _AM_CBLEFT, 4 => _AM_CBRIGHT, 5 => _AM_CBCENTER, 7 => _AM_CBBOTTOMLEFT, 8 => _AM_CBBOTTOMRIGHT, 9 => _AM_CBBOTTOM);
 }
    case ALTSYS_CORE_TYPE_XCL21:
        include_once dirname(__FILE__) . '/class/MyBlocksAdminForXCL21.class.php';
        $myba =& MyBlocksAdminForXCL21::getInstance();
        break;
    case ALTSYS_CORE_TYPE_ICMS:
        include_once dirname(__FILE__) . '/class/MyBlocksAdminForICMS.class.php';
        $myba =& MyBlocksAdminForICMS::getInstance();
        break;
    case ALTSYS_CORE_TYPE_X20S:
    case ALTSYS_CORE_TYPE_X23P:
        include_once dirname(__FILE__) . '/class/MyBlocksAdminForX20S.class.php';
        $myba =& MyBlocksAdminForX20S::getInstance();
        break;
    default:
        include_once dirname(__FILE__) . '/class/MyBlocksAdmin.class.php';
        $myba =& MyBlocksAdmin::getInstance();
        break;
}
// permission
$myba->checkPermission();
// set parameters target_mid , target_dirname etc.
$myba->init($xoopsModule);
//
// transaction stage
//
if (!empty($_POST)) {
    $myba->processPost();
}
//
// form stage
//