<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>系统配置参数 - 验证安全设置</title>

<link rel="stylesheet" href="css/reset.css" type="text/css" media="screen" />
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
<link rel="stylesheet" type="text/css" href="css/base.css">
<script language="javascript" src="js/jquery.min.js" type="text/javascript"></script>	
<script type="text/javascript" src="js/admin.jquery.configuration.js"></script>

<script language="javascript" src="js/global.js"></script>
<script language="javascript" src="../include/js/dedeajax2.js"></script>
<script type="text/javascript" src="../include/js/jquery/jquery.js" ></script>
<script type="text/javascript">
var $ = jQuery;
$(document).ready(function(){
	addIterm("qiterm","qbox");
})
//增加选项
function addIterm(qiterm,qbox)
{
	if($("#"+qiterm)){
		var iterm = $("#"+qiterm).children().clone()
		$("#"+qbox).append(iterm)
		//将其置为显示状态
		$("#"+qbox+" > #"+qiterm ).show();
	}
}
//删除当前选项
function delIterm(obj)
{
	$(obj).parent().parent().remove();
}
</script>
</head>
<body>
<div id="body-wrapper"> <!-- Wrapper for the radial gradient background -->
<?php include(DEDEADMIN.'/templets/menu.htm'); ?>
<script language="javascript">
$("#sys").addClass("current");$("#sys_safe").addClass("current");</script>				

	<div class="content-box"><!-- Start Content Box -->
				
				<div class="content-box-header">
					
					<h3>验证安全设置</h3>
					
					<ul class="content-box-tabs">

					</ul>
					
					<div class="clear"></div>
					
				</div> <!-- End .content-box-header -->
				
				<div class="content-box-content">
					
