Advertisement
Advertisement
| 05.04.2008 at 03:28PM PDT, ID: 23375340 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: 128: 129: 130: 131: 132: 133: 134: 135: 136: 137: 138: 139: |
<%
' *** Edit Operations: declare variables
MM_editAction = CStr(Request("URL"))
If (Request.QueryString <> "") Then
MM_editAction = MM_editAction & "?" & Request.QueryString
End If
' boolean to abort record edit
MM_abortEdit = false
' query string to execute
MM_editQuery = ""
%>
<%
' *** Insert Record: set variables
If (CStr(Request("MM_insert")) <> "") Then
MM_editConnection = MM_conn_db_STRING
MM_editTable = "MyFriends"
MM_editColumn = "ID"
MM_recordId = "" + Request.Form("MM_recordId") + ""
MM_editRedirectUrl = "New_Mate_Added_Successful.asp"
MM_fieldsStr = "Name|value|LastName|value|MySchool|value|GradeLevel|value|DisplayPicture|value|MyAge|value|ID|value|MyID|value"
MM_columnsStr = "Name|',none,''|LastName|',none,''|MySchool|',none,''|GradeLevel|',none,''|DisplayPicture|',none,''|MyAge|',none,''|ID|',none,''|MyID|',none,''"
' create the MM_fields and MM_columns arrays
MM_fields = Split(MM_fieldsStr, "|")
MM_columns = Split(MM_columnsStr, "|")
' set the form values
For i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_fields(i+1) = CStr(Request.Form(MM_fields(i)))
Next
' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If
End If
%>
<%
' *** Insert Record: construct a sql insert statement and execute it
If (CStr(Request("MM_insert")) <> "") Then
' create the sql insert statement
MM_tableValues = ""
MM_dbValues = ""
For i = LBound(MM_fields) To UBound(MM_fields) Step 2
FormVal = MM_fields(i+1)
MM_typeArray = Split(MM_columns(i+1),",")
Delim = MM_typeArray(0)
If (Delim = "none") Then Delim = ""
AltVal = MM_typeArray(1)
If (AltVal = "none") Then AltVal = ""
EmptyVal = MM_typeArray(2)
If (EmptyVal = "none") Then EmptyVal = ""
If (FormVal = "") Then
FormVal = EmptyVal
Else
If (AltVal <> "") Then
FormVal = AltVal
ElseIf (Delim = "'") Then ' escape quotes
FormVal = "'" & Replace(FormVal,"'","''") & "'"
Else
FormVal = Delim + FormVal + Delim
End If
End If
If (i <> LBound(MM_fields)) Then
MM_tableValues = MM_tableValues & ","
MM_dbValues = MM_dbValues & ","
End if
MM_tableValues = MM_tableValues & MM_columns(i)
MM_dbValues = MM_dbValues & FormVal
Next
MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues & ") values (" & MM_dbValues & ")"
If (Not MM_abortEdit) Then
' execute the insert
Set MM_editCmd = Server.CreateObject("ADODB.Command")
MM_editCmd.ActiveConnection = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close
If (MM_editRedirectUrl <> "") Then
Response.Redirect(MM_editRedirectUrl)
End If
End If
End If
%>
<%'--------------------------------------------------------------------------------------------------%>
<%
Dim imagelist__MMColParam
imagelist__MMColParam = "1"
if (Request.QueryString("art_id") <> "") then imagelist__MMColParam = Request.QueryString("art_id")
%>
<%
set imagelist = Server.CreateObject("ADODB.Recordset")
imagelist.ActiveConnection = MM_conn_db_STRING
imagelist.Source = "SELECT * FROM Users WHERE UserArtID = " + Replace(imagelist__MMColParam, "'", "''") + ""
imagelist.CursorType = 0
imagelist.CursorLocation = 2
imagelist.LockType = 3
imagelist.Open()
imagelist_numRows = 0
%>
<%
Dim MembPages__MMColParam
MembPages__MMColParam = "1"
if (Session("MM_Username") <> "") then MembPages__MMColParam = Session("MM_Username")
%>
<%
set MembPages = Server.CreateObject("ADODB.Recordset")
MembPages.ActiveConnection = MM_conn_db_STRING
MembPages.Source = "SELECT * FROM UserArticles, Users WHERE statusby = '" + Replace(MembPages__MMColParam, "'", "''") + "' ORDER BY art_title ASC"
MembPages.CursorType = 0
MembPages.CursorLocation = 2
MembPages.LockType = 3
MembPages.Open()
MembPages_numRows = 0
%>
<input type="hidden" name="Name" value="<%=(imagelist.Fields.Item("Name").Value)%>">
<input type="hidden" name="LastName" value="<%=(imagelist.Fields.Item("LastName").Value)%>">
<input type="hidden" name="Name" value="<%=(MembPages.Fields.Item("Name").Value)%>">
<input type="hidden" name="LastName" value="<%=(MembPages.Fields.Item("LastName").Value)%>">
|