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

📄 56770_main_cls.asp

📁 电子商城代码
💻 ASP
📖 第 1 页 / 共 5 页
字号:
		Else 
                Dim favocou,zj,cang
                If session.sessionid<>"" Then 
                        Set rs=Server.CreateObject("ADODB.Recordset")
                        sql="select basket_count,price from [56770_lsbuy] where sessionid="&session.sessionid&" and hg=0"
                        rs.open sql,conn,1,1 
                        If rs.eof Then 
                                favocou=0
                                zj=0
                        Else 
                                For I =1 To rs.RecordCount
                                favocou = favocou + rs("basket_count")
                                zj = zj + rs("price") * rs("basket_count")
                                'rs.MoveNext
                                Next
						End If 
                        rs.close:Set rs=Nothing 
                Else 
                        favocou=0 
                        zj=0
                End If 
                str_d_cart=str_d_cart&"<tr><td height=""22"">&nbsp;&nbsp;"&www56770com_txt2&":<font color=#FF0000>"&favocou&"</font></td></tr>"
                str_d_cart=str_d_cart&"<tr><td height=""22"">&nbsp;&nbsp;"&www56770com_txt4&":"&dw&"<font color=#FF0000>"&formatnumber2(zj/moneyhl)&"</font></td></tr>"
                str_d_cart=str_d_cart&"<tr><td height=""22"" >&nbsp;&nbsp;<a href="""&Eshop_url&"basket.asp"" target=""_parent"">"&www56770com_txt5&"&gt;&gt;</a></td></tr>"
                If session(""&cookiesname&"user_id")<>"" Then 
                        cang=conn.execute("select count(id) from [56770_action] where user_id='"&session(""&cookiesname&"user_id")&"'")(0)
                Else 
                        cang=0
                End If 
                str_d_cart=str_d_cart&"<tr><td height=""22"">&nbsp;&nbsp;<a href="""&Eshop_url&"myuser.asp?action=shoucang"" target=""_parent"">"&www56770com_txt6&":<font color=""#FF0000"">"&cang&"</font> "&www56770com_txt3&"</a></td></tr>"
		End If 
        str_d_cart=str_d_cart&"</table>"
End Function
'..................................
'读取首页最新商品 文本形式
'..................................
Public Function www56770com_d_newpro
        str_d_newpro="<table width='100%' border='0' cellspacing='0' cellpadding='0' align='center'>"&_
                     "  <tr>"
        sql="select top "&top4&" id,product_name,auct from [56770_product] where zhuangtai=1 order by sj desc"
        set rs=server.createobject("adodb.recordset")
        rs.open sql, conn, 1, 1
        if rs.eof then
                str_d_newpro=str_d_newpro&"<tr><td align=center height=30>"&www56770com_txt20&" </td></tr>"
        else
        do while not rs.eof
		str_d_newpro=str_d_newpro&"<tr><td height=20 class='t_bg'><img src='skins/"&skin_ml&"/icons/dot1.gif' align='absmiddle'> <a href='showproduct.asp?id="&rs("id")&"' target='_blank'>"&Cutchar(rs(""&lan_product_name&""),13)&"</a></td></tr>"
        rs.movenext
        loop
        rs.close:set rs=Nothing
        End if
        str_d_newpro=str_d_newpro&"</table>"
