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

📄 managebuy.asp

📁 模块及功能: 1.汽车新闻 分类.查询.翻页 2.出售信息 搜索.评估.地区展示.发布.展示.固顶.刷新 3.求购信息 发布.展示.固顶.刷新 3.加盟商家管理 注册.登录.信
💻 ASP
字号:
<!--#include file=byshop_conn.asp-->
<!--#include file=webhead.asp-->
<!--#include file="cookie.asp" -->
<%
if selectm="" then
selectm=request.QueryString("selectm")
end if
selectid=request("selectid")
if selectid<>"" then
conn.execute "delete from 2car where user='"&replace(request.cookies("by2car")("user"),"'","")&"' and id in ("&selectid&")"
response.Redirect "managebuy.asp"
response.End
end if
'//刷新
newid=trim(request("newid"))
		if IsNumeric(request.QueryString("newid"))=False  then
		response.write"<SCRIPT language=JavaScript>alert('参数错误');"
		response.end	
		end if
if newid<>"" then
set rs=server.createobject("adodb.recordset") 
sql="select  adddate,guding,gddate from 2car where (by_tongguo=1 or by_tongguo=0) and user = '"&replace(request.cookies("by2car")("user"),"'","")&"' and id="&newid
rs.open sql,conn,1,3
if rs("guding")= 1 then
rs("gddate")=now()
else
rs("adddate")=now()
end if
rs.update
rs.close
end if
%>
<script language="JavaScript">
<!--
function checkform(form) {
  if (form.title.value == ""){
    alert("请输入信息标题!");
	form.title.focus();
	return false;
  }else if(form.content.value == ""){
    alert("请输入信息内容!"); 
	form.content.focus();
	return false;
  }else if(form.content.value.length > 510){
  	alert("信息内容不得超过200个中文字!");
	form.content.focus();	
	return false;		
  }else if(form.activedate.value == ""){
    alert("请选择信息有效期!"); 
	form.activedate.focus();
	return false;		
  }else if(form.name.value == ""){
    alert("请输入您的称呼!"); 
	form.name.focus();	
	return false;	
  }else if(form.tel.value == ""){
    alert("请输入您的联系电话!"); 
	form.tel.focus();	
	return false;	
  }else if(form.province.value == "0"){
    alert("请选择您所在的省!"); 
	form.province.focus();	
	return false;	
  }else if(form.city.value == "0"){
    alert("请选择您所在的市!"); 
	form.city.focus();	
	return false;										
  }else{
    return true;
  }
} 
// -->
</script>


<title>管理求购信息-<%=webname%></title>

<div align="center">
	<table border="0" width="779" id="table5" cellspacing="0" cellpadding="0">
		<tr>
			<td><span lang="zh-cn">您的位置</span>:<span lang="zh-cn"><a href="../default.asp">网站首页</a> </span>
			&gt;<span lang="zh-cn"> <a href="manage.asp">加盟商家管理</a> &gt; 管理求购信息</span></td>
		</tr>
	</table><table border="1" width="779" id="table1" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#BDDBE9">
		<tr>
			<td width=160 valign="top"><!--#include file="muma.asp"--></td><form name="formpub" onsubmit="return checkform(formpub)" method="post" action="">
			<td valign="top">
			
			<table id="table2" style="BORDER-COLLAPSE: collapse" borderColor="#111111"  cellSpacing="2" borderColorDark="#FFFFFF" cellPadding="2" width="98%" border="0" align=right>
				<tr>
					<td height="1"><%'开始分页
				Const MaxPerPage=20
   				dim totalPut   
   				dim CurrentPage
   				dim TotalPages
   				
    				if Not isempty(request("page")) then
      				currentPage=Cint(request("page"))
   				else
      				currentPage=1
   				end if 
				set rs=server.CreateObject ("adodb.recordset")
sql="select id,anclass,nclass,type,user,titlename,money,adddate,by_tongguo,guding,gddate from 2car where (by_tongguo=1 or by_tongguo=0) and user='"&replace(request.cookies("by2car")("user"),"'","")&"' order by adddate desc "
rs.open sql,conn,1,1

				
  				if rs.eof And rs.bof then
       				Response.Write " 数据库中无数据!"
   				else
	  				totalPut=rs.recordcount

      				if currentpage<1 then
          				currentpage=1
      				end if

      				if (currentpage-1)*MaxPerPage>totalput then
	   					if (totalPut mod MaxPerPage)=0 then
	     					currentpage= totalPut \ MaxPerPage
	   					else
	      					currentpage= totalPut \ MaxPerPage + 1
	   					end if
      				end if

       				if currentPage=1 then
            			showContent
            			showpage totalput,MaxPerPage,"managebuy.asp"
       				else
          				if (currentPage-1)*MaxPerPage<totalPut then
            				rs.move  (currentPage-1)*MaxPerPage
            				dim bookmark
            				bookmark=rs.bookmark
            				showContent
             				showpage totalput,MaxPerPage,"managebuy.asp"
        				else
	        				currentPage=1
           					showContent
           					showpage totalput,MaxPerPage,"managebuy.asp"
	      				end if
	   				end if
   				   	end if

   				sub showContent
	   			i=0%>

					<div align="center">
							<table class="tableBorder" width="100%" border="0" cellpadding="2" bgcolor="#FFFFFF">
