<?php
require(dirname(__FILE__) .'/check.php');
$skin->CheckIframe();


/* **** 版权所有 ****

 程序开发：网钛科技
 网钛CMS官网：http://otcms.com
 网钛IDC官网：http://idccms.com
 ＱＱ：877873666
 微信：QQ877873666
 邮箱：877873666@qq.com

 **** 版权所有 **** */


//用户检测
$MB->Open('','login',10);


switch($mudi){
	case 'infoSet':
		$menuFileID = 525;
		$MB->IsSecMenuRight('alertBack',$menuFileID,$dataType);
		InfoSet();
		break;

	case 'checkFtpConn':
		$menuFileID = 525;
		$MB->IsSecMenuRight('alertBack',$menuFileID,$dataType);
		CheckFtpConn();
		break;

	default:
		die('err');
}

$MB->Close();
$DB->Close();





// 基本设置
function InfoSet(){
	global $DB,$mudi,$menuFileID,$menuTreeID;

	$backURL		= OT::PostStr('backURL');
	$dataType		= OT::PostRegExpStr('dataType','sql');
	$dataTypeCN		= OT::PostRegExpStr('dataTypeCN','sql');

	$isQiniu		= OT::PostInt('isQiniu');
	$qiniuKey1		= OT::PostStr('qiniuKey1');
	$qiniuKey2		= OT::PostStr('qiniuKey2');
	$qiniuName		= OT::PostStr('qiniuName');
	$qiniuUrl		= strtolower(OT::PostStr('qiniuUrl'));
		if ($qiniuUrl != ''){
			if (! Is::HttpUrl($qiniuUrl)){ $qiniuUrl = GetUrl::HttpHead() . $qiniuUrl; }
			if (substr($qiniuUrl,-1) != '/'){ $qiniuUrl .= '/'; }
		}
	$isUpyun		= OT::PostInt('isUpyun');
	$upyunKey1		= OT::PostStr('upyunKey1');
	$upyunKey2		= OT::PostStr('upyunKey2');
	$upyunName		= OT::PostStr('upyunName');
	$upyunUrl		= strtolower(OT::PostStr('upyunUrl'));
		if ($upyunUrl != ''){
			if (! Is::HttpUrl($upyunUrl)){ $upyunUrl = GetUrl::HttpHead() . $upyunUrl; }
			if (substr($upyunUrl,-1) != '/'){ $upyunUrl .= '/'; }
		}
	$isAliyun		= OT::PostInt('isAliyun');
	$aliyunKey1		= OT::PostStr('aliyunKey1');
	$aliyunKey2		= OT::PostStr('aliyunKey2');
	$aliyunName		= OT::PostStr('aliyunName');
	$aliyunEndPoint	= OT::PostStr('aliyunEndPoint');
	$aliyunUrl		= strtolower(OT::PostStr('aliyunUrl'));
		if ($aliyunUrl != ''){
			if (! Is::HttpUrl($aliyunUrl)){ $aliyunUrl = GetUrl::HttpHead() . $aliyunUrl; }
			if (substr($aliyunUrl,-1) != '/'){ $aliyunUrl .= '/'; }
		}
	$videoPcIsH5	= OT::PostInt('videoPcIsH5');
	$videoPcWidth	= OT::PostStr('videoPcWidth');
		if (strlen($videoPcWidth) == 0){ $videoPcWidth = '100%'; }
	$videoPcHeight	= OT::PostStr('videoPcHeight');
		if (strlen($videoPcHeight) == 0){ $videoPcHeight = '400'; }
	$videoWapWidth	= OT::PostStr('videoWapWidth');
		if (strlen($videoWapWidth) == 0){ $videoWapWidth = '100%'; }
	$videoWapHeight	= OT::PostStr('videoWapHeight');
		if (strlen($videoWapHeight) == 0){ $videoWapHeight = '250'; }
	$audioPcIsH5	= OT::PostInt('audioPcIsH5');
	$audioPcWidth	= OT::PostStr('audioPcWidth');
		if (strlen($audioPcWidth) == 0){ $audioPcWidth = '500'; }
	$audioPcHeight	= OT::PostStr('audioPcHeight');
		if (strlen($audioPcHeight) == 0){ $audioPcHeight = '32'; }
	$audioWapWidth	= OT::PostStr('audioWapWidth');
		if (strlen($audioWapWidth) == 0){ $audioWapWidth = '100%'; }
	$audioWapHeight	= OT::PostStr('audioWapHeight');
		if (strlen($audioWapHeight) == 0){ $audioWapHeight = '32'; }
	$recomAnnoun	= Adm::FilterEditor(OT::PostStr('recomAnnoun'));
	$recomLinkStr	= OT::PostStr('recomLinkStr');
	$recomImgStr	= OT::PostStr('recomImgStr');
	$recomFontStr	= OT::PostStr('recomFontStr');
	$recomNoteStr	= Adm::FilterEditor(OT::PostStr('recomNoteStr'));
	$recomArea		= OT::Post('recomArea');
		if (is_array($recomArea)){ $recomArea = implode(',',$recomArea); }
	$isGain			= OT::PostInt('isGain');
	$gainRecomMoney	= OT::PostFloat('gainRecomMoney');
	$gainNewsMoney	= OT::PostFloat('gainNewsMoney');
	$gainUserMoney	= OT::PostFloat('gainUserMoney');
	$gainMoney		= OT::PostFloat('gainMoney');
	$gainDay		= OT::PostInt('gainDay');
	$isGainScore		= OT::PostInt('isGainScore');
	$gainScore1Rate		= OT::PostInt('gainScore1Rate');
	$gainScore2Rate		= OT::PostInt('gainScore2Rate');
	$gainScore3Rate		= OT::PostInt('gainScore3Rate');
	$userState1Money	= OT::PostFloat('userState1Money');
	$userState1Score1	= OT::PostInt('userState1Score1');
	$userState1Score2	= OT::PostInt('userState1Score2');
	$userState1Score3	= OT::PostInt('userState1Score3');
	$isFtp				= OT::PostInt('isFtp');
	$ftpIp				= OT::PostStr('ftpIp');
	$ftpPort			= OT::PostInt('ftpPort');
		if ($ftpPort == 0){ $ftpPort = 21; }
	$ftpPasv			= OT::PostInt('ftpPasv');
	$ftpUser			= OT::PostStr('ftpUser');
	$ftpPwd				= OT::PostStr('ftpPwd');
	$ftpDefDir			= OT::PostStr('ftpDefDir');
	$ftpUrl				= OT::PostStr('ftpUrl');
		if ($ftpUrl != ''){
			if (! Is::HttpUrl($ftpUrl)){ $ftpUrl = GetUrl::HttpHead() . $ftpUrl; }
			if (substr($ftpUrl,-1) != '/'){ $ftpUrl .= '/'; }
		}
	$chinazKey			= OT::PostStr('chinazKey');
	$chinazEvent		= OT::PostArrStr('chinazEvent',',');
	$aizhanKey			= OT::PostStr('aizhanKey');
	$aizhanEvent		= OT::PostArrStr('aizhanEvent',',');
	$recomRate1			= OT::PostInt('recomRate1');
	$recomRate2			= OT::PostInt('recomRate2');
	$recomRate3			= OT::PostInt('recomRate3');
	$recomIsMeihua		= OT::PostInt('recomIsMeihua');
	$siteMsgEvent		= OT::Post('siteMsgEvent');
		if (is_array($siteMsgEvent)){ $siteMsgEvent = implode(',',$siteMsgEvent); }
	$gainDashangRate	= OT::PostInt('gainDashangRate');
	$isGainSite			= OT::PostInt('isGainSite');
	$isGainAlipay		= OT::PostInt('isGainAlipay');
	$gainAlipayMoney	= OT::PostFloat('gainAlipayMoney');
	$isGainWeixin		= OT::PostInt('isGainWeixin');
	$gainWeixinMoney	= OT::PostFloat('gainWeixinMoney');
	$isGainDiy			= OT::PostInt('isGainDiy');
	$gainDiyMoney		= OT::PostFloat('gainDiyMoney');
	$gainDiyName		= OT::PostStr('gainDiyName');
	$gainTime			= OT::PostStr('gainTime');
	$gainMin			= OT::PostInt('gainMin');
	$gainSiteCutRate	= OT::PostInt('gainSiteCutRate');
	$gainAlipayCutRate	= OT::PostInt('gainAlipayCutRate');
	$gainWeixinCutRate	= OT::PostInt('gainWeixinCutRate');
	$gainDiyCutRate		= OT::PostInt('gainDiyCutRate');
	$gainScore1			= OT::PostInt('gainScore1');
	$gainScore2			= OT::PostInt('gainScore2');
	$gainScore3			= OT::PostInt('gainScore3');
	$tagName			= OT::PostStr('tagName');
		if (strlen($tagName) == 0){ $tagName = '标签聚合'; }
	$tagPageSize		= OT::PostInt('tagPageSize');
		if ($tagPageSize < 10){ $tagPageSize = 500; }
	$tagPageCount		= OT::PostInt('tagPageCount');
	$nameAlipayPid		= OT::PostStr('nameAlipayPid');
	$nameAlipayKey1		= OT::PostStr('nameAlipayKey1');
	$nameAlipayKey2		= OT::PostStr('nameAlipayKey2');
	$nameWeixinId		= OT::PostStr('nameWeixinId');
	$nameWeixinKey		= OT::PostStr('nameWeixinKey');
	$nameWeixinType		= OT::PostStr('nameWeixinType');
		if ($nameWeixinType != 'info'){ $nameWeixinType = 'base'; }
	$nameWeixinRuleId	= OT::PostStr('nameWeixinRuleId');
	$nameAlipayType		= OT::PostStr('nameAlipayType');
	$nameAlipayEvent	= OT::Post('nameAlipayEvent');
	$namePhoneKey		= OT::PostStr('namePhoneKey');
	$namePhoneSecret	= OT::PostStr('namePhoneSecret');
	$namePhoneCode		= OT::PostStr('namePhoneCode');
	$isSiteApi			= OT::PostInt('isSiteApi');
	$siteApiAnnoun		= OT::PostStr('siteApiAnnoun');
	$siteApiAreaStr		= OT::Post('siteApiAreaStr');
	$isDingding			= OT::PostInt('isDingding');
	$dingdingName1		= OT::Post('dingdingName1');
	$dingdingName2		= OT::Post('dingdingName2');
	$dingdingKeyList	= OT::PostStr('dingdingKeyList');
	$dingdingKeyPoint	= OT::PostInt('dingdingKeyPoint');
	$dingdingAreaStr	= OT::PostArrStr('dingdingAreaStr','');
	$dingdingEvent		= OT::PostArrStr('dingdingEvent','');
	$siteApiUrl			= OT::PostStr('siteApiUrl');
	$gainSuffRate		= OT::PostInt('gainSuffRate');
	$recomPayRate1		= OT::PostInt('recomPayRate1');
	$recomPayRate2		= OT::PostInt('recomPayRate2');
	$recomPayRate3		= OT::PostInt('recomPayRate3');
	$aliyunDefDir		= OT::PostStr('aliyunDefDir');
	$qiniuDefDir		= OT::PostStr('qiniuDefDir');
	$upyunDefDir		= OT::PostStr('upyunDefDir');
	$recomSoftRate1		= OT::PostInt('recomSoftRate1');
	$recomSoftRate2		= OT::PostInt('recomSoftRate2');
	$recomSoftRate3		= OT::PostInt('recomSoftRate3');
	$recomMeihuaFontLeft= OT::PostInt('recomMeihuaFontLeft');
	$recomMeihuaFontTop	= OT::PostInt('recomMeihuaFontTop');
	$recomMeihuaImgLeft	= OT::PostInt('recomMeihuaImgLeft');
	$recomMeihuaImgTop	= OT::PostInt('recomMeihuaImgTop');
	$newsPwdAnswer		= OT::PostStr('newsPwdAnswer');
	$newsPwdImg			= OT::PostStr('newsPwdImg');
	$newsPwdNote		= OT::PostStr('newsPwdNote');
	$isCopyKouling		= OT::PostInt('isCopyKouling');
	$copyKoulingStr		= OT::PostStr('copyKoulingStr');
	$isWeixinJs			= OT::PostInt('isWeixinJs');
	$weixinAppId		= OT::PostStr('weixinAppId');
	$weixinAppSecret	= OT::PostStr('weixinAppSecret');
	$weixinImgMode		= OT::PostInt('weixinImgMode');
	$weixinImgDef		= OT::PostStr('weixinImgDef');
	$weixinIsBug		= OT::PostInt('weixinIsBug');
	$userState1Type		= OT::PostStr('userState1Type');
	$isWeixinWork		= OT::PostInt('isWeixinWork');
	$weixinWorkName1	= OT::Post('weixinWorkName1');
	$weixinWorkName2	= OT::Post('weixinWorkName2');
	$weixinWorkKeyList	= OT::PostStr('weixinWorkKeyList');
	$weixinWorkKeyPoint	= OT::PostInt('weixinWorkKeyPoint');
	$weixinWorkAreaStr	= OT::PostArrStr('weixinWorkAreaStr','');
	$weixinWorkEvent	= OT::PostArrStr('weixinWorkEvent','');
	$isAutoImg			= OT::PostInt('isAutoImg');
	$autoImgSizeMode	= OT::PostInt('autoImgSizeMode');
	$autoImgShowMode	= OT::PostInt('autoImgShowMode');
	$autoImgBgNum		= OT::PostInt('autoImgBgNum');
	$autoImgLayerNum	= OT::PostInt('autoImgLayerNum');
	$autoImgFontNum		= OT::PostInt('autoImgFontNum');
	$autoImgFontExt		= OT::PostStr('autoImgFontExt');
	$autoImgUrlMode		= OT::PostInt('autoImgUrlMode');
	$isScoreTo			= OT::PostInt('isScoreTo');
	$scoreTo12			= OT::PostFloat('scoreTo12');
	$scoreTo13			= OT::PostFloat('scoreTo13');
	$scoreTo21			= OT::PostFloat('scoreTo21');
	$scoreTo23			= OT::PostFloat('scoreTo23');
	$scoreTo31			= OT::PostFloat('scoreTo31');
	$scoreTo32			= OT::PostFloat('scoreTo32');
	$weixinThemeHead	= OT::PostStr('weixinThemeHead');
	$weixinThemeFoot	= OT::PostStr('weixinThemeFoot');
	$weixinDescHead		= OT::PostStr('weixinDescHead');
	$weixinDescFoot		= OT::PostStr('weixinDescFoot');
	$recomIsRev			= OT::PostInt('recomIsRev');

	if ($backURL == ''){
		JS::AlertBackEnd('表单内容接收不全');
	}

	$record = array();
	if (AppOssQiniu::Jud()){
		$record['AS_isQiniu']			= $isQiniu;
		$record['AS_qiniuKey1']			= $qiniuKey1;
		$record['AS_qiniuKey2']			= $qiniuKey2;
		$record['AS_qiniuName']			= $qiniuName;
		$record['AS_qiniuUrl']			= $qiniuUrl;
		$record['AS_qiniuDefDir']		= $qiniuDefDir;
	}
	if (AppOssUpyun::Jud()){
		$record['AS_isUpyun']			= $isUpyun;
		$record['AS_upyunKey1']			= $upyunKey1;
		$record['AS_upyunKey2']			= $upyunKey2;
		$record['AS_upyunName']			= $upyunName;
		$record['AS_upyunUrl']			= $upyunUrl;
		$record['AS_upyunDefDir']		= $upyunDefDir;
	}
	if (AppOssAliyun::Jud()){
		$record['AS_isAliyun']			= $isAliyun;
		$record['AS_aliyunKey1']		= $aliyunKey1;
		$record['AS_aliyunKey2']		= $aliyunKey2;
		$record['AS_aliyunName']		= $aliyunName;
		$record['AS_aliyunEndPoint']	= $aliyunEndPoint;
		$record['AS_aliyunUrl']			= $aliyunUrl;
		$record['AS_aliyunDefDir']		= $aliyunDefDir;
	}
	if (AppVideo::Jud()){
		$record['AS_videoPcIsH5']		= $videoPcIsH5;
		$record['AS_videoPcWidth']		= $videoPcWidth;
		$record['AS_videoPcHeight']		= $videoPcHeight;
		$record['AS_videoWapWidth']		= $videoWapWidth;
		$record['AS_videoWapHeight']	= $videoWapHeight;
		$record['AS_audioPcIsH5']		= $audioPcIsH5;
		$record['AS_audioPcWidth']		= $audioPcWidth;
		$record['AS_audioPcHeight']		= $audioPcHeight;
		$record['AS_audioWapWidth']		= $audioWapWidth;
		$record['AS_audioWapHeight']	= $audioWapHeight;
	}
	if (AppRecom::Jud()){
		$record['AS_recomAnnoun']	= $recomAnnoun;
		$record['AS_recomLinkStr']	= $recomLinkStr;
		$record['AS_recomImgStr']	= $recomImgStr;
		$record['AS_recomFontStr']	= $recomFontStr;
		$record['AS_recomNoteStr']	= $recomNoteStr;
		$record['AS_recomArea']		= $recomArea;
		$record['AS_recomRate1']	= $recomRate1;
		$record['AS_recomRate2']	= $recomRate2;
		$record['AS_recomRate3']	= $recomRate3;
		$record['AS_recomIsMeihua']	= $recomIsMeihua;
		$record['AS_recomPayRate1']	= $recomPayRate1;
		$record['AS_recomPayRate2']	= $recomPayRate2;
		$record['AS_recomPayRate3']	= $recomPayRate3;
		$record['AS_recomSoftRate1']= $recomSoftRate1;
		$record['AS_recomSoftRate2']= $recomSoftRate2;
		$record['AS_recomSoftRate3']= $recomSoftRate3;
		$record['AS_recomMeihuaFontLeft']	= $recomMeihuaFontLeft;
		$record['AS_recomMeihuaFontTop']	= $recomMeihuaFontTop;
		$record['AS_recomMeihuaImgLeft']	= $recomMeihuaImgLeft;
		$record['AS_recomMeihuaImgTop']		= $recomMeihuaImgTop;
		$record['AS_recomIsRev']	= $recomIsRev;
	}
	if (AppGain::Jud()){
		$record['AS_gainDashangRate']	= $gainDashangRate;
		$record['AS_gainRecomMoney']	= $gainRecomMoney;
		$record['AS_gainNewsMoney']		= $gainNewsMoney;
		$record['AS_isGain']			= $isGain;
		$record['AS_isGainSite']		= $isGainSite;
		$record['AS_gainUserMoney']		= $gainUserMoney;
		$record['AS_isGainAlipay']		= $isGainAlipay;
		$record['AS_gainAlipayMoney']	= $gainAlipayMoney;
		$record['AS_isGainWeixin']		= $isGainWeixin;
		$record['AS_gainWeixinMoney']	= $gainWeixinMoney;
		$record['AS_isGainDiy']			= $isGainDiy;
		$record['AS_gainDiyMoney']		= $gainDiyMoney;
		$record['AS_gainDiyName']		= $gainDiyName;
		$record['AS_gainDay']			= $gainDay;
		// $record['AS_gainTime']			= $gainTime;
		$record['AS_gainMin']			= $gainMin;
		$record['AS_gainSiteCutRate']	= $gainSiteCutRate;
		$record['AS_gainAlipayCutRate']	= $gainAlipayCutRate;
		$record['AS_gainWeixinCutRate']	= $gainWeixinCutRate;
		$record['AS_gainDiyCutRate']	= $gainDiyCutRate;
		$record['AS_gainScore1']		= $gainScore1;
		$record['AS_gainScore2']		= $gainScore2;
		$record['AS_gainScore3']		= $gainScore3;
		$record['AS_isGainScore']		= $isGainScore;
		$record['AS_gainSuffRate']		= $gainSuffRate;
	}
	/* if (AppNewsGain::Jud()){
		$record['AS_isGainScore']		= $isGainScore;
		$record['AS_gainScore1Rate']	= $gainScore1Rate;
		$record['AS_gainScore2Rate']	= $gainScore2Rate;
		$record['AS_gainScore3Rate']	= $gainScore3Rate;
	} */
	if (AppUserState1::Jud()){
		$record['AS_userState1Type']	= $userState1Type;
		$record['AS_userState1Money']	= $userState1Money;
		$record['AS_userState1Score1']	= $userState1Score1;
		$record['AS_userState1Score2']	= $userState1Score2;
		$record['AS_userState1Score3']	= $userState1Score3;
	}
	if (AppOssFtp::Jud()){
		$record['AS_isFtp']				= $isFtp;
		$record['AS_ftpIp']				= $ftpIp;
		$record['AS_ftpPort']			= $ftpPort;
		$record['AS_ftpPasv']			= $ftpPasv;
		$record['AS_ftpUser']			= $ftpUser;
		$record['AS_ftpPwd']			= $ftpPwd;
		$record['AS_ftpDefDir']			= $ftpDefDir;
		$record['AS_ftpUrl']			= $ftpUrl;
	}
	if (AppChinaz::Jud()){
		$record['AS_chinazKey']			= $chinazKey;
		$record['AS_chinazEvent']		= $chinazEvent;
	}
	if (AppAizhan::Jud()){
		$record['AS_aizhanKey']			= $aizhanKey;
		$record['AS_aizhanEvent']		= $aizhanEvent;
	}
	if (AppSiteMessage::Jud()){
		$record['AS_siteMsgEvent']		= $siteMsgEvent;
	}
	if (AppTag::Jud()){
		$record['AS_tagName']			= $tagName;
		$record['AS_tagPageSize']		= $tagPageSize;
		$record['AS_tagPageCount']		= $tagPageCount;
	}
	if (AppNameAlipay::Jud()){
		$record['AS_nameAlipayPid']		= $nameAlipayPid;
		$record['AS_nameAlipayKey1']	= $nameAlipayKey1;
		$record['AS_nameAlipayKey2']	= $nameAlipayKey2;
		$record['AS_nameAlipayType']	= $nameAlipayType;
		$record['AS_nameAlipayEvent']	= $nameAlipayEvent;
	}
	if (AppNameWeixin::Jud()){
		$record['AS_nameWeixinId']		= $nameWeixinId;
		$record['AS_nameWeixinKey']		= $nameWeixinKey;
		$record['AS_nameWeixinType']	= $nameWeixinType;
		$record['AS_nameWeixinRuleId']	= $nameWeixinRuleId;
	}
	if (AppNamePhone::Jud()){
		$record['AS_namePhoneKey']		= $namePhoneKey;
		$record['AS_namePhoneSecret']	= $namePhoneSecret;
		$record['AS_namePhoneCode']		= $namePhoneCode;
	}
	if (AppSiteApi::Jud()){
		$record['AS_isSiteApi']			= $isSiteApi;
		$record['AS_siteApiUrl']		= $siteApiUrl;
		$record['AS_siteApiAnnoun']		= $siteApiAnnoun;
		$record['AS_siteApiAreaStr']	= $siteApiAreaStr;
	}
	if (AppDingding::Jud()){
		$record['AS_isDingding']		= $isDingding;
		$record['AS_dingdingName1']		= $dingdingName1;
		$record['AS_dingdingName2']		= $dingdingName2;
		$record['AS_dingdingKeyList']	= $dingdingKeyList;
		// $record['AS_dingdingKeyPoint']	= $dingdingKeyPoint;
		$record['AS_dingdingAreaStr']	= $dingdingAreaStr;
		$record['AS_dingdingEvent']		= $dingdingEvent;
	}
	if (AppNewsPwd::Jud()){
		$record['AS_newsPwdAnswer']		= $newsPwdAnswer;
		$record['AS_newsPwdImg']		= $newsPwdImg;
		$record['AS_newsPwdNote']		= $newsPwdNote;
	}
	if (AppCopyKouling::Jud()){
		$record['AS_isCopyKouling']		= $isCopyKouling;
		$record['AS_copyKoulingStr']	= $copyKoulingStr;
	}
	if (AppWeixinJs::Jud()){
		$record['AS_isWeixinJs']		= $isWeixinJs;
		$record['AS_weixinAppId']		= $weixinAppId;
		$record['AS_weixinAppSecret']	= $weixinAppSecret;
		$record['AS_weixinImgMode']		= $weixinImgMode;
		$record['AS_weixinImgDef']		= $weixinImgDef;
		$record['AS_weixinIsBug']		= $weixinIsBug;
		$record['AS_weixinThemeHead']	= $weixinThemeHead;
		$record['AS_weixinThemeFoot']	= $weixinThemeFoot;
		$record['AS_weixinDescHead']	= $weixinDescHead;
		$record['AS_weixinDescFoot']	= $weixinDescFoot;
	}
	if (AppWeixinWork::Jud()){
		$record['AS_isWeixinWork']		= $isWeixinWork;
		$record['AS_weixinWorkName1']	= $weixinWorkName1;
		$record['AS_weixinWorkName2']	= $weixinWorkName2;
		$record['AS_weixinWorkKeyList']	= $weixinWorkKeyList;
		// $record['AS_weixinWorkKeyPoint']	= $weixinWorkKeyPoint;
		$record['AS_weixinWorkAreaStr']	= $weixinWorkAreaStr;
		$record['AS_weixinWorkEvent']	= $weixinWorkEvent;
	}
	if (AppAutoImg::Jud()){
		$record['AS_isAutoImg']			= $isAutoImg;
		$record['AS_autoImgSizeMode']	= $autoImgSizeMode;
		$record['AS_autoImgShowMode']	= $autoImgShowMode;
		$record['AS_autoImgBgNum']		= $autoImgBgNum;
		$record['AS_autoImgLayerNum']	= $autoImgLayerNum;
		$record['AS_autoImgFontNum']	= $autoImgFontNum;
		$record['AS_autoImgFontExt']	= $autoImgFontExt;
		$record['AS_autoImgUrlMode']	= $autoImgUrlMode;
	}
	if (AppScoreTo::Jud()){
		$record['AS_isScoreTo']			= $isScoreTo;
		$record['AS_scoreTo12']			= $scoreTo12;
		$record['AS_scoreTo13']			= $scoreTo13;
		$record['AS_scoreTo21']			= $scoreTo21;
		$record['AS_scoreTo23']			= $scoreTo23;
		$record['AS_scoreTo31']			= $scoreTo31;
		$record['AS_scoreTo32']			= $scoreTo32;
	}

	if (count($record) == 0){
		JS::AlertBackEnd('无任何插件信息，无需提交。');
	}

	$fileResStr = '';
	$judRes = $DB->UpdateParam('appSys',$record,'AS_ID=1');
		if ($judRes){
			$alertRes = '成功';

			$Cache = new Cache();
			$isJsRes = $Cache->Js('appSys');
				if ($isJsRes){
					$fileResStr .= '\n../cache/appSys.js 生成成功！';
				}else{
					$fileResStr .= '\n../cache/appSys.js 生成失败，请检查该目录或者文件是否有写入/修改权限！';
				}
			$isCacheRes = $Cache->Php('appSys');
				if ($isCacheRes){
					$fileResStr .= '\n../cache/appSys.php 生成成功！';
				}else{
					$fileResStr .= '\n../cache/appSys.php 生成失败，请检查该目录或者文件是否有写入/修改权限！';
				}

			if (Cache::UpdateConfigJs()){
				$fileResStr .= '\n../cache/js/configJs.js 生成成功！';
			}else{
				$fileResStr .= '\n../cache/js/configJs.js 生成失败，请检查该目录或者文件是否有写入/修改权限！';
			}
		}else{
			$alertRes = '失败';
		}

	// 操作日志记录
	Adm::AddLog(array(
		'note'		=> '【'. $dataTypeCN .'】修改'. $alertRes .'！',
		));

	JS::AlertHref('修改'. $alertRes .'\n'. $fileResStr, $backURL);
}



