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

📄 company1.asp

📁 模块及功能: 1.汽车新闻 分类.查询.翻页 2.出售信息 搜索.评估.地区展示.发布.展示.固顶.刷新 3.求购信息 发布.展示.固顶.刷新 3.加盟商家管理 注册.登录.信
💻 ASP
字号:
<!--#include file=byshop_conn.asp-->
<link href="css/style.css" type="text/css" rel="stylesheet">

<%
userid=lcase(trim(request("userid")))  
					  if IsNumeric(request.QueryString("userid"))=False or request.QueryString("userid")="" then
		response.write"<SCRIPT language=JavaScript>alert('参数错误');"
		response.write"javascript:history.go(-1)</SCRIPT>"
		response.end	
		end if
%>
     <%set rst=server.createobject("adodb.recordset")
			rst.open "select * from dealer   where reglx=1 and id="&userid&"  ",conn,1,3
			if  rst.eof then
			response.write"<SCRIPT language=JavaScript>alert('参数错误');"
		response.write"javascript:history.go(-1)</SCRIPT>"
		response.end	
		end if
			rst("count")=rst("count")+1
			user=rst("user")
			rst.update
%>
<title><%=trim(rst("company"))%></title>
<%
if rst("pic") then
%>

<div align="center">
	<table border="0" width="779" id="table14" cellspacing="0" cellpadding="0">
		<tr>
			<td>
			<img border="0" src="<%=trim(rst("pic"))%>" height=250 width="779"></td>
		</tr>
	</table>
</div>
<%
else
%>
<!--#include file=webhead.asp-->
<%end if

set rs=server.createobject("adodb.recordset")
			rs.open "select * from 1car  where by_tongguo=1 and user ='"&user&"' order by adddate desc",conn,1,1

		if rs.recordcount=0 then 
		
		else
	  		rs.PageSize =20 '每页记录条数
			iCount=rs.RecordCount '记录总数
			iPageSize=rs.PageSize
    		maxpage=rs.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
    
    rs.AbsolutePage=Page

	if page=maxpage then
		x=iCount-(maxpage-1)*iPageSize
	else
		x=iPageSize
	end if
		%>
<div align="center">
	<table border="0" width="779" id="table14" cellspacing="0" cellpadding="0">
		<tr>
			<td><span lang="zh-cn">你的位置:<a href="default.asp">网站首页</a> &gt; <a href="company.asp">加盟商家</a> 
			&gt;<font color="#FF0000"> <%=trim(rst("company"))%></font></span></td>
		</tr>
	</table>
</div>
<div align="center">
<table cellspacing=0 cellpadding=0 border=1 width="779" bordercolor="#BDDBE9" style="border-collapse: collapse" id="table9">
       
        <tr> 
          <td valign=top width=""> 
          <table border="0" width="100%" id="table10">
			<tr>
				<td bgcolor="#BDDBE9">
				<p align="center"><span lang="zh-cn">信息标题</span></td>
			</tr>
			</table>
			</td>
          <td valign=top width=""> 
          <table border="0" width="100%" id="table11">
			<tr>
				<td bgcolor="#BDDBE9">
				<p align="center"><span lang="zh-cn">汽车售价</span></td>
			</tr>
			</table>
			</td>
          <td valign=top width=""> 
          <table border="0" width="100%" id="table12">
			<tr>
				<td bgcolor="#BDDBE9">
				<p align="center">交易地区</td>
			</tr>
			</table>
			</td>
          <td valign=top width=""> 
          <table border="0" width="100%" id="table13">
			<tr>
				<td bgcolor="#BDDBE9"><p align="center">发布日期</td>
			</tr>
			</table>
			</td>
        </tr>    <%
        a=0
					   do while not rs.eof 
					   %>
        <tr> 
          <td align="center" width="25%" height="22" > 
         
			 <a href="sellcar.asp?id=<%=rs("id")%>"><font color="#FF0000"><%=rs("titlename")%></font></a></td>
          <td width="25%" align="center" >
         
         <% if rs("sellmoney") <>"0" then
         response.write  "<font color='#FF0000'>"&rs("sellmoney")&"万元</font>"
         else
         response.write "面议"
         end if
         
         %></td>
          <td align="center" width="25%" ><%
                  set rss=server.createobject("adodb.recordset")
sqls="select * from province where shengNo="&int(rs("province"))
rss.open sqls,conn,1,1
if rss.eof then

end if
if rs("province") =0 then
response.write "全国各地"
end if
               response.write  rss("shengname")
               shengid=rss("id")
                rss.close
                set rss=nothing
                %>
                <%
                  set rss=server.createobject("adodb.recordset")
sqls="select * from city where Shengid="&shengid&" and  shino="&int(rs("city"))
rss.open sqls,conn,1,1
if rss.eof then

end if
               response.write  rss("shiname")
                rss.close
                set rss=nothing
                %>
</td>
          <td align="center" width="25%"><%=rs("adddate")%></td>
        </tr>
        <%
        rs.movenext
        a=a+1
   
  if a>=iPageSize then exit do

  loop

rs.close
			set rs=nothing%>
        <tr> 
          <td valign=top height="1" colspan="4"><%	call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>")

	end if
		rs.close
		set rs=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 SIZE=1 Maxlength=5 class=wenbenkuang  VALUE=" & page & ">" & "页"  & vbCrLf & "<INPUT type=submit style=""font-size: 9pt"" value=GO class=go-wenbenkuang>")
    Response.Write("</TD>" & vbCrLf )                
    Response.Write("</TR></form>" & vbCrLf )        
    Response.Write("</table>" & vbCrLf )        
End Sub
%></td>
        </tr>
        
			</table>
</div><br>
<div align="center">
	<table border="1" width="779" id="table15" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#BDDBE9">
		<tr>
			<td colspan="2">
			<table border="0" width="100%" id="table16" cellpadding="3" cellspacing="1">
				<tr>
					<td bgcolor="#BDDBE9"><span lang="zh-cn">联系方式</span></td>
				</tr>
			</table>
			</td>
		</tr>
		<tr>
			<td width=50% height=22><span lang="zh-cn">联 系 人</span>:<%=trim(rst("name"))%></td>
			<td>联系地址:<%=trim(rst("address"))%></td>
		</tr>
		<tr>
			<td  height=22 bgcolor="#F0F9FE">电话号码:<%=trim(rst("tel"))%></td>
			<td bgcolor="#F0F9FE">公司名称:<%=rst("company")%> </td>
		</tr>
		<tr>
			<td  height=22>手机号码:<%=trim(rst("mobile"))%></td>
			<td>电子邮件:<%=trim(rst("email"))%></td>
		</tr>
		<tr>
			<td  height=22 bgcolor="#F0F9FE">传真号码:<%=trim(rst("fax"))%></td>
			<td bgcolor="#F0F9FE">联系 Q Q:<%=trim(rst("kefuQQ"))%></td>
		</tr>
		<tr>
			<td  height=22>公司网址:<%=trim(rst("web"))%></td>
			<td>主要业务:<%=trim(rst("jyfw"))%></td>
		</tr>
		<tr>
			<td  height=22 bgcolor="#F0F9FE" colspan="2">公司简介:<%=trim(rst("message"))%> </td>
		</tr>
		</table>
</div>

<%
rst.close
set rst=nothing%> 
  

⌨️ 快捷键说明

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