<?php defined('IN_HS') or exit('Access Denied');
include admintpl('header');
?>
<body onLoad="ShowTabs(<?=$tab?>);">
<table cellpadding="0" cellspacing="0" border="0" width="100%" height="10">
  <tr>
    <td></td>
  </tr>
</table>
<form name="myform" method="post" action="?file=setting&action=save">
<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='TabTitle1' class='title1' onclick='ShowTabs(1)'>网站设置</td>
<td id='TabTitle3' class='title1' onclick='ShowTabs(3)'>安全设置</td>
<td id='TabTitle5' class='title1' onclick='ShowTabs(5)'>邮件设置</td>
<td id='TabTitle7' class='title1' onclick='ShowTabs(7)'>客户端设置</td>
<td id='TabTitle9' class='title1' onclick='ShowTabs(9)'>通行证</td>
<td>　</td>
</tr>
</table>
<table cellpadding="2" cellspacing="1" class="tableborder">
  <tbody id='Tabs0' style='display:'>
  <th colspan=2>基本信息</th>
  <tr>
    <td width='43%' class='tablerow'><strong>网站名称</strong></td>
    <td class='tablerow'><input name='setting[sitename]' type='text' id='sitename' value='<?=$sitename?>' size='40' maxlength='50'></td>
  </tr>
  <tr>
    <td width='43%' class='tablerow'><strong>网站地址</strong><br>
      请添写完整URL地址</td>
    <td class='tablerow'><input name='setting[siteurl]' type='text' id='siteurl' value='<?=$siteurl?>' size='40' maxlength='255'></td>
  </tr>
  <tr>
    <td width='43%' class='tablerow'><strong>在线购买充值卡地址</strong><br>
      您的支付平台URL地址</td>
    <td class='tablerow'><input name='setting[paycardurl]' type='text' id='siteurl' value='<?=$paycardurl?>' size='40' maxlength='255'></td>
  </tr>
  <tr>
    <td width='43%' class='tablerow'><strong>网站ICP备案序号</strong><br>
      没备案就别填</td>
    <td class='tablerow'><input name='setting[icpno]' type='text' id='linklogo' value='<?=$icpno?>' size='40' maxlength='255'></td>
  </tr>
  <tr>
    <td width='43%' class='tablerow'><strong>Title（网站标题）</strong><br>
      针对搜索引擎设置的网页标题</td>
    <td class='tablerow'><input name='setting[seo_title]' type='text' id='seo_title' value='<?=$seo_title?>' size='40' maxlength='50'></td>
  </tr>
  <tr>
    <td width='43%' class='tablerow'><strong>Meta Keywords（网页关键词）</strong><br>
      针对搜索引擎设置的关键词</td>
    <td class='tablerow'><input name='setting[seo_keywords]' size="40" id='seo_keywords' value="<?=$seo_keywords?>"></td>
  </tr>
  <tr>
    <td width='43%' class='tablerow'><strong>Meta Description（网页描述）</strong><br>
      针对搜索引擎设置的网页描述</td>
    <td class='tablerow'><input name='setting[seo_description]' size="40" id='seo_description' value="<?=$seo_description?>"></td>
  </tr>
  <tr>
    <td width='43%' class='tablerow'><strong>网站客服信箱</strong></td>
    <td class='tablerow'><input name='setting[webmasteremail]' type='text' id='webmasteremail' value='<?=$webmasteremail?>' size='40' maxlength='20'></td>
  </tr>
  <tr>
    <td width='43%' class='tablerow'><strong>网站客服 QQ</strong></td>
    <td class='tablerow'><input name='setting[kfqq]' type='text' id='kfqq' value='<?=$kfqq?>' size='40' maxlength="40"></td>
      </tr>
    <tr>
    <td width='43%' class='tablerow'><strong>推广员分成</strong><br>
      本系统采用A推广B，B在充值时A就有分成的模式！</td>
    <td colspan="2" class='tablerow'><input name='setting[billpay]' type='text' id='billpay' value='<?=$billpay?>' size='10' maxlength="4"> 请填写小数，建议设置在0.02-0.05之间。</td>
  </tr>
    <tr>
    <td width='43%' class='tablerow'><strong>玩家投稿奖励</strong><br>
      玩家发布一篇文件或图片，管理员在审核后的奖励！</td>
    <td class='tablerow'><input name='setting[notepay]' type='text' id='notepay' value='<?=$notepay?>' size='10' maxlength="1">元 建议设置为1-2元。不给奖励请不要填写</td>
  </tr>
  <tbody id='Tabs1' style='display:none'>
  <th colspan=2>网站设置</th>
  <tr>
    <td width='43%' class='tablerow'><strong>是否启用可视化编辑器</strong></td>
    <td class='tablerow'><input class='radio_style' type='radio' name='setting[enableeditor]' value='1'  <?php if($enableeditor){ ?>checked <?php } ?>>
      是&nbsp;&nbsp;&nbsp;&nbsp;
      <input class='radio_style' type='radio' name='setting[enableeditor]' value='0'  <?php if(!$enableeditor){ ?>checked <?php } ?>>
      否 </td>
  </tr>
  <tr>
    <td width='43%' class='tablerow'><strong>是否启用模板缓存自动更新</strong></td>
    <td class='tablerow'><input class='radio_style' type='radio' name='setconfig[templaterefresh]' value='1'  <?php if($templaterefresh){ ?>checked <?php } ?>>
      是&nbsp;&nbsp;&nbsp;&nbsp;
      <input class='radio_style' type='radio' name='setconfig[templaterefresh]' value='0'  <?php if(!$templaterefresh){ ?>checked <?php } ?>>
      否&nbsp;&nbsp;&nbsp;&nbsp;（如果网站模板已经做好，建议您关闭此功能） </td>
  </tr>
  <tr>
    <td width='43%' class='tablerow'><strong>是否启用数据库查询结果缓存</strong></td>
    <td class='tablerow'><input class='radio_style' type='radio' name='setconfig[dbiscache]' value='1'  <?php if($dbiscache){ ?>checked <?php } ?>>
      是&nbsp;&nbsp;&nbsp;&nbsp;
      <input class='radio_style' type='radio' name='setconfig[dbiscache]' value='0'  <?php if(!$dbiscache){ ?>checked <?php } ?>>
      否 </td>
  </tr>
  <tr>
    <td width='43%' class='tablerow'><strong>数据库查询结果缓存更新周期</strong></td>
    <td class='tablerow'><input type='text' name='setconfig[dbexpires]' value='<?=$dbexpires?>' size='5'>
      秒 </td>
  </tr>
  <tr>
    <td width='43%' class='tablerow'><strong>php 缓存类型</strong></td>
    <td class='tablerow'><input class='radio_style' type='radio' name='setconfig[phpcache]' value='2'  <?php if($phpcache == 2){ ?>checked <?php } ?>>
      开启php页面缓存&nbsp;&nbsp;&nbsp;&nbsp;
      <input class='radio_style' type='radio' name='setconfig[phpcache]' value='1'  <?php if($phpcache == 1){ ?>checked <?php } ?>>
      开启标签缓存&nbsp;&nbsp;&nbsp;&nbsp;
      <input class='radio_style' type='radio' name='setconfig[phpcache]' value='0'  <?php if($phpcache == 0){ ?>checked <?php } ?>>
      关闭缓存 </td>
  </tr>
  <tr>
    <td width='43%' class='tablerow'><strong>php 缓存更新周期</strong></td>
    <td class='tablerow'><input type='text' name='setconfig[phpcacheexpires]' value='<?=$phpcacheexpires?>' size='5'>
      秒 </td>
  </tr>
  <tr>
    <td width='43%' class='tablerow'><strong>附件目录</strong></td>
    <td class='tablerow'><input name='setting[uploaddir]' type='text' id='uploaddir' value='<?=$uploaddir?>' size='40' maxlength='50'></td>
  </tr>
  <tr>
    <td width='43%' class='tablerow'><strong>允许上传的附件类型</strong></td>
    <td class='tablerow'><input name='setting[uploadfiletype]' type='text' id='uploadfiletype' value='<?=$uploadfiletype?>' size='40' maxlength='50'></td>
  </tr>
  <tr>
    <td width='43%' class='tablerow'><strong>附件上传函数选择</strong><br/>
      如果上传的文件无法查看，请选择 copy 函数</td>
    <td class='tablerow'><input class='radio_style' type='radio' name='setting[uploadfunctype]' value='1'  <?php if($uploadfunctype){ ?>checked <?php } ?>>
      move_uploaded_file&nbsp;&nbsp;&nbsp;&nbsp;
      <input class='radio_style' type='radio' name='setting[uploadfunctype]' value='0'  <?php if(!$uploadfunctype){ ?>checked <?php } ?>>
      copy </td>
  </tr>
  <tr>
    <td width='43%' class='tablerow'><strong>页面Gzip压缩</strong><br>
      将页面内容以gzip压缩后传输，可以加快传输速度，需PHP 4.0.4以上且支持Zlib模块才能使用 </td>
    <td class='tablerow'><input class='radio_style' type='radio' name='setting[enablegzip]' value='1'  <?php if($enablegzip){ ?>checked <?php } ?>>
      是&nbsp;&nbsp;&nbsp;&nbsp;
      <input class='radio_style' type='radio' name='setting[enablegzip]' value='0'  <?php if(!$enablegzip){ ?>checked <?php } ?>>
      否 </td>
  </tr>
  <tr>
    <td width='43%' class='tablerow'><strong>信息列表最大页数</strong><br></td>
    <td class='tablerow'><input name='setting[maxpage]' type='text' id='maxpage' value='<?=$maxpage?>' size='5' maxlength='255'>
      页</td>
  </tr>
  <tr>
    <td width='43%' class='tablerow'><strong>信息列表每页默认信息条数</strong><br></td>
    <td class='tablerow'><input name='setting[pagesize]' type='text' id='pagesize' value='<?=$pagesize?>' size='5' maxlength='255'>
      条</td>
  </tr>
  <tr>
    <td width='43%' class='tablerow'><strong>发布信息时栏目列表自动更新页数</strong><br></td>
    <td class='tablerow'><input name='setting[autoupdatepagenum]' type='text' id='autoupdatepagenum' value='<?=$autoupdatepagenum?>' size='5' maxlength='1'>
      页 （建议不要超过 5 页）</td>
  </tr>
  <tbody id='Tabs3' style='display:none'>
  <th colspan=2>安全设置</th>
  <tr>
    <td width='43%' class='tablerow'><strong>网站安全密钥</strong></td>
    <td class='tablerow'><input name='setting[authkey]' type='text' id='authkey' value='<?=$authkey?>' size='30' maxlength='20'>    </td>
  </tr>
  <tr>
    <td width='43%' class='tablerow'><strong>允许访问后台的IP列表</strong><br/>
      只有当管理员处于本列表中的 IP 地址时才可以访问网站后台，列表以外的地址访问将无法访问，但仍可访问网站前台界面，请务必慎重使用本功能。每个 IP 一行，既可输入完整地址，也可只输入 IP 开头，例如 "192.168." 可匹配 192.168.0.0~192.168.255.255 范围内的所有地址<br/>
      <font color="red">留空则所有 IP 均可访问网站后台</font> </td>
    <td class='tablerow'><textarea name='setting[adminaccessip]' cols='60' rows='8' id='adminaccessip'><?=$adminaccessip?>
