<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: admincp_cloud.php 22897 2011-05-30 09:19:11Z zhouguoqiang $
*/
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) ) {
exit('Access Denied');
}
//需限制的地方
if(!$admincp->isfounder && !isset($GLOBALS['admincp']->perms['all'])) {
if(array_key_exists("cloud_".$operation, $GLOBALS['admincp']->perms)) {
$itemexists_ok = 1;
} else {
cpmsg('action_noaccess', '', 'error');
}
}
$adminscript = ADMINSCRIPT;
$cloudDomain = 'http://cp.discuz.qq.com';
if($operation != 'doctor') {
$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) {
if($cloudstatus == 'upgrade' || ($cloudstatus == 'cloud' && $forceOpen)) {
shownav('navcloud', 'menu_cloud_upgrade');
$itemtitle = cplang('menu_cloud_upgrade');
} else {
shownav('navcloud', 'menu_cloud_open');
$itemtitle = cplang('menu_cloud_open');
}
echo '
<div class="itemtitle">
<h3>'.$itemtitle.'</h3>
<ul style="margin-right: 10px;" class="tab1"></ul>
<ul class="stepstat" id="nav_steps"></ul>
<ul class="tab1"></ul>
</div>
<div id="loading">
<div id="loadinginner" style="display: block; padding: 100px 0; text-align: center; color: #999;">
<img src="'.$_G['style']['imgdir'].'/loading.gif" alt="loading..." style="vertical-align: middle;" /> '.$lang['cloud_page_loading'].'
</div>
</div>
<div style="display:none;" id="title"></div>';
showformheader("", 'onsubmit="return submitForm();"');
if($cloudstatus == 'upgrade' || ($cloudstatus == 'cloud' && $forceOpen)) {
echo '<div style="margin-top:10px; color: red; padding-left: 10px;" id="manyou_update_tips"></div>';
}
showtableheader('', '', 'id="mainArea" style="display:none;"');
echo '
<tr><td id="" style="border:none;"><div id="msg" class="tipsblock"></div></td></tr>
<tr><td style="border-top:none;"><br />
<label><input onclick="if(this.checked) {$(\'submit_submit\').disabled=false; $(\'submit_submit\').style.color=\'#000\';} else {$(\'submit_submit\').disabled=true; $(\'submit_submit\').style.color=\'#aaa\';}" id="agreeProtocal" class="checkbox" type="checkbox" checked="checked" value="1" />' . cplang('cloud_agree_protocal') . '</label><a id="protocal_url" href="javascript:;" target="_blank">' . cplang('read_protocal') . '</a>
</td>
</tr>';
showsubmit('submit', 'cloud_will_open');
showtablefooter();
showformfooter();
echo '
<div id="siteInfo" style="display:none;;">
<h3 class="flb"><em>'.cplang('message_title').'</em><span><a href="javascript:;" class="flbc" onclick="hideWindow(\'null\');" title="'.cplang('close').'">'.cplang('close').'</a></span></h3>';
showformheader("cloud&operation=open&step=2".(($cloudstatus == 'cloud' && $forceOpen) ? '&force_open=1' : ''), '');
echo '
<div class="c">
<div class="tplw">
<p class="mbn tahfx">
<strong>'.cplang('jump_to_cloud').'</strong><input type="hidden" id="cloud_api_ip" name="cloud_api_ip" value="" />
</p>
</div>
</div>
<div class="o pns"><button type="submit" class="pn pnc" id="btn_1"><span>'.cplang('continue').'</span></button></div>';
showformfooter();
echo "</div>";
echo <<<EOT
<link rel="stylesheet" type="text/css" href="static/image/admincp/cloud/cloud.css" />
<script type="text/javascript" src="static/image/admincp/cloud/cloud.js"></script>
<script type="text/JavaScript">
var cloudStatus = "$cloudstatus";
var disallowfloat = 'siteInfo';
var cloudApiIp = '';
var dialogHtml = '';
var getMsg = false;
var millisec = 10 * 1000; //10秒
var expirationText = '{$lang['cloud_time_out']}';
expirationTimeout = setTimeout("expiration()", millisec);
</script>
EOT;
$introUrl = $cloudDomain.'/cloud/introduction';
if($cloudstatus == 'upgrade') {
$params = array('type' => 'upgrade');
if ($_G['setting']['my_app_status']) {
$params['apps']['manyou'] = array('status' => true);
}
if (isset($_G['setting']['my_search_status'])) {
$params['apps']['search'] = array('status' => !empty($_G['setting']['my_search_status']) ? true : false);
$oldSiteId = empty($_G['setting']['my_siteid_old'])?'':$_G['setting']['my_siteid_old'];
$oldSitekeySign = empty($_G['setting']['my_sitekey_sign_old'])?'':$_G['setting']['my_sitekey_sign_old'];
if($oldSiteId && $oldSiteId != $_G['setting']['my_siteid'] && $oldSitekeySign) {
$params['apps']['search']['oldSiteId'] = $oldSiteId;
$params['apps']['search']['searchSig'] = $oldSitekeySign;
}
}
if (isset($_G['setting']['connect'])) {
$params['apps']['connect'] = array('status' => !empty($_G['setting']['connect']['allow']) ? true : false);
$oldSiteId = empty($_G['setting']['connectsiteid'])?'':$_G['setting']['connectsiteid'];
$oldSitekey = empty($_G['setting']['connectsitekey'])?'':$_G['setting']['connectsitekey'];
if($oldSiteId && $oldSiteId != $_G['setting']['my_siteid'] && $oldSitekey) {
$params['apps']['connect']['oldSiteId'] = $oldSiteId;
$params['apps']['connect']['connectSig'] = substr(md5(substr(md5($oldSiteId.'|'.$oldSitekey), 0, 16)), 16, 16);
}
}
$params['ADTAG'] = 'CP.DISCUZ.INTRODUCTION';
$signUrl = generateSiteSignUrl($params);
$introUrl .= '?'.$signUrl;
}
echo '<script type="text/JavaScript" charset="UTF-8" src="'.$introUrl.'"></script>';
} elseif($step == 2) {
$statsUrl = $cloudDomain . '/cloud/stats/registerclick';
echo '<script type="text/JavaScript" charset="UTF-8" src="'.$statsUrl.'"></script>';
if($_G['setting']['my_siteid'] && $_G['setting']['my_sitekey']) {
if($_G['setting']['my_app_status']) {
manyouSync();
}
$registerResult = upgrademanyou($_G['gp_cloud_api_ip']);
} else {
$registerResult = registercloud($_G['gp_cloud_api_ip']);
}
if($registerResult['errCode'] === 0) {
$bindUrl = $cloudDomain.'/bind/index?'.generateSiteSignUrl(array('ADTAG' => 'CP.CLOUD.BIND.INDEX'));
die('<script>top.location="' . $bindUrl . '";</script>');
} elseif($registerResult['errCode'] == 1) {
cpmsg('cloud_unknown_dns', '', 'error');
} elseif($registerResult['errCode'] == 2) {
cpmsg('cloud_network_busy', '', 'error', $registerResult);
} else {
$checkUrl = preg_match('/<a.+?>.+?<\/a>/i', $registerResult['errMessage'], $results);
if($checkUrl) {
foreach($results as $key => $result) {
$registerResult['errMessage'] = str_replace($result, '{replace_' . $key . '}', $registerResult['errMessage']);
$msgValues = array('replace_' . $key => $result);
}
}
cpmsg($registerResult['errMessage'], '', 'error', $msgValues);
}
}
}
} elseif($operation == 'applist') {
if($cloudstatus != 'cloud') {
cpmsg('cloud_open_first', '', 'succeed', array(), '<p class="marginbot"><a href="###" onclick="top.location = \
没有合适的资源?快使用搜索试试~ 我知道了~
discuzX2.0 云平台非创始人QQ群推送补丁包
共2个文件
php:2个
需积分: 10 6 下载量 81 浏览量
2011-08-26
15:38:23
上传
评论
收藏 5KB RAR 举报
温馨提示
discuzX2.0 目前云平台中 QQ群 信息推送,也需要论坛创始人的权限才能操作,十分不方便,也对论坛本身的安全性带来隐患,这个补丁包,将此部分功能剥离出来,通过论坛后台管理团队可单独对QQ群推送进行权限管理,使其下放给指定后台管理员,而对论坛本身其它高级权限没有影响
资源推荐
资源详情
资源评论
收起资源包目录
upload20110817.rar (2个子文件)
upload
source
admincp
admincp_cloud.php 11KB
menu
menu_cloud.php 2KB
共 2 条
- 1
资源评论
单雨修
- 粉丝: 0
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功