<tr> 
<td colspan="6" align="center" bgcolor="#BDDBE9" >
							<p align="center" >管理出售信息</td>
</tr>
<tr> 
<td colspan="6" align="center" >
 </td>
</tr>
<tr bgcolor="#E8F1FF"> 
 <td class="forumRowHighlight"  width="42%" align="center" bgcolor="#F1F1F1"><a title="浏览求出售信息">信息标题</a></td>
 <td class="forumRowHighlight"  width="10%" align="center" bgcolor="#F1F1F1">
	求购介格</td>
 <td class="forumRowHighlight"  width="20%" align="center" bgcolor="#F1F1F1">
	发布日期</td>
 <td class="forumRowHighlight"  width="7%" align="center" bgcolor="#F1F1F1">
	审核</td>
 <td class="forumRowHighlight"  width="7%" align="center" bgcolor="#F1F1F1">操作</td>
 <td class="forumRowHighlight"  width="6%" align="center" bgcolor="#F1F1F1">选 择</td>
</tr>
<%do while not rs.eof%>
<tr bgcolor="#E8F1FF"> 
 <td class="forumRowHighlight"  align="left" bgcolor="#F1F1F1"><a href="modifybuy.asp?id=<%=rs("id")%>" title="点击修改信息"><%		
 response.write rs("titlename")
  %><%		
 response.write rs("titlename")
  %></a><% if rs("guding")=1 then
 response.write "-<font color=#FF0000>固顶</font>"
 end if%>
</a></td>
 <td class="forumRowHighlight"  align="center" bgcolor="#F1F1F1"><%
          if rs("money")<> "" then
          %><font color="#FF0000"><%
            response.write  rs("money")
            else
            %></font>
            <%
          response.write "面议"
          end if
          %> </td>
 <td class="forumRowHighlight"  align="center" bgcolor="#F1F1F1"><%=rs("adddate")%></td>
 <td class="forumRowHighlight"  align="center" bgcolor="#F1F1F1"><%if rs("by_tongguo")=1  then
								response.write "(通过)"
								end if
								if rs("by_tongguo")=0 then
								response.write "<font color=#FF0000>(等待)</font>"
								end if
								%> </td>
 <td class="forumRowHighlight"  align="center" bgcolor="#F1F1F1"><%
byshop_ab=rs("adddate")                
byshop_a=datediff("y",byshop_ab,now())
response.write byshop_a
response.write sxtime
if  byshop_a >=sxtime then
response.write "<a href=managebuy.asp?newid="&rs("id")&"><font color=FF0000>刷新</font></a>"
else
response.write "刷新"
end if
 %></td>
 <td class="forumRowHighlight"  align="center" bgcolor="#F1F1F1">
<input name="selectid" type="checkbox" id="selectid" value="<%=rs("id")%>" >
</td></tr>
          <%i=i+1
		if i>=MaxPerPage then Exit Do
		rs.movenext
		loop
		rs.close
		set rs=nothing%>
<tr bgcolor="#E8F1FF"> 
 <td class="forumRowHighlight"  height="30" colspan="6" align="right" bgcolor="#F1F1F1"><a href="#qx" onClick="qx()">全选</a> <a  href="#qbx" onClick="qbx()">全不选</a>
<input type="submit" name="Submit" class=go-wenbenkuang value="删 除" onClick="return test();"></td>
</tr>
</table></div>
					<%  
				End Sub   
  
				Function showpage(totalnumber,maxperpage,filename)  
  				Dim n
  				
				If totalnumber Mod maxperpage=0 Then  
					n= totalnumber \ maxperpage  
				Else
					n= totalnumber \ maxperpage+1  
				End If
				
				Response.Write "<form method=Post action="&filename&"?selectm="&selectm&"&selectkey="&selectkey&" >"  
				Response.Write "<p align='right' class='contents'> "  
				If CurrentPage<2 Then  
					Response.Write "<font class='contents'>上一页</font> "  
				Else  

					Response.Write "<a href="&filename&"?page="&CurrentPage-1&"&selectm="&selectm&"&selectkey="&selectkey&" class='contents'>上一页</a> "  
				End If
				
				If n-currentpage<1 Then  
				Else  
					Response.Write "<a href="&filename&"?page="&(CurrentPage+1)&"&selectm="&selectm&"&selectkey="&selectkey&" class='contents'>"  
					Response.Write "下一页</a>"  
				End If  
					Response.Write "<font class='contents'> </font><font class='contents'>"&CurrentPage&"</font><font class='contents'>/"&n&"页</font> "  
					Response.Write "<font class='contents'> 共有"&totalnumber&"条信息 <br><br>" 
				
				End Function  
			%>

					</td>
				</tr>
			
				</table>
					</td>
		</tr>
	</table></form>
</div>
<script>
function test()
{
  if(!confirm('确认删除吗?')) return false;
}
</script>
<script language=javascript>
function qx()
{
   var a = document.getElementsByTagName("input");

   for (var i=0; i<a.length; i++)
      if (a[i].type == "checkbox") a[i].checked = true;
   
}
</script>
<script language=javascript>
function qbx()
{
   var ab = document.getElementsByTagName("input");
   for (var i=0; i<ab.length; i++)
      if (ab[i].type == "checkbox") ab[i].checked = false;
   
}
</script>
<br>
<!--#include file=webfoot.asp--> 
 

⌨️ 快捷键说明

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