<?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/system.js?v='. OT_VERSION .'"></script>
');



switch($mudi){
	case 'companyInfo':
		$MB->IsSecMenuRight('alertBack',40,$dataType);
		companyInfo();
		break;

	default:
		die('err');
}

$skin->WebBottom();

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





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

	$row = $DB->GetRow('select * from '. OT_dbPref .'system');
		$SYS_title			= $row['SYS_title'];
		$SYS_titleSign		= $row['SYS_titleSign'];
		$SYS_titleAddi		= $row['SYS_titleAddi'];
		$SYS_urlHead		= $row['SYS_urlHead'];
		$SYS_URL			= $row['SYS_URL'];
			// if (! Is::HttpUrl($SYS_URL)){ $SYS_URL = GetUrl::HttpHead() . $SYS_URL; }
			// if (substr($SYS_URL,-1) != '/'){ $SYS_URL .= '/'; }
		$SYS_isUrl301		= $row['SYS_isUrl301'];
		$SYS_webKey			= $row['SYS_webKey'];
		$SYS_webDesc		= $row['SYS_webDesc'];
		$SYS_isFloatAd		= $row['SYS_isFloatAd'];
		$SYS_isClose		= $row['SYS_isClose'];
		$SYS_closeNote		= $row['SYS_closeNote'];
		$SYS_dbCharset		= $row['SYS_dbCharset'];
		$SYS_isLogErr		= $row['SYS_isLogErr'];
		$SYS_isTplErr		= $row['SYS_isTplErr'];
		$SYS_isAjaxErr		= $row['SYS_isAjaxErr'];
		$SYS_isTimeInfo		= $row['SYS_isTimeInfo'];
		$SYS_isBaiduSitemap	= $row['SYS_isBaiduSitemap'];
		$SYS_verCodeMode	= $row['SYS_verCodeMode'];
		$SYS_verCodeStr		= $row['SYS_verCodeStr'];
		$SYS_geetestID		= $row['SYS_geetestID'];
		$SYS_geetestKey		= $row['SYS_geetestKey'];
		$SYS_templateDir	= $row['SYS_templateDir'];	//y
		$SYS_htmlCacheMin	= $row['SYS_htmlCacheMin'];
		$SYS_htmlCacheTime	= $row['SYS_htmlCacheTime'];
		$SYS_eventStr		= $row['SYS_eventStr'];

		$SYS_titleHome		= $row['SYS_titleHome'];
		$SYS_titleList		= $row['SYS_titleList'];
		$SYS_titleShow		= $row['SYS_titleShow'];
		$SYS_titleWeb		= $row['SYS_titleWeb'];
		$SYS_titleSearch	= $row['SYS_titleSearch'];
		$SYS_titleMark		= $row['SYS_titleMark'];
		$SYS_titleTopic		= $row['SYS_titleTopic'];
		$SYS_titleBbsList	= $row['SYS_titleBbsList'];
		$SYS_titleBbsShow	= $row['SYS_titleBbsShow'];
		$SYS_titleBbsSearch	= $row['SYS_titleBbsSearch'];

		$SYS_announName		= $row['SYS_announName'];
		$SYS_isHtmlHome			= $row['SYS_isHtmlHome'];

		$SYS_htmlUrlJump		= $row['SYS_htmlUrlJump'];
		$SYS_htmlUrlDir			= $row['SYS_htmlUrlDir'];
		$SYS_diyInfoTypeDir		= $row['SYS_diyInfoTypeDir'];
		$SYS_htmlInfoTypeDir	= $row['SYS_htmlInfoTypeDir'];
		$SYS_htmlDatetimeDir	= $row['SYS_htmlDatetimeDir'];
		$SYS_newsListUrlMode	= $row['SYS_newsListUrlMode'];
		$SYS_newsListFileName	= $row['SYS_newsListFileName'];
		$SYS_newsShowUrlMode	= $row['SYS_newsShowUrlMode'];
		$SYS_newsShowFileName	= $row['SYS_newsShowFileName'];
		$SYS_dynWebUrlMode		= $row['SYS_dynWebUrlMode'];
		$SYS_dynWebFileName		= $row['SYS_dynWebFileName'];

		$SYS_proxyIpPoint		= $row['SYS_proxyIpPoint'];
		$SYS_proxyIpList		= $row['SYS_proxyIpList'];
		$SYS_tagUrlMode			= $row['SYS_tagUrlMode'];
		$SYS_searchUrlMode		= $row['SYS_searchUrlMode'];
		$SYS_frameMode			= $row['SYS_frameMode'];
		$SYS_isLocalSession		= $row['SYS_isLocalSession'];
		$SYS_dbErrMode			= $row['SYS_dbErrMode'];
		$SYS_wapDir				= $row['SYS_wapDir'];
		$SYS_apiDir				= $row['SYS_apiDir'];
		$SYS_moneyUnit			= $row['SYS_moneyUnit'];
		$SYS_isShareDb			= $row['SYS_isShareDb'];
		$SYS_shareDbIp			= $row['SYS_shareDbIp'];
		$SYS_shareDbPort		= $row['SYS_shareDbPort'];
		$SYS_shareDbUser		= $row['SYS_shareDbUser'];
		$SYS_shareDbPwd			= $row['SYS_shareDbPwd'];
		$SYS_shareDbName		= $row['SYS_shareDbName'];
		$SYS_shareDbPref		= $row['SYS_shareDbPref'];
		$SYS_shareDbArea		= $row['SYS_shareDbArea'];
		$SYS_topicUrlMode		= $row['SYS_topicUrlMode'];
		$SYS_noPicNum			= $row['SYS_noPicNum'];
		$SYS_htmlHomeName		= $row['SYS_htmlHomeName'];
		$SYS_homeSginStr		= $row['SYS_homeSginStr'];
		$SYS_homeSginMode		= $row['SYS_homeSginMode'];
		$SYS_homeSginUrl		= $row['SYS_homeSginUrl'];
		$SYS_siteMode			= $row['SYS_siteMode'];
		$SYS_ipFileMode			= $row['SYS_ipFileMode'];
		$SYS_ipFileKey			= $row['SYS_ipFileKey'];
	unset($revexe);


	$siteUrlStr = '';
	$pcUrl = GetUrl::CurrDir(1);
	if ($SYS_URL != $pcUrl){
		$siteUrlStr = '<div style="color:red;">检测到网站网址是&ensp;<span style="color:#000;cursor:pointer;" onclick=\'$id("siteUrl").value="'. $pcUrl .'"\'>'. $pcUrl .'（点击替换）</span>，如该网站有多个域名，请填写主打域名。</div>';
	}
	echo('
	<form id="dealForm" name="dealForm" method="post" action="system_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 .'" />
	<input type="hidden" id="titleOld" name="titleOld" value="'. $SYS_title .'" />
	<input type="hidden" id="webKeyOld" name="webKeyOld" value="'. $SYS_webKey .'" />
	<input type="hidden" id="webDescOld" name="webDescOld" value="'. $SYS_webDesc .'" />
	<script language="javascript" type="text/javascript">document.write(\'<input type="hidden" name="backURL" value="\'+ document.location.href +\'" />\')</script>

	<div class="tabMenu">
	<ul>
		<li rel="tabBase" class="selected">基本信息</li>
		<li rel="tabFunc">功能块设置</li>
		<li id="seoBox" rel="tabSeo" style="display:none;">SEO设置</li>
		<li id="staicBox" rel="tabStaic">首页静态</li>
		<li id="newsBox" rel="tabNews" style="display:;">文章路径'. Skin::PluSign('商业版基础包','bottom') .'</li>
		<li id="buyBox" rel="tabBuy" style="display:;">商业版专属'. Skin::PluSign('商业版基础包','bottom') .'</li>
	</ul>
	</div>

	<div class="tabMenuArea">
		<table id="tabBase" cellpadding="0" cellspacing="0" summary="" class="padd3">
		<tr><td class="tabLeftWidth"></td><td></td></tr>
		<tr>
			<td align="right">网站图标：</td>
			<td style="color:red;">
				<a href="../favicon.ico" style="font-weight:bold;" class="font3_2" target="_blank"><img src="../favicon.ico" style="max-width:64px;max-height:64px;" />
				&ensp;根目录/favicon.ico</a> 网站ico图标，常见于显示在浏览器标题前，该文件可以替换为自己的。
			</td>
		</tr>
		<tr>
			<td align="right">'. Skin::RedSign() .'网站名称：</td>
			<td><input type="text" id="title" name="title" size="50" style="width:500px;" value="'. $SYS_title .'" /></td>
		</tr>
		<tr>
			<td align="right">网站标题连接符：</td>
			<td>
				<input type="text" id="titleSign" name="titleSign" size="50" style="width:60px;" value="'. $SYS_titleSign .'" />
				<span class="font3_2">&ensp;如：连接符“_”，列表页：栏目名称<span style="color:red;">_</span>网站名称，内容页：文章标题<span style="color:red;">_</span>栏目名称<span style="color:red;">_</span>网站名称</span>
			</td>
		</tr>
		<tr>
			<td align="right" valign="top" style="padding-top:8px;">网站标题附加内容：</td>
			<td>
				<input type="text" id="titleAddi" name="titleAddi" size="50" style="width:500px;" value="'. $SYS_titleAddi .'" />
				<div class="font3_2">为了灵活性，该附加内容与网站标题之间系统不会自动添加连接符。</div>
			</td>
		</tr>
		<!-- <tr>
			<td align="right">网站网址模式：</td>
			<td>
				<label><input type="radio" id="isUrl3012" name="isUrl301" value="2" '. Is::Checked($SYS_isUrl301,2) .' />默认</label>&ensp;&ensp;
				<label><input type="radio" id="isUrl3010" name="isUrl301" value="0" '. Is::Checked($SYS_isUrl301,0) .' />用base标签网址锁定</label><span class="font2_2">(不推荐)</span>&ensp;&ensp;
			</td>
		</tr> onclick="CheckIsUrl301()" --><input type="hidden" name="isUrl301" value="2" />
		<tr id="siteUrlBox">
			<td align="right" valign="top" style="padding-top:8px;">'. Skin::RedSign() .'网站网址：</td>
			<td>
				<input type="text" id="siteUrl" name="siteUrl" size="50" style="width:500px;" value="'. $SYS_URL .'" />
				<div class="font3_2">填错会导致前台多处资源加载路径错误或功能失效</div>
				'. $siteUrlStr .'
			</td>
		</tr>
		<tr>
			<td align="right" valign="top" style="padding-top:6px;">
				网站关键字(Keywords)：<br />
				<span class="font3_2">（便于搜索引擎搜到）<br />多个用英文逗号“,”隔开</span>
			</td>
			<td style="padding-bottom:4px;"><textarea id="webKey" name="webKey" rows="5" cols="40" style="width:500px; height:60px;">'. $SYS_webKey .'</textarea></td>
		</tr>
		<tr>
			<td align="right" valign="top" style="padding-top:6px;">
				网站描述(Description)：<br />
				<span class="font3_2">（便于搜索引擎搜到）</span>
			</td>
			<td style="padding-bottom:4px;"><textarea id="webDesc" name="webDesc" rows="5" cols="40" style="width:500px; height:88px;">'. $SYS_webDesc .'</textarea></td>
		</tr>
		<tr style="display:none;">
			<td align="right">网站模式：</td>
			<td>
				<select id="siteMode" name="siteMode">
					<option value="def" '. Is::Selected($SYS_isClose,'def') .'>文章系统模式（默认）</option>
					<option value="users" '. Is::Selected($SYS_isClose,'users') .'>会员管理系统模式</option>
				</select>
			</td>
		</tr>
		<tr>
			<td align="right">网站开关：</td>
			<td>
				<select id="isClose" name="isClose" onchange="CheckCloseK();">
					<option value="20" '. Is::Selected($SYS_isClose,20) .'>网站开启</option>
					<option value="10" '. Is::Selected($SYS_isClose,10) .'>网站关闭</option>
				</select>
			</td>
		</tr>
		<tr id="closeNoteK" style="display:none;">
			<td align="right" valign="top">网站关闭说明：</td>
			<td>
				<textarea id="closeNote" name="closeNote" cols="40" rows="4" style="width:510px;height:120px;" class="text" onclick=\'LoadEditor("closeNote",510,120,"|miniMenu|");\' title="点击开启编辑器模式">'. Str::MoreReplace($SYS_closeNote,'textarea') .'</textarea>
			</td>
		</tr>
		<tr>
			<td align="right">网站协议：</td>
			<td>
				<select id="urlHead" name="urlHead">
					<option value="">系统自动判断（默认）</option>
					<option value="http" '. Is::Selected($SYS_urlHead,'http') .'>http</option>
					<option value="https" '. Is::Selected($SYS_urlHead,'https') .'>https</option>
				</select>&ensp;
				<span style="color:blue;">检测协议为：'. GetUrl::HttpHead(true) .'</span>
				<span style="color:red;">（千万不要乱设置，错误协议会导致站内部分链接失效）</span>
			</td>
		</tr>
		<tr>
			<td align="right">数据库编码：</td>
			<td>
				<select id="dbCharset" name="dbCharset">
					<option value="utf8" '. Is::Selected($SYS_dbCharset,'utf8') .'>utf8（默认）</option>
					<option value="utf8mb4" '. Is::Selected($SYS_dbCharset,'utf8mb4') .'>utf8mb4（mysql>=5.5.3）</option>
				</select>&ensp;
				<span style="color:red;">（千万不要乱设置，错误编码会导致数据库乱码）</span>
			</td>
		</tr>
		<tr>
			<td align="right">数据库SQL语句错误：</td>
			<td>
				<select id="dbErrMode" name="dbErrMode">
					<!-- <option value="0" '. Is::Selected($SYS_dbErrMode,0) .'>默认</option> -->
					<option value="1" '. Is::Selected($SYS_dbErrMode,1) .'>静默模式[默认]（出错了不处理，仅显示错误代码或空白，适合网站上线）</option>
					<option value="2" '. Is::Selected($SYS_dbErrMode,2) .'>警告模式（出错了给出错误提示，并继续运行下去，适合调试错误）</option>
					<option value="3" '. Is::Selected($SYS_dbErrMode,3) .'>异常模式（出错了给出更详细错误提示，并停止运行下去）</option><!-- 交给异常PDOException对象 -->
				</select>&ensp;
				<span style="color:red;">（一般默认即可，不要乱设置，错误设置会导致数据库错误显示不对）</span>
			</td>
		</tr>
		<tr>
			<td align="right">session本地保存：</td>
			<td>
				<select id="isLocalSession" name="isLocalSession">
					<option value="0" '. Is::Selected($SYS_isLocalSession,0) .'>关闭（默认）</option>
					<option value="1" '. Is::Selected($SYS_isLocalSession,1) .'>开启（非特殊情况，禁止开启，否则会有session错误）</option>
				</select>&ensp;
				<span style="color:red;">（只要页面没出现session路径错误，选择[关闭]即可）</span>
			</td>
		</tr>
		<tr>
			<td align="right">前台Frame页面：</td>
			<td>
				<select id="frameMode" name="frameMode">
					<option value="" '. Is::Selected($SYS_frameMode,'') .'>无（默认）</option>
					<option value="DENY" '. Is::Selected($SYS_frameMode,'DENY') .'>X-Frame-Options:DENY（不加载任何Frame页面）</option>
					<option value="SAMEORIGIN" '. Is::Selected($SYS_frameMode,'SAMEORIGIN') .'>X-Frame-Options:SAMEORIGIN（只加载同域名下的Frame页面）</option>
				</select>&ensp;
				<span style="color:red;">（没特殊需求的，选择[无]即可）</span>
			</td>
		</tr>
		<tr>
			<td align="right">调试信息写入错误日志：</td>
			<td>
				<label><input type="checkbox" name="eventStr[]" value="|alipayErr|" '. Is::InstrChecked($SYS_eventStr,'|alipayErr|') .'/>支付宝支付出错</label>&ensp;&ensp;
				<label><input type="checkbox" name="eventStr[]" value="|weixinErr|" '. Is::InstrChecked($SYS_eventStr,'|weixinErr|') .'/>微信支付出错</label>&ensp;&ensp;
			</td>
		</tr>
		<tr>
			<td align="right">程序错误写入日志：</td>
			<td>
				<select id="isLogErr" name="isLogErr">
					<option value="1" '. Is::Selected($SYS_isLogErr,1) .'>开启（页面隐藏错误，推荐）</option>
					<option value="2" '. Is::Selected($SYS_isLogErr,2) .'>开启（页面显示错误）</option>
					<option value="0" '. Is::Selected($SYS_isLogErr,0) .'>关闭</option>
				</select>
				&ensp;&ensp;'. $skin->TishiBox('开启后，程序错误信息自动保存到 数据库目录/softErr.log') .'
			</td>
		</tr>
		<tr>
			<td align="right">网站模板错误提示：</td>
			<td>
				<select id="isTplErr" name="isTplErr">
					<option value="1" '. Is::Selected($SYS_isTplErr,1) .'>开启</option>
					<option value="0" '. Is::Selected($SYS_isTplErr,0) .'>关闭</option>
				</select>
				<!-- &ensp;&ensp;'. $skin->TishiBox('当前台出现class_template.php错误时，开启该项可以看到详细错误信息') .' -->
			</td>
		</tr>
		<tr style="display:none;">
			<td align="right">前台AJAX错误提示：</td>
			<td>
				<select id="isAjaxErr" name="isAjaxErr">
					<option value="1" '. Is::Selected($SYS_isAjaxErr,1) .'>开启</option>
					<option value="0" '. Is::Selected($SYS_isAjaxErr,0) .'>关闭</option>
				</select>
			</td>
		</tr>
		<tr>
			<td align="right">暂无图片数量：</td>
			<td>
				<select id="noPicNum" name="noPicNum">
				');
					for ($i=1; $i<=99; $i++){
						echo('<option value="'. $i .'" '. Is::Selected($SYS_noPicNum,$i) .'>'. $i .'</option>');
					}
				echo('
				</select>
				&ensp;&ensp;'. $skin->TishiBox('inc_img/noPic/目录下“暂无图片”图片可以自行增删改。') .'
			</td>
		</tr>
		<tr>
			<td align="right">网站公告名称：</td>
			<td>
				<input type="text" id="announName" name="announName" value="'. $SYS_announName .'" style="width:160px;" />
				&ensp;&ensp;<span class="font2_2">（更多公告设置在【模板管理】-【模板参数设置】[列表页/内容页]）</span>
			</td>
		</tr>
		<!-- <tr>
			<td align="right">wap/新目录名：</td>
			<td>
				<input type="text" id="wapDir" name="wapDir" value="'. $SYS_wapDir .'" style="width:160px;" />
			</td>
		</tr>
		<tr>
			<td align="right">api/新目录名：</td>
			<td>
				<input type="text" id="apiDir" name="apiDir" value="'. $SYS_apiDir .'" style="width:160px;" />
			</td>
		</tr>
		<tr>
			<td align="right">金钱单位：</td>
			<td>
				<input type="text" id="moneyUnit" name="moneyUnit" value="'. $SYS_moneyUnit .'" style="width:160px;" />
				&ensp;&ensp;<span class="font2_2">（默认“元”，为不显示那么商业化，可以改为“米”或“币”）</span>
			</td>
		</tr> -->
		</table>


		<table id="tabFunc" style="display:none;" cellpadding="0" cellspacing="0" summary="" class="padd3">
		<tr><td class="tabLeftWidth"></td><td></td></tr>
		'. Skin::ItemTrTop('验证码','设置') .'
		<tr class="verCodeBox">
			<td align="right">验证码模式：</td>
			<td>
				<select id="verCodeMode" name="verCodeMode" onchange="CheckVerCodeMode()">
					<option value="1" '. Is::Selected($SYS_verCodeMode,1) .'>数字验证码1</option>
					<option value="2" '. Is::Selected($SYS_verCodeMode,2) .'>数字验证码2</option>
					<option value="3" '. Is::Selected($SYS_verCodeMode,3) .'>数字验证码3</option>
					<option value="4" '. Is::Selected($SYS_verCodeMode,4) .'>数字验证码4</option>
					<!-- <option value="5" '. Is::Selected($SYS_verCodeMode,5) .'>中文验证码</option> -->
					<option value="20" '. Is::Selected($SYS_verCodeMode,20) .'>滑动验证码（极验）</option>
				</select>
				<span style="position:relative;"><img src="temp/verCode.png" style="display:none;position:absolute;border:1px #000 solid;" /></span>
			</td>
		</tr>
		<tr class="geetestClass">
			<td align="right" class="font1_2d">极验ID：</td>
			<td align="left">
				<input type="text" id="geetestID" name="geetestID" size="50" style="width:350px;" value="'. $SYS_geetestID .'" />&ensp;&ensp;
				<span style="color:red;">极验申请网址：<a href="http://www.geetest.com/" target="_blank" class="font1_2">http://www.geetest.com/</a></span>
			</td>
		</tr>
		<tr class="geetestClass">
			<td align="right" class="font1_2d">极验KEY：</td>
			<td align="left">
				<input type="text" id="geetestKey" name="geetestKey" size="50" style="width:350px;" value="'. $SYS_geetestKey .'" />&ensp;&ensp;
				'. Adm::StudyShow('system','<span style="color:red;">极验申请教程：<a href="http://otcms.com/news/8004.html" target="_blank" class="font1_2">http://otcms.com/news/8004.html</a></span>') .'
			</td>
		</tr>
		<tr>
			<td align="right" class="font1_2d">开启范围：</td>
			<td>
				<label><input type="checkbox" name="verCodeStr[]" value="|admin|" '. Is::InstrChecked($SYS_verCodeStr,'|admin|') .' />后台登录</label>&ensp;&ensp;
				<label><input type="checkbox" name="verCodeStr[]" value="|reg|" '. Is::InstrChecked($SYS_verCodeStr,'|reg|') .' />会员注册<span style="color:red;">(建议打钩，不然有被批量注册风险)</span></label>&ensp;&ensp;
				<label><input type="checkbox" name="verCodeStr[]" value="|login|" '. Is::InstrChecked($SYS_verCodeStr,'|login|') .' />会员登录</label>&ensp;&ensp;
				<!-- <label><input type="checkbox" name="verCodeStr[]" value="|news|" '. Is::InstrChecked($SYS_verCodeStr,'|news|') .' />前台投稿</label>&ensp;&ensp; -->
				<label><input type="checkbox" name="verCodeStr[]" value="|newsReply|" '. Is::InstrChecked($SYS_verCodeStr,'|newsReply|') .' />内容页评论区</label>&ensp;&ensp;
				<label><input type="checkbox" name="verCodeStr[]" value="|message|" '. Is::InstrChecked($SYS_verCodeStr,'|message|') .' />留言板</label>&ensp;&ensp;
				'. AppBbs::SystemBox1($SYS_verCodeStr) .'
			</td>
		</tr>
		'. Skin::ItemTrBottom() .'

		'. Skin::ItemTrTop('IP库','设置') .'
		<tr>
			<td align="right">IP库选择：</td>
			<td>
			');
				$datPath = OT_ROOT .'tools/ip.dat';
				$czdbPath = OT_ROOT .'tools/cz88_public_v4.czdb';
				$datStr = $czdbStr = '文件不存在';
				if (file_exists($datPath)){
					$size = filesize($datPath);
					$sizeUnit = File::SizeUnit($size);
					if ($size <= 16*1024*1024){
						$datStr = '旧文件'. $sizeUnit;
					}else{
						$datStr = $sizeUnit;
					}
				}
				if (file_exists($czdbPath)){
					$size = filesize($czdbPath);
					$sizeUnit = File::SizeUnit($size);
					$czdbStr = $sizeUnit;
				}
				echo('
				<label><input type="radio" id="ipFileMode0" name="ipFileMode" value="0" '. Is::Checked($SYS_ipFileMode,0) .' onclick="CheckIpFile()" />关闭</label>&ensp;&ensp;
				<label><input type="radio" id="ipFileMode1" name="ipFileMode" value="1" '. Is::Checked($SYS_ipFileMode,1) .' onclick="CheckIpFile()" />纯真社区版BAT格式IP库</label><span style="color:red;" title="【管理员区→程序文件检查】-[可选文件下载]获取IP库">（'. $datStr .'）</span>&ensp;&ensp;
				<!-- <label><input type="radio" id="ipFileMode2" name="ipFileMode" value="2" '. Is::Checked($SYS_ipFileMode,2) .' onclick="CheckIpFile()" />纯真社区版CZDB格式新IP库</label><span style="color:red;">（'. $czdbStr .'）</span>&ensp;&ensp; -->
				（感谢<a href="https://www.cz88.net" target="_blank"><b>纯真CZ88</b></a>提供）
			</td>
		</tr>
		<tr id="ipFileBox" style="display:none;">
			<td align="right" valign="top" style="padding-top:8px;">'. Skin::RedSign() .'CZDB文件密钥：</td>
			<td>
				<input type="text" id="ipFileKey" name="ipFileKey" size="50" style="width:500px;" value="'. $SYS_ipFileKey .'" />
			</td>
		</tr>
		'. Skin::ItemTrBottom() .'

		'. Skin::ItemTrTop('网址异常','处理设置') .'
		<tr>
			<td align="right" valign="top" style="padding-top:6px;">网址异常特征信息：</td>
			<td>
				<input type="text" id="homeSginStr" name="homeSginStr" value="'. $SYS_homeSginStr .'"  style="width:382px;" />
				<select onchange=\'$id("homeSginStr").value=this.value;this.value="";\'>
					<option value="" style="color:#ccc;">候选项</option>
					<option value="/index.php/">/index.php/</option>
				</select>
				&ensp;&ensp;<span class="font2_2">（平时留空，特殊情况时使用，比如大量网址异常或内含广告推销信息，标记特征信息）</span>
			</td>
		</tr>
		<tr>
			<td align="right">网址异常跳转网址：</td>
			<td>
				<input type="text" id="homeSginUrl" name="homeSginUrl" value="'. $SYS_homeSginUrl .'" style="width:500px;" />
				&ensp;&ensp;<span class="font2_2">（当网址含有特征信息时，跳转网址）</span>
			</td>
		</tr>
		'. Skin::ItemTrBottom() .'

		<!-- <tr>
			<td align="right">独立共享会员库：</td>
			<td>
				<label><input type="radio" id="isShareDb1" name="isShareDb" value="1" '. Is::Checked($SYS_isShareDb,1) .' onclick="CheckShareDb()" />启用</label>&ensp;&ensp;
				<label><input type="radio" id="isShareDb0" name="isShareDb" value="0" '. Is::Checked($SYS_isShareDb,0) .' onclick="CheckShareDb()" />禁用</label>&ensp;&ensp;
				<input type="button" value=" 连接测试 " style="color:red;" onclick="ConnMySql()" />
				&ensp;&ensp;<label style="color:#c9c8c8;"><input type="checkbox" id="shareDbIsBug" name="shareDbIsBug" value="1" />新窗口打开</label>
			</td>
		</tr>
		<tbody id="shareDbBox" style="display:none;"> -->
		<!-- <tr>
			<td align="right">会员库地址/IP：</td>
			<td>
				<input type="text" id="shareDbIp" name="shareDbIp" style="width:250px;" value="'. $SYS_shareDbIp .'" /> 
				<span class="desc"> 可以是域名或IP，本地服务器默认为 <span style="color:red;cursor:pointer;" onclick="document.getElementById(\'shareDbIp\').value=\'localhost\';">localhost</span> 或 <span style="color:red;cursor:pointer;" onclick="document.getElementById(\'shareDbIp\').value=\'127.0.0.1\';">127.0.0.1</span></span>
			</td>
		</tr>
		<tr>
			<td align="right">会员库端口：</td>
			<td>
				<input type="text" id="shareDbPort" name="shareDbPort" style="width:250px;" value="'. $SYS_shareDbPort .'" /> 
				<span class="desc"> 默认为 <span style="color:red;cursor:pointer;" onclick="document.getElementById(\'shareDbPort\').value=\'3306\';">3306</span></span>
			</td>
		</tr>
		<tr>
			<td align="right">会员库账号/用户名：</td>
			<td>
				<input type="text" id="shareDbUser" name="shareDbUser" style="width:250px;" value="'. $SYS_shareDbUser .'" /> 
			</td>
		</tr>
		<tr>
			<td align="right">会员库密码：</td>
			<td>
				<input type="text" id="shareDbPwd" name="shareDbPwd" style="width:250px;" value="'. $SYS_shareDbPwd .'" /> 
			</td>
		</tr>
		<tr>
			<td align="right">会员库名：</td>
			<td>
				<input type="text" id="shareDbName" name="shareDbName" style="width:250px;" value="'. $SYS_shareDbName .'" /> 
			</td>
		</tr>
		<tr>
			<td align="right">会员库表前缀：</td>
			<td>
				<input type="text" id="shareDbPref" name="shareDbPref" style="width:250px;" value="'. $SYS_shareDbPref .'" /> 
				<span class="desc"> 一般用默认 <span style="color:red;cursor:pointer;" onclick="document.getElementById(\'shareDbPref\').value=\'OT_\';">OT_</span> ，同一数据库安装多个网钛CMS时才需要修改以区分</span>
			</td>
		</tr>
		<tr style="display:none;">
			<td align="right">会员库关联表：</td>
			<td>
				
				<label><input type="checkbox" name="eventStr[]" value="|users|" '. Is::InstrChecked($SYS_eventStr,'|users|') .' disabled="true" />OT_users(会员)</label>&ensp;&ensp;
				<label><input type="checkbox" name="eventStr[]" value="|weixinErr|" '. Is::InstrChecked($SYS_eventStr,'|weixinErr|') .'/>diyPay 3、gain 3、money 6、userGroup、userMoney、users</label>&ensp;&ensp;
			</td>
		</tr>
		</tbody> -->
		</table>


		<table id="tabStaic" style="display:none;" cellpadding="0" cellspacing="0" summary="" class="padd3">
		<tr><td class="tabLeftWidth"></td><td></td></tr>
		<tr>
			<td align="right">首页静态页：</td>
			<td>
				<input type="hidden" id="isHtmlHomeOld" name="isHtmlHomeOld" value="'. $SYS_isHtmlHome .'" />
				<label><input type="radio" id="isHtmlHome1" name="isHtmlHome" onclick="CheckHtmlHome()" value="1" '. Is::Checked($SYS_isHtmlHome,1) .' />启用</label>&ensp;&ensp;
				<label><input type="radio" id="isHtmlHome0" name="isHtmlHome" onclick="CheckHtmlHome()" value="0" '. Is::Checked($SYS_isHtmlHome,0) .' />禁用</label>&ensp;&ensp;
				&ensp;&ensp;'. $skin->TishiBox('当禁用时，系统会自动删除根目录下首页静态页'. $SYS_htmlHomeName) .'
				&ensp;&ensp;<input type="button" value="判断首页静态" onclick=\'AjaxGetDeal("readDeal.php?mudi=checkHomeHtml");\' />
				&ensp;&ensp;<a href="'. GetUrl::CurrDir(1) . $SYS_htmlHomeName .'" target="_blank" class="font3_2">[预览'. $SYS_htmlHomeName .']</a>
			</td>
		</tr>
		<tr id="htmlHomeBox">
			<td align="right" class="font1_2d">首页静态页名：</td>
			<td align="left">
				<label><input type="radio" id="htmlHomeName0" name="htmlHomeName" onclick="CheckHtmlHomeName()" value="index.html" '. Is::Checked($SYS_htmlHomeName,'index.html') .' />默认（index.html）</label>&ensp;&ensp;
				<label><input type="radio" id="htmlHomeName1" name="htmlHomeName" onclick="CheckHtmlHomeName()" value="index.htm" '. Is::Checked($SYS_htmlHomeName,'index.htm') .' />index.htm</label>&ensp;&ensp;
				<label><input type="radio" id="htmlHomeName99" name="htmlHomeName" onclick="CheckHtmlHomeName()" value="diy" '. (in_array($SYS_htmlHomeName,array('index.html','index.htm')) ? '' : 'checked="checked"') .' />自定义</label>
				<span id="htmlHomeNameBox">
					：<input type="text" id="htmlHomeNameDiy" name="htmlHomeNameDiy" size="50" style="width:150px;" value="'. $SYS_htmlHomeName .'" />
					<span style="color:red;">（以.html或.htm结尾，首页静态页不想用index.html时设置）</span>
				</span>
			</td>
		</tr>
		<tr>
			<td align="right" class="font1_2d">定时生成静态页：</td>
			<td align="left" style="color:red;">【常规设置→自动操作设置】- [首页静态页]设置</td>
		</tr>
		</table>
		');

		if (! AppBase::Jud()){
			$noAppStr = $skin->TixingNoApp( SysDiff::PluginName('base') );
			$skin->PaySoftBox('tabBuy', $noAppStr);
			$skin->PaySoftBox('tabNews', $noAppStr);
			echo('<input type="hidden" id="authState" name="authState" value="false" />');

		}elseif ($sysAdminArr['SA_isLan'] == 1 && $sysAdminArr['SA_sendUrlMode'] == 0){
			$skin->PaySoftBox('tabBuy', $skin->TixingLan());
			$skin->PaySoftBox('tabNews', $skin->TixingLan());
			echo('<input type="hidden" id="authState" name="authState" value="false" />');

		}else{
			if ($sysAdminArr['SA_sendUrlMode'] == 1){
				$isRewrite = 1;
			}else{
				$retArr = @ReqUrl::UseAuto($sysAdminArr['SA_getUrlMode'], 'GET',GetUrl::CurrDir(1) .'readSoft.html', 'UTF-8');
				if ($retArr['res'] && $retArr['note'] == '[该访问地址存在]'){
					$isRewrite = 1;
				}else{
					$isRewrite = 0;
				}
			}

			$paraArr = array(
				'SYS_isTimeInfo'		=> $SYS_isTimeInfo ,
				'SYS_isBaiduSitemap'	=> $SYS_isBaiduSitemap ,
				'SYS_htmlCacheMin'		=> $SYS_htmlCacheMin ,
				'SYS_htmlCacheTime'		=> $SYS_htmlCacheTime ,
				'SYS_isFloatAd'			=> $SYS_isFloatAd ,
				'SYS_eventStr'			=> $SYS_eventStr ,
				'SYS_proxyIpPoint'		=> $SYS_proxyIpPoint ,
				'SYS_proxyIpList'		=> $SYS_proxyIpList ,

				'SYS_htmlUrlJump'		=> $SYS_htmlUrlJump ,
				'SYS_htmlUrlDir'		=> $SYS_htmlUrlDir ,
				'SYS_htmlInfoTypeDir'	=> $SYS_htmlInfoTypeDir ,
				'SYS_htmlDatetimeDir'	=> $SYS_htmlDatetimeDir ,
				'SYS_diyInfoTypeDir'	=> $SYS_diyInfoTypeDir ,
				'SYS_newsListUrlMode'	=> $SYS_newsListUrlMode ,
				'SYS_newsListFileName'	=> $SYS_newsListFileName ,
				'SYS_newsShowUrlMode'	=> $SYS_newsShowUrlMode ,
				'SYS_newsShowFileName'	=> $SYS_newsShowFileName ,
				'SYS_dynWebUrlMode'		=> $SYS_dynWebUrlMode ,
				'SYS_dynWebFileName'	=> $SYS_dynWebFileName ,
				'SYS_tagUrlMode'		=> $SYS_tagUrlMode ,
				'SYS_searchUrlMode'		=> $SYS_searchUrlMode ,
				'SYS_topicUrlMode'		=> $SYS_topicUrlMode ,
				'judAppTag'				=> AppTag::Jud() ? 1 : 0 ,
				'isRewrite'				=> $isRewrite ,
				'isCloseStudyUrl'		=> strpos($sysAdminArr['SA_infoCloseArea'],'|system|') === false ? 0 : 1,
				'servInfo'				=> $_SERVER['SERVER_SOFTWARE']
				);

			$getWebHtml = OTauthWeb('system', 'system_V6.00.php', $paraArr);
			if (strpos($getWebHtml,'(OTCMS)') === false){
				$authAlertStr = $skin->TixingNoGet($getWebHtml);
				$getWebHtml = ''.
					$skin->PaySoftBox('tabBuy', $authAlertStr, false, true) .
					$skin->PaySoftBox('tabNews', $authAlertStr, false, true) .
					'<input type="hidden" id="authState" name="authState" value="false" />';
			}else{
				echo('
				<script language="javascript" type="text/javascript">
				// $id("seoBox").style.display = "";
				$id("buyBox").style.display = "";
				$id("newsBox").style.display = "";
				</script>
				');
			}
			echo($getWebHtml);
		}

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

	</form>
	');
}

?>