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

📄 default.asp

📁 体育商城
💻 ASP
📖 第 1 页 / 共 5 页
字号:
tuijian.CursorType = 0
tuijian.CursorLocation = 2
tuijian.LockType = 3
tuijian.Open()
tuijian_numRows = 0
%>
<%
set news = Server.CreateObject("ADODB.Recordset")
news.ActiveConnection = MM_conn_STRING
news.Source = "SELECT * FROM news ORDER BY jdate DESC"
news.CursorType = 0
news.CursorLocation = 2
news.LockType = 3
news.Open()
news_numRows = 0
%>
<%
Dim newsimg__MMColParam
newsimg__MMColParam = "-1"
if (Request("MM_EmptyValue") <> "") then newsimg__MMColParam = Request("MM_EmptyValue")
%>
<%
set newsimg = Server.CreateObject("ADODB.Recordset")
newsimg.ActiveConnection = MM_conn_STRING
newsimg.Source = "SELECT images, imagessm FROM news WHERE shifouimg = " + Replace(newsimg__MMColParam, "'", "''") + " ORDER BY newid DESC"
newsimg.CursorType = 0
newsimg.CursorLocation = 2
newsimg.LockType = 3
newsimg.Open()
newsimg_numRows = 0
%>
<%
set newproduct = Server.CreateObject("ADODB.Recordset")
newproduct.ActiveConnection = MM_conn_STRING
newproduct.Source = "SELECT * FROM product ORDER BY jrdate DESC"
newproduct.CursorType = 0
newproduct.CursorLocation = 2
newproduct.LockType = 3
newproduct.Open()
newproduct_numRows = 0
%>
<%
set sell = Server.CreateObject("ADODB.Recordset")
sell.ActiveConnection = MM_conn_STRING
sell.Source = "SELECT productid, productname, Sell FROM product ORDER BY Sell DESC"
sell.CursorType = 0
sell.CursorLocation = 2
sell.LockType = 3
sell.Open()
sell_numRows = 0
%>
<%
set gq = Server.CreateObject("ADODB.Recordset")
gq.ActiveConnection = MM_conn_STRING
gq.Source = "SELECT * FROM gqxt ORDER BY gqid DESC"
gq.CursorType = 0
gq.CursorLocation = 2
gq.LockType = 3
gq.Open()
gq_numRows = 0
%>
<%
Dim Repeat5__numRows
Repeat5__numRows = 7
Dim Repeat5__index
Repeat5__index = 0
gq_numRows = gq_numRows + Repeat5__numRows
%>
<%
Dim Repeat4__numRows
Repeat4__numRows = 10
Dim Repeat4__index
Repeat4__index = 0
sell_numRows = sell_numRows + Repeat4__numRows
%>
<%
Dim Repeat2__numRows
Repeat2__numRows = 10
Dim Repeat2__index
Repeat2__index = 0
tuijian_numRows = tuijian_numRows + Repeat2__numRows
%>
<%
Dim Repeat1__numRows
Repeat1__numRows = 10
Dim Repeat1__index
Repeat1__index = 0
hot_numRows = hot_numRows + Repeat1__numRows
%>
<%
' *** Validate request to log in to this site.
MM_LoginAction = Request.ServerVariables("URL")
If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Request.QueryString
MM_valUsername=CStr(Request.Form("user2"))
If MM_valUsername <> "" Then
  MM_fldUserAuthorization=""
  MM_redirectLoginSuccess="default.asp"
  MM_redirectLoginFailed="loginerr.asp"
  MM_flag="ADODB.Recordset"
  set MM_rsUser = Server.CreateObject(MM_flag)
  MM_rsUser.ActiveConnection = MM_conn_STRING
  MM_rsUser.Source = "SELECT user, password"
  If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
  MM_rsUser.Source = MM_rsUser.Source & " FROM user WHERE user='" & replace(MM_valUsername,"'","''") &"' AND password='" & replace(Request.Form("password2"),"'","''") & "'"
  MM_rsUser.CursorType = 0
  MM_rsUser.CursorLocation = 2
  MM_rsUser.LockType = 3
  MM_rsUser.Open
  If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then 
    ' username and password match - this is a valid user
    Session("MM_Username") = MM_valUsername
    If (MM_fldUserAuthorization <> "") Then
      Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value)
    Else
      Session("MM_UserAuthorization") = ""
    End If
    if CStr(Request.QueryString("accessdenied")) <> "" And false Then
      MM_redirectLoginSuccess = Request.QueryString("accessdenied")
    End If
    MM_rsUser.Close
    Response.Redirect(MM_redirectLoginSuccess)
  End If
  MM_rsUser.Close
  Response.Redirect(MM_redirectLoginFailed)
