%
Class clsLarry1
Private rSessionUID '1
Private rMessage '2
Private rClipArtFile '3
Private rClipArtFile2 '3
Private mActionFileName '4
Private mClipArtFolder '5
Private mClsFolder
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")
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 ProductID(intN)
mProductID=intN
End Property
Public Property Let ActionFileName(strN)' = 0
mActionFileName=strN
End Property
Public Property Let ClipArtFolder(strN)' = 0
mClipArtFolder=strN
End Property
Public Property Let ClsFolder(strN)' = 0
mClsFolder=strN
End Property
Public Sub ViewWithParams()
DrawImageWithParams
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 DrawImageWithParams()
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) *72
Image.MaxY = CDbl(mHeightMaxMM) *72
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")
XClip=Image.MaxX
YClip=Image.MaxY
Image.SaveImage
dim imageqwerty,arr,arr1,tmp2
Set imageqwerty=Server.CreateObject("AspImage.Image")
imageqwerty.Autosize=true
imageqwerty.PadSize=0
Imageqwerty.BackgroundColor= RGB(&hff,&hff,&hff)
imageqwerty.MaxX=CDbl(700)
imageqwerty.MaxY=CDbl(1300)
Imageqwerty.BrushStyle= 1
Imageqwerty.BrushColor= RGB(&h99,&hcc,&hff)
Imageqwerty.FillRect ((700-XClip)/2)-10,2,((700-XClip)/2)+XClip+10,YClip+22
Imageqwerty.AddImage Server.MapPath(mClsFolder&"images/test.jpg"), (700-XClip)/2,12
imageqwerty.FontColor=vbBlack
imageqwerty.FontName="Arial"
imageqwerty.FontSize=9
imageqwerty.Bold=True
imageqwerty.Italic=False
ins_h=imageqwerty.TextHeight ("M")+4
tmp="Stamp Color : "
imageqwerty.X=2
imageqwerty.Y=drw_h+ins_h+22
imageqwerty.TextOut tmp, imageqwerty.X, imageqwerty.Y, false
Select Case Request.Form("larStampColor")
Case "0" tmp="Black"
Case "1" tmp="Red"
Case "2" tmp="Green"
Case "3" tmp="Blue"
Case "4" tmp="Purple"
Case Else tmp="Black"
End Select
imageqwerty.Bold=False
imageqwerty.TextOut tmp, imageqwerty.X, imageqwerty.Y, false
imageqwerty.Bold=True
tmp="Stamp Border Thickness : "
imageqwerty.X=2
imageqwerty.Y=imageqwerty.Y+ins_h
imageqwerty.TextOut tmp, imageqwerty.X, imageqwerty.Y, false
tmp=Request.Form("larBorderThickness")
imageqwerty.Bold=False
imageqwerty.TextOut tmp, imageqwerty.X, imageqwerty.Y, false
imageqwerty.Y=imageqwerty.Y+ins_h+ins_h
if int(Request.Form("larNumTextLines"))>0 then
imageqwerty.Bold=True
tmp="Text Information"
imageqwerty.X=2
imageqwerty.TextOut tmp, imageqwerty.X, imageqwerty.Y, false
imageqwerty.Y=imageqwerty.Y+ins_h
imageqwerty.X=2
imageqwerty.Italic=True
arr=Array(" # "," Text "," Font "," Size"," Style"," Space Above"," Space Below"," Align")
arr1=Array(15,230,120,32,68,88,88,46)
j=2
For i=Lbound(arr) to Ubound(arr)
tmp=arr(i)
imageqwerty.TextOut tmp, imageqwerty.X, imageqwerty.Y, false
j=j+arr1(i)
imageqwerty.X=j
next
imageqwerty.Italic=False
imageqwerty.Bold=False
j=6
imageqwerty.X=2
imageqwerty.y=imageqwerty.y+ins_h
For i = 1 to int(Request.Form("larNumTextLines"))
Select Case Request.Form("larTextFont"&i)
Case "0" tmp="Arial"
Case "1" tmp="Times New Roman"
Case "2" tmp="Courier"
Case "3" tmp="Comic Sans"
End Select
Select Case Request.Form("larTextFontStyle"&i)
Case "0" tmp1="Plain"
Case "1" tmp1="Bold"
Case "2" tmp1="Italic"
Case "3" tmp1="Bold Italic"
End Select
Select Case Request.Form("larTextAlignment"&i)
Case "0" tmp2="Center"
Case "1" tmp2="Left"
Case "2" tmp2="Right"
End Select
arr=Array(Cstr(i),Cstr(Request.Form("larText"&i)),Cstr(tmp),Cstr(Request.Form("larTextFontSize"&i)),Cstr(tmp1),Cstr(Request.Form( "larTextSpaceAbove"&i)),Cstr(Request.Form("larTextSpaceBelow"&i)),Cstr(tmp2))
For z=Lbound(arr) to Ubound(arr)
tmp=arr(z)
imageqwerty.TextOut tmp, imageqwerty.X, imageqwerty.Y, false
j=j+arr1(z)
imageqwerty.X=j
next
imageqwerty.y=imageqwerty.y+ins_h
imageqwerty.X=2
j=6
Next
end if
imageqwerty.Y=imageqwerty.Y+ins_h
if int(Request.Form("larNumHorizontalLines"))>0 then
imageqwerty.Bold=True
tmp="Line Information"
imageqwerty.X=2
imageqwerty.TextOut tmp, imageqwerty.X, imageqwerty.Y, false
imageqwerty.Y=imageqwerty.Y+ins_h
imageqwerty.X=2
imageqwerty.Italic=True
arr=Array(" # "," Location "," Width "," Thickness"," Space Above"," Space Below"," Align")
arr1=Array(15,150,52,88,88,88,46)
j=2
For i=Lbound(arr) to Ubound(arr)
tmp=arr(i)
imageqwerty.TextOut tmp, imageqwerty.X, imageqwerty.Y, false
j=j+arr1(i)
imageqwerty.X=j
next
imageqwerty.Italic=False
imageqwerty.Bold=False
j=6
imageqwerty.X=2
imageqwerty.y=imageqwerty.y+ins_h
For i = 1 to int(Request.Form("larNumHorizontalLines"))
If Request.Form("larLineLocation"&i)="0" then
tmp="Above text 1"
else
for z=1 to int(Request.Form("larNumTextLines"))
if int(Request.Form("larLineLocation"&i))=z then
tmp="Below text "& z
exit for
end if
next
end if
Select Case Request.Form("larLineAlignment"&i)
Case "0" tmp2="Center"
Case "1" tmp2="Left"
Case "2" tmp2="Right"
End Select
arr=Array(Cstr(i),Cstr(tmp),Cstr(Request.Form("larLineWidth"&i)&"%"),Cstr(Request.Form("larLineThickness"&i)),Cstr(Request.Form("larLineSpaceAbove"&i)),Cstr(Request.Form("larLineSpaceBelow"&i)),Cstr(tmp2))
For z=Lbound(arr) to Ubound(arr)
tmp=arr(z)
imageqwerty.TextOut tmp, imageqwerty.X, imageqwerty.Y, false
j=j+arr1(z)
imageqwerty.X=j
next
imageqwerty.y=imageqwerty.y+ins_h
imageqwerty.X=2
j=6
Next
end if
imageqwerty.Y=imageqwerty.Y+ins_h
If int(Request.Form("larImageAlignment"))>0 then
imageqwerty.Bold=True
tmp="Art Information"
imageqwerty.X=2
imageqwerty.TextOut tmp, imageqwerty.X, imageqwerty.Y, false
imageqwerty.Y=imageqwerty.Y+ins_h
imageqwerty.X=2
imageqwerty.Italic=True
If Request.Form("SuccessUpload")="success" then
tmp="(Uploaded Image)"
else
tmp="(ClipArt Image)"
end if
arr=Array(" Image Filename "&tmp," % Size "," Align")
arr1=Array(250,75,75)
j=2
For i=Lbound(arr) to Ubound(arr)
tmp=arr(i)
imageqwerty.TextOut tmp, imageqwerty.X, imageqwerty.Y, false
j=j+arr1(i)
imageqwerty.X=j
next
imageqwerty.Italic=False
imageqwerty.Bold=False
imageqwerty.X=2
imageqwerty.y=imageqwerty.y+ins_h
tmp=rClipArtFile
imageqwerty.TextOut tmp, imageqwerty.X, imageqwerty.Y, false
tmp=Request.Form("larImageSize")
imageqwerty.TextOut tmp, 253, imageqwerty.Y, false
Select Case Request.Form("larImageAlignment")
Case "0" tmp2="No Image"
Case "1" tmp2="Left"
Case "2" tmp2="Right"
End Select
imageqwerty.TextOut tmp2, 328, imageqwerty.Y, false
End if
imageqwerty.X=6
imageqwerty.Y=imageqwerty.Y+ins_h+ins_h
tmp=""
if Request.Form("larNumTextLines2")="" then
tmp="0"
else
tmp=Request.Form("larNumTextLines2")
end if
if int(tmp)>0 then
imageqwerty.Bold=True
tmp="Text Information Below"
imageqwerty.X=2
imageqwerty.TextOut tmp, imageqwerty.X, imageqwerty.Y, false
imageqwerty.Y=imageqwerty.Y+ins_h
imageqwerty.X=2
imageqwerty.Italic=True
arr=Array(" # "," Text "," Font "," Size"," Style"," Space Above"," Space Below"," Align")
arr1=Array(15,230,120,32,68,88,88,46)
j=2
For i=Lbound(arr) to Ubound(arr)
tmp=arr(i)
imageqwerty.TextOut tmp, imageqwerty.X, imageqwerty.Y, false
j=j+arr1(i)
imageqwerty.X=j
next
imageqwerty.Italic=False
imageqwerty.Bold=False
j=6
imageqwerty.X=2
imageqwerty.y=imageqwerty.y+ins_h
For i = 1 to int(Request.Form("larNumTextLines2"))
Select Case Request.Form("larTextFont2"&i)
Case "0" tmp="Arial"
Case "1" tmp="Times New Roman"
Case "2" tmp="Courier"
Case "3" tmp="Comic Sans"
End Select
Select Case Request.Form("larTextFontStyle2"&i)
Case "0" tmp1="Plain"
Case "1" tmp1="Bold"
Case "2" tmp1="Italic"
Case "3" tmp1="Bold Italic"
End Select
Select Case Request.Form("larTextAlignment2"&i)
Case "0" tmp2="Center"
Case "1" tmp2="Left"
Case "2" tmp2="Right"
End Select
arr=Array(Cstr(i),Cstr(Request.Form("larText2"&i)),Cstr(tmp),Cstr(Request.Form("larTextFontSize2"&i)),Cstr(tmp1),Cstr(Request.Form( "larTextSpaceAbove2"&i)),Cstr(Request.Form("larTextSpaceBelow2"&i)),Cstr(tmp2))
For z=Lbound(arr) to Ubound(arr)
tmp=arr(z)
imageqwerty.TextOut tmp, imageqwerty.X, imageqwerty.Y, false
j=j+arr1(z)
imageqwerty.X=j
next
imageqwerty.y=imageqwerty.y+ins_h
imageqwerty.X=2
j=6
Next
end if
imageqwerty.Y=imageqwerty.Y+ins_h
tmp=""
if Request.Form("larNumHorizontalLines2")="" then
tmp="0"
else
tmp=Request.Form("larNumHorizontalLines2")
end if
if int(tmp)>0 then
imageqwerty.Bold=True
tmp="Line Information Below"
imageqwerty.X=2
imageqwerty.TextOut tmp, imageqwerty.X, imageqwerty.Y, false
imageqwerty.Y=imageqwerty.Y+ins_h
imageqwerty.X=2
imageqwerty.Italic=True
arr=Array(" # "," Location "," Width "," Thickness"," Space Above"," Space Below"," Align")
arr1=Array(15,150,52,88,88,88,46)
j=2
For i=Lbound(arr) to Ubound(arr)
tmp=arr(i)
imageqwerty.TextOut tmp, imageqwerty.X, imageqwerty.Y, false
j=j+arr1(i)
imageqwerty.X=j
next
imageqwerty.Italic=False
imageqwerty.Bold=False
j=6
imageqwerty.X=2
imageqwerty.y=imageqwerty.y+ins_h
For i = 1 to int(Request.Form("larNumHorizontalLines2"))
If Request.Form("larLineLocation"&i)="0" then
tmp="Above text 1"
else
for z=1 to int(Request.Form("larNumTextLines2"))
if int(Request.Form("larLineLocation2"&i))=z then
tmp="Below text "& z
exit for
end if
next
end if
Select Case Request.Form("larLineAlignment2"&i)
Case "0" tmp2="Center"
Case "1" tmp2="Left"
Case "2" tmp2="Right"
End Select
arr=Array(Cstr(i),Cstr(tmp),Cstr(Request.Form("larLineWidth2"&i)&"%"),Cstr(Request.Form("larLineThickness2"&i)),Cstr(Request.Form("larLineSpaceAbove2"&i)),Cstr(Request.Form("larLineSpaceBelow2"&i)),Cstr(tmp2))
For z=Lbound(arr) to Ubound(arr)
tmp=arr(z)
imageqwerty.TextOut tmp, imageqwerty.X, imageqwerty.Y, false
j=j+arr1(z)
imageqwerty.X=j
next
imageqwerty.y=imageqwerty.y+ins_h
imageqwerty.X=2
j=6
Next
end if
imageqwerty.Y=imageqwerty.Y+ins_h
tmp=""
if Request.Form("larImageAlignment2")="" then
tmp="0"
else
tmp=Request.Form("larImageAlignment2")
end if
If int(tmp)>0 then
imageqwerty.Bold=True
tmp="Art Information Below"
imageqwerty.X=2
imageqwerty.TextOut tmp, imageqwerty.X, imageqwerty.Y, false
imageqwerty.Y=imageqwerty.Y+ins_h
imageqwerty.X=2
imageqwerty.Italic=True
If Request.Form("SuccessUpload2")="success" then
tmp="(Uploaded Image)"
else
tmp="(ClipArt Image)"
end if
arr=Array(" Image Filename "&tmp," % Size "," Align")
arr1=Array(250,75,75)
j=2
For i=Lbound(arr) to Ubound(arr)
tmp=arr(i)
imageqwerty.TextOut tmp, imageqwerty.X, imageqwerty.Y, false
j=j+arr1(i)
imageqwerty.X=j
next
imageqwerty.Italic=False
imageqwerty.Bold=False
imageqwerty.X=2
imageqwerty.y=imageqwerty.y+ins_h
tmp=rClipArtFile
imageqwerty.TextOut tmp, imageqwerty.X, imageqwerty.Y, false
tmp=Request.Form("larImageSize2")
imageqwerty.TextOut tmp, 253, imageqwerty.Y, false
Select Case Request.Form("larImageAlignment2")
Case "0" tmp2="No Image"
Case "1" tmp2="Left"
Case "2" tmp2="Right"
End Select
imageqwerty.TextOut tmp2, 328, imageqwerty.Y, false
End if
imageqwerty.X=6
imageqwerty.Y=imageqwerty.Y+ins_h
tmp=""
imageqwerty.TextOut tmp, imageqwerty.X, imageqwerty.Y, false
imageqwerty.FileName = Server.MapPath(mClsFolder&"images/test3.jpg")
imageqwerty.Saveimage
Randomize%>
<%
End Sub
End Class%>