linyue8100 linyue8100
关注数: 6 粉丝数: 18 发帖数: 369 关注贴吧数: 4
做一个ASP的级联,下拉菜单点击不同的地区,就显示不同的自动编 做一个ASP的级联,下拉菜单点击不同的地区,就显示不同的自动编号,但是为什么<option value="<%=cgid%>">汕头</option> 时候,就可以自动编号+1.。。。而 <option value="51<%=cgid%>">汕头</option>在前面加数字的时候,他就不会+1了,麻烦高手帮我看看。。。谢谢 <% set rs=server.CreateObject("adodb.recordset") '锁定指定记录通过with(updlock)完成。 sql="select id from baogao with(updlock) " rs.open sql,conn,1,3 '将日期转换为YYYYMMDD格式的字符串 if len(month(date()))=1 then cmonth="0"& cstr(month(date())) else cmonth=cstr(month(date())) end if if len(day(date()))=1 then cday="0"& cstr(day(date())) else cday=cstr(day(date())) end if if not rs.eof then set rs_M=server.CreateObject("adodb.recordset") sql="select max(bh) as id from baogao" rs_M.open sql,conn,1,3 str=rs_M("id") no=cstr(int(mid(str,11,5))+1) select case len(no) case 1 cno="0000"+no case 2 cno="000"+no case 3 cno="00"+no case 4 cno="0"+no case 5 cno=no case else cno="00001" end select intno="ST"&cstr(year(date()))&cmonth&cday&cno '组成新的数据编号 cgid=intno end if %> 项目编号: <label for="bh2"></label> <input name="bh" type="text" id="bh2" value="" readonly="readonly"></th> <th width="234" height="39" scope="col"><strong><div align="left"><div align="left">关联汇总:<label for="select"></label> <select name="select" id="select" onChange="document.getElementsByName('bh')[0].value=this.value"> <option value=<%=rs("typename")%>><%=rs("typename")%></option> <option value="51<%=cgid%>">汕头</option> <option value="52<%=cgid%>">广州</option> </select> <strong> </strong></th>
密码修改的代码~~~~ 一个baogao的数据库,里面user的表,uid是名称 pwd是旧密码 pwd1是新密码 pwd2是确认新密码 。。。。请帮我看看下面那里错了啊,谢谢啊,求大神帮帮 <!--#include file="conn.asp"--> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title><%=session("uid")%> - 修改密码</title> <style type="text/css"> <!-- .STYLE2 { font-size: 14px; color: #990033; } --> </style> <link rel="stylesheet" type="text/css" href="skin/01/index.css"> <br> <form id="form1" name="form1" method="post" action="?xg=yes"> <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" id="bkd"> <tr> <td height="25" colspan="4" align="center"> </td> </tr> <tr> <td width="15%" height="25" align="right" bgcolor="#FFFFFF">名称</td> <td width="91%" height="25" colspan="3" bgcolor="#FFFFFF"><span class="STYLE2"><%=session("uid")%><span class="STYLE2"></td> </tr> <tr> <td height="25" align="right" bgcolor="#FFFFFF">原始密码</td> <td height="25" colspan="3" bgcolor="#FFFFFF"><input name="pwd" type="password" id="pwd" /></td> </tr> <tr> <td height="25" align="right" bgcolor="#FFFFFF">新密码</td> <td height="25" colspan="3" bgcolor="#FFFFFF"><input name="pwd1" type="password" id="pwd1" /></td> </tr> <tr> <td height="25" align="right" bgcolor="#FFFFFF">密码</td> <td height="25" colspan="3" bgcolor="#FFFFFF"><input name="pwd2" type="password" id="pwd2" /></td> </tr> <tr> <td height="25" bgcolor="#FFFFFF"> </td> <td height="25" colspan="3" bgcolor="#FFFFFF"><input type="submit" name="Submit" value=" 开 始 修 改 " /></td> </tr> </table> </form> <%if trim(request("uid"))="总经理" then pwd=trim(request("pwd")) pwd1=trim(request("pwd1")) pwd2=trim(request("pwd2")) if pwd="" or pwd1="" or pwd2="" then response.write"<script language=javascript>alert(*密码不能为空!*);history.back();</script>" response.end end if if len(pwd1)<3 then response.write"<script language=javascript>alert(*您的密码太简单了,请重新输入!*);history.back();</script>" response.end end if if pwd1<>pwd2 then response.write"<script language=javascript>alert(*两次新密码不一样。请重试!*);history.back();</script>" response.end end if set rs=server.CreateObject("adodb.Recordset") sql="select * from user where uid=*"&session("uid")&"*" rs.open sql,conn,1,3 if rs("pwd")<>pwd(pwd,6) then response.write "<script language=javascript>alert(*对不起!原始密码错误!请重试!*);location.href=*xiugai.asp*;</script>" response.end else rs("pwd")=pwd(pdw1,6) rs.update response.write "<script language=javascript>alert(*恭喜您!新密码已修改成功!*);history.back();</script>" rs.close set rs=nothing end if end if%>
1 下一页