コード例 #1
0
ファイル: extension.mod.php プロジェクト: hahamy/we7
function ext_template_manifest($tpl)
{
    $manifest = array();
    $filename = IA_ROOT . '/app/themes/' . $tpl . '/manifest.xml';
    if (!file_exists($filename)) {
        return array();
    }
    $manifest = ext_template_manifest_parse(file_get_contents($filename));
    if (empty($manifest['name']) || $manifest['name'] != $tpl) {
        return array();
    }
    return $manifest;
}
コード例 #2
0
ファイル: theme.ctrl.php プロジェクト: zhang19960118/html11
 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');
     }
     message('已安装的模板版本不低于要更新的版本, 操作无效.');
コード例 #3
0
ファイル: extension.mod.php プロジェクト: noikiy/mygit
function ext_template_manifest($tpl, $cloud = true)
{
    $filename = IA_ROOT . '/app/themes/' . $tpl . '/manifest.xml';
    if (!file_exists($filename)) {
        if ($cloud) {
            load()->model('cloud');
            $manifest = cloud_t_info($tpl);
        }
        return is_error($manifest) ? array() : $manifest;
    }
    $manifest = ext_template_manifest_parse(file_get_contents($filename));
    if (empty($manifest['name']) || $manifest['name'] != $tpl) {
        return array();
    }
    return $manifest;
}