<% Class clsLarry1 Private rSessionUID '1 Private rMessage '2 Private rClipArtFile '3 Private rClipArtFile2 '3 Private mActionFileName '4 Private mClipArtFolder '5 Private mClsFolder Private mCustomize Private mMaxSections '6 Private mMaxTextLines '7 Private mWidthMaxMM '8 Private mHeightMaxMM '9 Private mMaxFontSize '10 Private mStampShape '11 Private mProductID '12 Private mBlockWidth Private mBlockHeight Private mBlockContent Private Conn Private ImagePercent Private ImagePercent2 Private Sub Class_Initialize() Dim arr,clsCN,clsRS,clsSQL arr=Array(12) rSessionUID=CStr(Session.SessionID) rMessage="" mActionFileName="" mClipArtFolder="stamps/images/ClipArt/" mClsFolder="stamps/" Conn="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="& Server.MapPath("database/L5XL7L1D.mdb") If not IsEmpty(Session.Contents(rSessionUID)) then arr=Session.Contents(rSessionUID) rSessionUID=arr(1) rMessage=arr(2) rClipArtFile=arr(3) mActionFileName=arr(4) mClipArtFolder=arr(5) mClsFolder=arr(6) rClipArtFile2=arr(7) mProductID = arr(12) else 'Initialize New Session if Request.QueryString("ProductCode")<>"" then mProductID=Request.QueryString("ProductCode") ElseIf Session("tequilamProductID")<>"" then mProductID=Session("tequilamProductID") Elseif Request.Form("ProductCode")<>"" then mProductID=Request.Form("ProductCode") Else mProductID = 21 End if End if on error resume next Set clsCN = Server.CreateObject("ADODB.Connection") clsCN.Open Conn IF Err.Number<>0 then Conn="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="& Server.MapPath("../database/L5XL7L1D.mdb") clsCN.Open Conn end if clsSQL = "SELECT * FROM Products WHERE ProductCode='"& mProductID &"'" Set clsRS = Server.CreateObject("ADODB.Recordset") clsRS.Open clsSQL,clsCN,0,1 If Not clsRS.EOF then mMaxSections = clsRS.Fields("MaxSections") mMaxTextLines = clsRS.Fields("MaxTextLines") mWidthMaxMM = CDbl(clsRS.Fields("WidthInches")) '*25.4'clsRS.Fields("WidthMaxMM") mHeightMaxMM = CDbl(clsRS.Fields("HeightInches"))' *25.4'clsRS.Fields("HeightMaxMM") mMaxFontSize = clsRS.Fields("MaxFontSize") mStampShape = clsRS.Fields("StampShape") mBlockWidth = clsRS.Fields("BlockWidth") mBlockHeight = clsRS.Fields("BlockHeight") mBlockContent = clsRS.Fields("BlockContent") mCustomize = clsRS.Fields("Customize") End if clsRS.Close clsCN.Close Set clsRS = Nothing Set clsCN = Nothing End Sub Private Sub Class_Terminate() Dim arr arr=Array(12) arr(1) = rSessionUID arr(2) = rMessage arr(3) = rClipArtFile arr(4) = mActionFileName arr(5) = mClipArtFolder arr(6) = mClsFolder arr(7) = rClipArtFile2 arr(12)= mProductID Session.Contents(rSessionUID)=arr Response.Write(rSessionUID) End Sub Public Property Let ActionFileName(strN)' = 0 mActionFileName=strN End Property Public Property Let ClipArtFolder(strN) mClipArtFolder=strN End Property Public Property Let ClsFolder(strN)' = 0 mClsFolder=strN End Property Public Sub Play() if Request.Form("larForm")="FirstForm" then if int(Request.Form("larImageAlignment2"))>0 then WriteClipOrUpload2 elseif int(Request.Form("larImageAlignment"))>0 then WriteClipOrUpload else WriteSecondForm end if elseif Request.Form("larForm")="SecondForm" then DrawImage WriteLastForm elseif Request.Form("larForm")="ClipOrUpload" then if Request.Form("larContinue")="Select" then WriteClipForm elseif Request.Form("larContinue")="Upload" then WriteUploadForm end if elseif Request.Form("larForm")="ClipOrUpload2" then if Request.Form("larContinue")="Select" then WriteClipForm2 elseif Request.Form("larContinue")="Upload" then WriteUploadForm2 end if elseif Request.Form("larForm")="ClipForm" then if Request.Form("larClipLoop")="0" and Request.Form("larPrev")="ClipOrUpload" then WriteSecondForm elseif Request.Form("larClipLoop")="0" and Request.Form("larPrev")="LastForm" then DrawImage WriteLastForm else WriteClipForm end if elseif Request.Form("larForm")="ClipForm2" then if Request.Form("larClipLoop")="0" and Request.Form("larPrev")="ClipOrUpload2" then if int(Request.Form("larImageAlignment"))>0 then WriteClipOrUpload else WriteSecondForm end if elseif Request.Form("larClipLoop")="0" and Request.Form("larPrev")="LastForm" then DrawImage WriteLastForm else WriteClipForm end if elseif Request.Form("larForm")="UploadForm" then if Request.Form("larPrev")="ClipOrUpload" then WriteSecondForm elseif Request.Form("larPrev")="ClipOrUpload2" then WriteSecondForm elseif Request.Form("larPrev")="LastForm" then DrawImage WriteLastForm end if elseif Request.Form("larForm")="UploadForm2" then if Request.Form("larPrev")="ClipOrUpload2" then if int(Request.Form("larImageAlignment"))>0 then WriteClipOrUpload else WriteSecondForm end if elseif Request.Form("larPrev")="LastForm" then DrawImage WriteLastForm end if elseif Request.Form("larForm")="LastForm" then if Request.Form("larContinue2")="Select" then WriteClipForm2 elseif Request.Form("larContinue2")="Upload" then WriteUploadForm2 elseif Request.Form("larContinue")="Select" then WriteClipForm elseif Request.Form("larContinue")="Upload" then WriteUploadForm else DrawImage WriteLastForm end if Else WriteFirstForm End if End Sub Private Sub DrawBlockDie() Dim X,ImageBlock,tmp,tmp2 Set ImageBlock=Server.CreateObject("AspImage.Image") ImageBlock.Autosize=false ImageBlock.PadSize=0 ImageBlock.ClearImage ImageBlock.MaxX = CDBL(mBlockWidth) ImageBlock.MaxY = CDbl(mBlockHeight) If mBlockContent <> "" Then If Instr(1,mBlockContent,"YY",1) OR Instr(1,mBlockContent,"BLACK",1) OR mBlockContent = "BLUE" Then X = UCASE(MonthName(Month(Date))) X = Mid(X,1,3) & " " If Len(Day(Date)) = 1 Then X = X & "0" & Day(Date) Else X = X & Day(Date) End If If mBlockContent = "YY" Then X = X & " " & Mid(Year(Date),3,2) Else X = X & " " & Year(Date) End If ' mBlockContent = X Else X=mBlockContent End If ImageBlock.PenColor = RGB(&hCC,&hCC,&hCC) ImageBlock.PenStyle = 1 ImageBlock.PenWidth = 1 ImageBlock.BackgroundColor = RGB(&hCC,&hCC,&hCC) ImageBlock.Rectangle 1,1,ImageBlock.MaxX,ImageBlock.MaxY If X <> "" Then ImageBlock.FontColor = vbBlack ImageBlock.Bold = False ImageBlock.Italic = False ImageBlock.FontName = "Courier New" ImageBlock.FontSize = 10 tmp=ImageBlock.TextWidth(Trim(X)) if tmp>ImageBlock.MaxX then tmp=ImageBlock.MaxX end if tmp1=ImageBlock.TextHeight(X) ImageBlock.TextOut X,(ImageBlock.MaxX-tmp)/2,(ImageBlock.MaxY-tmp1)/2,false ImageBlock.FileName = Server.MapPath(mClsFolder&"images/test2.jpg") ImageBlock.SaveImage End If End If End Sub Private Sub DrawImage() Dim Image,i,j,x,y,z Dim ins_w,ins_h,lin_w,lin_h,drw_w,drw_h Dim imagecolor,borderthick,maxtext,tmp,tmp1 Set Image=Server.CreateObject("AspImage.Image") Image.Autosize=false Image.PadSize=0 If int(mStampShape)=1 then Image.BackgroundColor= RGB(&hCC,&hCC,&hCC) else Image.BackgroundColor= RGB(&hff,&hff,&hff) end if Image.ClearImage Image.MaxX = CDBL(mWidthMaxMM) *96 Image.MaxY = CDbl(mHeightMaxMM) *96 x=0 y=0 z=0 ins_w=0 ins_h=0 lin_w=0 lin_h=0 drw_w=Image.MaxX drw_h=Image.MaxY borderthick=0 maxtext=0 Select Case int(Request.Form("larStampColor")) Case 1 : imagecolor = RGB(&hCC,&h00,&h00) 'vbred Case 2 : imagecolor = RGB(&h00,&hCC,&h00) 'vbgreen Case 3 : imagecolor = RGB(&h00,&h00,&hCC) 'vbblue Case 4 : imagecolor = RGB(&hCC,&h00,&hCC) Case else : imagecolor = RGB(&h00,&h00,&h00) 'vbblack End Select If int(mStampShape)=1 then 'if round draw white circle background Image.BackgroundColor= RGB(&hff,&hff,&hff) Image.BrushStyle= 0 Image.PenColor= vbWhite Image.Ellipse borderthick/2,borderthick/2,Image.MaxX-(borderthick/2),Image.MaxY-(borderthick/2) Image.BrushStyle= 1 end if If int(Request.Form("larBorder"))>0 or int(Request.Form("larBorderThickness"))>0 then'if has border draw border Image.PenColor=imagecolor Image.PenWidth=int(Request.Form("larBorderThickness")) borderthick=int(Request.Form("larBorderThickness")) if borderthick<>0 then drw_w=drw_w-(borderthick*2) drw_h=drw_h-(borderthick*2) y=y+(borderthick) End if End if If int(mMaxSections)=1 and mBlockContent <> "" Then DrawBlockDie Select Case mBlockContent Case "BLACKR" 'AlignRight NoBorder Image.AddImage Server.MapPath(mClsFolder&"images/test2.jpg"), borderthick+((drw_w-mBlockWidth)), borderthick+((drw_h-mBlockHeight)/2) drw_w=drw_w-mBlockWidth Case "YYYYR" 'AlignRight NoBorder Image.AddImage Server.MapPath(mClsFolder&"images/test2.jpg"), borderthick+((drw_w-mBlockWidth)), borderthick+((drw_h-mBlockHeight)/2) drw_w=drw_w-mBlockWidth Case "YYYYB" 'AlignBottom NoBorder Image.AddImage Server.MapPath(mClsFolder&"images/test2.jpg"), borderthick+((drw_w-mBlockWidth)/2), borderthick+((drw_h-mBlockHeight)) drw_h=drw_h-mBlockHeight End Select end if Dim ImageClip,XCLip,YClip, clsCN,clsRS,clsSQL If Request.Form("SuccessUpload")="success" then Set ImageClip=Server.CreateObject("AspImage.Image") ImageClip.LoadImage Server.MapPath(mClsFolder&"images/uploaded/"& Request.Form("rClipArtFile")) ImageClip.Contrast 75 ImageClip.CreateBlackWhite ImageClip.FileName = Server.MapPath(mClsFolder&"images/test1.jpg") ImageClip.SaveImage ImageClip.LoadImage Server.MapPath(mClsFolder&"images/uploaded/"& Request.Form("rClipArtFile")) ImageClip.PenColor = imagecolor ImageClip.PenStyle = 2 ImageClip.PenWidth = 1 ImageClip.BackgroundColor = imagecolor ImageClip.Rectangle 1,1,Image.MaxX,Image.MaxY ImageClip.AddImageTransparent Server.MapPath(mClsFolder&"images/test1.jpg"),1,1,VbBlack rClipArtFile=Request.Form("rClipArtFile") XClip=ImageClip.MaxX If int(ImageClip.MaxY)>int(Image.MaxY-borderthick) then ImagePercent=((drw_h-2-borderthick-borderthick)/ImageClip.MaxY)*100 If Isnumeric(Request.Form("larImageSize")) and Request.Form("larImageSize")<>"" then ImageClip.ResizeR ImageClip.MaxX*(int(REquest.Form("larImageSize"))/100),ImageClip.MaxY*(int(REquest.Form("larImageSize"))/100) Else ImageClip.ResizeR ImageClip.MaxX*(int(ImagePercent)/100),ImageClip.MaxY*(int(ImagePercent)/100) rMessage=rMessage &"Inserted Image exceeds max width/height. Reduced to "& FormatNumber(ImagePercent,0) &"%.
" End if else If int(REquest.Form("larImageSize"))>0 then ImageClip.ResizeR ImageClip.MaxX*(int(REquest.Form("larImageSize"))/100),ImageClip.MaxY*(int(REquest.Form("larImageSize"))/100) End if ImagePercent=100 End if XClip=ImageClip.MaxX YClip=ImageClip.MaxY ImageClip.FileName = Server.MapPath(mClsFolder&"images/test1.jpg") ImageClip.SaveImage'rMessage=ImageClip.Error &"
" Select Case int(mMaxSections) Case 1: Select Case int(Request.Form("larImageAlignment")) Case 2: Image.AddImage Server.MapPath(mClsFolder&"images/test1.jpg"), borderthick+(drw_w-XClip)-1, borderthick+((drw_h-YClip)/2) Case Else: Image.AddImage Server.MapPath(mClsFolder&"images/test1.jpg"), borderthick+1, borderthick+((drw_h-YClip)/2) End Select Case 2: Select Case int(Request.Form("larImageAlignment")) Case 2: Image.AddImage Server.MapPath(mClsFolder&"images/test1.jpg"), borderthick+(drw_w-XClip)-1, borderthick+( (drw_h-mBlockHeight-(2*YClip))/4) Case Else: Image.AddImage Server.MapPath(mClsFolder&"images/test1.jpg"), borderthick+1, borderthick+( (drw_h-mBlockHeight-(2*YClip))/4) End Select End Select elseif Request.Form("larIDclip")<>"" and int(Request.Form("larImageAlignment"))<>0 then Set clsCN = Server.CreateObject("ADODB.Connection") clsCN.Open Conn clsSQL="Select ClipArtID,ClipArtName FROM [ClipArt] WHERE ClipArtID ="& int(Request.Form("larIDclip")) Set clsRS=Server.CreateObject("ADODB.Recordset") clsRS.Open clsSQL,clsCN,0,1 If not clsRS.EOF then Set ImageClip=Server.CreateObject("AspImage.Image") ImageClip.LoadImage Server.MapPath(mClipArtFolder& Request.Form("larIDcategory") &"/"& clsRS.Fields("ClipArtName") &".jpg") ImageClip.Contrast 75 ImageClip.CreateBlackWhite ImageClip.FileName = Server.MapPath(mClsFolder&"images/test1.jpg") ImageClip.SaveImage ImageClip.LoadImage Server.MapPath(mClipArtFolder& Request.Form("larIDcategory") &"/"& clsRS.Fields("ClipArtName") &".jpg") ImageClip.PenColor = imagecolor ImageClip.PenStyle = 2 ImageClip.PenWidth = 1 ImageClip.BackgroundColor = imagecolor ImageClip.Rectangle 1,1,Image.MaxX,Image.MaxY ImageClip.AddImageTransparent Server.MapPath(mClsFolder&"images/test1.jpg"),1,1,VbBlack rClipArtFile=Request.Form("larIDcategory") &"/"& clsRS.Fields("ClipArtName") &".jpg" XClip=ImageClip.MaxX If int(ImageClip.MaxY)>int(Image.MaxY-borderthick) then ImagePercent=((drw_h-2-borderthick-borderthick)/ImageClip.MaxY)*100 If int(REquest.Form("larImageSize"))>0 then ImageClip.ResizeR ImageClip.MaxX*(int(REquest.Form("larImageSize"))/100),ImageClip.MaxY*(int(REquest.Form("larImageSize"))/100) Else ImageClip.ResizeR ImageClip.MaxX*(int(ImagePercent)/100),ImageClip.MaxY*(int(ImagePercent)/100) rMessage=rMessage &"Inserted Image exceeds max width/height. Reduced to "& FormatNumber(ImagePercent,0) &"%.
" End if else If int(REquest.Form("larImageSize"))>0 then ImageClip.ResizeR ImageClip.MaxX*(int(REquest.Form("larImageSize"))/100),ImageClip.MaxY*(int(REquest.Form("larImageSize"))/100) End if ImagePercent=100 End if XClip=ImageClip.MaxX YClip=ImageClip.MaxY ImageClip.FileName = Server.MapPath(mClsFolder&"images/test1.jpg") ImageClip.SaveImage'rMessage=ImageClip.Error &"
" Select Case int(mMaxSections) Case 1: Select Case int(Request.Form("larImageAlignment")) Case 2: Image.AddImage Server.MapPath(mClsFolder&"images/test1.jpg"), borderthick+(drw_w-XClip)-1, borderthick+((drw_h-YClip)/2) Case Else: Image.AddImage Server.MapPath(mClsFolder&"images/test1.jpg"), borderthick+1, borderthick+((drw_h-YClip)/2) End Select Case 2: Select Case int(Request.Form("larImageAlignment")) Case 2: Image.AddImage Server.MapPath(mClsFolder&"images/test1.jpg"), borderthick+(drw_w-XClip)-1, borderthick+( (drw_h-mBlockHeight-(2*YClip))/4) Case Else: Image.AddImage Server.MapPath(mClsFolder&"images/test1.jpg"), borderthick+1, borderthick+( (drw_h-mBlockHeight-(2*YClip))/4) End Select End Select 'end of mMaxSections End if end if tmp="" Select Case Request.Form("larImageAlignment2") Case "": tmp="0" Case else: tmp=Request.Form("larImageAlignment2") end Select If Request.Form("SuccessUpload2")="success" then Set ImageClip=Server.CreateObject("AspImage.Image") ImageClip.LoadImage Server.MapPath(mClsFolder&"images/uploaded/"& Request.Form("rClipArtFile2")) ImageClip.Contrast 75 ImageClip.CreateBlackWhite ImageClip.FileName = Server.MapPath(mClsFolder&"images/test1.jpg") ImageClip.SaveImage ImageClip.LoadImage Server.MapPath(mClsFolder&"images/uploaded/"& Request.Form("rClipArtFile2")) ImageClip.PenColor = imagecolor ImageClip.PenStyle = 2 ImageClip.PenWidth = 1 ImageClip.BackgroundColor = imagecolor ImageClip.Rectangle 1,1,Image.MaxX,Image.MaxY ImageClip.AddImageTransparent Server.MapPath(mClsFolder&"images/test1.jpg"),1,1,VbBlack rClipArtFile2=Request.Form("rClipArtFile2") XClip=ImageClip.MaxX If int(ImageClip.MaxY)>int(Image.MaxY-borderthick) then ImagePercent2=((drw_h-2-borderthick-borderthick)/ImageClip.MaxY)*100 If Isnumeric(Request.Form("larImageSize2")) and Request.Form("larImageSize2")<>"" then ImageClip.ResizeR ImageClip.MaxX*(int(REquest.Form("larImageSize2"))/100),ImageClip.MaxY*(int(REquest.Form("larImageSize2"))/100) Else ImageClip.ResizeR ImageClip.MaxX*(int(ImagePercent2)/100),ImageClip.MaxY*(int(ImagePercent2)/100) rMessage=rMessage &"Inserted below Image exceeds max width/height. Reduced to "& FormatNumber(ImagePercent2,0) &"%.
" End if else If int(REquest.Form("larImageSize2"))>0 then ImageClip.ResizeR ImageClip.MaxX*(int(REquest.Form("larImageSize2"))/100),ImageClip.MaxY*(int(REquest.Form("larImageSize2"))/100) End if ImagePercent2=100 End if XClip=ImageClip.MaxX YClip=ImageClip.MaxY ImageClip.FileName = Server.MapPath(mClsFolder&"images/test1.jpg") ImageClip.SaveImage'rMessage=ImageClip.Error &"
" Select Case int(mMaxSections) Case 1: Select Case int(Request.Form("larImageAlignment2")) Case 2: Image.AddImage Server.MapPath(mClsFolder&"images/test1.jpg"), borderthick+(drw_w-XClip)-1, borderthick+((drw_h-YClip)/2) Case Else: Image.AddImage Server.MapPath(mClsFolder&"images/test1.jpg"), borderthick+1, borderthick+((drw_h-YClip)/2) End Select Case 2: Select Case int(Request.Form("larImageAlignment2")) Case 2: Image.AddImage Server.MapPath(mClsFolder&"images/test1.jpg"), borderthick+(drw_w-XClip)-1, borderthick+( ((3*drw_h)+mBlockHeight-(2*YClip))/4 )'((drw_h-mBlockHeight)/2)+mBlockHeight+1 Case Else: Image.AddImage Server.MapPath(mClsFolder&"images/test1.jpg"), borderthick+1, borderthick+( ((3*drw_h)+mBlockHeight-(2*YClip))/4 )'((drw_h-mBlockHeight)/2)+mBlockHeight+1 End Select end Select 'end of mMaxSections elseif Request.Form("larIDclip2")<>"" and int(tmp)<>0 then Set clsCN = Server.CreateObject("ADODB.Connection") clsCN.Open Conn clsSQL="Select ClipArtID,ClipArtName FROM [ClipArt] WHERE ClipArtID ="& int(Request.Form("larIDclip2")) Set clsRS=Server.CreateObject("ADODB.Recordset") clsRS.Open clsSQL,clsCN,0,1 If not clsRS.EOF then Set ImageClip=Server.CreateObject("AspImage.Image") ImageClip.LoadImage Server.MapPath(mClipArtFolder& Request.Form("larIDcategory2") &"/"& clsRS.Fields("ClipArtName") &".jpg") ImageClip.Contrast 75 ImageClip.CreateBlackWhite ImageClip.FileName = Server.MapPath(mClsFolder&"images/test1.jpg") ImageClip.SaveImage ImageClip.LoadImage Server.MapPath(mClipArtFolder& Request.Form("larIDcategory2") &"/"& clsRS.Fields("ClipArtName") &".jpg") ImageClip.PenColor = imagecolor ImageClip.PenStyle = 2 ImageClip.PenWidth = 1 ImageClip.BackgroundColor = imagecolor ImageClip.Rectangle 1,1,Image.MaxX,Image.MaxY ImageClip.AddImageTransparent Server.MapPath(mClsFolder&"images/test1.jpg"),1,1,VbBlack rClipArtFile2=Request.Form("larIDcategory2") &"/"& clsRS.Fields("ClipArtName") &".jpg" XClip=ImageClip.MaxX If int(maxtext)int(Image.MaxY-borderthick) then ImagePercent2=((drw_h-2-borderthick-borderthick)/ImageClip.MaxY)*100 If int(REquest.Form("larImageSize2"))>0 then ImageClip.ResizeR ImageClip.MaxX*(int(REquest.Form("larImageSize2"))/100),ImageClip.MaxY*(int(REquest.Form("larImageSize2"))/100) Else ImageClip.ResizeR ImageClip.MaxX*(int(ImagePercent2)/100),ImageClip.MaxY*(int(ImagePercent2)/100) rMessage=rMessage &"Inserted Image exceeds max width/height. Reduced to "& FormatNumber(ImagePercent2,0) &"%.
" End if else If int(REquest.Form("larImageSize2"))>0 then ImageClip.ResizeR ImageClip.MaxX*(int(REquest.Form("larImageSize2"))/100),ImageClip.MaxY*(int(REquest.Form("larImageSize2"))/100) End if ImagePercent2=100 End if XClip=ImageClip.MaxX YClip=ImageClip.MaxY ImageClip.FileName = Server.MapPath(mClsFolder&"images/test1.jpg") ImageClip.SaveImage'rMessage=ImageClip.Error &"
" Select Case int(mMaxSections) Case 1: Select Case int(Request.Form("larImageAlignment2")) Case 2: Image.AddImage Server.MapPath(mClsFolder&"images/test1.jpg"), borderthick+(drw_w-XClip)-1, borderthick+((drw_h-YClip)/2) Case Else: Image.AddImage Server.MapPath(mClsFolder&"images/test1.jpg"), borderthick+1, borderthick+((drw_h-YClip)/2) End Select Case 2: Select Case int(Request.Form("larImageAlignment2")) Case 2: Image.AddImage Server.MapPath(mClsFolder&"images/test1.jpg"), borderthick+(drw_w-XClip)-1, borderthick+( ((3*drw_h)+mBlockHeight-(2*YClip))/4 )'((drw_h-mBlockHeight)/2)+mBlockHeight+1 Case Else: Image.AddImage Server.MapPath(mClsFolder&"images/test1.jpg"), borderthick+1, borderthick+( ((3*drw_h)+mBlockHeight-(2*YClip))/4 )'((drw_h-mBlockHeight)/2)+mBlockHeight+1 End Select End Select 'end of mMaxSections End if end if If (int(Request.Form("larBorder"))>0 or int(Request.Form("larBorderThickness"))>0) and (mBlockContent <> "BLACKR" and mBlockContent <> "YYYYR" and mBlockContent <> "YYYYB") then Image.PenColor=imagecolor Image.PenWidth=int(Request.Form("larBorderThickness")) Image.BrushStyle= 1 if borderthick=0 then elseif int(mStampShape)=0 then if borderthick>1 then Image.Rectangle borderthick/2,borderthick/2,Image.MaxX-(borderthick/2)+1,Image.MaxY-(borderthick/2)+1 else Image.Rectangle borderthick/2,borderthick/2,Image.MaxX-(borderthick/2),Image.MaxY-(borderthick/2) end if elseif int(mStampShape)=1 then if borderthick>1 then Image.Ellipse borderthick/2,borderthick/2,Image.MaxX-(borderthick/2)+1,Image.MaxY-(borderthick/2)+1 else Image.Ellipse borderthick/2,borderthick/2,Image.MaxX-(borderthick/2),Image.MaxY-(borderthick/2) end if End if End if If int(Request.Form("larNumTextLines"))>0 or int(Request.Form("larNumHorizontalLines"))>0 then Image.FontColor=imagecolor For i=1 to Int(Request.Form("larNumTextLines")) Select Case int(Request.Form("larTextFont"&i)) Case 1:Image.FontName="Times New Roman" Case 2:Image.FontName="Courier" Case 3:Image.FontName="Comic Sans MS" Case Else:Image.FontName="Arial" End Select Image.FontSize=int(Request.Form("larTextFontSize"&i)) Select Case int(Request.Form("larTextFontStyle"&i)) Case 1: Image.Bold=True Image.Italic=False Case 2: Image.Bold=False Image.Italic=True Case 3: Image.Bold=True Image.Italic=True Case else: Image.Bold=False Image.Italic=False end Select ins_w=Image.TextWidth (Request.Form("larText"&i)) If int(maxtext)0 or int(tmp1)>0 then Image.FontColor=imagecolor For i=1 to Int(Request.Form("larNumTextLines2")) Select Case int(Request.Form("larTextFont2"&i)) Case 1:Image.FontName="Times New Roman" Case 2:Image.FontName="Courier" Case 3:Image.FontName="Comic Sans MS" Case Else:Image.FontName="Arial" End Select Image.FontSize=int(Request.Form("larTextFontSize2"&i)) Select Case int(Request.Form("larTextFontStyle2"&i)) Case 1: Image.Bold=True Image.Italic=False Case 2: Image.Bold=False Image.Italic=True Case 3: Image.Bold=True Image.Italic=True Case else: Image.Bold=False Image.Italic=False End Select ins_w=Image.TextWidth (Request.Form("larText2"&i)) If int(maxtext)int(Image.MaxY-borderthick) then rMessage=rMessage &"Image Elements exceeds max height.
" End if If int(maxtext)>int(Image.MaxX-borderthick) then rMessage=rMessage &"Image Elements exceeds max width.
" End if Image.FileName = Server.MapPath(mClsFolder&"images/test.jpg") if Image.SaveImage then if IsNumeric(Request.Form("larStampZoom")) and Request.Form("larStampZoom")<>"" then Image.LoadImage Server.MapPath(mClsFolder&"images/test.jpg") Image.ResizeR Image.MaxX*(int(REquest.Form("larStampZoom"))/100),Image.MaxY*(int(REquest.Form("larStampZoom"))/100) Image.FileName = Server.MapPath(mClsFolder&"images/test.jpg") Image.SaveImage end if Randomize%>


