<%@ LANGUAGE = "VBScript" %><% '----------------------------------------------------------- ' LINE9.com - Tek9 Pro Page(s) (example: pg=default, or pg=cart, etc.) ' ------------------------------ ' Copyright © 2003 LINE9 Corporation ' ' Contains the root Tek9 functionality for public ' consumption. The general rule is . . . people outside ' your company need to get to it, it's here. %><% %><% Tek9Initialize Dim pg, mode, sorry, yr, mnth, rsItem, rsFreebie GetCurrentCustomer MarkCurrentCustomerActive pg = EStr(Request.QueryString("pg")) If IsEmpty(pg) Then pg = "default" mode = EStr(Request.QueryString("mode")) sorry = "



Sorry, nothing was found.


Tip: If browsing is not yielding the results you are looking for, why not try using our search engine?

 

 
" yr = Year(Now) mnth = MonthName(Month(Now)) strsrch = Request.Form("srch") If strsrch = "" Then strsrch = Request.QueryString("srch") srch = Replace(StripSymbols(strsrch), " ", "%") If srch = "" Then srch = "XX" searchBy = Request.Form("searchBy") If searchBy = "" Then searchBy = Request.QueryString("searchBy") mypage = Request.Form("pgNum") If Not IsNumeric(mypage) Then mypage = 1 ElseIf mypage = "" Then mypage = 1 Else mypage = Int(Request.Form("pgNum")) End If sortby = Request.QueryString("sortby") If sortby = "" Then sortby = Request.Form("sortby") how = Request.QueryString("how") If how = "" Then how = Request.Form("how") If sortby <> "" And how = "" Then Response.Redirect "tek9.asp" Select Case pg Case "default" 'This is your Home Page! If Not Tek9PageBegin(pg, Empty) Then Response.Redirect g.HomePageURL & "tek9.asp" TemplateBeforePC 'Add any extra home page code you like right here. 'example: 'DisplayRandomProducts 6 'just remove the ' at the beginning of the above line, and watch what your home page ' does. (assuming you have some products in your database to actually display on your home page) Response.Write img1 & pc & "

" & img2 & txt2 If img3 <> "" Then Response.Write"

" & img3 Response.Write txt3 If img4 <> "" Then Response.Write"

" & img4 Response.Write txt4 TemplateAfterPC Tek9PageEnd Case "cart" 'this is the page that displays your shopping cart If Not Tek9PageBegin(pg, Empty) Then Response.Redirect g.HomePageURL & "tek9.asp" TemplateBeforePC Select Case mode Case "update" UpdateCart Case "empty" EmptyCart End Select Select Case mode Case "checklogin" 'here we display the text that asks for a login if applicable: Response.Write g.Str("cart_checklogin_text") DisplayLogin g.SecureURL & "tek9.asp?pg=cart&mode=checklogin", g.SecureURL & "tek9.asp?pg=cart&mode=step2" Case "step2" Response.Write g.Str("cart_step23_text") GetDefaultBillingInfo If DisplayCart(2) = 0 Then Response.Redirect g.HomePageURL & "tek9.asp?pg=cart" Case "step3" Response.Write g.Str("cart_step23_text") If ValidBillingInfo() Then If DisplayCart(3) = 0 Then Response.Redirect g.HomePageURL & "tek9.asp?pg=cart" Else If DisplayCart(2) = 0 Then Response.Redirect g.HomePageURL & "tek9.asp?pg=cart" End If Case Else Dim rsCrt Set rsCrt = GetCartRs() If hasRecords(GetCartRs()) Then Response.Write g.Str("cart_step1_text") rsCrt.Close: Set rsCrt = Nothing If DisplayCart(1) = 0 Then 'here we show the page content (pc) from tblPages. "Your cart is currently empty, blah blah"..: Response.Write img1 & pc & "

We proudly accept: " Set rs = cnDZ.Execute("SELECT ID, CARD, IMG FROM TBLCARDTYPES WHERE SHOWIT <> 0 ORDER BY ID ASC") Do Until rs.EOF Response.Write" " rs.MoveNext Loop 'here we display a small message such as "Secure transactions are encrypted for your protection. Click here to verify (show the verisign seal or something).." Response.Write g.Str("cart_step1_ssltext") End If End Select ' Case mode TemplateAfterPC Tek9PageEnd Case "products" 'this is the page that is used to dynamically display your products from your Intranet ICC specific = Decrypt(Request.QueryString("specific")) grp = ELng(Request.QueryString("grp")) manuf = ELng(Request.QueryString("manuf")) If Request.Form("LinkTo") <> "" Then Response.Redirect"tek9.asp?pg=products&specific="&Request.Form("LinkTo") Select Case mode Case "login_add" If Not Tek9PageBegin(pg, Empty) Then Response.Redirect g.HomePageURL & "tek9.asp" TemplateBeforePC If IsLoggedIn() Then If AddItemToCart(specific) Then Response.Redirect g.secureURL & "tek9.asp?pg=cart" End If Response.Write img1 & pc & "
" Set SelectedModifiers = ParseSelectedModifiers modArray = SelectedModifiers.Items QuickSortArray modArray, 0, UBound(modArray) strMods = EStr(Join(modArray, COMPLEX_MODIFIER_SEPARATOR)) DisplayLogin g.SecureURL & "tek9.asp?pg=products&mode=login_add&specific=" & Request.QueryString("specific") & ModKeyToURL(strMods), g.SecureURL & "tek9.asp?pg=products&mode=login_add&specific=" & Request.QueryString("specific") & ModKeyToURL(strMods) TemplateAfterPC Tek9PageEnd Case Else If specific = "" And grp = "" And manuf = "" Then If Not Tek9PageBegin(pg, Empty) Then Response.Redirect g.HomePageURL & "tek9.asp" TemplateBeforePC Response.Write img1 & pc & "
" ShowGroups NULL, 0, False, False Response.Write"
" TemplateAfterPC Tek9PageEnd ElseIf specific <> "" Then If Request.Form("Add.x") <> "" Then If g("RequireLogin") Then Set SelectedModifiers = ParseSelectedModifiers modArray = SelectedModifiers.Items QuickSortArray modArray, 0, UBound(modArray) strMods = EStr(Join(modArray, COMPLEX_MODIFIER_SEPARATOR)) If Not IsLoggedIn() Then Response.Redirect g.SecureURL & "tek9.asp?pg=products&mode=login_add&specific=" & Request.QueryString("specific") & ModKeyToURL(strMods) End If If AddItemToCart(specific) Then Response.Redirect g.HomePageURL & "tek9.asp?pg=cart" End If Set rs = GetItemRS(specific) If Not HasRecords(rs) Then ExPageAdHoc "Item Not Found in Inventory", sorry If Not Tek9PageBegin(pg, rs("ManufName") & " " & rs("ItemName")) Then Response.Redirect g.HomePageURL & "tek9.asp" TemplateBeforePC Set SelectedModifiers = ParseSelectedModifiers Set rsModifiers = Server.CreateObject("ADODB.Recordset") Set rsModifiers = GetItemModifiersRS(specific) ModifierString = Empty numericalCost = rs("COST") ImageFile = "" If Trim(rs("IMG")) <> "" Then ImageFile = rs("IMG") If Not rsModifiers.EOF Then LastGroup = 0 Do Until rsModifiers.EOF If LastGroup <> rsModifiers("ModifierGroup") Then LastGroup = rsModifiers("ModifierGroup") If SelectedModifiers(LastGroup) = "" Then SelectedModifiers(LastGroup) = rsModifiers("ModifierID") rsModifiers.Find "ModifierID = "&SelectedModifiers(LastGroup) If Trim(rsModifiers("AltImg")) <> "" Then ImageFile = rsModifiers("AltImg") numericalCost = numericalCost + IIf(IsNull(rsModifiers("AdditionalCost")), 0, rsModifiers("AdditionalCost")) If Len(ModifierString) > 0 Then ModifierString = ModifierString & "&" & rsModifiers("ModifierID") Else ModifierString = CStr(rsModifiers("ModifierID")) End If SelectedModifiers(LastGroup & "Cost") = rsModifiers("AdditionalCost") End If rsModifiers.MoveNext Loop End If totalRecords = rs.RecordCount 'feel free to remove the manufname (Manufacturer name) from the line below: Response.Write"

