dataview.asp
来自「一个完全仿照阿里巴巴的网站管理系统 本软件没有版权问题」· ASP 代码 · 共 378 行
ASP
378 行
<%
'---------------------------------企业显示标签
function SMT_User_View(ListCount,PagesCount,WordCount,UserGrade,UserKey,LogoView,One_ID,Two_ID,TradeOne_ID,TradeTwo_ID,UserExplain,PagesView,ByDesc,ViewDate,ViewHtc,PageName)
if ListCount<>0 then LC=" top "&ListCount&" "
if UserGrade<>0 then UG=" and SMT_vip="&UserGrade&""
if UserKey<>0 then UK=" and SMT_key=3"
if One_ID<>0 then OI=" and SMT_addone_id="&One_ID&""
if Two_ID<>0 then TI=" and SMT_addtwo_id="&Two_ID&""
if TradeOne_ID<>0 then TOI=" and SMT_ypxxone_id="&TradeOne_ID&""
if TradeTwo_ID<>0 then TTI=" and SMT_ypxxtwo_id="&TradeTwo_ID&""
Select Case ByDesc
Case 0
BD="SMT_Id"
Case 1
BD="SMT_Htc"
Case 2
BD="SMT_Vip,SMT_id"
Case 3
BD="SMT_key,SMT_id"
End Select
response.write "<table width=""100%"" border=0 cellspacing=0 cellpadding=3>"
set Srs=server.createobject("adodb.recordset")
Ssql="select "&LC&"* from SMT_yp where SMT_key<>0 and SMT_key<>2 and SMT_key<>4 and SMT_key1=1"&UG&UK&OI&TI&TOI&TTI&" order by "&BD&" desc"
Srs.open Ssql,conn,1,1
if Srs.eof and Srs.bof then
response.write "<tr><td height=50>没有内容</td></tr>"
else
SRs.pagesize=PagesCount
page=Request("page")
if (page-SRs.pagecount) > 0 then
page=SRs.pagecount
elseif page = "" or page < 1 then
page = 1
end if
SRs.absolutepage=page
j=Srs.recordcount
j=j-(page-1)*PagesCount
i=0
do while not Srs.eof and i<PagesCount
if WordCount<>0 then User_Title=LeftT(Trim(Srs("SMT_coname")),WordCount) else User_Title=Trim(Srs("SMT_coname"))
if ViewDate<>0 then VD="Date:"&year(Srs("SMT_date"))&"-"&month(Srs("SMT_date"))&"-"&day(Srs("SMT_date"))
if ViewHtc<>0 then VH=" Htc:"&Srs("SMT_htc")
if VD<>"" or VH<>"" then VDH=" ["&VD&VH&"]"
GoName=Srs("SMT_user")
GoID=Srs("SMT_id")
if dnskey=1 then
if dnswww=1 then usertwourl="http://www."&GoName&citydns else usertwourl="http://"&GoName&citydns
else
usertwourl=cityurl&"co.asp?id="&GoID
end if
if LogoView=1 then
if Srs("SMT_logo")<>"" then
CoLogo=application("cityurl")&Srs("SMT_logo")
else
CoLogo=application("cityurl")&"img/yplogo.gif"
end if
if UserExplain<>0 then LVrow=" rowspan=2"
LV="<td height=100 width=170"&LVrow&" align=center><a href="&usertwourl&" target=_blank><img src="&CoLogo&" height=90 width=162 style=""border:1px #666666 solid""></a></td>"
end if
UT="·<a href="&usertwourl&" target=_blank>"&User_Title&"</a>"
if Srs("SMT_vip")=2 then
SVIP=" <img src="&CityUrl&"img/vip.gif title=VIP会员>"
end if
if UserExplain<>0 then
TopLine="<tr><td background="&CityUrl&"img/search_line.gif colspan=2></td></tr>"
if Srs("SMT_coms")<>"" then UE=LeftT(Trim(Srs("SMT_coms")),UserExplain) else UE=User_Title
UE="<tr><td height=70><p style=""line-height:180%""> "&UE&"</td></tr>"
TitBC=" bgcolor=#efefef"
FontClass=" class=f14"
UT="<strong><font color=#ff6600>>></font></strong> <a href="&usertwourl&" target=_blank class=f14><strong>"&User_Title&"</strong></a>"
User_view=TopLine&"<tr>"&LV&"<td height=30"&TitBC&">"&UT&SVIP&VDH&"</td></tr>"&UE
else
User_view="<tr>"&LV&"</tr><tr><td>"&UT&SVIP&VDH&"</td></tr>"
end if
response.write User_view
Srs.movenext
i=i+1
j=j-1
loop
if PagesView=1 then '分页开始
filename=PageName&"?id="&id
response.write "<tr><td align=right colspan=2 height=30 bgcolor=#efefef style=""border-top:1px #999999 solid""><strong><font color=red>"&page&"</font>/"&Srs.pagecount&"页"
if page > 1 then
response.write " <a href="&CityUrl&filename&">首页</a> <a href="&CityUrl&filename&"&page="&page-1&">上一页</a>"
end if
if Srs.pagecount-page > 0 then
response.write " <a href="&CityUrl&filename&"&page="&page+1&">下一页</a> <a href="&CityUrl&filename&"&page="&Srs.pagecount&">末页</a>"
end if
response.write "</strong> </td></tr>"
end if '完成
Srs=close
set Srs=nothing
end if
response.write "</table>"
end function
'---------------------------------企业显示标签 end
'---------------------------------商机显示标签
function SMT_Sca_View(ListCount,PagesCount,ErectCount,WordCount,One_ID,Two_ID,ScaSort,User_ID,ScaSortView,ScaKey,ScaExplain,PagesView,ByDesc,ViewDate,ViewHtc,ViewDH,PageName)
if ListCount<>0 then LC=" top "&ListCount&""
if One_ID<>0 then OI=" and SMT_ypxxone_id="&One_ID&""
if Two_ID<>0 then TI=" and SMT_ypxxtwo_id="&Two_ID&""
if ScaSort<>999 then SS=" and SMT_scasort="&ScaSort&""
if ScaKey<>0 then SK=" and SMT_key3=1"
if User_ID<>0 then UI=" and SMT_yp_id="&User_ID&""
Select Case ByDesc
Case 0
BD="SMT_Id"
Case 1
BD="SMT_Htc"
Case 2
BD="SMT_key3,SMT_id"
End Select
response.write "<table width=""100%"" border=0 cellspacing=0 cellpadding=3><tr>"
set Srs=server.createobject("adodb.recordset")
Ssql="select"&LC&" * from SMT_sca where SMT_key=1 and SMT_key1=1 and SMT_key2=1"&OI&TI&SS&SK&UI&" order by "&BD&" desc"
Srs.open Ssql,conn,1,1
if Srs.eof and Srs.bof then
response.write "<tr><td height=50>没有内容</td></tr>"
else
SRs.pagesize=PagesCount
page=Request("page")
if (page-SRs.pagecount) > 0 then
page=SRs.pagecount
elseif page = "" or page < 1 then
page = 1
end if
SRs.absolutepage=page
j=Srs.recordcount
j=j-(page-1)*PagesCount
i=1
do while not Srs.eof and i<PagesCount+1
Scatitle=Trim(Srs("SMT_scatitle"))
if WordCount<>0 then Scatitle=LeftT(Scatitle,WordCount)
if ScaSortView<>0 and ScaSortView<>1 then
set Srs1=server.createobject("adodb.recordset")
Ssql1="select * from SMT_scasort where SMT_id="&Srs("SMT_scasort")
Srs1.open Ssql1,conn,1,1
if not Srs1.eof then
Ssort="<a href="&CityUrl&"sca_tlist.asp?scasort="&Srs1("SMT_id")&" target=_blank>"&Srs1("SMT_scasort")&"</a>"
else
Ssort="<a href="&CityUrl&"sca_tlist.asp?scasort=0 target=_blank>其它</a>"
end if
Srs1.close
set Srs1=nothing
end if
Select Case ScaSortView
Case 0
SsortView=""
Case 1
SsortView="·"
Case 2
SsortView=Ssort
Case 3
SsortView="("&Ssort&")"
Case 4
SsortView="["&Ssort&"]"
Case 5
SsortView=Ssort&"|"
End Select
if ViewDH<>0 then ViewD="Date:":ViewH=" Htc:"
Select Case ViewDate
Case 0
VD=""
Case 1
VD=ViewD&Srs("SMT_begindate")
Case 2
VD=ViewD&year(Srs("SMT_begindate"))&"-"&month(Srs("SMT_begindate"))&"-"&day(Srs("SMT_begindate"))
Case 3
VD=ViewD&month(Srs("SMT_begindate"))&"-"&day(Srs("SMT_begindate"))
Case 4
VD=ViewD&hour(Srs("SMT_begindate"))&":"&minute(Srs("SMT_begindate"))&":"&second(Srs("SMT_begindate"))
Case 5
VD=ViewD&hour(Srs("SMT_begindate"))&":"&minute(Srs("SMT_begindate"))
End Select
if ViewHtc<>0 then VH=ViewH&Srs("SMT_htc")
if VD<>"" or VH<>"" then VDH=" ["&VD&VH&"]"
response.write "<td valign=top><table width=""100%"" border=0 cellspacing=0 cellpadding=0>"
if ScaExplain<>0 then
Sca=LeftT(Trim(Srs("SMT_sca")),ScaExplain)
Sca_view="<tr><td background="&CityUrl&"img/list_line_1.gif></td></tr>"&_
"<tr><td height=25 bgcolor=#efefef>"&SsortView&" <a href="&CityUrl&"sca_view.asp?id="&Srs("SMT_id")&" target=_blank class=f14><strong>"&Scatitle&"</strong></a>"&VDH&"</td></tr>"&_
"<tr><td height=60><p style=""line-height:180%""> "&Sca&"</td></tr>"
else
Sca_view="<tr><td>"&SsortView&" <a href="&CityUrl&"sca_view.asp?id="&Srs("SMT_id")&" target=_blank>"&Scatitle&"</a>"&VDH&"</td></tr>"
end if
response.write Sca_view
response.write "</table></td>"
if i mod int(ErectCount)=0 then response.write "</tr><tr>"
Srs.movenext
i=i+1
j=j-1
loop
response.write "</tr>"
if PagesView=1 then '分页开始
filename=PageName&"?id="&id&"&scasort="&scasort
response.write "<tr><td align=right colspan=2 height=30 bgcolor=#efefef style=""border-top:1px #999999 solid""><strong><font color=red>"&page&"</font>/"&Srs.pagecount&"页"
if page > 1 then
response.write " <a href="&CityUrl&filename&">首页</a> <a href="&CityUrl&filename&"&page="&page-1&">上一页</a>"
end if
if Srs.pagecount-page > 0 then
response.write " <a href="&CityUrl&filename&"&page="&page+1&">下一页</a> <a href="&CityUrl&filename&"&page="&Srs.pagecount&">末页</a>"
end if
response.write "</strong> </td></tr>"
end if '完成
Srs.close
set Srs=nothing
end if
response.write "</table>"
end function
'---------------------------------商机显示标签 end
'---------------------------------产品显示标签
function SMT_Cp_View(ListCount,PagesCount,ErectCount,WordCount,ViewPlace,CpKey,PicView,PicWidth,PicHeight,One_ID,Two_ID,User_ID,UserSort_ID,CpExplain,PagesView,ByDesc,ViewDate,ViewHtc,ViewDH,PageName)
if ListCount<>0 then LC=" top "&ListCount&""
if One_ID<>0 then OI=" and SMT_ypxxone_id="&One_ID&""
if Two_ID<>0 then TI=" and SMT_ypxxtwo_id="&Two_ID&""
if CpKey<>0 then CK=" and SMT_key3=1"
if User_ID<>0 then UI=" and SMT_yp_id="&User_ID&""
if UserSort_ID<>0 then USI=" and SMT_sortid="&UserSort_ID&""
Select Case ByDesc
Case 0
BD="SMT_Id"
Case 1
BD="SMT_Htc"
Case 2
BD="SMT_key3,SMT_id"
End Select
response.write "<table width=""100%"" border=0 cellspacing=0 cellpadding=5 align=center><tr>"
set Srs=server.createobject("adodb.recordset")
Ssql="select "&LC&" * from SMT_cp where SMT_key=1 and SMT_key1=1 and SMT_key2=1"&OI&TI&CK&UI&USI&" order by "&BD&" desc"
Srs.open Ssql,conn,1,1
if Srs.eof and Srs.bof then
response.write "<tr><td height=50>没有内容</td></tr>"
else
SRs.pagesize=PagesCount
page=Request("page")
if (page-SRs.pagecount) > 0 then
page=SRs.pagecount
elseif page = "" or page < 1 then
page = 1
end if
SRs.absolutepage=page
j=Srs.recordcount
j=j-(page-1)*PagesCount
i=1
do while not Srs.eof and i<PagesCount+1
if ViewDH<>0 then ViewD="Date:":ViewH=" Htc:"
Select Case ViewDate
Case 0
VD=""
Case 1
VD=ViewD&Srs("SMT_date")
Case 2
VD=ViewD&year(Srs("SMT_date"))&"-"&month(Srs("SMT_date"))&"-"&day(Srs("SMT_date"))
Case 3
VD=ViewD&month(Srs("SMT_date"))&"-"&day(Srs("SMT_date"))
Case 4
VD=ViewD&hour(Srs("SMT_date"))&":"&minute(Srs("SMT_date"))&":"&second(Srs("SMT_date"))
Case 5
VD=ViewD&hour(Srs("SMT_date"))&":"&minute(Srs("SMT_date"))
End Select
if ViewHtc<>0 then VH=ViewH&Srs("SMT_htc")
if VD<>"" or VH<>"" then VDH=" ["&VD&VH&"]"
'图
if PicView=1 then
If Srs("SMT_pic")<>"" Then CpPic=application("cityurl")&Srs("SMT_pic") Else CpPic=application("cityurl")&"img/Null.gif"
if PicWidth<>0 then PW=" Width="&PicWidth&""
if PicHeight<>0 then PH=" Height="&PicHeight&""
'if CpExplain<>0 then CErow=" rowspan=2"
PV="<a href="&CityUrl&"cp_view.asp?id="&Srs("SMT_id")&" target=_blank><img src="&CpPic&PH&PW&" style=""border:1px #cccccc solid""></a>"
end if
'标题
Cpname=trim(Srs("SMT_cpname"))
if WordCount<>0 then Cpname=LeftT(Cpname,WordCount)
WN="<img src="&Cityurl&"img/index_aro4.gif align=absmiddle> <a href="&CityUrl&"cp_view.asp?id="&Srs("SMT_id")&" target=_blank>"&Cpname&"</a>"&VDH&""
'说明
if Srs("SMT_cpjm")<>"" then CE="<p style=""line-height:180%""> "&LeftT(trim(Srs("SMT_cpjm")),CpExplain) else CE="<p style=""line-height:180%""> "&Cpname
TDW=100/int(ErectCount)
response.write "<td valign=top width='"&TDW&"%'><table width=""100%"" border=0 cellspacing=0 cellpadding=5 align=center>"
Select Case ViewPlace
Case 0
Cp_view="<tr><td align=center>"&PV&"</td></tr>"
Case 1
Cp_view="<tr><td align=center>"&PV&"</td></tr><tr><td align=center>"&WN&"</td></tr>"
Case 2
Cp_view="<tr><td align=center>"&WN&"</td></tr><tr><td align=center>"&PV&"</td></tr>"
Case 3
Cp_view="<tr><td colspan=2 class=f14 bgcolor=#efefef><strong>"&WN&"</strong></td></tr><tr><td background="&CityUrl&"img/list_line_1.gif colspan=2></td></tr><tr><td align=center>"&PV&"</td><td width=""100%"">"&CE&"</td></tr>"
Case 4
Cp_view="<tr><td width=""100%"" rowspan=2>"&CE&"</td><td align=center>"&PV&"</td></tr><tr><td align=center bgcolor=#efefef>"&WN&"</td></tr>"
Case 5
Cp_view="<tr><td align=center>"&PV&"</td><td width=""100%"" rowspan=2>"&CE&"</td></tr><tr><td align=center bgcolor=#efefef>"&WN&"</td></tr>"
Case 6
Cp_view="<tr><td align=center rowspan=3>"&PV&"</td><td width=""100%"" bgcolor=#efefef><strong>"&WN&"</strong></td></tr><tr><td background="&CityUrl&"img/list_line_1.gif></td></tr><tr><td height=""100%"">"&CE&"</td></tr>"
Case 7
Cp_view="<tr><td width=""100%"" bgcolor=#efefef><strong>"&WN&"</strong></td><td align=center rowspan=3>"&PV&"</td></tr><tr><td background="&CityUrl&"img/list_line_1.gif></td></tr><tr><td height=""100%"">"&CE&"</td></tr>"
Case 8
Cp_view="<tr><td>"&WN&"</td></tr>"
End Select
response.write Cp_view
response.write "</table></td>"
if i mod int(ErectCount)=0 then response.write "</tr><tr>"
Srs.movenext
i=i+1
j=j-1
loop
response.write "</tr>"
if PagesView=1 then '分页开始
filename=PageName
response.write "<tr><td align=right colspan="&ErectCount&" height=30 bgcolor=#efefef style=""border-top:1px #999999 solid""><strong><font color=red>"&page&"</font>/"&Srs.pagecount&"页"
if page > 1 then
response.write " <a href="&CityUrl&filename&">首页</a> <a href="&CityUrl&filename&"?page="&page-1&">上一页</a>"
end if
if Srs.pagecount-page > 0 then
response.write " <a href="&CityUrl&filename&"?page="&page+1&">下一页</a> <a href="&CityUrl&filename&"?page="&Srs.pagecount&">末页</a>"
end if
response.write "</strong> </td></tr>"
end if '完成
Srs.close
set Srs=nothing
end if
response.write "</table>"
end function
'---------------------------------产品显示标签 end
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?