<% else rMessage="
"&Image.Error&"
" end if if rMessage<>"" then Response.Write "
"& rMessage &"
" end if End Sub Private Sub WriteFourHorseMen()%> <%if int(REquest.Form("larborderthickness"))>0 then%> <%else%> <%end if%><% End Sub Private Sub WriteClipIDs()%> <% End Sub Private Sub WriteOtherHiddenVar() For each i in Request.Form if Left(i,3)<>"lar" then Response.Write "" end if Next End Sub Private Sub WriteFirstForm()%>
<% If mMaxSections = 2 Then%> <% ElseIf mMaxSections = 1 Then%> <% End if%>
Please select how many text lines you want on your stamp.
Number of text lines above:
Number of text lines below:
Please select how many text lines you want on your stamp.
Number of text lines:
<% If mCustomize <> "3" Then'request%>
<% If mMaxSections = 2 Then%> <% ElseIf mMaxSections = 1 Then%> <% End if%>
Would you like to include an image on your stamp? If so, where would you like it placed on the stamp?
Above Image location:
Below Image location:
Would you like to include an image on your stamp? If so, where would you like it placed on the stamp?
Image location:
<% ELse%><% End if%>
<% If mMaxSections = 2 Then%> <% ElseIf mMaxSections = 1 Then%> <% End if%>
Would you like to include horizontal lines under each line of text?
If so, how many?
Number of horizontal lines above:
Number of horizontal lines below:
Would you like to include horizontal lines under each line of text?
If so, how many?
Number of horizontal lines:

