<%@LANGUAGE="VBSCRIPT"%> <% 'Let's get the section Section = Request.QueryString("Section") 'Let's temporary redirect the server pages based on the section the user is visiting If Len(Section) > 0 Then Response.Redirect("http://www.myimportstore.com/index.asp?Section="&Section) Else Response.Redirect("http://www.myimportstore.com") End If Page = Request.QueryString("Page") Ref = Request.QueryString("Ref") 'Initialise FS as the default store / Not used for the time being 'If len(SiteName) = 0 then 'SiteName = "myfs" 'End If 'Initialise the cookie to write based on referenced link If len(Ref) > 0 And Len(Session("Ref")) = 0 then Response.cookies("FSStore")("Ref") = Ref Response.cookies("FSStore").expires = Date + 30 Session("Ref") = Ref ElseIf len(Ref) = 0 And Request.cookies("FSStore").count = 1 And Len(Session("Ref")) = 0 Then Session("Ref") = Request.cookies("FSStore")("Ref") End if 'Let's open the database Set Con = Server.CreateObject("ADODB.Connection") Con.open DBName 'Get universal variables (items to load per page & currency symbol) Set RS2 = Con.execute("Select Items_Per_Page, Currency_Symbol from Variables") Offset = RS2("Items_Per_Page") 'Load index store page / featured section if no section is indicated If len(Section) = 0 or Section = "Featured" then 'Let's count how many items there are to load, split them to different pages 'And calculate how many pages to load NumOfItems = countItems(DBName, "Items", "Where Featured_Item = 1") NumOfPages = countPages(NumOfItems, Offset) 'Check whether there are more pages to load PageNav = makePageNav(NumOfPages, "Featured") 'Let's create the body header BodyHeader = "Final Fantasy, Naruto & Anime Featured Items" 'Load page 1 details If Page < 2 Then 'Load the first page (Featured Items) Set RS = Con.execute("Select Top "&Offset&" * from Items Where Featured_Item = 1 Order by Item_Position Asc") 'Load pages bigger than 1 Else RSMoveFigure = (Page * Offset) - Offset ItemsLoaded = Page * Offset Set RS = Con.execute("SELECT Top "&ItemsLoaded&" * FROM Items WHERE Featured_Item = 1 ORDER BY Item_Position ASC;") 'Move to record RS.move RSMoveFigure End If 'Start store edit / handle the new items section ElseIf Section = "New" Then 'Let's count how many items there are to load, split them to different pages 'And calculate how many pages to load NumOfItems = countItems(DBName, "Items", "Where New_Item = 1") NumOfPages = countPages(NumOfItems, Offset) 'Check whether there are more pages to load PageNav = makePageNav(NumOfPages, "New") 'Let's create the body header BodyHeader = "New Items & Products" 'Load page 1 details If Page < 2 Then 'Load the first page (Featured Items) Set RS = Con.execute("Select Top "&Offset&" * from Items Where New_Item = 1 Order by Item_Position Asc") 'Load pages bigger than 1 Else RSMoveFigure = (Page * Offset) - Offset ItemsLoaded = Page * Offset Set RS = Con.execute("SELECT Top "&ItemsLoaded&" * FROM Items WHERE New_Item = 1 ORDER BY Item_Position ASC;") 'Move to record RS.move RSMoveFigure End If 'End Store Edit (New Items 18 Sept 2005 'Handle all other sections / This is the most buggy part Else 'Count variables NumOfItems = countItems(DBName, "Items", "Where Category = "&Section&" And Display = 1 And Category = "&Section&"") NumOfPages = countPages(NumOfItems, Offset) PageNav = makePageNav(NumOfPages, Section) 'Let's create the body header Set RS = Con.execute("Select Name, Description from Categories Where ID = "&Section&"") BodyHeader = RS("Name") CatDescription = RS("Description") 'Load the first page If Page < 2 Then Set RS = Con.execute("Select Top "&Offset&" * From Items Where Category = "&Section&" AND Display = 1 AND Category = "&Section&" ORDER BY Featured_Item DESC, Stock_Level DESC, Backorder_Status DESC, Item_Position ASC;") Else '14 July 03 4:45 pm / Hope it works this time RSMoveFigure = (Page * Offset) - Offset ItemsLoaded = Page * Offset 'Response.write "
RSMoveFigure: " & RSMoveFigure Set RS = Con.execute("SELECT Top "&ItemsLoaded&" * FROM Items WHERE Category = "&Section&" AND Display = 1 AND Category = "&Section&" ORDER BY Featured_Item DESC, Stock_Level DESC, Backorder_Status DESC, Item_Position ASC;") 'Move to record RS.move RSMoveFigure End If End If 'Let's create the main header Output = "" 'Make a notice if there are no products If RS.BOF Then Output = Output & "No products available for this category." End If 'Let's create the output While not RS.EOF 'Insert a star image for popular and new items 'Start store edit 18 September 2005 ProcessOptions = RS("Options") ProcessNewItems = RS("New_Item") myPopularText = "" If UCase(ProcessOptions) = "P" Then 'Response.write ProcessOptions myPopularText = " Popular" End If If ProcessNewItems = 1 Then myPopularText = myPopularText & " New" End If 'End store edit 'Code testing \\ To remove once promotion is over If RS("Category") = 14 Then Output = Output & "" 'Promotion customization for item clearance 'Overwrite 6% discount ElseIf RS("Category") <> 14 Then 'Meddle with the price figures PromotionPrice = doDiscount(RS("Price")) PromotionPrice = FormatNumber(PromotionPrice, 2) '18 Nov 2005 \ Display status of item 'Determine status of item If RS("Stock_Level") = 0 And RS("Backorder_Status") = 0 Then StatusText = "Out of Stock" NoButtonDisplay = True ElseIf RS("Stock_Level") = 0 And RS("Backorder_Status") = 1 Then StatusText = "Backorder" NoButtonDisplay = False Else StatusText = "Available" NoButtonDisplay = False End If '23 Nov 2005 \ Disable 'add to cart' button for out of stock items If NoButtonDisplay = True Then Output = Output & "" 'Show add to cart button for all other items Else Output = Output & "" End If 'End 23 Nov 2005 Edit '23.11.05 As usual this part seems redundant Else 'Keep only this part Output = Output & "" End If 'Output = Output & "" 'Paypal code reference ' RS.moveNext Wend 'Finalise the output Output = Output & "
"&RS("Name")&""& myPopularText &"
"&RS("Description")&"

