<% META_DESCRIPTION="" META_KEYWORDS="" META_TITLE = "" PAGE_TITLE = "Magasinez enligne" PAGE_KEY = "shoponline" TITLE_TAG = "" Dim intCategoryId: intCategoryId = Request.QueryString("ID") Dim strSelectAllCategories: strSelectAllSubCategories = "SELECT mlb_categories.id, mlb_categories_lang.name, mlb_categories.image, mlb_categories_lang.description, mlb_sub_categories.id, mlb_sub_categories_lang.name, mlb_sub_categories.image, mlb_categories_lang.sell_sheet FROM (mlb_categories INNER JOIN mlb_categories_lang ON mlb_categories.id = mlb_categories_lang.record_id) LEFT JOIN (mlb_sub_categories INNER JOIN mlb_sub_categories_lang ON (mlb_sub_categories.id = mlb_sub_categories_lang.record_id AND mlb_sub_categories_lang.[language] = '" & selLang & "')) ON (mlb_categories.id = mlb_sub_categories.category_id AND mlb_sub_categories.is_on=1) WHERE mlb_categories.is_on=1 AND mlb_categories_lang.[language] = '" & selLang & "'" Dim intImgWidth: intImgWidth = 50 Dim intImgHeight: intImgHeight = 50 Dim blnDoResize: blnDoResize = IsObjectInstalled("Persits.Jpeg") Dim blnShowLogos: blnShowLogos = False Dim arrGridInfo: arrGridInfo = Array(intImgWidth, intImgHeight, 20, 20, 7) Dim arrAllCategories Dim arrAllSubCategories() Dim intNumOfRecords Dim strSubCategoryList If Not IsNumeric(intCategoryId) Then blnHasError = True ElseIf LenB(intCategoryId) <> 0 Then intCategoryId = CInt(intCategoryId) blnShowLogos = True Else intCategoryId = -1 End If If blnHasError Then Response.Redirect "/error.asp" If intCategoryId > 0 Then strSelectAllSubCategories = strSelectAllSubCategories & " AND mlb_categories.id=" & intCategoryId End If strSelectAllSubCategories = strSelectAllSubCategories & " ORDER BY mlb_categories.ordering, mlb_categories_lang.name, mlb_sub_categories.ordering, mlb_sub_categories_lang.name" 'Response.Write strSelectAllSubCategories 'Response.End Set DB = New clsDatabase DB.OpenDatabase SQL_DATABASE_NAME, SQL_USR, SQL_PWD intNumOfRecords = DB.RunQuery(strSelectAllSubCategories) - 1 If intNumOfRecords > -1 Then arrAllCategories = DB.GetLastResults() Call loadSideCategories(arrAllCats) Set DB = Nothing %>

magasinez enligne

<% strLastCat = "" For x=0 To intNumOfRecords If LenB("" & arrAllCategories(2, x)) = 0 Then strImgPath = "/common/images/spacer.gif" Else strImgPath = CATEGORIES_IMG_PATH & arrAllCategories(2, x) End If If blnDoResize Then strImgPath = "/common/img.asp?path=" & strImgPath & "&w=" & intImgWidth & "&h=" & intImgHeight End If strLastCat = arrAllCategories(0, x) Redim arrAllSubCategories(2, -1) intNumOfSubItems = -1 If LenB(arrAllCategories(4, x) & "") > 0 Then Do While x<= intNumOfRecords If arrAllCategories(0, x) <> strLastCat Then Exit Do intNumOfSubItems = intNumOfSubItems + 1 Redim Preserve arrAllSubCategories(2, intNumOfSubItems) arrAllSubCategories(0, intNumOfSubItems) = arrAllCategories(4, x) arrAllSubCategories(1, intNumOfSubItems) = arrAllCategories(5, x) arrAllSubCategories(2, intNumOfSubItems) = arrAllCategories(6, x) x = x + 1 Loop x = x - 1 End If strSubCategoryList = "" If intNumOfSubItems > -1 Then strSubCategoryList = BuiltList(arrAllSubCategories, 2, False) Response.Write "" & _ "" & _ " " & _ " " & _ " " & _ " " & _ " " & _ " " & _ " " & _ " " & _ " " & _ " " & _ "

" & LCase("" & Trim("" & arrAllCategories(1, x))) & " produits

" If LenB("" & arrAllCategories(7, x)) > 0 Then strSellSheet = SELL_SHEET_PATH & arrAllCategories(7, x) strSellSheet = "Feuille de vente" Else strSellSheet = "" End If If strSubCategoryList <> "" Then Response.Write "" & _ "
     " & strSellSheet & "
" End If Response.Write "" & _ "

" & Replace(arrAllCategories(3, x) & "", vbLf, "
") & "

" & _ "
" If blnShowLogos AND strSubCategoryList <> "" Then Response.Write "" & _ "" & _ " " & _ " " & _ " " & _ " " & _ " " & _ " " & _ "
" & _ DisplayItems(arrAllSubCategories, "displayproduct.asp", SUB_CATEGORIES_IMG_PATH, False, False, arrGridInfo) & _ "" End If ' Response.Write "" & _ ' "" & _ ' " " & _ ' " " & _ ' " " & _ ' "
" Next %>