<html>
<head>
<link href=images/style.css rel=stylesheet type=text/css>
<meta http-equiv="Content-Type" content="text/html; charset=<?=$charset?>">
</head>
<script type="text/javascript" src="js/common.js"></script>
<script type="text/javascript" src="../js/jquery.js"></script>
<body>
<?include tpl('here')?>
<br/>



<style type="text/css">
body{
font-family: arial;
font-size: 12px;
text-align: center;
margin: 0;
}
.nTab{
width: 96%;
margin: 0 auto;
border:1px #ddd solid;
background-position:left;
background-repeat:repeat-y;
margin-bottom:2px;
}
.nTab .TabTitle{
clear: both;
height: 40px;
overflow: hidden;
}
.nTab .TabTitle ul{
margin:0;
padding:0;
}
.nTab .TabTitle li{
float: left;
width: 24.8%;
cursor: pointer;
height:40px; line-height:40px; font-size:14px; font-weight: bold;
list-style-type: none;
}
.nTab .TabTitle .active{ background-color: #2f96b4;
background-image: -moz-linear-gradient(top, #52b2cf, #2f96b4);
background-image: -webkit-gradient(linear, 0 0, 0 96%, from(#52b2cf), to(#2f96b4));
background-image: -webkit-linear-gradient(top, #52b2cf, #2f96b4);
background-image: -o-linear-gradient(top, #52b2cf, #2f96b4);
background-image: linear-gradient(to bottom, #52b2cf, #2f96b4);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff52b2cf', endColorstr='#ff2f96b4', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); font-size:14px; color:#fff;border:#fff 1px solid;}
.nTab .TabTitle .normal{ background:#eee; border-top:#fff 1px solid; border-right:#ddd 1px solid;border-left:#fff 1px solid;}
.nTab .TabContent{
width:auto;background:#fff;
margin: 0px auto;
padding:10px 0 0 0;
border-right:1px #C7C7CD solid;border-left:1px #C7C7CD solid;
}
.none {display:none;}
</style>
<script type="text/javascript">
function nTabs(thisObj,Num){
if(thisObj.className == "active")return;
var tabObj = thisObj.parentNode.id;
var tabList = document.getElementById(tabObj).getElementsByTagName("li");
for(i=0; i <tabList.length; i++)
{
  if (i == Num)
  {
   thisObj.className = "active"; 
      document.getElementById(tabObj+"_Content"+i).style.display = "block";
  }else{
   tabList[i].className = "normal"; 
   document.getElementById(tabObj+"_Content"+i).style.display = "none";
  }
} 
}
</script>
<form method="post">
<center>
<div style="text-align:center;">
<!-- 选项卡开始 -->
  <div class="nTab">
    <!-- 标题开始 -->
    <div class="TabTitle">
      <ul id="myTab0">
        <li class="active" onClick="nTabs(this,0);">网站基本设置</li>
        <li class="normal" onClick="nTabs(this,1);">信息相关设置</li>
        <li class="normal" onClick="nTabs(this,2);">邮件设置</li>
        <li class="normal" onClick="nTabs(this,3);">ucenter整合设置</li>
       
      </ul>
    </div>
    <!-- 内容开始 -->
    <div class="TabContent">
      <div id="myTab0_Content0">
      
      <table width=96% align=center border=0 cellspacing=3 cellpadding=3 >
  <tr bgcolor=#FFFFFF>
    <td><div align="right" width="30%">网站名称：</div></td>
    <td><input name="webname" type=text id="webname" value="<?=$CFG[webname]?>"  size=45  class="dfinput"></td>
  </tr>
  <tr bgcolor=#FFFFFF>
    <td><div align="right">网址：</div></td>
    <td><input name="weburl" type=text id="weburl" value="<?=$CFG[weburl]?>"  size=45  class="dfinput">末尾不要加'/'。</td>
  </tr>
  <tr bgcolor=#FFFFFF>
  <td width="23%"><div align="right">网站关键词：</div></td>
  <td width="77%"><textarea name="keywords" cols=50 rows=4 id="keywords"><?=$CFG[keywords]?></textarea></td>
</tr>
<tr bgcolor=#FFFFFF>
  <td height=40><div align="right">网站描述：</div></td>
  <td><textarea name="description" cols=50 rows=4 id="description"><?=$CFG[description]?></textarea></td>
</tr>
<tr bgcolor=#FFFFFF>
    <td><div align="right">标题后面文字：</div></td>
    <td><textarea name="annouce" cols=50 rows=2 id="annouce"><?=$CFG[annouce]?></textarea></td>
  </tr>
  <tr bgcolor=#FFFFFF>
    <td><div align="right">网站客服电话：</div></td>
    <td><input name="phone" type=text id="phone" value="<?=$CFG[phone]?>"  size=45  class="dfinput"> class="dfinput">
      </td>
  </tr>
  <tr bgcolor=#FFFFFF>
    <td><div align="right">客服QQ号：</div></td>
    <td><input name="qq" type=text id="qq" value="<?=$CFG[qq]?>"  size=45  class="dfinput"> class="dfinput">
      多个QQ号，用 &quot;|&quot; 隔开 。 </td>
  </tr>
  <tr bgcolor=#FFFFFF>
    <td><div align="right">网站QQ群：</div></td>
    <td><input name="qqun" type=text id="qqun" value="<?=$CFG[qqun]?>"  size=45  class="dfinput"> class="dfinput">
      </td>
  </tr>
  <tr bgcolor=#FFFFFF>
    <td><div align="right">网站email：</div></td>
    <td><input name="email" type=text id="email" value="<?=$CFG[email]?>"  size=45  class="dfinput"> class="dfinput">
      </td>
  </tr>
  <tr bgcolor=#FFFFFF>
    <td><div align="right">网站备案号：</div></td>
    <td><input name="icp" type=text id="icp" value="<?=$CFG[icp]?>"  size=45  class="dfinput"> class="dfinput"></td>
  </tr>
  <tr bgcolor=#FFFFFF>
    <td><div align="right">模板目录名称：</div></td>
    <td><label>
      <select name="tplname" id="tplname">
	  <?
	  foreach($tpl_dir as $val)
	  {
	      if($val==$CFG[tplname])
		  {
		      echo "<option value=$val selected='selected'>$val</option>";
		  }else{
              echo "<option value=$val $select>$val</option>";
          }
	  }
	  ?>
      </select>
    </label></td>
  </tr>
  <tr bgcolor=#FFFFFF>
    <td><div align="right">是否启用伪静态：</div></td>
    <td>
      <input name="rewrite" type="radio" value="1" <? if($CFG[rewrite] == '1') echo 'checked';?>>是
      <input type="radio" name="rewrite" value="0" <? if($CFG[rewrite] != '1') echo 'checked';?>>否 (启用伪静态需要服务器的支持，请确认您的服务器环境支持url_rewrite)</td>
  </tr>
    <tr bgcolor=#FFFFFF>
    <td><div align="right">是否开启手机版：</div></td>
    <td>
      <input name="wap" type="radio" value="1" <? if($CFG[wap] == '1') echo 'checked';?>>是
      <input type="radio" name="wap" value="0" <? if($CFG[wap] != '1') echo 'checked';?>>否 </td>
  </tr>
  
  
  <tr bgcolor=#FFFFFF>
    <td><div align="right">加密字符：</div></td>
    <td><input name="crypt" type=text id="crypt" value="<?=$CFG[crypt]?>"  size=45  class="dfinput"> class="dfinput"></td>
  </tr>
  
  
  
  <tr bgcolor=#FFFFFF>
    <td><div align="right">禁止词语：</div></td>
    <td><textarea name="banwords" cols=50 rows=5 id="banwords"><?=$CFG[banwords]?></textarea>
      多个词语用'|'隔开</td>
  </tr>
  

<tr bgcolor=#FFFFFF>
  <td height=40><div align="right">底部版权信息：</div></td>
  <td><textarea name="copyright" cols=50 rows=4 id="copyRight"><?=$CFG[copyright]?></textarea></td>
</tr>
<tr bgcolor=#FFFFFF>
  <td height=40><div align="right">网站统计代码：</div></td>
  <td><textarea name="count" cols=50 rows=4 id="count"><?=$CFG[count]?></textarea> 
  <br>例如cnzz统计、百度统计等</td>
</tr>
<tr bgcolor=#FFFFFF>
  <td height=40><div align="right">关闭用户注册：</div></td>
  <td><input type="radio" name="close_register" value="1" <? if($CFG[close_register] == '1') echo 'checked';?>>
    是
    <input type="radio" name="close_register" value="0" <? if($CFG[close_register] != '1') echo 'checked';?>>
    否</td>
</tr>
<tr bgcolor=#FFFFFF>
  <td height=40><div align="right">是否关闭网站：</div></td>
  <td><input type="radio" name="closesystem" value="1" <? if($CFG[closesystem] == '1') echo 'checked';?>>
    是
    <input name="closesystem" type="radio" value="0" <? if($CFG[closesystem] != '1') echo 'checked';?>>
    否</td>
</tr>
<tr bgcolor=#FFFFFF>
  <td height=40><div align="right">关闭网站提示内容：</div></td>
  <td><textarea name="close_tips" cols=50 rows=4 id="close_tips"><?=$CFG[close_tips]?></textarea></td>
</tr>

</table>
</td></tr>
</table>
      
      
      </div>
      <div id="myTab0_Content1" class="none"><table width=96% align=center border=0 cellspacing=2 cellpadding=2 >
  <tr bgcolor=#FFFFFF>
    <td width="32%"><div align="right">允许发布的地区：</div></td>
    <td width="68%"><label>
    <input name="onlyarea" type=text id="onlyarea" value="<?=$CFG[onlyarea]?>"  size=20  class="dfinput"> (多个用|隔开)
     IP库可能判断不准确。</label></td>
  </tr>

  <tr bgcolor=#FFFFFF>
    <td><div align="right">删除会员同时删除会员发布的信息：</div></td>
    <td><label>
      <input name="del_m_info" type="radio" value="1" <? if($CFG[del_m_info] == '1') echo 'checked';?>>是
      <input type="radio" name="del_m_info" value="0" <? if($CFG[del_m_info] != '1') echo 'checked';?>>否 </label></td>
  </tr>

  <tr bgcolor=#FFFFFF>
    <td><div align="right">删除会员同时删除会员发布的评论：</div></td>
    <td><label>
      <input name="del_m_comment" type="radio" value="1" <? if($CFG[del_m_comment] == '1') echo 'checked';?>>是
      <input type="radio" name="del_m_comment" value="0" <? if($CFG[del_m_comment] != '1') echo 'checked';?>>否 </label></td>
  </tr>

  <tr bgcolor=#FFFFFF>
    <td><div align="right">发布信息需要审核：</div></td>
    <td><label>
      <input name="post_check" type="radio" value="1" <? if($CFG[post_check] == '1') echo 'checked';?>>是
      <input name="post_check" type="radio" value="0" <? if($CFG[post_check] != '1') echo 'checked';?>>否 </label></td>
  </tr>
  <tr bgcolor=#FFFFFF>
    <td><div align="right">发表评论需要审核：</div></td>
    <td>
      <input name="comment_check" type="radio" value="1" <? if($CFG[comment_check] == '1') echo 'checked';?>>是
      <input name="comment_check" type="radio" value="0" <? if($CFG[comment_check] != '1') echo 'checked';?>>否	</td>
  </tr>
  <tr bgcolor=#FFFFFF>
    <td><div align="right">列表页每页信息数量：</div></td>
    <td>
      <input name="pagesize" type=text id="pagesize" value="<?=$CFG[pagesize]?>" size=20  class="dfinput"> 条</td>
  <tr bgcolor=#FFFFFF>
    <td><div align="right">商家列表页信息数量：</div></td>
    <td>
      <input name="com_pagesize" type=text id="com_pagesize" value="<?=$CFG[com_pagesize]?>" size=20  class="dfinput"> 条</td>
  </tr>
  <tr bgcolor=#FFFFFF>
    <td><div align="right">每天最多发布信息数量：</div></td>
    <td>
      <input name="maxpost" type=text id="maxpost" value="<?=$CFG[maxpost]?>" size=20  class="dfinput"> 条</td>
  </tr>
  <tr bgcolor=#FFFFFF>
    <td><div align="right">商家缩略图宽度：</div></td>
    <td>
      <input name="com_thumbwidth" type=text id="com_thumbwidth" value="<?=$CFG[com_thumbwidth]?>" size=20  class="dfinput"> px</td>
  </tr>
  <tr bgcolor=#FFFFFF>
    <td><div align="right">商家缩略图高度：</div></td>
    <td>
      <input name="com_thumbheight" type=text id="com_thumbheight" value="<?=$CFG[com_thumbheight]?>" size=20 class="dfinput"> px</td>
  </tr>
  <tr bgcolor=#FFFFFF>
  <td height=40><div align="right">信息过期后是否显示联系方式：</div></td>
  <td><input type="radio" name="expired_view" value="1" <? if($CFG[expired_view] == '1') echo 'checked';?>>
    是
    <input name="expired_view" type="radio" value="0" <? if($CFG[expired_view] != '1') echo 'checked';?>>
    否</td>
</tr>
<tr bgcolor=#FFFFFF>
  <td height=40><div align="right">是否允许游客发布信息：</div></td>
  <td><input type="radio" name="visitor_post" value="1" <? if($CFG[visitor_post] == '1') echo 'checked';?>>
    是
    <input name="visitor_post" type="radio" value="0" <? if($CFG[visitor_post] != '1') echo 'checked';?>>
    否</td>
</tr>
<tr bgcolor=#FFFFFF>
  <td height=40><div align="right">是否允许游客发布评论：</div></td>
  <td><input type="radio" name="visitor_comment" value="1" <? if($CFG[visitor_comment] == '1') echo 'checked';?>>
    是
    <input name="visitor_comment" type="radio" value="0" <? if($CFG[visitor_comment] != '1') echo 'checked';?>>
    否</td>
</tr>
<tr bgcolor=#FFFFFF>
  <td height=40><div align="right">是否允许游客浏览联系方式：</div></td>
  <td><input type="radio" name="visitor_view" value="1" <? if($CFG[visitor_view] == '1') echo 'checked';?>>
    是
    <input name="visitor_view" type="radio" value="0" <? if($CFG[visitor_view] != '1') echo 'checked';?>>
    否</td>
</tr>
<tr bgcolor=#FFFFFF>
  <td height=40><div align="right">会员注册需要进行验证：</div></td>
  <td><input type="radio" name="reg_check" value="1" <? if($CFG[reg_check] == '1') echo 'checked';?>>
    是
    <input name="reg_check" type="radio" value="0" <? if($CFG[reg_check] != '1') echo 'checked';?>>
    否</td>
</tr>
<tr bgcolor=#FFFFFF>
  <td height=40><div align="right">发布信息的文件名：</div></td>
  <td><input name="postfile" type=text id="postfile" value="<?=$CFG[postfile]?>" size=20  class="dfinput"></td>
</tr>

<tr bgcolor=#FFFFFF>
  <td height=40><div align="right">信息置顶信息币：</div></td>
  <td><input name="info_top_gold" type="text" size="20" value="<?=$CFG[info_top_gold]?>"  class="dfinput"> 信息币</td>
</tr>
<tr bgcolor=#FFFFFF>
  <td height=40><div align="right">刷新信息信息币：</div></td>
  <td><input name="info_refer_gold" type="text" size="20" value="<?=$CFG[info_refer_gold]?>"  class="dfinput"> 信息币</td>
</tr>
<tr bgcolor=#FFFFFF>
  <td height=40><div align="right">注册赠送积分：</div></td>
  <td><input name="register_credit" type="text" size="20" value="<?=$CFG[register_credit]?>" class="dfinput"> 积分</td>
</tr>
<tr bgcolor=#FFFFFF>
  <td height=40><div align="right">登陆赠送积分：</div></td>
  <td><input name="login_credit" type="text" size="20" value="<?=$CFG[login_credit]?>"  class="dfinput"> 积分</td>
</tr>
<tr bgcolor=#FFFFFF>
  <td height=40><div align="right">每天登陆赠积分次数：</div></td>
  <td><input name="max_login_credit" type="text" size="20" value="<?=$CFG[max_login_credit]?>"  class="dfinput">  次</td>
</tr>
<tr bgcolor=#FFFFFF>
  <td height=40><div align="right">每天发布信息赠积分次数：</div></td>
  <td><input name="max_info_credit" type="text" size="20" value="<?=$CFG[max_info_credit]?>"  class="dfinput"> 次</td>
</tr>
<tr bgcolor=#FFFFFF>
  <td height=40><div align="right">每天发评论赠积分次数：</div></td>
  <td><input name="max_comment_credit" type="text" size="20" value="<?=$CFG[max_comment_credit]?>"> 次</td>
</tr>
<tr bgcolor=#FFFFFF>
  <td height=40><div align="right">发布信息赠送积分：</div></td>
  <td><input name="post_info_credit" type="text" size="20" value="<?=$CFG[post_info_credit]?>"> 积分</td>
</tr>
<tr bgcolor=#FFFFFF>
  <td height=40><div align="right">发表评论积分：</div></td>
  <td><input name="post_comment_credit" type="text" size="20" value="<?=$CFG[post_comment_credit]?>"  class="dfinput"> 积分</td>
</tr>

<tr bgcolor=#FFFFFF>
  <td height=40><div align="right">积分兑换信息币比例：</div></td>
  <td><input name="credit2gold" type="text" size="20" value="<?=$CFG[credit2gold]?>"  class="dfinput"> 分/每信息币</td>
</tr>
<tr bgcolor=#FFFFFF>
  <td height=40><div align="right">资金购买信息币比例：</div></td>
  <td><input name="money2gold" type="text" size="20" value="<?=$CFG[money2gold]?>"  class="dfinput"> 元/每信息币</td>
</tr>
</table></div>
      <div id="myTab0_Content2" class="none"><table width=96% align=center border=0 cellspacing=0 cellpadding=0 >
<tr bgcolor=#FFFFFF>
  <td width="32%" height=40><div align="right">启用UCenter：</div></td>
  <td width="68%"><label>
    <input type="radio" name="uc" value="1" <? if($CFG[uc] == '1') echo 'checked';?>>
    是
    <input name="uc" type="radio" value="0" <? if($CFG[uc] != '1') echo 'checked';?>>
    否</label></td>
</tr>

<span id=ucenter>
<tr bgcolor=#FFFFFF>
  <td height=40><div align="right">UCenter服务器 API URL(末尾不要加 /)：</div></td>
  <td height="40"><input name="uc_api" type=text id="uc_api" value="<?=$CFG[uc_api]?>" size=30  class="dfinput"></td>
</tr>
<tr bgcolor=#FFFFFF>
  <td height=40><div align="right">UCenter 通信密钥：</div></td>
  <td height="40"><input name="uc_key" type=text id="uc_key" value="<?=$CFG[uc_key]?>" size=30 class="dfinput"></td>
</tr>
<tr bgcolor=#FFFFFF>
  <td height=40><div align="right">UCenter 本地客户端应用ID：</div></td>
  <td height="40"><input name="uc_appid" type=text id="uc_appid" value="<?=$CFG[uc_appid]?>" size=20 class="dfinput"></td>
</tr>
<tr bgcolor=#FFFFFF>
  <td height=40><div align="right">UCenter 数据库服务器主机名：</div></td>
  <td height="40"><input name="uc_dbhost" type=text id="uc_dbhost" value="<?=$CFG[uc_dbhost]?>" size=20 class="dfinput"></td>
</tr>
<tr bgcolor=#FFFFFF>
  <td height=40><div align="right">UCenter 服务器数据库名：</div></td>
  <td height="40"><input name="uc_dbname" type=text id="uc_dbname" value="<?=$CFG[uc_dbname]?>" size=20 class="dfinput"></td>
</tr>
<tr bgcolor=#FFFFFF>
  <td height=40><div align="right">UCenter 数据库用户名：</div></td>
  <td height="40"><input name="uc_dbuser" type=text id="uc_dbuser" value="<?=$CFG[uc_dbuser]?>" size=20 class="dfinput"></td>
</tr>
<tr bgcolor=#FFFFFF>
  <td height=40><div align="right">UCenter 服务器数据库密码：</div></td>
  <td height="40"><input name="uc_dbpwd" type=text id="uc_dbpwd" value="<?=$CFG[uc_dbpwd]?>" size=20 class="dfinput"></td>
</tr>
<tr bgcolor=#FFFFFF>
  <td height=40><div align="right">UCenter 服务器数据表前缀：</div></td>
  <td height="40"><input name="uc_dbpre" type=text id="uc_dbpre" value="<?=$CFG[uc_dbpre]?>" size=20 class="dfinput"></td>
</tr>
<tr bgcolor=#FFFFFF>
  <td height=40><div align="right">UCenter 数据库字符集：</div></td>
  <td height="40"><input name="uc_charset" type=text id="uc_charset" value="<?=$CFG[uc_charset]?>" size=20 class="dfinput"></td>
</tr>

</table></div>
      <div id="myTab0_Content3" class="none">
      
 <table width=96% align=center border=0 cellspacing=2 cellpadding=2 >
<tr bgcolor=#FFFFFF>
  <td width="21%" height=40><div align="right">发送方式：</div></td>
  <td width="79%">
<input type="radio" name="sendmailtype"  value="smtp" <?php if($CFG[sendmailtype]=="smtp"){ ?>checked <?php } ?> />SMTP方式
      <input type="radio" name="sendmailtype" value="mail"  <?php if($CFG[sendmailtype]=="mail"){ ?>checked <?php } ?>/>Mail函数（Windows服务器不支持）

</td>
</tr>
<tr bgcolor=#FFFFFF>
  <td height=40><div align="right">邮箱SMTP：<br></div></td>
  <td><input name="smtphost" type="text" size="40" value="<?=$CFG[smtphost]?>" class="dfinput"> SMTP服务器，只有正确设置才能使用发邮件功能</td>
</tr>
<tr bgcolor=#FFFFFF>
  <td height=40><div align="right">邮箱帐号：</div></td>
  <td><input name="smtpuser" id="smtpuser" type="text" size="40" value="<?=$CFG[smtpuser]?>" class="dfinput"> SMTP服务器的用户帐号，只有正确设置才能使用发邮件功能</td>
</tr>
<tr bgcolor=#FFFFFF>
  <td height=40><div align="right">邮箱密码：</div></td>
  <td><input name="smtppass" type="password" size="40" value="<?=$CFG[smtppass]?>" class="dfinput"></td>
</tr>
<tr bgcolor=#FFFFFF>
  <td height=40><div align="right">SMTP端口：</div></td>
  <td><input name="smtpport" type="text" size="40" value="<?=$CFG[smtpport]?>" class="dfinput"> 默认为25，一般不需要改</td>
</tr>
<tr bgcolor=#FFFFFF>
  <td height=40><div align="right">检查邮件设置：</div></td>
  <td>
  <input name="testemail" type="text" id="testemail" value="" size="30" class="dfinput">
      <input name="test" type="button" id="test" value="发送测试邮件"  class="newbt2"/>
	  <script>
	  $('#test').click(function (){
		if(checkemail($("#testemail").val()))
		{
			$.post(
				'index.php?act=test_mail',
				{mailto:$("#testemail").val(),mailfrom:$("#smtpuser").val()},
				function (data) {
					eval('json='+data+';');
					if(json == "1"){
						alert('发送成功');
					} else {
						alert('发送失败');
					}
				}
			)
		} else {
			alert('邮件格式错误!');
			return false;
		}	  });
	  </script>
  </td>
</tr>
</table></div>
    
    </div>
  </div>
  <!-- 选项卡结束 -->
  </div>
  </center>



















<table width=96% align=center border=0 cellspacing=2 cellpadding=2 >
<tr bgcolor=#FFFFFF>
  <td colspan="2" height=7 align="center">
      <input name="act" type="hidden" value="set_config">
      <input name="submit" type=submit id="submit"  value=" 提交 " class="newFormBtn_red2" >
      <input name="submit2"  type=reset id="submit2" value=" 重置 " class="newFormBtn_red2" >
  </td>
 </tr>
</table>
</form>
</body>
</html>