Original Price: $"&FormatNumber(RS("Price"), 2)&"
Sale Price: "&RS2("Currency_Symbol") & PromotionPrice &"

"&RS("Name")&""& myPopularText &"
"&RS("Description")&"

Status: "&StatusText&"
Original Price: $"&FormatNumber(RS("Price"), 2)&"
Sale Price: "&RS2("Currency_Symbol") & PromotionPrice &"

"&RS("Name")&""& myPopularText &"
"&RS("Description")&"

Status: "&StatusText&"
Original Price: $"&FormatNumber(RS("Price"), 2)&"
Sale Price: "&RS2("Currency_Symbol") & PromotionPrice &"

"&RS("Name")&"
"&RS("Description")&"

"&RS2("Currency_Symbol") & FormatNumber(RS("Price"), 2)&"

"&RS("Name")&"
"&RS("Description")&"

"&RS2("Currency_Symbol") & FormatNumber(RS("Price"), 2)&"

" 'Let's create the categories menu Set CatModule = Con.execute("Select ID, Name from Categories Order by Category_Position Asc") CatMenu = "» Featured Merchandise & Bestsellers
» New Items & Products

" while not CatModule.eof CatMenu = CatMenu & "» " & "" & CatModule("Name") & "
" CatModule.moveNext wend 'Let's kill all sessions Con.close Set RS = Nothing Set RS2 = Nothing %> Final Fantasy Merchandise, Final Fantasy Products, Naruto Merchandise, Naruto Products

Final Fantasy 10, 9, 8, 7, 6
online store, squall's necklace FantasySquare, Your Final Fantasy Gaming Needs forums, final fantasy
 
 

<%=BodyHeader%>

<% If Len(Section) = 0 Then %> <% End If %>

Navigation:

<%=CatMenu%>

» Check Order Status
» Store FAQ
» Contact Us
» Shipping Rates & Delivery Info
» 100% Customer Satisfaction Policy & Testimonials
» Feedback Form

<%=CatDescription%>

<%=PageNav%>

<%=Output%>

<%=PageNav%>

Navigation:

<%=CatMenu%>

 

 
FantasySquare, Final Fantasy Site by My Cool Designs