1); $manyounav = array(); if($_G['setting']['my_app_status']) { $manyounav[0] = array('setting_manyou_manage', 'cloud&operation=manyou&anchor=manage', $current['manage']); } $manyounav[1] = array('setting_manyou_base', 'cloud&operation=manyou&anchor=base', $current['base']); showsubmenu('setting_manyou', $manyounav); showformheader('cloud&edit=yes'); showhiddenfields(array('operation' => $operation)); if($_GET['anchor'] == 'base') { showtips('setting_manyou_tips'); showtableheader('', 'nobottom', 'id="base"'); $actives = $checkarr = array(); $actives[$_G['setting']['my_app_status']] = ' class="checked"'; $checkarr[$_G['setting']['my_app_status']] = ' checked'; $str = <<  $lang[yes]  $lang[no] EOF; showsetting('setting_manyou_base_status', 'settingnew[my_app_status]', $_G['setting']['my_app_status'], $str, '', 1); showsetting('setting_manyou_base_close_prompt', 'settingnew[my_closecheckupdate]', $_G['setting']['my_closecheckupdate'], 'radio'); showsetting('setting_manyou_base_open_app_prompt', 'settingnew[my_openappprompt]', $_G['setting']['my_openappprompt'], 'radio'); showtagfooter('tbody'); $appstate = !empty($_G['setting']['my_app_status']) ? 1 : 0; $actives = $checkarr = array(); echo << var appState = $appstate; function hiddenShareInfo(type, state) { appState = state ? 1 : 0; $('shareinfo').style.display = appState ? '' : 'none'; } EOF; showtagheader('tbody', 'shareinfo', $_G['setting']['my_app_status']); showsetting('setting_manyou_base_ip', 'settingnew[my_ip]', $_G['setting']['my_ip'], 'text'); showtagfooter('tbody'); showtablefooter(); } elseif($_G['setting']['my_app_status']) { $uchUrl = $_G['siteurl'].'/'.ADMINSCRIPT.'?action=cloud&operation=manyou&anchor=' . $_GET['anchor']; if(empty($_GET['my_suffix'])) { $_GET['my_suffix'] = '/appadmin/list'; } $my_prefix = 'http://uchome.manyou.com'; $my_suffix = urlencode($_GET['my_suffix']); $tmp_suffix = $_GET['my_suffix']?urldecode($_GET['my_suffix']):'/appadmin/list'; $myUrl = $my_prefix.$tmp_suffix; $timestamp = time(); $hash = md5($_G['setting']['my_siteid'].'|'.$_G['uid'].'|'.$_G['setting']['my_sitekey'].'|'.$timestamp); $delimiter = strrpos($myUrl, '?') ? '&' : '?'; $url = $myUrl.$delimiter.'s_id='.$_G['setting']['my_siteid'].'&uch_id='.$_G['uid'].'&uch_url='.urlencode($uchUrl).'&my_suffix='.$my_suffix.'×tamp='.$timestamp.'&my_sign='.$hash; print <<
loading... {$lang['loading']}...
EOF; exit(); } else { cpmsg('my_app_status_off', 'action=cloud&operation=manyou&anchor=base', 'error'); } showsubmit('settingsubmit', 'submit'); showtablefooter(); showformfooter(); } else { $settingnew = $_GET['settingnew']; $settings = array(); foreach($settingnew as $key => $val) { if($_G['setting'][$key] != $val) { $$key = $val; $settings[$key] = $val; } } if($settings) { C::t('common_setting')->update_batch($settings); } $appName = 'manyou'; $status = $settingnew['my_app_status'] ? 'normal' : 'pause'; $appService = Cloud::loadClass('Service_App'); $appService->setCloudAppStatus($appName, $status); cpmsg('setting_update_succeed', 'action=cloud&operation='.$operation.(!empty($_GET['anchor']) ? '&anchor='.$_GET['anchor'] : ''), 'succeed'); }