"&rs("ManufName")&" "&rs("ITEMNAME")&" BuyNow

" If ImageFile <> "" Then Response.Write"" If numericalCost = 0 Then cost = "FREE" ElseIf numericalCost < 0 Then cost = "Cost Varies" Else cost = FormatCurrency(numericalCost) End If dscp = rs("DESCRIP") If Trim(dscp) = "" Then Response.Write"Sorry, no description available now." Else If rs("WEIGHT") <= 0 Then downloadit = True Else downloadit = False Response.Write dscp End If skuString = EStr(FindComplexValue(rs("AltSKU"), ModifierString, Empty)) If IsEmpty(skuString) Then skuString = rs("SKU") If rs("ONSALE") Then sale = "" Else sale = "" If Trim(rs("UNIT")) = "" Then theunit = "" Else theunit = " (per "&rs("UNITNAME")&")" 'these just added in case client forgets to close their product descrip tags: Response.Write"
"&_ ""&_ ""&_ ""&_ ""&_ "" If HasRecords(rsModifiers) Then sentence = " choose your options, then" Else sentence = "" Response.Write"
Product Details:     (sku:"&Trim(skuString)&")" If rs("ONSALE") Then Response.Write"     Sale ends soon!" Response.Write "
" If Not IsNull(rs("RETAIL_COST")) Then Response.Write "Retail Price: " & FormatCurrency(rs("RETAIL_COST")) & "
" End If Response.Write"" & sale If Not rs("ONSALE") Then Response.Write"Your Price: "&cost&theunit&"
" Else newcost = FormatCurrency(cost - (cost * rs("SALEDISCOUNT") / 100)) Response.Write"Your Price: "&cost&"   Sale Price: "&newcost&""&theunit&"
" End If 'If showXML = "" Then 'v6.x Rupali code goes here. disabled for now due to lack of support from ms. qtyinstock = GetQuantityInStock(rs("ItemID"), SelectedModifiers) 'Else ' Response.Write""&_ ' "" 'show xml based qis for IE5+ users ' qtyinstock = GetQuantityInStock(rs("ItemID"), SelectedModifiers) 'End If If Not rs("Downloadable") And Trim(qtyinstock) <> "" And g("Show_QIS") <> False Then Response.Write"Quantity Remaining: " If qtyinstock <= 0 Then Response.Write" Currently on Back-Order
" ElseIf qtyinstock > 0 And qtyinstock < 5 Then Response.Write"Only "&qtyinstock&" left.. hurry!
" Else Response.Write qtyinstock & "
" End If End If 'Freebie Item If Not IsNull(rs("FreebieItemID")) Then Set rsFreebie = GetItemRS(rs("FreebieItemID")) If HasRecords(rsFreebie) Then If rsFreebie("SHOWIT") And (rsFreebie("Downloadable") Or (rsFreebie("QIS") > 0) Or rsFreebie("Allow_BO_PO")) Then Response.Write "Buy now and get a " & GetItemName(rs("FreebieItemID")) & " for free!
" End If End If rsFreebie.Close: Set rsFreebie = Nothing End If 'Groups/Categories If rs.RecordCount <> 1 Then Response.Write "Categories: " Else Response.Write"Category: " End If Set rsGroups = GetItemGroupsRS(specific) GroupCount = 0 Do Until rsGroups.EOF If GroupCount > 0 Then Response.Write ", " Response.Write"" & rsGroups("Name") & "" GroupCount = GroupCount + 1 rsGroups.MoveNext Loop rsGroups.Close: Set rsGroups = Nothing Response.Write", More.." If qtyinstock > 0 Or rs("Downloadable") Then Response.Write "
Ship Time:  "&rs("ShipTimeDesc") Else Set rsST = OpenFastRS("SELECT * FROM tblShipTime WHERE ShipTime = 'BackOrder / Pre-Order'") If HasRecords(rsST) Then Response.Write "
Ship Time:  "&rsST("ShipTime") rsST.Close: Set rsST = Nothing End If Response.Write"
Buy a "&rs("ManufName")&" "&rs("ITEMNAME")&" now!
Please"&sentence&" click ""Buy Now"" to buy this product:
" LastGroup = 0 started = False If HasRecords(rsModifiers) Then rsModifiers.MoveFirst Do Until rsModifiers.EOF If rsModifiers("ModifierGroup") <> LastGroup Then LastGroup = rsModifiers("ModifierGroup") If started = True Then Response.Write"  " started = True Response.Write "" & rsModifiers("GroupName")&": "&"" Response.Write"
" If started = True Then Response.Write"      " If qtyInStock > 0 Or rs("Allow_BO_PO") Or IsNull(rs("QIS")) Then Response.Write"      " Response.Write"
" rsModifiers.Close Set rsModifiers = Nothing rs.Close: Set rs = Nothing TemplateAfterPC Tek9PageEnd ElseIf grp <> "" Then If Not Tek9PageBegin(pg, Empty) Then Response.Redirect g.HomePageURL & "tek9.asp" TemplateBeforePC Set rs = Server.CreateObject("ADODB.RecordSet") rs.CursorLocation = adUseClient sqlQry = "SELECT tinv.ITEMID, tinv.SKU, tinv.ITEMNAME, tinv.DESCRIP," _ & " tinv.ONSALE, tinv.SALEDISCOUNT, tinv.COST, tunit.UNIT, tinv.SHOWIT," _ & " tman.NAME AS ManufName, tgrp.NAME AS GroupName, tinvg.GroupID," _ & " tinv.MANUF, tinv.IMG_SMALL AS Thumbnail" _ & " FROM (((TBLMANUFACTURERS tman" _ & " INNER JOIN TBLINVENTORY tinv ON ((tinv.MANUF = tman.ManufID)" _ & " AND (tinv.SHOWIT <> 0)))" _ & " INNER JOIN tblInv_Units tunit ON tinv.UNIT = tunit.ID)" _ & " INNER JOIN tblInventoryGroups tinvg ON tinvg.ItemID = tinv.ItemID)" _ & " INNER JOIN TBLGROUPS tgrp ON tgrp.GROUPID = tinvg.GroupID" _ & " WHERE tinvg.GroupID = " & grp & " ORDER BY " 'ken fixed 08.06.2002: changed 7 instances of MANUF to tman.NAME instead. page sorting was freaking out: If sortby = "saleitems" Then If how = "asc" Then sqlQry = sqlQry & "ONSALE ASC, tman.NAME ASC, ITEMNAME ASC;" arrow1 = "" Else sqlQry = sqlQry & "ONSALE DESC, tman.NAME ASC, ITEMNAME ASC;" arrow1 = "" End If ElseIf sortby = "product_name" Then If how = "asc" Then sqlQry = sqlQry & "tman.NAME ASC, ITEMNAME ASC;" arrow2 = "" Else sqlQry = sqlQry & "tman.NAME DESC, ITEMNAME DESC;" arrow2 = "" End If ElseIf sortby = "price" Then If how = "asc" Then sqlQry = sqlQry & "COST ASC, tman.NAME ASC, ITEMNAME ASC;" arrow3 = "" Else sqlQry = sqlQry & "COST DESC, tman.NAME ASC, ITEMNAME ASC;" arrow3 = "" End If Else sqlQry = sqlQry & "tman.NAME ASC, ITEMNAME ASC, COST ASC;" arrow2 = "" End If If how = "" Then hw = "asc" ElseIf how = "asc" Then hw = "desc" Else hw = "asc" End If rs.Open sqlQry, cnDZ, adOpenStatic, adLockOptimistic If Not rs.EOF Then totalRecords = rs.RecordCount rs.MoveFirst rs.PageSize = 10 maxcount = CInt(rs.PageCount) If Int(mypage) > Int(maxcount) Or Int(mypage) < 1 Then mypage = 1 rs.AbsolutePage = mypage LinkCount = 0 howmanyrecs = 0 Response.Write"

