function setcloudappstatus($appName, $status, $usecache = true, $updatecache = true) { $method = 'setcloudappstatus_' . $appName; if (!function_exists($method)) { return false; } if (!@call_user_func($method, $appName, $status)) { return false; } $apps = getcloudapps($usecache); $app = array('name' => $appName, 'status' => $status); $apps[$appName] = $app; $apps = addslashes(serialize($apps)); $res = DB::insert('common_setting', array('skey' => 'cloud_apps', 'svalue' => $apps), false, true); if (!empty($updatecache)) { require_once libfile('function/cache'); updatecache(array('plugin', 'setting', 'styles')); } return $res; }
} } } elseif ($operation == 'applist') { if ($cloudstatus != 'cloud') { cpmsg('cloud_open_first', '', 'succeed', array(), '<p class="marginbot"><a href="###" onclick="top.location = \'' . ADMINSCRIPT . '?frames=yes&action=cloud&operation=open\'" class="lightlink">' . cplang('message_redirect') . '</a></p><script type="text/JavaScript">setTimeout("top.location = \'' . ADMINSCRIPT . '?frames=yes&action=cloud&operation=open\'", 3000);</script>'); } $signParams = array('refer' => $_G['siteurl'], 'ADTAG' => 'CP.DISCUZ.APPLIST'); $signUrl = generateSiteSignUrl($signParams); headerLocation($cloudDomain . '/cloud/appList/?' . $signUrl); } elseif (in_array($operation, array('siteinfo', 'doctor'))) { require libfile("cloud/{$operation}", 'admincp'); } elseif (in_array($operation, array('manyou', 'connect', 'security', 'stats', 'search', 'smilies', 'qqgroup', 'union', 'storage'))) { if ($cloudstatus != 'cloud') { cpmsg('cloud_open_first', '', 'succeed', array(), '<p class="marginbot"><a href="###" onclick="top.location = \'' . ADMINSCRIPT . '?frames=yes&action=cloud&operation=open\'" class="lightlink">' . cplang('message_redirect') . '</a></p><script type="text/JavaScript">setTimeout("top.location = \'' . ADMINSCRIPT . '?frames=yes&action=cloud&operation=open\'", 3000);</script>'); } $apps = getcloudapps(); if (empty($apps) || empty($apps[$operation]) || $apps[$operation]['status'] == 'close') { cpmsg('cloud_application_close', 'action=cloud&operation=applist', 'error'); } if ($apps[$operation]['status'] == 'disable') { cpmsg('cloud_application_disable', 'action=cloud&operation=applist', 'error'); } require libfile("cloud/{$operation}", 'admincp'); } else { exit('Access Denied'); } function manyouSync() { global $_G; $setting = $_G['setting']; $my_url = 'http://api.manyou.com/uchome.php';
function onCloudGetApps($appName = '') { require_once libfile('function/cloud'); $apps = getcloudapps(false); if ($appName) { $apps = array($appName => $apps[$appName]); } $apps['apiVersion'] = cloud_get_api_version(); $apps['siteInfo'] = $this->_getBaseInfo(); return $apps; }