Пример #1
0
 */
if (!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
    exit('Access Denied');
}
@set_time_limit(600);
cpheader();
require_once libfile('function/cloud');
if (empty($admincp) || !is_object($admincp) || !$admincp->isfounder) {
    exit('Access Denied');
}
$adminscript = ADMINSCRIPT;
$cloudDomain = 'http://cp.discuz.qq.com';
if ($operation == 'doctor' || $operation == 'siteinfo') {
    $cloudstatus = checkcloudstatus(false);
} else {
    $cloudstatus = checkcloudstatus();
}
$forceOpen = $_GET['force_open'] == 1 ? true : false;
if (!$operation || $operation == 'open') {
    if ($cloudstatus == 'cloud' && !$forceOpen) {
        cpmsg('cloud_turnto_applist', '', 'succeed', array(), '<p class="marginbot"><a href="###" onclick="top.location = \'' . ADMINSCRIPT . '?frames=yes&action=cloud&operation=applist\'" class="lightlink">' . cplang('message_redirect') . '</a></p><script type="text/JavaScript">setTimeout("top.location = \'' . ADMINSCRIPT . '?frames=yes&action=cloud&operation=applist\'", 3000);</script>');
    } else {
        if ($_GET['getConfirmInfo']) {
            ajaxshowheader();
            ajaxshowfooter();
        }
        $step = max(1, intval($_G['gp_step']));
        $type = $cloudstatus == 'upgrade' ? 'upgrade' : 'open';
        if ($step == 1) {
            cloud_init_uniqueid();
            if ($cloudstatus == 'upgrade' || $cloudstatus == 'cloud' && $forceOpen) {
Пример #2
0
<?php

/**
 *      [Discuz!] (C)2001-2099 Comsenz Inc.
 *      This is NOT a freeware, use is subject to license terms
 *
 *      $Id: menu_cloud.php 23883 2011-08-15 03:47:39Z yexinhao $
 */
if (!defined('IN_DISCUZ')) {
    exit('Access Denied');
}
if ($isfounder) {
    $topmenu['cloud'] = '';
    require_once libfile('function/cloud');
    $cloudstatus = checkcloudstatus(false);
    if ($cloudstatus == 'cloud') {
        $menu['cloud'] = array(array('menu_cloud_applist', 'cloud_applist'), array('menu_cloud_siteinfo', 'cloud_siteinfo'), array('menu_cloud_doctor', 'cloud_doctor'));
        $apps = getcloudapps();
        if (is_array($apps) && $apps) {
            foreach ($apps as $app) {
                if ($app['status'] != 'close') {
                    array_push($menu['cloud'], array("menu_cloud_{$app['name']}", "cloud_{$app['name']}"));
                }
            }
        }
    } else {
        if ($cloudstatus == 'upgrade') {
            $menuitem = 'menu_cloud_upgrade';
        } else {
            $menuitem = 'menu_cloud_open';
        }