"&rs("GroupName")&"" ShowGroups grp, 1, True, False Response.Write", More.."&_ ""&_ ""&arrow1&""&_ "Product Name"&arrow2&""&_ "Price"&arrow3&""&_ "" While Not rs.EOF And howmanyrecs < rs.pagesize If LinkCount Mod 2 = 0 Then bgColor = " bgcolor=""#"&clr2&"""" Else bgColor = "" If rs("ONSALE") Then sale = "" Else sale = " " If Trim("X"&rs("Thumbnail")) = "X" Then thmbnl = "" Else thmbnl = "" Response.Write""&_ ""&thmbnl&""&rs("ManufName")&" "&rs("ITEMNAME")&" : "&Excerpt(rs("DESCRIP"),100,170)&""&_ "" rs.MoveNext LinkCount = LinkCount + 1 howmanyrecs = howmanyrecs + 1 Wend Response.Write"
"&sale&"" cost = rs("COST") If Not rs("ONSALE") Then Response.Write FormatCurrency(cost) Else newcost = FormatCurrency(cost - (cost * rs("SALEDISCOUNT") / 100)) Response.Write""&FormatCurrency(cost)&"
"&FormatCurrency(newcost)&"" End If Response.Write"

Can't find it? Contact us direct!
" If maxcount > 1 Then Call ShowNavBar("products", "products_group") rs.Close Else Response.Write sorry End If Set rs = Nothing TemplateAfterPC Tek9PageEnd ElseIf manuf <> "" Then If Not Tek9PageBegin(pg, Empty) Then Response.Redirect g.HomePageURL & "tek9.asp" TemplateBeforePC Set rs = Server.CreateObject("ADODB.RecordSet") rs.CursorLocation = adUseClient sqlQry = "SELECT tinv.ITEMID, tinv.SKU, tinv.ITEMNAME, tinv.DESCRIP," _ & " tinv.ONSALE, tinv.SALEDISCOUNT, tinv.COST, tunit.UNIT," _ & " tman.NAME AS ManufName, tinv.MANUF, tinv.IMG_SMALL AS Thumbnail" _ & " FROM (TBLMANUFACTURERS tman" _ & " INNER JOIN TBLINVENTORY tinv ON ((tinv.MANUF = tman.ManufID)" _ & " AND (tinv.SHOWIT <> 0)))" _ & " INNER JOIN tblInv_Units tunit ON tinv.UNIT = tunit.ID" _ & " WHERE tinv.Manuf = " & manuf & " ORDER BY " If sortby = "saleitems" Then If how = "asc" Then sqlQry = sqlQry & "ONSALE ASC, MANUF ASC, ITEMNAME ASC;" arrow1 = "" Else sqlQry = sqlQry & "ONSALE DESC, MANUF ASC, ITEMNAME ASC;" arrow1 = "" End If ElseIf sortby = "product_name" Then If how = "asc" Then sqlQry = sqlQry & "MANUF ASC, ITEMNAME ASC;" arrow2 = "" Else sqlQry = sqlQry & "MANUF DESC, ITEMNAME DESC;" arrow2 = "" End If ElseIf sortby = "price" Then If how = "asc" Then sqlQry = sqlQry & "COST ASC, MANUF ASC, ITEMNAME ASC;" arrow3 = "" Else sqlQry = sqlQry & "COST DESC, MANUF ASC, ITEMNAME ASC;" arrow3 = "" End If Else sqlQry = sqlQry & "MANUF ASC, ITEMNAME ASC, COST ASC;" arrow2 = "" End If If how = "" Then hw = "asc" ElseIf how = "asc" Then hw = "desc" Else hw = "asc" End If rs.Open sqlQry, cnDZ, adOpenStatic, adLockOptimistic If Not rs.EOF Then totalRecords = rs.RecordCount rs.MoveFirst rs.PageSize = 10 maxcount = CInt(rs.PageCount) If Int(mypage) > Int(maxcount) Or Int(mypage) < 1 Then mypage = 1 rs.AbsolutePage = mypage LinkCount = 0 howmanyrecs = 0 Response.Write"