Would you like to include a border on your stamp?
Border:

<%WriteOtherHiddenVar%>
<% End Sub Private Sub WriteLastForm()%>
&larEdit=<%=Request.QueryString("larEdit")%>" name="larLastForm" id="larLastForm" method="post"> <%'if request.Form("larForm")="ClipForm" or Request.Form("larContinue1")="Select" then%> <%'end if%><% WriteFourhorseMen WriteClipIDs%> <%Dim i,j%>
Stamp Color
Stamp Border Thickness
Zoom %

<% dim tmp tmp="" if Request.Form("larNumTextLines")="" then tmp="0" else tmp=Request.Form("larNumTextLines") end if If int(tmp)>0 then %> <% For i = 1 to int(Request.Form("larNumTextLines"))%> <% Next%><% tmp="" if Request.Form("larNumTextLines2")="" then tmp="0" else tmp=Request.Form("larNumTextLines2")%> <% end if For i = 1 to int(tmp)%> <% Next%>
Text Information
# TextFontSizeStyleSpace
Above
Space
Below
Align
<%=i%> "> "> ">
Block Separator
<%=i%> "> "> ">

<% End if tmp="" if Request.Form("larNumHorizontalLines2")="" then tmp="0" else tmp=Request.Form("larNumHorizontalLines2") end if If int(Request.Form("larNumHorizontalLines"))>0 or int(tmp)>0 then%> <% For i = 1 to int(Request.Form("larNumHorizontalLines"))%> <% Next%><% tmp="" if Request.Form("larNumHorizontalLines2")="" then tmp="0" else tmp=Request.Form("larNumHorizontalLines2")%> <% end if For i = 1 to int(tmp)%> <% Next%>
Line Information - Adjust your horizontal Lines here
# Location Width Thickness Space
Above
Space
Below
Align
<%=i%> "" then%><%=Request.Form("larLineWidth"&i)%><%else%>100<%end if%>">% "> ">
Block Separator
<%=i%> "" then%><%=Request.Form("larLineWidth2"&i)%><%else%>100<%end if%>">% "> ">

