📄 index.asp
字号:
<%
dim rsu,userID,username,search,n
dim company,style,logo,business,contact,mobile,email,detail,classID,areaID,capital,regdate,istrust,trustTime
username=trim(replace(request("u"),"'",""))
if cint(anysale.asGroups(12))=0 then call anysale.asNote("权限出错","你所在的用户组没有查看会员信息的权限!") end if
if username="" then
call anysale.asNote("用户不存在","你查看的用户不存在,请返回!")
end if
search="u="&username
set rsu=conn.execute("select * from as_user where islock=0 and username='"&username&"'")
if not(rsu.bof and rsu.eof) then
userID=clng(rsu("userID"))
company=rsu("title")
style=split(rsu("myStyle"),"|||")
logo=split(rsu("logo"),"|||")
business=split(rsu("business"),"|||")
contact=split(rsu("contact"),"|||")
email=rsu("email")
mobile=rsu("mobile")
detail=rsu("detail")
classID=rsu("classID")
areaID=rsu("areaID")
capital=rsu("capital")
regdate=rsu("regdate")
istrust=rsu("istrust")
trustTime=rsu("trustStartTime")
else
call anysale.asNote("用户不存在","你查看的用户不存在或被锁定,请返回!")
end if
rsu.close
set rsu=nothing
sub main()
call header("home",company,company&","&business(6),anysale.cutStr(anysale.clearHTML(detail),100))
conn.execute("update as_user set views=views+1 where username='"&username&"'")
%>
<div class="bodyer">
<!--content-->
<%call lefter()%>
<div style="float:left;width:702px;">
<!--right-->
<div class="tab" style="width:700px;">
<div class="tabList">
<div><ul class="tabH"><li class="tabL"> </li><li class="tabM">最新产品</li><li class="tabR"> </li></ul></div>
</div>
<div class="imglist">
<%
dim rsp
n=0
set rsp=conn.execute("select top 10 productsID,title,price,unit,preview from as_products where islock=0 and userID="&userID&" order by productsID desc")
if not(rsp.bof and rsp.eof) then
do while not rsp.eof
%>
<ul>
<li><a href="companydetail.asp?u=<%=username%>&action=productsdetail&id=<%=rsp("productsID")%>"><%if rsp("preview")="" then%><img src="images/noimage.gif" style="padding:25px;" class="border whitebg" alt="<%=rsp("title")%>" /><%else%><img src="<%=rsp("preview")%>" alt="<%=rsp("title")%>" width="100" height="100" class="border" /><%end if%></a></li>
<li><a href="companydetail.asp?u=<%=username%>&action=productsdetail&id=<%=rsp("productsID")%>"><%=rsp("title")%></a></li>
<%if rsp("price")>0 then%><li><span class="red"><%=rsp("price")%></span> 元</li><%end if%>
<li>
<input type="button" name="askPrice" class="button" value="点击询价" onclick="getPage('windows.asp?action=askPrice&username=<%=username%>&title=<%=server.urlEncode(rsp("title"))%>&unit=<%=server.urlEncode(rsp("unit"))%>');" onmouseover="this.className='buttonH'" onmouseout="this.className='button'" />
</li>
</ul>
<%
n=n+1
if n mod 5=0 then response.write"<div class=""line5 clear""> </div>" end if
rsp.movenext
loop
else
response.write"<div style=""padding:10px 20px;"">暂无</div>"
end if
rsp.close : set rsp=nothing
%>
</div>
</div>
<div class="line5"> </div>
<div class="tab" style="width:700px;">
<div class="tabList">
<div><ul class="tabH"><li class="tabL"> </li><li class="tabM">最新供求</li><li class="tabR"> </li></ul></div>
</div>
<div class="imglist">
<%
dim rsb
n=0
set rsb=conn.execute("select top 10 businessID,title,price,unit,preview from as_business where islock=0 and userID="&userID&" order by businessID desc")
if not(rsb.bof and rsb.eof) then
do while not rsb.eof
%>
<ul>
<li><a href="companydetail.asp?u=<%=username%>&action=businessdetail&id=<%=rsb("businessID")%>"><%if rsb("preview")="" then%><img src="images/noimage.gif" style="padding:25px;" class="border whitebg" alt="<%=rsb("title")%>" /><%else%><img src="<%=rsb("preview")%>" alt="<%=rsb("title")%>" width="100" height="100" class="border" /><%end if%></a></li>
<li><a href="companydetail.asp?u=<%=username%>&action=businessdetail&id=<%=rsb("businessID")%>"><%=rsb("title")%></a></li>
<%if rsb("price")>0 then%><li><span class="red"><%=rsb("price")%></span> 元</li><%end if%>
<li>
<input type="button" name="askPrice" class="button" value="点击询价" onclick="getPage('windows.asp?action=askPrice&username=<%=username%>&title=<%=server.urlEncode(rsb("title"))%>&unit=<%=server.urlEncode(rsb("unit"))%>');" onmouseover="this.className='buttonH'" onmouseout="this.className='button'" />
</li>
</ul>
<%
n=n+1
if n mod 5=0 then response.write"<div class=""line5 clear""> </div>" end if
rsb.movenext
loop
else
response.write"<div style=""padding:10px 20px;"">暂无</div>"
end if
rsb.close : set rsb=nothing
%>
</div>
</div>
<!--right.end-->
</div>
<!--content.end-->
</div>
<%
end sub
'about
sub about()
dim intro
intro=detail
call header("about","公司介绍 - "&company,company&","&business(6),anysale.cutStr(anysale.clearHTML(intro),100))
%>
<div class="bodyer">
<!--content-->
<%call lefter()%>
<div style="float:left;width:702px;">
<!--right-->
<div class="tab" style="width:700px;">
<div class="tabList">
<div><ul class="tabH"><li class="tabL"> </li><li class="tabM">公司介绍</li><li class="tabR"> </li></ul></div>
</div>
<div style="padding:20px;" class="detail"><%=anysale.chkBadWords(detail)%></div>
</div>
<div class="line5"> </div>
<div class="tab" style="width:700px;">
<div class="tabList">
<div><ul class="tabH"><li class="tabL"> </li><li class="tabM">经营信息</li><li class="tabR"> </li></ul></div>
</div>
<div style="padding:20px;" class="line28">
<ul><li class="name txtRig">产品或服务:</li><li class="names"><%=business(6)%></li><li class="name txtRig">主营行业:</li><li class="names"><%=anysale.getValue("as_class","className","classID="&classID)%></li></ul>
<ul><li class="name txtRig">企业类型:</li><li class="names"><%=business(0)%></li><li class="name txtRig">经营模式:</li><li class="names"><%=business(2)%></li></ul>
<ul><li class="name txtRig">注册时间:</li><li class="names"><%=anysale.formatDate(regdate,5)%></li><li class="name txtRig">法人代表:</li><li class="names"><%=business(3)%></li></ul>
<ul><li class="name txtRig">注册资本:</li><li class="names"><%=capital%> 万元</li><li class="name txtRig">注册地:</li><li class="names"><%=anysale.getValue("as_area","areaName","areaID="&areaID)%></li></ul>
<ul><li class="name txtRig">经营地址:</li><li><%=business(4)%> (邮编:<%=business(5)%>)</li></ul>
<ul class="value"><li> </li></ul>
</div>
</div>
<!--right.end-->
</div>
<!--content.end-->
</div>
<%
end sub
'news
sub news()
call header("news","新闻资讯 - "&company,company&","&business(6),company&"新闻资讯内容")
%>
<div class="bodyer">
<!--content-->
<%call lefter()%>
<div style="float:left;width:702px;">
<!--right-->
<div class="tab" style="width:700px;">
<%
dim rs,sql,sortID,channel,page,npage,ipage
channel="新闻资讯"
sortID=clng(request("sortID"))
sql="select mynewsID,title,addtime from as_mynews where username='"&username&"'"
if sortID>0 then
sql=sql+anysale.IDList("sort",sortID)
search=search+"&sortID="&sortID
channel=anysale.getValue("as_sort","sortName","sortID="&sortID)
end if
if request("keywords")<>"" then
sql=sql+" and title like '%"&anysale.checkStr(request("keywords"))&"%'"
search=search+"&keywords="&request("keywords")
end if
sql=sql+" and islock=0 order by mynewsID desc"
%>
<div class="tabList">
<div><ul class="tabH"><li class="tabL"> </li><li class="tabM"><%=channel%></li><li class="tabR"> </li></ul></div>
</div>
<div style="padding:20px;">
<ul class="line30">
<%
page = clng(request("page"))
if page="" or page<1 then page=1 end if
set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1
if not rs.eof then
rs.pageSize = 20
if page>rs.pageCount then page=rs.pageCount end if
rs.absolutePage = page
npage=rs.pageCount
for ipage = 1 to rs.pageSize
%>
<li class="borderB"><span class="f12 right">[<%=anysale.formatDate(rs("addtime"),1)%>]</span>· <a href="companydetail.asp?id=<%=rs("mynewsID")%>&action=newsdetail&u=<%=username%>"><%=rs("title")%></a></li>
<%
rs.moveNext
if rs.eof then exit for end if
next
%>
<li> </li>
<li><span class="right f14">共有<%=rs.recordcount%>条资讯 <%=anysale.pagelink(page,npage,"companydetail.asp?","&action=news&"&search)%></span></li>
<%
else
response.write "<ul class=""line10""><li></li></ul><ul><li> 暂无相关资讯!</li></ul>"
end if
rs.close
set rs=nothing
%>
</ul>
</div>
</div>
<!--right.end-->
</div>
<!--content.end-->
</div>
<%
end sub
sub newsdetail()
dim ID,rs
if request("ID")="" or not isnumeric(request("ID")) then
call anysale.asNote("访问出错","参数不正确,请返回重新访问!")
else
ID=request("ID")
end if
set rs=conn.execute("select * from as_mynews where mynewsID="&ID)
if rs.eof or rs.bof then
call anysale.asNote("访问出错","参数不正确,请返回重新访问!")
else
conn.execute("update as_mynews set views=views+1 where mynewsID="&ID)
call header("news",rs("title") &" - "& anysale.nav("sort",rs("sortID"),2,"")&"新闻资讯 - "&company,rs("title")&","&rs("tags"),anysale.cutStr(anysale.clearHTML(rs("detail")),100))
%>
<div class="bodyer">
<!--content-->
<%call lefter()%>
<div style="float:left;width:702px;">
<!--right-->
<div class="tab" style="width:700px;">
<div class="tabList">
<ul><li class="line30"> <strong>您的位置:</strong> <a href="companydetail.asp?u=<%=username%>">首页</a>»<a href="companydetail.asp?u=<%=username%>&action=news">新闻资讯</a><%=anysale.nav("sort",rs("sortID"),0,"companydetail.asp?u="&username&"&action=news&")%>»<%=rs("title")%></li></ul>
</div>
<div style="padding:20px;">
<ul>
<li><h1 class="txtCen"><%=rs("title")%></h1></li>
<li class="txtCen"><%=rs("addtime")%> 作者:<%=rs("author")%> 来源:<%if rs("link")="" or rs("link")="http://" then%><%=rs("source")%><%else%><a href="<%=rs("link")%>" target="_blank"><%=rs("source")%></a><%end if%> 访问:<%=rs("views")%></li>
<li> </li>
<li class="f12 txtCen">
<img src="images/iStar.gif" alt="收藏" width="13" height="12" /> <a href="javascript:anysale();" onclick="getPage('windows.asp?action=favorite&groups=6&title=<%=server.urlEncode(rs("title"))%>&link=<%=server.urlEncode("companydetail.asp?u="&username&"&action=newsdetail&ID="&ID)%>');">收藏此信息</a>
<img src="images/iMail.gif" alt="推荐" width="13" height="13" /> <a href="javascript:anysale();" onclick="getPage('windows.asp?action=email&title=<%=server.urlEncode(rs("title"))%>&detail=<%=server.urlEncode("老朋友好久不见,我是“"&anysale.nickname&"”. 我在 "&anysale.asInfo(1)&" 上发现一新闻,也许你会感兴趣,看一下? 详细信息请参看:"&anysale.asInfo(1)&"companydetail.asp?u="&username&"&action=newsdetail&ID="&ID)%>');">推荐给朋友</a>
<img src="images/iNote.gif" alt="举报" width="12" height="12" /> <a href="javascript:anysale();" onclick="getPage('windows.asp?action=message&username=admin&title=<%=server.urlEncode("举报:"&rs("title"))%>&detail=<%=server.urlEncode(anysale.asInfo(1)&"companydetail.asp?u="&username&"&action=newsdetail&ID="&ID)%>');">举报此信息</a>
</li>
<li class="detail" style="width:560px;overflow:hidden;word-wrap:break-word;word-break:normal;">
<%
dim page,ipage,npage,search,intro,detail
detail=detail+rs("detail")
detail=anysale.chkBadWords(rs("detail"))
detail=split(detail,"[asPage]")
npage=ubound(detail)+1
page = clng(request("page"))
if page="" or page<1 then page=1 end if
if page>npage then page=npage end if
response.write "<br />"&detail(page-1)
%>
</li>
<li> </li>
<li class="txtCen f14"><%if npage>1 then call anysale.pagelink(page,npage,"companydetail.asp?","&u="&username&"&action=newsdetail&ID="&ID) end if%></li>
</ul>
</div>
</div>
<!--right.end-->
</div>
<!--content.end-->
</div>
<%
end if
rs.close
set rs=nothing
end sub
'business
sub myBusiness()
call header("business","供求信息 - "&company,business(6),anysale.asInfo(4))
%>
<div class="bodyer">
<!--content-->
<%call lefter()%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -