index.asp

来自「实现一个用JSP、Servlet技术实现的小型物流网站系统。实现功能如下:管理员」· ASP 代码 · 共 586 行 · 第 1/2 页

ASP
586
字号
<!--#include file="../prohead.asp"-->
  <!--#include file="../checkrole.asp"-->
<%
     call checkuser("sw")
 %>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<TABLE width=778 border=0 align="center" cellPadding=0 cellSpacing=0>
  <TBODY>
  <TR>
    <TD 
    style="BACKGROUND-POSITION: right 50%; BACKGROUND-IMAGE: url(../images/bg1.gif); BACKGROUND-REPEAT: repeat-y; BACKGROUND-COLOR: #ffffff" 
    vAlign=top align=middle><BR>
      <TABLE cellSpacing=0 cellPadding=0 width=100% border=0>
        <TBODY>
        <TR>
              <TD width="19%"><IMG height=32 src="../images/bizer_manage.gif" 
            border=0></TD>
              <TD width="81%" background="../images/info_bg.gif">&nbsp;</TD>
        </TR>
	    </TBODY></TABLE>
<a name="bizre"></a>
<%
gsid=session("id")
 sql="select * from Yixiang_bizre where gsid="&gsid&" order by id desc"
 set rs=server.createobject("adodb.recordset") 
rs.open sql,conn,1,1 
  msg_per_page=10  
rs.pagesize=msg_per_page  

if not (rs.eof and rs.bof) then
	totalrec=RS.RecordCount'总记录条数
	if rs.recordcount mod msg_per_page=0 then 
		n=rs.recordcount\msg_per_page 
	else
		n=rs.recordcount\msg_per_page+1                        
	end if                                                                
	currentpage=request("page") 
	If currentpage <> "" then
	if not isnumeric(currentpage) then
	currentpage=1
	else
	currentpage =  cint(currentpage)
	end if
		
		if currentpage < 1 then  
			currentpage = 1
		end if  
		if err.number <> 0 then 
			err.clear
			currentpage=1
		end if
	else
		currentpage=1
	End if                                                                
	if currentpage*msg_per_page > totalrec and not((currentpage-1)*msg_per_page < totalrec)then 
		currentPage=1
	end if
	rs.absolutepage=currentpage 
	rowcount=rs.pagesize 
end if
%>
<TABLE width="100%" border=0 cellPadding=3 cellSpacing=1>
  <TBODY>
    <TR> 
      <TD height=40>
<%
sql1="select count(id) from Yixiang_bizre where gsid="&gsid&""
set totle=conn.execute(sql1)
totle4=totle(0)

sql2="select count(id) from Yixiang_bizre where gsid="&gsid&" and sh=1"
set totle2=conn.execute(sql2)
totle5=totle2(0)
response.write"<b>您总共发布了"
response.write"<font color='#ff0000'> "&totle4&"</font> 张证书,"
response.write"已审核<font color='#ff0000'> "&totle5&"</font> 张,"
response.write"尚未通过审核<font color='#ff0000'> "&(totle4-totle5)&"</font> 张。"

totle.close
set totle=nothing
totle2.close 
set totle2=nothing
%></td><td><span style="font-weight: bold; font-size: 14px;"><img src="../images/classpic.gif" width="6" height="12" align="absmiddle"> <a href="add.asp"><font color='#ff0000'>发布证书</font></a></span></td>
      </TR>