End Function
'..................................
'读取首页最新商品 图片形式
'..................................
Public Function www56770com_d_newpro_pic
        Dim d_newpro_pic_num
        str_d_newpro_pic="<table cellspacing='0' cellpadding='1' width='100%' border='0'>"&_
                   "  <tr>"
        Dim strpprice,strvprice
        sql="select top "&top4&" cx,product_name,id,sprice,cprice,price,vprice,pfprice,siminfo,sj,pic,auct,auprice,aday,stj,kucun from [56770_product] where zhuangtai=1 order by sj DESC"
        Set rs=Server.CreateObject("ADODB.RecordSet")
        rs.open sql, conn, 1, 1
        If rs.eof then
                str_d_newpro_pic=str_d_newpro_pic&"<tr><td align=""center"" height=""50"">"&www56770com_txt14&" </td></tr>"
        Else
                d_newpro_pic_num=1
                do while not rs.eof
                        pp=""&rs("product_name")&""
                        ppp=""&Cutchar(rs("product_name"),12)&""
        
                If rs("auct")<>1 then
                        strsprice="<s>"&dw&""&Formatnumber2(rs("sprice")/moneyhl)&"</s>"
                        If rs("cx")=1 then
                                If session(""&cookiesname&"user_id")="" then
                                        Select Case sys_56770com4
										       Case "1" 
                                                    strcprice= ""&dw&""&Formatnumber2(rs("cprice")/moneyhl)&""
                                                    strcprice1= "<EM><STRONG>"&int(rs("cprice")/rs("sprice")*100)&"</STRONG></EM> %"
                                               Case "0" : strcprice= ""&dw&"******"
                                        End Select 
                                Else
                                        strcprice= ""&dw&""&Formatnumber2(rs("cprice")/moneyhl)&""
                                        strcprice1= " <EM><STRONG>"&int(rs("cprice")/rs("sprice")*100)&"</STRONG></EM> %"
                                End     if

                        Else
                                strpprice= ""&dw&""&Formatnumber2(rs("price")/moneyhl)&""
                                strvprice= ""&dw&""&Formatnumber2(rs("vprice")/moneyhl)&""
                                strpfprice= ""&dw&""&Formatnumber2(rs("pfprice")/moneyhl)&""
                         End    if 

                 Elseif rs("auct")=1 Then
                         Dim x,dayx,yearx,monthx,monthd
                         strau_sprice="<s>"&dw&""&Formatnumber2(rs("sprice")/moneyhl)&"</s>"
                         strau_price=""&dw&""&Formatnumber2(rs("price")/moneyhl)&""
                         strauprice=""&dw&""&Formatnumber2(rs("auprice")/moneyhl)&""
                         straday=rs("aday")
                         x=dateadd("s",datediff("s",now(),straday),#2000-1-1#)
                         yearx=year(x)-2000
                         monthx=month(x)-1
				         monthd=30*monthx
                         dayx=day(x)-1
                         If "&sqlnowstring&"<straday then
                                 strau_sj=""&monthd+dayx&" "&www56770com_txt35&"  "&split(x," ")(1)&" "&monthx&""
                         Else
                                 strau_sj=""&www56770com_txt55&" "
                         End     if
                End     if    

                if rs("cx")=1 then
                        showprice=strcprice
                elseif rs("cx")=0 and rs("auct")=0 Then
                        If session(""&cookiesname&"user_id")="" Then
                                showprice=strpprice
						Else 
						        Select Case session(""&cookiesname&"user_grade")
                                       Case "1" : showprice=strpprice
                                       Case "2" : showprice=strvprice
                                       Case "3" : showprice=strpfprice
                                End Select 
                        End If                
                elseif rs("auct")=1 then
                        showprice=strau_price
                end if
                dim kucun
                if rs("kucun")<=0 then kucun=www56770com_word58 else kucun="<strong>"&rs("kucun")&"</strong>" end if
                If show_mouse="0" Then 
                         If rs("cx")=0 and rs("auct")=0 then
                                  strtitle="<table cellspacing=0 cellpadding=0>"&_
						                   "<tr><td height=20 align=right>"&www56770com_txt30&"</td>"&_
						                   "<td>&nbsp;&nbsp;"&pp&"</td></tr><tr><td height=20 align=right>"&www56770com_word13&"</td><td>&nbsp;&nbsp;"&kucun&"</td></tr>"&_
						                   "<tr><td height=20 align=right>"&www56770com_txt17&"</td><td>&nbsp;&nbsp;"&strsprice&"</td></tr>"&_
						                   "<tr><td height=20 align=right>"&www56770com_txt21&"</td><td>&nbsp;&nbsp;"&strpprice&"</td></tr><tr><td height=20 align=right>"&www56770com_txt32&"</td><td>&nbsp;&nbsp;"&strvprice&"</td></tr><tr><td height=20 align=right>"&www56770com_txt31&"</td><td>&nbsp;&nbsp;"&strpfprice&"</td></tr></table>"
                         Elseif rs("cx")=1 then
                                  strtitle="<table cellspacing=0 cellpadding=0><tr><td height=20 align=right>"&www56770com_txt30&"</td><td>&nbsp;&nbsp;"&pp&"<font color=red>"&www56770com_txt66&"</font></td></tr><tr><td height=20 align=right>"&www56770com_word13&"</td><td>&nbsp;&nbsp;"&kucun&"</td></tr><tr><td height=20 align=right>"&www56770com_txt17&"</td><td>&nbsp;&nbsp;"&strsprice&"</td></tr><tr><td height=20 align=right>"&www56770com_txt16&"</td><td>&nbsp;&nbsp;"&strcprice&"</td></tr><tr><td height=20 align=right>"&www56770com_txt18&"</td><td>&nbsp;&nbsp;"&strcprice1&"</td></tr></table>"
                         Elseif rs("auct")=1 then
                                  strtitle="<table cellspacing=0 cellpadding=0><tr><td height=20 align=right>"&www56770com_txt30&"</td><td>&nbsp;&nbsp;"&pp&"<font color=red>"&www56770com_txt67&"</font></td></tr><tr><td height=20 align=right>"&www56770com_word13&"</td><td>&nbsp;&nbsp;"&kucun&"</td></tr><tr><td height=20 align=right>"&www56770com_txt17&"</td><td>&nbsp;&nbsp;"&strau_sprice&"</td></tr><tr><td height=20 align=right>"&www56770com_txt38&"</td><td>&nbsp;&nbsp;"&strau_price&"</td></tr><tr><td height=20 align=right>"&www56770com_txt39&"</td><td>&nbsp;&nbsp;"&strauprice&"</td></tr><tr><td height=20 align=right> "&www56770com_txt49&"</td><td>&nbsp;&nbsp;"&strau_sj&"</td></tr></table>"
                         End    If
                End If 
     
                         str_d_newpro_pic=str_d_newpro_pic&"<td width='"&(100/top3)&"%' align='middle'>"&_
                                                           " <table border='0' cellspacing='0' cellpadding='3' width='100%' align='center'>"&_
                                                           "   <tr>"&_
                                                           "     <td align=middle width='100%'>"
						 str_d_newpro_pic=str_d_newpro_pic&"<a href='showproduct.asp?id="&rs("id")&"' class='picb'>"
						 str_d_newpro_pic=str_d_newpro_pic&"<img border='0' src='"&picpath&rs("pic")&"' width="""&pic_xw&""" height="""&pic_xh&""" "
						 Select Case show_mouse
						        Case "0" : str_d_newpro_pic=str_d_newpro_pic&" class=""picb"" onMouseover=""fixedtooltip('"&strtitle&"', this, event, '300')"" onMouseout=""delayhidetip()"">"
								Case "1" : str_d_newpro_pic=str_d_newpro_pic&" class=""picb"">"
						 End Select 
                         str_d_newpro_pic=str_d_newpro_pic&"</a></td>"&_
                                                           "  </tr>"&_
                                                           "  <tr>"&_
                                                           "    <td align=middle width='100%' height='30'>"
				         str_d_newpro_pic=str_d_newpro_pic&"<a href='showproduct.asp?id="&rs("id")&"'>"
                         str_d_newpro_pic=str_d_newpro_pic&""&Cutchar(rs(""&lan_product_name&""),8)&"</a>"&_
                                                           "    </td>"&_
                                                           "  </tr>"&_
                                                           "  <tr><td align=middle width='100%' height='20'><strong>"&showprice&"</strong></td></tr>"&_
                                                           " </table>"&_
                                                           "</td>"
                        If d_newpro_pic_num mod CInt(top3) = 0 then
                                str_d_newpro_pic=str_d_newpro_pic&"</tr><TR><TD colspan="""&top4&""" height=1 bgcolor='#F5EFE7'></TD></TR>"
                        End     if

        rs.movenext
                d_newpro_pic_num=d_newpro_pic_num+1
        loop
        rs.close:Set rs=Nothing
        End if
        str_d_newpro_pic=str_d_newpro_pic&"</tr></table>"
End Function
'..................................
'读取首页投票信息
'..................................
Public Function www56770com_d_vote
        str_d_vote="<table width='100%' border='0' cellspacing='0' cellpadding='0' align='center'>"
        set rs=conn.execute("SELECT * FROM [vote] where IsChecked=1 ") 
        If rs.eof then     
                str_d_vote=str_d_vote&"<tr><td width='100%' align='center' height='50'>"&www56770com_txt91&"</td></tr>"
        Else
                str_d_vote=str_d_vote&"<tr><td width='100%' align='center' height='30'>"&rs(""&lan_Title&"")&"</td></tr>"
		for i=1 to 8
	            if rs("Select"&i)<>"" then
                str_d_vote=str_d_vote&"<tr><td valign=top width='100%' height='18'>"
                         str_d_vote=str_d_vote&"<input style='border:0'"
						 if i=1 then:str_d_vote=str_d_vote&"checked":end If
						 str_d_vote=str_d_vote&" name='Options' type='radio' value="&i&">"&i&"."&rs("Select"&i)&"</td></tr>"
	              end if
		Next
		rs.close:Set rs=nothing
		End If 
		str_d_vote=str_d_vote&"</table>"
End Function

'..................................
'读取首页推荐品牌
'..................................
Public Function www56770com_d_tjbrand
		str_d_tjbrand="<table width='100%' border='0' cellspacing='0' cellpadding='3'>"

⌨️ 快捷键说明

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