All products by "&rs("ManufName")&""&_ ""&_ ""&arrow1&""&_ "Product Name"&arrow2&""&_ "Price"&arrow3&""&_ "" While Not rs.EOF And howmanyrecs < rs.pagesize If LinkCount Mod 2 = 0 Then bgColor = " bgcolor=""#"&clr2&"""" Else bgColor = "" If rs("ONSALE") Then sale = "" Else sale = " " If Trim("X"&rs("Thumbnail")) = "X" Then thmbnl = "" Else thmbnl = "" Response.Write""&_ ""&thmbnl&""&rs("ManufName")&" "&rs("ITEMNAME")&" : "&Excerpt(rs("DESCRIP"),100,170)&""&_ "" rs.MoveNext LinkCount = LinkCount + 1 howmanyrecs = howmanyrecs + 1 Wend Response.Write"
"&sale&"" cost = rs("COST") If rs("ONSALE") Then newcost = FormatCurrency(cost - (cost * rs("SALEDISCOUNT") / 100)) Response.Write""&FormatCurrency(cost)&"
"&FormatCurrency(newcost)&"" Else Response.Write FormatCurrency(cost) End If Response.Write"

Can't find it? Contact us direct!
" If maxcount > 1 Then Call ShowNavBar("products", "products_manuf") rs.Close Else Response.Write sorry End If Set rs = Nothing TemplateAfterPC Tek9PageEnd End If End Select Case "search" 'this is the code that is used to run the search engine for your site, if you actually have a search field on your template (or some other page too, if you like) If Not Tek9PageBegin(pg, Empty) Then Response.Redirect g.HomePageURL & "tek9.asp" TemplateBeforePC If mode = "" Then Response.Write img1 & pc ElseIf mode = "results" Then If searchBy = "" Then searchBy = "Products" Set rs = Server.CreateObject("ADODB.RecordSet") rs.CursorLocation = adUseClient sqlsrch = Replace(srch, "XX", "%%%' OR field LIKE '%%%") If searchBy = "Products" Then sqlQry = "SELECT TOP "&MAXRECORDS&" ITEMID, SKU, ITEMNAME, MANUFNAME, DESCRIP FROM qInventoryByManuf WHERE SKU LIKE '%%%"&Replace(sqlsrch, "field", "SKU")&"%%%' OR ITEMNAME LIKE '%%%"&Replace(sqlsrch, "field", "ITEMNAME")&"%%%' OR DESCRIP LIKE '%%%"& Replace(sqlsrch, "field", "DESCRIP") &"%%%' ORDER BY ManufName ASC, ITEMNAME ASC;" If searchBy = "Snippets" Then sqlQry = "SELECT TOP "&MAXRECORDS&" * FROM TBLCODE_SNIPPETS WHERE CODE_TITLE LIKE '%%%"&Replace(sqlsrch, "field", "CODE_TITLE")&"%%%' OR CODE_DESCRIP LIKE '%%%"&Replace(sqlsrch, "field", "CODE_DESCRIP")&"%%%' OR CODE_SNIPPET LIKE '%%%"&Replace(sqlsrch, "field", "CODE_SNIPPET")&"%%%' ORDER BY CODE_TITLE ASC;" If searchBy = "Support" Then sqlQry = "SELECT TOP "&MAXRECORDS&" * FROM TBLSUPPORT WHERE QUESTION LIKE '%%%"&Replace(sqlsrch, "field", "QUESTION")&"%%%' OR ANSWER LIKE '%%%"&Replace(sqlsrch, "field", "ANSWER")&"%%%' ORDER BY QUESTION ASC;" If searchBy = "Clients" Then sqlQry = "SELECT TOP "&MAXRECORDS&" * FROM TBLCLIENTS WHERE CLIENT LIKE '%%%"&Replace(sqlsrch, "field", "CLIENT")&"%%%' OR DESCRIP LIKE '%%%"&Replace(sqlsrch, "field", "DESCRIP")&"%%%' OR URL LIKE '%%%"&Replace(sqlsrch, "field", "URL")&"%%%' ORDER BY CLIENT ASC;" rs.Open sqlQry, cnDZ, adOpenStatic If Not rs.EOF Then rs.MoveFirst rs.PageSize = 30 maxcount = CInt(rs.PageCount) rs.AbsolutePage = mypage howmanyrecs = 0 LinkCount = 0 If srch = "XX" Then thesrch = "all" Else thesrch = Replace(srch, "%", " ") Response.Write"

Searching "&searchBy&" for """&thesrch&""" found "&rs.recordcount&" result"&CheckShowS(rs.recordcount)&":" If maxcount > 1 Then Response.Write"
Page "&mypage&" of "&maxcount&"" Response.Write"

" While Not rs.EOF And howmanyrecs < rs.pagesize If LinkCount Mod 2 = 0 Then bgColor = " bgcolor=""#"&clr2&"""" Else bgColor = "" Response.Write"" If searchBy = "Products" Then lemanf = rs("MANUFNAME") hilite1 = HiLight(lemanf, srch, "#FFFF99") hilite2 = HiLight(rs("ITEMNAME"), srch, "#FFFF99") hilite3 = HiLight(Excerpt(rs("DESCRIP"),100,170), srch, "#FFFF99") Response.Write"" ElseIf searchBy = "Snippets" Then hilite1 = HiLight(rs("CODE_TITLE"), srch, "#FFFF99") hilite2 = HiLight(Excerpt(rs("CODE_DESCRIP"),100,170), srch, "#FFFF99") Response.Write"" ElseIf searchBy = "Support" Then hilite1 = HiLight(rs("QUESTION"), srch, "#FFFF99") hilite2 = HiLight(Excerpt(rs("ANSWER"),100,170), srch, "#FFFF99") Response.Write"" ElseIf searchBy = "Clients" Then hilite1 = HiLight(rs("CLIENT"), srch, "#FFFF99") hilite2 = HiLight(Excerpt(rs("DESCRIP"),100,170), srch, "#FFFF99") Response.Write"" Else Response.Write sorry End If Response.Write"" rs.MoveNext howmanyrecs = howmanyrecs + 1 LinkCount = LinkCount + 1 CheckConnection Wend Response.Write"
"&hilite1&" "&hilite2&" : "&hilite3&"

"&hilite1&" : "&hilite2&"

"&hilite1&" : "&hilite2&"

"&hilite1&" : "&hilite2&"

