📄 admin_cert_inc.asp
字号:
<%
'****************************************************
'名称:listinfo
'功能:列表
'****************************************************
Sub listinfos()
%><table width="100%" cellspacing="1" cellpadding="0" class="info_tab">
<tr align="center">
<td width="5%" class="art_tit">选</td>
<td width="15%" class="art_tit">姓名</td>
<td width="25%" class="art_tit">身份证号</td>
<td width="15%" class="art_tit">证书编号</td>
<td width="20%" class="art_tit">证件名称</td>
<td width="15%" class="art_tit">发证时间</td>
<td width="5%" class="art_tit">操作</td>
</tr>
<%
sql="select a.id,a.IdentityNO,c_no,c_type,c_time,b.id,b.Name from Cert_info as a,File_info as b where a.IdentityNO=b.IdentityNO "&Sql_Condition&" order by a.id desc"
strFileName="admin_Cert.asp?action="&action&"&types="&types&"&keyword="&keyword
colnum="7"
formaction="admin_Cert.asp?action=del"
sqllist sql,colnum,strFileName,formaction
If outcom=True Then
showContent
showdelpages
End If
%>
</table>
<H1> </H1>
<%
End Sub
'****************************************************
'名称:showContent
'功能:翻页列表输出
'****************************************************
sub showContent
dim i
i=0
do while not rs.eof
%>
<tr align="center">
<td class="art_info2">
<input name='id' type='checkbox' class="chek" onclick="unselectall()" id="ArticleID" value='<%=Rs(0)%>' style=" border: 0px">
</td>
<td class="art_info2"> <A HREF="admin_File.asp?action=edit&id=<%=Rs(5)%>">
<%If IsNull(Rs(6)) Then
response.write "[无姓名]"
Else
response.write "<B>"&Rs(6)&"</B>"
End If
%></A></td>
<td class="art_info2"> <%=Rs(1)%></td>
<td class="art_info2"> <%=Rs(2)%></td>
<td class="art_info2"> <%=cert_names(Rs(3))%></td>
<td class="art_info2"> <%=Rs(4)%></td>
<td class="art_info2"> <A HREF="admin_Cert.asp?action=edit&id=<%=Rs(0)%>">修改</A></td>
</tr>
<%
i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
end Sub
'****************************************************
'名称:searchinfos
'功能:搜索信息
'****************************************************
Sub searchinfos()
IdentityNOs=che(request("IdentityNOs"))
Names=che(request("Names"))
c_nos=che(request("c_nos"))
c_types=che(request("c_types"))
If IdentityNOs<>"" Then Sql_Condition=Sql_Condition&" and a.IdentityNO like '%"&IdentityNOs&"%'"
If Names<>"" Then Sql_Condition=Sql_Condition&" and b.Name like '%"&Names&"%'"
If c_nos<>"" Then Sql_Condition=Sql_Condition&" and c_no like '%"&c_nos&"%'"
If c_types<>"" And IsNumeric(c_types) Then
If Int(c_types)>0 Then Sql_Condition=Sql_Condition&" and c_type="&c_types
Else
c_types=0
End If
%>
<h3>
<FORM METHOD="get" ACTION="admin_cert.asp">
<fieldset style="padding: 2;border: #ccc 1px solid; width:99%;margin-left:5px;">
<legend style="border: #ccc 1px solid;"><span style="margin-right:20px;">搜 索 相 关 信 息</span></legend>
证书编号:<INPUT TYPE="text" NAME="c_nos" value="<%=c_nos%>">
身份证号:<INPUT TYPE="text" NAME="IdentityNOs" value="<%=IdentityNOs%>">
真实姓名:<INPUT TYPE="text" NAME="Names" value="<%=Names%>">
证书类别:<SELECT NAME="c_types"><%=cert_select(c_types)%></SELECT>
<INPUT TYPE="hidden" NAME="action" value="list"><INPUT TYPE="submit" value="查询">
</fieldset>
</FORM>
<BR>
</h3>
<%
End Sub
'****************************************************
'名称:addinfos
'功能:添加信息
'****************************************************
Sub addinfos()
%> <table width="100%" cellspacing="1" cellpadding="0" class="info_tab">
<FORM METHOD=POST ACTION="admin_Cert.asp?action=save">
<TR><TD colspan=2 class="art_tit zq"><A HREF="admin_Cert.asp?action=list">返回学生证书信息列表</A></TD></TR>
<%
For i=0 To UBound(cercs)
response.write "<TR><TD class=""zq"" width=""20%"">"&cercs(i)&"</TD><TD> "
If i=2 Then
response.write "<SELECT NAME="""&cercslm(i)&""">"&cert_select(0)&"</SELECT>"
ElseIf i=3 Then
response.write "<input type=""text"" name="""&cercslm(i)&""" readonly style=""width:120px;"" onclick=""setday(this)"" value="""&Date()&""">"
else
response.write "<INPUT TYPE=""text"" NAME="""&cercslm(i)&""">"
End If
response.write "</TD></TR>"
Next
%>
<TR>
<TD> </TD>
<TD> <INPUT TYPE="submit" value="确认添加"></TD>
</TR>
</FORM>
</TABLE>
<H1> </H1>
<%
End Sub
'****************************************************
'名称:editinfos
'功能:编辑信息
'****************************************************
Sub editinfos()
Sql_Lists="IdentityNO,c_no,c_type,c_time"
Sql_tables="Cert_info"
Sql_Conditions=" ID = "&id
sql=Sqlinfo(Sql_Lists,Sql_tables,Sql_Conditions,Sql_Sortings,Sql_Orders,Sql_Additional)
cert_edit = connopen(sql)
If isArray(cert_edit)=False Then errormsg "参数错误"
%>
<table width="100%" cellspacing="1" cellpadding="0" class="info_tab">
<FORM METHOD=POST ACTION="admin_Cert.asp?action=mod">
<TR><TD colspan=2 class="art_tit zq"><A HREF="admin_Cert.asp?action=list">返回学生证书信息列表</A></TD></TR>
<%For i=0 To UBound(cercs)
response.write "<TR><TD class=""zq"" width=""20%"">"&cercs(i)&"</TD><TD> "
If i=2 Then
response.write "<SELECT NAME="""&cercslm(i)&""">"&cert_select(cert_edit(i,0))&"</SELECT>"
ElseIf i=3 Then
response.write "<input type=""text"" name="""&cercslm(i)&""" style=""width:120px;"" readonly onclick=""setday(this)"" value="""&cert_edit(i,0)&""">"
else
response.write "<INPUT TYPE=""text"" NAME="""&cercslm(i)&""" value="""&cert_edit(i,0)&""">"
End If
response.write "</TD></TR>"
Next
%>
<TR><TD> </TD><TD> <INPUT TYPE="submit" value="确认修改"><INPUT TYPE="hidden" NAME="id" value="<%=id%>"></TD></TR>
</FORM>
</TABLE>
<H1> </H1>
<%
End Sub
'****************************************************
'名称:addidentity
'功能:添加身份证号信息到档案表
'参数:styno 身份证号码
'****************************************************
Sub addidentity(styno)
set rs_file=server.createobject("adodb.recordset")
Sql = "SELECT * FROM [File_info] WHERE IdentityNO='"&styno&"'"
rs_file.Open Sql, Conn, 1, 3
If rs_file.eof Then
rs_file.AddNew
rs_file("IdentityNO") = styno
rs_file.Update
End If
rs_file.close
End Sub
'****************************************************
'名称:jstable
'功能:接收表单提交过来的值
'****************************************************
Sub jstable()
c_type = che(request("c_type"))
c_no = che(request("c_no"))
IdentityNO = che(request("IdentityNO"))
c_time = che(request("c_time"))
End Sub
'****************************************************
'名称:sqltable
'功能:将值提交入库
'参数:types 为空或 "add" 判断是修改记录还是添加记录
'****************************************************
Sub sqltable(types)
rs("c_type") = c_type
rs("c_no") = c_no
rs("IdentityNO") = IdentityNO
rs("c_time") = c_time
End Sub
'****************************************************
'名称:cert_names
'功能:返回证书名称
'参数:cert_nos 证书类别的ID
'****************************************************
Function cert_names(cert_nos)
Sql_Lists="cert_name,cert_cont"
Sql_tables="Cert_type"
Sql_Conditions=" id="&cert_nos
sql=Sqlinfo(Sql_Lists,Sql_tables,Sql_Conditions,Sql_Sortings,Sql_Orders,Sql_Additional)
cert_na = connopen(sql)
If isArray(cert_na) Then
cert_names="<span tit="""&cert_na(1,0)&""">"&cert_na(0,0)&"</span>"
Else
cert_names="<span tit=""参数错误(可能原因:可能由于相关证书信息已被删除!)"">------</span>"
End If
End Function
'****************************************************
'名称:cert_select
'功能:返回证书名称下接列表
'参数:cert_nos 证书类别的ID 符合该ID则默认选中
'****************************************************
Function cert_select(cert_nos)
cert_select=""
Sql_Lists="id,cert_name"
Sql_tables="Cert_type"
Sql_Conditions=""
sql=Sqlinfo(Sql_Lists,Sql_tables,Sql_Conditions,Sql_Sortings,Sql_Orders,Sql_Additional)
cert_sel = connopen(sql)
If IsNull(cert_nos) Or Not IsNumeric(cert_nos) Then cert_nos= 0
cert_select=cert_select&"<option value=""0"" "
If Int(cert_nos)=0 Then cert_select=cert_select & " selected "
cert_select=cert_select&">请选择...</option>"
If isArray(cert_sel) Then
For cert_i=0 To UBound(cert_sel,2)
cert_select=cert_select&"<option value="""&cert_sel(0,cert_i)&""" "
If Int(cert_sel(0,cert_i))=Int(cert_nos) Then cert_select=cert_select & " selected "
cert_select=cert_select&">"&cert_sel(1,cert_i)&"</option>"
Next
Else
cert_select=" "
End If
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -