<!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="../../inc/manage.css" type="text/css">
<style type="text/css">
<!--
body {
	margin-left: 1pt;
	margin-top: 1pt;
}
-->
</style></head>
<script language="javascript">

function isNumbjavasc(inputNumb){
//p=document.OrderForm.b_Quantity.value;//数量
	if(isNaN(inputNumb)||inputNumb<=0||inputNumb.indexOf('.')!=-1)
		{
			/*if (inputSort=="密码位数"){
				alert("密码位数：请输入大于零的数字！");
				return false;
			}
			else{*/
				alert("密码个数：必须为大于零且小于5000的数字！");
				return false;		
			//}
		}
	else if (inputNumb>5000){
		alert("密码生产一次不能大于5000个！");
		return false;			
		}
}
function isNumbjs(){
	//passw_wei=document.p_password.password_weishu.value;
	passw_Numb=document.p_password.passwordNumb.value;
	/*if (IsNumb(passw_wei)==false){
		alert("密码位数：请输入大于零的数字");
		return false; 
	}else */if(IsNumb(passw_Numb)==false){
		alert("密码个数：必须为大于零且小于5000的数字。");
		return false; 
	}else if(passw_Numb>5000){
		alert("密码生产一次不能大于5000个！");
		return false;
		}
	else{
	document.p_password.action="survey_canshu_set_produce_password.asp";
    document.p_password.submit();
	}
}

function IsNumb(dateval){
	if(isNaN(dateval)||dateval<1||dateval.indexOf('.')!=-1) {
		return false;
	}
	else{
		return true;
	}
}
</script>
<body>
<!--#include file="../../config.asp"-->
<!--#include file="../../manage/checkuserflag.asp"-->
<%call CheckUserFlag("02")
survey_id=request("survey_id")'问卷ID号
Set ObjTCW = Server.CreateObject("dc_data100_v1_0.C_A_Config")
old_password_string=ObjTCW.survey_produce_password(DataPathFile,survey_id)
%>
<form id="p_password" name="p_password" method="post" action="">
           <table width="96%" border="0" cellspacing="0" cellpadding="0">
             <tr>
               <td height="38" colspan="2" align="center"><b><font color="#666666">生产密码</font></b></td>
             </tr>
             <tr>
               <td width="24%" height="23" align="right">密码位数：</td>
               <td width="76%">
                 <label><input type="radio" name="password_weishu" id="password_weishu" value="4">4位</label><label>
                 <input name="password_weishu" type="radio" id="password_weishu" value="6" checked>
                 6位</label><label>
                 <input name="password_weishu" type="radio" id="password_weishu" value="8">
                 8位</label><label>
                 <input type="radio" name="password_weishu" id="password_weishu" value="16">16位</label><label>
               <input type="radio" name="password_weishu" id="password_weishu" value="32">32位</label></td>
             </tr>
             <tr>
               <td height="23" align="right">密码组合：</td>
             <td height="23"><label>
                 <select name="password_zuhe" id="password_zuhe">
                   <option value="1">纯数字</option>
                   <option value="2">纯小写字母</option>
                   <option value="3">纯大写字母</option>
                   <option value="4">数字与小写字母组合</option>
                   <option value="5">数字与大写字母组合</option>
                   <option value="6" selected>数字、小写、大写字母组合</option>
                   <option value="7">数字、小大写字母与特殊字符组合</option>
               </select>
                 </label>
                 <br></td>
             </tr>
             <tr>
               <td height="23" align="right">密码个数：</td>
               <td><input id="passwordNumb" type="text" name="passwordNumb" value="" size=6 maxlength=4 onChange="javascript:isNumbjavasc(document.p_password.passwordNumb.value);">
                 <%if old_password_string<>"" then
				 		response.write "<font color=""red"">已生产密码：<b>" & ubound(split(old_password_string,"、"))+1 & "</b>个</font>"
				 end if%><br></td>
             </tr>
             <tr>
               <td>&nbsp;</td>
               <td height="23">(每次生产密码不要超过5000个)</td>
             </tr>
             <tr>
               <td height="32">&nbsp;</td>
               <td><input type="button" value="生产密码" name=button_22 class="p9" style="WIDTH: 100px; HEIGHT: 24px;" size="134"  onClick="javascript:isNumbjs();">
               <input name="p_pass" type="hidden" id="p_pass" value="Y">
               <input name="survey_id" type="hidden" id="survey_id" value="<%=survey_id%>" /></td>
             </tr>
           </table>
</form>
</body>
</html>