//模块ID $appid = getgpc('appid'); //配置地址 $self = VI_ROOT . 'module/' . $appid . '/config.php'; //加载导航 include 'include/naver.setting.php'; if ($appid && file_exists($self) && (require $self)) { //模块配置 $app = $_G['module'][$appid]; //权限名称 $func = 'system-' . $app['model'] . '-set'; //检查权限 System::check_func($func, FALSE); $_GalSet = new Navigate(VI_ROOT . 'module/' . $appid . '/navigate.php', VI_ROOT . 'module/' . $appid . '/navigate.xml', $appid); if ($_GET["action"] == "update" && !empty($_POST)) { if ($_GalSet->save('POST')) { //连接数据库 System::connect(); //写入日志 System::insert_event($func, time(), time()); //关闭数据库 System::connect(); echo '<div id="state">成功修改模块配置,新配置将立即生效</div>'; } else { echo "<div id='state' class='failure'>保存模块配置失败!请检查 ./module/" . $appid . "/navigate.php 是否有读写权限</div>"; } } elseif ($_GalSet->writable() == FALSE) { echo "<div id='state' class='failure'>请检查 ./module/" . $appid . "/navigate.php 是否有读写权限</div>"; } $form = $_GalSet->transform(); ?>