<% End if tmp="" if Request.Form("larImageAlignment2")="" then tmp="0" else tmp=Request.Form("larImageAlignment2") end if If int(Request.Form("larImageAlignment"))>0 or int(tmp)>0 then%> <% If int(Request.Form("larImageAlignment"))>0 then dim tmp1 If Request.Form("SuccessUpload")="success" then tmp1=mClsFolder&"images/uploaded/"& rClipArtFile else tmp1=mClsFolder&"images/ClipArt/"& rClipArtFile end if%> <% End if tmp="" if Request.Form("larImageAlignment2")="" then tmp="0" else tmp=Request.Form("larImageAlignment2") end if If int(tmp)>0 then dim tmp2 If Request.Form("SuccessUpload2")="success" then tmp2=mClsFolder&"images/uploaded/"& rClipArtFile2 else tmp2=mClsFolder&"images/ClipArt/"& rClipArtFile2 end if%>
Art Information
Image % Size Change
"" then%> <%=REquest.Form("larImageSize")%> <%elseIf int(FormatNumber(ImagePercent,0))<>int(REquest.Form("larImageSize")) then%> <%=FormatNumber(ImagePercent,0)%> <%end if%>">%
Select from the ClipArt Gallery or Upload File
"" then%> <%=REquest.Form("larImageSize2")%> <%elseIf int(FormatNumber(ImagePercent2,0))<>int(REquest.Form("larImageSize2")) then%> <%=FormatNumber(ImagePercent2,0)%> <%end if%>">%
Select from the ClipArt Gallery or Upload File

<% end if End if%>
<%WriteOtherHiddenVar%>
<% Dim larrycart',tmp larrycart="" larrycart=Request.Form("larNumTextLines") &";"& Request.Form("larImageAlignment") &";"& Request.Form("larNumHorizontalLines") &";"& Request.Form("larBorder") larrycart=larrycart &";"& Request.Form("larStampColor") &";"& Request.Form("larBorderThickness") &";"& Request.Form("larImageSize") &";"& Request.Form("larIDcategory") &";"& Request.Form("larIDclip") &";"& Request.Form("SuccessUpload") tmp="" if int(Request.Form("larNumHorizontalLines"))>0 then For i=1 to int(Request.Form("larNumHorizontalLines")) if tmp="" then tmp=Request.Form("larLineLocation"&i) &":"& Request.Form("larLineWidth"&i) &":"& Request.Form("larLineThickness"&i) &":"& Request.Form("larLineSpaceAbove"&i) &":"& Request.Form("larLineSpaceBelow"&i) &":"& Request.Form("larLineAlignment"&i) else tmp=tmp &";"& Request.Form("larLineLocation"&i) &":"& Request.Form("larLineWidth"&i) &":"& Request.Form("larLineThickness"&i) &":"& Request.Form("larLineSpaceAbove"&i) &":"& Request.Form("larLineSpaceBelow"&i) &":"& Request.Form("larLineAlignment"&i) end if Next end if larrycart=larrycart &""& tmp larrycart=larrycart &""& rClipArtFile tmp="" if int(Request.Form("larNumTextLines"))>0 then For i=1 to int(Request.Form("larNumTextLines")) if tmp="" then tmp=Request.Form("larText"&i) &""& Request.Form("larTextFont"&i) &":"& Request.Form("larTextFontSize"&i) &":"& Request.Form("larTextFontStyle"&i) &":"& Request.Form("larTextSpaceAbove"&i) &":"& Request.Form("larTextSpaceBelow"&i) &":"& Request.Form("larTextAlignment"&i) else tmp=tmp &""& Request.Form("larText"&i) &""& Request.Form("larTextFont"&i) &":"& Request.Form("larTextFontSize"&i) &":"& Request.Form("larTextFontStyle"&i) &":"& Request.Form("larTextSpaceAbove"&i) &":"& Request.Form("larTextSpaceBelow"&i) &":"& Request.Form("larTextAlignment"&i) end if Next end if larrycart=larrycart &""& tmp larrycart=larrycart &""& mProductID Session.Contents("larrytmpcart")=larrycart larrycart="" larrycart=Request.Form("larNumTextLines2") &";"& Request.Form("larImageAlignment2") &";"& Request.Form("larNumHorizontalLines2") &";"& Request.Form("larBorder") larrycart=larrycart &";"& Request.Form("larStampColor") &";"& Request.Form("larBorderThickness2") &";"& Request.Form("larImageSize2") &";"& Request.Form("larIDcategory2") &";"& Request.Form("larIDclip2") &";"& Request.Form("SuccessUpload2") tmp="" tmp1="" if Request.Form("larNumHorizontalLines2")="" then tmp1="0" else tmp1=Request.Form("larNumHorizontalLines2") end if if int(tmp1)>0 then For i=1 to int(tmp1) if tmp="" then tmp=Request.Form("larLineLocation2"&i) &":"& Request.Form("larLineWidth2"&i) &":"& Request.Form("larLineThickness2"&i) &":"& Request.Form("larLineSpaceAbove2"&i) &":"& Request.Form("larLineSpaceBelow2"&i) &":"& Request.Form("larLineAlignment2"&i) else tmp=tmp &";"& Request.Form("larLineLocation2"&i) &":"& Request.Form("larLineWidth2"&i) &":"& Request.Form("larLineThickness2"&i) &":"& Request.Form("larLineSpaceAbove2"&i) &":"& Request.Form("larLineSpaceBelow2"&i) &":"& Request.Form("larLineAlignment2"&i) end if Next end if larrycart=larrycart &""& tmp larrycart=larrycart &""& rClipArtFile2 tmp="" tmp1="" if Request.Form("larNumTextLines2")="" then tmp1="0" else tmp1=Request.Form("larNumTextLines2") end if if int(tmp1)>0 then For i=1 to int(tmp1) if tmp="" then tmp=Request.Form("larText2"&i) &""& Request.Form("larTextFont2"&i) &":"& Request.Form("larTextFontSize2"&i) &":"& Request.Form("larTextFontStyle2"&i) &":"& Request.Form("larTextSpaceAbove2"&i) &":"& Request.Form("larTextSpaceBelow2"&i) &":"& Request.Form("larTextAlignment2"&i) else tmp=tmp &""& Request.Form("larText2"&i) &""& Request.Form("larTextFont2"&i) &":"& Request.Form("larTextFontSize2"&i) &":"& Request.Form("larTextFontStyle2"&i) &":"& Request.Form("larTextSpaceAbove2"&i) &":"& Request.Form("larTextSpaceBelow2"&i) &":"& Request.Form("larTextAlignment2"&i) end if Next end if larrycart=larrycart &""& tmp larrycart=larrycart &""& mProductID Session.Contents("larrytmpcart")=Session.Contents("larrytmpcart") &""& larrycart End Sub Private Sub WriteSecondForm()%>
<% If int(Request.Form("larBorder"))>0 then%> <% End if If int(Request.Form("larNumTextLines"))>0 then%> <% For i = 1 to int(Request.Form("larNumTextLines"))%> <% Next%>
Text Information
#TextAlign
<%=i%> ">

