yuntpl(array('admin/admin_concheck_config')); } function save_action(){ $_POST = $this->post_trim($_POST); $configM = $this->MODEL('config'); if ($_POST['sy_concheck_open']){ $data['sy_concheck_open'] = 1; }else{ $data['sy_concheck_open'] = 2; } $data['sy_concheck_appkey'] = $_POST['sy_concheck_appkey']; $data['sy_concheck_appsecret'] = $_POST['sy_concheck_appsecret']; $configM -> setConfig($data); $this->web_config(); $this->ACT_layer_msg("内容安全检测设置成功!",9,$_SERVER['HTTP_REFERER'],2,1); } function get_restnum_action(){ $returnArr['num'] = 0; $url = 'https://u.phpyun.com/feature'; $url .= '?appKey='.$this->config['sy_concheck_appkey'].'&appSecret='.$this->config['sy_concheck_appsecret']; if (extension_loaded('curl')){ $return = CurlGet($url); }else if(function_exists('file_get_contents')){ $return = file_get_contents($url); } if($return){ $msgInfo = json_decode($return,true); if($msgInfo['code'] == '200'){ $returnArr['num'] = $msgInfo['num']; } } echo json_encode($returnArr);die; } } ?>