예제 #1
0
    } else {
        return FALSE;
    }
}
/*--------------
function ShowAll();
--------------*/
if ($action == '') {
    $types = array('soft' => '模块', 'templets' => '模板', 'plus' => '小插件', 'patch' => '补丁');
    $dm = new DedeModule($mdir);
    if (empty($moduletype)) {
        $moduletype = '';
    }
    $modules_remote = $dm->GetModuleUrlList($moduletype, $mdurl);
    $modules = array();
    $modules = $dm->GetModuleList($moduletype);
    is_array($modules) || ($modules = array());
    $modules = array_merge($modules, $modules_remote);
    require_once dirname(__FILE__) . "/templets/module_main.htm";
    $dm->Clear();
    exit;
} else {
    if ($action == 'setup') {
        $dm = new DedeModule($mdir);
        $infos = $dm->GetModuleInfo($hash);
        if ($infos['url'] == '') {
            $infos['url'] = ' ';
        }
        $alertMsg = $infos['lang'] == $cfg_soft_lang ? '' : '<br /><font color="red">(这个模块的语言编码与你系统的编码不一致,请向开发者确认它的兼容性)</font>';
        $filelists = $dm->GetFileLists($hash);
        $filelist = '';
예제 #2
0
<?php
require_once(dirname(__FILE__)."/config.php");
CheckPurview('sys_module');
require_once(dirname(__FILE__)."/../include/inc_modules.php");
require_once(dirname(__FILE__)."/../include/pub_oxwindow.php");
if(empty($action)) $action = '';
$mdir = dirname(__FILE__).'/module';
if($action=='')
{
	$dm = new DedeModule($mdir);
	$modules = $dm->GetModuleList();
  require_once(dirname(__FILE__)."/templets/module_main.htm");
  $dm->Clear();
  exit();
}
/*--------------
function Setup();
--------------*/
else if($action=='setup')
{
	$dm = new DedeModule($mdir);
	$infos = $dm->GetModuleInfo($hash);
	$filelists = $dm->GetFileLists($hash);
	$filelist = '';
	foreach($filelists as $v)
	{
		if(empty($v['name'])) continue;
		if($v['type']=='dir') $v['type'] = '目录';
		else $v['type'] = '文件';
		$filelist .= "{$v['type']}|{$v['name']}\r\n";
	}