update_batch($settings); updatecache('setting'); } $locationUrl = ADMINSCRIPT.'?frames=yes&action=cloud&operation=doctor'; cpmsg('cloud_idkeysetting_success', '', 'succeed', array(), '

'.cplang('message_redirect').'

'); } elseif($op == 'apitest') { $doctorService =Cloud::loadClass('Service_Doctor'); $APIType = intval($_GET['api_type']); $APIIP = trim($_GET['api_ip']); $startTime = microtime(true); $testStatus = $doctorService->testAPI($APIType, $APIIP, $_G['setting']); $endTime = microtime(true); $otherTips = ''; if($APIIP) { if ($_GET['api_description']) { $otherTips = diconv(trim($_GET['api_description']), 'UTF-8'); } } else { if($APIType == 1) { $otherTips = ''.$lang['cloud_doctor_api_test_other'].''; } elseif($APIType == 2) { $otherTips = ''.$lang['cloud_doctor_manyou_test_other'].''; } elseif($APIType == 3) { $otherTips = ''.$lang['cloud_doctor_qzone_test_other'].''; } } ajaxshowheader(); if($testStatus) { printf($lang['cloud_doctor_api_test_success'], $lang['cloud_doctor_result_success'], $APIIP, $endTime - $startTime, $otherTips); } else { printf($lang['cloud_doctor_api_test_failure'], $lang['cloud_doctor_result_failure'], $APIIP, $otherTips); } ajaxshowfooter(); } elseif($op == 'setidkey') { ajaxshowheader(); echo '

'.$lang['cloud_doctor_setidkey'].' '.$lang['close'].'

'; echo '
'; showtips('cloud_doctor_setidkey_tips'); showformheader('cloud'); showhiddenfields(array('operation' => $operation)); showhiddenfields(array('op' => $op)); showtableheader(); showsetting('cloud_site_id', 'my_siteid', $_G['setting']['my_siteid'], 'text'); showsetting('cloud_site_key', 'my_sitekey', preg_replace('/(\w{2})\w*(\w{2})/', '\\1****\\2', $_G['setting']['my_sitekey']), 'text'); showsetting('cloud_site_status', array('cloud_status', array(array('0', $lang['cloud_doctor_status_0']), array('1', $lang['cloud_doctor_status_1']), array('2', $lang['cloud_doctor_status_2']))), $_G['setting']['cloud_status'], 'select'); showsubmit('setidkeysubmit'); showtablefooter(); showformfooter(); echo '
'; ajaxshowfooter(); } else { $appService = Cloud::loadClass('Service_App'); $doctorService = Cloud::loadClass('Service_Doctor'); require_once DISCUZ_ROOT.'./source/discuz_version.php'; shownav('tools', 'menu_cloud_doctor'); showsubmenu('menu_cloud_doctor'); showtips('cloud_doctor_tips'); echo ''; showtableheader(); showformheader('cloud'); showhiddenfields(array('operation' => 'siteinfo')); showtagheader('tbody', '', true); showtitle('cloud_doctor_title_status'); showtablerow('', array('class="td24"'), array( ''.cplang('cloud_site_url').'', $_G['siteurl']. (isfounder() ? '     ' : '') )); showtablerow('', array('class="td24"'), array( ''.cplang('cloud_site_id').'', $_G['setting']['my_siteid'] )); showtablerow('', array('class="td24"'), array( ''.cplang('cloud_site_key').'', preg_replace('/(\w{2})\w*(\w{2})/', '\\1****\\2', $_G['setting']['my_sitekey']).' '.$lang['cloud_site_key_safetips'] )); showtablerow('', array('class="td24"'), array( ''.cplang('cloud_site_status').'', (isfounder() ? $doctorService->showCloudStatus($_G['setting']['cloud_status']).' '.$lang['cloud_doctor_modify_siteidkey'].'' : $doctorService->showCloudStatus($_G['setting']['cloud_status'])). (isfounder() ? '   ' : '') )); showtablerow('', array('class="td24"'), array( ''.cplang('setting_basic_bbclosed').'', $_G['setting']['bbclosed'] ? $lang['cloud_doctor_close_yes'] : $lang['no'] )); showtablerow('', array('class="td24"'), array( ''.cplang('cloud_site_version').'', DISCUZ_VERSION.' '.DISCUZ_RELEASE )); if(isfounder()) { showtablerow('', array('class="td24"'), array( ''.cplang('cloud_change_info').'', ''.cplang('cloud_change_qq').'', )); } showtagfooter('tbody'); showformfooter(); showtagheader('tbody', '', true); showtitle('cloud_doctor_title_result'); showtablerow('', array('class="td24"'), array( ''.cplang('cloud_timecheck').'', '' . cplang('cloud_doctor_time_check', array('imgdir' => $_G['style']['imgdir'])) .'', )); showtablerow('', array('class="td24"'), array( ''.cplang('cloud_doctor_gethostbyname_function').'', function_exists('gethostbyname') ? $lang['cloud_doctor_result_success'].' '.$lang['available'] : $lang['cloud_doctor_result_failure'].$lang['cloud_doctor_function_disable'] )); showtablerow('', array('class="td24"'), array( ''.cplang('cloud_doctor_dns_api').'', $doctorService->checkDNSResult(1, $_G['setting']) )); showtablerow('', array('class="td24"'), array( ''.cplang('cloud_doctor_dns_api_test').'', $doctorService->showTestJS(1) )); showtagfooter('tbody'); showtagheader('tbody', 'cloud_tbody_api_test', false); showtagfooter('tbody'); showtagheader('tbody', 'cloud_tbody_manyou_test', false); showtagfooter('tbody'); showtagheader('tbody', '', true); showtablerow('', array('class="td24"'), array( ''.cplang('cloud_doctor_dns_qzone').'', $doctorService->checkDNSResult(3, $_G['setting']) )); showtablerow('', array('class="td24"'), array( ''.cplang('cloud_doctor_dns_qzone_test').'', $doctorService->showTestJS(3) )); showtagfooter('tbody'); showtagheader('tbody', 'cloud_tbody_qzone_test', false); showtagfooter('tbody'); showtagheader('tbody', 'cloud_tbody_site_test', true); showtablerow('', array('class="td24"'), array( ''.cplang('cloud_doctor_site_test').'', cplang('cloud_doctor_site_test_result', array('imgdir' => $_G['style']['imgdir'])) )); showtagfooter('tbody'); showtagheader('tbody', '', true); showtitle('cloud_doctor_title_plugin'); $doctorService->showPlugins(); showtagfooter('tbody'); if($appService->getCloudAppStatus('connect')) { if ($op == 'fixGuest') { $doctorService->fixGuestGroup(cplang('connect_guest_group_name')); } showtagheader('tbody', '', true); showtitle('cloud_doctor_title_connect'); showtablerow('', array('class="td24"'), array( ''.cplang('cloud_doctor_connect_app_id').'', !empty($_G['setting']['connectappid']) ? $_G['setting']['connectappid'] : $lang['cloud_doctor_connect_reopen'] )); showtablerow('', array('class="td24"'), array( ''.cplang('cloud_doctor_connect_app_key').'', !empty($_G['setting']['connectappkey']) ? preg_replace('/(\w{2})\w*(\w{2})/', '\\1****\\2', $_G['setting']['connectappkey']).' '.$lang['cloud_site_key_safetips'] : $lang['cloud_doctor_connect_reopen'] )); $guestGroupStr = cplang('cloud_doctor_result_success') .' '. cplang('cloud_doctor_normal'); if (!$doctorService->checkGuestGroup()) { $guestGroupStr = cplang('cloud_doctor_result_failure') . ' ' . cplang('cloud_doctor_connect_fix'); } showtablerow('', array('class="td24"'), array( ''.cplang('cloud_doctor_connect_guestgroup').'', $guestGroupStr, )); showtagfooter('tbody'); } showtablefooter(); $doctorService->showCloudDoctorJS(); }