<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <% Dim MM_editAction MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME")) If (Request.QueryString <> "") Then MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString) End If ' boolean to abort record edit Dim MM_abortEdit MM_abortEdit = false %> <% ' *** Redirect if username exists MM_flag = "MM_insert" If (CStr(Request(MM_flag)) <> "") Then Dim MM_rsKey Dim MM_rsKey_cmd MM_dupKeyRedirect = "tg_erro.asp" MM_dupKeyUsernameValue = CStr(Request.Form("ip")) Set MM_rsKey_cmd = Server.CreateObject ("ADODB.Command") MM_rsKey_cmd.ActiveConnection = MM_conn_STRING MM_rsKey_cmd.CommandText = "SELECT count(ip) as num FROM IP WHERE datediff('d',time,now())=0 and ip = ?" MM_rsKey_cmd.Prepared = true MM_rsKey_cmd.Parameters.Append MM_rsKey_cmd.CreateParameter("param1", 200, 1, 50, MM_dupKeyUsernameValue) ' adVarChar Set MM_rsKey = MM_rsKey_cmd.Execute If (Not MM_rsKey.EOF Or Not MM_rsKey.BOF) and MM_rsKey(0)>=3 Then ' the username was found - can not add the requested username MM_qsChar = "?" If (InStr(1, MM_dupKeyRedirect, "?") >= 1) Then MM_qsChar = "&" MM_dupKeyRedirect = MM_dupKeyRedirect & MM_qsChar & "requsername=" & MM_dupKeyUsernameValue ' Response.Redirect(MM_dupKeyRedirect) response.write ")" 'Response.Redirect("tp.asp") MM_abortEdit=true else response.write ")" MM_abortEdit=true End If MM_rsKey.Close End If %> <% ' IIf implementation Function MM_IIf(condition, ifTrue, ifFalse) If condition = "" Then MM_IIf = ifFalse Else MM_IIf = ifTrue End If End Function %> <% If (CStr(Request("MM_insert")) = "form1") Then If (Not MM_abortEdit) Then ' execute the insert Dim MM_editCmd Set MM_editCmd = Server.CreateObject ("ADODB.Command") MM_editCmd.ActiveConnection = MM_conn_STRING MM_editCmd.CommandText = "INSERT INTO IP (ip, sid) VALUES (?, ?)" MM_editCmd.Prepared = true MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1, 50, Request.Form("ip")) ' adVarWChar MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 202, 1, 50, Request.Form("sid")) ' adVarWChar MM_editCmd.Execute MM_editCmd.ActiveConnection.Close End If End If %> <% If (CStr(Request("MM_update")) = "form1") Then If (Not MM_abortEdit) Then ' execute the update Dim MM_editCmd2 Set MM_editCmd2 = Server.CreateObject ("ADODB.Command") MM_editCmd2.ActiveConnection = MM_conn_STRING MM_editCmd2.CommandText = "UPDATE men SET ps = ? WHERE id = ?" MM_editCmd2.Prepared = true MM_editCmd2.Parameters.Append MM_editCmd2.CreateParameter("param1", 5, 1, -1, MM_IIF(Request.Form("ps2"), Request.Form("ps2"), null)) ' adDouble MM_editCmd2.Parameters.Append MM_editCmd2.CreateParameter("param2", 5, 1, -1, MM_IIF(Request.Form("MM_recordId"), Request.Form("MM_recordId"), null)) ' adDouble MM_editCmd2.Execute MM_editCmd2.ActiveConnection.Close End If End If %> <% Dim tpmen Dim tpmen_cmd Dim tpmen_numRows Set tpmen_cmd = Server.CreateObject ("ADODB.Command") tpmen_cmd.ActiveConnection = MM_conn_STRING tpmen_cmd.CommandText = "SELECT * FROM men ORDER BY ps DESC" tpmen_cmd.Prepared = true Set tpmen = tpmen_cmd.Execute tpmen_numRows = 0 %> <% Dim tpip Dim tpip_cmd Dim tpip_numRows Set tpip_cmd = Server.CreateObject ("ADODB.Command") tpip_cmd.ActiveConnection = MM_conn_STRING tpip_cmd.CommandText = "SELECT * FROM IP" tpip_cmd.Prepared = true Set tpip = tpip_cmd.Execute tpip_numRows = 0 %> <% Dim Repeat1__numRows Dim Repeat1__index Repeat1__numRows = -1 Repeat1__index = 0 tpmen_numRows = tpmen_numRows + Repeat1__numRows %> <% Dim MM_paramName %> <% ' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters Dim MM_keepNone Dim MM_keepURL Dim MM_keepForm Dim MM_keepBoth Dim MM_removeList Dim MM_item Dim MM_nextItem ' create the list of parameters which should not be maintained MM_removeList = "&index=" If (MM_paramName <> "") Then MM_removeList = MM_removeList & "&" & MM_paramName & "=" End If MM_keepURL="" MM_keepForm="" MM_keepBoth="" MM_keepNone="" ' add the URL parameters to the MM_keepURL string For Each MM_item In Request.QueryString MM_nextItem = "&" & MM_item & "=" If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item)) End If Next ' add the Form variables to the MM_keepForm string For Each MM_item In Request.Form MM_nextItem = "&" & MM_item & "=" If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_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) End If If (MM_keepURL <> "") Then MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1) End If If (MM_keepForm <> "") Then MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1) End If ' 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 fip fip=Request.ServerVariables("Remote_Addr") %> 第三届雀氏超级育婴师年度盛典
返回顶部
返回顶部
投票规则:
1. 投票时间 12月2日~12月10日17:00
2、每位用户每天可以投票3次,一经投出,不能更改。
    <% While ((Repeat1__numRows <> 0) AND (NOT tpmen.EOF)) %>
  • " />
    <%=(tpmen.Fields.Item("chy").Value)%>
    票数:(<%=(tpmen.Fields.Item("ps").Value)%>)
    育婴宣言:<%=(tpmen.Fields.Item("qshao").Value)%>
    " /> " /> " />
  • <% Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 tpmen.MoveNext() Wend %>
<% tpmen.Close() Set tpmen = Nothing %> <% tpip.Close() Set tpip = Nothing %>