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

<form method="post">
<table width='100%' border='0' cellpadding='0' cellspacing='0'>
<tr align='center' height='24'>
<td id='TabTitle0' class='title2' onclick='ShowTabs(0)'>系统设置</td>
<td id='TabTitle4' class='title1' onclick='ShowTabs(4)'>功能设置</td>
<td id='TabTitle1' class='title1' onclick='ShowTabs(1)'>微信设置</td>
<td id='TabTitle5' class='title1' onclick='ShowTabs(5)'>短信设置</td>
<td id='TabTitle3' class='title1' onclick='ShowTabs(3)'>邮件设置</td>
</tr>
</table>
<div class="clearfix h_1"></div>
<div class="post_li">
<ul id='Tabs0' style='display:'>
		<li><h4>网站名称</h4><input name="webname" type=text id="webname" value="<?=$CFG[webname]?>"></li>
		<li><h4>网站副标题</h4><input name="diytitle" type="text" value="<?=$CFG['diytitle']?>"></li>
		<li><h4>网站地址</h4><input name="weburl" type=text id="weburl" value="<?=$CFG[weburl]?>"> <span class="f99">末尾不要加'/'</span></li>
		<li><h4>网站备案号</h4><input name="icp" type=text id="icp" value="<?=$CFG[icp]?>"></li>
		<li><h4>网站email</h4><input name="email" type=text id="email" value="<?=$CFG[email]?>"></li>
		<li><h4>网站电话</h4><input name="phone" type=text id="phone" value="<?=$CFG[phone]?>"></li>
		<li><h4>模板目录名称</h4><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></li>
		<li><h4>二级模板目录</h4><select name="tpl2name" id="tpl2name">
	  <?
	  foreach($tpl2_dir as $val)
	  {
	      if($val==$CFG[tpl2name])
		  {
		      echo "<option value=$val selected='selected'>$val</option>";
		  }else{
              echo "<option value=$val $select>$val</option>";
          }
	  }
	  ?>
      </select></li>
	  <li><h4>默认城市</h4><select name="citysid" id="citysid">
      <option value=0>请选择</option>
      <?php
		echo $info_area;
	  ?>
    </select></li>
		<li><h4>加密字符</h4><input name="crypt" type=text id="crypt" value="<?=$CFG[crypt]?>"></li>
		<li><h4>启用伪静态</h4><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';?>>关闭 <span class="f99">启用伪静态需要服务器的支持，请确认您的服务器环境支持url_rewrite)</span></li>
		<li><h4>手机版</h4> <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';?>>关闭</li>
		<li><h4>全局关键词</h4><textarea name="keywords" cols=50 rows=2 id="keywords"><?=$CFG[keywords]?></textarea> <span class="f99">@city@将替换为当前城市名称</span</li>
		<li><h4>全局描述</h4><textarea name="description" cols=50 rows=2 id="description"><?=$CFG[description]?></textarea></li>
		<li><h4>网站公告</h4><textarea name="annouce" cols=50 rows=2 id="annouce"><?=$CFG[annouce]?></textarea></li>
		<li><h4>底部版权信息</h4><textarea name="copyright" cols=50 rows=2 id="copyRight"><?=$CFG[copyright]?></textarea></li>
		<li><h4>网站统计代码</h4><textarea name="count" cols=50 rows=3 id="count"><?=$CFG[count]?></textarea></li>
		<li><h4>禁止会员注册</h4><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';?>>关闭</li>
		<li><h4>关闭网站</h4><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';?>>否</li>
		<li><h4>关闭网站提示内容</h4><textarea name="close_tips" cols=50 rows=2 id="close_tips"><?=$CFG[close_tips]?></textarea></li>
		<li><h4>列表页每页信息数量</h4><input name="pagesize" type=text id="pagesize" value="<?=$CFG[pagesize]?>"> 条</li>
	<li><h4>商家列表页信息数量</h4><input name="com_pagesize" type=text id="com_pagesize" value="<?=$CFG[com_pagesize]?>"> 条</li>
	<li><h4>商家列表缩略图宽度</h4><input name="com_thumbwidth" type=text id="com_thumbwidth" value="<?=$CFG[com_thumbwidth]?>"> px</li>
	<li><h4>商家列表缩略图高度</h4><input name="com_thumbheight" type=text id="com_thumbheight" value="<?=$CFG[com_thumbheight]?>"> px</li>
	<li><h4>默认头像缩略图</h4><input name="thumbs" type="text" value="<?=$CFG['thumbs']?>" size="50"></li>
	<li><h4>默认商家门头缩略图</h4><input name="com_thumbs" type="text" value="<?=$CFG['com_thumbs']?>" size="50"></li>
	<li><h4>全局分页缩略</h4><input name="page_num" type="text" size="4" value="<?=$CFG['page_num']?>">　<span class="f99">分页时缩略显示当前页左右显示页数</span></li>
  </ul>

<ul id='Tabs1' style='display:none'>
    <li><h4>appid</h4><input name="wx_appid" type="text" value="<?=$CFG['wx_appid']?>"></li>
	<li><h4>appsecret</h4><input name="wx_appsecret" type="text" value="<?=$CFG['wx_appsecret']?>"></li>
	<li><h4>TOKEN</h4><input name="wx_token" type="text" value="<?=$CFG['wx_token']?>"></li>
	<li><h4>回调域名</h4>http://<input name="wx_redirect_uri" type="text" value="<?=$CFG['wx_redirect_uri']?>"> <span class="f99">必须与微信设置一致，末尾不要加'/'</span></li>
</ul>

