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

📄 companylist.asp

📁 网络办公系统源码
💻 ASP
字号:
<!--#include file="../config.asp"-->
<!--#include file="checklogin.asp"-->
<!--#include file="../inc/md5/ss_md5.asp"-->
<!--#include file="../inc/navigate.asp"-->
<%
dim sPageNavigate  '分页表格 
dim iRecordCount,iMaxPageCount,iPageCount,iCurrentPageIndex,i,sTMP  '分页
iMaxPageCount=20 '一页多少行记录
Submit=trim(request.Form("Submit"))
blogid=replace(trim(request.Form("blogid"))," ","")
companyname=replace(trim(request.Form("companyname"))," ","")
domain=replace(trim(request.Form("domain"))," ","")
d=request.Form("d")
allover=request.Form("allover")
if Submit="删除信息" then
if  ChkAdmin("sys_delcompany")=False then
   call message("您没有删除公司信息的权限","back")
   call endexit()
end if
	if blogid="" then
		call message("请至少选择一项删除","back")
		call EndExit()
	end if
	bid=split(blogid,",")
	for i=0 to ubound(bid)
		delsql="delete from oa_company where id="&bid(i)&""
		conn.execute(delsql)
	next
	call message("删除成功","companylist.asp")
	call EndExit()
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>公司大记事</title>
<link href="../oaadmin/img/css1.css" type=text/css rel=stylesheet>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.style3 {color: #FFFFFF; font-weight: bold; }
.style4 {color: #CC0000}
-->
</style>
</head>
<body>
<form name="form1" method="post" action="companylist.asp">
<table width="99%"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#F2F2F2" class="tabel1">
  <tr align="right">
    <td height="25" colspan="8" bgcolor="#CC0000"><input name="Submit" type="button" class="bon" id="Submit" value="添加公司记录" onClick="window.location.href='addcompany.asp'">
      <input name="Submit2" type="button" class="bon" id="Submit3" value="分配管理帐号" onClick="window.location.href='add_companyuser.asp'">
      <input name="Submit" type="submit" class="bon" id="Submit" value="删除信息"></td>
    </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" colspan="8" align="left" bgcolor="#F2F2F2">公司名称:
      <input name="companyname" type="text" class="tabel1" id="companyname"> 
      域名:
      <input name="domain" type="text" class="tabel1" id="domain">
      到期
      <select name="d">
	  <option value="">选择到期天数</option>
        <option value="3">3天内到期</option>
        <option value="5">5天内到期</option>
        <option value="7">7天内到期</option>
        <option value="10">10天内到期</option>
		<option value="30">30天内到期</option>
      </select>
      全部到期
      <input type="radio" name="allover" value="1">
      <input name="Submit3" type="submit" class="tabel1" value="开始查询">
      <input name="Submit4" type="reset" class="tabel1" value="重置">
      </td>
    </tr>
  <tr bgcolor="#CC6633">
    <td width="8%" height="25" align="center"><input type=checkbox onclick=sel('blogid') class="tabel1"></td>
    <td width="21%" height="25" align="center"><span class="style3">公司名称</span></td>
    <td width="11%" align="center"><span class="style3">联系人</span></td>
    <td width="11%" align="center"><span class="style3">联系电话</span></td>
    <td width="13%" align="center"><span class="style3">域名网址</span></td>
    <td align="center"><span class="style3"> 注册日期</span></td>
    <td align="center"> <span class="style3"><strong>到期日期</strong></span></td>
    <td align="center"><span class="style3">短信提示</span></td>
  </tr>
    <tr >
    <td height="5" colspan="8" bgcolor="#666666"></td>
    </tr>
  <%
				Sql="select id,company,url,SitePhoneConfig,star_time,end_time,cname,tel, DATEDIFF(day,'"&date()&"',end_time) as dd from oa_company where 1=1"
		 		if companyname<> "" then Sql=Sql& " and company like '%"&companyname&"%'"
				if domain<> "" then Sql=Sql& " and url like '%"&domain&"%'"
				if d<>"" then Sql=Sql& " and DATEDIFF(day,'"&date()&"',end_time)<="&d&""
				if allover<>"" then Sql=Sql& " and DATEDIFF(day,'"&date()&"',end_time)<=0"
				Sql=Sql & " order by dd asc"
				'response.Write(Sql)
				Call GetCurrentPageIndex()  '取得当前页码
				set my_rs=server.CreateObject("adodb.recordset")
				my_rs.open Sql,conn,1,3
				my_rs.PageSize=iMaxPageCount
				my_rs.CacheSize =iMaxPageCount
				if my_rs.recordCount <>   0   then   my_rs.Absolutepage=iCurrentPageIndex
				iRecordCount=my_rs.RecordCount  '所有查询出来的记录数
				iPageCount=my_rs.PageCount  '最终多少页
				if iCurrentPageIndex>iPageCount then iCurrentPageIndex=iPageCount  '控制当前页不得超出范围
				sPageNavigate=GetNavigate("companylist.asp?companyname="&companyname&"&domain="&domain&"&d="&d&"&allover="&allover&"",iRecordCount,iMaxPageCount,iCurrentPageIndex,true,true,"项")  '取得分页表格
				if Not my_rs.Eof then
				For i = 1 to iMaxPageCount '利用for next 循环依次读出当前页的记录 
			  if my_rs.EOF then  Exit For
					bgColor="#F8F8F8"
				if i mod 2=0 then bgColor="#DFEFFF"
	%>
  <tr bgcolor="<%=bgColor%>">
    <td height="25" align="center"><input type="checkbox" name="blogid" value="<%=my_rs(0)%>">
      <a href="addcompany.asp?id=<%=my_rs(0)%>&act=edits">修改</a></td>
    <td height="25" align="center"><a href="userlist.asp?id=<%=my_rs(0)%>"><%=my_rs(1)%></a></td>
    <td height="25" align="center"><%=my_rs(6)%></td>
    <td height="25" align="center"><%=my_rs(7)%></td>
    <td height="25" align="center"><%=my_rs(2)%></td>
    <td width="11%" align="center"><%=my_rs(4)%></td>
    <td width="18%" align="center"><%=my_rs(5)%><%if my_rs("dd")>0 then %>[还有<font color="#cc0000"><%=my_rs("dd")%></font>天到期]<%else%>[<span class="style4">已到期<%=my_rs("dd")%>天</span>]
      <%end if%></td>
    <td width="7%" align="center"><a href="send_sms.asp?mobile=<%=my_rs(7)%>">短信提示</a></td>
  </tr>
              <%
						my_rs.MoveNext()
				       Next
                     End if
                  my_rs.close
                 set my_rs=nothing
				%>
</table>
<table width="99%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="20">&nbsp;</td>
  </tr>
  <tr>
    <td height="20"><%=sPageNavigate%></td>
  </tr>
</table>
</form>
</body>
</html>

⌨️ 快捷键说明

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