</TBODY>
</TABLE>
<%if rs.eof then
response.write"<font class=L color=silver>您目前还没有发布任何的证书!<br><br></font>"
else%>	
         <br> <TABLE width="100%" border="1" cellpadding="4" cellspacing="0" bordercolor="#111111" bordercolorlight="#D7EBFF" bordercolordark="#D7EBFF" 退定文件夹中。\	???毎??style="border-collapse: collapse">
            <TR height=25 bgcolor="#e8f4ff"> 
              <TD align="center"><font color="#CC3300"><b>状态</b></font></TD>
              <TD align="center" bgcolor="#e8f4ff"><font color="#CC3300"><b>证书名称</b></font></TD>
              <TD align="center"><font color="#CC3300"><b>证书类型</b></font></TD>
              <TD align="center"><font color="#CC3300"><b>发布时间</b></font></TD>
              <TD colspan="3" align="center"><font color="#CC3300"><b>操作</b></font></TD>
            </TR>
            <%do while not rs.eof and rowcount > 0%>
            <TR height="20" bgcolor="#ffffff"> 
              <TD width="54" align="center"> <% if rs("sh")=1 then %> <font color="#666666">已审</font> <%else%> <font color="#FF0000">待审</font> <%end if%> </td>
              <TD width="310"><a title="<%=rs("name")%>" href="template.asp?id=<%=rs("id")%>" target="_blank"><%=rs("name")%></a></td>
              <TD width="132" align="center"><%
sqltype="select * from Yixiang_bizre_class where id="&rs("typeid")&""
set rstype=conn.execute(sqltype) 
response.write""&rstype("type")&""
%></td>
              <TD width="130" align="center"><%=FormatDate(rs("dateandtime"),1)%></td>
              <TD width="43" align="center"> <a href="edit.asp?id=<%=rs("id")%>">修改</a></td>
			  <script language="javascript">
			  function isok()
			  {
			  var i=confirm("你确定要删除吗?");
			  if(i)
			  {
			  return true;
			  }
			  else
			  {
			  return false;
			  }
			  }
			  
			  
			  </script>
              <TD width="47" align="center"><a href="del.asp?id=<%=rs("id")%>" onClick="return isok();">删除</a></td>
            </TR>
<%
rowcount=rowcount-1
rs.movenext
loop
%>
          </TABLE>
<TABLE width="100%" border="1" cellpadding="4" cellspacing="0" bordercolor="#111111" bordercolorlight="#D7EBFF" bordercolordark="#D7EBFF" style="border-collapse: collapse">
<TR height=25 bgcolor="#e8f4ff"> <td bgcolor="#e8f4ff" align="center"><%call listPages()%></td>
</tr></table>
<BR><BR>

<%


sub listPages() 
   if not (rs.eof and rs.bof) then
	gopage=currentpage
	totalpage=n
	blockPage=Int((gopage-1)/10)*10+1
	if blockPage = 1 Then
		Response.Write "<span disabled>【←前10页</span>&nbsp;&nbsp;"
	Else
		Response.Write("<span disabled>【</span><a href=edit.asp?page="&blockPage-10&">←前10页</a>&nbsp;&nbsp;")
	End If
   i=1
   Do Until i > 10 or blockPage > n
    If blockPage=int(gopage) Then
		Response.Write("<font color=#FF0000>[<b>"&blockPage&"</b>]</font>")
	Else
		Response.Write("<a href=edit.asp?page="&blockPage&">["&blockPage&"]</a>")
    End If
    blockPage=blockPage+1
    i = i + 1
    Loop
	if blockPage > totalpage Then
		Response.Write "&nbsp;&nbsp;<span disabled>后10页→】"
	Else
		Response.Write("&nbsp;&nbsp;<a href=edit.asp?page="&blockPage&">后10页→</a><span disabled>】")
	End If
		Response.Write("&nbsp;&nbsp;共"&n&"页 每页"&msg_per_page&"条记录 共"&totalrec&"条记录")
end if
end sub
%>
<%end if%>
            <TABLE cellSpacing=0 cellPadding=0 width=100% border=0>
              <TBODY>
                <TR>
                  <TD width=1 bgColor=#8abaff><IMG height=1 
            src="../bizer/images/shim.gif" width=1></TD>
                  <TD align=middle><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td height="2" bgcolor="F2D23D"><IMG src="/images/shim.gif" width="1" height="2"></td>
                </tr>
                <tr>
                  <td height="28" bgcolor="FFFDE1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>商务指数</strong>                    <span class="Avn"><font size="4"><font color=red><%
