Esempio n. 1
0
            @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";
$packet['files'][] = "/stonefish_planting/module.php";
$packet['files'][] = "/stonefish_planting/processor.php";
$packet['files'][] = "/stonefish_planting/icon.jpg";
$packet['files'][] = "/stonefish_planting/preview.jpg";
$packet['files'][] = "/stonefish_planting/detail.jpg";
Esempio n. 2
0
 }
 if ($_W['isajax']) {
     message($upgrade_info, '', 'ajax');
 }
 if (!is_error($info)) {
     if (empty($_GPC['flag'])) {
         if (intval($_GPC['branch']) > $upgrade_info['version']['branch_id']) {
             header('location: ' . url('cloud/redirect/buybranch', array('m' => $id, 'branch' => intval($_GPC['branch']), 'type' => 'theme', 'is_upgrade' => 1)));
             exit;
         }
         load()->func('file');
         rmdirs(IA_ROOT . '/app/themes/' . $id, true);
         header('Location: ' . url('cloud/process', array('t' => $id, 'is_upgrade' => 1)));
         exit;
     } else {
         $packet = cloud_t_build($id);
         $manifest = ext_template_manifest_parse($packet['manifest']);
     }
 }
 if (empty($manifest)) {
     if ($batch == 1) {
         cache_write('upgrade:template', iserializer($wait_upgrade));
         message($theme['title'] . ' 模块安装配置文件不存在或是格式不正确。系统将进入下一个模板的更新。<br>请勿关闭浏览器', url('extension/theme/upgrade', array('batch' => 1)), 'success');
     }
     message('模块安装配置文件不存在或是格式不正确!', '', 'error');
 }
 if (ver_compare($theme['version'], $packet['version']) != -1) {
     if ($batch == 1) {
         cache_write('upgrade:template', iserializer($wait_upgrade));
         message($theme['title'] . ' 模板版本不低于要更新的版本。系统将进入下一个模板的更新。<br>请勿关闭浏览器', url('extension/theme/upgrade', array('batch' => 1)), 'success');
     }