<div class="tab-content  default-tab" id="tab1">				
<form action="sys_safe.php" method="post" name="form1">
<input type="hidden" name="dopost" value="save">
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#D6D6D6">

    <tr>
      <td height="26" colspan="2" bgcolor="#FFFFFF" background="images/tbg.gif" style="padding-left:10px;"><b>验证码参数设置</b></td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td width="26%" height="24">开启系统验证码：<br></td>
      <td width="74%"><input name="gdopen[]" type="checkbox" id="gdopen1" value="1" <?php echo (preg_match("/1/",$safe_gdopen))? "checked" : ""; ?>>
        注册会员
        <input name="gdopen[]" type="checkbox" id="gdopen2" value="2" <?php echo (preg_match("/2/",$safe_gdopen))? "checked" : ""; ?>>
        前台登陆 
        <input name="gdopen[]" type="checkbox" id="gdopen3" value="3" <?php echo (preg_match("/3/",$safe_gdopen))? "checked" : ""; ?>>
        会员投稿
        <input name="gdopen[]" type="checkbox" id="gdopen4" value="4" <?php echo (preg_match("/4/",$safe_gdopen))? "checked" : ""; ?>>
        文档评论
        <input name="gdopen[]" type="checkbox" id="gdopen5" value="5" <?php echo (preg_match("/5/",$safe_gdopen))? "checked" : ""; ?>>
        会员短消息
        <input name="gdopen[]" type="checkbox" id="gdopen6" value="6" <?php echo (preg_match("/6/",$safe_gdopen))? "checked" : ""; ?>>
        后台登陆
        <input name="gdopen[]" type="checkbox" id="gdopen7" value="7" <?php echo (preg_match("/7/",$safe_gdopen))? "checked" : ""; ?>>
        问答</td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td height="24">验证码生成类型：</td>
      <td><input class="np" type="radio" value="1" name="codetype" id="cttpe1" <?php echo ($safe_codetype == 1)? "checked" : ""; ?>>
        数字
        <input class="np" type="radio" value="2" name="codetype" id="cttpe2" <?php echo ($safe_codetype == 2)? "checked" : ""; ?>>
       英文
        <input class="np" type="radio" value="3" name="codetype" id="cttpe3" <?php echo ($safe_codetype == 3)? "checked" : ""; ?>>
        单词</td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td height="24">选择验证码文件类型：</td>
      <td><input name="gdtype" type="radio" value="1" id="dtype1" <?php echo ($safe_gdtype == 1)? "checked" : ""; ?>>
       jpg &nbsp;
        <input type="radio" name="gdtype" value="2" id="dtype2" <?php echo ($safe_gdtype == 2)? "checked" : ""; ?>>
       png
          &nbsp;
        <input type="radio" name="gdtype" value="3" id="dtype3" <?php echo ($safe_gdtype == 3)? "checked" : ""; ?>>
        gif (GD&gt;= 2.0.28)</td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td height="24">验证码干扰设置：</td>
      <td><input name="gdstyle[]" type="checkbox" value="1" id="dstyle1" <?php echo (preg_match("/1/",$safe_gdstyle))? "checked" : ""; ?>>
        背景线 &nbsp;
        <input type="checkbox" name="gdstyle[]" value="2" id="dstyle2" <?php echo (preg_match("/2/",$safe_gdstyle))? "checked" : ""; ?>>
       背景图像
          &nbsp;
        <input type="checkbox" name="gdstyle[]" value="3" id="dstyle3" <?php echo (preg_match("/3/",$safe_gdstyle))? "checked" : ""; ?>>
       混杂文本色</td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td height="24">验证码图片大小（设置为0为不限）：</td>
      <td> 宽：
        <input name="gd_wwidth" type=text id="gd_wwidth"   value="<?php echo empty($safe_wwidth)? "" :$safe_wwidth ;?>" size="5">
        px
        高：
        <input name="gd_wheight" type=text id="gd_wheight"  value="<?php echo empty($safe_wheight)? "" :$safe_wheight ;?>" size="5">
        px</td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td height="24">验证码字符数：</td>
      <td><input name="codelen" type="text" id="codelen" value="<?php echo empty($safe_codelen)? "" :$safe_codelen ;?>">
        个(类型设为单词,该属性无效)</td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td height="24" colspan="2">&nbsp;</td>
    </tr>
    <tr>
      <td height="26" colspan="2" bgcolor="#FFFFFF" background="images/tbg.gif"><b>验证问题设置</b></td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td height="24"> 1、使用简单的文字问题(例如:11+5=?，请输入中文答案)<BR>
        2、使用html代码(例如将问题做成一张小图片   &lt;img src="地址" /&gt;)<BR>
        3、多个问题将随机出现一个问题。</td>
      <td><table width="98%" border="0" cellspacing="2" cellpadding="0">
          <tbody id="qiterm" style="display:none">
            <tr>
              <td width="50%"><input name="question[]" type="text" size="30" value=""/></td>
              <td width="50%"><input name="answer[]" type="text" value=""/>
                <a onClick="delIterm(this);" style="cursor: pointer; color: rgb(250, 137, 27);">[删除]</a></td>
            </tr>
          </tbody>
          <thead>
          <td width="50%">问题</td>
            <td width="50%">答案<a onclick='addIterm("qiterm","qbox");' style='cursor: pointer; color: rgb(0, 0, 255);'>[+增加]</a></td>
          </tr>
          </thead>
          
          <tbody>
            <?php
            	if(!empty($safefaqs))
                {
                	foreach ($safefaqs as $key => $safefaq) {
  
					
            ?>
            <tr>
              <td width="50%"><input name="question[]" type="text" value="<?php echo htmlspecialchars($safefaq['question']);?>" size="30"/></td>
              <td width="50%"><input name="answer[]" type="text" value="<?php echo $safefaq['answer']?>"/>
                <a onClick="delIterm(this);" style="cursor: pointer; color: rgb(250, 137, 27);">[删除]</a></td>
            </tr>
            <?php
           			}
           		}
           ?>
          </tbody>
          <tbody id="qbox">
          </tbody>
        </table></td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td height="24">注册开启验证问题:</td>
      <td><input class="np" type="radio" value="1" name="gdfaq_reg" <?php echo ($safe_faq_reg == 1)? "checked" : ""; ?>>
        开启
        <input class="np" type="radio" value="0" name="gdfaq_reg" <?php echo ($safe_faq_reg == 0)? "checked" : ""; ?>>
        关闭</td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td height="24">会员投稿开启验证问题:</td>
      <td><input class="np" type="radio" value="1" name="gdfaq_send" <?php echo ($safe_faq_send == 1)? "checked" : ""; ?>>
        开启
        <input class="np" type="radio" value="0" name="gdfaq_send" <?php echo ($safe_faq_send == 0)? "checked" : ""; ?>>
        关闭</td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td height="24">短消息开启验证问题:</td>
      <td><input class="np" type="radio" value="1" name="gdfaq_msg" <?php echo ($safe_faq_msg == 1)? "checked" : ""; ?>>
        开启
        <input class="np" type="radio" value="0" name="gdfaq_msg" <?php echo ($safe_faq_msg == 0)? "checked" : ""; ?>>
        关闭</td>
    </tr>
    <tr bgcolor="#F9FCEF">
      <td height="37" colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="7%">&nbsp;</td>
            <td width="93%" align="center">
            <input class="button" name="imageField" type="submit" value="确定" />
            
              &nbsp; <input class="button" name="rset" id="rset" type="reset" value="重置" /> </td>
          </tr>
        </table></td>
    </tr>

</table>  
</form>
							<div class="clear"></div><!-- End .clear -->
							
						
						
					</div> <!-- End #tab1 -->

					
				</div> <!-- End .content-box-content -->
				
			</div> <!-- End .content-box -->
			
			<div class="clear"></div>
			
           <?php include(DEDEADMIN.'/templets/footer.htm'); ?>
			
		</div> <!-- End #main-content -->	
	</div>
</body>
</html>