?? admin_cert_inc.asp
字號:
<%
'****************************************************
'名稱: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%">發(fā)證時間</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> <%=Rs(1)%></td>
<td> <%=Rs(2)%></td>
<td> <%=cert_names(Rs(3))%>(<%=cert_typeinfos(Rs(4))%>)</td>
<td> <%=Rs(5)%></td>
<td> <A HREF="?action=edit&id=<%=Rs(0)%>">修改</A></td>
<td> </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> <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> ",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> </TD>
<TD> <INPUT TYPE="submit" value="確認(rèn)添加"></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 "參數(shù)錯誤"
%>
<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> "
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> <INPUT TYPE="submit" value="確認(rèn)修改"><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
'功能:將值提交入庫
'參數(shù):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
'功能:返回證書名稱
'參數(shù):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=""參數(shù)錯誤(可能原因:可能由于相關(guān)證書信息已被刪除!)"">------</span>"
End If
End Function
'****************************************************
'名稱:cert_names
'功能:返回證書名稱
'參數(shù):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=""參數(shù)錯誤(可能原因:可能由于相關(guān)證書信息已被刪除!)"">------</span>"
End If
Else
cert_typeinfos="--"
End If
End Function
'****************************************************
'名稱:nowmenu
'功能:管理快捷菜單
'****************************************************
Sub nowmenu()
res "<h4><b>相關(guān)操作:</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>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -