Compilation Error  
       
      Printed From: SalesCart
        Category:  Legacy Products
       Forum Name:  SalesCart NET
       Forum Description:  For SalesCart NET developers and designers to converse with other SalesCart NET owners
       URL: http://forum.salescart.com/forum/forum_posts.asp?TID=752
       Printed Date: November/04/25 at 2:50am Software Version: Web Wiz Forums 11.04 - http://www.webwizforums.com
      
 
  
      Topic: Compilation Error
       
      Posted By: debbie
       Subject: Compilation Error
       Date Posted: September/04/09 at 9:28pm
       
      
        
          
	
I'm testing my site but when I try to buy a product I get the following error.  Can anyone tell me what I'm doing wrong.
 
 Server Error in '/' Application.
  ------------------------------------------------------------ --------------------
 
 Compilation Error 
 Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. 
 
 Compiler Error Message: BC30466: Namespace or type 'Transactions' for the Imports 'Transactions' cannot be found.
 
 Source Error:
 
  
 
 Line 31: Imports System.Web.UI.HtmlControls
 Line 32: Imports System.Web.UI.WebControls
 Line 33: Imports Transactions
 Line 34: 
 Line 35: Namespace ASP
  
 
 Source File: C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET  Files\root\5cc0a95c\ce61009a\nb1agryo.0.vb     Line: 33 
 
 
 
 Show Detailed Compiler Output:
 
 
 c:\windows\system32\inetsrv> "c:\windows\microsoft.net\framework\v1.1.4322\vbc.exe" /t:library /utf8output  /R:"c:\windows\assembly\gac\system.web\1.0.5000.0__b03f5f7f1 1d50a3a\system.web.dll"  /R:"c:\windows\assembly\gac\system\1.0.5000.0__b77a5c561934e 089\system.dll" /R:"c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net  files\root\5cc0a95c\ce61009a\assembly\dl2\d55ea447\820dea78_ 692dca01\csimpleado.dll"  /R:"c:\windows\assembly\gac\system.data\1.0.5000.0__b77a5c56 1934e089\system.data.dll" /R:"c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net  files\root\5cc0a95c\ce61009a\assembly\dl2\d001dc3e\2260417a_ 692dca01\rl.dll"  /R:"c:\windows\assembly\gac\system.web.mobile\1.0.5000.0__b0 3f5f7f11d50a3a\system.web.mobile.dll"  /R:"c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net  files\root\5cc0a95c\ce61009a\assembly\dl2\194403e3\68f63379_ 692dca01\header.dll" /R:"c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net  files\root\5cc0a95c\ce61009a\assembly\dl2\dfd41d59\e0dd9c79_ 692dca01\lr.dll"  /R:"c:\windows\assembly\gac\system.web.services\1.0.5000.0__ b03f5f7f11d50a3a\system.web.services.dll"  /R:"c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net  files\root\5cc0a95c\ce61009a\assembly\dl2\1e5806b0\e0dd9c79_ 692dca01\common.dll"  /R:"c:\windows\assembly\gac\system.enterpriseservices\1.0.50 00.0__b03f5f7f11d50a3a\system.enterpriseservices.dll"  /R:"c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net  files\root\5cc0a95c\ce61009a\assembly\dl2\40e53756\fc850d7c_ 692dca01\ecprocessor.dll"  /R:"c:\windows\assembly\gac\system.xml\1.0.5000.0__b77a5c561 934e089\system.xml.dll" /R:"c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net  files\root\5cc0a95c\ce61009a\assembly\dl2\2c51d048\68f63379_ 692dca01\ccommon.dll" /R:"c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net  files\root\5cc0a95c\ce61009a\assembly\dl2\a51fe99b\864e6978_ 692dca01\cmail.dll"  /R:"c:\windows\assembly\gac\system.drawing\1.0.5000.0__b03f5 f7f11d50a3a\system.drawing.dll"  /R:"c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net  files\root\5cc0a95c\ce61009a\assembly\dl2\5a92d989\d8013c78_ 692dca01\cusps.dll" /R:"c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net files\root\5cc0a95c\ce61009a\-5yrr5qn.dll" /out:"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\root\5cc0a95c\ce61009a\nb1agryo.dll" /debug-  "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\root\5cc0a95c\ce61009a\nb1agryo.0.vb"
 
 
 Microsoft (R) Visual Basic .NET Compiler version 7.10.7017.4
 for Microsoft (R) .NET Framework version 1.1.4322.2407
 Copyright (C) Microsoft Corporation 1987-2002. All rights reserved.
 
 C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\root\5cc0a95c\ce61009a\nb1agryo.0.vb(33) : error BC30466: Namespace or type 'Transactions' for the Imports 'Transactions' cannot be found.
 
 Imports Transactions
         ~~~~~~~~~~~~
 
  
 
 
 
 Show Complete Compilation Source:
 
 
 Line  1:    '--------------------------------- ---------------------------------------------
  Line 2:    ' <autogenerated>
 Line  3:    '     Thi s code was generated by a tool.
 Line  4:    '     Run time Version: 1.1.4322.2407
 Line 5:    '
 Line  6:    '     Cha nges to this file may cause incorrect behavior and will be lost if 
 Line 7:    '     the code is regenerated.
 Line 8:    ' </autogenerated>
 Line  9:    '--------------------------------- ---------------------------------------------
  Line 10:   
 Line 11:   Option Strict Off
 Line 12:   Option Explicit On
 Line 13:   
 Line 14:   Imports ADO
 Line 15:   Imports ASP
 Line 16:   Imports Mailer
 Line 17:   Imports Microsoft.VisualBasic
 Line 18:   Imports SalesCart
 Line 19:   Imports System
 Line 20:   Imports System.Collections
 Line 21:   Imports System.Collections.Specialized
 Line 22:   Imports System.Configuration
 Line 23:   Imports System.Globalization
 Line 24:   Imports System.Text
 Line 25:   Imports System.Text.RegularExpressions
 Line 26:   Imports System.Web
 Line 27:   Imports System.Web.Caching
 Line 28:   Imports System.Web.Security
 Line 29:   Imports System.Web.SessionState
 Line 30:   Imports System.Web.UI
 Line 31:   Imports System.Web.UI.HtmlControls
 Line 32:   Imports System.Web.UI.WebControls
 Line 33:   Imports Transactions
 Line 34:   
 Line 35:   Namespace ASP
 Line 36:       
 Line 37:       Public Class shop1_aspx
 Line  38:         &nb sp; Inherits System.Web.UI.Page
 Line  39:         &nb sp; Implements System.Web.SessionState.IRequiresSessionState, System.Web.IHttpAsyncHandler
 Line  40:         &nb sp; 
 Line  41:         &nb sp; Private Shared __autoHandlers As Integer
 Line  42:         &nb sp; 
 Line  43:         &nb sp; Private Shared __initialized As Boolean = false
 Line  44:         &nb sp; 
 Line  45:         &nb sp; Private Shared __fileDependencies As System.Collections.ArrayList
 Line  46:         &nb sp; 
 Line  47:         &nb sp; 
 Line  48:         &nb sp; #ExternalSource("E:\Inetpub\media0507\cgi-bin\GetOr der.aspx",3)
 Line  49:         &nb sp; 
 Line 50:   Function GetOrder()
 Line 51:        Dim ipaddress, thedate, thetime, SQLStmt
 Line 52:        Dim SimpleAdo, Status, RS, theorderid, MerchantID
 Line 53:        '
 Line 54:        ' Include file that generates an orderid if necessary
 Line 55:        '
 Line 56:        ' DO NOT CHANGE- UNLESS YOU REALLY KNOW WHAT YOUR DOING!
 Line 57:        '
 Line 58:        ' get session order#
 Line  59:        theorderi d = Session("orderid")
 Line 60:        ' get merchant id#
 Line  61:        MerchantI D = Session("mallid")
 Line 62:   
 Line 63:        If Len(MerchantID) <= 0 Then
 Line  64:         &nb sp;   MerchantID  = 0
 Line  65:         &nb sp;   Session("mallid")  = 0
 Line 66:        End If
 Line 67:        '
 Line 68:        ' generate a new order# if none is in session
 Line 69:        If theorderid = 0 OR Len(theorderid) <= 0 Then
 Line  70:         &nb sp;   ipaddress = Request.ServerVariables("REMOTE_ADDR")
 Line 71:   
 Line  72:         &nb sp;   thedate = String.Format("{0:d}",  Now())           'get the date
 Line  73:         &nb sp;   thetime = String.Format("{0:T}",  Now())           'get the time
 Line 74:   
 Line  75:         &nb sp;   ' build a unique string to add to the database
 Line  76:         &nb sp;   ipaddress = ipaddress & "." & thedate.ToString() & thetime
 Line 77:   
 Line  78:         &nb sp;   SQLStmt = "INSERT INTO [order] (IP, Merchant) VALUES('" & ipaddress & "', " & MerchantID & ")"
 Line  79:         &nb sp;   SimpleAdo = New CSimpleAdo
 Line  80:         &nb sp;   SimpleAdo.setConnectionString  = Session("ConnectionString")
 Line  81:         &nb sp;   Status = SimpleAdo.ExecuteInsertUpdate(SQLStmt)
 Line 82:   
 Line  83:         &nb sp;   SQLStmt = "SELECT orderid FROM [order] WHERE IP = ('" & ipaddress & "')"
 Line  84:         &nb sp;   SimpleAdo = New CSimpleAdo
 Line  85:         &nb sp;   SimpleAdo.setConnectionString  = Session("ConnectionString")
 Line  86:         &nb sp;   RS = SimpleAdo.getRecordSet(SQLStmt)
 Line 87:   
 Line  88:         &nb sp;   theorderid  = RS.Fields(0).Value
 Line  89:         &nb sp;   order = theorderid
 Line  90:         &nb sp;   
 Line  91:         &nb sp;   If Session("DBType") = 1 Then
 Line  92:         &nb sp;        SQLStmt  = "INSERT INTO [customer] (orderid) VALUES (" & theorderid & ")"
 Line  93:         &nb sp;        SimpleAdo  = New CSimpleAdo
 Line  94:         &nb sp;        SimpleAdo .setConnectionString = Session("ConnectionString")
 Line  95:         &nb sp;        Status  = SimpleAdo.ExecuteInsertUpdate(SQLStmt)
 Line 96:   
 Line  97:         &nb sp;        SQLStmt  = "INSERT INTO [payment] (orderid) VALUES (" & theorderid & ")"
 Line  98:         &nb sp;        SimpleAdo  = New CSimpleAdo
 Line  99:         &nb sp;        SimpleAdo .setConnectionString = Session("ConnectionString")
 Line 100:                   Status  = SimpleAdo.ExecuteInsertUpdate(SQLStmt)
 Line 101:              Else
 Line 102:                   SQLStmt  = "INSERT INTO [NewOrder] (customer.orderid, payment.orderid) VALUES(" & theorderid & "," & theorderid & ")"
 Line 103:                   SimpleAdo  = New CSimpleAdo
 Line 104:                   SimpleAdo .setConnectionString = Session("ConnectionString")
 Line 105:                   Status  = SimpleAdo.ExecuteInsertUpdate(SQLStmt)
 Line 106:              End If
 Line 107:  
 Line 108:              ' save the order# as a session variable
 Line 109:              Session("orderid")=theorderid
 Line 110:  
 Line 111:       End If
 Line 112:  
 Line 113:              SimpleAdo = nothing
 Line 114:              RS = nothing
 Line 115:              
 Line 116:       GetOrder = theorderid
 Line 117:  
 Line 118:  End Function
 Line 119:  
 Line  120:         &n bsp;#End ExternalSource
 Line 121:            
 Line 122:            
 Line  123:         &n bsp;#ExternalSource("E:\Inetpub\media0507\cgi-bin\codepage.a spx",5)
 Line 124:            
 Line 125:   '----------------------------------------------------------- ---------
 Line 126:  ' ComCity CodePage
 Line 127:  '
 Line 128:  ' Copyright (C) 1995-2003 ComCity Corporation.  All Rights Reserved. SalesCart Family of Products.
 Line 129:  '
 Line 130:  '
 Line 131:  '
 Line 132:  ' Set the CodePage for SalesCart Software
 Line 133:  '
 Line 134:  '  A codepage is a character set that can include numbers, punctuation marks,
 Line 135:  '  and other glyphs. Different languages and locales may use different
 Line 136:  '  codepages. For example, ANSI code page 1252 is used for American
 Line 137:  '  English and most European languages; OEM code page 932 is used for
 Line 138:  '  Japanese Kanji.
 Line 139:  
 Line 140:  '  A codepage can be represented in a table as a mapping of characters to
 Line 141:  '  single-byte values or multibyte values. Many codepages share the ASCII
 Line 142:  '  character set for characters in the range 0x00 - 0x7F.
 Line 143:  
 Line 144:  
 Line 145:   '----------------------------------------------------------- ---------
 Line 146:  Sub SetCodePage()
 Line 147:  
 Line 148:       Session.codepage = 1252
 Line 149:       On Error Resume Next
 Line 150:       Session.LCID = Session ("ComboLCID")
 Line 151:       If Not (err.number = 0) Then
 Line 152:              Response.write ("<b>Can't set the Session LCID to the value specified</b><p>")
 Line 153:              Response.write ("Trying to set the Value to = " & Session ("ComboLCID") & "<br>")
 Line 154:              Response.write ("If value is Null, then you have no session")
 Line 155:              err.clear
 Line 156:              Response.end
 Line 157:       Else
 Line 158:              err.clear
 Line 159:       End If
 Line 160:  
 Line 161:  End Sub
 Line 162:  
 Line 163:  ' header.asp is the header file for all classes, functions and methods
 Line 164:  ' CSimplAdo.asp is the class definition file for ado/sql connections
 Line 165:  
 Line  166:         &n bsp;#End ExternalSource
 Line 167:            
 Line 168:            
 Line  169:         &n bsp;#ExternalSource("E:\Inetpub\media0507\cgi-bin\header.asp x",3)
 Line 170:            
 Line 171:   '----------------------------------------------------------- ---------
 Line 172:  ' ComCity Header File
 Line 173:  '
 Line 174:  ' Copyright (c) 1995-2003 ComCity Corporation.  All Rights Reserved.
 Line 175:  '
 Line 176:  '
 Line 177:  '
 Line 178:  ' Define all Function Calls, Subroutines, and classes in this file
 Line 179:  '
 Line 180:  '     CREATED February 13, 2001 by mtb
 Line 181:  '
 Line 182:  '     MODIFICATIONS
 Line 183:   '----------------------------------------------------------- ---------
 Line 184:   '     3/13/01   &nbs p; mtb        & nbsp; Needs Release 1.0
 Line 185:   '     2/12/02   mtb& nbsp;         & nbsp;         & nbsp;  Needs Release 2.0
 Line 186:  '
 Line 187:  '
 Line 188:   '----------------------------------------------------------- ---------
 Line 189:  '**Start Encode**
 Line 190:  
 Line 191:   '----------------------------------------------------------- ---------
 Line 192:  ' SUBROUTINES
 Line 193:   '----------------------------------------------------------- ---------
 Line 194:  
 Line 195:   '----------------------------------------------------------- ---------
 Line 196:  ' FUNCTIONS
 Line 197:   '----------------------------------------------------------- ---------
 Line 198:  ' FGETVAR: Returns a varible from a Request object and initializes it if its empty
 Line 199:  ' Call FGetVar(variable name,default,type) type =s for string; n for number
 Line 200:   '----------------------------------------------------------- ---------
 Line 201:  Public Function FGetVar(var,thedefault,thetype)
 Line 202:       Dim MyVar
 Line 203:       ' Perform IDC style DefaultParameter processing.
 Line 204:       If Len(Request(var)) <= 0 Then
 Line 205:       'The field is empty.  Handle the empty field condition
 Line 206:              If thetype = "s" Then
 Line 207:                   MyVar  = (CStr(thedefault))
 Line 208:              Else
 Line 209:                   MyVar  = thedefault
 Line 210:              End IF
 Line 211:       Else
 Line 212:       'The field is not empty.  Process the value
 Line 213:       'First handle error conditions
 Line 214:              If IsNumeric(Request(var)) = False and thetype = "n" Then
 Line 215:                   Response.write ("Expecting a number instead of a string for: " & var)
 Line 216:                   Response.end
 Line 217:              End If
 Line 218:  
 Line 219:              If thetype = "n" Then
 Line 220:                      MyVar  = GetABS(Request(var))
 Line 221:              Else
 Line 222:                   MyVar  = Request(var)
 Line 223:                      '     Escape single quote.  Replace single quote with two single quotes
 Line 224:                   MyVar  = Replace(MyVar,"'","''")
 Line 225:                   '     " (double quote) input
 Line 226:                   MyVar  = Replace(MyVar,"""", "" )
 Line 227:                   '     ) (close parenthesis)
 Line 228:                   MyVar  = Replace(MyVar,")", "" )
 Line 229:                   '     ( (open parenthesis)
 Line 230:                   MyVar  = Replace(MyVar,"(", "" )
 Line 231:                   '     ; (semi-colon)
 Line 232:                   MyVar  = Replace(MyVar,";", "" )
 Line 233:                   '     - (dash)
 Line 234:                   MyVar  = Replace(MyVar,"-", "" )
 Line 235:                   '     | (pipe)
 Line 236:                   MyVar  = Replace(MyVar,"|", "" )
 Line 237:  
 Line 238:              End If
 Line 239:  
 Line 240:       End If
 Line 241:              
 Line 242:       FGetVar = MyVar
 Line 243:  End Function
 Line 244:  
 Line 245:  Function GetABS(n)
 Line 246:       If n < 0 Then 
 Line 247:              return n*-1 
 Line 248:       Else 
 Line 249:              return n
 Line 250:       End if
 Line 251:  End Function
 Line 252:  
 Line 253:  Sub SetHTMLEmail
 Line 254:        Session("HTMLEmailType")="PLAI N"
 Line 255:  End Sub
 Line 256:  
 Line 257:  
 Line  258:         &n bsp;#End ExternalSource
 Line 259:            
 Line 260:            
 Line  261:         &n bsp;#ExternalSource("E:\Inetpub\media0507\cgi-bin\adovbs.asp x",4)
 Line 262:            
 Line 263:   '----------------------------------------------------------- ---------
 Line 264:  ' Microsoft ADO
 Line 265:  '
 Line 266:  ' (c) 1996 Microsoft Corporation.  All Rights Reserved.
 Line 267:  '
 Line 268:  '
 Line 269:  '
 Line 270:  ' ADO constants include file for VBScript
 Line 271:  '
 Line 272:   '----------------------------------------------------------- ---------
 Line 273:  
 Line 274:  '---- CursorTypeEnum Values ----
 Line 275:  Const adOpenForwardOnly = 0
 Line 276:  Const adOpenKeyset = 1
 Line 277:  Const adOpenDynamic = 2
 Line 278:  Const adOpenStatic = 3
 Line 279:  
 Line 280:  '---- CursorOptionEnum Values ----
 Line 281:  Const adHoldRecords = &H00000100
 Line 282:  Const adMovePrevious = &H00000200
 Line 283:  Const adAddNew = &H01000400
 Line 284:  Const adDelete = &H01000800
 Line 285:  Const adUpdate = &H01008000
 Line 286:  Const adBookmark = &H00002000
 Line 287:  Const adApproxPosition = &H00004000
 Line 288:  Const adUpdateBatch = &H00010000
 Line 289:  Const adResync = &H00020000
 Line 290:  Const adNotify = &H00040000
 Line 291:  
 Line 292:  '---- LockTypeEnum Values ----
 Line 293:  Const adLockReadOnly = 1
 Line 294:  Const adLockPessimistic = 2
 Line 295:  Const adLockOptimistic = 3
 Line 296:  Const adLockBatchOptimistic = 4
 Line 297:  
 Line 298:  '---- ExecuteOptionEnum Values ----
 Line 299:  Const adRunAsync = &H00000010
 Line 300:  
 Line 301:  '---- ObjectStateEnum Values ----
 Line 302:  Const adStateClosed = &H00000000
 Line 303:  Const adStateOpen = &H00000001
 Line 304:  Const adStateConnecting = &H00000002
 Line 305:  Const adStateExecuting = &H00000004
 Line 306:  
 Line 307:  '---- CursorLocationEnum Values ----
 Line 308:  Const adUseServer = 2
 Line 309:  Const adUseClient = 3
 Line 310:  
 Line 311:  '---- DataTypeEnum Values ----
 Line 312:  Const adEmpty = 0
 Line 313:  Const adTinyInt = 16
 Line 314:  Const adSmallInt = 2
 Line 315:  Const adInteger = 3
 Line 316:  Const adBigInt = 20
 Line 317:  Const adUnsignedTinyInt = 17
 Line 318:  Const adUnsignedSmallInt = 18
 Line 319:  Const adUnsignedInt = 19
 Line 320:  Const adUnsignedBigInt = 21
 Line 321:  Const adSingle = 4
 Line 322:  Const adDouble = 5
 Line 323:  Const adCurrency = 6
 Line 324:  Const adDecimal = 14
 Line 325:  Const adNumeric = 131
 Line 326:  Const adBoolean = 11
 Line 327:  Const adError = 10
 Line 328:  Const adUserDefined = 132
 Line 329:  Const adVariant = 12
 Line 330:  Const adIDispatch = 9
 Line 331:  Const adIUnknown = 13
 Line 332:  Const adGUID = 72
 Line 333:  Const adDate = 7
 Line 334:  Const adDBDate = 133
 Line 335:  Const adDBTime = 134
 Line 336:  Const adDBTimeStamp = 135
 Line 337:  Const adBSTR = 8
 Line 338:  Const adChar = 129
 Line 339:  Const adVarChar = 200
 Line 340:  Const adLongVarChar = 201
 Line 341:  Const adWChar = 130
 Line 342:  Const adVarWChar = 202
 Line 343:  Const adLongVarWChar = 203
 Line 344:  Const adBinary = 128
 Line 345:  Const adVarBinary = 204
 Line 346:  Const adLongVarBinary = 205
 Line 347:  
 Line 348:  '---- FieldAttributeEnum Values ----
 Line 349:  Const adFldMayDefer = &H00000002
 Line 350:  Const adFldUpdatable = &H00000004
 Line 351:  Const adFldUnknownUpdatable = &H00000008
 Line 352:  Const adFldFixed = &H00000010
 Line 353:  Const adFldIsNullable = &H00000020
 Line 354:  Const adFldMayBeNull = &H00000040
 Line 355:  Const adFldLong = &H00000080
 Line 356:  Const adFldRowID = &H00000100
 Line 357:  Const adFldRowVersion = &H00000200
 Line 358:  Const adFldCacheDeferred = &H00001000
 Line 359:  
 Line 360:  '---- EditModeEnum Values ----
 Line 361:  Const adEditNone = &H0000
 Line 362:  Const adEditInProgress = &H0001
 Line 363:  Const adEditAdd = &H0002
 Line 364:  Const adEditDelete = &H0004
 Line 365:  
 Line 366:  '---- RecordStatusEnum Values ----
 Line 367:  Const adRecOK = &H0000000
 Line 368:  Const adRecNew = &H0000001
 Line 369:  Const adRecModified = &H0000002
 Line 370:  Const adRecDeleted = &H0000004
 Line 371:  Const adRecUnmodified = &H0000008
 Line 372:  Const adRecInvalid = &H0000010
 Line 373:  Const adRecMultipleChanges = &H0000040
 Line 374:  Const adRecPendingChanges = &H0000080
 Line 375:  Const adRecCanceled = &H0000100
 Line 376:  Const adRecCantRelease = &H0000400
 Line 377:  Const adRecConcurrencyViolation = &H0000800
 Line 378:  Const adRecIntegrityViolation = &H0001000
 Line 379:  Const adRecMaxChangesExceeded = &H0002000
 Line 380:  Const adRecObjectOpen = &H0004000
 Line 381:  Const adRecOutOfMemory = &H0008000
 Line 382:  Const adRecPermissionDenied = &H0010000
 Line 383:  Const adRecSchemaViolation = &H0020000
 Line 384:  Const adRecDBDeleted = &H0040000
 Line 385:  
 Line 386:  '---- GetRowsOptionEnum Values ----
 Line 387:  Const adGetRowsRest = -1
 Line 388:  
 Line 389:  '---- PositionEnum Values ----
 Line 390:  Const adPosUnknown = -1
 Line 391:  Const adPosBOF = -2
 Line 392:  Const adPosEOF = -3
 Line 393:  
 Line 394:  '---- enum Values ----
 Line 395:  Const adBookmarkCurrent = 0
 Line 396:  Const adBookmarkFirst = 1
 Line 397:  Const adBookmarkLast = 2
 Line 398:  
 Line 399:  '---- MarshalOptionsEnum Values ----
 Line 400:  Const adMarshalAll = 0
 Line 401:  Const adMarshalModifiedOnly = 1
 Line 402:  
 Line 403:  '---- AffectEnum Values ----
 Line 404:  Const adAffectCurrent = 1
 Line 405:  Const adAffectGroup = 2
 Line 406:  Const adAffectAll = 3
 Line 407:  
 Line 408:  '---- FilterGroupEnum Values ----
 Line 409:  Const adFilterNone = 0
 Line 410:  Const adFilterPendingRecords = 1
 Line 411:  Const adFilterAffectedRecords = 2
 Line 412:  Const adFilterFetchedRecords = 3
 Line 413:  Const adFilterPredicate = 4
 Line 414:  
 Line 415:  '---- SearchDirection Values ----
 Line 416:  Const adSearchForward = 1
 Line 417:  Const adSearchBackward = -1
 Line 418:  
 Line 419:  '---- ConnectPromptEnum Values ----
 Line 420:  Const adPromptAlways = 1
 Line 421:  Const adPromptComplete = 2
 Line 422:  Const adPromptCompleteRequired = 3
 Line 423:  Const adPromptNever = 4
 Line 424:  
 Line 425:  '---- ConnectModeEnum Values ----
 Line 426:  Const adModeUnknown = 0
 Line 427:  Const adModeRead = 1
 Line 428:  Const adModeWrite = 2
 Line 429:  Const adModeReadWrite = 3
 Line 430:  Const adModeShareDenyRead = 4
 Line 431:  Const adModeShareDenyWrite = 8
 Line 432:  Const adModeShareExclusive = &Hc
 Line 433:  Const adModeShareDenyNone = &H10
 Line 434:  
 Line 435:  '---- IsolationLevelEnum Values ----
 Line 436:  Const adXactUnspecified = &Hffffffff
 Line 437:  Const adXactChaos = &H00000010
 Line 438:  Const adXactReadUncommitted = &H00000100
 Line 439:  Const adXactBrowse = &H00000100
 Line 440:  Const adXactCursorStability = &H00001000
 Line 441:  Const adXactReadCommitted = &H00001000
 Line 442:  Const adXactRepeatableRead = &H00010000
 Line 443:  Const adXactSerializable = &H00100000
 Line 444:  Const adXactIsolated = &H00100000
 Line 445:  
 Line 446:  '---- XactAttributeEnum Values ----
 Line 447:  Const adXactCommitRetaining = &H00020000
 Line 448:  Const adXactAbortRetaining = &H00040000
 Line 449:  
 Line 450:  '---- PropertyAttributesEnum Values ----
 Line 451:  Const adPropNotSupported = &H0000
 Line 452:  Const adPropRequired = &H0001
 Line 453:  Const adPropOptional = &H0002
 Line 454:  Const adPropRead = &H0200
 Line 455:  Const adPropWrite = &H0400
 Line 456:  
 Line 457:  '---- ErrorValueEnum Values ----
 Line 458:  Const adErrInvalidArgument = &Hbb9
 Line 459:  Const adErrNoCurrentRecord = &Hbcd
 Line 460:  Const adErrIllegalOperation = &Hc93
 Line 461:  Const adErrInTransaction = &Hcae
 Line 462:  Const adErrFeatureNotAvailable = &Hcb3
 Line 463:  Const adErrItemNotFound = &Hcc1
 Line 464:  Const adErrObjectInCollection = &Hd27
 Line 465:  Const adErrObjectNotSet = &Hd5c
 Line 466:  Const adErrDataConversion = &Hd5d
 Line 467:  Const adErrObjectClosed = &He78
 Line 468:  Const adErrObjectOpen = &He79
 Line 469:  Const adErrProviderNotFound = &He7a
 Line 470:  Const adErrBoundToCommand = &He7b
 Line 471:  Const adErrInvalidParamInfo = &He7c
 Line 472:  Const adErrInvalidConnection = &He7d
 Line 473:  Const adErrStillExecuting = &He7f
 Line 474:  Const adErrStillConnecting = &He81
 Line 475:  Const adErrUnsafeOperation = &He84
 Line 476:  
 Line 477:  '---- ParameterAttributesEnum Values ----
 Line 478:  Const adParamSigned = &H0010
 Line 479:  Const adParamNullable = &H0040
 Line 480:  Const adParamLong = &H0080
 Line 481:  
 Line 482:  '---- ParameterDirectionEnum Values ----
 Line 483:  Const adParamUnknown = &H0000
 Line 484:  Const adParamInput = &H0001
 Line 485:  Const adParamOutput = &H0002
 Line 486:  Const adParamInputOutput = &H0003
 Line 487:  Const adParamReturnValue = &H0004
 Line 488:  
 Line 489:  '---- CommandTypeEnum Values ----
 Line 490:  Const adCmdUnknown = &H0008
 Line 491:  Const adCmdText = &H0001
 Line 492:  Const adCmdTable = &H0002
 Line 493:  Const adCmdStoredProc = &H0004
 Line 494:  
 Line 495:  '---- SchemaEnum Values ----
 Line 496:  Const adSchemaProviderSpecific = -1
 Line 497:  Const adSchemaAsserts = 0
 Line 498:  Const adSchemaCatalogs = 1
 Line 499:  Const adSchemaCharacterSets = 2
 Line 500:  Const adSchemaCollations = 3
 Line 501:  Const adSchemaColumns = 4
 Line 502:  Const adSchemaCheckConstraints = 5
 Line 503:  Const adSchemaConstraintColumnUsage = 6
 Line 504:  Const adSchemaConstraintTableUsage = 7
 Line 505:  Const adSchemaKeyColumnUsage = 8
 Line 506:  Const adSchemaReferentialContraints = 9
 Line 507:  Const adSchemaTableConstraints = 10
 Line 508:  Const adSchemaColumnsDomainUsage = 11
 Line 509:  Const adSchemaIndexes = 12
 Line 510:  Const adSchemaColumnPrivileges = 13
 Line 511:  Const adSchemaTablePrivileges = 14
 Line 512:  Const adSchemaUsagePrivileges = 15
 Line 513:  Const adSchemaProcedures = 16
 Line 514:  Const adSchemaSchemata = 17
 Line 515:  Const adSchemaSQLLanguages = 18
 Line 516:  Const adSchemaStatistics = 19
 Line 517:  Const adSchemaTables = 20
 Line 518:  Const adSchemaTranslations = 21
 Line 519:  Const adSchemaProviderTypes = 22
 Line 520:  Const adSchemaViews = 23
 Line 521:  Const adSchemaViewColumnUsage = 24
 Line 522:  Const adSchemaViewTableUsage = 25
 Line 523:  Const adSchemaProcedureParameters = 26
 Line 524:  Const adSchemaForeignKeys = 27
 Line 525:  Const adSchemaPrimaryKeys = 28
 Line 526:  Const adSchemaProcedureColumns = 29
 Line 527:  
 Line  528:         &n bsp;#End ExternalSource
 Line 529:            
 Line 530:            
 Line  531:         &n bsp;#ExternalSource("E:\Inetpub\media0507\cgi-bin\checkpost. aspx",7)
 Line 532:            
 Line 533:  
 Line 534:  Dim emailErr, postPrice, partNum, fpDBPath, dwDBPath
 Line 535:  Dim SQLStr, quotage, partNumFound, priceTest, realPrice
 Line 536:  Dim reason
 Line 537:  
 Line 538:  Sub CheckPost()
 Line 539:  
 Line 540:       'Set to 0 to email error message to merchant
 Line 541:       'Set to 1 to display error message on error page
 Line 542:       'Set to 2 to disable security
 Line 543:       emailErr = 0
 Line 544:  
 Line 545:       'Posted variables
 Line 546:       postPrice = request("price")
 Line 547:       partNum = request("part")
 Line 548:  
 Line 549:       'FrontPage products database path
 Line 550:       fpDBPath = Application("Products1_ConnectionString")
 Line 551:  
 Line 552:       'Dreamweaver products database path
 Line 553:       dwDBPath = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("/") & "/fpdb/products.mdb;"
 Line 554:  
 Line 555:       'Search string for Products Table
 Line 556:       SQLStr = "SELECT Price FROM Products "
 Line 557:       SQLStr = SQLStr & "WHERE SKU='" & partNum & "'; "
 Line 558:  
 Line 559:       'Flag that determines if product component uses single or double qoutes
 Line 560:       quotage = 0
 Line 561:  
 Line 562:       'Number of part numbers found
 Line 563:       partNumFound = 0
 Line 564:  
 Line 565:       'Flag if price has been lowered
 Line 566:       priceTest = 0
 Line 567:  
 Line 568:       'Variable to check posted price against
 Line 569:       realPrice = 0
 Line 570:  
 Line 571:       'Security notification reason
 Line 572:       reason = ""
 Line 573:  
 Line 574:       If emailErr = 2 Then
 Line 575:              Call SetContinue()
 Line 576:       Else
 Line 577:              If Session("myemail") = "" or Session("myemail") = "no-one@domain.com" or Session ("ComboEmailType") = 0 Then
 Line 578:                   '  Email functionality is turned off, defaulted or has no From address
 Line 579:                   Call SetContinue()
 Line 580:              Else
 Line 581:                   Call ContCheck()
 Line 582:              End If
 Line 583:       End If
 Line 584:  
 Line 585:  End Sub
 Line 586:  
 Line 587:  
 Line 588:  Sub SetContinue()
 Line 589:  
 Line 590:       Dim refererGood
 Line 591:  
 Line 592:       If session("path")="" Then
 Line 593:              refererGood = checkReferer()
 Line 594:              If refererGood Then
 Line 595:                   Session("continue")  = Request.ServerVariables("HTTP_REFERER")
 Line 596:              Else
 Line 597:                   Session("continue")  = "default.htm"
 Line 598:              End If
 Line 599:       Else
 Line 600:              Session("continue") = Session("path")
 Line 601:       End If
 Line 602:       
 Line 603:  End Sub
 Line 604:  
 Line 605:  
 Line 606:  Sub securityNotification()
 Line 607:  
 Line 608:       Dim msgBody, objMail, mailres
 Line 609:  
 Line 610:       If emailErr = 0 Then
 Line 611:  
 Line 612:              msgBody = "This is an automated response sent from SalesCart" & vbCrLf & vbCrLf
 Line 613:              msgBody = msgBody & "Security Error: " & reason & vbCrLf & vbCrLf
 Line 614:              msgBody = msgBody & "Order Number: " & order & vbCrLf
 Line 615:              msgBody = msgBody & "Item Number: " & partNum & vbCrLf
 Line 616:              msgBody = msgBody & "Posted Price: " & postPrice & vbCrLf     
 Line 617:              msgBody = msgBody & "Actual Price: " & realPrice & vbCrLf & vbCrLf
 Line 618:              msgBody = msgBody & "Posting URL: " & Session("continue") & vbCrLf
 Line 619:              msgBody = msgBody & "Browser: " & Request.ServerVariables("HTTP_USER_AGENT") & vbCrLf
 Line 620:              msgBody = msgBody & "Server: " & Request.ServerVariables("SERVER_NAME") & vbCrLf
 Line 621:  
 Line 622:              Try
 Line 623:                   objMail  = New CMail
 Line 624:                   objMail .SetPluginType = Session("ComboEmailType")
 Line 625:                   objMail .SetFromAddress=Session("myemail")
 Line 626:                   objMail .AddToAddress (Session("myemail"), Session("myemail"), 1)
 Line 627:                   objMail .SetSubject="SalesCart Security Alert!"
 Line 628:                   objMail .SetBody=msgBody
 Line 629:                   objMail .SetMailServer = Session ("TxtEmailServer")
 Line 630:                   objMail .SetMailType = Session("HTMLEmailType")
 Line 631:                   mailres=objMail.SendMessage()
  Line 632:              Catch e As Exception
 Line 633:                   
 Line 634:              Finally
 Line 635:                   'Code that always executes
 Line 636:              End Try
 Line 637:       
 Line 638:       Else
 Line 639:  
 Line 640:              Response.Redirect ("referror.aspx?postURL=" & Session("continue") & "&reason=" & reason)
 Line 641:  
 Line 642:       End If
 Line 643:  
 Line 644:  End Sub
 Line 645:  
 Line 646:  
 Line 647:  Function URLDecode(strToDecode)
 Line 648:  
 Line 649:       Dim strOut
 Line 650:  
 Line 651:       strOut = strToDecode
 Line 652:       strOut = Replace(strOut,"%20"," ")
 Line 653:       URLDecode = strOut
 Line 654:  
 Line 655:  End Function
 Line 656:  
 Line 657:  
 Line 658:  Function checkReferer()
 Line 659:  
 Line 660:       Dim ServerURL, ServerURL2, CheckLength, CheckLength2
 Line 661:       Dim TestURL, TestURL2
 Line 662:  
 Line 663:       'Get Name/Address of this Server
 Line 664:       ServerURL="http://" + Request.ServerVariables("SERVER_NAME")
 Line 665:       ServerURL2="https://" + Request.ServerVariables("SERVER_NAME")
 Line 666:  
 Line 667:       'Find length of Name/Address of this Servers URL
 Line 668:       CheckLength=len(ServerURL)
 Line 669:       CheckLength2=len(ServerURL2)
 Line 670:  
 Line 671:       'Make the URL to Test
 Line 672:        TestURL=left(Request.ServerVar iables("HTTP_REFERER"),CheckLength)
  Line 673:        TestURL2=left(Request.ServerVa riables("HTTP_REFERER"),CheckLength2)
  Line 674:  
 Line 675:       If TestURL <> ServerURL and TestURL2 <> ServerURL2 Then
 Line 676:              checkReferer = 0
 Line 677:       Else
 Line 678:              checkReferer = 1
 Line 679:       End If
 Line 680:  
 Line 681:  End Function
 Line 682:  
 Line 683:  
 Line 684:  Function assignReferPg()
 Line 685:  
 Line 686:              Dim referringPg, questionMarkPos
 Line 687:  
 Line 688:              referringPg = Request.ServerVariables("HTTP_REFERER")
 Line 689:              
 Line 690:              If Instr(referringPg, "https") Then
 Line 691:                   referringPg = Replace(referringPg,"https://" & Request.ServerVariables("SERVER_NAME"),"")
 Line 692:              Else
 Line 693:                   referringPg = Replace(referringPg,"http://" & Request.ServerVariables("SERVER_NAME"),"")
 Line 694:              End If
 Line 695:       
 Line 696:              If InStr(referringPg,"?") Then
 Line 697:                   questionMarkPos  = InStr(referringPg,"?")
 Line 698:                   referringPg = Left(referringPg,questionMarkPos-1)
 Line 699:              End If     
 Line 700:  
 Line 701:              assignReferPg = referringPg
 Line 702:  
 Line 703:  End Function
 Line 704:  
 Line 705:  
 Line 706:  Sub ContCheck()
 Line 707:  
 Line 708:       Dim refererGood, referPg, objFSO, objFile
 Line 709:       Dim fileArray, x, partLine, y, searchLine
 Line 710:       Dim begPricePos, endPricePos, oConn, oRs
 Line 711:  
 Line 712:       'Set referPg
 Line 713:       If session("path")="" Then
 Line 714:  
 Line 715:              refererGood = checkReferer()
 Line 716:       
 Line 717:              If refererGood Then
 Line 718:                   referPg  = assignReferPg()
 Line 719:                   Session("continue")  = Request.ServerVariables("HTTP_REFERER")
 Line 720:              Else
 Line 721:                   Session("continue")  = "default.htm"
 Line 722:                   reason  = "The referring URL could not be determined due to security measures implemented "
 Line 723:                   reason  = reason & "on the computer. To prevent this in the future, include path.aspx in all "
 Line 724:                   reason  = reason & "your product pages or disable the checkpost feature by opening checkpost.aspx "
 Line 725:                   reason  = reason & "in the cgi-bin folder and setting emailErr to 3."
 Line 726:                   Call securityNotification()
 Line 727:                   Exit  Sub
 Line 728:              End If
 Line 729:  
 Line 730:       Else
 Line 731:  
 Line 732:              referPg = Session("path")
 Line 733:  
 Line 734:       End If
 Line 735:  
 Line 736:  
 Line 737:       'Bypass security if previous page was reorder3.aspx
 Line 738:       If Instr(referPg, "reorder3.aspx") Then
 Line 739:              Exit Sub
 Line 740:       End If
 Line 741:  
 Line 742:       If partNum = "" Then
 Line 743:              reason = "The product you are trying to add contains no part number."
 Line 744:              Call securityNotification()
 Line 745:              Exit Sub
 Line 746:       End If
 Line 747:  
 Line 748:  
 Line 749:       On Error Resume Next
 Line 750:       referPg = URLDecode(Server.Mappath(referPg))
 Line 751:       If Err.Number Then
 Line 752:              reason = "The translation of the referring URL to a disk based path failed. "
 Line 753:              reason = reason & "Contact technical support and disable the checkpost feature by opening checkpost.aspx "
 Line 754:              reason = reason & "in the cgi-bin folder and setting emailErr to 3."
 Line 755:              Call securityNotification()
 Line 756:              Exit Sub
 Line 757:       End If
 Line 758:  
 Line 759:       On Error Resume Next
 Line 760:       objFSO = CreateObject("Scripting.FileSystemObject")
 Line 761:       If Err.Number Then
 Line 762:              reason = "Unable to create object Scripting.FileSystemObject."
 Line 763:              Call securityNotification()
 Line 764:              Exit Sub
 Line 765:       End If
 Line 766:  
 Line 767:       On Error Resume Next
 Line 768:  ' This can crash locally and cannot be caught and thrown
 Line 769:       objFile = objFSO.OpenTextFile(referPg)
 Line 770:       If Err.Number Then
 Line 771:              reason = "Unable to open referring page."
 Line 772:              Call securityNotification()
 Line 773:              Exit Sub
 Line 774:       End If
 Line 775:  
 Line 776:  
 Line 777:       fileArray = Split(objFile.ReadAll,vbCrLf)
 Line 778:  
 Line 779:       For x = 0 to UBound(fileArray)
 Line 780:              If Instr(fileArray(x),"<input type=""hidden"" name=""part"" value=""" & partNum & """ >") Then
 Line 781:                   partLine  = x
 Line 782:                   partNumFound  = partNumFound + 1
 Line 783:                   quotage  = 2
 Line 784:              end if
 Line 785:  
 Line 786:              If Instr(fileArray(x),"<input type='hidden' name='part' value='" & partNum & "'>") Then
 Line 787:                   partLine  = x
 Line 788:                   partNumFound  = partNumFound + 1
 Line 789:                   quotage  = 1
 Line 790:              end if
 Line 791:       Next
 Line 792:  
 Line 793:  
 Line 794:       'Static Product Page
 Line 795:       If partNumFound = 1 Then
 Line 796:  
 Line 797:              If quotage = 2 Then     
 Line 798:                   For  y = partLine to UBound(fileArray)
 Line 799:                         searchLine = fileArray(y)
 Line 800:              
 Line 801:                        If Instr(fileArray(y),"<input type=""hidden"" name=""price"" value=""") Then
 Line 802:                              begPricePos  = Instr(fileArray(y),"<input type=""hidden"" name=""price"" value=""") + 41
 Line 803:                              realPrice  = Mid(searchLine, begPricePos)
 Line 804:                             endPricePos = Instr(realPrice, """ >")
 Line 805:                              realPrice  = Mid(realPrice,1,endPricePos-1)
 Line 806:                             Exit  For
 Line 807:                        End If
 Line 808:                   Next
  Line 809:              Else
 Line 810:                   For  y = partLine to UBound(fileArray)
 Line 811:                         searchLine = fileArray(y)
 Line 812:              
 Line 813:                        If Instr(fileArray(y),"<input type='hidden' name='price' value='") Then
 Line 814:                              begPricePos  = Instr(fileArray(y),"<input type='hidden' name='price' value='") + 41
 Line 815:                              realPrice  = Mid(searchLine, begPricePos)
 Line 816:                             endPricePos = Instr(realPrice, "'>")
 Line 817:                              realPrice  = Mid(realPrice,1,endPricePos-1)
 Line 818:                             Exit  For
 Line 819:                        End If
 Line 820:                   Next    &n bsp;
 Line 821:              End If
 Line 822:  
 Line 823:  
 Line 824:              On Error Resume Next
 Line 825:              postPrice = FormatCurrency(postPrice)
 Line 826:              If Err.Number Then
 Line 827:                   reason  = "Conversion of posted price to currency failed."
 Line 828:                   Call securityNotification()
 Line 829:                   Exit  Sub
 Line 830:              End If
 Line 831:       
 Line 832:              On Error Resume Next
 Line 833:              realPrice = FormatCurrency(realPrice)
 Line 834:              If Err.Number Then
 Line 835:                   reason  = "Conversion of price on referring page to currency failed."
 Line 836:                   Call securityNotification()
 Line 837:                   Exit  Sub
 Line 838:              End If
 Line 839:  
 Line 840:              If postPrice <> realPrice AND postPrice < realPrice Then
 Line 841:                   priceTest  = 1
 Line 842:              End If
 Line 843:       
 Line 844:  
 Line 845:       'Dynamic Product Page
 Line 846:       Elseif partNumFound = 0 Then
 Line 847:  
 Line 848:  
 Line 849:              On Error Resume Next
 Line 850:              oConn = Server.CreateObject("ADODB.Connection")
 Line 851:              If Err.Number Then
 Line 852:                   reason  = "ADODB object not found on server."
 Line 853:                   Call securityNotification()
 Line 854:                   Exit  Sub
 Line 855:              End If
 Line 856:  
 Line 857:              On Error Resume Next
 Line 858:              oConn.Open (fpDBPath)
 Line 859:              If Err.Number Then
 Line 860:                   On Error Resume Next
 Line 861:                   oConn.Open (dwDBPath)
 Line 862:                   If Err.Number Then
 Line 863:                        reason  = "The path to the products database is invalid. "
 Line 864:                        reason  = reason & "Open checkpost.aspx and change fpDBPath (for FrontPage) "
 Line 865:                        reason  = reason & "or dwDBPath (for Dreamweaver) to a valid database path."
 Line 866:                        Call securityNotification()
 Line 867:                        Exit  Sub
 Line 868:                   End If
 Line 869:              End If
 Line 870:  
 Line 871:              On Error Resume Next
 Line 872:              oRs = oConn.Execute(SQLStr)
 Line 873:              If Err.Number Then
 Line 874:                   reason  = "You are using a products database other than the one we provided or have changed "
 Line 875:                   reason  = reason & "the design of the products database we provided. "
 Line 876:                   reason  = reason & "Make sure the products database contains a table called Products with fields "
 Line 877:                   reason  = reason & "Price and SKU. Otherwise, open checkpost.aspx and modify the "
 Line 878:                   reason  = reason & "SQL string to match your products table name and field names. "
 Line 879:                   Call securityNotification()
 Line 880:                   Exit  Sub
 Line 881:              End If
 Line 882:  
 Line 883:              If oRs.EOF Then
 Line 884:                   reason  = "Part number from posting page was not found in database."
 Line 885:                   Call securityNotification()
 Line 886:                   Exit  Sub
 Line 887:              End If
 Line 888:  
 Line 889:              Do While NOT oRs.EOF
 Line 890:                   On Error Resume Next
 Line 891:                   realPrice = FormatCurrency(oRs("price"))
 Line 892:                   If Err.Number Then
 Line 893:                        reason  = "Conversion of product price in database to currency failed."
 Line 894:                        Call securityNotification()
 Line 895:                        Exit  Sub
 Line 896:                   End If
 Line 897:  
 Line 898:  
 Line 899:                   On Error Resume Next
 Line 900:                   postPrice = FormatCurrency(postPrice)
 Line 901:                   If Err.Number Then
 Line 902:                        reason  = "Conversion of posted price to currency failed."
 Line 903:                        Call securityNotification()
 Line 904:                        Exit  Sub
 Line 905:                   End If     
 Line 906:  
 Line 907:  
 Line 908:                   If postPrice <> realPrice AND postPrice < realPrice Then
 Line 909:                             priceTest  = 1
 Line 910:                   End If
 Line 911:       
 Line 912:                   partNumFound  = partNumFound + 1
 Line 913:                   oRs.MoveNext
 Line 914:              Loop
 Line 915:  
 Line 916:              If partNumFound > 1 Then
 Line 917:                   reason  = "There are two instances of the part number in the database."
 Line 918:                   Call securityNotification()
 Line 919:                   Exit  Sub
 Line 920:              End If
 Line 921:  
 Line 922:  
 Line 923:       Else
 Line 924:              
 Line 925:              reason = "The posting page has duplicate part numbers."
 Line 926:              Call securityNotification()
 Line 927:              Exit Sub
 Line 928:  
 Line 929:       End If
 Line 930:  
 Line 931:  
 Line 932:       If priceTest=1 Then
 Line 933:              reason = "Price posted does not match price on posting page or database."
 Line 934:              Call securityNotification()
 Line 935:              Exit Sub
 Line 936:       End If 
 Line 937:  
 Line 938:  End Sub
 Line 939:  
 Line  940:         &n bsp;#End ExternalSource
 Line 941:            
 Line 942:            
 Line  943:         &n bsp;#ExternalSource("E:\Inetpub\media0507\cgi-bin\shop1.aspx ",12)
 Line 944:            
 Line 945:  
 Line 946:  Dim Order
 Line 947:  
 Line 948:  Sub Page_Load()
 Line 949:  
 Line 950:       Dim showdiscount, savevol, savedis, savecodes, savediscodes
 Line 951:       Dim Quantity, part, price, rawprice, description 
 Line 952:       Dim units, size, weight, taxed, upsell
 Line 953:       Dim upsellpath, minqty, divqty, buy, free
 Line 954:       Dim extraship, extrahand, extratax, taxed2, minprice
 Line 955:       Dim merchant, auctionprice, requiresku, payloadurl, thestring
 Line 956:       Dim CalcObj, DiscountObj, SimpleAdo, BuyFree, discounted
 Line 957:       Dim discountcode, Status, Postpone
 Line 958:       Dim objSimpleAdo, rstRS, SQLStmt
 Line 959:  
 Line 960:       Order = GetOrder()
 Line 961:       CheckPost()
 Line 962:  
 Line 963:       'Customer changed cart contents.  Reset Checkout
 Line 964:       Session("CheckoutSubtotal") = 0
 Line 965:  
 Line 966:       showdiscount = 0.0
 Line 967:       savevol = "NA"
 Line 968:       savedis = "NA"
 Line 969:       savecodes = "NA"
 Line 970:       savediscodes = "NA"
 Line 971:  
 Line 972:       'READ-IN variables
 Line 973:       Quantity = GetABS(FGetVar("Quantity",0,"n"))
 Line 974:       part = FGetVar("part","None","s")
 Line 975:       price = FGetVar("price",0,"n")
 Line 976:       rawprice = FGetVar("price",0,"n")
 Line 977:       description = FGetVar("description","None","s")
 Line 978:       units = FGetVar("units","each","s")
 Line 979:       size = FGetVar("prodsize",0,"n")
 Line 980:       weight = FGetVar("weight",0,"n")
 Line 981:       taxed = FGetVar("taxed","No","s")
 Line 982:       upsell = FGetVar("upsell","","s")
 Line 983:  
 Line 984:       upsellpath = FGetVar("upsellpath","","s")
 Line 985:       minqty = GetABS(FGetVar("minqty",0,"n"))
 Line 986:       divqty = GetABS(FGetVar("divqty",0,"n"))
 Line 987:       buy = GetABS(FGetVar("buyqty",0,"n"))
 Line 988:       free = GetABS(FGetVar("freeqty",0,"n"))
 Line 989:       extraship = GetABS(FGetVar("prod_shipping",0,"n"))
 Line 990:       extrahand = GetABS(FGetVar("prod_handling",0,"n"))
 Line 991:       extratax = GetABS(FGetVar("extratax",0,"n"))
 Line 992:       taxed2 = FGetVar("taxed2","No","s")
 Line 993:       minprice = GetABS(FGetVar("pricemin",0,"n"))
 Line 994:       merchant = FGetVar("merchantcode",0,"n")
 Line 995:       auctionprice = FGetVar("auctionprice","0","n")
 Line 996:       requiresku = FGetVar("requiresku","","s")
 Line 997:       payloadurl = FGetVar("PayloadURL","None","s")
 Line 998:  
 Line 999:       'CHECK WHICH BUTTON was checked
 Line 1000:      Try
 Line 1001:             If Request("FRIENDButton.x") Then
 Line 1002:                  thestring  = "EmailFriend.aspx" & "?description=" & description & "&price=" & rawprice & "&link="
 Line 1003:                  thestring  = thestring & Request.ServerVariables("HTTP_REFERER") & "&part=" & part
 Line 1004:                  Response.Redirect (thestring)
 Line 1005:                  Response.End
  Line 1006:             End If
 Line 1007:      Catch e As Exception
 Line 1008:                  
 Line 1009:      Finally
 Line 1010:                  'Code that always executes
 Line 1011:      End Try
 Line 1012: 
 Line 1013:      Try
 Line 1014:             If Request("WISHButton.x") Then
 Line 1015:                  Response.Redirect ("WishList.aspx")
 Line 1016:                  Response.End
  Line 1017:             End If
 Line 1018:      Catch e As Exception
 Line 1019:                  
 Line 1020:      Finally
 Line 1021:                  'Code that always executes
 Line 1022:      End Try
 Line 1023: 
 Line 1024:      Try
 Line 1025:             If Request("BIDButton.x") Then
 Line 1026:                  thestring  = "BidSearch.aspx" & "?part=" & part
 Line 1027:                  Response.Redirect (thestring)
 Line 1028:                  Response.End
  Line 1029:             End If
 Line 1030:      Catch e As Exception
 Line 1031:                  
 Line 1032:      Finally
 Line 1033:                  'Code that always executes
 Line 1034:      End Try
 Line 1035: 
 Line 1036:      'DO OPTIONS
 Line 1037:      CalcObj = New CCalcObj
 Line 1038:      'Get the Option cancatenation String
 Line 1039:      description = CalcObj.getOption (description)
 Line 1040:      description = CalcObj.SimpleOption (description)
 Line 1041:      price = CalcObj.getIncrease (price)
 Line 1042:      rawprice = price
 Line 1043: 
 Line 1044:      'DO AUCTION Stuff Next
 Line 1045:      If auctionprice <> "" Then
 Line 1046:             CalcObj = New CCalcObj
 Line 1047:             'Check minimum price
 Line 1048:             CalcObj.ChkAuctionMin (auctionprice,minprice)
 Line 1049: 
 Line 1050:             If (CSng(auctionprice)) > 0 then
 Line 1051:                  price  = auctionprice
 Line 1052:                  rawprice  = auctionprice
 Line 1053:             End If
 Line 1054:      End If
 Line 1055: 
 Line 1056:      'DO QUANTITY calculation checks
 Line 1057:      CalcObj = New CCalcObj
 Line 1058:      'Check minimum quantity
 Line 1059:      CalcObj.ChkMin (Quantity,minqty)
 Line 1060:      'Check divisble quantity
 Line 1061:      CalcObj.ChkDiv (Quantity,divqty)
 Line 1062:      'Check buy get free quantity
 Line 1063:      BuyFree = CalcObj.BuyFree (Quantity,buy,free)
 Line 1064:      BuyFree = CInt(BuyFree)
 Line 1065: 
 Line 1066:      If BuyFree > 0 Then
 Line 1067:             price = (price * Quantity)/(BuyFree + Quantity)
 Line 1068:             Quantity = Quantity + BuyFree
 Line 1069:      End If
 Line 1070: 
 Line 1071:      'DO PRICE DISCOUNTING on item by item basis
 Line 1072:      'see view1.asp for whole order discounting
 Line 1073:      dim volarray(6)
 Line 1074:      dim disarray(6)
 Line 1075:      'discounted = No means absolute amt; Yes means % discount
 Line 1076:      discounted = FGetVar("discounted","No","s")
 Line 1077:      volarray(1) = FGetVar("volume1",100000,"n")
 Line 1078:      volarray(2) = FGetVar("volume2",100000,"n")
 Line 1079:      volarray(3) = FGetVar("volume3",100000,"n")
 Line 1080:      volarray(4) = FGetVar("volume4",100000,"n")
 Line 1081:      volarray(5) = FGetVar("volume5",100000,"n")
 Line 1082:      volarray(6) = FGetVar("volume6",100000,"n")
 Line 1083:      disarray(1) = FGetVar("discount1",0.0,"n")
 Line 1084:      disarray(2) = FGetVar("discount2",0.0,"n")
 Line 1085:      disarray(3) = FGetVar("discount3",0.0,"n")
 Line 1086:      disarray(4) = FGetVar("discount4",0.0,"n")
 Line 1087:      disarray(5) = FGetVar("discount5",0.0,"n")
 Line 1088:      disarray(6) = FGetVar("discount6",0.0,"n")
 Line 1089:      dim ccode(4)
 Line 1090:      dim cdiscount(4)
 Line 1091:      discountcode = FGetVar("DiscountCode","None","s")
 Line 1092:      ccode(1) = FGetVar("code1","empty","s")
 Line 1093:      ccode(2) = FGetVar("code2","empty","s")
 Line 1094:      ccode(3) = FGetVar("code3","empty","s")
 Line 1095:      ccode(4) = FGetVar("code4","empty","s")
 Line 1096:      cdiscount(1) = FGetVar("cdiscount1",0,"n")
 Line 1097:      cdiscount(2) = FGetVar("cdiscount2",0,"n")
 Line 1098:      cdiscount(3) = FGetVar("cdiscount3",0,"n")
 Line 1099:      cdiscount(4) = FGetVar("cdiscount4",0,"n")
 Line 1100: 
 Line 1101:      'DO QUANTITY Discounts First
 Line 1102:      'Make sure there is a Discount greater than 0 for the first Discount or no discounts
 Line 1103:      If disarray(1) > 0 then
 Line 1104:             DiscountObj = New CDiscountObj
 Line 1105:             ' Create strings to save discount and quantity information in database
 Line 1106:             savevol = DiscountObj.SaveIt (1,6,volarray)
 Line 1107:             savedis = DiscountObj.SaveIt (1,6,disarray)
 Line 1108:             DiscountObj.setPriceVars = price
 Line 1109:             'Figures discount and returns public vars showdiscount,showprice,and price
 Line 1110:             price = DiscountObj.GetDiscount (Quantity,volarray,disarray,discounted)
 Line 1111:      End IF
 Line 1112: 
 Line 1113:      'DO DISCOUNT CODES Next
 Line 1114:      If cdiscount(1) > 0 then
 Line 1115:             'Do Discount codes
 Line 1116:             DiscountObj = New CDiscountObj
 Line 1117:             DiscountObj.setPriceVars = price
 Line 1118:             price = DiscountObj.ChkDiscountCode (discountcode,ccode,cdiscount)
 Line 1119:             savecodes = DiscountObj.SaveIt (1,4,ccode)
 Line 1120:             savediscodes = DiscountObj.SaveIt (1,4,cdiscount)
 Line 1121:      End IF
 Line 1122:      'Recompute Total Discount
 Line 1123:      DiscountObj = New CDiscountObj
 Line 1124:      DiscountObj.setPriceVars = price
 Line 1125:      showdiscount = DiscountObj.showDiscount (RawPrice)
 Line 1126: 
 Line 1127:      'WRITE STUFF to Database
 Line 1128:      SQLStmt = "INSERT INTO item "
 Line 1129:      SQLStmt = SQLStmt & "([Orderid], Discount, [Quantity], Item, Price, Description, Units, [Size], Weight, Taxed, Upsell, Volume_Levels, Discount_Levels, "
 Line 1130:      SQLStmt = SQLStmt & "RawPrice, UpsellPath, MinQty, DivQty, Buy, Free, Taxed2, ExtraTax, ExtraShip, ExtraHand, MinPrice, Codes, Discount_Codes, [MId#], RequireSKU, Discounted, PayloadURL)"
 Line 1131:      SQLStmt = SQLStmt & "VALUES (" & Order & ", " & showdiscount & ", " & Quantity & ", '" & part & "', '" & price & "', "
 Line 1132:      SQLStmt = SQLStmt & "'" & description & "', '" & units & "', '" & size & "', '" & weight & "', '" & taxed & "', '" & upsell & "', "
 Line 1133:      SQLStmt = SQLStmt & "'" & savevol & "', '" & savedis & "', '" & RawPrice & "', '" & upsellpath & "', " & minqty & ", "
 Line 1134:      SQLStmt = SQLStmt & divqty & ", " & buy & ", " & free & ", '" & taxed2 & "', " & extratax & ", "
 Line 1135:      SQLStmt = SQLStmt & extraship & ", " & extrahand & ", '" & minprice & "', '" & savecodes & "', '" & savediscodes & "', "
 Line 1136:      SQLStmt = SQLStmt & merchant & ",'" & requiresku & "', '" & discounted & "','" & payloadurl & "'); "
 Line 1137: 
 Line 1138: 'Response.write (SQLStmt)
 Line 1139: 'Response.end
 Line 1140: 
 Line 1141:      SimpleAdo = New CSimpleAdo
 Line 1142:      SimpleAdo.setConnectionString = Session("ConnectionString")
 Line 1143:      Status = SimpleAdo.ExecuteInsertUpdate(SQLStmt)
 Line 1144:      'Do stuff with the record set
 Line 1145: 
 Line 1146:      SimpleAdo = nothing
 Line 1147: 
 Line 1148:      'REFRESH to next page
 Line 1149:      Postpone = FGetVar("postpone","False","s")
 Line 1150:      If Postpone = "False" OR Postpone = "FALSE" Then
 Line 1151:             Response.Redirect ("view1.aspx")
 Line 1152:      Else
 Line 1153:             Response.Redirect (Session("continue"))
 Line 1154:      End IF
 Line 1155: 
 Line 1156: End Sub
 Line 1157: 
 Line 1158:         #End ExternalSource
 Line 1159:         
 Line 1160:         Public Sub New()
 Line  1161:         & nbsp;   MyBase.New
  Line 1162:               Dim dependencies As System.Collections.ArrayList
 Line 1163:               If (ASP.shop1_aspx.__initialized = false) Then
 Line  1164:         & nbsp;       dependencies  = New System.Collections.ArrayList
 Line  1165:         & nbsp;       dependencies. Add("E:\Inetpub\media0507\cgi-bin\codepage.aspx")
  Line  1166:         & nbsp;       dependencies. Add("E:\Inetpub\media0507\cgi-bin\header.aspx")
  Line  1167:         & nbsp;       dependencies. Add("E:\Inetpub\media0507\cgi-bin\adovbs.aspx")
  Line  1168:         & nbsp;       dependencies. Add("E:\Inetpub\media0507\cgi-bin\GetOrder.aspx")
  Line  1169:         & nbsp;       dependencies. Add("E:\Inetpub\media0507\cgi-bin\shop1.aspx")
  Line  1170:         & nbsp;       dependencies. Add("E:\Inetpub\media0507\cgi-bin\checkpost.aspx")
  Line  1171:         & nbsp;       ASP.shop1_asp x.__fileDependencies = dependencies
 Line  1172:         & nbsp;       ASP.shop1_asp x.__initialized = true
 Line 1173:               End If
 Line  1174:         & nbsp;   Me.AspCompatMode  = true
 Line 1175:         End Sub
 Line 1176:         
 Line 1177:         Protected Overrides Property AutoHandlers As Integer
 Line  1178:         & nbsp;   Get
 Line  1179:         & nbsp;       Return  ASP.shop1_aspx.__autoHandlers
 Line 1180:               End Get
 Line  1181:         & nbsp;   Set
 Line  1182:         & nbsp;       ASP.shop1_asp x.__autoHandlers = value
 Line 1183:               End Set
 Line 1184:         End Property
 Line 1185:         
 Line 1186:         Protected ReadOnly Property ApplicationInstance As ASP.global_asax
 Line  1187:         & nbsp;   Get
 Line  1188:         & nbsp;       Return  CType(Me.Context.ApplicationInstance,ASP.global_asax)
 Line 1189:               End Get
 Line 1190:         End Property
 Line 1191:         
 Line 1192:         Public Overrides ReadOnly Property TemplateSourceDirectory As String
 Line  1193:         & nbsp;   Get
 Line  1194:         & nbsp;       Return  "/cgi-bin"
 Line 1195:               End Get
 Line 1196:         End Property
 Line 1197:         
 Line 1198:         Private Sub __BuildControlTree(ByVal __ctrl As System.Web.UI.Control)
 Line  1199:         & nbsp;   __ctrl.SetRenderMethodDelegate(Addres sOf Me.__Render__control1)
 Line 1200:         End Sub
 Line 1201:         
 Line 1202:         Private Sub __Render__control1(ByVal __output As System.Web.UI.HtmlTextWriter, ByVal parameterContainer As System.Web.UI.Control)
 Line  1203:         & nbsp;   __output.Write("<!DOCTYPE  html PUBLIC ""-//W3C//DTD XHTML 1.0 Strict//EN"" ""http://www.w3.org/TR/xh"& _ 
 Line 1204:  "tml1/DTD/xhtml1-strict.dtd"">"&Microsoft.VisualBasic.Chr W(13)&Microsoft.VisualBasic.ChrW(10)&Microsoft.VisualBasic.C hrW(13)&Microsoft.VisualBasic.ChrW(10))
  Line  1205:         & nbsp;   __output.Write("<!DOCTYPE  html PUBLIC ""-//W3C//DTD XHTML 1.0 Strict//EN"" ""http://www.w3.org/TR/xh"& _ 
 Line 1206:  "tml1/DTD/xhtml1-strict.dtd"">"&Microsoft.VisualBasic.Chr W(13)&Microsoft.VisualBasic.ChrW(10)&Microsoft.VisualBasic.C hrW(13)&Microsoft.VisualBasic.ChrW(10))
  Line  1207:         & nbsp;   __output.Write("<!DOCTYPE  html PUBLIC ""-//W3C//DTD XHTML 1.0 Strict//EN"" ""http://www.w3.org/TR/xh"& _ 
 Line 1208:  "tml1/DTD/xhtml1-strict.dtd"">"&Microsoft.VisualBasic.Chr W(13)&Microsoft.VisualBasic.ChrW(10)&Microsoft.VisualBasic.C hrW(13)&Microsoft.VisualBasic.ChrW(10))
  Line  1209:         & nbsp;   __output.Write("<!DOCTYPE  html PUBLIC ""-//W3C//DTD XHTML 1.0 Strict//EN"" ""http://www.w3.org/TR/xh"& _ 
 Line 1210:  "tml1/DTD/xhtml1-strict.dtd"">"&Microsoft.VisualBasic.Chr W(13)&Microsoft.VisualBasic.ChrW(10)&Microsoft.VisualBasic.C hrW(13)&Microsoft.VisualBasic.ChrW(10))
  Line 1211:               
 Line  1212:         & nbsp;   #ExternalSource("E:\Inetpub\media0507 \cgi-bin\header.aspx",92)
 Line 1213:               
 Line 1214: SetHTMLEmail()
 Line 1215: 
 Line 1216:               
 Line  1217:         & nbsp;   #End ExternalSource
 Line  1218:         & nbsp;   __output.Write("<!DOCTYPE  html PUBLIC ""-//W3C//DTD XHTML 1.0 Strict//EN"" ""http://www.w3.org/TR/xh"& _ 
 Line 1219:  "tml1/DTD/xhtml1-strict.dtd"">"&Microsoft.VisualBasic.Chr W(13)&Microsoft.VisualBasic.ChrW(10)&Microsoft.VisualBasic.C hrW(13)&Microsoft.VisualBasic.ChrW(10)&Microsoft.VisualBasic .ChrW(13)&Microsoft.VisualBasic.ChrW(10))
  Line  1220:         & nbsp;   __output.Write("<!DOCTYPE  html PUBLIC ""-//W3C//DTD XHTML 1.0 Strict//EN"" ""http://www.w3.org/TR/xh"& _ 
 Line 1221:  "tml1/DTD/xhtml1-strict.dtd"">"&Microsoft.VisualBasic.Chr W(13)&Microsoft.VisualBasic.ChrW(10)&Microsoft.VisualBasic.C hrW(13)&Microsoft.VisualBasic.ChrW(10))
  Line 1222:         End Sub
 Line 1223:         
 Line 1224:         Protected Overrides Sub FrameworkInitialize()
 Line  1225:         & nbsp;   Me.__BuildControlTree(Me)
  Line  1226:         & nbsp;   Me.FileDependencies  = ASP.shop1_aspx.__fileDependencies
 Line  1227:         & nbsp;   Me.EnableViewStateMac  = true
 Line  1228:         & nbsp;   Me.Request.ValidateInput
  Line 1229:         End Sub
 Line 1230:         
 Line 1231:         Public Overrides Function GetTypeHashCode() As Integer
 Line  1232:         & nbsp;   Return -683747614
 Line 1233:         End Function
 Line 1234:         
 Line 1235:         Public Overridable Function BeginProcessRequest(ByVal context As System.Web.HttpContext, ByVal cb As System.AsyncCallback, ByVal data As Object) As System.IAsyncResult Implements System.Web.IHttpAsyncHandler.BeginProcessRequest
 Line  1236:         & nbsp;   Return Me.AspCompatBeginProcessRequest(context, cb, data)
 Line 1237:         End Function
 Line 1238:         
 Line 1239:         Public Overridable Sub EndProcessRequest(ByVal ar As System.IAsyncResult) Implements System.Web.IHttpAsyncHandler.EndProcessRequest
 Line  1240:         & nbsp;   Me.AspCompatEndProcessRequest(ar)
  Line 1241:         End Sub
 Line 1242:     End Class
 Line 1243: End Namespace
 Line 1244: 
  
 
 
 
 
  ------------------------------------------------------------ --------------------
 Version Information: Microsoft .NET Framework Version:1.1.4322.2407; ASP.NET Version:1.1.4322.2407 
          | 
         
        
      
 
  Replies: 
       
      Posted By: admin
       
      Date Posted: December/28/09 at 10:36am
       
      
        
          | 
	
Did you get this issue resolved?
          | 
         
        
        
       
      
      Posted By: debbie
       
      Date Posted: December/28/09 at 1:53pm
       
      
        
       
      
      Posted By: admin
       
      Date Posted: July/29/10 at 12:32pm
       
      
        
          | 
	
Ok, this is something you can contact Technical support for and they will fix it for you for free.  Your just missing a file.
          | 
         
        
        
       
      
     |