</textarea>    </td>
  </tr>
  <tr>
    <td width='43%' class='tablerow'><strong>后台最大登陆失败次数</strong><br/>
      登陆失败次数超过后系统将自动锁定该IP，0表示不限制次数</td>
    <td class='tablerow'><input name='setting[maxfailedtimes]' type='text' id='maxfailedtimes' value='<?=$maxfailedtimes?>' size='10' maxlength='2'>
      次 </td>
  </tr>
  <tr>
    <td width='43%' class='tablerow'><strong>IP锁定时间</strong><br/>
      超过锁定时间后该IP将自动解锁</td>
    <td class='tablerow'><input name='setting[maxlockedtime]' type='text' id='maxlockedtime' value='<?=$maxlockedtime?>' size='10' maxlength='5'>
      小时 </td>
  </tr>
  <tr>
    <td width='43%' class='tablerow'><strong>IP访问禁止</strong><br/>
      可按IP或者IP段设置禁止访问站点，此功能会消耗一定的服务器资源</td>
    <td class='tablerow'><input class='radio_style' type='radio' name='setting[enablebanip]' value='1'  <?php if($enablebanip){ ?>checked <?php } ?>>
      启用&nbsp;&nbsp;&nbsp;&nbsp;
      <input class='radio_style' type='radio' name='setting[enablebanip]' value='0'  <?php if(!$enablebanip){ ?>checked <?php } ?>>
      禁用 </td>
  </tr>
  <tr>
    <td width='43%' class='tablerow'><strong>后台登录验证码</strong><br/>
        <?php if($enablegd){ ?>
      您的空间支持GD库，建议开启，这样有利于加强系统安全。
      <?php }else{ ?>
      您的空间不支持GD库，无法开启。
      <?php } ?>    </td>
    <td class='tablerow'><input class='radio_style' type='radio' name='setting[enableadmincheckcode]' value='1'  <?php if($enableadmincheckcode){ ?>checked <?php } ?> <?php if(!$enablegd){ ?>disabled<?php } ?>>
      启用&nbsp;&nbsp;&nbsp;&nbsp;
      <input class='radio_style' type='radio' name='setting[enableadmincheckcode]' value='0'  <?php if(!$enableadmincheckcode){ ?>checked <?php } ?>>
      禁用 </td>
  </tr>
  <tbody id='Tabs5' style='display:none'>
  <th colspan=2>邮件设置<font color=red>(一定要设置好，设置正确。会员找回密码就靠它发送邮件了！)</font></th>
  <tr>
    <td class="tablerow"><b>发送方式</b></td>
    <td class="tablerow"><input class="radio_style" type="radio" name="setting[sendmailtype]"  value="smtp" <?php if($sendmailtype=="smtp"){ ?>checked <?php } ?> />
      SMTP方式
      <input class="radio_style" type="radio" name="setting[sendmailtype]" value="mail"  <?php if($sendmailtype=="mail"){ ?>checked <?php } ?>/>
      Mail函数（Windows服务器不支持） </td>
  </tr>
  <tr>
    <td class="tablerow" width="43%"><b>邮箱SMTP</b><br>
      SMTP服务器，只有正确设置才能使用发邮件功能</td>
    <td class="tablerow"><input name="setting[smtphost]" type="text" size="40" value="<?=$smtphost?>"> 
    如：smtp.163.com </td>
  </tr>
  <tr>
    <td class="tablerow"><b>邮箱帐号</b><br>
      SMTP服务器的用户帐号，只有正确设置才能使用发邮件功能</td>
    <td  class="tablerow"><input name="setting[smtpuser]" type="text" size="40" value="<?=$smtpuser?>"> 
    如：abcde</td>
  </tr>
  <tr>
    <td class="tablerow"><b>邮箱密码</b><br></td>
    <td  class="tablerow"><input name="setting[smtppass]" type="password" size="40" value="<?=$smtppass?>"></td>
  </tr>
  <tr>
    <td class="tablerow"><b>SMTP端口</b><br>
      默认为25，一般不需要改</td>
    <td  class="tablerow"><input name="setting[smtpport]" type="text" size="40" value="<?=$smtpport?>"></td>
  </tr>
  <tr>
    <td class="tablerow"><b>邮件内是否携带签名</b></td>
    <td  class="tablerow"><input class="radio_style" type="radio" name="setting[enablesignature]"  value="1" <?php if($enablesignature=="1"){ ?>checked <?php } ?> />
      是
      <input class="radio_style" type="radio" name="setting[enablesignature]" value="0"  <?php if($enablesignature=="0"){ ?>checked <?php } ?>/>
      否</td>
  </tr>
  <tr>
    <td class="tablerow"><b>邮件签名</b></td>
    <td  class="tablerow"><textarea name="setting[signature]" id="signature" cols="50" rows="5" ><?=$signature?></textarea></td>
  </tr>
    <tbody id='Tabs7' style='display:none'>
  <th colspan=3>客户端设置</th>
    <tr>
      <td width='43%' class='tablerow'><strong>是否开启客户端弹出公告：</strong></td>
      <td colspan="2" class='tablerow'>
	  <input type='radio' class="radio_style" name='setting[enablerlogin]' value='1'  <?php if($enablerlogin){ ?>checked <?php } ?> onClick="javascript: $('enablerlogintext').style.display='block'"> 是&nbsp;&nbsp;&nbsp;&nbsp;
	  <input type='radio' class="radio_style" name='setting[enablerlogin]' value='0'  <?php if(!$enablerlogin){ ?>checked <?php } ?> onClick="javascript: $('enablerlogintext').style.display='none'"> 否	 </td>
    </tr>
	<tr>
      <td width='43%' class='tablerow'><strong>填写内容：</strong></td>
      <td class='tablerow'><input name='setting[enablerlogintext]' id='rfsomoney' value="<?=$enablerlogintext?>" size=40> (尽量在20字以内为宜。)</td>
    </tr>
  <tbody id='Tabs9' style='display:none'>
  <th colspan=2>通行证设置</th>
  <tr>
    <td class="tablerow" width="35%"><b>是否启用通行证</b></td>
    <td  class="tablerow"><input class="radio_style" type="radio" name="setting[enablepassport]" value="1" <?php if($enablepassport){?>checked<?php }?>>
      是&nbsp;&nbsp;&nbsp;&nbsp;
      <input class="radio_style" type="radio" name="setting[enablepassport]" value="0" <?php if(!$enablepassport){?>checked<?php }?>>
      否</td>
  </tr>
  <tr>
    <td class="tablerow"><b>整合接口程序</b></td>
    <td class="tablerow">
        <select name="setting[passport_file]">
          <?php 
	  $passports = glob(HS_ROOT.'/member/passport/*.php');
	  foreach($passports as $passport)
	  {
		  $passport = str_replace('.php', '', basename($passport));
		  echo '<option value="'.$passport.'" '.($passport_file == $passport ? 'selected' : '').'>'.$passport.'</option>';
	  }
	  ?>
        </select>    </td>
  </tr>
  <tr>
    <td class="tablerow"><b>整合程序字符集</b></td>
    <td class="tablerow"><select name="setting[passport_charset]">
      <option value="gbk" <?=($passport_charset == 'gbk' ? 'selected' : '')?>>GBK/GB2312</option>
      <option value="utf-8" <?=($passport_charset == 'utf-8' ? 'selected' : '')?>>UTF-8</option>
      <option value="big5" <?=($passport_charset == 'big5' ? 'selected' : '')?>>BIG5</option>
    </select>    </td>
  </tr>
  <tr>
    <td class="tablerow"><b>通行证接口地址</b><br>
      多个接口地址请用逗号“,”分隔</td>
    <td  class="tablerow"><input name="setting[passport_url]" type="text" size="75" value="<?=$passport_url?>" id="passport_url"></td>
  </tr>
  <tr>
    <td class="tablerow"><b>通行证私有密钥</b></td>
    <td  class="tablerow"><input name="setting[passport_key]" type="text" size="30" value="<?=$passport_key?>"></td>
  </tr>
</table>
<table width="100%" height="25" border="0" cellpadding="0" cellspacing="0">
  <tr>
     <td width='40%'><input name='setting[version]' type='hidden' id='version' value='<?=HS_VERSION?>'></td>
     <td><input type="submit" class="btn" name="dosubmit" value=" 确定 ">&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" class="btn" name="reset" value=" 重置 "></td>
  </tr>
</table>
</form>
</body>
</html>