<ul id='Tabs3' style='display:none'>
	<li><h4>发送方式</h4><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服务器不支持）</li>
	<li><h4>邮箱SMTP</h4><input name="smtphost" type="text" size="40" value="<?=$CFG[smtphost]?>"></li>
	<li><h4>邮箱帐号</h4><input name="smtpuser" id="smtpuser" type="text" size="40" value="<?=$CFG[smtpuser]?>"></li>
	<li><h4>邮箱密码</h4><input name="smtppass" type="password" size="40" value="<?=$CFG[smtppass]?>"></li>
	<li><h4>SMTP端口</h4><input name="smtpport" type="text" size="40" value="<?=$CFG[smtpport]?>"> <span class="f99">默认为25，一般不需要改</span></li>
	<li><h4>检查邮件设置</h4><input name="testemail" type="text" id="testemail" value="" size="30">
      <input name="test" type="button" id="test" value="发送测试邮件" />
	  <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></li>
</ul>

<ul id='Tabs4' style='display:none'>
	<li><h4>折扣卡名称</h4><input name="cardname" type="text" value="<?=$CFG['cardname']?>"></li>
	<li><h4>代金券名称</h4><input name="lejuan" type="text" value="<?=$CFG['lejuan']?>"></li>
	<li><h4>折扣套餐数</h4><input name="max_zklist" type="text" size="4" value="<?=$CFG['max_zklist']?>">　<span class="f99">商家折扣套餐列表数</span></li>
	<li><h4><?=$CFG['cardname']?>价格</h4><input name="cardmoney" type="text" size="4" value="<?=$CFG['cardmoney']?>">元/单张</li>
	<li><h4>商家积分价格</h4><input name="creditnum" type="text" size="4" value="<?=$CFG['creditnum']?>">元/积分　<span class="f99">商家购买积分的价格</span></li>
	<li><h4>会员积分兑换价格</h4><input name="usercreditnum" type="text" size="4" value="<?=$CFG['usercreditnum']?>">元/积分　<span class="f99">会员积分换现价格</span></li>
	<li><h4>新注册商家默认积分</h4><input name="com_jf_num" type="text" size="4" value="<?=$CFG['com_jf_num']?>"></li>
	<li><h4>商家余额冻结</h4><input name="com_money_off" type="text" size="4" value="<?=$CFG['com_money_off']?>">元 <span class="f99">商家店内支付佣金冻结款，主要为防止商家店内支付后不与网站进行佣金结算</span></li>
	<li><h4>售卡商家消费提成</h4><input name="com_shop_card" type="text" size="4" value="<?=$CFG['com_shop_card']?>">% <span class="f99">商家售卡后，该卡在除售卡商家以外店铺消费时，售卡商家提成Ｘ%点</span></li>
	<li><h4>商家提现手续费</h4><input name="com_money_tea" type="text" size="4" value="<?=$CFG['com_money_tea']?>">%</li>
	<li><h4>会员提现手续费</h4><input name="user_money_tea" type="text" size="4" value="<?=$CFG['user_money_tea']?>">%</li>
	<li><h4>发布商铺需要审核</h4><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';?>>否</li>
	<li><h4>发表评论需要审核</h4><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';?>>否</li>
	<li><h4>会员注册验证</h4><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';?>>否</li>
	<li><h4>删除会员同时删除以下记录</h4>　</td>
    <li><h4>发布的点评</h4><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';?>>否</li>
	<li><h4>积分记录</h4><input name="del_m_credit" type="radio" value="1" <? if($CFG[del_m_credit] == '1') echo 'checked';?>>是
      <input type="radio" name="del_m_credit" value="0" <? if($CFG[del_m_credit] != '1') echo 'checked';?>>否</li>
	<li><h4>提现记录</h4><input name="del_m_tx" type="radio" value="1" <? if($CFG[del_m_tx] == '1') echo 'checked';?>>是
      <input type="radio" name="del_m_tx" value="0" <? if($CFG[del_m_tx] != '1') echo 'checked';?>>否</li>
	<li><h4><?=$CFG[lejuan]?>记录</h4><input name="del_m_juan" type="radio" value="1" <? if($CFG[del_m_juan] == '1') echo 'checked';?>>是
      <input type="radio" name="del_m_juan" value="0" <? if($CFG[del_m_juan] != '1') echo 'checked';?>>否</li>
	
</ul>

<ul id='Tabs5' style='display:none'>
	<li><h4>阿里大于-appkey</h4><input name="sms_alidayu_appkey" type="text" value="<?=$CFG['sms_alidayu_appkey']?>"></li>
	<li><h4>阿里大于-secret</h4><input name="sms_alidayu_secret" type="password" value="<?=$CFG['sms_alidayu_secret']?>"></li>
	<li><h4>短信签名</h4><input name="sms_ming" type="text" value="<?=$CFG['sms_ming']?>"></li>
	<li><h4>验证码模板</h4><input name="sms_yan_tplid" type="text" value="<?=$CFG['sms_yan_tplid']?>"></li>
	<li><h4>消费通知模板</h4><input name="sms_msg_tplid" type="text" value="<?=$CFG['sms_msg_tplid']?>"></li>
</ul>
<div class="clearfix h_1"></div>
<div class="t_c">
      <input name="act" type="hidden" value="set_config">
	  <input type="hidden" name="token" value="<?php echo $CFG[crypt];?>" />
      <input name="submit" type=submit id="submit"  value=" 提交 " >
      <input name="submit2"  type=reset id="submit2" value=" 重置 " >
</div>
</div>
</form>
</body>
</html>