End If
%>
<%
' *** Add item to UC Shopping cart
set UC_rs=dazhe
UC_uniqueCol="id"
UC_AddLink=""
If (Request.QueryString = "") Then
  UC_AddLink = Request.ServerVariables("URL") & "?UC_AddId="
Else
  UC_AddLink = Request.ServerVariables("URL") & "?" & Request.QueryString & "&UC_AddId="
End If
UC_AddId = CStr(Request("UC_AddId"))
If (UC_AddId <> "") Then
  UC_redirectPage = ""
  If (NOT (UC_rs is Nothing)) Then
    ' Position recordset to correct location
    If (UC_rs.Fields.Item(UC_uniqueCol).Value <> UC_AddId) Then
      ' reset the cursor to the beginning
      If (UC_rs.CursorType > 0) Then
        If (Not UC_rs.BOF) Then UC_rs.MoveFirst
      Else
        UC_rs.Close
        UC_rs.Open
      End If
      Do While (Not UC_rs.EOF)
        If (Cstr(UC_rs.Fields.Item(UC_uniqueCol).Value) = UC_AddId) Then
          Exit Do
        End If
        UC_rs.MoveNext
      Loop
    End If
  End If
  UC_BindingTypes=Array("RS","LITERAL","RS","RS","NONE","NONE","NONE")
  UC_BindingValues=Array("productisbn","1","productname","xprice","","","")
  UCCart1.AddItem UC_rs,UC_BindingTypes,UC_BindingValues,"increment"
  ' always redirect to remove the "UC_AddId" query param.
  if (UC_redirectPage = "") Then UC_redirectPage = CStr(Request.ServerVariables("URL"))
  If (InStr(1, UC_redirectPage, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
    newQS = "?"
    For Each Item In Request.QueryString
      If (Item <> "UC_AddId") Then
        If (Len(newQS) > 1) Then newQS = newQS & "&"
        newQS = newQS & Item & "=" & Server.URLencode(Request.QueryString(Item))
      End If
    Next
    if (Len(newQS) > 1) Then UC_redirectPage = UC_redirectPage & newQS
  End If
  Response.Redirect(UC_redirectPage)
End If
%>
<%
' *** Add item to UC Shopping cart
set UC_rs=newproduct
UC_uniqueCol="id"
UC_AddLink=""
If (Request.QueryString = "") Then
  UC_AddLink = Request.ServerVariables("URL") & "?UC_AddId="
Else
  UC_AddLink = Request.ServerVariables("URL") & "?" & Request.QueryString & "&UC_AddId="
End If
UC_AddId = CStr(Request("UC_AddId"))
If (UC_AddId <> "") Then
  UC_redirectPage = ""
  If (NOT (UC_rs is Nothing)) Then
    ' Position recordset to correct location
    If (UC_rs.Fields.Item(UC_uniqueCol).Value <> UC_AddId) Then
      ' reset the cursor to the beginning
      If (UC_rs.CursorType > 0) Then
        If (Not UC_rs.BOF) Then UC_rs.MoveFirst
      Else
        UC_rs.Close
        UC_rs.Open
      End If
      Do While (Not UC_rs.EOF)
        If (Cstr(UC_rs.Fields.Item(UC_uniqueCol).Value) = UC_AddId) Then
          Exit Do
        End If
        UC_rs.MoveNext
      Loop
    End If
  End If
  UC_BindingTypes=Array("RS","LITERAL","RS","RS","NONE","RS","NONE")
  UC_BindingValues=Array("productisbn","1","productname","yprice","","weight","")
  UCCart1.AddItem UC_rs,UC_BindingTypes,UC_BindingValues,"increment"
  ' always redirect to remove the "UC_AddId" query param.
  if (UC_redirectPage = "") Then UC_redirectPage = CStr(Request.ServerVariables("URL"))
  If (InStr(1, UC_redirectPage, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
    newQS = "?"
    For Each Item In Request.QueryString
      If (Item <> "UC_AddId") Then
        If (Len(newQS) > 1) Then newQS = newQS & "&"
        newQS = newQS & Item & "=" & Server.URLencode(Request.QueryString(Item))
      End If
    Next
    if (Len(newQS) > 1) Then UC_redirectPage = UC_redirectPage & newQS
  End If
  Response.Redirect(UC_redirectPage)
End If
%>
<%
' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters

' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "") Then MM_removeList = MM_removeList & "&" & MM_paramName & "="
MM_keepURL="":MM_keepForm="":MM_keepBoth="":MM_keepNone=""

' add the URL parameters to the MM_keepURL string
For Each Item In Request.QueryString
  NextItem = "&" & Item & "="
  If (InStr(1,MM_removeList,NextItem,1) = 0) Then
    MM_keepURL = MM_keepURL & NextItem & Server.URLencode(Request.QueryString(Item))
  End If
Next

' add the Form variables to the MM_keepForm string
For Each Item In Request.Form
  NextItem = "&" & Item & "="
  If (InStr(1,MM_removeList,NextItem,1) = 0) Then
    MM_keepForm = MM_keepForm & NextItem & Server.URLencode(Request.Form(Item))
  End If
Next

' create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL & MM_keepForm
if (MM_keepBoth <> "") Then MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
if (MM_keepURL <> "")  Then MM_keepURL  = Right(MM_keepURL, Len(MM_keepURL) - 1)
if (MM_keepForm <> "") Then MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)

' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
  If (firstItem <> "") Then
    MM_joinChar = "&"
  Else
    MM_joinChar = ""
  End If
End Function
%>
<%
Dim Repeat3__numRows
Repeat3__numRows = 7
Dim Repeat3__index
Repeat3__index = 0
news_numRows = news_numRows + Repeat3__numRows
%>
<%
'JomoWeb c2001 nstrpt1
function JomoPrefix(rs, fldName)
dim str, strlen, whereloc, orderloc
str = rs.source
strlen = Len(str)
whereloc=InStr(str," WHERE ")
orderloc=InStr(str," ORDER BY ")
if orderloc = 0 and whereloc = 0 then 
  JomoPrefix = str & " WHERE " & fldName & " = "
else
  if whereloc = 0 then
  	JomoPrefix=Left(str,orderloc) & " WHERE " & fldName & " = "
  else
  	if orderloc = 0 then orderloc = strlen
  	JomoPrefix=Left(str,whereloc+6) &" ( " &  Mid(str, whereloc+7, orderloc - whereloc -6 ) & " )  AND " & fldName & " = "
  end if
end if
end function

function JomoPostfix(rs)
dim str, orderloc
str=rs.source
orderloc = InStr(str," ORDER BY ")
if orderloc = 0 then
  JomoPostfix = ""
else
JomoPostfix = " " & right(str, Len(str) - orderloc)
end if
end function
 %>
<% 
'JomoWeb c2001 nstrpt2
dim rs1_prefix, rs1_postfix
rs1_prefix = JomoPrefix(rs1, "bclassid")
rs1_postfix=JomoPostfix(rs1)
 %>
<SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT>	
function DoTrimProperly(str, nNamedFormat, properly, pointed, points)
  dim strRet
  strRet = Server.HTMLEncode(str)
  strRet = replace(strRet, vbcrlf,"")
  strRet = replace(strRet, vbtab,"")
  If (LEN(strRet) > nNamedFormat) Then
    strRet = LEFT(strRet, nNamedFormat)			
    If (properly = 1) Then					
      Dim TempArray								
      TempArray = split(strRet, " ")	
      Dim n
      strRet = ""
      for n = 0 to Ubound(TempArray) - 1
        strRet = strRet & " " & TempArray(n)
      next
    End If
    If (pointed = 1) Then
      strRet = strRet & points
    End If
  End If
  DoTrimProperly = strRet
End Function
</SCRIPT>
<% 

⌨️ 快捷键说明

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