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

📄 haoma.asp

📁 系统管理,大家可以看看,能给你不少的启发吧.
💻 ASP
字号:
<!--#include file="check.asp"-->
<%
'卖方
dim tuijian
If Request.QueryString("action")="tuijian" then
	Set mRs=Server.CreateObject("ADODB.RecordSet")
	Sql="Select * from shuju"
	If request("tuijian")="0" then
	mRs.open "update shuju Set tuijian='1' where id="&request.QueryString("id"),conn,1,3
Else
	mRs.open "update shuju Set tuijian='0' where id="&request.QueryString("id"),conn,1,3
	Set mRs=nothing
	End If
	Response.Write "<script>alert('修改成功');this.location.href='haoma.asp';</SCRIPT>"
End If
%>
<%
'删除
dim del
If Request.QueryString("action")="del" then
	Set mRs=Server.CreateObject("ADODB.RecordSet")
	Sql="Select * from shuju"
	If request("del")="0" then
	mRs.open "update shuju Set del='1' where id="&request.QueryString("id"),conn,1,3
Else
	mRs.open "update shuju Set del='0' where id="&request.QueryString("id"),conn,1,3
	Set mRs=nothing
	End If
	Response.Write "<script>alert('删除成功');this.location.href='haoma.asp';</SCRIPT>"
End If
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; chamRset=gb2312">
<title><% =Title %> - 列表</title>
<style type="text/css">
body,td,th {
	font-size: 12px;
	color: #666666;
}
.input {
	font-size: 12px;
	border: 1px solid #CCCCCC;
	background-color: #FFFFFF;
	width: 130px;
}
.style {
	font-size: 12px;
	color: #FF6600;
}
a:link {
	color: #666666;
	text-decoration: none;
}
a:visited {
	text-decoration: none;
	color: #666666;
}
a:hover {
	text-decoration: none;
	color: #FF6600;
	border-bottom-width: 1px;
	border-top-style: none;
	border-right-style: none;
	border-bottom-style: dashed;
	border-bottom-color: #FF6600;
}.line {
	border-top-style: none;
	border-right-style: none;
	border-bottom-style: dashed;
	border-left-style: none;
	border-bottom-color: #CCCCCC;
	border-bottom-width: 1px;
	font-size: 12px;
}
.button {
	border: 1px solid #CCCCCC;
	font-size: 12px;
	background-color: #FFFFFF;
}
</style>
</head>
<body>
<table border="0" align="center" cellpadding="2" cellspacing="1" width="700" bgcolor="#CCCCCC">
	<tr>
		<td valign="top" bgcolor="#FFFFFF">
			<table border="0" cellpadding="0" cellspacing="0" width="100%">
				<tr>
					<td height="25" bgcolor="f3f3f3">
					<p align="center">&nbsp;·&nbsp;报价单列表&nbsp;·
					  <%
Set mRs=Server.CreateObject("adodb.recordSet")
Sql="Select * from shuju where del = 0 order by id desc"
	mRs.open Sql,conn,1,1
If mRs.bof and mRs.eof then
	Response.Write "没有任何记录"
Else
	Response.Write "目前有<span class=style>"&cstr(mRs.recordcount)&"</span>条信息"
	mRs.PageSize =20'每页记录条数
	iCount=mRs.RecordCount '记录总数
	iPageSize=mRs.PageSize
	maxpage=mRs.PageCount
	page=request("page")
	If Not IsNumeric(page) or page="" then
	page=1
Else
	page=cint(page)
End If
	If page<1 then
	page=1
ElseIf	page>maxpage then
	page=maxpage
End If
	mRs.AbsolutePage=Page
If page=maxpage then
	x=iCount-(maxpage-1)*iPageSize
Else
	x=iPageSize
