📄 abgmbdz.asp
字号:
<%@ Language=VBScript %>
<!-- #INCLUDE FILE="../../share\connectdb3.asp" -->
<!--#include file=../../pubfunction.asp-->
<!--#include file=../../apggmk.asp-->
<HTML>
<HEAD>
<META name=VI60_defaultClientScript content=VBScript><title>报告模板定制</title>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<link rel="stylesheet" type="text/css" href="../../style/style.css" >
<link rel="stylesheet" type="text/css" href="../../style/table.css" >
<SCRIPT ID=clientEventHandlersVBS LANGUAGE=vbscript>
<!--
Sub cmdadd_onclick
if len(bgmbdz.txtmbmc.value)=0 then
msgbox "模板名称不能空,请确认!",vbinformation,"提示"
exit sub
end if
if len(bgmbdz.txtmbbt.value)=0 then
msgbox "模板标题不能空,请确认!",vbinformation,"提示"
exit sub
end if
if len(bgmbdz.txtmbdh.value)=0 then
msgbox "模板代号不能空,请确认!",vbinformation,"提示"
exit sub
end if
if len(bgmbdz.txtmbdh.value)<=4 and isnumeric(bgmbdz.txtmbdh.value) then
bgmbdz.pdid.value=1
bgmbdz.submit
else
msgbox "模板代号位数不能超过4位!,且应为数字",vbinformation,"提示"
exit sub
end if
End Sub
Sub cmddel_onclick
if len(bgmbdz.txtmbmc.value)=0 then
msgbox "模板名称不能空,请确认!",vbinformation,"提示"
exit sub
end if
if msgbox("你确认要删除该模板吗?",vbquestion+vbyesno,"提示")=vbyes then
bgmbdz.pdid.value=2
bgmbdz.submit
end if
End Sub
Sub cmdxg_onclick
if len(bgmbdz.txtmbmc.value)=0 then
msgbox "模板名称不能空,请确认!",vbinformation,"提示"
exit sub
end if
if len(bgmbdz.txtmbbt.value)=0 then
msgbox "模板标题不能空,请确认!",vbinformation,"提示"
exit sub
end if
if len(bgmbdz.txtmbdh.value)=0 then
msgbox "模板代号不能空,请确认!",,"提示"
exit sub
end if
if msgbox("你确认要修改该模板吗?",vbquestion+vbyesno,"提示")=vbyes then
bgmbdz.pdid.value=3
bgmbdz.submit
end if
End Sub
sub txtmbdh_onkeypress
if window.event.keyCode ="13" then
if trim(bgmbdz.txtmbdh.value)="" then
msgbox "模板代号不能空,请确认!",vbinformation,"提示"
window.event.keyCode=0
bgmbdz.txtmbdh.focus
exit sub
end if
window.event.keyCode=0
bgmbdz.txtmbmc.focus
end if
end sub
sub txtmbmc_onkeypress
if window.event.keyCode ="13" then
if trim(bgmbdz.txtmbmc.value)="" then
msgbox "模板名称不能空,请确认!",vbinformation,"提示"
window.event.keyCode=0
bgmbdz.txtmbmc.focus
exit sub
end if
window.event.keyCode=0
bgmbdz.txtmbbt.focus
end if
end sub
sub txtmbbt_onkeypress
if window.event.keyCode ="13" then
if trim(bgmbdz.txtmbbt.value)="" then
msgbox "模板标题不能空,请确认!",vbinformation,"提示"
window.event.keyCode=0
bgmbdz.txtmbbt.focus
exit sub
end if
window.event.keyCode=0
bgmbdz.txtmbnr.focus
end if
end sub
Sub cmbmbdh_onchange
bgmbdz.txtmbdh.value=bgmbdz.cmbmbdh.value
bgmbdz.pdid.value=4
bgmbdz.submit
End Sub
-->
</SCRIPT>
</HEAD>
<BODY topmargin=0 leftmargin=0 >
<form name=bgmbdz method="post" action="abgmbdz.asp">
<%
txtmbdh=""
dim pym,wbm
set rs=server.CreateObject("adodb.recordset")
txtmbmc=trim(Request.Form("txtmbmc"))
txtmbbt=trim(Request.Form("txtmbbt"))
txtmbdh=trim(Request.Form("txtmbdh"))
txtmbnr=trim(Request.Form("txtmbnr"))
if trim(Request.Form("pdid"))="1" then
sqlstr="select * from mz_tjcmb where dh='"& txtmbdh &"'"
set result=conn.Execute(sqlstr)
if not result.eof then '提示已存在这条记录
Response.Write "<SCRIPT LANGUAGE=vbscript>" & chr(10)
Response.Write "<!--"& chr(10)
Response.Write "msgbox""代号已存在,请重新输入代号!"",16 ,""提示"""& chr(10)
Response.Write "-->"& chr(10)
Response.Write "</SCRIPT>"& chr(10)
else
pym="p"&PinYinMa(Request.Form("txtmbmc"))
wbm="w"&WuBiMa(Request.Form("txtmbmc"))''''增加模板
sqlstr="insert into mz_tjcmb(dh,pym,wbm,mbnr,ks,mbmc,mbbt) values('"&txtmbdh&"','"&pym&"','"&wbm&"','"&txtmbnr&"','"&session("rzks")&"','"&txtmbmc&"','"&txtmbbt&"')"
conn.Execute(sqlstr)
Response.Write "<SCRIPT LANGUAGE=vbscript>"& chr(10)
Response.Write "<!--"& chr(10)
Response.Write "msgbox""增加成功!"",vbinformation, ""提示"""& chr(10)
Response.Write "-->"& chr(10)
Response.Write "</SCRIPT>"& chr(10)
txtmbmc=""
txtmbbt=""
txtmbdh=""
txtmbnr=""
end if
result.close
end if
if trim(Request.Form("pdid"))="2" then '''删除模板
sqlstr="delete mz_tjcmb where dh='"&txtmbdh&"'"
conn.Execute(sqlstr)
txtmbmc=""
txtmbbt=""
txtmbdh=""
txtmbnr=""
end if
if trim(Request.Form("pdid"))="3" then '''修改模板
pym="p"&pinyinma(Request.Form("txtmbmc"))
wbm="w"&wubima(Request.Form("txtmbmc"))
sqlstr="update mz_tjcmb set pym='"&pym&"',wbm='"&wbm&"',mbnr='"&txtmbnr&"',mbmc='" & txtmbmc & "',mbbt='"&txtmbbt&"' where dh='"& txtmbdh & "'"
conn.Execute(sqlstr)
Response.Write "<SCRIPT LANGUAGE=vbscript>"& chr(10)
Response.Write "<!--"& chr(10)
Response.Write "msgbox""修改成功!"",vbinformation, ""提示"""& chr(10)
Response.Write "-->"& chr(10)
Response.Write "</SCRIPT>"& chr(10)
end if
if trim(Request.Form("pdid"))="4" then
if len(txtmbdh)<>0 then
sqlstr="select id,mbmc,mbbt,mbnr from mz_tjcmb where dh='"&txtmbdh&"'"
set result=conn.Execute(sqlstr)
if not result.eof then
txtid=result("id")
txtmbmc=result("mbmc")
txtmbbt=result("mbbt")
txtmbnr=result("mbnr")
else
txtmbmc=""
txtmbbt=""
txtmbnr=""
txtid=0
end if
result.close
end if
end if
%>
<table width='<%=session("screen_width")%>' height='<%=session("screen_height")%>' border=0 cellspacing="0" cellpadding="0" bgcolor="<%=tableBGCOLOR%>">
<tr class=ListCellRow bgcolor="<%=tableHBGCOLOR%>" ><TD nowrap align=left width=100%><img src="../../images/jk.GIF" width='24px' height='24px'>报告模板定制<font color="<%=tableHFONTCOLOR%>">-<%=session("yhm")%></td><TD nowrap width="10%"> </td>
<TD nowrap width=25px align=right nowrap valign=center><img src="../../images/qp.GIF" width='20px' height='20px' style='cursor:hand' alt='重新登录' onclick=javascript:allwindow()> </td>
<TD nowrap width=25px align=right nowrap valign=center><img src="../../images/gb.gif" width='20px' height='20px' style='cursor:hand' alt='关闭' onclick=javascript:closewindow()> </td></tr>
<TR><TD nowrap colspan=4>
<table align="left" border="0" cellPadding="0" cellSpacing="0" width="100%">
<TR>
<TD colspan=2>已有模板<select id=cmbmbdh name=cmbmbdh style="width:280px">
<option >
<%
sqlstr="select dh,mbmc,mbbt,mbnr from mz_tjcmb order by mbbt "
rs.Open sqlstr,conn
do while not rs.eof
if cstr(rs("dh"))=cstr(txtmbdh) then
Response.Write "<option selected value=" & rs("dh") & " >" & rs("dh") & "--" & rs("mbbt") & "--" & rs("mbmc")
else
Response.Write "<option value=" & rs("dh") & " >" & rs("dh") & "--" & rs("mbbt") & "--" & rs("mbmc")
end if
rs.movenext
loop
%>
</select>
模板代号<INPUT class="longtext1" id=txtmbdh name=txtmbdh value=<%=txtmbdh%>></TD>
</TR>
<TR>
<TD>模板名称<INPUT class="longtext1"id=txtmbmc name=txtmbmc value=<%=txtmbmc%>></TD>
<TD >模板标题<INPUT class="longtext1" id=txtmbbt name=txtmbbt value=<%=txtmbbt%>></TD>
</TR></table></td></tr>
<TR height='100%'><TD nowrap colspan=4 height='100%'>
<TEXTAREA id=txtmbnr name=txtmbnr style="HEIGHT: 95%; WIDTH: 100%" ><%=txtmbnr%></TEXTAREA>
</TD>
</TR>
<TR>
<TD colspan=4 align=middle>
<INPUT class="buttons02" type="button" value="添加(A)" accesskey="A" id=cmdadd name=cmdadd style="HEIGHT: 24px; WIDTH: 62px" >
<INPUT class="buttons02" type="button" value="修改(U)" accesskey="U" id=cmdxg name=cmdxg style="HEIGHT: 24px; WIDTH: 62px">
<INPUT class="buttons02" type="button" value="删除(S)" accesskey="S" id=cmddel name=cmddel style="HEIGHT: 24px; WIDTH: 62px"></TD>
</TR>
</TABLE>
<%
conn.Close
set conn=nothing
%>
<INPUT type="hidden" id=pdid name=pdid >
</form>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -