📄 56770_main_cls.asp
字号:
'..................................
'读取首页商品分类 详细
'..................................
Public Function www56770com_d_ml
Dim d_ml_num
str_d_ml="<TABLE border='0' cellpadding='0' cellspacing='0' width='100%' align='center'>"&_
" <tr>"
sql="select sort_id,sort_pic,sort_name from [56770_sort] order by paixu desc"
Set rs=Server.CreateObject("ADODB.RecordSet")
rs.open sql, conn, 1, 1
d_ml_num=1
do while not rs.eof
num1=conn.Execute("Select Count(ID) from [56770_product] where zhuangtai=1 and sort_id="&rs("sort_id")&"")(0)
str_d_ml=str_d_ml&"<td width='50%'>"&_
" <TABLE WIDTH='100%' CELLPADDING='0' CELLSPACING='0' BORDER='0'>"&_
" <tr>"&_
" <td height='25'>"
If trim(rs("sort_pic"))<>"" Then
str_d_ml=str_d_ml&"<img src='"&rs("sort_pic")&"' border='0' width='30' height='30' align='absmiddle'>"
End If
str_d_ml=str_d_ml&" <a href='showsort.asp?sort_id="&rs("sort_id")&"' class='sortname'><b>"&rs(""&lan_sort_name&"")&"</b> ("&num1&")</a></td>"&_
" </tr>"&_
" </table>"&_
" <TABLE WIDTH='100%' CELLPADDING='5' CELLSPACING='0' BORDER='0'>"&_
" <TR>"&_
" <td align='left' height='50' class='t_bg'>"
Dim sqlt,rst,ii
sqlt="select csort_id,csort_name from [56770_csort] where sort_id="&rs("sort_id")&" order by paixu desc"
Set rst=Server.CreateObject("ADODB.RecordSet")
rst.open sqlt, conn, 1, 1
ii=1
do while not rst.eof
num2=conn.Execute("Select Count(ID) from [56770_product] where zhuangtai=1 and csort_id="&rst("csort_id")&"")(0)
Select Case show_mouse
Case "0" : str_d_ml=str_d_ml&"<a href='showsort.asp?sort_id="&rs("sort_id")&"&csort_id="&rst("csort_id")&"' onMouseover=""fixedtooltip('"&www56770com_txt34&" <strong>"&num2&" </strong>"&www56770com_txt3&"', this, event, '120')"" class=csortname>"&rst(""&lan_csort_name&"")&"</a>、"
Case "1" : str_d_ml=str_d_ml&"<a href='showsort.asp?sort_id="&rs("sort_id")&"&csort_id="&rst("csort_id")&"' class=csortname>"&rst(""&lan_csort_name&"")&"</a>、"
End Select
'if ii mod 4 = 0 then
'str_d_ml=str_d_ml&"</tr>"
'end if
rst.movenext
ii=ii+1
loop
rst.close:set rst=nothing
str_d_ml=str_d_ml&"</td></tr></table></td>"
if d_ml_num mod 2 = 0 then
str_d_ml=str_d_ml&"</tr>"
end if
rs.movenext
d_ml_num=d_ml_num+1
loop
rs.close:set rs=nothing
str_d_ml=str_d_ml&"<td>"
str_d_ml=str_d_ml&"</td></tr></table>"
End Function
'..................................
'读取首页商品分类 简洁
'..................................
Public Function www56770com_d_mlsmall
Dim temp_ml_s
temp_ml_s="<TABLE border='0' cellpadding='0' width='100%' align='center'>"
sql="select sort_id,sort_name from [56770_sort] order by paixu desc"
Set rs=Server.CreateObject("ADODB.RecordSet")
rs.open sql, conn, 1, 1
do while not rs.eof
num1=conn.Execute("Select Count(ID) from [56770_product] where zhuangtai=1 and sort_id="&rs("sort_id")&"")(0)
temp_ml_s=temp_ml_s&"<tr><td>"&_
" <table border='0' cellspacing='0' cellpadding='0' width='100%' align='center'>"&_
" <tr valign='bottom'>"
Select Case iftree
Case "1" : temp_ml_s=temp_ml_s&"<td height='18' vAlign='middle' id='tag"&rs("sort_id")&"' style='CURSOR: hand' onclick=turnit(Content"&rs("sort_id")&",tag"&rs("sort_id")&"); language=JScript> <font style='font-family:webdings'>2</font> "
Case "0" : temp_ml_s=temp_ml_s&"<td height='18'> "
End Select
Select Case show_mouse
Case "0" : temp_ml_s=temp_ml_s&"<a href='showsort.asp?sort_id="&rs("sort_id")&"' onMouseover=""fixedtooltip('"&www56770com_txt34&" <strong>"&num1&" </strong>"&www56770com_txt3&"', this, event, '120')"" onMouseout=""delayhidetip()"" class='sortname'>"&rs(""&lan_sort_name&"")&" ("&num1&")</a>"
Case "1" : temp_ml_s=temp_ml_s&"<a href='showsort.asp?sort_id="&rs("sort_id")&"' class='sortname'>"&rs(""&lan_sort_name&"")&" ("&num1&")</a>"
End Select
temp_ml_s=temp_ml_s&" </td>"&_
" </tr>"&_
" </table>"&_
"</td></tr>"
temp_ml_s=temp_ml_s&"<tr>"
Select Case iftree
Case "1" : temp_ml_s=temp_ml_s&"<td id=Content"&rs("sort_id")&" style='DISPLAY: none'>"
Case "0" : temp_ml_s=temp_ml_s&"<td>"
End Select
temp_ml_s=temp_ml_s&"<table border='0' cellspacing='0' cellpadding='0' width='100%' align='center'>"
Dim sqlt,rst
sqlt="select csort_id,csort_name from [56770_csort] where sort_id="&rs("sort_id")&" order by paixu desc"
Set rst=Server.CreateObject("ADODB.RecordSet")
rst.open sqlt, conn, 1, 1
do while not rst.eof
num2=conn.Execute("Select Count(ID) from [56770_product] where zhuangtai=1 and csort_id="&rst("csort_id")&"")(0)
temp_ml_s=temp_ml_s&"<tr>"
Select Case iftree
Case "1" : temp_ml_s=temp_ml_s&"<td id=tag"&rs("sort_id")&" style='CURSOR: hand' onclick=turnit(Content"&rs("sort_id")&",tag"&rs("sort_id")&"); language=JScript height='22'> <font style='font-family:webdings'>4</font>"
Case "0" : temp_ml_s=temp_ml_s&"<td align='left' width='100%' height='22'>"
End Select
Select Case show_mouse
Case "0" : temp_ml_s=temp_ml_s&" <a href='showsort.asp?sort_id="&rs("sort_id")&"&csort_id="&rst("csort_id")&"' onMouseover=""fixedtooltip('"&www56770com_txt34&" <strong>"&num2&" </strong>"&www56770com_txt3&"', this, event, '120')"" onMouseout=""delayhidetip()"" class=csortname>"&rst(""&lan_csort_name&"")&"</a> ("&num2&")"
Case "1" : temp_ml_s=temp_ml_s&" <a href='showsort.asp?sort_id="&rs("sort_id")&"&csort_id="&rst("csort_id")&"' class=csortname>"&rst(""&lan_csort_name&"")&"</a> ("&num2&")"
End Select
temp_ml_s=temp_ml_s&"</td>"
temp_ml_s=temp_ml_s&"</tr>"
rst.movenext
loop
rst.close:set rst=nothing
temp_ml_s=temp_ml_s&"</table>"
rs.movenext
loop
rs.close:set rs=nothing
temp_ml_s=temp_ml_s&"</td></tr></table>"
str_d_mlsmall=temp_ml_s
End Function
'..................................
'读取首页特价商品
'..................................
Public Function www56770com_d_cxtj
Dim rscx,sqlcx,cxpp,cxppp
Set rscx=Server.CreateObject("ADODB.RecordSet")
sqlcx="select top "&top8&" cx,product_name,id,sprice,cprice,pic,sj,p_cx_sj,kucun from [56770_product] where zhuangtai=1 and cx=1 and auct=0 order by sj DESC"
rscx.open sqlcx, conn, 1, 1
if rscx.eof then
str_d_cxtj="<table cellspacing=0 cellpadding=0 width='50%' align='center'><tr><td>"&www56770com_txt56&" </td></tr></table>"
else
str_d_cxtj="<table width='100%' border='0' cellpadding='2' cellspacing='0' align='center'>"&_
" <tr>"
do while not rscx.eof
cxpp=""&rscx("product_name")&""
cxppp=""&Cutchar(rscx("product_name"),15)&""
strsprice="<s>"&dw&""&Formatnumber2(rscx("sprice")/moneyhl)&"</s>"
If session(""&cookiesname&"user_id")="" then
Select Case sys_56770com4
Case "1"
strcprice= ""&dw&""&Formatnumber2(rscx("cprice")/moneyhl)&""
strcprice1= "<EM><STRONG>"&int(rscx("cprice")/rscx("sprice")*100)&"</STRONG></EM> %"
Case "0"
strcprice= ""&dw&"******"
End Select
Else
strcprice= ""&dw&""&Formatnumber2(rscx("cprice")/moneyhl)&""
strcprice1= " <EM><STRONG>"&int(rscx("cprice")/rscx("sprice")*100)&"</STRONG></EM> %"
End If
if rscx("kucun")<=0 then kucun=www56770com_word58 else kucun="<strong>"&rscx("kucun")&"</strong>" end if
If show_mouse="0" Then
Dim strcxtjtitle
strcxtjtitle="<table cellspacing=0 cellpadding=0><tr><td height=20 align=right>"&www56770com_txt30&"</td><td> "&cxpp&"<font color=red>"&www56770com_txt66&"</font></td></tr><tr><td height=20 align=right>"&www56770com_word13&"</td><td> "&kucun&"</td></tr><tr><td height=20 align=right>"&www56770com_txt17&"</td><td> "&strsprice&"</td></tr><tr><td height=20 align=right>"&www56770com_txt16&"</td><td> "&strcprice&"</td></tr><tr><td height=20 align=right>"&www56770com_txt18&"</td><td> "&strcprice1&"</td></tr></table>"
End If
str_d_cxtj=str_d_cxtj&"<td align='middle' width="&pic_xw+20&">"&_
" <table border='0' cellspacing='0' cellpadding='2' width="&pic_xw+20&" align='center' class='bk'>"&_
" <tr>"&_
" <td align='middle' width='"&pic_xw+20&"' height='"&pic_xh+20&"'>"
str_d_cxtj=str_d_cxtj&"<a href='showproduct.asp?id="&rscx("id")&"' class='picb'>"
str_d_cxtj=str_d_cxtj&"<img border='0' src='"&Eshop_url&picpath&rscx("pic")&"' width="""&pic_xw&""" height="""&pic_xh&""" "
Select Case show_mouse
Case "0" : str_d_cxtj=str_d_cxtj&" onMouseover=""fixedtooltip('"&strcxtjtitle&"', this, event, '300')"" onMouseout=""delayhidetip()"">"
Case "1" : str_d_cxtj=str_d_cxtj&">"
End Select
str_d_cxtj=str_d_cxtj&"</a>"&_
" </td>"&_
" </tr>"&_
" <tr>"&_
" <td align='middle' width='100%' height='30'>"
str_d_cxtj=str_d_cxtj&"<a href='showproduct.asp?id="&rscx("id")&"' title='"&cxpp&"'>"
str_d_cxtj=str_d_cxtj&""&Cutchar(rscx(""&lan_product_name&""),8)&"</a>"&_
" </td>"&_
" </tr>"&_
" <tr>"&_
" <td align='middle' width='100%' height='20'><strong>"&strcprice&"</strong></td>"&_
" </tr>"&_
" </table>"&_
"</td>"
rscx.movenext
Loop
rscx.close:set rscx=Nothing
str_d_cxtj=str_d_cxtj&"</tr></table>"
End if
End Function
'..................................
'读取首页全部推荐商品
'..................................
Public Function www56770com_d_sytj
Dim d_sytj_num
str_d_sytj="<table cellspacing='0' cellpadding='2' width='100%' border='0'>"&_
" <tr>"
If top5=1 then
str_d_sytj=str_d_sytj&"<td>"
End If
Dim strpprice,strvprice
sql="select top "&top6&" cx,product_name,id,sprice,cprice,price,vprice,pfprice,siminfo,sj,pic,auct,auprice,aday,stj,kucun from [56770_product] where zhuangtai=1 and (stj=1 or ytj=1) order by sj DESC"
Set rs=Server.CreateObject("ADODB.RecordSet")
rs.open sql, conn, 1, 1
If rs.eof then
str_d_sytj=str_d_sytj&"<tr><td align=""center"" height=""50"" colspan='"&top5&"'>"&www56770com_txt14&" </td></tr>"
Else
d_sytj_num=1
do while not rs.eof
pp=""&rs("product_name")&""
ppp=""&Cutchar(rs("product_name"),12)&""
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -