⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_cert_inc.asp

📁 学生证书查询管理系统2007 build1109D
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%
'****************************************************
'名称:listinfo
'功能:列表
'****************************************************
Sub listinfos()
%><table width="100%" cellspacing="1" cellpadding="0" class="info_tab2">
  		<tr> 
			<th width="5%" style="text-align:center;text-indent: 4px;">选</th>
			<th width="15%">身份证号</th>
		    <th width="15%">证书编号</th>
		    <th width="20%">证书名称</th>
		    <th width="10%">发证时间</th>
				<th width="10%">操作</th>
				<th width=" "></th>
  		</tr>
	<%
	sql="select id,IdentityNO,c_no,c_type,c_typeinfo,c_time from Cert_info as a where id<>0 "&Sql_Condition&" order by id desc"
	strFileName="?action="&action&"&types="&types&"&keyword="&keyword
	colnum="7"
	formaction="?action=del"
	sqllist sql,colnum,strFileName,formaction 
	If outcom=True Then
	showContent
	showdelpages
	End If
	%>
	</table>
	
	<%
End Sub

'****************************************************
'名称:showContent
'功能:翻页列表输出
'****************************************************
sub showContent
	dim i
	i=0
	do while not rs.eof
	%>
		<tr> 
			<td align="center">
				<input name='id' type='checkbox' class="chek" onclick="unselectall()" id="ArticleID" value='<%=Rs(0)%>' style=" border: 0px"> 
			</td>
			<td>&nbsp;<%=Rs(1)%></td>
			<td>&nbsp;<%=Rs(2)%></td>
			<td>&nbsp;<%=cert_names(Rs(3))%>(<%=cert_typeinfos(Rs(4))%>)</td>
			<td>&nbsp;<%=Rs(5)%></td>
			<td>&nbsp;<A HREF="?action=edit&id=<%=Rs(0)%>">修改</A></td>
			<td>&nbsp;</td>
		 </tr>
	<%
	i=i+1
	if i>=MaxPerPage then exit do
	rs.movenext
	loop
end Sub

'****************************************************
'名称:searchinfos
'功能:搜索信息
'****************************************************
Sub searchinfos()
	If IdentityNO<>"" Then Sql_Condition=Sql_Condition&" and a.IdentityNO like '%"&IdentityNO&"%'"
	If c_no<>"" Then Sql_Condition=Sql_Condition&" and c_no like '%"&c_no&"%'"
	If Int(c_type)>0 Then Sql_Condition=Sql_Condition&" and c_type="&c_type
	If Int(c_typeinfo)>0 Then Sql_Condition=Sql_Condition&" and c_typeinfo="&c_typeinfo

	%>
	<SCRIPT LANGUAGE="JavaScript">
<!--
function check_listinfo(){
	var check_c_no=$val("c_no").value;
	var check_IdentityNO=$val("IdentityNO").value;
	var check_c_type=$sel("c_type").value;
	var check_c_typeinfo=$sel("c_typeinfo").value;
	var gotourl="?action=<%=action%>&page=<%=page%>";
	gotourl+="&IdentityNO="+check_IdentityNO+"&c_no="+check_c_no+"&c_type="+check_c_type+"&c_typeinfo="+check_c_typeinfo;
	window.location.href=gotourl;
}
//-->
</SCRIPT><H6>切换/搜索:  </H6>
<h5>
<ul>
	<li>证书编号: <INPUT TYPE="text" NAME="c_no" value="<%=c_no%>" class="put">
	<li>身份证号: <INPUT TYPE="text" NAME="IdentityNO" value="<%=IdentityNO%>" class="put">
	<li>证书名称: <SELECT NAME="c_type"><%=my_sqlsel(c_type,"cert_name")%></SELECT>
	<li>证书类别: <SELECT NAME="c_typeinfo"><option value=0>请选择...</option></SELECT><span id="c_typeinfo_txt"></span>
	<li>&nbsp;<INPUT TYPE="button" value=" 切 换 " onclick="check_listinfo();">
</ul>
</h5>
	<SCRIPT LANGUAGE = JavaScript>
var s=["<%=nowlm(2)%>","<%=nowlm(3)%>"];
var opt0 = ["请选择...","请选择..."];
setup();
//-->
<%if c_type<>0 then res "change(1);",1%>
function checkdef(strtypes){
	if (strtypes=="<%=nowlm(3)%>"){
		setSel2("<%=c_typeinfo%>",$val("<%=nowlm(3)%>"));
	}
}
//-->
</SCRIPT>
	
<%
End Sub