<% End if dim tmp tmp="" if Request.Form("larNumTextLines2")="" then tmp="0" else tmp=Request.Form("larNumTextLines2") end if If int(tmp)>0 then%> <% For i = 1 to int(Request.Form("larNumTextLines2"))%> <% Next%>
Text Information Below
#TextAlign
<%=i%> ">

<% End if If int(Request.Form("larNumHorizontalLines"))>0 then%> <% Dim j For i = 1 to int(Request.Form("larNumHorizontalLines"))%> <% Next%>
Line Information
#Location
<%=i%>
<% End if tmp="" if Request.Form("larNumHorizontalLines2")="" then tmp="0" else tmp=Request.Form("larNumHorizontalLines2") end if If int(tmp)>0 then%>
<% ' Dim j For i = 1 to int(Request.Form("larNumHorizontalLines2"))%> <% Next%>
Line Information Below
#Location
<%=i%>
<% End if %>
<% WriteOtherHiddenVar WriteClipIDs WriteFourhorseMen%>
<% End Sub Private Sub WriteClipOrUpload()%>
 
Select from the online clip art library. This includes our standard images
 
 
Upload File
<% For each i in Request.Form if i="larForm" or i="larContinue" or i="larNumTextLines" or i="larNumTextLines2" or i="larImageAlignment" or i="larImageAlignment2" or i="larNumHorizontalLines" or i="larNumHorizontalLines2" or i="larBorder" or i="" then elseif Left(i,3)="lar" then Response.Write "" end if Next WriteOtherHiddenVar WriteFourhorseMen%>
<% End Sub Private Sub WriteClipOrUpload2()%>
 
Select from the online clip art library. This includes our standard images
 
 
Upload File
<% WriteOtherHiddenVar WriteFourhorseMen%>
<% End Sub Private Sub WriteUploadForm()%>
Upload files to your server

Files:

 

<% for each i in Request.Form Session.Contents("tequila"&i)=Request.Form(i) next Session.Contents("tequilarSessionUID")=rSessionUID Session.Contents("tequilarMessage")=rMessage Session.Contents("tequilarClipArtFile")=rClipArtFile Session.Contents("tequilamActionFileName")=mActionFileName Session.Contents("tequilamClipArtFolder")=mClipArtFolder Session.Contents("tequilamClsFolder")=mClsFolder Session.Contents("tequilamProductID")=mProductID End Sub Private Sub WriteUploadForm2()%>
Upload files to your server

Files:

 

<% for each i in Request.Form Session.Contents("tequila"&i)=Request.Form(i) next Session.Contents("tequilarSessionUID")=rSessionUID Session.Contents("tequilarMessage")=rMessage Session.Contents("tequilarClipArtFile")=rClipArtFile Session.Contents("tequilarClipArtFile2")=rClipArtFile2 Session.Contents("tequilamActionFileName")=mActionFileName Session.Contents("tequilamClipArtFolder")=mClipArtFolder Session.Contents("tequilamClsFolder")=mClsFolder Session.Contents("tequilamProductID")=mProductID End Sub Private Sub WriteClipForm() Dim clsCN,clsRS,clsSQL,i%>
"> "> <% For each i in Request.Form if i="larForm" or i="larPrev" or i="larClipLoop" or i="larContinue" or i="SuccessUpload" or i="larIDcategory" or i="larIDclip" or i="larClipLoop" then elseif i="SuccessUpload2" then elseif i="larNumTextLines" or i="larImageAlignment" or i="larNumHorizontalLines" or i="larBorder" then elseif i="larNumTextLines2" or i="larImageAlignment2" or i="larNumHorizontalLines2" or i="larBorder" then elseif Left(i,3)="lar" then Response.Write "" end if Next %>
ClipArt Categories
<% Set clsCN = Server.CreateObject("ADODB.Connection") clsCN.Open Conn clsSQL = "SELECT * FROM [ClipArtCategories] ORDER BY ClipArtCategoryName" Set clsRS = Server.CreateObject("ADODB.Recordset") clsRS.Open clsSQL,clsCN,0,1 Do While Not clsRS.EOF%> ');return false;"><%= clsRS.Fields("ClipArtCategoryName")%>
<% clsRS.MoveNext Loop clsRS.Close Set RS = Nothing%>
<%End If%> <% i = i + 1 If i = 5 Then%><% i = 1 End If clsRS.MoveNext Loop clsRS.Close Set clsRS=Nothing End if clsCN.Close Set clsCN= Nothing%>
ClipArt Images<% If Request.Form("larIDcategory")<>"" then clsSQL="Select ClipArtID,ClipArtName FROM [ClipArt] WHERE ClipArtCategoryID ="& int(Request.Form("larIDcategory")) Set clsRS=Server.CreateObject("ADODB.Recordset") clsRS.Open clsSQL,clsCN,0,1 i = 1 Do While Not clsRS.EOF If i = 1 Then%>
');return false;"><%=clsRS.Fields(" SRC="<%=mClipArtFolder%><%=Request.Form("larIDcategory")%>/<%=clsRS.Fields("ClipArtName")%>.jpg">
<%=clsRS.Fields("ClipArtName")%>
<%WriteOtherHiddenVar WriteFourhorseMen%>
<% End Sub Private Sub WriteClipForm2() Dim clsCN,clsRS,clsSQL,i%>
"> "> <% For each i in Request.Form if i="larForm" or i="larPrev" or i="larClipLoop" or i="larContinue" or i="SuccessUpload2" or i="larIDcategory2" or i="larIDclip2" or i="larClipLoop" then elseif i="larNumTextLines" or i="larImageAlignment" or i="larNumHorizontalLines" or i="larNumTextLines2" or i="larImageAlignment2" or i="larNumHorizontalLines2" or i="larBorder" then elseif Left(i,3)="lar" then Response.Write "" end if Next%>
ClipArt Categories
<% Set clsCN = Server.CreateObject("ADODB.Connection") clsCN.Open Conn clsSQL = "SELECT * FROM [ClipArtCategories] ORDER BY ClipArtCategoryName" Set clsRS = Server.CreateObject("ADODB.Recordset") clsRS.Open clsSQL,clsCN,0,1 Do While Not clsRS.EOF%> ');return false;"><%= clsRS.Fields("ClipArtCategoryName")%>
<% clsRS.MoveNext Loop clsRS.Close Set RS = Nothing%>
<%End If%> <% i = i + 1 If i = 5 Then%><% i = 1 End If clsRS.MoveNext Loop clsRS.Close Set clsRS=Nothing End if clsCN.Close Set clsCN= Nothing%>
ClipArt Images<% If Request.Form("larIDcategory2")<>"" then clsSQL="Select ClipArtID,ClipArtName FROM [ClipArt] WHERE ClipArtCategoryID ="& int(Request.Form("larIDcategory2")) Set clsRS=Server.CreateObject("ADODB.Recordset") clsRS.Open clsSQL,clsCN,0,1 i = 1 Do While Not clsRS.EOF If i = 1 Then%>
');return false;"><%=clsRS.Fields(" SRC="<%=mClipArtFolder%><%=Request.Form("larIDcategory2")%>/<%=clsRS.Fields("ClipArtName")%>.jpg">
<%=clsRS.Fields("ClipArtName")%>
<%WriteOtherHiddenVar WriteFourhorseMen%>
<% End Sub End Class%>