<?php include_once dirname(__FILE__).'/include/altsys_functions.php' ; // language file (modinfo.php) altsys_include_language_file( 'modinfo' ) ; $modversion['name'] = _MI_ALTSYS_MODULENAME ; $modversion['version'] = '0.80' ; $modversion['description'] = _MI_ALTSYS_MODULEDESC ; $modversion['credits'] = "PEAK Corp."; $modversion['author'] = "GIJ=CHECKMATE<br />PEAK Corp.(http://www.peak.ne.jp/)" ; $modversion['license'] = "GPL see LICENSE"; $modversion['official'] = 0; $modversion['image'] = file_exists( $mydirpath.'/module_icon.png' ) ? 'module_icon.png' : 'module_icon.php' ; $modversion['dirname'] = "altsys"; // Admin things $modversion['hasAdmin'] = 1; $modversion['adminindex'] = "admin/index.php" ; $modversion['adminmenu'] = "admin/admin_menu.php"; // All Templates can't be touched by modulesadmin. $modversion['templates'] = array() ; // Blocks $modversion['blocks'][1] = array( 'file' => 'blocks.php' , 'name' => _MI_ALTSYS_BNAME_ADMIN_MENU , 'description' => '' , 'show_func' => 'b_altsys_admin_menu_show' ,
// only groups have 'module_admin' of 'altsys' can do that. $module_handler =& xoops_gethandler('module'); $module =& $module_handler->getByDirname('altsys'); if (!is_object($module)) { die('install altsys'); } $moduleperm_handler =& xoops_gethandler('groupperm'); if (!is_object(@$xoopsUser) || !$moduleperm_handler->checkRight('module_admin', $module->getVar('mid'), $xoopsUser->getGroups())) { die('only admin of altsys can access this area'); } // initials $db =& Database::getInstance(); $myts =& MyTextSanitizer::getInstance(); $langman =& D3LanguageManager::getInstance(); // language file of this controller altsys_include_language_file('mylangadmin'); // check $xoopsModule if (!is_object($xoopsModule)) { redirect_header(XOOPS_URL . '/user.php', 1, _NOPERM); } // set target_module if specified by $_GET['dirname'] $module_handler =& xoops_gethandler('module'); if (!empty($_GET['dirname'])) { $dirname = preg_replace('/[^0-9a-zA-Z_-]/', '', $_GET['dirname']); $target_module =& $module_handler->getByDirname($dirname); } if (!empty($target_module) && is_object($target_module)) { // specified by dirname (for langadmin as an independent module) $target_mid = $target_module->getVar('mid'); $target_dirname = $target_module->getVar('dirname'); $target_dirname4sql = addslashes($target_dirname);
include_once dirname(__FILE__) . '/include/Text_Diff_Renderer.php'; include_once dirname(__FILE__) . '/include/Text_Diff_Renderer_unified.php'; // only groups have 'module_admin' of 'altsys' can do that. $module_handler =& xoops_gethandler('module'); $module =& $module_handler->getByDirname('altsys'); $moduleperm_handler =& xoops_gethandler('groupperm'); if (!is_object(@$xoopsUser) || !$moduleperm_handler->checkRight('module_admin', $module->getVar('mid'), $xoopsUser->getGroups())) { die('only admin of altsys can access this area'); } //$xoops_system_path = XOOPS_ROOT_PATH . '/modules/system' ; // initials $db =& Database::getInstance(); $myts =& MyTextSanitizer::getInstance(); // language file altsys_include_language_file('mytplsform'); altsys_include_language_file('mytplsadmin'); // check $xoopsModule if (!is_object($xoopsModule)) { redirect_header(XOOPS_URL . '/user.php', 1, _NOPERM); } // check access right (needs system_admin of tplset) //$sysperm_handler =& xoops_gethandler('groupperm'); //if (!$sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_TPLSET, $xoopsUser->getGroups())) redirect_header( XOOPS_URL.'/user.php' , 1 , _NOPERM ) ; // tpl_file from $_GET $tpl_tplset = $myts->stripSlashesGPC(@$_GET['tpl_tplset']); if (!$tpl_tplset) { $tpl_tplset = $xoopsConfig['template_set']; } $tpl_tplset4sql = addslashes($tpl_tplset); if (empty($_GET['tpl_file']) || $_GET['tpl_file'] == '_custom') { $edit_mode = 'create';
// mypreferences.php (altsys) // // - XOOPS altenative preferences - // // GIJOE <http://www.peak.ne.jp/> // // ------------------------------------------------------------------------- // require_once dirname(__FILE__) . '/class/AltsysBreadcrumbs.class.php'; include_once dirname(__FILE__) . '/include/gtickets.php'; include_once dirname(__FILE__) . '/include/altsys_functions.php'; // check access right (needs module_admin of this module) if (!is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid())) { die('Access Denied'); } // initials $db =& Database::getInstance(); $myts =& MyTextSanitizer::getInstance(); // language file altsys_include_language_file('mypreferences'); $op = empty($_GET['op']) ? 'showmod' : preg_replace('/[^a-zA-Z0-9_-]/', '', $_GET['op']); if ($op == 'showmod') { $config_handler =& xoops_gethandler('config'); $mod = $xoopsModule->mid(); $config =& $config_handler->getConfigs(new Criteria('conf_modid', $mod)); $count = count($config); if ($count < 1) { die('no configs'); } include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; $form = new XoopsThemeForm(_MD_A_MYPREFERENCES_FORMTITLE, 'pref_form', 'index.php?mode=admin&lib=altsys&page=mypreferences&op=save'); $module_handler =& xoops_gethandler('module'); $module =& $module_handler->get($mod); // language $language = empty($xoopsConfig['language']) ? 'english' : $xoopsConfig['language'];
<?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'; include_once XOOPS_ROOT_PATH . '/class/xoopsblock.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'; $myba =& MyBlocksAdminForX22::getInstance(); break; 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';
<?php // ------------------------------------------------------------------------- // // get_templates.php (altsys) // // - XOOPS templates admin module - // // GIJOE <http://www.peak.ne.jp/> // // ------------------------------------------------------------------------- // error_reporting(0); include_once dirname(__FILE__) . '/include/gtickets.php'; include_once dirname(__FILE__) . '/include/altsys_functions.php'; // this page can be called only from altsys if ($xoopsModule->getVar('dirname') != 'altsys') { die('this page can be called only from altsys'); } // language file altsys_include_language_file('compilehookadmin'); if (!empty($_POST['download_zip'])) { require_once XOOPS_ROOT_PATH . '/class/zipdownloader.php'; $downloader = new XoopsZipDownloader(); $do_download = true; } else { if (!empty($_POST['download_tgz'])) { require_once XOOPS_ROOT_PATH . '/class/tardownloader.php'; $downloader = new XoopsTarDownloader(); $do_download = true; } } if (empty($do_download)) { exit; } $tplset = @$_POST['tplset'];
require_once dirname(__FILE__) . '/include/altsys_functions.php'; if (empty($xoopsModule)) { $moduleperm_handler =& xoops_gethandler('module'); $xoopsModule =& $moduleperm_handler->getByDirname('altsys'); } require XOOPS_ROOT_PATH . '/include/cp_functions.php'; // breadcrumbs $breadcrumbsObj =& AltsysBreadcrumbs::getInstance(); $breadcrumbsObj->appendPath(XOOPS_URL . '/modules/altsys/admin/index.php', $GLOBALS['xoopsModule']->getVar('name')); // get page $page = preg_replace('/[^a-zA-Z0-9_-]/', '', @$_GET['page']); require dirname(__FILE__) . '/controllers.php'; if (!in_array($page, $controllers)) { $_GET['page'] = $page = 'myblocksadmin'; $_SERVER['REQUEST_URI'] = '/admin/index.php?mode=admin&lib=altsys&page=myblocksadmin'; } // half measure ... (TODO) if (empty($_GET['dirname'])) { $module_handler =& xoops_gethandler('module'); list($top_module) = $module_handler->getObjects(new Criteria('isactive', 1)); $_GET['dirname'] = $top_module->getVar('dirname'); } // language file altsys_include_language_file($page); // branch to each pages $mytrustdirpath = dirname(__FILE__); if (file_exists(XOOPS_TRUST_PATH . '/libs/altsys/' . $page . '.php')) { include XOOPS_TRUST_PATH . '/libs/altsys/' . $page . '.php'; } else { die('wrong request'); }