Load(); $action = 'root'; if (!$zbp->CheckRights($action)) { $zbp->ShowError(6); die(); } if (!$zbp->CheckPlugin('zxd_ctrlcenter')) { $zbp->ShowError(48); die(); } $blogtitle = '控制中心'; require $blogpath . 'zb_system/admin/admin_header.php'; require $blogpath . 'zb_system/admin/admin_top.php'; /* 公共头部结束 */ // 当前用户打开的子插件 if(!empty($_GET['plugin'])) $PluginName = trim($_GET['plugin']); // trim函数去除获得参数的首尾空格 else $PluginName = ""; if($PluginName=="home") $PluginName=""; // 如果请求的是首页,$PluginName设置为空 // 初始化全局变量 require $blogpath.'zb_users/plugin/zxd_ctrlcenter/config.php'; // 为后续两次遍历定义变量 $dir=$zbp->Config('zxd_ctrlcenter')->path.'plugin/'; // 遍历子插件所在Plugin目录 $file_arr = scandir($dir); ?>
Config('zxd_ctrlcenter')->path,$zbp->Config('zxd_ctrlcenter')->urlpath,$newpath); include $newpath.'manage/config.php'; /*包含插件的名称$PluginTitle*/ include $newpath.'manage/status.php'; // 检查插件是否启用,status.php ?>
子插件名称 操作
" style="width:32px; height:32px;"/> 停用" onclick="window.open().location = ''; ">    管理
Config('zxd_ctrlcenter')->path.'about/readme.html'; // 插件介绍,readme.html $copyrightfilepath = $zbp->Config('zxd_ctrlcenter')->relativepath; // 设置版权信息文件,plugin.xml include $zbp->Config('zxd_ctrlcenter')->path.'public/copyright.php'; // 添加版权信息 $PluginTitle = "关于"; } elseif ($PluginName == "DeleteConfig") /* 清除设置 */ {// style="hidden // $PluginTitle = "清除所有设置"; ?>
var result = confirm('你真的想要清除本插件的全部设置吗?\\r\\n注意:插件设置一经清除,无法恢复!\\r\\n您确认要清除吗?'); document.writeln(result);"; // echo ''; // if($result2!="true") { goto QuitDeleteConfig; } //require $zbp->Config('zxd_ctrlcenter')->path.'public/Delete-ctrlcenter-Config.php'; // // // if(!$result1) // $result =""; // if($result){ // } } else /* 插件页(或者插件不存在) */ { require $zbp->Config('zxd_ctrlcenter')->path.'plugin/'.$PluginName.'/manage/status.php'; // 检查插件是否启用,status.php【如果插件不存在这里会报错】 require $zbp->Config('zxd_ctrlcenter')->path.'plugin/'.$PluginName.'/manage/config.php'; // 插件config页,config.php(包含插件的名称$PluginTitle) if($PluginIntro!="") // 如果插件有信息页面,则输出信息页面,否则不输出 echo $PluginIntro."
"; // 插件config页,config.php中的$PluginIntro变量 if($pluginstatus) /* 插件已启用 */ { require $zbp->Config('zxd_ctrlcenter')->path.'public/plugin-disbtn.php'; // 添加禁用插件按钮 echo "
"; if(file_exists($zbp->Config('zxd_ctrlcenter')->path.'plugin/'.$PluginName.'/main.php')) // 如果插件有设置页面,则输出设置页面,否则不输出 require $zbp->Config('zxd_ctrlcenter')->path.'plugin/'.$PluginName.'/main.php'; // 插件设置页,main.php } else /* 插件未启用 */ { require $zbp->Config('zxd_ctrlcenter')->path.'public/plugin-enbbtn.php'; // 添加启用插件按钮 echo "
"; } $copyrightfilepath =$zbp->Config('zxd_ctrlcenter')->relativepath.'plugin/'.$PluginName.'/'; // 设置版权信息文件,plugin.xml include $zbp->Config('zxd_ctrlcenter')->path.'public/copyright.php'; // 添加版权信息 } ?>