" If maxcount > 1 Then Call ShowNavBar("search", "search") rs.Close Else Response.Write sorry End If Set rs = Nothing Else Response.Write sorry End If TemplateAfterPC Tek9PageEnd Case "newsletter", "nl" 'this is the code that gets run for your newsletter. it is also used when your newsletter recipients wish to unsubscribe, etc. If Not Tek9PageBegin("newsletter", Empty) Then Response.Redirect g.HomePageURL & "tek9.asp" TemplateBeforePC Select Case mode Case "subscribe" myEmail = Request.Form("myEmail") If myEmail <> "" And ValidEmailAddress(myEmail) = True Then Set rsU = Server.CreateObject("ADODB.RecordSet") rsU.Open "TBLNEWSLETTER", cnDZ, adOpenStatic, adLockOptimistic rsU.AddNew rsU.Fields("MY_EMAIL") = myEmail rsU.Fields("THE_DATE") = Now() rsU.Update rsU.Close Set rsU = Nothing Response.Redirect"tek9.asp?pg=newsletter&mode=subscribed" Else Response.Redirect"tek9.asp?pg=newsletter&mode=error" End If Case "subscribed" Response.Write g.Str("NewsletterSubscribed") Case "error" Response.Write g.Str("NewsletterError") Case "unsubscribed", "un" email = Request.QueryString("email") If Trim(email&"X") = "X" Then email = Request.QueryString("e") If email <> "" Then Set rs = cnDZ.Execute("SELECT * FROM TBLNEWSLETTER WHERE MY_EMAIL = '"&email&"';") If Not rs.EOF Then sql = "DELETE MY_EMAIL FROM TBLNEWSLETTER WHERE MY_EMAIL = '"&email&"';" cnDZ.Execute sql, , adCmdText Or adExecuteNoRecords Response.Write g.Str("NewsletterUnsubscribed") Else Response.Write sorry End If Else Response.Write sorry End If Case Else Response.Write img1 & pc & "

" & img2 & txt2 If img3 <> "" Then Response.Write"

" & img3 Response.Write txt3 If img4 <> "" Then Response.Write"

" & img4 Response.Write txt4 End Select TemplateAfterPC Tek9PageEnd Case "extranet" 'this is the page that is used for your customers to access their eAccounts, track their order, etc etc. If Not Tek9PageBegin(pg, Empty) Then Response.Redirect g.HomePageURL & "tek9.asp" TemplateBeforePC If Not IsLoggedIn() Then mode = "login" If mode = "" Then Set rs = GetCurrentCustomerRS() Response.Write"Welcome to the " & g.HomeDomain & " Extranet. We hope to provide you with simple access to all of your info.. if you would like to see something added here, feel free to contact us direct. Please select your destination from the menu below:"&_ ""&_ "
Click here to Logout

" rs.Close: Set rs = Nothing ElseIf mode = "login" Then Response.Write img1 & pc & "
" DisplayLogin g.SecureURL & "tek9.asp?pg=extranet&mode=login", g.SecureURL & "tek9.asp?pg=extranet" ElseIf mode = "orderstatus" Then Response.Write"Here are the orders which we currently have on file for you. If you are having problems of any kind, please feel free to contact us direct. Thank you!
    " Set rsCheck = cnDZ.Execute("SELECT DISTINCT OrderID FROM tblOrders WHERE CustID " & CSQLEq(cid)) If Not rsCheck.EOF Then Do Until rsCheck.EOF Response.Write"
  • Order "&rsCheck("OrderID")&"
  • " rsCheck.MoveNext Loop Else Response.Write"
  • Sorry, no past Orders were found..
  • " End If rsCheck.Close Set rsCheck = Nothing Response.Write"
Return to Extranet..

" ElseIf mode = "editaccount" Then Function CreateTextField(Name, CurrentValue, FieldName, Attributes, Required, Description, CurrencyValue) Dim showVal, cls, cur, mLen, descrip If Trim(CurrentValue) = "" Then showVal = "" Else showVal = CurrentValue If CurrencyValue = True Then cur = "$" Else cur = "" descrip = IIF(Trim(Description) <> "", "-" & Description, "") showVal = GetShowValue(CurrentValue) 'cls = GetClass(Required) Response.Write"" & Name & "" & _ "" & cur & "" & Descrip & "" End Function Function GetShowValue(theValue) If Trim(theValue) = "" Or IsNull(theValue) = True Then GetShowValue = "" Else GetShowValue = theValue End Function Function CreateHRBreak () Response.Write"
" End Function Set rs = GetCurrentCustomerRS() Response.Write"" Response.Write"" CreateTextField "*First Name", rs("FNAME"), "FNAME", "", True, "Contact's first name", False CreateTextField "*Last Name", rs("LNAME"), "LNAME", "", True, "Contact's last name", False CreateTextField "Address", rs("ADDRESS1"), "ADDRESS1", "", False, "Street address", False CreateTextField "", rs("ADDRESS2"), "ADDRESS2", "", False, "Bldg. #, Apartment #, PO Box #, etc.", False CreateTextField "City", rs("CITY"), "CITY", "", False, "City", False Response.Write "" CreateTextField "Zip Code", rs("ZIP"), "ZIP", "", False, "Zip Code", False Response.Write "" CreateTextField "Phone", rs("PHONE"), "PHONE", "", False, "Telephone number", False CreateHRBreak Response.Write "" CreateTextField "Email", rs("EMAIL"), "EMAIL", "", False, "Contact's Email Address", False CreateTextField "Password", rs("PWord"), "PWORD", "", False, "Password for intranet/extranet access", False Response.Write _ ""&_ ""&_ "
Edit your eAccount
"&UCase(Left(g("STATE_TYPE"), 1))&LCase(Right(g("STATE_TYPE"), Len(g("STATE_TYPE")) - 1))&"" Set rs2 = cnDZ.Execute("SELECT CODE, STATE FROM TBLSTATES ORDER BY CODE ASC;") If Not rs2.EOF Then Response.Write"-Select your "&UCase(Left(g("STATE_TYPE"), 1))&LCase(Right(g("STATE_TYPE"), Len(g("STATE_TYPE")) - 1))&" (if applicable)" Else Response.Write"No "&UCase(Left(g("STATE_TYPE"), 1))&LCase(Right(g("STATE_TYPE"), Len(g("STATE_TYPE")) - 1))&"'s entered yet!" End If Response.Write"
*Country" Set rs2 = cnDZ.Execute("SELECT CODE3, CODE2, Country FROM TBLCOUNTRIES ORDER BY Country ASC;") If Not rs2.EOF Then Response.Write"-Select the Country" Else Response.Write"No Countries entered yet!" End If rs2.Close: Set rs2 = Nothing Response.Write"
Editing these may require you to login again.
Click to submit changes
« Click here to CANCEL and return home.
" ElseIf mode = "updateacct" Then strEMail = EStr(Request.Form("EMail")) strPassword = EStr(Request.Form("PWord")) If IsEmpty(strEMail) Or IsEmpty(strPassword) Then Response.Write "