End If
%></td>
			</table>
	</tr>
	<tr>
		<td valign="top" bgcolor="#FFFFFF">
			<table border="0" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC" width="100%">
				<tr bgcolor="f3f3f3" align="center">
					
          <td width="14%">日 期</td>
					
          <td width="14%">客户名</td>
					
          <td width="9%" bgcolor="f3f3f3" align="center">数量</td>
					
          <td width="11%" bgcolor="f3f3f3" align="center">报价人</td>
					
          <td width="14%" bgcolor="f3f3f3" align="center">金额</td>
					
          <td width="15%" bgcolor="f3f3f3" align="center">制单人</td>
					
          <td width="9%">查看</td>
					<td width="14%">操作</td>
				</tr>
			</table>
<%
i=1
for j=1 to mRs.pagesize
%>
			<table border="0" cellpadding="0" cellspacing="0" width="697" class="line">
				<tr onMouseOver="javascript:this.bgColor='#F7F7F7';" onMouseOut="javascript:this.bgColor='#FFFFFF';">
					<td width="14%" align="center"><%=mRs("date")%></td>
					<td width="14%" align="center"><%=mRs("kfname")%></td>
				  <td width="9%" align="center"><%=mRs("zshu")%></td>
				  <td width="11%" align="center"><%=mRs("bjname")%></td>
				  <td width="14%" align="center"><%=mRs("zjiner")%></td>
					<td width="15%" align="center"><%=mRs("zhidan")%></td>
				  <td width="9%" align="center"><a href="../qq.asp?id=<%=mRs("id")%>" target="_blank">查看</a></td>
					<td width="14%" align="center"><a href="ok.asp">修改</a>
					<a href="ok.asp">删除</a></td>
				</tr>
			</table>
			</form>
<%
i=i+1
mRs.movenext
If mRs.eof then exit for
next
%>
<%
call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>")
End If
mRs.close
Set mRs=nothing
Sub PageControl(iCount,pagecount,page,table_style,font_style)
'生成上一页下一页链接
Dim query, a, x, temp
action = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME")
query = Split(Request.ServerVariables("QUERY_STRING"), "&")
For Each x In query
a = Split(x, "=")
If StrComp(a(0), "page", vbTextCompare) <> 0 Then
temp = temp & a(0) & "=" & a(1) & "&"
End If
Next
Response.Write("<table " & Table_style & ">" & vbCrLf )
Response.Write("<form method=get onsubmit=""document.location = '" & action & "?" & temp & "Page='+ this.page.value;return false;""><tr>" & vbCrLf )
Response.Write("<td align=right>" & vbCrLf )
Response.Write(font_style & vbCrLf )
If page<=1 then
Response.Write ("首页 " & vbCrLf)
Response.Write ("上一页 " & vbCrLf)
Else
Response.Write("<a href=" & action & "?" & temp & "Page=1>首页</A> " & vbCrLf)
Response.Write("<a href=" & action & "?" & temp & "Page=" & (Page-1) & ">上一页</a> " & vbCrLf)
End If
If page>=pagecount then
Response.Write ("下一页 " & vbCrLf)
Response.Write ("尾页 " & vbCrLf)
Else
Response.Write("<a href=" & action & "?" & temp & "Page=" & (Page+1) & ">下一页</a> " & vbCrLf)
Response.Write("<a href=" & action & "?" & temp & "Page=" & pagecount & ">尾页</a> " & vbCrLf)
End If
Response.Write(" 页次:" & page & "/" & pageCount & "页" &  vbCrLf)
Response.Write(" 共有" & iCount & "条记录" &  vbCrLf)
Response.Write(" 转到" & "<input tyep=text NAME=page class=diyColor3 SIZE=1 Maxlength=5 VALUE=" & page & ">" & "页"  & vbCrLf & "<INPUT type=submit style=""font-size: 9pt"" value=GO class=diyColor3>")
Response.Write("</tr></form>" & vbCrLf )
Response.Write("</table>" & vbCrLf )
End Sub
%>
	</tr>
</table>
<table border="0" cellpadding="0" style="border-collapse: collapse" width="100%">
	<tr>
		<td align="center"><% =Copyright %></td>
	</tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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