%@ LANGUAGE="VBSCRIPT" %>
<%
set upl = Server.CreateObject("SoftArtisans.FileUp")
vSupp_code = upl.Form("Supp_code")
vItem = upl.Form("Item")
vAdd_desc = upl.Form("Add_desc")
vquantity = upl.Form("quantity")
vUnit = upl.Form("Unit")
vPrice = upl.Form("Price")
vvat = upl.Form("vat")
IMGREVIEW= "IMG" & vSupp_code
If upl.Form("Image").TotalBytes <> 0 Then
ImagePath1=IMGREVIEW & "." & Right( upl.Form("Image").UserFilename , 3)
vImage="images/SalesItem/"& ImagePath1
ImagePath1= "c:/Inetpub/Thai-industry/ExchangeHub/images/BuysItem/"& ImagePath1
upl.Form("Image").SaveAs ImagePath1
%>
Photo1 Size= <%=upl.Form("Image").TotalBytes%> bytes
<%
Else
vImage="no_image"
End If
%>
<%
Set ExchangeNetSQL = Server.CreateObject("ADODB.Connection")
ExchangeNetSQL.Open "thaiindustry", "tinhosting", "tinhosting"
sql1 = "INSERT INTO ExBuyItem " & _
" (Supp_Org, ItemID, ItemDesc, ItemQuantity, UOM, Price, Vat, ImageFile)" & _
" VALUES ('"&_
vSupp_code &"','"& vItem &"','"& vAdd_desc &"','"&_
vquantity &"','"& vUnit &"','"& vPrice &"','"&_
vvat &"','"& vImage &"')"
Set RS = ExchangeNetSQL.Execute(sql1)
'---------------------------------------------------
%>
| Supplier Organization Code | <%=vSupp_code%> |
| Item | <%=vItem%> |
| Additional Description | <%=vAdd_desc%> |
| Quantity | <%=vquantity%> |
| Price/Unit of Measure | <%=vPrice & " "%><%=vUnit%> |
| Value Added Tax | <%=vvat%> |
| Image File | <%=vImage%> |