Both email & password must be entered!

Click here to contact us...



" Else Set rsU = OpenUpdateableRS("SELECT * FROM tblLogins WHERE CustID " & CSQLEq(cid)) If HasRecords(rsU) Then lngContactID = rsU("ContactID") rsU("EMail") = strEMail rsU("PWord") = strPassword rsU.Update rsU.Close: Set rsU = Nothing Set rsU = OpenUpdateableRS("SELECT * FROM tblContacts WHERE ContactID " & CSQLEq(lngContactID)) rsU("FNAME") = EStr(Request.Form("FNAME")) rsU("LNAME") = EStr(Request.Form("LNAME")) rsU("Address1") = EStr(Request.Form("Address1")) rsU("Address2") = EStr(Request.Form("Address2")) rsU("City") = EStr(Request.Form("City")) rsU("State") = EStr(Request.Form("State")) rsU("Zip") = EStr(Request.Form("Zip")) rsU("Country") = EStr(Request.Form("Country")) rsU("Phone") = EStr(Request.Form("Phone")) rsU.Update Response.Write "



Successful!

Click here to return home...



" Else Response.Write "



Failed!

Click here to contact us...



" End If rsU.Close: Set rsU = Nothing End If ElseIf mode = "download" Then Set rs = GetCurrentCustomerRS() If Not rs("Reseller") Then Response.Redirect "tek9.asp?pg=extranet" Set rsI = cnDZ.Execute("Select ItemName, ItemID From tblInventory Where Download_Filename <> '' Order By ItemName") Response.Write "Here you can find our library of downloadable software products:
    " Do Until rsI.EOF Response.Write "
  • " & rsI("ItemName") & "
  • " rsI.MoveNext Loop rsI.Close Set rsI = Nothing Response.Write"
Return to Extranet..

" rs.Close: Set rs = Nothing ElseIf mode = "logout" Then CustomerLogout Response.Write"




You have been successfully logged out.
"&_ "
To login again, please click here,
or click here to return home..



" Else Response.Write "That mode is invalid." End If TemplateAfterPC Tek9PageEnd Case "pwd_reminder" 'if one of your customers is trying to login, and they forget their password, this is the code that will send it to them. If Not Tek9PageBegin(pg, Empty) Then Response.Redirect g.HomePageURL & "tek9.asp" TemplateBeforePC If mode = "" Then Response.Write img1 & pc &_ "
"&_ "Your Email Address:
"&_ " "&_ "
" ElseIf mode = "results" Then If Request.QueryString("result") = "true" Then Response.Write"


Successful!

If we found your email on file, then your password has been sent. Return Home..

" Else email = Request.Form("email") If email <> "" And ValidEmailAddress(email) Then If g("USE_ASPMAIL") Then Set Mailer = Server.CreateObject("SMTPsvg.Mailer") Mailer.RemoteHost = g("MAILHOST") Mailer.FromName = g.homeDomain & " Password Reminder Page" Mailer.FromAddress = email Mailer.AddRecipient "Password Reminder", email Mailer.Subject = g.homeDomain & " Password Reminder" bodytxt = "Sorry to hear you have forgotten your password! The password which we currently have on file for you is: "&vbCrLf &vbCrLf Set rs = cnDZ.Execute("SELECT EMail, Pword FROM tblLogins WHERE EMail = '"&email&"'") If Not rs.EOF Then bodytxt = bodytxt & " ---> "&rs("Pword")&"" rs.Close Else bodytxt = bodytxt & " --> Email/Password not found. Please Contact the Webmaster." Set rsU = Server.CreateObject("ADODB.RecordSet") rsU.Open "TBLNEWSLETTER", cnDZ, adOpenStatic, adLockOptimistic rsU.AddNew rsU.Fields("MY_EMAIL") = email rsU.Fields("THE_DATE") = Now() rsU.Update rsU.Close Set rsU = Nothing End If Set rs = Nothing Mailer.Bodytext = bodytxt &vbCrLf &vbCrLf &"Please make a note of it. Thank you! "&g.homeDomain&" Staff" 'Mailer.SMTPLog = "C:\ASPMail.log" If Mailer.SendMail Then Response.Redirect g.homepageURL&"tek9.asp?pg=pwd_reminder&mode=results&result=true" Else Response.Write"Failed. Please contact our webmaster." Set Mailer = Nothing 'use Mailer.Response if the aspmail code dies for some reason.. Else 'run CDONTS: ReDim FromArray(1), ToArray(1), BCCArray(1) FromArray(0) = g.homeDomain & " Password Reminder Page" FromArray(1) = email ToArray(0) = "WebUser" ToArray(1) = email BodyText = "Sorry to hear you have forgotten your password! The password which we currently have on file for you is: "&vbCrLf &vbCrLf Set rs = cnDZ.Execute("SELECT EMail, Pword FROM tblLogins WHERE EMail = '"&email&"';") If Not rs.EOF Then BodyText = BodyText & " ---> "&rs("Pword")&"" rs.Close Else BodyText = BodyText & " --> Email/Password not found. Please Contact the Webmaster." Set rsU = Server.CreateObject("ADODB.RecordSet") rsU.Open "TBLNEWSLETTER", cnDZ, adOpenStatic, adLockOptimistic rsU.AddNew rsU.Fields("MY_EMAIL") = email rsU.Fields("THE_DATE") = Now() rsU.Update rsU.Close Set rsU = Nothing End If Set rs = Nothing BodyText = BodyText &vbCrLf &vbCrLf &"Please make a note of it. Thank you! "&g.homeDomain&" Staff" SendEMail FromArray, ToArray, 0, BCCArray, "text/plain", g.homeDomain & " Password Reminder Page", BodyText, 3 Response.Redirect g.homepageURL&"tek9.asp?pg=pwd_reminder&mode=results&result=true" End If Else Response.Redirect g.homepageURL&"tek9.asp?pg=pwd_reminder&mode=invalid" End If End If ElseIf mode = "invalid" Then Response.Write"


Sorry!

The email address you have entered does not appear to be a valid one. Please try again. Thank you!