'****************************************************
'名称:addinfos
'功能:添加信息
'****************************************************
Sub addinfos()
%>	
<table width="100%" cellspacing="1" cellpadding="0" class="info_tab">
	<FORM METHOD=POST ACTION="?action=save">
	<%
	For i=0 To UBound(nows)
		res "<TR><TD class=""zq"" width=""20%"">"&nows(i)&"</TD><TD>&nbsp;",0
		select Case i
		Case 0 : res "<INPUT TYPE=""text"" NAME="""&nowlm(i)&""" value="""&IdentityNO&""">",1
		Case 1 : res "<INPUT TYPE=""text"" NAME="""&nowlm(i)&""">",1
		Case 2 : res "<SELECT NAME="""&nowlm(i)&""">"&my_sqlsel(c_type,"cert_name")&"</SELECT>",1
		Case 3 : res "<SELECT NAME="""&nowlm(i)&"""><option value=0>请选择...</option></SELECT> <span id="""&nowlm(i)&"_txt""></span>",1
		Case 4 : res "<input type=""text"" name="""&nowlm(i)&""" readonly style=""width:120px;"" onclick=""setday(this)"" value="""&Date()&""">",1
		End select
		res "</TD></TR>",1
	Next
	%>
	<TR>
	<TD>&nbsp;</TD>
	<TD>&nbsp;<INPUT TYPE="submit" value="确认添加"></TD>
</TR>
</FORM>
</TABLE>
<SCRIPT LANGUAGE = JavaScript>
var s=["<%=nowlm(2)%>","<%=nowlm(3)%>"];
var opt0 = ["请选择...","请选择..."];
setup();
<%if c_type<>0 then res "change(1);",1%>
//-->
</SCRIPT>
<%
End Sub 

'****************************************************
'名称:editinfos
'功能:编辑信息
'****************************************************
Sub editinfos()
	sql=Sqlinfo("IdentityNO,c_no,c_type,c_typeinfo,c_time","Cert_info"," ID = "&id,"","","")
	rs_edit = connopen(sql)
	If isArray(rs_edit)=False Then errormsg "参数错误"
	%>
	<table width="100%" cellspacing="1" cellpadding="0" class="info_tab">
	<FORM METHOD=POST ACTION="?action=mod">
	<%For i=0 To UBound(nows)
		response.write "<TR><TD class=""zq"" width=""20%"">"&nows(i)&"</TD><TD>&nbsp;"
			If i=2 Then
			response.write "<SELECT NAME="""&nowlm(i)&""">"&my_sqlsel(rs_edit(i,0),"cert_name")&"</SELECT>"
		ElseIf i=3 Then
			response.write "<SELECT NAME="""&nowlm(i)&"""><option value=0>请选择...</option></SELECT> <span id="""&nowlm(i)&"_txt""></span>"
		ElseIf i=4 Then
			response.write "<input type=""text"" name="""&nowlm(i)&""" style=""width:120px;"" readonly onclick=""setday(this)"" value="""&rs_edit(i,0)&""">"
		else
			response.write "<INPUT TYPE=""text"" NAME="""&nowlm(i)&""" value="""&rs_edit(i,0)&""">"
		End If
		response.write "</TD></TR>"
	Next
	%>
	<TR><TD> </TD><TD>&nbsp;<INPUT TYPE="submit" value="确认修改"><INPUT TYPE="hidden" NAME="id" value="<%=id%>"></TD></TR>
	</FORM>
	</TABLE>
	<SCRIPT LANGUAGE = JavaScript>
var s=["<%=nowlm(2)%>","<%=nowlm(3)%>"];
var opt0 = ["请选择...","请选择..."];
setup();
<%if rs_edit(2,0)<>0 then res "change(1);",1%>
//-->
function checkdef(strtypes){
	if (strtypes=="<%=nowlm(3)%>"){
		setSel2("<%=rs_edit(3,0)%>",$val("<%=nowlm(3)%>"));
	}
}
//-->
</SCRIPT>
<%
End Sub 

'****************************************************
'名称:jstable
'功能:接收表单提交过来的值
'****************************************************
Sub jstable()
	c_time = che(request("c_time"))
	c_no = che(request("c_no"))
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
	rs("c_typeinfo") = c_typeinfo
End Sub

'****************************************************
'名称:cert_names
'功能:返回证书名称
'参数:cert_nos 证书类别的ID
'****************************************************
Function cert_names(nos)
	If Len(nos)<1 Then Exit Function
	sql=Sqlinfo("cert_name,cert_cont","Cert_type"," id="&nos,"","","")
	fun_get = connopen(sql)
	If isArray(fun_get) Then
		cert_names="<span tit="""&fun_get(1,0)&""">"&fun_get(0,0)&"</span>"
	Else
		cert_names="<span tit=""参数错误(可能原因:可能由于相关证书信息已被删除!)"">------</span>"
	End If 
End Function
'****************************************************
'名称:cert_names
'功能:返回证书名称
'参数:cert_nos 证书类别的ID
'****************************************************
Function cert_typeinfos(nos)
	If nos<>"" Then
	sql=Sqlinfo("typeinfo","cert_typeinfo"," id="&nos,"","","")
	fun_get = connopen(sql)
	If isArray(fun_get) Then
		cert_typeinfos=fun_get(0,0)
	Else
		cert_typeinfos="<span tit=""参数错误(可能原因:可能由于相关证书信息已被删除!)"">------</span>"
	End If 
	Else
		cert_typeinfos="--"
	End If 
End Function


'****************************************************
'名称:nowmenu
'功能:管理快捷菜单
'****************************************************
Sub nowmenu()
res "<h4><b>相关操作:</b>",1
res "<a href=""admin_Cert.asp?action=list&"&urlinfos&""">证书信息列表</a> [ <a href=""admin_Cert.asp?action=add&"&urlinfos&""">添加</a> ] | ",1
res "<a href=""admin_cert_type.asp?action=list"">证书名称列表</a> [ <a href=""admin_cert_type.asp?action=add"">添加</a> ] | ",1
res "<a href=""admin_cert_type_sm.asp?action=list"">证书类别列表</a> [ <a href=""admin_cert_type_sm.asp?action=add"">添加</a> ] ",1
res "</h4>",1
res "<div style=""height:3px;width:100%;background: #fff;""></div>",1
End Sub



'****************************************************
'名称:type_listinfos
'功能:列表
'****************************************************
Sub type_listinfos()
%>
<table width="100%" cellspacing="0" cellpadding="0" class="info_tab2">
	<tr align="center"> 
	<th width="5%">选</th>
	<th width="15%">证书名称</th>
	<th width="30%">证书说明</th>
	<th width="10%">操作</th>
	<th width=""></th>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -