예제 #1
0
     $msg = "<style>.dtb{border-bottom:1px dotted #cccccc}</style>\r\n    <table width='750' border='0' cellspacing='0' cellpadding='0'>\r\n  <tr>\r\n    <td width='200' height='28' class='dtb'>模块名称:</td>\r\n    <td width='550' class='dtb'>{$infos['name']}</td>\r\n  </tr>\r\n  <tr>\r\n    <td height='28' class='dtb'>语言:</td>\r\n    <td class='dtb'>{$infos['lang']} {$alertMsg}</td>\r\n  </tr>\r\n  <tr>\r\n    <td width='200' height='28' class='dtb'>文件大小:</td>\r\n    <td width='550' class='dtb'>{$infos['filesize']}</td>\r\n  </tr>\r\n  <tr>\r\n    <td height='28' class='dtb'>团队名称:</td>\r\n    <td class='dtb'>{$infos['team']}</td>\r\n  </tr>\r\n  <tr>\r\n    <td height='28' class='dtb'>发布时间:</td>\r\n    <td class='dtb'>{$infos['time']}</td>\r\n  </tr>\r\n  <tr>\r\n    <td height='28' class='dtb'>电子邮箱:</td>\r\n    <td class='dtb'>{$infos['email']}</td>\r\n  </tr>\r\n  <tr>\r\n    <td height='28' class='dtb'>官方网址:</td>\r\n    <td class='dtb'>{$infos['url']}</td>\r\n  </tr>\r\n  <tr>\r\n    <td height='28' class='dtb'>使用协议:</td>\r\n    <td class='dtb'><a href='module_main.php?action=showreadme&hash={$hash}' target='_blank'>点击浏览...</a></td>\r\n  </tr>\r\n  <tr>\r\n    <td height='28'>模块包含的文件:<br />(文件路径相对于当前目录)</td><td>&nbsp;</td>\r\n  </tr>\r\n  <tr>\r\n    <td height='164' colspan='2'>\r\n     <textarea name='filelists' id='filelists' style='width:90%;height:200px'>{$filelist}</textarea>\r\n    </td>\r\n  </tr>\r\n  <tr>\r\n    <td height='28'>对于模块的文件处理方法:</td>\r\n    <td>\r\n    <input type='radio' name='isreplace' value='0' checked='checked' />\r\n    手工删除文件,仅运行卸载程序\r\n   <input name='isreplace' type='radio' value='2' />\r\n    删除模块的所有文件\r\n   </td>\r\n  </tr>\r\n</table>\r\n    ";
     $win->AddMsgItem("<div style='padding-left:10px;line-height:150%'>{$msg}</div>");
     $winform = $win->GetWindow("ok", "");
     $win->Display();
     $dm->Clear();
     exit;
 } else {
     if ($action == 'uninstallok') {
         $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_module` WHERE hashcode LIKE '{$hash}' ");
         $dm = new DedeModule($mdir);
         $minfos = $dm->GetModuleInfo($hash);
         extract($minfos, EXTR_SKIP);
         if (!isset($moduletype) || $moduletype != 'patch') {
             $dm->DeleteFiles($hash, $isreplace);
         }
         @$dm->DelSystemFile($hash, 'readme');
         @$dm->DelSystemFile($hash, 'setup');
         $dm->Clear();
         if (!isset($autodel) || $autodel == 0) {
             include DEDEDATA . "/module/{$hash}-uninstall.php";
             @unlink(DEDEDATA . "/module/{$hash}-uninstall.php");
             exit;
         } else {
             @$dm->DelSystemFile($hash, 'uninstall');
             $delsql = $dm->GetSystemFile($hash, 'delsql');
             if (trim($delsql) != '') {
                 $sqls = explode(';', $delsql);
                 foreach ($sqls as $sql) {
                     if (trim($sql) != '') {
                         $dsql->ExecuteNoneQuery($sql);
                     }
예제 #2
0
</table>
	";
	$win->AddMsgItem("<div style='padding-left:20px;line-height:150%'>$msg</div>");
	$winform = $win->GetWindow("okonly","");
	$win->Display();
	$dm->Clear();
	exit();
}
/*--------------
function UnInstallRun();
--------------*/
else if($action=='uninstallok')
{
	$dm = new DedeModule($mdir);
	$dm->DeleteFiles($hash,$isreplace);
	$dm->DelSystemFile($hash,'readme');
	$dm->DelSystemFile($hash,'setup');
	$dm->Clear();
	ShowMsg("成功完成文件移除,现在转向设置清理程序&gt;&gt;","module/".$hash."-uninstall.php");
	exit();
}
/*--------------
function ShowReadme();
--------------*/
else if($action=='showreadme')
{
	$dm = new DedeModule($mdir);
	$msg = $dm->GetSystemFile($hash,'readme');
	$msg = preg_replace("/(.*)<body/isU","",$msg);
	$msg = preg_replace("/<\/body>(.*)/isU","",$msg);
	$dm->Clear();