" Else Response.Write sorry End If TemplateAfterPC Tek9PageEnd Case "contact" 'this code is used for your "Contact Us" page. (pg=contact) If Not Tek9PageBegin(pg, Empty) Then Response.Redirect g.HomePageURL & "tek9.asp" TemplateBeforePC Select Case mode Case "results" FNAME = Request.Form("FNAME") LNAME = Request.Form("LNAME") EMAIL = Request.Form("EMAIL") If ValidEmailAddress(EMAIL) Then Set rsU = Server.CreateObject("ADODB.RecordSet") rsU.Open "TBLNEWSLETTER", cnDZ, adOpenStatic, adLockOptimistic rsU.AddNew rsU.Fields("MY_EMAIL") = EMAIL rsU.Fields("THE_DATE") = Now() rsU.Update rsU.Close Set rsU = Nothing End If PHONE = Request.Form("PHONE") COMMENTS = Request.Form("COMMENTS") If COMMENTS = "" Then COMMENTS = "No comments entered!" Set rsU = Server.CreateObject("ADODB.RecordSet") rsU.Open "TBLCONTACT", cnDZ, adOpenStatic, adLockOptimistic rsU.AddNew If FNAME <> "" Then rsU.Fields("FNAME") = FNAME If LNAME <> "" Then rsU.Fields("LNAME") = LNAME If EMAIL <> "" Then rsU.Fields("EMAIL") = EMAIL If PHONE <> "" Then rsU.Fields("PHONE") = PHONE rsU.Fields("COMMENTS") = COMMENTS rsU.Fields("THE_DATE") = Now() rsU("Attn") = Request.Form("attn") Select Case Request.Form("attn") Case g("EMail1") strAttn = g("EMail1Description") Case g("EMail2") strAttn = g("EMail2Description") Case g("EMail3") strAttn = g("EMail3Description") End Select rsU("AttnDescription") = strAttn rsU("CountryCode") = Request.Form("countrycode") rsU.Update rsU.Close: Set rsU = Nothing If ValidEmailAddress(EMAIL) Then Set rs = GetCountryByCode2RS(Request.Form("countrycode")) If HasRecords(rs) Then strCountry = rs("Country") Else strCountry = "Unknown" End If rs.Close: Set rs = Nothing ReDim FromArray(1), ToArray(1) FromArray(0) = g.HomeDomain & " Contact Us Page" FromArray(1) = EMAIL ToArray(0) = strAttn ToArray(1) = Request.Form("attn") BodyText = "Submitted By: "&FNAME&" "&LNAME &vbCrLf &_ "Email: mailto:"&EMAIL &vbCrLf &_ "Country: "&strCountry&vbCrLf&_ "Phone: "&PHONE &vbCrLf &_ "Submitted: "&Now &vbCrLf &vbCrLf &_ "Comments: "&COMMENTS 'Email to webmaster(s) SendEMail FromArray, ToArray, 0, BCCArray, "text/plain", g.homeDomain & " Contact Us Page", BodyText, 3 BodyText = "We received the following submission:" &vbCrLf&vbCrLf&_ BodyText&vbCrLf&vbCrLf&vbCrLf&_ "We value your questions/comments and will be responding shortly."&vbCrLf &_ "--Team "&g("Company_Name")&" "&g.homePageURL 'Auto-response SendEMail ToArray, FromArray, 0, BCCArray, "text/plain", g.homeDomain & " Contact Us Page", BodyText, 3 Else Response.Redirect g.HomePageURL & "tek9.asp?pg=contact&mode=invalid" End If Response.Write"


Successful!
We will contact you shortly..

Click here to return home



" Case "invalid" Response.Write"


Error!
Email address is not valid

Click here to return to contact page



" Case Else Response.Write img1 & pc If Trim("X"&g("City")) <> "X" Then citynu = g("City") & ", " If Trim("X"&g("Phone1")) = "X" Then phone1nu = "" Else phone1nu = "telephone:
"&g("Phone1")&" "&IIf(Trim(g("bizhours")&"X") = "X", "", "("&g("bizhours")&")")&"" If Trim("X"&g("Phone2")) = "X" Then phone2nu = "" Else phone2nu = "
secondary:
"&g("Phone2")&"" If Trim("X"&g("Fax")) = "X" Then faxnu = "" Else faxnu = "
facsimile:
"&g("Fax")&"" Response.Write"
"&_ ""&_ ""&_ ""&_ ""&_ "
Mailing and Telephone
"&g("company_name")&"
"&g("address1")&" "&g("address2")&"
"&citynu&""&g("state_code")&" "&g("country_code")&"
"&g("zip")&"
"&phone1nu&""&phone2nu&""&faxnu&"
"&_ "
"&_ ""&_ ""&_ ""&_ ""&_ ""&_ ""&_ ""&_ ""&_ ""&_ ""&_ ""&_ ""&_ ""&_ ""&_ ""&_ ""&_ "
Speak with a human
First Name
Last Name
Email Address
Phone Number
Contact
"&_ ""&_ "
Country
"&_ ""&_ "
" End Select TemplateAfterPC Tek9PageEnd Case "survey" 'if you own a copy of the LINE9 Survey software, this special code is used for that application: If IsEmpty(mode) Then Response.Redirect g.HomePageURL If Request.Form("answer") = "" Then Response.Redirect g.HomePageURL If Not Tek9PageBegin(pg, Empty) Then Response.Redirect g.HomePageURL & "tek9.asp" TemplateBeforePC InitSurvey TemplateAfterPC Tek9PageEnd Case "manuf" 'this code is used to email manufacturers of their orders if you have that feature enabled in your Intranet Global Editor: If GetCurrentManuf Then MarkCurrentManufActive Select Case mode Case "login" If Request.Form("savecookie") = "on" Then s_blnSaveCookie = True If ManufLogin(Request.Form("email"), Request.Form("password")) Then Response.Redirect g.SecureURL & "tek9.asp?pg=manuf" ExPageManufLogin Case "logout" If IsManufLoggedIn() Then ManufLogout ExPageManufLogout Else Response.Redirect g.SecureURL & "tek9.asp?pg=manuf&mode=login" End If Case "profile" If Not IsManufLoggedIn() Then Response.Redirect g.SecureURL & "tek9.asp?pg=manuf&mode=login" If Request.Form("submit.x") <> "" Then If Not Tek9PageBegin(pg, Empty) Then Response.Redirect g.HomePageURL & "tek9.asp" TemplateBeforePC If UpdateManufProfile(Request.Form("Name"), Request.Form("Descrip"), Request.Form("EMail"), Request.Form("Password")) Then Response.Write "




Your eProfile has been successfully updated.
" _ & "
Click here to return,
click here to logout,
or click here to return to the main site..



" Else Response.Write "




Errors occurred saving new info. Your eProfile has not been updated!
" _ & "
Click here to return,
click here to logout,
or click here to return to the main site..



