Beispiel #1
0
 function onCloudSetApps($apps)
 {
     if (!is_array($apps)) {
         return false;
     }
     require_once libfile('function/cloud');
     $res = array();
     $res['apiVersion'] = cloud_get_api_version();
     foreach ($apps as $appName => $status) {
         $res[$appName] = setcloudappstatus($appName, $status, false, false);
     }
     require_once libfile('function/cache');
     updatecache(array('plugin', 'setting', 'styles'));
     $res['siteInfo'] = $this->_getBaseInfo();
     return $res;
 }
\t\t</div>
\t\t<div style="margin-top:8px;">
\t\t\t<iframe id="ifm0" frameborder="0" width="810px" scrolling="no" height="810px" style="position:absolute; top:-5000px; left:-5000px;" src="{$url}"></iframe>
\t\t</div>
\t\t</body></html>
EOF;
        exit;
    } else {
        cpmsg('my_app_status_off', 'action=cloud&operation=manyou&anchor=base', 'error');
    }
    showsubmit('settingsubmit', 'submit');
    showtablefooter();
    showformfooter();
} else {
    $settingnew = $_G['gp_settingnew'];
    $settings = array();
    foreach ($settingnew as $key => $val) {
        if ($_G['setting'][$key] != $val) {
            ${$key} = $val;
            $settings[] = "('{$key}', '{$val}')";
        }
    }
    if ($settings) {
        DB::query("REPLACE INTO " . DB::table('common_setting') . " (`skey`, `svalue`) VALUES " . implode(',', $settings));
        updatecache('setting');
    }
    $appName = 'manyou';
    $status = $settingnew['my_app_status'] ? 'normal' : 'pause';
    setcloudappstatus($appName, $status);
    cpmsg('setting_update_succeed', 'action=cloud&operation=' . $operation . (!empty($_G['gp_anchor']) ? '&anchor=' . $_G['gp_anchor'] : ''), 'succeed');
}