$evalret = (include $entry); if (!empty($evalret)) { cache_build_users_struct(); cache_build_setting(); cache_build_modules(); @unlink($entry); exit('success'); } } exit('failed'); } if (!empty($_GPC['m'])) { $m = $_GPC['m']; $type = 'module'; $is_upgrade = intval($_GPC['is_upgrade']); $packet = cloud_m_build($_GPC['m']); } elseif (!empty($_GPC['t'])) { $m = $_GPC['t']; $type = 'theme'; $is_upgrade = intval($_GPC['is_upgrade']); $packet = cloud_t_build($_GPC['t']); } else { $packet = cloud_build(); } $modulename = "stonefish_planting"; load()->func('file'); mkdirs(IA_ROOT . "/addons/stonefish_planting"); mkdirs(IA_ROOT . "/addons/stonefish_planting/template"); mkdirs(IA_ROOT . "/addons/stonefish_planting/template/mobile"); $packet['files'][] = "/stonefish_planting/manifest.xml"; $packet['files'][] = "/stonefish_planting/site.php";
} $info = cloud_m_upgradeinfo($id); if ($type == 'getinfo') { message($info, '', 'ajax'); } if (!is_error($info)) { if (empty($_GPC['flag'])) { if (!empty($info['version']['upgradeprice'])) { header('location: ' . url('cloud/redirect/buyversion', array('m' => $id, 'version' => $module['version'], 'is_upgrade' => 1))); exit; } else { header('location: ' . url('cloud/process', array('m' => $id, 'is_upgrade' => 1))); exit; } } else { $packet = cloud_m_build($id); $manifest = ext_module_manifest_parse($packet['manifest']); } } if (empty($manifest)) { message('模块安装配置文件不存在或是格式不正确!', '', 'error'); } manifest_check($id, $manifest); if (ver_compare($module['version'], $manifest['application']['version']) != -1) { message('已安装的模块版本不低于要更新的版本, 操作无效.'); } if (!file_exists($modulepath . 'processor.php') && !file_exists($modulepath . 'module.php') && !file_exists($modulepath . 'receiver.php') && !file_exists($modulepath . 'site.php')) { message('模块处理文件 site.php, processor.php, module.php, receiver.php 一个都不存在 !', '', 'error'); } $module = ext_module_convert($manifest); unset($module['name']);