| @@ -108,7 +108,7 @@ else if ($action == 'setup') { | |||||
| exit; | exit; | ||||
| } | } | ||||
| $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '<br>(这个模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性)'); | $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '<br>(这个模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性)'); | ||||
| $filelists = $dm->GetFileLists($hash); | |||||
| $filelists = (array)$dm->GetFileLists($hash); | |||||
| $filelist = ''; | $filelist = ''; | ||||
| $prvdirs = array(); | $prvdirs = array(); | ||||
| $incdir = array(); | $incdir = array(); | ||||
| @@ -150,6 +150,16 @@ else if ($action == 'setup') { | |||||
| $win = new OxWindow(); | $win = new OxWindow(); | ||||
| $win->Init("module_main.php", "js/blank.js", "post"); | $win->Init("module_main.php", "js/blank.js", "post"); | ||||
| $wecome_info = "模块管理"; | $wecome_info = "模块管理"; | ||||
| $devURL = DEDECDNURL."/developers/{$infos['dev_id']}.json"; | |||||
| $dhd = new DedeHttpDown(); | |||||
| $dhd->OpenUrl($devURL); | |||||
| $devContent = $dhd->GetHtml(); | |||||
| $devInfo = (array)json_decode($devContent); | |||||
| $s = "未认证"; | |||||
| if (($devInfo['dev_id'] == $infos['dev_id']) && !empty($devInfo['dev_id'])) { | |||||
| $s = "已认证"; | |||||
| } | |||||
| $win->AddTitle(" <a href='module_main.php'>模块管理</a> >> 安装模块:{$infos['name']}"); | $win->AddTitle(" <a href='module_main.php'>模块管理</a> >> 安装模块:{$infos['name']}"); | ||||
| $win->AddHidden("hash", $hash); | $win->AddHidden("hash", $hash); | ||||
| $win->AddHidden("action", 'setupstart'); | $win->AddHidden("action", 'setupstart'); | ||||
| @@ -169,7 +179,7 @@ else if ($action == 'setup') { | |||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <td height='26' class='dtb'>开发者ID:</td> | <td height='26' class='dtb'>开发者ID:</td> | ||||
| <td class='dtb'>{$infos['dev_id']} <a href='{$cfg_biz_dedebizUrl}/developer?dev_id={$infos['dev_id']}' target='_blank' class='btn btn-danger btn-sm'>未认证</a></td> | |||||
| <td class='dtb'>{$infos['dev_id']} <a href='{$cfg_biz_dedebizUrl}/developer?dev_id={$infos['dev_id']}' target='_blank' class='btn btn-success btn-sm'>{$s}</a></td> | |||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <td height='26' class='dtb'>发布时间:</td> | <td height='26' class='dtb'>发布时间:</td> | ||||
| @@ -221,7 +231,7 @@ else if ($action == 'setupstart') { | |||||
| exit(); | exit(); | ||||
| } | } | ||||
| $dm = new DedeModule($mdir); | $dm = new DedeModule($mdir); | ||||
| $minfos = $dm->GetModuleInfo($hash); | |||||
| $minfos = (array)$dm->GetModuleInfo($hash); | |||||
| extract($minfos, EXTR_SKIP); | extract($minfos, EXTR_SKIP); | ||||
| $menustring = addslashes($dm->GetSystemFile($hash, 'menustring')); | $menustring = addslashes($dm->GetSystemFile($hash, 'menustring')); | ||||
| $indexurl = str_replace('**', '=', $indexurl); | $indexurl = str_replace('**', '=', $indexurl); | ||||
| @@ -338,7 +348,7 @@ else if ($action == 'uninstall') { | |||||
| $infos = $dm->GetModuleInfo($hash); | $infos = $dm->GetModuleInfo($hash); | ||||
| if ($infos['url'] == '') $infos['url'] = ' '; | if ($infos['url'] == '') $infos['url'] = ' '; | ||||
| $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '<br>(这个模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性)'); | $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '<br>(这个模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性)'); | ||||
| $filelists = $dm->GetFileLists($hash); | |||||
| $filelists = (array)$dm->GetFileLists($hash); | |||||
| $filelist = ''; | $filelist = ''; | ||||
| foreach ($filelists as $v) { | foreach ($filelists as $v) { | ||||
| if (empty($v['name'])) continue; | if (empty($v['name'])) continue; | ||||
| @@ -407,7 +417,7 @@ function UnInstallRun(); | |||||
| else if ($action == 'uninstallok') { | else if ($action == 'uninstallok') { | ||||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_module` WHERE hashcode LIKE '$hash' "); | $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_module` WHERE hashcode LIKE '$hash' "); | ||||
| $dm = new DedeModule($mdir); | $dm = new DedeModule($mdir); | ||||
| $minfos = $dm->GetModuleInfo($hash); | |||||
| $minfos = (array)$dm->GetModuleInfo($hash); | |||||
| extract($minfos, EXTR_SKIP); | extract($minfos, EXTR_SKIP); | ||||
| if (!isset($moduletype) || $moduletype != 'patch') { | if (!isset($moduletype) || $moduletype != 'patch') { | ||||
| $dm->DeleteFiles($hash, $isreplace); | $dm->DeleteFiles($hash, $isreplace); | ||||
| @@ -464,9 +474,18 @@ else if ($action == 'view') { | |||||
| $infos = $dm->GetModuleInfo($hash); | $infos = $dm->GetModuleInfo($hash); | ||||
| if ($infos['url'] == '') $infos['url'] = ' '; | if ($infos['url'] == '') $infos['url'] = ' '; | ||||
| $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '<br>(这个模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性)'); | $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '<br>(这个模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性)'); | ||||
| $filelists = $dm->GetFileLists($hash); | |||||
| $filelists = (array)$dm->GetFileLists($hash); | |||||
| $filelist = ''; | $filelist = ''; | ||||
| $setupinfo = ''; | $setupinfo = ''; | ||||
| $devURL = DEDECDNURL."/developers/{$infos['dev_id']}.json"; | |||||
| $dhd = new DedeHttpDown(); | |||||
| $dhd->OpenUrl($devURL); | |||||
| $devContent = $dhd->GetHtml(); | |||||
| $devInfo = (array)json_decode($devContent); | |||||
| $s = "未认证"; | |||||
| if (($devInfo['dev_id'] == $infos['dev_id']) && !empty($devInfo['dev_id'])) { | |||||
| $s = "已认证"; | |||||
| } | |||||
| foreach ($filelists as $v) { | foreach ($filelists as $v) { | ||||
| if (empty($v['name'])) continue; | if (empty($v['name'])) continue; | ||||
| if ($v['type'] == 'dir') $v['type'] = '目录'; | if ($v['type'] == 'dir') $v['type'] = '目录'; | ||||
| @@ -478,7 +497,8 @@ else if ($action == 'view') { | |||||
| } else { | } else { | ||||
| $setupinfo = "未安装 <a href='module_main.php?action=setup&hash={$hash}'>安装</a>"; | $setupinfo = "未安装 <a href='module_main.php?action=setup&hash={$hash}'>安装</a>"; | ||||
| } | } | ||||
| $dev_id = empty($infos['dev_id'])? "<a href='module_main.php?action=setup&hash={$hash}' class='btn btn-success btn-sm'>安装</a><a href='{$cfg_biz_dedebizUrl}/developer' target='_blank' class='btn btn-danger btn-sm'>未认证</a>" : "{$infos['dev_id']} <a href='{$cfg_biz_dedebizUrl}/developer?dev_id={$infos['dev_id']}' target='_blank' class='btn btn-danger btn-sm'>未认证</a>"; | |||||
| $dev_id = empty($infos['dev_id'])? "<a href='module_main.php?action=setup&hash={$hash}' class='btn btn-success btn-sm'>安装</a><a href='{$cfg_biz_dedebizUrl}/developer' target='_blank' class='btn btn-danger btn-sm'>{$s}</a>" : "{$infos['dev_id']} <a href='{$cfg_biz_dedebizUrl}/developer?dev_id={$infos['dev_id']}' target='_blank' class='btn btn-danger btn-sm'>{$s}</a>"; | |||||
| $win = new OxWindow(); | $win = new OxWindow(); | ||||
| $win->Init("", "js/blank.js", ""); | $win->Init("", "js/blank.js", ""); | ||||
| $wecome_info = "模块管理"; | $wecome_info = "模块管理"; | ||||
| @@ -529,7 +549,7 @@ function Edit(); | |||||
| --------------*/ | --------------*/ | ||||
| else if ($action == 'edit') { | else if ($action == 'edit') { | ||||
| $dm = new DedeModule($mdir); | $dm = new DedeModule($mdir); | ||||
| $minfos = $dm->GetModuleInfo($hash); | |||||
| $minfos = (array)$dm->GetModuleInfo($hash); | |||||
| extract($minfos, EXTR_SKIP); | extract($minfos, EXTR_SKIP); | ||||
| if (!isset($lang)) $lang = 'gb2312'; | if (!isset($lang)) $lang = 'gb2312'; | ||||
| if (!isset($moduletype)) $moduletype = 'soft'; | if (!isset($moduletype)) $moduletype = 'soft'; | ||||