<%option explicit%> <% '***************************************************************** ' call by shopthanks and numerous other places ' to format an order ' Version 6.50 Project Formatting ' Jan 5, 2003 '******************************************************************* dim totalprice dim quantity dim unitprice dim itemname Dim total Dim isubtotal Dim ForDualtotal Dim ForDualsubtotal dim Fordualproductprice dim Newcardno ' Dim Orders Dim Items Dim strSQL Dim Dbc dim oid dim rc ShopCheckAdmin "shopa_projectdisplay.asp" AdminPageHeader ' Normal page header oid=request.querystring("OID") 'VP-ASP 6.09 - precautionary security fix if oid > "" then if not isnumeric(oid) then shoperror "Order ID must be numeric" end if end if ShopFormatProject Oid GenerateDisplayBodyFooter AdminPageTrailer ' Normal Shop page trailer Sub ShopFormatProject (orderid) oid=orderid ShopOpenOtherdb dbc, getconfig("xprojectdb") strsql = "select * from projects where pid=" & oid Set Orders = dbc.execute(strsql) If not orders.eof then FormatCustomer else WriteInfo getlang("LangFormatNone") end if CloseRecordset orders ShopClosedatabase dbc ' Close the database end sub ' Sub FormatHeader (title) Response.write CartTitleColumn & Title & CartTitleColumnEnd End sub Sub FormatCustomer dim comment Comment=orders("comments") Dim Encryptkey dim ordernumber, orderdisplay ordernumber=orders("orderid") orderdisplay="" If Not isnull(ordernumber) then if ordernumber> 0 then orderdisplay="" & ordernumber & "" end if end if %>
<%shopwriteheader "Project Details"%>
Edit Project Back To Projects
<% GenerateDisplayHeader getlang("langprojectnumber") & " " & orders("pid") GenerateDisplayBodyHeader Response.write ForderTable dofield getlang("langdisplaydate"), orders("pdate") dofield getlang("langproductdescription"), orders("description") dofield getlang("langaffname"), orders("customer") dofield getlang("langcustemail"),orders("customeremail") dofield getlang("langprojectother1"),orders("other1") dofield getlang("langprojectother2"),orders("other2") dofield getlang("langprojectother3"),orders("other3") %><% GenerateDisplayBodyFooter GenerateDisplayHeader getlang("LangFormatPaymentInformation") GenerateDisplayBodyHeader Response.write ForderTable DoField "Paid ",orders("paid") ' DoField getlang("LangCanceled"),orders("canceled") DoField getlang("Langproductordernumber"),Orderdisplay DoField getlang("LangDisplaydate"),Orders("datepaid") Dofield getlang("LangProductPrice"),shopformatcurrency(orders("price"),getconfig("xdecimalpoint")) If Orders("dualprice")>0 then Dofield getlang("LangDualPrice"),shopformatcurrency(orders("dualprice"),getconfig("xdecimalpoint")) end if %><% GenerateDisplayBodyFooter If not isnull(comment) then shopwriteheader getlang("langOrderComments") comment=replace(comment,vbcrlf,"
") response.write FOrderComment & comment & "

" & Fordercommentend end if End Sub Sub WriteInfo (msg) Response.write FOrderInfo & msg & ForderInfoEnd end sub ' Sub DoHeader (mytext) Response.write FOrderRow Response.write FOrderHeaderColumn & mytext & ForderHeaderColumnEnd Response.write ForderRowEnd end sub Sub DoField (fieldname,fieldvalue) if fieldvalue="" or isNull(fieldvalue) then exit sub end if Response.write ForderFieldRow Response.write ForderFieldLeft & fieldname & FOrderFieldLeftEnd Response.write FOrderFieldRight & fieldvalue & Forderfieldrightend end sub Sub DisplayRow (msg, amount, dualamount) %> <%=CartSubTotalRowLeft%><%=msg%> <%=CartSubTotalRowRight%><%= shopformatcurrency(amount,xdecimalpoint) %> <% If xdualprice="Yes" then %> <%=CartSubTotalRowRight%><%= ShopFormatDualCurrency(dualamount,2) %> <% end if response.write "" end Sub Sub FormatShipping (total) dim shipcost shipcost=curoshipcost if isnull(shipcost) then exit sub if shipcost<>"" then If shipcost> 0 then DisplayRow getlang("LangProductShippingCost"), shipcost, strodualshipping Total=Total+shipcost ForDualtotal=Fordualtotal+strodualshipping end if end if end sub Sub FormatProductTotal (isubtotal) DisplayRow getlang("langProductCost"), isubtotal, fordualsubtotal end sub Sub FormatTotal (total) FormatTotalRow getlang("langProductTotal"), total, fordualtotal End Sub ' Sub FormatTotalRow (title, total, dualtotal) Response.write "" Response.write CartTotalRowLeft & title & CartTotalRowLeftEnd Response.write CartTotalRowRight & shopformatcurrency(total,xdecimalpoint) & carttotalrowrightend If getconfig("xdualprice")="Yes" then response.write "" response.write CartTotalRowRight & FormatNumber(dualtotal,2) & Carttotalrowrightend end if response.write "" end sub %>