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

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

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

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


//打开用户表，并检测用户是否登录
$MB->Open('','login');

$skin->WebTop();


echo('
<script language="javascript" type="text/javascript" src="js/appSys.js?v='. OT_VERSION .'"></script>
');


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

	default:
		die('err');
}

$skin->WebBottom();

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





// 新增、修改
function InfoSet(){
	global $DB,$skin,$mudi,$dataType,$dataTypeCN,$sysAdminArr;

	$revexe = $DB->query('select * from '. OT_dbPref .'appSys');
		if ($row = $revexe->fetch()){
			$AS_isQiniu				= $row['AS_isQiniu'];
			$AS_qiniuKey1			= $row['AS_qiniuKey1'];
			$AS_qiniuKey2			= $row['AS_qiniuKey2'];
			$AS_qiniuName			= $row['AS_qiniuName'];
			$AS_qiniuUrl			= $row['AS_qiniuUrl'];
				if (strlen(''. $AS_qiniuUrl) == 0){ $AS_qiniuUrl = 'http://'; }

			$AS_isUpyun				= $row['AS_isUpyun'];
			$AS_upyunKey1			= $row['AS_upyunKey1'];
			$AS_upyunKey2			= $row['AS_upyunKey2'];
			$AS_upyunName			= $row['AS_upyunName'];
			$AS_upyunUrl			= $row['AS_upyunUrl'];
				if (strlen(''. $AS_upyunUrl) == 0){ $AS_upyunUrl = 'http://'; }

			$AS_isAliyun			= $row['AS_isAliyun'];
			$AS_aliyunKey1			= $row['AS_aliyunKey1'];
			$AS_aliyunKey2			= $row['AS_aliyunKey2'];
			$AS_aliyunName			= $row['AS_aliyunName'];
			$AS_aliyunEndPoint		= $row['AS_aliyunEndPoint'];
			$AS_aliyunUrl			= $row['AS_aliyunUrl'];
				if (strlen(''. $AS_aliyunUrl) == 0){ $AS_aliyunUrl = 'http://'; }

			$AS_videoPcIsH5			= $row['AS_videoPcIsH5'];
			$AS_videoPcWidth		= $row['AS_videoPcWidth'];
			$AS_videoPcHeight		= $row['AS_videoPcHeight'];
			$AS_videoWapWidth		= $row['AS_videoWapWidth'];
			$AS_videoWapHeight		= $row['AS_videoWapHeight'];
			$AS_audioPcWidth		= $row['AS_audioPcWidth'];
			$AS_audioPcHeight		= $row['AS_audioPcHeight'];
			$AS_audioWapWidth		= $row['AS_audioWapWidth'];
			$AS_audioWapHeight		= $row['AS_audioWapHeight'];

			$AS_recomAnnoun			= $row['AS_recomAnnoun'];
			$AS_recomLinkStr		= $row['AS_recomLinkStr'];
			$AS_recomImgStr			= $row['AS_recomImgStr'];
			$AS_recomFontStr		= $row['AS_recomFontStr'];
			$AS_recomNoteStr		= $row['AS_recomNoteStr'];
			$AS_recomArea			= $row['AS_recomArea'];

			$AS_isGain				= $row['AS_isGain'];
			$AS_gainRecomMoney		= $row['AS_gainRecomMoney'];
			$AS_gainNewsMoney		= $row['AS_gainNewsMoney'];
			$AS_gainUserMoney		= $row['AS_gainUserMoney'];
			$AS_gainDay				= $row['AS_gainDay'];
			$AS_isGainScore			= $row['AS_isGainScore'];
			$AS_gainScore1Rate		= $row['AS_gainScore1Rate'];
			$AS_gainScore2Rate		= $row['AS_gainScore2Rate'];
			$AS_gainScore3Rate		= $row['AS_gainScore3Rate'];
			$AS_userState1Money		= $row['AS_userState1Money'];
			$AS_userState1Score1	= $row['AS_userState1Score1'];
			$AS_userState1Score2	= $row['AS_userState1Score2'];
			$AS_userState1Score3	= $row['AS_userState1Score3'];

			$AS_isFtp				= $row['AS_isFtp'];
			$AS_ftpIp				= $row['AS_ftpIp'];
			$AS_ftpPort				= $row['AS_ftpPort'];
			$AS_ftpPasv				= $row['AS_ftpPasv'];
			$AS_ftpUser				= $row['AS_ftpUser'];
			$AS_ftpPwd				= $row['AS_ftpPwd'];
			$AS_ftpDefDir			= $row['AS_ftpDefDir'];
			$AS_ftpUrl				= $row['AS_ftpUrl'];
				if (strlen(''. $AS_ftpUrl) == 0){ $AS_ftpUrl = 'http://'; }

			$AS_chinazKey			= $row['AS_chinazKey'];
			$AS_chinazEvent			= $row['AS_chinazEvent'];
			$AS_aizhanKey			= $row['AS_aizhanKey'];
			$AS_aizhanEvent			= $row['AS_aizhanEvent'];
			$AS_weixinKey			= $row['AS_weixinKey'];
			$AS_weixinQQ			= $row['AS_weixinQQ'];
			$AS_weixinEvent			= $row['AS_weixinEvent'];

			$AS_recomRate1			= $row['AS_recomRate1'];
			$AS_recomRate2			= $row['AS_recomRate2'];
			$AS_recomRate3			= $row['AS_recomRate3'];
			$AS_recomIsMeihua		= $row['AS_recomIsMeihua'];

			$AS_siteMsgEvent		= $row['AS_siteMsgEvent'];
			$AS_gainDashangRate		= $row['AS_gainDashangRate'];
			$AS_isGainSite			= $row['AS_isGainSite'];
			$AS_isGainAlipay		= $row['AS_isGainAlipay'];
			$AS_gainAlipayMoney		= $row['AS_gainAlipayMoney'];
			$AS_isGainWeixin		= $row['AS_isGainWeixin'];
			$AS_gainWeixinMoney		= $row['AS_gainWeixinMoney'];
			$AS_isGainDiy			= $row['AS_isGainDiy'];
			$AS_gainDiyMoney		= $row['AS_gainDiyMoney'];
			$AS_gainDiyName			= $row['AS_gainDiyName'];
			$AS_gainTime			= $row['AS_gainTime'];
			$AS_gainMin				= $row['AS_gainMin'];
			$AS_gainSiteCutRate		= $row['AS_gainSiteCutRate'];
			$AS_gainAlipayCutRate	= $row['AS_gainAlipayCutRate'];
			$AS_gainWeixinCutRate	= $row['AS_gainWeixinCutRate'];
			$AS_gainDiyCutRate		= $row['AS_gainDiyCutRate'];
			$AS_gainScore1			= $row['AS_gainScore1'];
			$AS_gainScore2			= $row['AS_gainScore2'];
			$AS_gainScore3			= $row['AS_gainScore3'];

			$AS_tagName				= $row['AS_tagName'];
			$AS_tagPageSize			= $row['AS_tagPageSize'];
			$AS_tagPageCount		= $row['AS_tagPageCount'];

			$AS_nameAlipayPid		= $row['AS_nameAlipayPid'];
			$AS_nameAlipayKey1		= $row['AS_nameAlipayKey1'];
			$AS_nameAlipayKey2		= $row['AS_nameAlipayKey2'];
			$AS_nameWeixinId		= $row['AS_nameWeixinId'];
			$AS_nameWeixinKey		= $row['AS_nameWeixinKey'];
			$AS_nameWeixinType		= $row['AS_nameWeixinType'];
			$AS_nameWeixinRuleId	= $row['AS_nameWeixinRuleId'];
			$AS_nameAlipayType		= $row['AS_nameAlipayType'];
			$AS_nameAlipayEvent		= $row['AS_nameAlipayEvent'];
			$AS_namePhoneKey		= $row['AS_namePhoneKey'];
			$AS_namePhoneSecret		= $row['AS_namePhoneSecret'];
			$AS_namePhoneCode		= $row['AS_namePhoneCode'];

			$AS_isSiteApi			= $row['AS_isSiteApi'];
			$AS_siteApiAnnoun		= $row['AS_siteApiAnnoun'];
			$AS_siteApiAreaStr		= $row['AS_siteApiAreaStr'];

			$AS_isDingding			= $row['AS_isDingding'];
			$AS_dingdingName1		= $row['AS_dingdingName1'];
			$AS_dingdingName2		= $row['AS_dingdingName2'];
			$AS_dingdingKeyList		= $row['AS_dingdingKeyList'];
			$AS_dingdingKeyPoint	= $row['AS_dingdingKeyPoint'];
			$AS_dingdingAreaStr		= $row['AS_dingdingAreaStr'];
			$AS_dingdingEvent		= $row['AS_dingdingEvent'];

			$AS_audioPcIsH5			= $row['AS_audioPcIsH5'];
			$AS_siteApiUrl			= $row['AS_siteApiUrl'];
			$AS_gainSuffRate		= $row['AS_gainSuffRate'];
			$AS_recomPayRate1		= $row['AS_recomPayRate1'];
			$AS_recomPayRate2		= $row['AS_recomPayRate2'];
			$AS_recomPayRate3		= $row['AS_recomPayRate3'];
			$AS_aliyunDefDir		= $row['AS_aliyunDefDir'];
			$AS_qiniuDefDir			= $row['AS_qiniuDefDir'];
			$AS_upyunDefDir			= $row['AS_upyunDefDir'];

			$AS_recomSoftRate1		= $row['AS_recomSoftRate1'];
			$AS_recomSoftRate2		= $row['AS_recomSoftRate2'];
			$AS_recomSoftRate3		= $row['AS_recomSoftRate3'];
			$AS_recomMeihuaFontLeft	= $row['AS_recomMeihuaFontLeft'];
			$AS_recomMeihuaFontTop	= $row['AS_recomMeihuaFontTop'];
			$AS_recomMeihuaImgLeft	= $row['AS_recomMeihuaImgLeft'];
			$AS_recomMeihuaImgTop	= $row['AS_recomMeihuaImgTop'];

			$AS_newsPwdAnswer		= $row['AS_newsPwdAnswer'];
			$AS_newsPwdImg			= $row['AS_newsPwdImg'];
			$AS_newsPwdNote			= $row['AS_newsPwdNote'];

			$AS_isCopyKouling		= $row['AS_isCopyKouling'];
			$AS_copyKoulingStr		= $row['AS_copyKoulingStr'];

			$AS_isWeixinJs			= $row['AS_isWeixinJs'];
			$AS_weixinAppId			= $row['AS_weixinAppId'];
			$AS_weixinAppSecret		= $row['AS_weixinAppSecret'];
			$AS_weixinImgMode		= $row['AS_weixinImgMode'];
			$AS_weixinImgDef		= $row['AS_weixinImgDef'];
			$AS_weixinIsBug			= $row['AS_weixinIsBug'];

			$AS_userState1Type		= $row['AS_userState1Type'];

			$AS_isWeixinWork		= $row['AS_isWeixinWork'];
			$AS_weixinWorkName1		= $row['AS_weixinWorkName1'];
			$AS_weixinWorkName2		= $row['AS_weixinWorkName2'];
			$AS_weixinWorkKeyList	= $row['AS_weixinWorkKeyList'];
			$AS_weixinWorkKeyPoint	= $row['AS_weixinWorkKeyPoint'];
			$AS_weixinWorkAreaStr	= $row['AS_weixinWorkAreaStr'];
			$AS_weixinWorkEvent		= $row['AS_weixinWorkEvent'];

			$AS_isAutoImg			= $row['AS_isAutoImg'];
			$AS_autoImgSizeMode		= $row['AS_autoImgSizeMode'];
			$AS_autoImgShowMode		= $row['AS_autoImgShowMode'];
			$AS_autoImgBgNum		= $row['AS_autoImgBgNum'];
			$AS_autoImgLayerNum		= $row['AS_autoImgLayerNum'];
			$AS_autoImgFontNum		= $row['AS_autoImgFontNum'];
			$AS_autoImgFontExt		= $row['AS_autoImgFontExt'];
			$AS_autoImgUrlMode		= $row['AS_autoImgUrlMode'];

			$AS_weixinThemeHead		= $row['AS_weixinThemeHead'];
			$AS_weixinThemeFoot		= $row['AS_weixinThemeFoot'];
			$AS_weixinDescHead		= $row['AS_weixinDescHead'];
			$AS_weixinDescFoot		= $row['AS_weixinDescFoot'];

			$AS_isScoreTo		= $row['AS_isScoreTo'];
			$AS_scoreTo12		= $row['AS_scoreTo12'];
			$AS_scoreTo13		= $row['AS_scoreTo13'];
			$AS_scoreTo21		= $row['AS_scoreTo21'];
			$AS_scoreTo23		= $row['AS_scoreTo23'];
			$AS_scoreTo31		= $row['AS_scoreTo31'];
			$AS_scoreTo32		= $row['AS_scoreTo32'];

			$AS_recomIsRev		= $row['AS_recomIsRev'];
		}
	unset($revexe);

	$userSysArr = Cache::PhpFile('userSys');

	$recomRateArr = array(
		'reg1'		=> $AS_recomRate1,
		'reg2'		=> $AS_recomRate2,
		'reg3'		=> $AS_recomRate3,
		'pay1'		=> $AS_recomPayRate1,
		'pay2'		=> $AS_recomPayRate2,
		'pay3'		=> $AS_recomPayRate3,
		'soft1'		=> $AS_recomSoftRate1,
		'soft2'		=> $AS_recomSoftRate2,
		'soft3'		=> $AS_recomSoftRate3,
		);

	echo('
	<form id="dealForm" name="dealForm" method="post" action="appSys_deal.php?mudi='. $mudi .'" onsubmit="return CheckForm()">
	<input type="hidden" id="dataType" name="dataType" value="'. $dataType .'" />
	<input type="hidden" id="dataTypeCN" name="dataTypeCN" value="'. $dataTypeCN .'" />
	<script language="javascript" type="text/javascript">document.write(\'<input type="hidden" name="backURL" value="\'+ document.location.href +\'" />\')</script>

	
	<div class="tabMenu">
	<ul>
		<li rel="tabOss" class="selected">云存储</li>
		<li rel="tabSite">网站类</li>
		<li rel="tabNews">文章类</li>
		<li rel="tabUser">会员类</li>
		<li rel="tabOut">站外类</li>
		<li rel="tabOther">其他</li>
	</ul>
	</div>

	<div class="tabMenuArea">
		<!-- 云存储 -->
		<table id="tabOss" cellpadding="0" cellspacing="0" summary="" class="padd3">
		<tr><td class="tabLeftWidth"></td><td></td></tr>'. 
		AppOssAliyun::AppSysBox($AS_isAliyun,$AS_aliyunKey1,$AS_aliyunKey2,$AS_aliyunName,$AS_aliyunEndPoint,$AS_aliyunUrl,$AS_aliyunDefDir) .
		AppOssQiniu::AppSysBox($AS_isQiniu,$AS_qiniuKey1,$AS_qiniuKey2,$AS_qiniuName,$AS_qiniuUrl,$AS_qiniuDefDir) .
		AppOssUpyun::AppSysBox($AS_isUpyun,$AS_upyunKey1,$AS_upyunKey2,$AS_upyunName,$AS_upyunUrl,$AS_upyunDefDir) .
		AppOssFtp::AppSysBox($AS_isFtp,$AS_ftpIp,$AS_ftpPort,$AS_ftpUser,$AS_ftpPwd,$AS_ftpDefDir,$AS_ftpUrl,$AS_ftpPasv) .
		'</table>

		<!-- 网站类 -->
		<table id="tabSite" style="display:none;" cellpadding="0" cellspacing="0" summary="" class="padd3">
		<tr><td class="tabLeftWidth"></td><td></td></tr>
		'. AppCopyKouling::AppSysTrBox1($AS_isCopyKouling, $AS_copyKoulingStr) .'
		'. AppWeixinJs::AppSysTrBox($AS_isWeixinJs, $AS_weixinIsBug, $AS_weixinImgMode, $AS_weixinImgDef, $AS_weixinAppId, $AS_weixinAppSecret, $AS_weixinThemeHead, $AS_weixinThemeFoot, $AS_weixinDescHead, $AS_weixinDescFoot) .'
		</table>

		<!-- 文章类 -->
		<table id="tabNews" style="display:none;" cellpadding="0" cellspacing="0" summary="" class="padd3">
		<tr><td class="tabLeftWidth"></td><td></td></tr>
		'. AppTag::AppSysTrBox1($AS_tagName, $AS_tagPageSize, $AS_tagPageCount) .'
		'. AppVideo::AppSysTrBox1($AS_videoPcWidth, $AS_videoPcHeight, $AS_videoWapWidth, $AS_videoWapHeight, $AS_audioPcWidth, $AS_audioPcHeight, $AS_audioWapWidth, $AS_audioWapHeight,$AS_videoPcIsH5,$AS_audioPcIsH5) .'
		'. AppNewsPwd::AppSysTrBox1($AS_newsPwdAnswer, $AS_newsPwdImg, $AS_newsPwdNote) .'
		'. AppAutoImg::AppSysTrBox1($AS_isAutoImg, $AS_autoImgSizeMode, $AS_autoImgShowMode, $AS_autoImgBgNum, $AS_autoImgLayerNum, $AS_autoImgFontNum, $AS_autoImgFontExt, $AS_autoImgUrlMode) .'
		</table>

		<!-- 会员类 -->
		<table id="tabUser" style="display:none;" cellpadding="0" cellspacing="0" summary="" class="padd3">
		<tr><td class="tabLeftWidth"></td><td></td></tr>
		'. AppSiteMessage::AppSysTrBox1($AS_siteMsgEvent) .'
		'. AppUserState1::AppSysTrBox1($AS_userState1Money, $AS_userState1Score1, $AS_userState1Score2, $AS_userState1Score3, AppMoneyRecord::Jud(), $userSysArr, $AS_userState1Type) .'
		'. AppGain::AppSysTrBox1($AS_gainDashangRate, $AS_gainRecomMoney, $AS_gainNewsMoney, $AS_isGain, $AS_isGainSite, $AS_gainUserMoney, $AS_isGainAlipay, $AS_gainAlipayMoney, $AS_isGainWeixin, $AS_gainWeixinMoney, $AS_isGainDiy, $AS_gainDiyMoney, $AS_gainDiyName, $AS_gainDay, $AS_gainTime, $AS_gainMin, $AS_gainSiteCutRate, $AS_gainAlipayCutRate, $AS_gainWeixinCutRate, $AS_gainDiyCutRate, $AS_isGainScore, $AS_gainScore1, $AS_gainScore2, $AS_gainScore3, $AS_gainSuffRate) .'
		'. AppRecom::AppSysTrBox1($AS_recomAnnoun, $AS_recomLinkStr, $AS_recomImgStr, $AS_recomFontStr, $AS_recomNoteStr, $AS_recomArea, $recomRateArr, $AS_recomIsMeihua, $AS_recomMeihuaFontLeft, $AS_recomMeihuaFontTop, $AS_recomMeihuaImgLeft, $AS_recomMeihuaImgTop, $AS_recomIsRev) .'
		'. AppNameAlipay::AppSysTrBox1($AS_nameAlipayPid, $AS_nameAlipayKey1, $AS_nameAlipayKey2, $AS_nameAlipayType, $AS_nameAlipayEvent) .'
		'. AppNameWeixin::AppSysTrBox1($AS_nameWeixinId, $AS_nameWeixinKey, $AS_nameWeixinType, $AS_nameWeixinRuleId) .'
		'. AppNamePhone::AppSysTrBox1($AS_namePhoneKey, $AS_namePhoneSecret, $AS_namePhoneCode) .'
		'. AppScoreTo::AppSysTrBox1($AS_isScoreTo, $AS_scoreTo12, $AS_scoreTo13, $AS_scoreTo21, $AS_scoreTo23, $AS_scoreTo31, $AS_scoreTo32, $userSysArr) .'
		</table>

		<!-- 站外类 -->
		<table id="tabOut" style="display:none;" cellpadding="0" cellspacing="0" summary="" class="padd3">
		<tr><td class="tabLeftWidth"></td><td></td></tr>
		'. AppChinaz::AppSysTrBox1($AS_chinazKey, $AS_chinazEvent) .'
		'. AppAizhan::AppSysTrBox1($AS_aizhanKey, $AS_aizhanEvent) .'
		</table>

		<!-- 其他 -->
		<table id="tabOther" style="display:none;" cellpadding="0" cellspacing="0" summary="" class="padd3">
		<tr><td class="tabLeftWidth"></td><td></td></tr>
		'. AppSiteApi::AppSysTrBox1($AS_isSiteApi, $AS_siteApiAnnoun, $AS_siteApiAreaStr, $AS_siteApiUrl) .'
		'. AppDingding::AppSysTrBox1($AS_isDingding, $AS_dingdingName1, $AS_dingdingName2, $AS_dingdingKeyList, $AS_dingdingKeyPoint, $AS_dingdingAreaStr, $AS_dingdingEvent) .'
		'. AppWeixinWork::AppSysTrBox1($AS_isWeixinWork, $AS_weixinWorkName1, $AS_weixinWorkName2, $AS_weixinWorkKeyList, $AS_weixinWorkKeyPoint, $AS_weixinWorkAreaStr, $AS_weixinWorkEvent) .'
		</table>

		<div class="tabMenuSubmit"><input type="image" src="'. AdmTpl::ImgSrc('button_save') .'" /></div>
	</div>

	</form>
	');

}

?>