" End If TemplateAfterPC Tek9PageEnd Else ExPageManufProfile End If Case "rpt_orders" If Not IsManufLoggedIn() Then Response.Redirect g.SecureURL & "tek9.asp?pg=manuf&mode=login" ExPageManufOrdersReport Case "download" If Not IsManufLoggedIn() Then Response.Redirect g.SecureURL & "tek9.asp?pg=manuf&mode=login" ExPageManufDownload Case Else If Not IsManufLoggedIn() Then Response.Redirect g.SecureURL & "tek9.asp?pg=manuf&mode=login" ExPageManufMenu End Select 'Response.Write "this is manufacturer
" Case Else 'here is the default code that will display new pages in your site, and custom pages that you create: If Not Tek9PageBegin(pg, Empty) Then Response.Redirect g.HomePageURL & "tek9.asp" TemplateBeforePC Response.Write img1 & pc & "

" & img2 & txt2 If img3 <> "" Then Response.Write"

" & img3 Response.Write txt3 If img4 <> "" Then Response.Write"

" & img4 Response.Write txt4 TemplateAfterPC Tek9PageEnd End Select Tek9Terminate '----------------------------------------------------------- ' ExPageManufDownload ' ------------------- ' Displays the extranet manufacturer downloads. '----------------------------------------------------------- Sub ExPageManufDownload() Dim rs If Not Tek9PageBegin(pg, Empty) Then Response.Redirect g.HomePageURL & "tek9.asp" TemplateBeforePC Set rs = GetCurrentManufDownloadRS() Response.Write "Here you can find all the downloadable (e)items available on this site, produced by yours truly:
    " If HasRecords(rs) Then Do Until rs.EOF Response.Write "
  • " & rs("ItemName") & "
  • " rs.MoveNext Loop Else Response.Write "
  • You do not provide any downloadable goods for this eCommerce site.
  • " End If rs.Close: Set rs = Nothing Response.Write "

Go back to your ExtraNet.

" TemplateAfterPC Tek9PageEnd End Sub '----------------------------------------------------------- ' ExPageManufLogin ' ---------------- ' Displays the extranet manufacturer login. '----------------------------------------------------------- Sub ExPageManufLogin() If Not Tek9PageBegin(pg, Empty) Then Response.Redirect g.HomePageURL & "tek9.asp" TemplateBeforePC Response.Write "

" _ & "" _ & "" _ & "" _ & "" _ & "
 " & IIf(IsEmpty(s_lngManufID), "Login", "Welcome") & " 
" _ & "
" _ & "" _ & "" _ & "" _ & "" If s_strCookieUse = "will" Then Response.Write "" Response.Write "
Manufacturer ExtraNet
Please Login:
Forgot your password? Email it to me!
" _ & "
" _ & "Enter your Email:
" _ & "Enter your Password: " _ & "" _ & "


" TemplateAfterPC Tek9PageEnd End Sub '----------------------------------------------------------- ' ExPageManufLogout ' ----------------- ' Displays the extranet manufacturer logout. '----------------------------------------------------------- Sub ExPageManufLogout() If Not Tek9PageBegin(pg, Empty) Then Response.Redirect g.HomePageURL & "tek9.asp" TemplateBeforePC Response.Write "




You have been successfully logged out.
" _ & "
To login again, please click here,
or click here to return home..



" TemplateAfterPC Tek9PageEnd End Sub '----------------------------------------------------------- ' ExPageManufMenu ' --------------- ' Displays the extranet manufacturer menu. '----------------------------------------------------------- Sub ExPageManufMenu() If Not Tek9PageBegin(pg, Empty) Then Response.Redirect g.HomePageURL & "tek9.asp" TemplateBeforePC Response.Write "Welcome to the " & g.HomeDomain & " Manufacturer's Extranet. We hope to provide you with simple access to all of your info.. if you would like to see something added here, feel free to contact us direct. Please select your destination from the menu below:" _ & "" _ & "
Click here to Logout

" TemplateAfterPC Tek9PageEnd End Sub '----------------------------------------------------------- ' ExPageManufOrdersReport ' ----------------------- ' Displays the extranet manufacturer's past orders report. '----------------------------------------------------------- Sub ExPageManufOrdersReport() Dim rs, rsOrders, rsOrdersItems If Not Tek9PageBegin(pg, Empty) Then Response.Redirect g.HomePageURL & "tek9.asp" TemplateBeforePC Set rs = GetCurrentManufRS() Set rsOrders = GetCurrentManufOrdersRS() Response.Write "
" Response.Write ""&_ ""&CreateHelpCell("extranet manuf orders")&"" Response.Write "
" & _ "Order History for " & rs("Name") & " Products
" If HasRecords(rsOrders) Then Do Until rsOrders.EOF Set rsOrderItems = GetOrderItemsRS(rsOrders("OrderID")) Response.Write "" _ & "" _ & "" Do Until rsOrderItems.EOF Response.Write"" rsOrderItems.MoveNext Loop rsOrderItems.Close: Set rsOrderItems = Nothing rsOrders.MoveNext If Not rsOrders.EOF Then Response.Write"" Loop Else Response.Write"" End If Response.Write"
Order ID "&rsOrders("ORDERID")&"
Date "&rsOrders("THEDATE")&"
Item NameQtyStatus
"&rsOrderItems("ITEMNAME")&""&rsOrderItems("QUANTITY")&""&rsOrderItems("STATUS")&"

There are no orders containing items from this manufacturer.
« Click here to return home.
" rsOrders.Close: Set rsOrders = Nothing rs.Close: Set rs = Nothing TemplateAfterPC Tek9PageEnd End Sub '----------------------------------------------------------- ' ExPageManufProfile ' ------------------ ' Displays the extranet manufacturer's profile. '----------------------------------------------------------- Sub ExPageManufProfile() Dim rs If Not Tek9PageBegin(pg, Empty) Then Response.Redirect g.HomePageURL & "tek9.asp" TemplateBeforePC Response.Write"" _ & "" Set rs = GetCurrentManufRS() CreateTextField "*Name", rs("Name"), "Name", "", True, "Manufacturer name", False CreateTextArea "Description", rs("Descrip"), "Descrip", "", False, "extranet manuf" CreateHRBreak CreateTextField "Email", rs("EMail"), "EMail", "", False, "Email Address", False CreateTextField "Password", rs("PWord"), "Password", "", False, "Password for extranet access", False Response.Write "" _ & "" _ & "
Edit your eProfile
Click to submit changes
« Click here to CANCEL and return home.
" TemplateAfterPC Tek9PageEnd End Sub '----------------------------------------------------------- ' ExPageAdHoc ' ----------- ' Displays an ad hoc extranet page and ends there. '----------------------------------------------------------- Sub ExPageAdHoc(strTitle, strContent) Tek9PageBegin pg, strTitle TemplateBeforePC Response.Write strContent TemplateAfterPC Tek9PageEnd Tek9Terminate Response.End End Sub %>