// 检测FTP连接
function CheckFtpConn(){
	global $DB;

	$ftpIp		= OT::GetStr('ip');
	$ftpPort	= OT::GetInt('port');
		if ($ftpPort == 0){ $ftpPort = 21; }
	$ftpUser	= OT::GetStr('user');
	$ftpPwd		= OT::GetStr('pwd');
	$pasv		= OT::GetInt('pasv');

	$ftpArr = array(
		'host'	=> $ftpIp,
		'port'	=> $ftpPort,
		'user'	=> $ftpUser,
		'pwd'	=> $ftpPwd,
		);
	$ftp = new Ftp($ftpArr);
	if ($ftp->Connect()){
		echo('<div>FTP连接成功，信息填写正确无误。（FTP地址：'. $ftpIp .'）</div>');

		$filePath = 'upFile/lock.txt';
		$fileName = '测试FTP连接结果（该文件不是0字节就是成功）.txt';
		if ($ftp->UpFile($filePath, $fileName, $pasv)){
			echo('<div>FTP上传测试成功！</div>');
			$ftp->DelFile($fileName);
		}else{
			die('<div>FTP上传测试失败，请检查该FTP账号是否有写入权限（'. $ftp->GetErr() .'）</div>');
		}
	}else{
		die('<div>FTP连接失败，请检查填写的信息（'. $ftp->GetErr() .'）</div>');
	}
}
?>