sqltrust="select trust_score from wygkcn_corporation where id="&session("id")&""
set rstrust=conn.execute(sqltrust) 
response.write""&rstrust("trust_score")&""
%></font></font></span> 分&nbsp;
                   </td>
                </tr>
              </table>
              <table width="100%"  border="0" cellpadding="8" cellspacing="1" bgcolor="#D7D7D7">
                <tr bgcolor="#FFFFFF">
                  <td width="18%" bgcolor="#F6F6F6"><a href="#"> 身份认证</a></td>
                  <td width="9%" align="center" bgcolor="#F6F6F6"><strong>10</strong>分</td>
                  <td width="73%"><%
sql="select begindate from wygkcn_corporation where id="&session("id")&""
set rs=conn.execute(sql) 
response.write""&FormatDate(rs("begindate"),1)&""
%>                    通过认证 </td>
                </tr>
                <tr>
                  <td bgcolor="#F6F6F6"><a href="#">经验值</a></td>
				 <td align="center" bgcolor="#F6F6F6">
				  <% ' 使用年限:
       set rsc=server.CreateObject("adodb.recordset")
	   sqlc="select  BeginDate from wygkcn_corporation where id="&session("id")
	   rsc.open sqlc,conn,1,1
	   if rsc.eof then
         nian=0
		 jingnian=1
	   end if
	   if not rsc.eof then
	   jingnian=cint(datediff("d",rsc("BeginDate"),date())/365)+1
	   
       if datediff("d",rsc("BeginDate"),date())>365 then '从第 2 年开始,加 20 分 / 年
         nian=cint(datediff("d",rsc("BeginDate"),date())/365)*20
       else
         nian=0
       end if
	   set rsc=nothing
	   end if
	  %>
				  
			<strong><%=nian%></strong>分</td>
				  
				  
                  <td bgcolor="#FFFFFF"> 使用会员服务第 <font color="red"><%=jingnian%></font> 年&nbsp; </td>
                </tr>
                <tr>
                  <td bgcolor="#F6F6F6"><a href="#bizre">证书及荣誉</a></td>
                  <td align="center" bgcolor="#F6F6F6"><strong><%
				  
				  
				  
				   '对税务登记证或产品类证书或经营许可证类证书或其他证书:
	  
	  set rszz=server.CreateObject("adodb.recordset")
	  sqlzz="select * from yixiang_bizre where sh=1 and typeid=3 and  gsid="&session("id")
	  rszz.open sqlzz,conn,1,1
	  if rszz.eof then
	  shuiwu=0
	  end if
	  if not rszz.eof then
	  shuiwu=5
	  set rszz=nothing
	  end if
	  '^^^^^^^^
	  
	  '经营许可证类证书
	 set rsz2=server.CreateObject("adodb.recordset")
	 sqlz2="select count(*) as ztotal from  yixiang_bizre where sh=1 and typeid =1 and gsid="&session("id")
	 rsz2.open sqlz2,conn,1,1
	 if rsz2.eof then
     jinying=0
	 end if
	 if not rsz2.eof then
	   jinying=rsz2("ztotal")*2
	   if jinying>10 then
		jinying=10
	   end if
	 set rsz2=nothing
	 end if
	 
	  '^^^^^^^^
	  
	  
	  '产品类证书
	  set rsz3=server.CreateObject("adodb.recordset")
	  sqlz3="select count(*) as ztotal from  yixiang_bizre where sh=1 and typeid =2 and gsid="&session("id")
	  rsz3.open sqlz3,conn,1,1
	  if rsz3.eof then
       chanpin=0
	  end if
	  if not rsz3.eof then
	   chanpin=rsz3("ztotal")*2
	   
	   if chanpin>10 then
		chanpin=10
	   end if
	  set rsz3=nothing
	  end if
	  '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	  
	  
	  '其他证书
	 set rsz4=server.CreateObject("adodb.recordset")
	 sqlz4="select count(*) as ztotal from  yixiang_bizre where sh=1 and typeid =4 and gsid="&session("id")
	 rsz4.open sqlz4,conn,1,1
	 if rsz4.eof then
      qita=0
	 end if
	 if not rsz4.eof then
	   qita=rsz4("ztotal")*2
	   if qita>10 then
		qita=10

⌨️ 快捷键说明

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