?? topdepart_edit.asp
字號:
<!--#include file="../Include/TimeOut.asp"-->
<!--#include file="../Include/AdoConn.asp"-->
<!--#include file="../Include/online.asp"-->
<%
'無變量傳來時先賦初值,即添加狀態
TopDepartCode=""
TopDepartName=""
TopDepartType=""
password=""
question=""
answer=""
edit=""
'取得傳來變量
strsqlzh=Request.QueryString("strsql")
TopDepartCode=Request.Querystring("code")
TopDepartName=Request.Querystring("name")
page=Cstr(Request.Querystring("page"))
edit=Request.Querystring("edit")
if not edit="" then
set rst=server.createobject("ADODB.recordset")
Strsql="select * from xt_tc_user where 用戶編碼='"&TopDepartCode&"' and len(用戶編碼)=3"
rst.open Strsql,strconn
topdepartname=rst("用戶姓名")
TopDepartType=rst("主管部門類別")
password=rst("密碼")
question=rst("查詢密碼問題")
answer=rst("查詢密碼問題答案")
end if
set rstLB=server.CreateObject ("ADODB.recordset")
StrSQL="select distinct 主管部門類別 from XT_VC_User where len(用戶編碼)=3 and left(用戶編碼,3)<>'kjj'"
rstLB.CursorType =3
rstLB.CursorLocation =3
rstLB.LockType =2
rstLB.Open StrSQL,strconn
%>
<html>
<head>
<title>主管部門設置</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../CssLib/Cssbutton.css">
</head>
<body text="#000000" bgcolor="#ffffff">
<img src="images/edit_title_topdepart.gif" width="200" height="27"><font color="#00CCFF" size="1">★★★★★<font color="#00CCFF" size="1">★★★★★</font><font color="#00CCFF" size="1">★★★★★</font><font color="#00CCFF" size="1">★★★★★</font>★★</font><br>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="22" height="20"><img src="../public/images/edit_bg_zs.gif" width="21" height="20"></td>
<td background="../public/images/bg_left.gif" bgcolor="#0099FF">
<div align="center"></div>
</td>
<td width="10"><img src="../public/images/edit_bg_ys.gif" width="21" height="20"></td>
</tr>
<tr>
<td background="../public/images/bg_left.gif"> </td>
<td bgcolor="#FFFFFF" height="200">
<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr bgcolor="#FFFFFF">
<td height="20" width="5%"> </td>
<td height="20" width="17%"> </td>
<td height="20" width="73%"> </td>
<td height="20" width="5%"> </td>
</tr>
<form name="conlist" method="post" action="TopDepart_regist.asp?strsql=<%=server.URLEncode(strsqlzh)%>&edit=<%=request.querystring("edit")%>&page=<%=Cstr(request.querystring("page"))%>" onsubmit="return checkfun()">
<tr bgcolor="#EAEAEA">
<td height="20" width="5%" bgcolor="#EAEAEA"> </td>
<td height="20" width="17%" bgcolor="#EAEAEA">
<div align="left">主管部門編碼</div>
</td>
<td height="20" width="73%">
<p>
<% if not edit="" then
response.write TopDepartCode '修改狀態
Response.Write "<input type='hidden' name='TopDepartCode' value='"&TopDepartcode&"'>"
else %>
<input type="text" name="TopDepartCode" maxlength=3>
<%
end if
%>
<font color="#ff0000">** </font> (注:**為必填項,下同。)<br>
(格式為3位數字,如:001)<br>
</p>
</td>
<td height="20" width="5%"> </td>
</tr>
<tr bgcolor="white">
<td height="20" width="5%"> </td>
<td height="20" width="17%" bgcolor="white">
<div align="left"></div>
</td>
<td height="20" width="73%"> </td>
<td height="20" width="5%"> </td>
</tr>
<tr bgcolor="#EAEAEA">
<td height="20" width="5%" bgcolor="#EAEAEA"> </td>
<td height="20" width="17%" bgcolor="#EAEAEA">
<div align="left">主管部門名稱</div>
</td>
<td height="20" width="73%" bgcolor="#EAEAEA">
<input type="text" name="TopDepartName" value="<%=TopDepartName%>" maxlength="20">
<font color="#FF0000">** </font></td>
<td height="20" width="5%"> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="20" width="6%"><font color="#FFFFFF"></font></td>
<td height="20" width="20%"><font color="#FFFFFF"></font></td>
<td height="20" width="65%"><font color="#FFFFFF"></font></td>
<td height="20" width="9%"><font color="#FFFFFF"></font></td>
</tr>
<tr bgcolor="#EAEAEA">
<td height="20" width="5%" bgcolor="#EAEAEA"> </td>
<td height="20" width="17%" bgcolor="#EAEAEA">
<div align="left">主管部門類別</div>
</td>
<td height="20" width="73%" bgcolor="#EAEAEA">
<select name="TopDepartType" >
<%
rstLB.MoveFirst
for i=1 to rstLB.RecordCount %>
<option value="<%=rstLB.Fields("主管部門類別").Value%>" <%if TopDepartType=rstLB.fields("主管部門類別") then response.write "selected" end if%>><%=rstLB.Fields("主管部門類別").Value %></option>
<%rstLB.MoveNext
next
rstLB.Close
set rstLB=nothing
%>
</select>
<font color="#FF0000">**</font> </td>
<td height="20" width="5%"> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="20" width="6%"><font color="#FFFFFF"></font></td>
<td height="20" width="20%"><font color="#FFFFFF"></font></td>
<td height="20" width="65%"><font color="#FFFFFF"></font></td>
<td height="20" width="9%"><font color="#FFFFFF"></font></td>
</tr>
<tr bgcolor="#eaeaea">
<td height="20" width="6%" bgcolor="#eaeaea"> </td>
<td height="20" width="20%" bgcolor="#eaeaea">
<div align="left">密碼</div>
</td>
<td height="20" width="65%" bgcolor="#eaeaea">
<% if not edit="" then %>
<input type="text" name="password" maxlength=6 value="<%=Password%>">
<% else %>
<input type="password" name="Password" maxlength=6>
<%end if%>
<font color="#ff0000">** </font></td>
<td height="20" width="9%"> </td>
</tr>
<tr bgcolor="white">
<td height="20" width="6%"> </td>
<td height="20" width="20%">
<div align="left"></div>
</td>
<td height="20" width="65%"> </td>
<td height="20" width="9%"> </td>
</tr>
<tr bgcolor="#eaeaea">
<td height="20" width="6%"> </td>
<td height="20" width="20%" bgcolor="#eaeaea">
<div align="left">確認密碼</div>
</td>
<td height="20" width="65%">
<input type="password" name="Password2" maxlength=6>
<font color="#ff0000">**</font> </td>
<td height="20" width="9%"> </td>
</tr>
<tr bgcolor="white">
<td height="20" width="6%"> </td>
<td height="20" width="20%">
<div align="left"></div>
</td>
<td height="20" width="65%"> </td>
<td height="20" width="9%"> </td>
</tr>
<tr bgcolor="#eaeaea">
<td height="20" width="6%"> </td>
<td height="20" width="20%" bgcolor="#eaeaea">
<div align="left">查詢密碼問題</div>
</td>
<td height="20" width="65%">
<input name="Question" size="30" maxlength=200 value="<%=Question%>">
<font color="#ff0000">**</font> </td>
<td height="20" width="9%"> </td>
</tr>
<tr bgcolor="white">
<td height="20" width="6%"> </td>
<td height="20" width="20%">
<div align="left"></div>
</td>
<td height="20" width="65%"> </td>
<td height="20" width="9%"> </td>
</tr>
<tr bgcolor="#eaeaea">
<td height="20" width="6%" bgcolor="#eaeaea"> </td>
<td height="20" width="20%" bgcolor="#eaeaea">查詢密碼問題答案</td>
<td height="20" width="65%">
<input name="Answer" size="30" maxlength=200 value="<%=answer%>">
<font color="#ff0000">**</font> </td>
<td height="20" width="9%"> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="20" width="5%"><font color="#FFFFFF"></font></td>
<td height="20" width="17%"><font color="#FFFFFF"></font></td>
<td height="20" width="73%"><font color="#FFFFFF"></font></td>
<td height="20" width="5%"><font color="#FFFFFF"></font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="20" colspan="4">
<div align="center">
<input class="button" type="submit" name="Submit" value="提交" >
<input class="button" type="reset" name="Submit2" value="重填">
<input class="button" type="button" name="Submit3" value="返回"onClick="back()">
</div>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="20" width="5%"> </td>
<td height="20" width="17%"> </td>
<td height="20" width="73%" bgcolor="#FFFFFF"> </td>
<td height="20" width="5%"> </td>
</tr>
</form>
</table>
</td>
<td bgcolor="#FFFFFF" background="../public/images/bg_left.gif"> </td>
</tr>
<tr>
<td width="22"><img src="../public/images/edit_bg_zx.gif" width="21" height="20"></td>
<td bgcolor="#FFFFFF" background="../public/images/bg_left.gif" height="20"> </td>
<td width="10">
<div align="right"><img src="../public/images/edit_bg_yx.gif" width="21" height="20"></div>
</td>
</tr>
</table>
</body>
</html>
<script language="vbscript">
function checkfun() '校驗表單
checkfun=true
if ConList.Password.value <>ConList.Password2.value then
checkfun=false
window.alert "兩次密碼輸入不一致,請重新輸入!"
exit function
end if
if ConList.TopDepartCode.value ="" then
checkfun=false
window.alert "部門編碼不能為空,請重新輸入!"
exit function
else if not len(ConList.TopDepartCode.value)=3 then
checkfun=false
window.alert "部門編碼必需為3位,請重新輸入!"
exit function
end if
exit function
end if
if ConList.TopDepartName.value ="" then
checkfun=false
window.alert "部門名稱不能為空,請重新輸入!"
exit function
end if
if ConList.Password.value ="" then
checkfun=false
window.alert "密碼不能為空,請重新輸入!"
exit function
end if
if ConList.Question.value ="" then
checkfun=false
window.alert "查詢密碼問題不能為空,請重新輸入!"
exit function
end if
if ConList.Answer.value ="" then
checkfun=false
window.alert "查詢問題答案不能為空,請重新輸入!"
exit function
end if
end function
function back()
history.back
end function
</script>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -