<%Response.Buffer = True On Error Resume Next '### DO NOT MODIFY THIS SECTION! ### '========================================================================================================================== Dim key, dbFolder, imgLocation, upload, logo, adminkey, verify_user, moderate, bnrLocation, mysql, mssql, msaccess Dim objFile, catFolder, logFolder, logPATH, dbPATH, catPATH, emailMethod, admin_email, mailHost, notify_email, isIE Dim htextcolor, maxChr, s, sf, sg, ss, web_site, web_name, pp, SMTPID, SMTPPAss, rFile, largeimage, catpos, timeOffset Dim isnotfree, uOpt(7), uOptD(7), strConn, rs, advArray(28), ppArray(30), resetLocale, server_locale, Wysiwyg_type Dim meta_description, meta_keywords, detectMultipleIP, scr_Name, result_web_name, result_meta_description, imagelimit Dim result_meta_keywords, full_description, default_to_cat, ad_cache, IsCache, uOptType(6), uOptSearch(6), optCatList Dim cat3rdName, catName, subCatName, isTurningNumber, seclog, isEvents, eventsArray(21), ispack, istn, listalpha Dim tablPfx, tablUPfx, strUnique, strSUnique, rcver, IP, Sess_Array(100), objConn, uagent, adminPage, isXLT, cfg_reply, cfg_view IP = Request.ServerVariables("REMOTE_ADDR") If Len(Request.ServerVariables("HTTP_X_FORWARDED_FOR")) > 0 Then IP = Request.ServerVariables("HTTP_X_FORWARDED_FOR") uagent = Request.ServerVariables("HTTP_USER_AGENT") '========================================================================================================================== '************************************************************************************************************************** '******************************** START CONFIGURATION ********************************************** '************************************************************************************************************************** '### SECURITY ### ' Display admin menu on all administation pages. Replace [True] with [False] to hide. showAdminMenu = True ' Display "Admin" link within the general menu at the top navigation bar. Replace [True] with [False] to hide. showAdminLink = True ' Admin Logon page name. After changing this value, make sure to rename current admin logon page reflecting the change. ' This variable only reflects the page name. Physical page should always have .asp extention. adminPage = "admin_logon" '### SELECT CLIENT LOCALE ### setLocale "1033" '========================================================================================================================== '### SELECT TIME OFFSET (Difference between server time and your location time. Can be positive or negative number.) ### timeOffset = 0 '========================================================================================================================== '### CHANGE FOLLOWING VALUES TO REFLECT THE CORRECT PATH TO FOLDERS ### dbFolder = "db/" upload = "cl_upload/" bnrLocation = "banners/" ad_cache = "ads/" logo = "img/logo.png" '========================================================================================================================== '### SELECT DATABASE TYPE ### databaseType = "msaccess" 'databaseType = "mssql" 'databaseType = "mysql" '========================================================================================================================== '### CONNECTION STRINGS CONFIGURATION ### Select Case databaseType '*** ACCESS DATABASE *** Case "msaccess" msaccess = True strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" strConn = strConn & Server.MapPath(dbFolder & "cldb.mdb") & ";" '*** MSSQL DATABASE *** Case "mssql" Dim SQLServer mssql = true '# SQL SERVER NAME (PROVIDED BY YOUR HOST) SQLServer = "server_name/IP" '# SQL USER ID (AUTHENTICATION) SQLUser = "user_name" '# SQL PASSWORD (AUTHENTICATION) SQLPassword = "password" '# SQL DATABASE NAME SQLDBName = "database_name" '# DO NOT MODIFY THE CONNECTION STRING BELOW!!!! FOR EXPERIENCED DEVELOPERS ONLY!!! '# If you are an experienced developer and choose to modify connection string for one reason or another, '# make sure to change the respective connection string in mssql_tbl_setup.asp strConn = "Provider=SQLOLEDB;Server=" & SQLServer strConn = strConn & ";User ID=" & SQLUser strConn = strConn & ";Password=" & SQLPassword strConn = strConn & ";Database=" & SQLDBName & ";" '*** MySQL DATABASE *** Case "mysql" Dim MySQLServer mysql = true '# MySQL SERVER IP ADDRESS (PROVIDED BY YOUR HOST) MySQLServer = "server_name/IP" '# MySQL USER ID (AUTHENTICATION) MySQLUser = "user_name" '# MySQL PASSWORD (AUTHENTICATION) MySQLPassword = "password" '# MySQL DATABASE NAME MySQLDBName = "database_name" '# DO NOT MODIFY THE CONNECTION STRING BELOW!!!! FOR EXPERIENCED DEVELOPERS ONLY!!! '# If you are an experienced developer and choose to modify connection string for one reason or another, '# make sure to change the respective connection string in mysql_tbl_setup.asp strConn = "Driver={MySQL ODBC 3.51 Driver};server=" & MySQLServer strConn = strConn & ";uid=" & MySQLUser strConn = strConn & ";pwd=" & MySQLPassword strConn = strConn & ";database=" & MySQLDBName & ";" End Select '************************************************************************************************************************** '******************************** END CONFIGURATION ********************************************** '************************************************************************************************************************** Set objConn = Server.CreateObject("ADODB.Connection") objConn.CursorLocation = 3 objConn.open strConn resetLocale = getLocale server_locale = "1033" 'DO NOT MODIFY THIS s = chr(15) sf = chr(166) sg = chr(164) ss = chr(14) %><% tablPfx = "tbl" tablUPfx = "tbl" strUnique = "_v32c" strSUnique = "_v32c" %><% rcver = 323 AuthorizeNetInstalled = False %> <% '### Navigational Bars Const strText_UpdateAccount = "Update Account" Const strText_MyAds = "My Ads" Const strText_Alerts = "Alerts!" Const strText_Favorites = "Favorites" Const strText_Logout = "Logout" Const strText_Home = "Home" Const strText_BrowseAds = "Browse Ads" Const strText_PostAd = "Post Ad" Const strText_FAQ = "FAQ" Const strText_Admin = "Admin" Const strText_Register = "Register" Const strText_Logon = "Login" Const strText_Email = "Email" Const strText_Password = "Password" Const strText_SearchFor = "Search For" Const strText_SearchIn = "Search In" Const strText_City = "City" Const strText_WithPhotoOnly = "With Photo Only" Const strText_Search = "Search" Const strText_AdvancedSearch = "Advanced Search" Const strText_Youarevisitor = "You are visitor" Const strText_Refresh = "Refresh" Const strText_Advertisewithus = "Advertise with us" Const strText_SiteMap = "Site Map" Const strText_TermsofUse = "Terms of Use" Const strText_Contactus = "Contact us" Const strText_Welcome = "Welcome" Const strText_Credits = "Credits" Const strText_Moderator = "moderator" '### Search, Advanced Search Const strText_ALLCATEGORIES = "ALL CATEGORIES" Const strText_AnyWord = "Any Word" Const strText_AllWords = "All Words" Const strText_ExactPhrase = "Exact Phrase" Const strText_AllDates = "=All Dates=" Const strText_Last = "Last" Const strText_days = "days" Const strText_Week = "Week" Const strText_Basic = "Basic" Const strText_Tryour = "Try our" Const strText_Advanced = "Advanced" Const strText_SearchRules = "Search Rules" Const strText_SearchRefine = "Refine Search" Const strText_SearchNew = "New Search" Const strText_SearchCriteria = "At list one search criteria must be specified." Const strText_SearchKeywords = "Search is case insensitive. Please type keywords separated by a space." Const strText_SearchKeywordsLength = "Minimum length of keywords (if specified) is 3 characters except for 'Exact Phrase' in combination with other keywords." Const strText_SearchSpeedUp = "To speed up a query, please select a target category rather than 'Search All Categories' request." Const strText_SearchCommomWords = "Keywords should not contain common words except for 'Exact Phrase' type search." Const strText_SearchInvalid = "Search query is invalid. Please follow the rules above." Const strText_SearchTryAdvanced = "Try our Advanced Search" Const strText_SearchNoMatch = "Search did not match keyword(s): " Const strText_SearchNoMatch1 = " with any ad records in database!" Const strText_SearchNoMatch2 = "Search did not find any records matching your criteria." Const strText_SearchResultKeywords = "Search Result for Keyword(s) " Const strText_SearchResult = "Search Result in " Const strText_SearchForAll = "Search Ads in All Categories" Const strText_SearchMatchAd = "Ads Which Match Your Search Criteria" Const strText_SearchTitleBody = "Only Ads Title and Body are searched for keywords." Const strText_Searchforkeywords = "Search for keywords" Const strText_KeywordsTarget = "Keywords Target" Const strText_KeywordsFormat = "Keywords Format" Const strText_Sortby = "Sort by" Const strText_CategorytoSearch = "Category to Search" Const strText_DateRange = "Date Range" Const strText_SearchAds = "Search Ads" Const strText_AdTitle = "Ad Title" Const strText_AdBody = "Ad Body" Const strText_AdTitleandBody = "Ad Title and Body" Const strText_DateDescending = "Date - Descending" Const strText_DateAscending = "Date - Ascending" Const strText_AdAuthor = "Ad Author" Const strText_AdswithPhotoFirst = "Ads with Photo First" Const strText_HotAdsFirst = "'Hot' Ads First" Const strText_DisplayCategoriesTree = "Display Categories Tree" Const strText_SearchAll = "Search All" Const strText_SearchAllCategories = "Search All Categories" '### List Tables Heads Const strText_Remove = "Remove" Const strText_PostedOn = "Posted On" Const strText_Subject = "Subject" Const strText_Picture = "Picture" Const strText_Action = "Action" Const strText_Views = "Views" Const strText_Location = "Location" Const strText_Yes = "Yes" Const strText_No = "No" Const strText_NA = "N/A" 'Not Available Const strText_Keywords = "Keywords" Const strText_SearchType = "Search Type" Const strText_Category = "Category" Const strText_Subcategory = "Subcategory" Const strText_3rdLevel = "3rd Level" Const strText_Author = "Author" Const strText_AttachedPhoto = "Attached Photo" '### viewlist.asp, viewscat.asp, viewsublist.asp, viewuserlist.asp Const strText_NoAdsSubmitted = "There are no ads have been submitted to this category." Const strText_InvalidRequestList = "Invalid request!" Const strText_ShowAll = "Show All" Const strText_JumptoCategory = "Jump to Category" Const strText_CannotLocateCategory = "We cannot locate Subcategory you have requested... " Const strText_FeaturedAds = "Featured Ads in " Const strText_Click = "Click" Const strText_CreateAndPost = "to create and post your own ads!" Const strText_ALLinthisCategory = "ALL in this Category" Const strText_Alladspostedby = "All ads posted by" Const strText_From = "From" Const strText_UserNotFound = "User Not Found!" Const strText_AdsforUser = "Ads for User" Const strText_UserAdsPending = "might be expired or pending at the moment!" Const strText_Price = "Price" '### Marquee Const strText_MHeader = "Latest Submissions:" Const strText_MTime = "Today is: " Const strText_NoSubmissions = "No Submissions" '### Paging Const strText_Previous = "Previous" Const strText_Next = "Next" Const strText_Pages = "Pages" Const strText_FirstPage = "First Page" Const strText_LastPage = "Last Page" '### Content Bars Const strText_NoAccountshavebeencreatedyet = "No Accounts have been created yet." Const strText_NoAdshavebeenpostedyet = "No Ads have been posted yet." Const strText_Bethefirsttobelistedhere = "Be the first to be listed here!" Const strText_AllHotAds = "All Hot Ads.." Const strText_Hits = "Hits" Const strText_Ads = "Ads" '### Common Links And Text Const strText_CategoriesList = "Categories List" Const strText_Status = "Status" Const strText_Postedby = "Posted by" Const strText_Edit = "Edit" Const strText_Enable = "Enable" Const strText_Disable = "Disable Ad" Const strText_Images = "Images" Const strText_back = "back" Const strText_Active = "Active" Const strText_Delete = "Delete" Const strText_Modify = "Modify" Const strText_NotActive = "Not Active" Const strText_Expired = "Expired" Const strText_Disabled = "Disabled" Const strText_Repost = "Repost" Const strText_Attach = "Attach" Const strText_Duration = "Duration" Const strText_Reset = "Reset" Const strText_TotalPages = "Total Pages" Const strText_TotalPosted = "Total Posted" Const strText_Categories = "Categories" Const strText_TotallyPostedandActive = "Totally Posted and Active " Const strText_Adsin = "Ads in" '### viewad.asp, adpreview.asp, view_print.asp Const strText_ViewAd = "View Ad" Const strText_AdPreview = "Ad Preview" Const strText_Preview = "Preview" Const strText_Someofthefields = "(Note: Some of the fields may not be available in preview)" Const strText_AddtoFavorites = "Add to Favorites" Const strText_EmailtoaFriend = "Email to a Friend" Const strText_PrintFriendly = "Print Friendly" Const strText_ReplytoAd = "Reply to Ad" Const strText_AdPosted = "Ad Posted" Const strText_AdExpire = "Ad Expires" Const strText_UserInformation = "User Information" Const strText_IPAddress = "IP Address" Const strText_Phone = "Phone" Const strText_UserLocation = "User Location" Const strText_UserWebSite = "User Web Site" Const strText_AllUserAds = "All User Ads" Const strText_AllAds = "All Ads" Const strText_by= "by" Const strText_AdDescription = "Ad Description" Const strText_AdInformation = "Ad Information" Const strText_Textsize = "Text size" Const strText_Viewed = "Viewed" Const strText_times = " times" Const strText_SlideShow = "Slide Show" Const strText_AdisnotFound = "Ad is not Found. Possibly is not Active or Expired." Const strText_ShowThumbs = "Show Thumbs" Const strText_HideThumbs = "Hide Thumbs" Const strText_BacktoDetailedView = "Back to Detailed View" Const strText_PrintFriendlyView = "Print Friendly View" '### alert.asp '### An extended notes text is in extended_language.asp Const strText_ALLSUBCATEGORIES = "ALL SUBCATEGORIES" Const strText_ALL3RDLEVEL = "ALL 3RD LEVEL" Const strText_Alertsforuser = "Alerts for user" Const strText_MyEmailAlerts = "My Email Alerts" Const strText_CreateAlert = "Create Alert" Const strText_SaveAlert = "Save Alert" Const strText_Keywordsareinvalid = "Keywords are invalid!" Const strText_CHANGE = "CHANGE" Const strText_removeAlert = "Sure to remove this Alert?" Const strText_noAlertscreatedyet = "There are no Alerts created yet." Const strText_Youmaycreate = "You may create" Const strText_CreatemoreEmailAlert = "more Email Alert(s)" Const strText_RemoveAlertAfter = "Remove Alert After" Const strText_RestrictCategory = "Restrict to Category" Const strText_RestrictSubcategory = "Restrict to Subcategory" Const strText_Restrict3rdLevel = "Restrict to 3rd Level" Const strText_RefreshPage = "Refresh Page" Const strText_EmailAlertslimit = "You have reached Email Alerts limit which is set to " '### favorites.asp Const strText_FavoritesListEmpty = "The Favorites List is Empty or bookmarked ads are no longer available." Const strText_BookmarkedAds = "List of Bookmarked Ads" Const strText_MyBookmarkedAds = "My Bookmarked Ads" Const strText_DeleteBookmarks = "Delete Selected Bookmarks?" Const strText_DeleteSelected = "Delete Selected" '### hotlist.asp Const strText_WhatsHot = "What's Hot" Const strText_FeaturedClassifiedAds = "Featured Classified Ads" Const strText_HotListEmpty = "The Hot List is currently Empty." Const strText_More = "more" '### logon.asp, register.asp, reg.asp, sendpass.asp '### An extended notes text is in extended_language.asp Const strText_NameMustbeatleast = "Name must be at least 4 characters long!" Const strText_PasswordMustbeatleast = "Password must be at least 6 characters long!" Const strText_RequiredFieldsEmpty = "One of the required fields is empty!" Const strText_Emailformatisinvalid = "Email format is invalid!" Const strText_LogonIncorrect = "Login Incorrect" Const strText_AccountNotFound = "The account" Const strText_AccountNotFound1 = "has not been found!" Const strText_AccountSuspended = "Your account has been suspended! Please contact Site Administrator." Const strText_PasswordIncorrect = "The password for account" Const strText_PasswordIncorrect1 = "is incorrect." Const strText_PasswordIncorrect2 = "Please try again or click a button below to have your password emailed to you." Const strText_EmailPassword = "Email My Password" Const strText_VerificationCompleted = "Verification Completed! Congratulations, you may now post ads!" Const strText_AlreadyVerified = "Your account has already been verified!" Const strText_NotVerified = "Your email has not been verified. Please click" Const strText_HERE = "HERE" Const strText_ToVerify = "to verify or" Const strText_AlreadyRegistered = "If you have already registered, please login typing your Email and Password.
One account per customer please." Const strText_AcountSuspended = "This account has been suspended. Please contact site Administrator." Const strText_YouMayUpdate = "You may update your account using the form below:" Const strText_CreateAccount = "Create Account" Const strText_MustCreateAccount = "You have to create an account before you can post Ads or create Email Alerts." Const strText_UserRegistration = "User Registration" Const strText_RequiredFields = "Required Fields" Const strText_UserName = "User Name (nick name):
4-15 characters" Const strText_EmailAddress = "Email Address" Const strText_UserPassword = "Password: 
6-12 characters" Const strText_ConfirmPassword = "Confirm Password" Const strText_AddtoEmailList = "Add to Email List for important announcements." Const strText_Agreement = "I agree with" Const strText_Agreement1 = "Terms of use" Const strText_Agreement2 = "Privacy Note" Const strText_VerificationCode = "Verification Code" Const strText_ResendVerif = "resend verif. code" Const strText_Verify = "Verify" Const strText_PasswordSent = "The password has been sent to " Const strText_InvalidRequestSession = "Invalid request or your session is expired!" '### admin_iupl.asp, admin_iprev.asp, admin_imgmod.asp Const strText_ImagePreview = "Image Preview" Const strText_Imageisattached = "Image is attached. Click OK to continue. Click Cancel to Skip Image." Const strText_imagesareallowed = "Only .jpg, .jpeg, .png or .gif images are allowed to be attached!" Const strText_imagedimention = "The image dimention is:" Const strText_maximumallowed = "which is greater than maximum allowed:" Const strText_Pleaseselectanother = "Please select different image." Const strText_Thesizeisgreater = "The size of the image you selected is greater than " Const strText_EditImages = "Edit Images" Const strText_NoImagesAttached = "No Images Attached." Const strText_Youmayreplace = "You may replace, remove and sort order of the attached to the ad Images." Const strText_willberemoved = "will be removed from the list and deleted from upload folder." Const strText_Makesuretoclick = "Make sure to click 'Save Changes' before moving to the next ad." Const strText_Youmayhave = " You may have up to" Const strText_imageattachedto = "image(s) attached to this ad." Const strText_Note = "Note:" Const strText_SaveChanges = "Save Changes" Const strText_PreviewAttach = "Preview/Attach" '### post_start.asp, post_new.asp, post_new1.asp, post_new2.asp, process.asp, update.asp '### An extended notes text is in extended_language.asp Const strText_AddImages = "Add Images" Const strText_Youhaveuploaded = "You have uploaded: " Const strText_image = " image(s)" Const strText_StartOver = "Start Over" Const strText_SelectCategory = "Select Category" Const strText_SubmitAdto = "Submit Ad to:" Const strText_ContinueNextScreen = "Continue to the Next Screen" Const strText_BuyCredits = "Buy Credits with" Const strText_EnterAmount = "Enter Amount" Const strText_Baseprice = "Base price for" Const strText_daysAd = "days Ad" Const strText_SelectOption = "Please Select an additional Duration for your Ad" Const strText_SelectOption1 = "Please select number of images you would like to attach to the Ad" Const strText_SelectOption2 = "Please select whether or not you would like to participate in 'What's Hot' list" Const strText_SelectOption3 = "The discount listed below will automatically be deducted from the final price" Const strText_NoExtendedDuration = "Do not want extended duration" Const strText_AdditionalCharge = "Additional charge for" Const strText_NoAttachImages = "Do not want to attach images" Const strText_AdditionalChargeImage = "Additional charge for" Const strText_AttachedImage = "attached image" Const strText_AdditionalChargeHot = "Additional charge for placing ad into What's hot list" Const strText_NoHotList = "Do not want What's Hot list" Const strText_Discount = "Today's Discount" Const strText_TotalPrice = "Total Price for your Ad" Const strText_YourCredit = "your current available credit is" Const strText_UpdateAd = "Update Ad" Const strText_PostAdIn = "Post ad in " Const strText_AdDuration = "Ad Duration" Const strText_PriceForAd = "Price for the Ad" Const strText_RunMyAdfor = "Run my Ad for" Const strText_PersonalInformation = "Personal Information" Const strText_PreferredAdStyle = "Preferred ad Style" Const strText_CrawlSite = "Crawl Site" Const strText_CrawlSiteMessage = "(Your Web Site's title and description tags content
will be pasted into the Ad subject and description fields respectively)" Const strText_URLImage = "URL to Online Image" Const strText_CharactersLeft = "Characters Left" Const strText_HiddenFields = "Hidden fields are not displayed within the ad body and only used for Advanced Search." Const strText_PleaseFix = "Please fix the following errors and resubmit:" Const strText_Value = "Value" Const strText_IsInvalid = "is invalid. Must be a number!" Const strText_NoDescription = "Description must be specified!" Const strText_NoSubject = "Subject must be specified!" Const strText_DescriptionContains = "The Description contains" Const strText_DescriptionContains1 = "characters. Only" Const strText_DescriptionContains2 = "allowed. Please revise!" Const strText_Posted = "Your ad was succesfully posted! The confirmation Email has been sent to:" Const strText_Posted1 = "It will appear in public areas after approval." Const strText_InvalidRequest = "Invalid request or ad is expired!" Const strText_AdModified = "Ad was modified!" Const strText_RepostAd = "Repost Ad" Const strText_Tags = "Note: Tags such as <script>, <style>, <meta>, will be disregarded while ad is submitted." Const strText_ThisMightOverride = "This might override the subject and description of your ad!.. Continue?" '### sitecrawl.asp Const strText_SiteToCrawl = "Site [" Const strText_NoTitle = "] does not contain title/description." Const strText_NoSite = "] cannot be contacted." Const strText_TypeURL = "Please type your site URL first!" '### admin_gallery.asp Const strText_SlidePhotoShow = "Slide Photo Show" Const strText_ShowType = "Show Type" Const strText_NormalSlide = "Normal Slide" Const strText_SlideManually = "Slide Manually" Const strText_DownUpSlide = "Down-Up Slide" Const strText_TranslucentSlide = "Translucent Slide" Const strText_ConveyorBeltSlide = "Conveyor Belt Slide" Const strText_Speed = "Speed" Const strText_Delay = "Delay (sec.)" Const strText_AdNotFoundSL = "Ad Not Found!" Const strText_ImageSL = "Image" Const strText_of = "of" '### ADDED FOR V3.1 =========================================================================================================== Const strText_TypeYourEmailandPassword = "Type Your Email/Name and Password to Login" Const strText_ForgotPassword = "I forgot my password" Const strText_PendingAds = "Pending Ads" Const strText_Pending = "Pending" Const strText_Replies = "Replies" Const strText_TurningNumber = "Turning Number" Const strText_Pleasetypethenumber = "Please type the number from image" Const strText_Pleasetypethenumber1 = "Please type the number exactly as it appears on the image." Const strText_Turningnumberisincorrect = "Turning number is incorrect!" Const strText_TryAgain = "Try Again" Const strText_NoEdList = "No ads have been picked by Editor yet." Const strText_ViewImages ="View Images" Const strText_TemsUseAgree ="You must be agree with terms of use!" Const strText_TypeEmailReset = "Please type an email which you registered at " Const strText_NotEnoughCredits = "
You do not have enough credits on you account!


" Const strText_ReportInappropriateContent = "Report if this ad is offensive" Const strText_Report = "Report" Const strText_HeadReport = "Please enter your name, email and message to report this ad." Const strText_FormReport = "This form can only be used to report an inappropriate ad content." Const strText_UserLogon = "User Login" Const strText_Guest = "Guest" Const strText_RememberMe = "Remember Me" Const strText_donotselect = "(do not select on public computers)" Const strText_SupportCookies = "Your Browser must be configured to support cookies" Const strText_NoPackage = "Purchase Ads" Const strText_PackageDescription = "Description" Const strText_PackageExpire = "Package Expires" Const strText_Youmaypost = "You may post" Const strText_PostUnlimited = "Unlimited" Const strText_PackageNotAvailable = "To submit ads please purchase one of the available packages" Const strText_OverAdsLimit = "You have reached the maximum number of posted ads: " Const strText_PurchasePackage = "Purchase Package" Const strText_Package = "Package" Const strText_BuyWith = "Buy With" Const strText_PackagesInformation = "Packages Information" Const strText_AvailablePackages = "Available Packages" Const strText_BuyaPackage = "Buy a Package" Const strText_NoRepostPack = "Your ad cannot be posted at this time. Membership package expired." Const strText_NoRepostAdsCountPack = "Your ad cannot be posted at this time. Membership package limit is exceeded." Const strText_ExpandAll = "Expand All" Const strText_CollapseAll = "Collapse All" Const strText_PleaseReview = "Please review Packages information at " Const strText_PleasePurchase = "To start posting ads, please purchase one of the packages from the list." Const strText_2coButton = "Please make sure to click [Click Here To Finalize Your Order]\nbutton at the final payment page.\n\nFailing to click this button would result in a delay while we have to manually update your order status!" '### END ADDED FOR V3.1 =========================================================================================================== '### ADDED FOR V3.2 =============================================================================================================== Const strText_RSS = "RSS" Const strText_AvailableRSSFeeds = "Available RSS Feeds" Const strText_NewlyPostedAds = "Newly Posted Ads at" Const strText_Newlypostedadsbycategory = "Newly posted ads by category" Const strText_YourCreditLevel = "Your Credit Level:" Const strText_YouareabouttoDELETEad = "You are about to DELETE selected ad." Const strText_Addto = "Add to" Const strText_list = "list" Const strText_RSSFeedpostedbyuser = "RSS Feed for ads posted by user" Const strText_InvalidadID = "Invalid ad ID!" Const strText_Requestedadbelongs = "Requested ad already belongs to [Hot List]!" Const strText_Yourmembershipisexpired = "Your membership is expired!" Const strText_InvalidRequestMembership = "Invalid Request! Membership information not found!" Const strText_InvalidUserID = "Invalid User ID!" Const strText_ThepriceforHotList = "The price for including an ad to the [Hot List] is:" Const strText_Thisamountwouldbededucted = "This amount would be deducted from your current credits level." Const strText_Respectedadprice = "Respected ad price for the future re-post would be adjusted accordingly." Const strText_Pleaseusebuttonbellow = "Please use button below to include your ad to the [Hot List]" Const strText_IncludetoHotList = "Include to Hot List" Const strText_Pleasepurchaseenough = "Please purchase enough credits to cover the price." Const strText_Theminimumpurchase = "The minimum purchase amount is:" Const strText_AudibleNumber = "Audible Number" Const strText_Forum = "Forum" Const strText_BannerStep11 = "You may submit your banner for advertising in 2 ways. 1) Provide a code to banner image hosted at your server or 2) upload a banner image to our server (only .jpg, .jpeg, .png or .gif).
" Const strText_BannerStep11a = "1. Click HERE to submit a code to externally hosted banner.

2. Select a banner from your hard drive by clicking [Browse]. Click [Attach] to upload banner. You would have a chance to provide more information after banner is attached." Const strText_Zone = "Banner Zone" Const strText_BannerCode = "Banner Code" Const strText_BannerStep22 = "Please provide a valid HTML code to your banner, Site name and select a campaign duration or number of impressions you would like to have for your banner on our site. All fields are required." Const strText_CodeBannerStats = " (Clicks statistics may not be available for this type of banner.)" Const strText_ClickRate = "Daily Click Rate" Const strText_ViewRate = "Daily View Rate" Const strText_ClickRateTotal = "Total Clicks" Const strText_ViewRateTotal = "Total Views" Const strText_BannerDailyStatistics = "Banner Daily Statistics" Const strText_RotatorNotAvaiable = "We currently do not accept banners for advertising." Const strText_AltHotAd = "Hot Ad" Const strText_AltEdPick = "Editor's Pick" Const strText_CheckAvailability = "Check" Const strText_UserIDorNick = "User Nick or ID" Const strText_noView = "To view ad details please create an account" Const strText_noReply = "To reply to ad please create an account" '### END ADDED FOR V3.2 =========================================================================================================== '### ADDED FOR V3.2c =============================================================================================================== Const strText_PurchaseWithCredits = "Click button below to purchase selected package." Const strText_NoCreditsPurchasePackage = "You do not have enough Credits on your account. Please purchase credits to cover the package price." Const strText_OrID = " or User Name" Const strText_PasswordIncorrect3 = "Please try again or click here to have your password emailed to you." Const strText_TypeEmailReset1 = "Contact us if you remember user login name but forgot an email address and password." Const strText_CurrentAdOptions = "Current Ad Options" Const strText_AttachedImages = "Attached Images" Const strText_HotList = "Hot List" Const strText_AdPrice = "Ad Price" Const strText_Selectnewoptions = "Select new options for this ad and click [Repost Ad] button." Const strText_Finaladcost = "Please be advised: we reserve the right to amend a price list for ad options. Final ad cost might differ from the originally paid amount even if you select the same ad options." NA = "" & strText_NA & "" Const strText_Continuewith = "Continue with selected action?" Const strText_SelectAll = "Select All" Const strText_Deleteselectedads = "This action would [Delete] selected ads." Const strText_Disableselectedads = "If selected ads are [Active], then they would be [Disabled] and vise versa." Const strText_Remove_Selected = "Remove Manually Selected" Const strText_Disable_Selected = "Enable/Disable Manually Selected" Const strText_Edit_Ad = "Edit Ad Information" Const strText_Edit_Images = "Add or Remove Image Attachments" Const strText_OnlineImage = "Image on the Web" Const strText_NotInPreview = "Not available in preview" Const strText_PreviewHidden = "Hidden fields are not displayed within the ad body and only used for Advanced Search." Const strText_Distance = "Distance" Const strText_YourZip = "Your Zip" Const strText_ZoomIn = "Zoom in" Const strText_Loading = "Loading..." Const strText_Uploading = "Uploading..." Const strText_Browse = "Browse.." Const strText_NotAnImage = "Selected file is not an image!" Const strText_none = "None" Const strText_PackagePurchaseConf = "Your CURRENT package is: " Const strText_PackagePurchaseConf1 = "\n\n Are you sure you wish to purchase selected package?\n\nNote: " Const strText_PackagePurchaseConf2 = " credits would be deducted from the amount of available credits at your account." '### END ADDED FOR V3.2c =========================================================================================================== %> <% Function getTemplate(template, uEmail, uPass, uNick, verID, adID) setLocale resetLocale strTempl = "SELECT " & tablPfx & "Template.* from " & tablPfx & "Template WHERE tname='" & sq(template) & "';" set rsTempl = objConn.Execute(strTempl) If not rsTempl.EOF then templRec = rsTempl("subject") & chr(15) & rsTempl("body") templRec = Replace(templRec, ":uEmail:", uEmail) templRec = Replace(templRec, ":uPass:", uPass) templRec = Replace(templRec, ":uNick:", uNick) templRec = Replace(templRec, ":verID:", verID) templRec = Replace(templRec, ":Date:", Now) templRec = Replace(templRec, ":adID:", adID) templRec = Replace(templRec, ":MyWeb:", web_site) templRec = Replace(templRec, ":WebNm:", web_name) uSubject = Split(templRec, chr(15))(0) uBody = Split(templRec, chr(15))(1) getTemplate = templRec End If rsTempl.close End Function Sub sendEmail(sendTo, sendFrom, subject, message) Select Case emailMethod '### Email with CDOSYS (http://www.microsoft.com) Case "CDOSYS" On Error Resume Next Set objCDOSYSMail = Server.CreateObject("CDO.Message") If not mailHost = Empty then Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration") With objCDOSYSCon .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = mailHost .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60 If not SMTPID = Empty then .Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 .Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = SMTPID .Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = SMTPPAss End If .Fields.Update End With Set objCDOSYSMail.Configuration = objCDOSYSCon End If With objCDOSYSMail .From = "<" & sendFrom & ">" .Sender = sendFrom If len(senderEmail) > 0 Then .ReplyTo = senderEmail '.BodyPart.CharSet = "Windows-1252" '.HTMLBodyPart.charset = "Windows-1252" .To = "<" & sendTo & ">" .Subject = subject If isHTML then .HTMLBody = message Else: .TextBody = message End If .Send End With Set objCDOSYSMail = Nothing On Error Goto 0 '### Email with CDONTS (http://www.microsoft.com) Case "CDONTS" On Error Resume Next Set oEmail = Server.CreateObject("CDONTS.NewMail") With oEmail .From = sendFrom .To = sendTo .Subject = subject If isHTML then .MailFormat = 0 Else: .MailFormat = 1 End If .BodyFormat = 0 .Body = message .Importance = 1 '.SetLocaleIDs("Windows-1252") .Send Set oEmail = Nothing End With On Error Goto 0 '### Email with ASPmail (http://www.serverobjects.com) Case "ASPMail" On Error Resume Next Set Mailer = Server.CreateObject("SMTPsvg.Mailer") With Mailer .FromName = sendFrom .FromAddress = sendFrom .RemoteHost = mailHost .AddRecipient "Classified User", sendTo If len(senderEmail) > 0 Then .ReplyTo = senderEmail .ReturnReceipt = false .ConfirmRead = false .Subject = subject '.CustomCharSet = "Windows-1252" If isHTML then .ContentType = "text/html" .BodyText = message .SendMail End With Set Mailer = Nothing On Error Goto 0 '### Email with ASPEmail (http://www.aspemail.com) Case "ASPEmail" On Error Resume Next Set Mailer = Server.CreateObject("Persits.MailSender") With Mailer .FromName = sendFrom .From = sendFrom .Host = mailHost .AddAddress sendTo, "Classified User" If len(senderEmail) > 0 Then .AddReplyTo = senderEmail .Subject = subject If isHTML then .IsHTML = True .Body = message If not SMTPID = Empty then .Username = SMTPID .Password = SMTPPass End If '.CharSet = "Windows-1252" '.ContentTransferEncoding = "Quoted-Printable" .Send End With Set Mailer = Nothing On Error Goto 0 '### Email with Jmail (http://www.dimac.net/) Case "JMail" On Error Resume Next Set jmail = Server.CreateObject("JMail.Message") With jmail .Logging = False .Silent = True .AddRecipient sendTo, "Classified User" .FromName = sendFrom .From = sendFrom If len(senderEmail) > 0 Then .ReplyTo = senderEmail .Subject = subject If isHTML then .HTMLBody = message Else: .Body = message End If .Priority = 3 If not SMTPID = Empty then .MailServerUserName = SMTPID .MailServerPassWord = SMTPPass End If '.CharSet = "Windows-1252" .Send(mailHost) End With Set jmail = Nothing On Error Goto 0 End Select End Sub %> <%Function CryptText(strIn, fubarKey, action) Select Case action Case False For n = 1 To Len( strIn ) Step 3 c1 = Asc( Mid( strIn, n, 1 ) ) c2 = Asc( Mid( strIn, n + 1, 1 ) + Chr(0) ) c3 = Asc( Mid( strIn, n + 2, 1 ) + Chr(0) ) w1 = Int( c1 / 4 ) : w2 = ( c1 And 3 ) * 16 + Int( c2 / 16 ) If Len( strIn ) >= n + 1 Then w3 = ( c2 And 15 ) * 4 + Int( c3 / 64 ) Else w3 = -1 End If If Len( strIn ) >= n + 2 Then w4 = c3 And 63 Else w4 = -1 End If strOut = strOut + mimeencode( w1 ) + mimeencode( w2 ) + _ mimeencode( w3 ) + mimeencode( w4 ) Next CryptText = strOut Case True For n = 1 To Len( strIn ) Step 4 w1 = mimedecode( Mid( strIn, n, 1 ) ) w2 = mimedecode( Mid( strIn, n + 1, 1 ) ) w3 = mimedecode( Mid( strIn, n + 2, 1 ) ) w4 = mimedecode( Mid( strIn, n + 3, 1 ) ) If w2 >= 0 Then _ strOut = strOut + _ Chr( ( ( w1 * 4 + Int( w2 / 16 ) ) And 255 ) ) If w3 >= 0 Then _ strOut = strOut + _ Chr( ( ( w2 * 16 + Int( w3 / 4 ) ) And 255 ) ) If w4 >= 0 Then _ strOut = strOut + _ Chr( ( ( w3 * 64 + w4 ) And 255 ) ) Next CryptText = strOut End Select End Function Function mimedecode(strIn) Base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" If Len( strIn ) = 0 Then mimedecode = -1 : Exit Function Else mimedecode = InStr( Base64Chars, strIn ) - 1 End If End Function Function mimeencode(intIn) Base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" If intIn >= 0 Then mimeencode = Mid( Base64Chars, intIn + 1, 1 ) Else mimeencode = "" End If End Function %> <% Sub checkLoggedUser() On Error Resume Next Sess_Array(34) = 1 If Len(Request.Cookies("amazing_scenery" & strUnique)) > 0 then uID = CryptText(Request.Cookies("amazing_scenery" & strUnique), key, True) If IsNumeric(uID) then set rsuser = objConn.Execute("SELECT " & tablUPfx & "User.* FROM " & tablUPfx & "User WHERE userID = " & CLng(uID) & ";") If not rsuser.EOF then acountStatus = CLng(rsuser("status")) Select Case acountStatus Case 0 sdd = dd(objConn) ismod = rsuser("moder") If ismod then Sess_Array(35) = 1 Sess_Array(29) = CLng(uID) Sess_Array(50) = CryptText(rsuser("email"), key, True) Sess_Array(51) = rsuser("nick") Sess_Array(49) = rsuser("city") setLocale server_locale Sess_Array(47) = FormatNumber(CCur(rsuser("credits")), 2) setLocale resetLocale If ispack then Sess_Array(30) = Empty Sess_Array(61) = Empty Sess_Array(59) = Empty Sess_Array(30) = CLng(rsuser("paypack")) Sess_Array(61) = CDate(rsuser("pexpire")) ishold = Cbool(rsuser("ishold")) If Sess_Array(30) > 0 then Set rspack = objConn.Execute("SELECT pname,pdur,custom1 FROM " & tablPfx & "Pack WHERE packID = " & Sess_Array(30) & ";") If rspack.EOF then Sess_Array(30) = 0 rspack.close Else pdur = rspack(1) currpname = rspack(0) isdefault = rspack(2) rspack.close If ishold then Sess_Array(59) = currpname Sess_Array(61) = DateAdd("d", pdur, Now) packExp = ConvDate(Sess_Array(61)) objConn.Execute("UPDATE " & tablUPfx & "User SET pexpire = " & sdd & packExp & sdd & ", ishold = 0 WHERE userID = " & uID & ";") Else If Sess_Array(61) < Now then If CLng(isdefault) = 1 then If Sess_Array(30) = 1000 then pexp = DateAdd("d", CDate(pdur), Now) trpname = currpname Else Sess_Array(30) = 1000 Set rstr = objConn.Execute("SELECT pname,pdur FROM " & tablPfx & "Pack WHERE packID = 1000;") trpname = rstr(0) trpdur = rstr(1) rstr.close pexp = DateAdd("d", CDate(trpdur), Now) End If pexp = ConvDate(pexp) objConn.Execute("UPDATE " & tablUPfx & "User SET paypack = 1000, pexpire = " & sdd & pexp & sdd & " WHERE userID = " & uID & ";") template = getTemplate("Package_Default", Sess_Array(50), Empty, Sess_Array(51), Empty, Empty) TemplateArray = Split(template, s) uSubject = TemplateArray(0) uBody = TemplateArray(1) uBody = Replace(uBody, ":adCred:", trpname) Call sendEmail(Sess_Array(50), notify_email, uSubject, uBody) Sess_Array(59) = trpname Sess_Array(61) = CDate(pexp) Else Sess_Array(30) = 0 objConn.Execute("UPDATE " & tablUPfx & "User SET paypack = 0 WHERE userID = " & uID & ";") End If emailContent = getTemplate("Package_Expire", Sess_Array(50), Empty, Sess_Array(51), Empty, Empty) uSubject = Split(emailContent, s)(0) uBody = Split(emailContent, s)(1) uBody = Replace(uBody, ":adCred:", currpname) Call sendEmail(Sess_Array(50), notify_email, uSubject, uBody) Else: Sess_Array(59) = currpname End If End If End If End If End If set rsstat = objConn.Execute("SELECT ID FROM " & tablPfx & "Ads WHERE userID = " & CLng(uID) & ";") If not rsstat.EOF then rsdata = rsstat.getrows myads = UBound(rsdata,2) + 1 Else: myads = 0 End If rsstat.close Sess_Array(28) = myads If not Sess_Array(48) = Session.SessionID then updateIP = ", IP = '" & IP & "' " objConn.Execute("UPDATE " & tablUPfx & "User SET lastLogon = " & sdd & ConvDate(Now) & sdd & updateIP & ", ads = " & myads & " WHERE userID = " & CLng(uID) & ";") If not Sess_Array(48) = Session.SessionID then Call checkIP(IP) If isEvents then Call logEvent("User Logon", "(From Cookies)", Empty, Empty, Empty, Empty) Case Else Response.Cookies("amazing_scenery" & strUnique).Expires = Now - 1 End Select End If rsuser.close End If End If End Sub %> <% Dim RSS_Items Dim RSS_ShowDefaultTitle Dim RSS_CustomTitle Dim RSS_ShowLogo Dim RSS_ShowBullets Dim RSS_ShowItemPostDate Dim RSS_ShowItemDescription Dim RSS_DisplayInRCBox Dim RSS_TitleFontSize Dim RSS_SubjectFontSize Dim RSS_DescriptionFontSize Dim RSS_BulletsImage Dim RSS_LinksNewWindow Dim RSS_UseItemsSeparator Dim RSS_ShowEnclosure Dim RSS_Custom1 Dim RSS_Custom2 Dim RSS_Custom3 Dim RSS_Custom4 Dim RSS_Custom5 Dim RSS_Custom6 Dim RSS_Custom7 Dim RSS_Custom8 Dim RSS_Custom9 Dim RSS_Custom10 Dim RSS Function Format_RSS() If Len(preview_Feed) > 0 then RSS_Link = Request.Form("RSS_Link") RSS_Items = CLng(Request.Form("RSS_Items")) RSS_ShowDefaultTitle = CBool(Request.Form("RSS_ShowDefaultTitle")) RSS_CustomTitle = Request.Form("RSS_CustomTitle") RSS_ShowLogo = CBool(Request.Form("RSS_ShowLogo")) RSS_ShowBullets = CBool(Request.Form("RSS_ShowBullets")) RSS_ShowItemPostDate = CBool(Request.Form("RSS_ShowItemPostDate")) RSS_ShowItemDescription = CBool(Request.Form("RSS_ShowItemDescription")) RSS_DisplayInRCBox = CBool(Request.Form("RSS_DisplayInRCBox")) RSS_TitleFontSize = Request.Form("RSS_TitleFontSize") RSS_SubjectFontSize = Request.Form("RSS_SubjectFontSize") RSS_DescriptionFontSize = Request.Form("RSS_DescriptionFontSize") RSS_BulletsImage = Request.Form("RSS_BulletsImage") RSS_LinksNewWindow = CBool(Request.Form("RSS_LinksNewWindow")) RSS_UseItemsSeparator = CBool(Request.Form("RSS_UseItemsSeparator")) RSS_ShowEnclosure = CBool(Request.Form("RSS_ShowEnclosure")) RSS_Custom1 = Request.Form("RSS_Custom1") RSS_Custom2 = Request.Form("RSS_Custom2") RSS_Custom7 = CBool(Request.Form("RSS_Custom7")) Set RSS = new kwRSS_reader RSS.ParseLocation(RSS_Link) RSS_Status = RSS.GetStatus If RSS_Status <> 0 then Response.Write "Feed is not available" End If Set rebr = new RegExp rebr.global=true rebr.ignoreCase=true rebr.pattern="((\S){100})" RSS_ChannelTitle = RSS.ChannelTitle RSS_ChannelTitle = rebr.replace(RSS_ChannelTitle, "$1
") RSS_ChannelLanguage = RSS.ChannelLanguage RSS_ChannelURL = RSS.ChannelURL RSS_ChannelDesc = RSS.ChannelDesc RSS_ChannelDesc = rebr.replace(RSS_ChannelDesc, "$1
") RSS_ImageURL = RSS.ImageURL RSS_ChannelCategory = RSS.ChannelCategory RSS_ChannelCategory = rebr.replace(RSS_ChannelCategory, "$1
") If RSS_LinksNewWindow then newWindow = "target='_blank'" If RSS_UseItemsSeparator then itemsSep = "style='border-bottom: 1px dotted #C0C0C0;'" '*** Begin Box Table If RSS_DisplayInRCBox then RSS_OUT = RSS_OUT & "
" RSS_OUT = RSS_OUT & "" RSS_OUT = RSS_OUT & "" RSS_OUT = RSS_OUT & "" RSS_OUT = RSS_OUT & "" RSS_OUT = RSS_OUT & "" RSS_OUT = RSS_OUT & "
" End If If RSS_ShowDefaultTitle OR RSS_ShowLogo OR Len(RSS_CustomTitle) > 0 then '*** Begin Title Table RSS_OUT = RSS_OUT & "
" '*** Display Feed Title/Description/Category RSS_OUT = RSS_OUT & "" Else RSS_OUT = RSS_OUT & RSS_CustomTitle & "" & RSS_ChannelCategory_Display & "" End If '*** Display Feed Logo Image If RSS_ShowLogo And Len(RSS_ImageURL) > 0 then RSS_OUT = RSS_OUT & "" Else RSS_OUT = RSS_OUT & "" End If RSS_OUT = RSS_OUT & "

" & RSS_ChannelDesc & RSS_ChannelCategory_Display & "
" '*** End Title Table End If '*** Begin Items Table RSS_OUT = RSS_OUT & "
" na = 1 Do While Not RSS.EOF If na > RSS_Items then Exit Do RSS_OUT = RSS_OUT & "" If na mod 2 = 0 then cellColor = "class='evencell'": Else: cellColor = "class='oddcell'" If RSS_ShowBullets then RSS_OUT = RSS_OUT & "" End If RSS_GetDesc = RSS.GetDesc RSS_GetDesc = rebr.replace(RSS_GetDesc, "$1
") RSS_GetTitle = RSS.GetTitle RSS_GetTitle = rebr.replace(RSS_GetTitle, "$1
") RSS_GetDate = RSS.GetDate RSS_GetLink = RSS.GetLink RSS_GetEnclosure = RSS.GetEnclosure RSS_GetCategory = RSS.GetCategory strEncImage = Empty If RSS_ShowEnclosure And Len(RSS_GetEnclosure) > 0 then strSize = Empty If Len(RSS_Custom1) > 1 then iWidth = Split(RSS_Custom1, "x")(0) iHeight = Split(RSS_Custom1, "x")(1) strSize = "width=" & iWidth & " height=" & iHeight End If If RSS_Custom2 = "none" then strAlign = Empty Else strAlign = "align='" & RSS_Custom2 & "'" End If strEncImage = "" End If RSS_OUT = RSS_OUT & "" & vbcrlf na = na + 1 RSS.MoveNext Loop RSS_OUT = RSS_OUT & "
" If RSS_ShowItemPostDate And Len(RSS_GetDate) > 0 then RSS_OUT = RSS_OUT & "
" & RSS_GetDate & "
" If RSS_Custom7 And Len(RSS_GetCategory) > 0 then RSS_OUT = RSS_OUT & "
Category: " & RSS_GetCategory & "
" If RSS_ShowItemDescription then RSS_OUT = RSS_OUT & "
" & strEncImage & RSS_GetDesc & "
" If RSS_ShowEnclosure And Not RSS_ShowItemDescription then RSS_OUT = RSS_OUT & strEncImage RSS_OUT = RSS_OUT & "
" '*** End Items Table If RSS_DisplayInRCBox then RSS_OUT = RSS_OUT & "
" End If '*** End Box Table Set RSS = Nothing Set rebr = Nothing Format_RSS = RSS_OUT End Function Sub Cache_Feed(feedID) strSQL = "SELECT ID,feed_date_cache,RSS_Link,RSS_CacheAge," strSQL = strSQL & "RSS_Items,RSS_ShowDefaultTitle,RSS_CustomTitle,RSS_ShowLogo," strSQL = strSQL & "RSS_ShowBullets,RSS_ShowItemPostDate,RSS_ShowItemDescription,RSS_DisplayInRCBox," strSQL = strSQL & "RSS_TitleFontSize,RSS_SubjectFontSize,RSS_DescriptionFontSize,RSS_BulletsImage," strSQL = strSQL & "RSS_LinksNewWindow,RSS_UseItemsSeparator,RSS_ShowEnclosure,RSS_Custom1,RSS_Custom2,RSS_Custom7" strSQL = strSQL & " FROM " & tablPfx & "RSS WHERE ID = " & CLng(feedID) & ";" Set rsfeed = objConn.Execute(strSQL) If Not rsfeed.EOF then feed_data_array = rsfeed.getrows Feed_Exists = True End If rsfeed.close If Feed_Exists then currentFeedID = feed_data_array(0,0) feed_date_cache = feed_data_array(1,0) RSS_Link = feed_data_array(2,0) RSS_CacheAge = CLng(feed_data_array(3,0)) RSS_Items = CLng(feed_data_array(4,0)) RSS_ShowDefaultTitle = CBool(feed_data_array(5,0)) RSS_CustomTitle = feed_data_array(6,0) RSS_ShowLogo = CBool(feed_data_array(7,0)) RSS_ShowBullets = CBool(feed_data_array(8,0)) RSS_ShowItemPostDate = CBool(feed_data_array(9,0)) RSS_ShowItemDescription = CBool(feed_data_array(10,0)) RSS_DisplayInRCBox = CBool(feed_data_array(11,0)) RSS_TitleFontSize = feed_data_array(12,0) RSS_SubjectFontSize = feed_data_array(13,0) RSS_DescriptionFontSize = feed_data_array(14,0) RSS_BulletsImage = feed_data_array(15,0) RSS_LinksNewWindow = CBool(feed_data_array(16,0)) RSS_UseItemsSeparator = CBool(feed_data_array(17,0)) RSS_ShowEnclosure = CBool(feed_data_array(18,0)) RSS_Custom1 = feed_data_array(19,0) RSS_Custom2 = feed_data_array(20,0) RSS_Custom7 = CBool(feed_data_array(21,0)) Erase feed_data_array Set RSS = new kwRSS_reader RSS.ParseLocation(RSS_Link) RSS_Status = RSS.GetStatus If RSS_Status = 0 then feed_data = Format_RSS() feed_data = sq(feed_data) If Len(feed_data) > 300 then sdd = dd(objConn) objConn.Execute("UPDATE " & tablPfx & "RSS SET feed_data = '" & feed_data & "',feed_date_cache = " & sdd & ConvDate(Now) & sdd & " WHERE ID=" & CLng(feedID) & ";") Else: objConn.Execute("UPDATE " & tablPfx & "RSS SET feed_date_cache = " & sdd & ConvDate(Now) & sdd & " WHERE ID=" & CLng(feedID) & ";") End If End If End If End Sub Function Build_RSS(base_string) On Error Resume Next Set re = New RegExp re.Global = True re.IgnoreCase = True re.Pattern = ":RSS=(\S+):" If re.test(base_string) then Set rss_matches = re.execute(base_string) For each match in rss_matches replstring = match.value rssfeed = match.SubMatches(0) base_string = Replace(base_string, replstring, Display_RSS(rssfeed)) Next End If re.Pattern = ":RotateBanner=(\d+):" If re.test(base_string) then Set zone_matches = re.execute(base_string) For each match in zone_matches replstring = match.value izone = match.SubMatches(0) base_string = Replace(base_string, replstring, RotateBanner(izone)) Next End If Set re = Nothing Build_RSS = base_string On error Goto 0 End Function Function Display_RSS(rssfeed) Set rsnewfeed = objConn.Execute("SELECT feed_data,feed_date_cache,RSS_CacheAge,ID FROM " & tablPfx & "RSS WHERE feed_name = '" & sq(rssfeed) & "';") If NOT rsnewfeed.EOF then Display_RSS = rsnewfeed(0) feed_date_cache = rsnewfeed(1) RSS_CacheAge = CLng(rsnewfeed(2)) ID = rsnewfeed(3) rsnewfeed.close If Not RSS_isPreview then Cache_Age = DateDiff("n", feed_date_cache, Now) If Cache_Age > RSS_CacheAge then Call Cache_Feed(ID) End If Else rsnewfeed.close Display_RSS = "Feed is not available." End If End Function '============================================================== ' RSS/RDF Syndicate Reader v0.95 ' http://www.kattanweb.com/webdev '-------------------------------------------------------------- ' Copyright(c) 2002, KattanWeb.com '============================================================== Const rssInit = 1 Const rssError = 2 Const rssBadRSS= 3 Const rssOK = 0 class kwRSS_reader Private Items() Private CurrentItem, TotalItems Public ChannelRSSURI, ChannelURL, ChannelTitle, ChannelDesc, ChannelLanguage, ChannelCategory Public ImageTitle, ImageLink, ImageURL Public TextInputURL, TextInputTitle, TextInputDesc, TextInputName Private Status '>>>>>>>> Setup Initialize event, called automtially when creating an instant of this class using ' Set rss = new kwRSS_reader Private Sub Class_Initialize CurrentItem = -1 TotalItems = -1 Redim Items(5, 500) '1st dimension = item's title/link/desc, 2nd dimension the item number Status = rssInit End Sub '>>>>>>>> Setup Terminate event, called automtially when killing an instant of this class using ' Set rss = nothing Private Sub Class_Terminate Erase Items End Sub '>>>>>>>> Load an RSS/RDF file and process it. Public Function ParseLocation(URL) ChannelRSSURI = URL set xmlObj = Server.CreateObject("Msxml2.DOMDocument.3.0") 'set xmlhttp= Server.CreateObject("Msxml2.XMLHTTP.3.0") set xmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP") xmlObj.validateOnParse = false xmlObj.async = false xmlObj.preserveWhiteSpace = false xmlhttp.open "GET", ChannelRSSURI, False xmlhttp.send rssXML_Data = xmlhttp.responseBody rssXML_Data = RSBinaryToString(rssXML_Data) ' --------- PHP-Nuke & PostNuke compatabilaty -------------------------------- rssXML_Data = replace(rssXML_Data, "", "rss-0.91.dtd""-->") ' ---------------------------------------------------------------------------- xmlObj.loadXML(rssXML_Data) If xmlObj.parseError.errorCode = 0 then ValidLocation = true else rssXML_Data = xmlhttp.responseXML.xml rssXML_Data = replace(rssXML_Data, "", "rss-0.91.dtd""-->") xmlObj.loadXML(rssXML_Data) If xmlObj.parseError.errorCode = 0 then ValidLocation = true Else ValidLocation = false End If end if set xmlhttp = nothing if not ValidLocation then Status = rssBadRSS Exit Function end if set rootNode = xmlObj.selectSingleNode("rdf:RDF") if rootNode is nothing then set rootNode = xmlObj.selectSingleNode("rss") if rootNode is nothing then Status = rssError else Reader rootNode, 0.91 end if else Reader rootNode, 1.0 end if set rootNode = nothing set xmlObj = nothing Status = rssOK End Function '>>>>>>>> Private sub to read the RSS/RDF according to its version Private Sub Reader(rootNode, ver) itemNum = -1 set SingleNode = rootNode.selectSingleNode("//channel/title") if Not SingleNode is nothing then ChannelTitle = SingleNode.text set SingleNode = rootNode.selectSingleNode("//channel/link") if Not SingleNode is nothing then ChannelURL = SingleNode.text set SingleNode = rootNode.selectSingleNode("//channel/description") if Not SingleNode is nothing then ChannelDesc = SingleNode.text set SingleNode = rootNode.selectSingleNode("//channel/language") if Not SingleNode is nothing then ChannelLanguage = SingleNode.text set SingleNode = rootNode.selectSingleNode("//channel/category") if Not SingleNode is nothing then ChannelCategory = SingleNode.text if ver = 1 then set child = rootNode.selectSingleNode("image") else set child = rootNode.selectSingleNode("//channel/image") end if if not child is nothing then set SingleNode = child.selectSingleNode("title") if Not SingleNode is nothing then ImageTitle = SingleNode.text set SingleNode = child.selectSingleNode("link") if Not SingleNode is nothing then ImageLink = SingleNode.text set SingleNode = child.selectSingleNode("url") if Not SingleNode is nothing then ImageURL = SingleNode.text end if set child = nothing if ver = 1 then set child = rootNode.selectSingleNode("textinput") else set child = rootNode.selectSingleNode("//channel/textinput") end if if not child is nothing then set SingleNode = child.selectSingleNode("title") if Not SingleNode is nothing then TextInputTitle = SingleNode.text set SingleNode = child.selectSingleNode("description") if Not SingleNode is nothing then TextInputDesc = SingleNode.text set SingleNode = child.selectSingleNode("name") if Not SingleNode is nothing then TextInputName = SingleNode.text set SingleNode = child.selectSingleNode("link") if Not SingleNode is nothing then TextInputURL = SingleNode.text end if set child = nothing set children = rootNode.selectNodes("//item") TotalItems = children.length for each child in children itemNum = itemNum + 1 if itemNum > ubound(Items, 2) then Redim Preserve Items(4, ubound(Items, 2) + 5) end if for each ItemChild in child.ChildNodes select case ItemChild.baseName case "title" Items(0, itemNum) = ItemChild.text case "link" Items(1, itemNum) = ItemChild.text case "description" Items(2, itemNum) = ItemChild.text case "pubDate" Items(3, itemNum) = ItemChild.text case "enclosure" encType = ItemChild.getAttribute("type") If Instr(1, encType, "image", 1) <> 0 then Items(4, itemNum) = ItemChild.getAttribute("url") End If case "category" Items(5, itemNum) = ItemChild.text end select next next if TotalItems > 0 then CurrentItem = 0 End Sub '>>>>>>>> Returns the title of the the current item Public Function GetTitle() GetTitle = Items(0, CurrentItem) End Function '>>>>>>>> Returns the url/link of the the current item Public Function GetLink() GetLink = Items(1, CurrentItem) End Function '>>>>>>>> Returns the description of the the current item Public Function GetDesc() GetDesc = Items(2, CurrentItem) End Function '>>>>>>>> Returns published date (Modified by GA Soft) Public Function GetDate() GetDate = Items(3, CurrentItem) End Function '>>>>>>>> Returns enclosure (Modified by GA Soft) Public Function GetEnclosure() GetEnclosure = Items(4, CurrentItem) End Function '>>>>>>>> Returns category (Modified by GA Soft) Public Function GetCategory() GetCategory = Items(5, CurrentItem) End Function '>>>>>>>> Goes to the next item Public Function MoveNext CurrentItem = CurrentItem + 1 End Function '>>>>>>>> Goes to the first item Public Function FirstItem if TotalItems > 0 then CurrentItem = 0 else CurrentItem = -1 end if End Function '>>>>>>>> Checks if the current location is a valid item or not Public Function ValidItem if CurrentItem > -1 and CurrentItem < TotalItems then ValidItem = true else ValidItem = false end if End Function '>>>>>>>> Checks if we are at EOF or not Public Function EOF if CurrentItem < TotalItems then EOF = false else EOF = true end if End Function '>>>>>>>> Returns status of the class Public Function GetStatus() GetStatus = Status end function '>>>>>>>> Returns Image provided in the RSS/RDF file as a linked image. Public Function GetImage() if ImageURL <> "" then if ImageLink <> "" then GetImage = "" GetImage = GetImage & "" if ImageLink <> "" then GetImage = GetImage & "" else GetImage = "" end if end function '>>>>>>>> Returns the code for the TextInput provided in the RSS/RDF file. Public Function GetTextInput() if TextInputURL <> "" then GetTextInput = "
" & vbCrLf & _ "" & vbCrLf & _ "" & vbCrLf & _ " " & vbCrLf & _ "" & vbCrLf & _ "" & vbCrLf & _ " " & vbCrLf & _ "" & vbCrLf & _ "" & vbCrLf & _ " " & vbCrLf & _ "" & vbCrLf & _ "
" & TextInputDesc & "
" & vbCrLf & _ "
" else GetTextInput = "" end if end function end class Function RSBinaryToString(xBinary) Dim Binary Set rssrs = Server.CreateObject("ADODB.Recordset") If vartype(xBinary)=8 Then Binary = MultiByteToBinary(xBinary) Else Binary = xBinary LBinary = LenB(Binary) If LBinary > 0 Then rssrs.Fields.Append "mBinary", 201, LBinary rssrs.Open rssrs.AddNew rssrs("mBinary").AppendChunk Binary rssrs.Update RSBinaryToString = rssrs("mBinary") rssrs.close Else RSBinaryToString = "" End If Set rssrs = Nothing End Function Function MultiByteToBinary(MultiByte) Dim LMultiByte, Binary Set rssrsm = Server.CreateObject("ADODB.Recordset") LMultiByte = LenB(MultiByte) If LMultiByte>0 Then rssrsm.Fields.Append "mBinary", 205, LMultiByte rssrsm.Open rssrsm.AddNew rssrsm("mBinary").AppendChunk MultiByte & ChrB(0) rssrsm.Update Binary = rssrsm("mBinary").GetChunk(LMultiByte) rssrsm.close End If Set rssrsm = Nothing MultiByteToBinary = Binary End Function %> <% Sub ExpireAds() setLocale server_locale On Error Resume Next Dim uNick, uEmail Select Case Application("Today_Expire_Flag" & strUnique) Case Empty Application("Today_Expire_Date" & strUnique) = Date Application("Today_Expire_Flag" & strUnique) = "1" ExpireAds Case "1" sdd = dd(objConn) If mysql then strSQL = "SELECT " & tablUPfx & "User.email," & tablPfx & "Ads.nick," & tablPfx & "Ads.catID," & tablPfx & "Ads.sCatID," & tablPfx & "Ads.adID," & tablPfx & "Ads.cat3rdID," & tablPfx & "Ads.subject FROM " & tablUPfx & "User," & tablPfx & "Ads WHERE " strSQL = strSQL & "(" & tablPfx & "Ads.userID = " & tablUPfx & "User.userID AND " & tablPfx & "Ads.status = 1 AND " & tablPfx & "Ads.edate <= CURDATE()) LIMIT 0,1;" Else strSQL = "SELECT TOP 1 " & tablUPfx & "User.email," & tablPfx & "Ads.nick," & tablPfx & "Ads.catID," & tablPfx & "Ads.sCatID," & tablPfx & "Ads.adID," & tablPfx & "Ads.cat3rdID," & tablPfx & "Ads.subject FROM " & tablUPfx & "User," & tablPfx & "Ads WHERE " strSQL = strSQL & "(" & tablPfx & "Ads.userID = " & tablUPfx & "User.userID AND " & tablPfx & "Ads.status = 1 AND " & tablPfx & "Ads.edate <= " & sdd & ConvDate(Date) & sdd & ");" End If set rsExp = objConn.Execute(strSQL) If rsExp.EOF then rsExp.close Set rsExp = Nothing If mysql then strSQL = "SELECT ID,userID,keyword,email,unick,alertlist FROM " & tablPfx & "Agent WHERE (alertlist <> '') LIMIT 0,1;" Else: strSQL = "SELECT TOP 1 ID,userID,keyword,email,unick,alertlist FROM " & tablPfx & "Agent WHERE (alertlist <> '');" End If set rsalert = objConn.Execute(strSQL) If Not rsalert.EOF then ID = CLng(rsalert(0)) userID = rsalert(1) alertKeys = rsalert(2) email = CryptText(rsalert(3), key, True) uNick = rsalert(4) alertlist = Trim(rsalert(5)) rsalert.close alertlistAllay = Split(alertlist) For each adID in alertlistAllay alertLinks = alertLinks & vbcrlf & web_site & "viewad.asp?id=" & CStr(adID) Next template = getTemplate("Alerts", Empty, Empty, uNick, Empty, Empty) uSubject = Split(template, s)(0) uBody = Split(template, s)(1) uBody = Replace(uBody, ":alertKeys:", alertKeys) uBody = Replace(uBody, ":alertLinks:", alertLinks) Call sendEmail(email, notify_email, uSubject, uBody) strSQL = "UPDATE " & tablPfx & "Agent SET alertlist = '' WHERE ID = " & ID & ";" objConn.Execute(strSQL) Else rsalert.close Set rsalert = Nothing tDate = ConvDate(Now) If mysql then strSQL = "SELECT ID,email,site FROM " & tablPfx & "Banner WHERE (((impr > 0 AND bview > impr) OR (edate < " & sdd & aDate & sdd & ")) AND status = 1) LIMIT 0,1;" Else: strSQL = "SELECT TOP 1 ID,email,site,bname FROM " & tablPfx & "Banner WHERE (((impr > 0 AND bview > impr) OR (edate < " & sdd & tDate & sdd & ")) AND status = 1);" End If Set rsRotExp = objConn.Execute(strSQL) If Not rsRotExp.EOF then ID = rsRotExp(0) uEmail = CryptText(rsRotExp(1), key, True) site = rsRotExp(2) rsRotExp.close objConn.Execute("UPDATE " & tablPfx & "Banner SET status = 0 WHERE ID = " & CLng(ID) & ";") template = getTemplate("Banner_Expire", Empty, Empty, Empty, Empty, Empty) uSubject = Split(template, s)(0) uBody = Split(template, s)(1) uBody = Replace(uBody, ":bsite:", site) Call sendEmail(uEmail, notify_email, uSubject, uBody) Application("cl_rotator" & strUnique) = Empty Application("isrotator" & strUnique) = Empty Else rsRotExp.close Application("Today_Expire_Date" & strUnique) = Date + 1 Application("Today_Expire_Flag" & strUnique) = "0" End If End If Else adID = rsExp(4) objConn.Execute("UPDATE " & tablPfx & "Ads SET status = 2 WHERE adID = '" & adID & "';") uEmail = CryptText(rsExp(0), key, True) uNick = rsExp(1) catID = rsExp(2) subcatID = rsExp(3) cat3rdID = rsExp(5) subject = rsExp(6) If isEvents then Call logEvent("Ad Expire", adID, subject, Empty, Empty, Empty) Call UpdateList(False, catID, subcatID, cat3rdID) template = getTemplate("Expired_Notification", Empty, Empty, uNick, Empty, adID) uSubject = Split(template, s)(0) uBody = Split(template, s)(1) Call sendEmail(uEmail, notify_email, uSubject, uBody) Application("cl_marquee" & strUnique) = Empty rsExp.close Set rsExp = Nothing End If Case "0" If Application("Today_Expire_Date" & strUnique) <= Date then Application("Today_Expire_Flag" & strUnique) = "1" ExpireAds End If End Select setLocale resetLocale On Error Goto 0 End Sub %> <% Function BuildContent(contentType, topDisplay, box, contentWidth) If not isNumeric(contentWidth) Then contentWidth = 200 tb_width = contentWidth - 14 contentType = CLng(contentType) topDisplay = CLng(topDisplay) msgNoAds = "
" & strText_NoAdshavebeenpostedyet & "
" & strText_Bethefirsttobelistedhere & "
" msgNoAccounts = "
" & strText_NoAccountshavebeencreatedyet & "
" & strText_Bethefirsttobelistedhere & "
" Select Case contentType '### TOP HOT ADS '---------------------------------------- Case 1 I = 1 If mysql then strSQL = "SELECT subject, adID FROM " & tablPfx & "Ads WHERE (hotlist = 1 AND status = 1) ORDER BY pdate DESC LIMIT 0," & topDisplay & ";" Else: strSQL = "SELECT TOP " & topDisplay & " subject, adID FROM " & tablPfx & "Ads WHERE (hotlist = 1 AND status = 1) ORDER BY pdate DESC;" End If set rs = objConn.Execute(strSQL) If not rs.EOF then strHot = "
" & vbcrlf Do While not rs.EOF If I > topDisplay then Exit Do title = rs(0) If Len(title) > 60 then title = Left(title, 60) & " ..." strHot = strHot & "" & vbcrlf strHot = strHot & "" & vbcrlf rs.MoveNext I = I + 1 Loop strHot = strHot & "
" & title & "

" & strText_AllHotAds & "

" End If If len(strHot) = 0 then strHot = msgNoAds rs.close BuildContent = strHot '### MOST VISITED ADS '------------------------------------------- Case 2 If mysql then strSQL = "SELECT subject, adID, adcounter FROM " & tablPfx & "Ads WHERE (status = 1) ORDER BY adcounter DESC LIMIT 0," & topDisplay & ";" Else: strSQL = "SELECT TOP " & topDisplay & " subject, adID, adcounter FROM " & tablPfx & "Ads WHERE (status = 1) ORDER BY adcounter DESC;" End If set rs = objConn.Execute(strSQL) If not rs.EOF then strPop = "
" & vbcrlf Do While not rs.EOF title = rs(0) If Len(title) > 30 then title = Left(title, 30) & " ..." strPop = strPop & "" & vbcrlf strPop = strPop & "" & vbcrlf rs.MoveNext Loop strPop = strPop & "
" & title & "
[" & rs(2) & "] " & strText_Hits & "
" End If If len(strPop) = 0 then strPop = msgNoAds rs.close BuildContent = strPop '### TOP POSTERS '------------------------------------------- Case 3 I = 1 If mysql then strSQL = "SELECT userID, nick, ads FROM " & tablUPfx & "User WHERE (status = 0) ORDER BY ads DESC LIMIT 0," & topDisplay & ";" Else: strSQL = "SELECT TOP " & topDisplay & " userID, nick, ads FROM " & tablUPfx & "User WHERE (status = 0) ORDER BY ads DESC;" End If set rs = objConn.Execute(strSQL) If not rs.EOF then strPoster = "
" & vbcrlf Do While not rs.EOF If I > topDisplay then Exit Do strPoster = strPoster & "" & vbcrlf strPoster = strPoster & "" & vbcrlf rs.MoveNext I = I + 1 Loop strPoster = strPoster & "
" & rs(1) & " [" & rs(2) & "] " & strText_Ads & "
" End If rs.close If Len(strPoster) = 0 then strPoster = msgNoAccounts BuildContent = strPoster '### TOP NEW ADS (Picked From "Content News" Template) '------------------------------------------- Case 4 I = 1 If mysql then strSQL = "SELECT subject, adID, adcounter FROM " & tablPfx & "Ads WHERE (status = 1) ORDER BY pdate DESC LIMIT 0," & topDisplay & ";" Else: strSQL = "SELECT TOP " & topDisplay & " subject, adID FROM " & tablPfx & "Ads WHERE (status = 1) ORDER BY pdate DESC;" End If set rs = objConn.Execute(strSQL) If not rs.EOF then strPop = "
" & vbcrlf Do While not rs.EOF If I > topDisplay then Exit Do title = rs(0) If Len(title) > 60 then title = Left(title, 60) & " ..." strPop = strPop & "" & vbcrlf strPop = strPop & "" & vbcrlf rs.MoveNext I = I + 1 Loop strPop = strPop & "
" & title & "
" End If If len(strPop) = 0 then strPop = msgNoAds rs.close BuildContent = strPop '### NEWS TEMPLATE '------------------------------------------- Case 5 templateName = "Content_News" set rs = objConn.Execute("SELECT " & tablPfx & "Template.body FROM " & tablPfx & "Template WHERE tname='" & templateName & "';") If not rs.EOF then BuildContent = Build_RSS(rs(0)) rs.close '### EDITORS PICK '------------------------------------------- Case 6 I = 1 strNoPick = "
" & strText_NoEdList & "
" strSQL = "SELECT subject, adID FROM " & tablPfx & "Ads WHERE (status = 1 AND epick = 1) ORDER BY pdate DESC;" set rs = objConn.Execute(strSQL) If Not rs.EOF then strPick = "
" & vbcrlf Do While not rs.EOF If I > topDisplay then Exit Do title = rs(0) If Len(title) > 60 then title = Left(title, 60) & " ..." strPick = strPick & "" & vbcrlf strPick = strPick & "" & vbcrlf rs.MoveNext I = I + 1 Loop strPick = strPick & "
" & title & "
" End If If len(strPick) = 0 then strPick = strNoPick rs.close BuildContent = strPick '### CUSTOM TEMPLATES '------------------------------------------- Case 11, 12, 13, 14, 15, 16 templID = contentType - 10 templateName = "Custom_" & templID set rs = objConn.Execute("SELECT " & tablPfx & "Template.body FROM " & tablPfx & "Template WHERE tname='" & templateName & "';") If not rs.EOF then BuildContent = Build_RSS(rs(0)) rs.close '### CATEGORIES TREE VIEW '------------------------------------------- Case 17 div_width = tb_width - 20 displCatAll = CStr(Request("id")) displCat = CStr(Request("cid")) displScat = CStr(Request("sid")) displ3rdCat = CStr(Request("3id")) If Len(displCat) = 0 And Len(displCatAll) = 0 then displCat = CStr(Request.Cookies("cat_me" & strSUnique)) If Len(displScat) = 0 And Len(displCatAll) = 0 then displScat = CStr(Request.Cookies("scat_me" & strSUnique)) If listalpha then If msaccess then tsorder = "ORDER BY lcase(tbCat.catName), lcase(tbscat.scatName), lcase(tb3ID.scatName);" Else: tsorder = "ORDER BY tbCat.catName, tbscat.scatName, tb3ID.scatName;" End If Else: tsorder = "ORDER BY tbCat.sortID, tbscat.sortID, tb3ID.sortID;" End If catNamet = "" scatNamet = "" If mysql then strsql = "SELECT tbCat.catID AS ID1st, tbCat.catName AS Name1st, tbCat.ads AS Ads1st, " strsql = strsql & "tbscat.sCatID AS ID2nd, tbscat.scatName AS Name2nd, tbscat.ads AS Ads2nd, " strsql = strsql & "tb3ID.sCatID AS ID3rd, tb3ID.scatName AS Name3rd, tb3ID.ads AS Ads3rd " strsql = strsql & "FROM " & tablPfx & "Cat AS tbCat " strsql = strsql & "LEFT JOIN " & tablPfx & "Scat AS tbscat ON tbscat.catID = tbCat.catID " strsql = strsql & "LEFT JOIN " & tablPfx & "Scat AS tb3ID ON tb3ID.catID = tbscat.scatID " strsql = strsql & tsorder Elseif mssql then strsql = "SELECT tbCat.catID AS ID1st, tbCat.catName AS Name1st, tbCat.ads AS Ads1st, " strsql = strsql & "tbscat.sCatID AS ID2nd, tbscat.scatName AS Name2nd, tbscat.ads AS Ads2nd, " strsql = strsql & "tb3ID.sCatID AS ID3rd, tb3ID.scatName AS Name3rd, tb3ID.ads AS Ads3rd " strsql = strsql & "FROM " & tablPfx & "Cat AS tbCat " strsql = strsql & "LEFT JOIN (" & tablPfx & "Scat AS tbscat LEFT JOIN " & tablPfx & "Scat AS tb3ID ON tb3ID.catID = tbscat.sCatID) " strsql = strsql & "ON tbscat.catID = tbCat.catID " strsql = strsql & tsorder Else strsql = "SELECT tbCat.catID AS ID1st, tbCat.catName AS Name1st, tbCat.ads AS Ads1st, " strsql = strsql & "tbscat.sCatID AS ID2nd, tbscat.scatName AS Name2nd, tbscat.ads AS Ads2nd, " strsql = strsql & "tb3ID.sCatID AS ID3rd, tb3ID.scatName AS Name3rd, tb3ID.ads AS Ads3rd " strsql = strsql & "FROM " & tablPfx & "Cat AS tbCat " strsql = strsql & "LEFT JOIN (" & tablPfx & "Scat AS tbscat LEFT JOIN " & tablPfx & "Scat AS tb3ID ON tb3ID.catID = tbscat.sCatID) " strsql = strsql & "ON tbscat.catID = tbCat.catID " strsql = strsql & tsorder End If Set rsTree = objConn.Execute(strsql) If not rsTree.EOF then rsdata = rsTree.getrows rsTree.close strTreeArray = "var treeArray = new Array(" allCatsCount = UBound(rsdata,2) strTree = "
" & vbcrlf strTree = strTree & "" For C = 0 to allCatsCount currcatName = rsdata(1,C) currscatName = rsdata(4,C) currcat3rdName = rsdata(7,C) If currcatName <> catNamet then If Len(CStr(cat3rdIDt)) > 0 then strTree = strTree & "" If Len(CStr(sCatIDt)) > 0 then strTree = strTree & "" sCatIDt = Empty cat3rdIDt = Empty catNamet = currcatName catIDt = rsdata(0,C) adst = rsdata(2,C) strTreeArray = strTreeArray & catIDt & "," If (Len(displCatAll) > 0 And displCatAll = CStr(catIDt)) Or (Len(displCat) > 0 And displCat = CStr(catIDt)) then catStyle = "style='font-weight: bold' " Else: catStyle = Empty End If If Len(displCat) > 0 And displCat = CStr(catIDt) then strDisplay = "" catClass = "a1" Else strDisplay = "display:none;" catClass = "a" End If strTree = strTree & "
" & strText_ExpandAll & " | " & strText_CollapseAll & "
" strTree = strTree & "
" strTree = strTree & " " & catNamet & "" strTree = strTree & " .................................................................................
" strTree = strTree & "
[" & adst & "]
" strTree = strTree & "

" firstCatFound = True End If If currscatName <> scatNamet then If Len(CStr(cat3rdIDt)) > 0 then strTree = strTree & "
" cat3rdIDt = Empty newSubcat = True scatNamet = currscatName sCatIDt = rsdata(3,C) If Len(displsCat) > 0 And displsCat = CStr(sCatIDt) then scatStyle = "style='font-weight: bold;' " Else: scatStyle = Empty End If sadst = rsdata(5,C) strTree = strTree & "
" strTree = strTree & " " & scatNamet & " [" & sadst & "]
" End If If Len(currcat3rdName) > 0 then cat3rdIDt = rsdata(6,C) c3adst = rsdata(8,C) If Len(displ3rdCat) > 0 And displ3rdCat = CStr(cat3rdIDt) then cat3Style = "style='font-weight: bold;' " Else: cat3Style = Empty End If If newSubcat then strTreeArray = strTreeArray & sCatIDt & "," If Len(displsCat) > 0 And displsCat = CStr(sCatIDt) then str3Display = "" cat3Class = "s0" Else str3Display = "display:none;" cat3Class = "s1" End If strTree = strTree & "
" strTree = strTree & "" End If newSubcat = False strTree = strTree & "
" strTree = strTree & " " & currcat3rdName & " [" & c3adst & "]
" End If Next strTree = strTree & "

" Erase rsdata Set rsdata = Nothing strTreeArray = Left(strTreeArray, Len(strTreeArray) - 1) & ");" End If strTree = strTree & "" BuildContent = strTree '### FIRST LEVEL CATEGORIES '------------------------------------------- Case 18 div_width = tb_width - 50 catNamet = "" If listalpha then sortorder = "catName": else sortorder = "sortID" strsql = "SELECT catID,catName,ads FROM " & tablPfx & "Cat ORDER BY " & sortorder & ";" Set rsCatList = objConn.Execute(strsql) If not rsCatList.EOF then rsdata = rsCatList.getrows rsCatList.close allCatsCount = UBound(rsdata,2) strCatList = "
" & vbcrlf For C = 0 to allCatsCount currcatID = rsdata(0,C) currcatName = rsdata(1,C) currcatAds = rsdata(2,C) If Request("id") = CStr(currcatID) Or Request("cid") = CStr(currcatID) then catStyle = "style='font-weight: bold;' " Else: catStyle = Empty End If strCatList = strCatList & "" & vbcrlf strCatList = strCatList & "" & vbcrlf Next strCatList = strCatList & "
" strCatList = strCatList & "" & currcatName & "" strCatList = strCatList & "  ........................................................
" strCatList = strCatList & "
[" & currcatAds & "]
" Erase rsdata Set rsdata = Nothing BuildContent = strCatList Else: rsCatList.close End If End Select End Function %> <% Function ConvDate(passDate) passDate = DateAdd("h", timeOffset, CDate(passDate)) '### Database Date Format yyyy-mm-dd ************************* date_part = DatePart("yyyy", passDate) & "-" & Right(DatePart("m", passDate) + 100, 2) & "-" & Right(DatePart("d", passDate) + 100, 2) '### Database Date Format dd/mm/yyyy ************************* 'date_part = Right(DatePart("d", passDate) + 100, 2) & "/" & Right(DatePart("m", passDate) + 100, 2) & "/" & DatePart("yyyy", passDate) '### Database Date Format mm/dd/yyyy ************************* 'date_part = Right(DatePart("m", passDate) + 100, 2) & "/" & Right(DatePart("d", passDate) + 100, 2) & "/" & DatePart("yyyy", passDate) time_part = " " & Right(DatePart("h", passDate) + 100, 2) & ":" & Right(DatePart("n", passDate) + 100, 2) & ":" & Right(DatePart("s", passDate) + 100, 2) ConvDate = date_part & time_part End Function Function ConvDateShort(passDate) ConvDateShort = ConvDate(passDate) End Function Function readFile(rFile, iArray) Set riFile = objFile.GetFile(rFile) Set recordGet=objFile.OpenTextFile(riFile, 1, False) On Error Resume Next rec = recordGet.Read(riFile.Size) On Error GoTo 0 recordGet.Close rec = ClearCarriageReturn(rec) Select Case iArray Case True: readFile = Split(rec, vbCrLf) Case False: readFile = rec Case "decode" recArray = Split(rec, vbCrLf) For each recItem in recArray recItem = CryptText(recItem, key, True) decodeRec = decodeRec & vbCrLf & recItem Next decodeRec = ClearCarriageReturn(decodeRec) readFile = decodeRec End Select End Function Sub writeFile(iFile, iData) iData = ClearCarriageReturn(iData) Set recordSet = objFile.OpenTextFile(iFile, 2, True) recordSet.WriteLine iData recordSet.Close Set iData = Nothing End Sub Sub appendFile(iFile, iData) Set recordSet = objFile.OpenTextFile(iFile, 8, False) recordSet.WriteLine iData recordSet.Close End Sub Function RandomNumber() Randomize RandomNumber = Int((899999 * Rnd) + 100000) End Function Function ClearCarriageReturn(recClearRet) Do Until Not Right(recClearRet, 2) = vbCrLf And Not Left(recClearRet, 2) = vbCrLf If Right(recClearRet, 2) = vbCrLf Then recClearRet = Left(recClearRet, Len(recClearRet) - 2) If Left(recClearRet, 2) = vbCrLf Then recClearRet = Right(recClearRet, Len(recClearRet) - 2) Loop ClearCarriageReturn = recClearRet End Function '*** This function enables posting http links within comment area if HTML is disabled. Function encodeURL(text) set re = new RegExp re.global=true re.ignoreCase=true re.Pattern = "(((http)|(ftp)|(https))(://)(\w|-)+(\.)(\w|-|\.|/|\?|&|=|/|:|;|#|%|\+)+)" temp = re.replace(text, "") re.Pattern = "([A-Za-z0-9_\-\.]+@(\w+|\w+-\w+)\.[A-Za-z0-9_\.]+)" encodeURL = re.replace(temp, " ($1)") End Function Function UpdateList(action, catID, scatID, cat3rdID) Select Case action Case True: strOperator = "+ 1" Case False: strOperator = "- 1" End Select catID = CLng(catID) scatID = CLng(scatID) cat3rdID = CLng(cat3rdID) objConn.Execute("UPDATE " & tablPfx & "Cat SET ads = ads " & strOperator & " WHERE catID = " & catID & ";") objConn.Execute("UPDATE " & tablPfx & "Scat SET ads = ads " & strOperator & " WHERE sCatID = " & scatID & ";") If cat3rdID > 0 then objConn.Execute("UPDATE " & tablPfx & "Scat SET ads = ads " & strOperator & " WHERE catID = " & scatID & " AND sCatID = " & cat3rdID & ";") End Function Function RotateBanner(zone) If Application("isrotator" & strUnique) = "0" then Exit Function If Not isArray(Application("cl_rotator" & strUnique)) then loadRotator RotateBanner = rotate(zone) End Function Sub loadRotator() Dim tempRotator(10), tempRotatorWeight(10), tempRelWeight(10) Application("cl_rotator" & strUnique) = Empty Application("cl_weight" & strUnique) = Empty Application("isrotator" & strUnique) = Empty strSQL = "SELECT " & tablPfx & "Banner.ID,bname,altText,bannercode,weight,iscode,site," & tablPfx & "Zone.zid FROM " strSQL = strSQL & tablPfx & "Zone LEFT JOIN " & tablPfx & "Banner ON (" strSQL = strSQL & tablPfx & "Banner.izone = " & tablPfx & "Zone.zid) WHERE (isactive = 1 AND status = 1);" set rsRot = objConn.Execute(strSQL) If not rsRot.EOF then ztable = rsRot.getrows: Else: Dim ztable(7,0) rsRot.close For I = 1 to 10 strRotator = Empty strWeight = Empty strRelWight = 0 For m = 0 to UBound(ztable,2) If Clng(ztable(7, m)) = I Then strRotator = strRotator & ss & ztable(0, m) & s & ztable(1, m) & s & ztable(2, m) & s & ztable(3, m) & s & ztable(5, m) & s & ztable(6, m) nextW = ztable(4, m) strWeight = strWeight & " " & CStr(nextW) strRelWight = strRelWight + CLng(nextW) foundBanner = True End If Next If strRelWight > 0 then strWeight = setPriority(strWeight, strRelWight) strRotator = Replace(strRotator, ss, "", 1,1,1) tempRotator(I) = strRotator tempRotatorWeight(I) = strWeight tempRelWeight(I) = strRelWight Next Application("cl_relWeight" & strUnique) = tempRelWeight Application("cl_rotator" & strUnique) = tempRotator Application("cl_weight" & strUnique) = tempRotatorWeight If Not foundBanner then Application("isrotator" & strUnique) = "0" Erase tempRelWeight: Erase tempRotator: Erase tempRotatorWeight End Sub Function setPriority(priority, prsum) priority = Trim(priority) priorityArray = Split(priority, " ") For I = 0 To Ubound(priorityArray) NextPriority = priorityArray(I) bweight = ((NextPriority * 1000) \ prsum) + bweight If I = Ubound(priorityArray) Then bweight = 1000 setPriority = setPriority & "," & bweight Next setPriority = Replace(setPriority, ",", "", 1, 1, 1) End Function Function rotate(zone) On Error resume Next Dim strWeight, J, arrayWeight, RandomBanner, randomIndex Dim rotateString, bannerArray, rotateArray, rotateCode If Len(Application("cl_rotator" & strUnique)(zone)) > 10 then setLocale server_locale Randomize RandomBanner = Int((1000 * Rnd) + 1) strWeight = Application("cl_weight" & strUnique)(zone) arrayWeight = Split(strWeight, ",") For J = 0 to Ubound(arrayWeight) If RandomBanner <= CLng(arrayWeight(J)) then randomIndex = J: Exit For Next Erase arrayWeight bannerArray = Split(Application("cl_rotator" & strUnique)(zone), ss) rotateString = bannerArray(randomIndex) Erase bannerArray rotateArray = Split(rotateString, s) Select Case rotateArray(4) Case "1" banner = rotateArray(1) rotateCode = rotateArray(3) outID = CLng(rotateArray(0)) Case "0" banner = rotateArray(1) outID = CLng(rotateArray(0)) altText = rotateArray(2) rotateCode = ""
				rotateCode = rotateCode & altText & "" End Select sdd = dd(objConn) aDate = ConvDate(Date) objConn.Execute("UPDATE " & tablPfx & "Banner SET bview=bview+1 WHERE ID =" & outID & ";") Set ret = objConn.Execute("UPDATE " & tablPfx & "Bannerstat SET display=display+1 WHERE (bname='" & banner & "' AND adate= " & sdd & aDate & sdd & ");", numrow, adExecuteNoRecords) If numrow = 0 then objConn.Execute("INSERT INTO " & tablPfx & "Bannerstat(bname,adate,display,click) VALUES('" & sqbl(banner) & "'," & sdd & aDate & sdd & ",1,0);") End If rotate = rotateCode setLocale resetLocale End If On Error goto 0 End Function Function sq(inputstr) inputstr = Replace(inputstr,"\'", "'") sq = Replace(inputstr, "'", "''") End Function Function sqbl(inputstr) sqbl = Replace(inputstr, "'", "") End Function Function dd(ByRef conObj) strDateDelimiter = "'" If msaccess Then strDateDelimiter = "#" dd = strDateDelimiter End Function Function buildPages(nPage, URLlink, pageType) rs.PageSize = pp rs.CacheSize = pp If Len(nPage) = 0 Then rs.AbsolutePage = 1 Else If isNumeric(nPage) And Not nPage = 0 then If CLng(nPage) <= rs.PageCount Then rs.AbsolutePage = nPage Else: rs.AbsolutePage = 1 End If Else: rs.AbsolutePage = 1 End If End If currentPage = rs.AbsolutePage totalPage = rs.PageCount totalRecords = rs.RecordCount displayRecords = pp remRecords = totalRecords Mod pp If totalRecords < pp then displayRecords = totalRecords If currentPage = totalPage And Not remRecords = 0 then displayRecords = remRecords limitPage = 10 remain = currentPage Mod limitPage range = currentPage \ limitPage If remain <> 0 Then range = range + 1 lastpage = limitPage * range firstpage = lastpage - limitPage + 1 If lastpage > totalPage then lastpage = totalPage nextRange = lastpage + 1 prevRange = firstpage - 1 If prevRange = 0 Then prevLink = "" & strText_Previous & " 10 " & strText_Pages & "" Else prevLink = "" & strText_Previous & " 10 " & strText_Pages & "" End If If nextRange > totalPage Then nextLink = "" & strText_Next & " 10 " & strText_Pages & "" Else nextLink = "" & strText_Next & " 10 " & strText_Pages & "" End If firstPageLink = "" & strText_FirstPage & "" lastPageLink = "" & strText_LastPage & "" For n = firstpage to lastpage If n = currentPage then links = links & " (" & n & ") " Else links = links & " [" & n & "] " End If Next paging = "
" & strText_Pages & ": " & links paging = paging & "
" & firstPageLink & " | " & prevLink & " | " & nextLink & " | " & lastPageLink & "
" buildPages = paging End Function Function strMarquee() If Len(Application("cl_marquee" & strUnique)) = 0 then topMarquee = 5 If mysql then strSQL = "SELECT adID,subject FROM " & tablPfx & "Ads WHERE status = 1 ORDER BY pdate DESC LIMIT 0," & topMarquee & ";" Else: strSQL = "SELECT TOP " & topMarquee & " adID,subject FROM " & tablPfx & "Ads WHERE status = 1 ORDER BY pdate DESC;" End If set rsm = objConn.Execute(strSQL) If not rsm.EOF then Do While not rsm.EOF strTemp = strTemp & "" & Replace(rsm(1), chr(34), "") & "<\/a><\/span>" strRemote = strRemote & "" & Replace(rsm(1), chr(34), "") & "<\/span><\/a>""+br+""" rsm.MoveNext Loop strMarquee = strTemp Application("cl_marquee" & strUnique) = strTemp Else strMarquee = strText_NoSubmissions Application("cl_marquee" & strUnique) = strMarquee End If If Len(strRemote) > 0 Then strRemoteTicker = "" writeFile Server.MapPath(upload) & "\feed.js", strRemoteTicker End If Else: strMarquee = Application("cl_marquee" & strUnique) End If End Function Function HTMLEncode(text) newtext = Replace(text, "<", "") newtext = Replace(text, ">", "") HTMLEncode = newtext End Function Function matchAlerts(adID, catID, scatID, cat3rdID, subject, body) On Error Resume Next catID = CLng(catID) scatID = CLng(scatID) If IsNumeric(cat3rdID) AND Len(CStr(cat3rdID)) > 1 then cat3rdID = CLng(cat3rdID): Else: cat3rdID = 0 strSQL = "SELECT " & tablPfx & "Agent.* FROM " & tablPfx & "Agent WHERE " strSQL = strSQL & "(catID = " & catID & " AND scatID = " & scatID & " AND cat3rdID = " & cat3rdID & ")" strSQL = strSQL & " OR (catID = " & catID & " AND scatID = " & 0 & ")" strSQL = strSQL & " OR (catID = " & catID & " AND scatID = " & 0 & ")" strSQL = strSQL & " OR (catID = " & 0 & " AND scatID = " & 0 & ");" set rsa = objConn.Execute(strSQL) If not rsa.EOF then Do While Not rsa.EOF ID = CLng(rsa(0)) stype = CLng(rsa(3)) keywords = rsa(2) Select Case stype Case 1 matchFound = False keyArray = Split(keywords) For each ikey in keyArray If instr(1, subject, ikey, 1) <> 0 Or instr(1, body, ikey, 1) <> 0 Then matchFound = True: Exit For Next Case 2 matchFound = True keyArray = Split(keywords) For each ikey in keyArray If instr(1, subject, ikey, 1) = 0 AND instr(1, body, ikey, 1) = 0 Then matchFound = False: Exit For Next Case 3 matchFound = False If instr(1, subject, keywords, 1) <> 0 Or instr(1, body, keywords, 1) <> 0 Then matchFound = True End Select If matchFound Then If not rsa(12) = Empty then straddAlert = "alertlist = alertlist + ' " & adID & "'" Else: straddAlert = " alertlist = ' " & adID & "'" If mysql then straddAlert = "alertlist = CONCAT(alertlist, ' " & adID & "')" objConn.Execute("UPDATE " & tablPfx & "Agent SET " & straddAlert & " WHERE ID = " & ID & ";") End If rsa.MoveNext Loop End If rsa.close On Error Goto 0 End Function Sub checkIP(uIP) If Len(uIP) > 5 then If Not detectMultipleIP then Exit Sub set rsIP = objConn.Execute("SELECT userID,nick,email FROM " & tablUPfx & "User WHERE IP='" & uIP & "';") If not rsIP.EOF then rsdata = rsIP.getrows rsIP.close numrows = UBound(rsdata,2) + 1 If numrows > 1 then For m = 0 to UBound(rsdata,2) strBodyx = strBodyx & vbcrlf & "User ID: " & rsdata(0, m) & ", User Nick: " & rsdata(1, m) & ", User Email: " & CryptText(rsdata(2, m), key, True) Next On Error Resume Next Set DNSLook = Server.CreateObject("AspDNS.Lookup") dnsHost = DNSLook.ReverseDNSLookup(uIP) On Error Goto 0 strBodyx = "Multiple accounts has possibly been created:" & vbcrlf & vbcrlf & strBodyx & vbcrlf & vbcrlf strBodyx = strBodyx & "User Logged from: " & uIP & " to all of the above accounts." If Len(dnsHost) > 0 then strBodyx = strBodyx & vbcrlf & "Host Name: " & dnsHost strSubject = web_name & " - multiple account detected." Call sendEmail(admin_email, admin_email, strSubject, strBodyx) End If Else: rsIP.close End If End If End Sub Sub build_Meta() static_ads_keywords = "buy, sell" On Error Resume Next scr_Path = Request.ServerVariables("SCRIPT_NAME") scr_Path_Array = Split(scr_Path, "/") scr_Name = Lcase(scr_Path_Array(Ubound(scr_Path_Array))) Select Case scr_Name Case "viewscat.asp" If IsNumeric(Request("id")) then mcatID = Request("id") set rscat = objConn.Execute("SELECT catFullDescr,catMetaDescr,catMetaKey,catTitle FROM " & tablPfx & "Cat WHERE catID = " & CLng(mcatID) & ";") If not rscat.EOF then full_description = rscat(0) result_meta_description = rscat(1) result_meta_keywords = rscat(2) result_web_name = rscat(3) End If rscat.close End If Case "viewlist.asp" on error goto 0 If IsNumeric(Request("cid")) and IsNumeric(Request("sid")) then mscatID = Request("sid") mcatID = Request("cid") strSQL = "SELECT " & tablPfx & "Cat.catFullDescr," & tablPfx & "Cat.catMetaDescr," & tablPfx & "Cat.catMetaKey," & tablPfx & "Cat.catTitle," strSQL = strSQL & tablPfx & "Scat.scatFullDescr," & tablPfx & "Scat.scatMetaDescr," & tablPfx & "Scat.scatMetaKey," & tablPfx & "Scat.scatTitle, " strSQL = strSQL & tablPfx & "Scat.scatName," & tablPfx & "Cat.catName " strSQL = strSQL & "FROM " & tablPfx & "Cat, " & tablPfx & "Scat WHERE " & tablPfx & "Cat.catID = " & CLng(mcatID) & " AND " & tablPfx & "Scat.sCatID = " & CLng(mscatID) & ";" set rscat = objConn.Execute(strSQL) If not rscat.EOF then full_description = rscat(4) result_meta_description = rscat(5) result_meta_keywords = rscat(6) result_web_name = rscat(7) catName = rscat(9) subCatName = rscat(8) If ((IsNull(result_web_name) OR Len(result_web_name) = 0) And default_to_cat) or Request("sa") = 1 then full_description = rscat(0) result_meta_description = rscat(1) result_meta_keywords = rscat(2) result_web_name = rscat(3) End If End If rscat.close End If Case "viewsublist.asp" If IsNumeric(Request("cid")) and IsNumeric(Request("sid")) and IsNumeric(Request("3id")) then mscat3rdID = Request("3id") mcatID = Request("cid") mscatID = Request("sid") strSQL = "SELECT scatFullDescr,scatMetaDescr,scatMetaKey,scatTitle,scatName FROM " & tablPfx & "Scat WHERE catID = " & CLng(mscatID) & " AND sCatID = " & CLng(mscat3rdID) & ";" set rscat = objConn.Execute(strSQL) If not rscat.EOF then full_description = rscat(0) result_meta_description = rscat(1) result_meta_keywords = rscat(2) result_web_name = rscat(3) cat3rdName = rscat(4) If (IsNull(result_web_name) OR Len(result_web_name) = 0) And default_to_cat then strSQL = "SELECT " & tablPfx & "Cat.catFullDescr," & tablPfx & "Cat.catMetaDescr," & tablPfx & "Cat.catMetaKey," & tablPfx & "Cat.catTitle," strSQL = strSQL & tablPfx & "Scat.scatFullDescr," & tablPfx & "Scat.scatMetaDescr," & tablPfx & "Scat.scatMetaKey," & tablPfx & "Scat.scatTitle " strSQL = strSQL & "FROM " & tablPfx & "Cat, " & tablPfx & "Scat WHERE " & tablPfx & "Cat.catID = " & CLng(mcatID) & " AND " & tablPfx & "Scat.sCatID = " & CLng(mscatID) & ";" set rscat = objConn.Execute(strSQL) If not rscat.EOF then full_description = rscat(4) result_meta_description = rscat(5) result_meta_keywords = rscat(6) result_web_name = rscat(7) If (IsNull(result_web_name) OR Len(result_web_name) = 0) And default_to_cat then full_description = rscat(0) result_meta_description = rscat(1) result_meta_keywords = rscat(2) result_web_name = rscat(3) End If End If End If End If rscat.close End If Case "viewad.asp", "view_print.asp" If IsNumeric(Request("id")) then madID = Request("id") strSQL = "SELECT subject,uopt8 FROM " & tablPfx & "Ads WHERE adID = '" & madID & "';" set rsad = objConn.Execute(strSQL) If not rsad.EOF then msubject = rsad(0) adStyle = rsad(1) msubject = replace(msubject, ".", "") msubject = replace(msubject, ",", "") msubject = replace(msubject, "?", "") msubject = replace(msubject, "!", "") msubject = replace(msubject, ":", "") result_web_name = msubject result_meta_description = msubject subject_array = Split(msubject) For Each metakey in subject_array If Len(metakey) > 2 then loose_key = loose_key & ", " & metakey Next mscatID = Left(madID, 5) strSQL = "SELECT " & tablPfx & "Cat.catName, " & tablPfx & "Scat.scatName FROM " strSQL = strSQL & tablPfx & "Cat, " & tablPfx & "Scat WHERE " & tablPfx & "Cat.catID = " & tablPfx & "Scat.catID AND " & tablPfx & "Scat.sCatID = " & CLng(mscatID) & ";" set rsadc = objConn.Execute(strSQL) If not rsadc.EOF then mcatName = rsadc(0) mscatName = rsadc(1) End If rsadc.close If len(mcatName) > 0 then result_web_name = result_web_name & " - " & mcatName & " : " & mscatName result_meta_keywords = static_ads_keywords & ", " & msubject & loose_key If Len(adStyle) > 0 and uOpt(7) = "1" then dstyle = adStyle End If rsad.close End If Case "adpreview.asp" adPreviewStyle = Request.Form("uO7") If Len(adPreviewStyle) > 0 then dstyle = adPreviewStyle End Select If Len(result_web_name) = 0 or IsNull(result_web_name) then result_web_name = web_name If IsNull(result_meta_description) OR Len(result_meta_description) = 0 then result_meta_description = meta_description If IsNull(result_meta_keywords) OR Len(result_meta_keywords) = 0 then result_meta_keywords = meta_keywords On Error goto 0 End Sub Sub cacheAds(adID) On Error Resume Next Server.ScriptTimeout = 10000 Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP") xml.Open "GET", Application("Classify_Main_Config" & strUnique)(1) & "view_print.asp?id=" & adID, False xml.send cache_content = xml.responseBody Set xml = Nothing cache_content = Trim(cache_content) cache_content = Unicode(cache_content) If Len(cache_content) > 2000 then writeFile server.mappath(ad_cache) & "\" & adID & ".htm", cache_content On Error Goto 0 End Sub Function Unicode(b) t = String(LenB(b), " ") t = "" For i = 1 To LenB(b) t = t & Chr(AscB(MidB(b, i, 1))) Next Unicode = t End Function Function isCompatible() On Error Resume Next user_browser = CStr(uagent) Set re = New RegExp re.Global = True re.IgnoreCase = True re.pattern = "(Safari)" If re.test(user_browser) Then isCompatible = False Exit Function End If re.pattern = "(MSIE )(\d\.\d*)" If re.test(user_browser) Then Set matches = re.execute(user_browser) For each match in matches bver = match.SubMatches(1) Next setLocale server_locale If Len(CStr(bver)) > 0 And isNumeric(bver) then If bver >= 5.5 then isCompatible = True End If End If setLocale resetLocale Exit Function End If isCompatible = True End Function Sub logEvent(event_type, eopt0, eopt1, eopt2, eopt3, eopt4) ldate = ConvDate(Now) sdd = dd(objConn) If Len(Sess_Array(48)) > 0 then isAdmin ="Yes": Else: isAdmin = "=" If Sess_Array(29) > 0 then userID_Log = Sess_Array(29) nick_Log = sq(Sess_Array(51)) isUser = "" & nick_Log & "" Else: isUser = "=" End If Select Case event_type Case "New Ad" eID = 1 eicon = "enewad.gif" ldescr = "New Ad Posted: " & eopt1 & "" If eventsArray(1) then isLogEvent = True Case "Update Ad" eID = 2 eicon = "emodad.gif" ldescr = "Ad Modified: " & eopt1 & "" & eopt2 If eventsArray(2) then isLogEvent = True Case "Ad Expire" eID = 3 eicon = "eexpad.gif" ldescr = "Ad Expired: " & eopt1 & "" If eventsArray(3) then isLogEvent = True Case "Ad Deleted" eID = 4 eicon = "edelad.gif" ldescr = "Ad Deleted. Ad ID: " & eopt0 & eopt1 If eventsArray(4) then isLogEvent = True Case "New Account" eID = 5 eicon = "enewuser.gif" ldescr = "New Account Created. User: " & eopt1 & "" & eopt2 If eventsArray(5) then isLogEvent = True Case "Account Updated" eID = 6 eicon = "emoduser.gif" ldescr = "Account Modified. User: " & eopt1 & "" & eopt2 If eventsArray(6) then isLogEvent = True Case "Account Activated" eID = 7 eicon = "eactuser.gif" ldescr = "Account Activated. User: " & eopt1 & "" & eopt2 If eventsArray(7) then isLogEvent = True Case "Account Suspended" eID = 8 eicon = "esususer.gif" ldescr = "Account Suspended. User: " & eopt1 & "" If eventsArray(8) then isLogEvent = True Case "Account Deleted" eID = 9 eicon = "edeluser.gif" ldescr = "Account(s) Deleted. " & eopt0 If eventsArray(9) then isLogEvent = True Case "Contact" eID = 10 eicon = "eadmcont.gif" ldescr = "Admin Contacted by: " & eopt1 & " Message: " & eopt2 & eopt3 If eventsArray(10) then isLogEvent = True Case "Contact Friend" eID = 11 eicon = "efrdcont.gif" ldescr = "Friend Contacted. From: " & eopt0 & " To: " & eopt2 & " Message: " & eopt3 ldescr = ldescr & "
Ad referred" If eventsArray(11) then isLogEvent = True Case "User Logon" eID = 12 eicon = "eloguser.gif" ldescr = "User Successfully Logged on " & eopt0 If eventsArray(12) then isLogEvent = True Case "User Logon Denied" eID = 13 eicon = "edenuser.gif" ldescr = "User Access Denied: " & eopt0 & eopt1 If eventsArray(13) then isLogEvent = True Case "Admin Logon" eID = 14 eicon = "elogadmin.gif" ldescr = "Admin Successfully Logged on" If eventsArray(14) then isLogEvent = True Case "Admin Logon Denied" eID = 15 eicon = "edenadmin.gif" ldescr = "Access to Admin page Denied!" If eventsArray(15) then isLogEvent = True Case "Custom1" eID = 16 eicon = "ecustom1.gif" ldescr = eopt0 If eventsArray(16) then isLogEvent = True Case "Custom2" eID = 17 eicon = "ecustom2.gif" ldescr = eopt0 If eventsArray(17) then isLogEvent = True Case "Custom3" eID = 18 eicon = "ecustom3.gif" ldescr = eopt0 If eventsArray(18) then isLogEvent = True Case "Custom4" eID = 19 eicon = "ecustom4.gif" ldescr = eopt0 If eventsArray(19) then isLogEvent = True Case "Custom5" eID = 20 eicon = "ecustom5.gif" ldescr = eopt0 If eventsArray(20) then isLogEvent = True Case else eID = 0 eicon = "ecustom1.gif" ldescr = "Unknown event" isLogEvent = True End Select If isLogEvent then strSQL = "INSERT INTO " & tablPfx & "Events(ldefine,eID,ldate,ltype,IP,ldescr,luser,ladmin) VALUES('" & event_type & "'," & eID & "," & sdd & ldate & sdd strSQL = strSQL & ",'" & eicon & "','" & IP & "','" & sq(ldescr) & "','" & isUser & "','" & isAdmin & "');" objConn.Execute(strSQL) End If End Sub Function checkDefault(typeVal) If IsNull(typeVal) then checkDefault = True ElseIf Trim(typeVal) = Empty Or Trim(lcase(typeVal)) = "default" then checkDefault = True Else: checkDefault = False End If End Function Sub loadScheme(cid,sid,c3id,isLimitOnly) If c3id = 0 then strSQL = "SELECT ftype FROM " & tablPfx & "Scat WHERE sCatID=" & sid & ";" Else: strSQL = "SELECT ftype FROM " & tablPfx & "Scat WHERE sCatID=" & c3id & ";" End If ftype = objConn.Execute(strSQL)(0) If checkDefault(ftype) then ftype = "default" Set rsls = objConn.Execute("SELECT * FROM " & tablPfx & "Fees WHERE ftype = '" & ftype & "';") If not rsls.EOF then Select Case isnotfree Case True For I = 0 to 11 ppArray(I) = rsls("pa" & I+1) Next ppArray(15) = rsls("pa16") For I = 25 to 29 ppArray(I) = rsls("pa" & I+1) Next Case False ppArray(25) = rsls("pa26") ppArray(26) = rsls("pa27") ppArray(27) = rsls("pa28") ppArray(28) = rsls("pa29") ppArray(29) = rsls("pa30") End Select End If rsls.close End Sub Sub UpdateSessions(isSessUpdate) On Error Resume Next If Not isSEngine AND isSessUpdate Then For scount = 0 to 100 Sess_Data_Back = Sess_Data_Back & Sess_Array(scount) & ss Next sdd = dd(objConn) objConn.Execute("UPDATE " & tablUPfx & "Sess SET sess_date = " & sdd & ConvDate(Now) & sdd & " , sess_data = '" & sq(Sess_Data_Back) & "' WHERE (sess_ID = '" & Request.Cookies("sess_ID" & strSUnique) & "' AND sess_IP = '" & IPR & "');") End If objConn.close Set rs = Nothing Set objConn = Nothing Set objFile = Nothing Erase Sess_Array Erase advArray Erase ppArray Erase uOpt Erase uOptD Erase uOptType Erase uOptSearch Erase eventsArray End Sub Function gettf(tf) gettf = Replace(tf, ".", "_tb.") End Function Function parseScategoryIcon(strKey) parseScategoryIcon = strKey If IsNull(strKey) Or Len(strKey) = 0 Then parseScategoryIcon = "folders.gif" End Function Function buildOptionList() set rscat = objConn.Execute("SELECT " & tablPfx & "Cat.catName, " & tablPfx & "Cat.catID FROM " & tablPfx & "Cat ORDER BY " & cat_sortorder & ";") optCatList = "" If not rscat.EOF then Do While Not rscat.EOF catName = rscat(0) catID = rscat(1) If CStr(sTarget) = CStr(catID) then build = true optCatList = optCatList & "" Else: optCatList = optCatList & "" End If rscat.MoveNext Loop End If If not build then Application("Cat_List" & strUnique) = optCatList rscat.close set rscat = Nothing End Function Function displayImage(imgAttachArray, adID, tsize) If tsize = 0 Then tsize = 50 If Len(imgAttachArray) > 0 And Not isNull(imgAttachArray) Then imgTempArray = Split(imgAttachArray, sf) img = Split(imgTempArray(0), "|")(0) size = Split(imgTempArray(0), "|")(1) w = CLng(Split(size, "x")(0)) h = CLng(Split(size, "x")(1)) wa = w ha = h If wa > tsize then koef = wa / ha wa = tsize ha = Round(tsize / koef) End If If ha > tsize then koef = ha / wa ha = tsize wa = Round(tsize / koef) End If img_tb = gettf(img) If Not objFile.FileExists(uploadPATH & img_tb) then img_tb = img iid = RandomNumber imgStr = "
" & vbcrLf imgStr = imgStr & "" & vbcrLf imgStr = imgStr & "" & vbcrlf & "
" & vbcrLf Else: imgStr = NA End If displayImage = imgStr End Function Function checkEmpty(questionString) checkEmpty = questionString If isNull(questionString) Then checkEmpty = Empty End Function Function formatBody(adDescr) If instr(1,adDescr,"") adDescr = Replace(adDescr, vbcr, "
") adDescr = Replace(adDescr, chr(34), """) End If formatBody = adDescr End Function %> <% Set objFile = Server.CreateObject("Scripting.FileSystemObject") dbPATH = server.mappath(dbFolder) & "\" uploadPATH = server.mappath(upload) & "\" Set dbFolder = objFile.GetFolder(dbPATH) chksetup = objFile.FileExists(dbPATH & "setup") If chksetup then Response.Redirect "!setup.asp" If Err.Number <> 0 then Response.Write "
The Error has occured!
" Response.Write "
Page: config/config.asp
" Response.Write "
Error Number: " & err.number & "
" Response.Write "
Error Description: " & err.description & "
" Response.End End If On Error Goto 0 %> <% On Error Resume Next Dim IPR, strSE, isSEngine strSE = Array("WinHttp","bot/","Java/","Google","yahoo.com","msnbot","Crawler") sess_btype = uagent If Instr(1, uagent, "MSIE", 1) <> 0 Then isIE = True For each SE_keyword in strSE If inStr(1,sess_btype,SE_keyword,1) <> 0 Then isSEngine = True Exit For End If Next If Not isSEngine Then If Request.Cookies("cpi_fusion" & strSUnique) = Empty Then Set TypeLibG = CreateObject("Scriptlet.TypeLib") IPR = Left((CryptText(Replace(TypeLibG.Guid, "{", "") , fubarKey, False)), 45) Response.Cookies("cpi_fusion" & strSUnique) = IPR Response.Cookies("cpi_fusion" & strSUnique).Path = "/" Set TypeLibG = Nothing Else: IPR = Request.Cookies("cpi_fusion" & strSUnique) End If If Request.Cookies("sess_ID" & strSUnique) = Empty then sess_btype = uagent If inStr(1,sess_btype,"WinHttp",1) = 0 And _ inStr(1,sess_btype,"bot/",1) = 0 And _ inStr(1,sess_btype,"Java/",1) = 0 And _ inStr(1,sess_btype,"Google/",1) = 0 And _ inStr(1,sess_btype,"yahoo.com",1) = 0 then sess_ID = Session.SessionID Response.Cookies("sess_ID" & strSUnique) = sess_ID Response.Cookies("sess_ID" & strSUnique).Path = "/" sdd = dd(objConn) pob = sdd & ConvDate(DateAdd("h", -2, Now)) & sdd objConn.Execute("DELETE FROM " & tablUPfx & "Sess WHERE sess_date < " & pob & ";") objConn.Execute("DELETE FROM " & tablUPfx & "Sess WHERE (sess_ID = '" & sess_ID & "' AND sess_IP = '" & IPR & "');") For scount = 0 to 100 If scount < 36 then Sess_Array(scount) = 0 sess_data = sess_data & Sess_Array(scount) & ss Next objConn.Execute("INSERT INTO " & tablUPfx & "Sess(sess_ID,sess_IP,sess_date,sess_data,sess_btype) VALUES('" & sess_ID & "','" & IPR & "'," & sdd & ConvDate(Now) & sdd & ",'" & sess_data & "','" & sess_btype & "');") End If Else Set rs_sess = objConn.Execute("SELECT * FROM " & tablUPfx & "Sess WHERE (sess_ID = '" & Request.Cookies("sess_ID" & strSUnique) & "' AND sess_IP = '" & IPR & "');") If Not rs_sess.EOF then Current_Session = rs_sess.getrows rs_sess.close sess_data_array = Current_Session(4, 0) sess_bound_id = Current_Session(0, 0) Erase Current_Session sess_data = Split(sess_data_array, ss) For scount = 0 to 100 NextSess = sess_data(scount) If Len(NextSess) = 0 then NextSess = Empty If scount < 36 then NextSess = CLng(NextSess) Sess_Array(scount) = NextSess Next If Len(Sess_Array(48)) > 0 then Sess_Array(48) = Session.SessionID Erase sess_data sess_data_array = Empty Else Response.Cookies("sess_ID" & strSUnique).Expires = Now - 1 Response.Cookies("cpi_fusion" & strSUnique).Expires = Now - 1 rs_sess.close End If End If End If On Error Goto 0 %> <% 'Application("Classify_Main_Config" & strUnique) = Empty 'Application("advert" & strUnique) = Empty 'Application("Classify_Payment_Config" & strUnique) = Empty 'Application("Events_Config" & strUnique) = Empty If isArray(Application("Classify_Main_Config" & strUnique)) then web_name = Application("Classify_Main_Config" & strUnique)(0) web_site = Application("Classify_Main_Config" & strUnique)(1) admin_email = Application("Classify_Main_Config" & strUnique)(2) notify_email = Application("Classify_Main_Config" & strUnique)(3) mailHost = Application("Classify_Main_Config" & strUnique)(4) SMTPID = Application("Classify_Main_Config" & strUnique)(5) SMTPPAss = Application("Classify_Main_Config" & strUnique)(6) emailMethod = Application("Classify_Main_Config" & strUnique)(7) verify_user = CBool(Application("Classify_Main_Config" & strUnique)(8)) moderate = CBool(Application("Classify_Main_Config" & strUnique)(9)) maxChr = CLng(Application("Classify_Main_Config" & strUnique)(10)) pp = CLng(Application("Classify_Main_Config" & strUnique)(11)) ap = CLng(Application("Classify_Main_Config" & strUnique)(12)) isnotfree = CBool(Application("Classify_Main_Config" & strUnique)(13)) listalpha = CBool(Application("Classify_Main_Config" & strUnique)(22)) largeimage = CBool(Application("Classify_Main_Config" & strUnique)(26)) catpos = CLng(Application("Classify_Main_Config" & strUnique)(27)) alertlimit = CLng(Application("Classify_Main_Config" & strUnique)(28)) dstyle = Application("Classify_Main_Config" & strUnique)(30) detectMultipleIP = CBool(Application("Classify_Main_Config" & strUnique)(31)) meta_description = Application("Classify_Main_Config" & strUnique)(32) meta_keywords = Application("Classify_Main_Config" & strUnique)(33) default_to_cat = CBool(Application("Classify_Main_Config" & strUnique)(34)) IsCache = CBool(Application("Classify_Main_Config" & strUnique)(35)) Wysiwyg_type = CLng(Application("Classify_Main_Config" & strUnique)(50)) isWysiwyg = CBool(Wysiwyg_type) imagelimit = CLng(Application("Classify_Main_Config" & strUnique)(51)) seclog = CBool(Application("Classify_Main_Config" & strUnique)(52)) isEvents = CBool(Application("Classify_Main_Config" & strUnique)(53)) ispack = CBool(Application("Classify_Main_Config" & strUnique)(54)) isTurningNumber = CBool(Application("Classify_Main_Config" & strUnique)(55)) cfg_reply = CBool(Application("Classify_Main_Config" & strUnique)(56)) cfg_view = CBool(Application("Classify_Main_Config" & strUnique)(57)) For uo = 0 to 6 uOpt(uo) = Split(Application("Classify_Main_Config" & strUnique)(uo+14), s)(0) uOptD(uo) = Split(Application("Classify_Main_Config" & strUnique)(uo+14), s)(1) Next uOpt(7) = Application("Classify_Main_Config" & strUnique)(21) For uo = 0 to 6 uOptType(uo) = Application("Classify_Main_Config" & strUnique)(uo+36) Next For uo = 0 to 6 uOptSearch(uo) = Application("Classify_Main_Config" & strUnique)(uo+43) Next Else strConfig = "SELECT " & tablPfx & "Config.* from " & tablPfx & "Config;" set rscfg = objConn.Execute(strConfig) If not rscfg.eof then web_name = rscfg("web_name") web_site = rscfg("web_site") If not rscfg("admin_email") = Empty then admin_email = CryptText(rscfg("admin_email"), adminkey, True) If not rscfg("notify_email") = Empty then notify_email = CryptText(rscfg("notify_email"), adminkey, True) If not rscfg("mailHost") = Empty then mailHost = CryptText(rscfg("mailHost"), adminkey, True) If not rscfg("SMTPID") = Empty then SMTPID = CryptText(rscfg("SMTPID"), adminkey, True) If not rscfg("SMTPPAss") = Empty then SMTPPAss = CryptText(rscfg("SMTPPAss"), adminkey, True) emailMethod = rscfg("emailMethod") verify_user = CBool(rscfg("verify_user")) moderate = CBool(rscfg("moderate")) maxChr = CLng(rscfg("maxChr")) pp = CLng(rscfg("pp")) ap = CLng(rscfg("ap")) isnotfree = CBool(rscfg("isnotfree")) listalpha = CBool(rscfg("listAlpha")) iwidth = CLng(rscfg("iwidth")) iheight = CLng(rscfg("iheight")) isize = CLng(rscfg("isize")) largeimage = CBool(rscfg("largeimage")) catpos = CLng(rscfg("catpos")) alertlimit = CLng(rscfg("alertlimit")) onbehalf = CBool(rscfg("onbehalf")) dstyle = rscfg("dstyle") detectMultipleIP = Cbool(rscfg("detectIP")) meta_description = rscfg("siteMetaDescr") meta_keywords = rscfg("siteMetaKey") default_to_cat = CBool(rscfg("default_to_cat")) IsCache = CBool(rscfg("IsCache")) Wysiwyg_type = CLng(rscfg("isWysiwyg")) isWysiwyg = CBool(Wysiwyg_type) imagelimit = CLng(rscfg("imagelimit")) seclog = CBool(rscfg("seclog")) isEvents = CBool(rscfg("isevents")) ispack = CBool(rscfg("ispack")) isTurningNumber = CBool(rscfg("istn")) cfg_reply = CBool(rscfg("cfg_reply")) cfg_view = CBool(rscfg("cfg_view")) For uo = 0 to 6 uOpt(uo) = Split(rscfg("uOpt" & uo), s)(0) uOptD(uo) = Split(rscfg("uOpt" & uo), s)(1) Next uOpt(7) = rscfg("uOpt" & 7) For uo = 0 to 6 uOptType(uo) = rscfg("uOptType" & uo) Next For uo = 0 to 6 uOptSearch(uo) = rscfg("uOptSearch" & uo) Next mainConfArray = Array(web_name,web_site,admin_email,notify_email,mailHost,SMTPID,SMTPPAss,emailMethod,verify_user,moderate,maxChr, _ pp,ap,isnotfree,uOpt(0) & s & uOptD(0),uOpt(1) & s & uOptD(1),uOpt(2) & s & uOptD(2),uOpt(3) & s & uOptD(3),uOpt(4) & s & uOptD(4),uOpt(5) & s & uOptD(5),uOpt(6) & s & uOptD(6),uOpt(7),listalpha,iwidth,iheight,isize, _ largeimage,catpos,alertlimit,onbehalf,dstyle,detectMultipleIP,meta_description,meta_keywords,default_to_cat,IsCache, _ uOptType(0),uOptType(1),uOptType(2),uOptType(3),uOptType(4),uOptType(5),uOptType(6), _ uOptSearch(0),uOptSearch(1),uOptSearch(2),uOptSearch(3),uOptSearch(4),uOptSearch(5),uOptSearch(6),Wysiwyg_type,imagelimit,seclog,isEvents,ispack,isTurningNumber,cfg_reply,cfg_view) Application("Classify_Main_Config" & strUnique) = mainconfArray Set mainConfArray = Nothing End If rscfg.close End If Dim cat_sortorder, scat_sortorder If listalpha Then cat_sortorder = "catName": scat_sortorder = "scatName" Else: cat_sortorder = "sortID": scat_sortorder = "sortID" End If If isnotfree then If isArray(Application("Classify_Payment_Config" & strUnique)) then For a = 0 to 29 ppArray(a) = Application("Classify_Payment_Config" & strUnique)(a) Next Else strFees = "SELECT " & tablPfx & "Fees.* from " & tablPfx & "Fees WHERE ftype = 'default';" set rscfg = objConn.Execute(strFees) If not rscfg.eof then If mysql then For a = 1 to 30 ppArray(a-1) = CStr(rscfg(a)) Next Else For a = 1 to 30 ppArray(a-1) = rscfg(a) Next End If Application("Classify_Payment_Config" & strUnique) = ppArray End If rscfg.close End If End If If isArray(Application("advert" & strUnique)) then For a = 0 to 28 advArray(a) = Application("advert" & strUnique)(a) Next Else strAdvert = "SELECT " & tablPfx & "Advert.* from " & tablPfx & "Advert;" set rscfg = objConn.Execute(strAdvert) If not rscfg.eof then For a = 0 to 28 advArray(a) = rscfg(a) Next Application("advert" & strUnique) = advArray End If rscfg.close End If If isEvents then If Not isArray(Application("Events_Config" & strUnique)) then strEvents = objConn.Execute("SELECT events FROM " & tablPfx & "Main;")(0) If Not IsNull(strEvents) then Application("Events_Config" & strUnique) = Split(Trim(strEvents)) End If If isArray(Application("Events_Config" & strUnique)) then For ev = 0 to Ubound(Application("Events_Config" & strUnique)) eventsArray(Application("Events_Config" & strUnique)(ev)) = True Next End If End If If Not CBool(Sess_Array(34)) then checkLoggedUser If Not Sess_Array(29) = 0 then myads = "?id=" & Sess_Array(29) '### Builds meta description, keywords as well as page title, '### full category/subcategory/3rd-Level description displayed on the page. '### Called from libraries.asp Call build_Meta() msgBack = " <<" & strText_back & "" If Sess_Array(48) = Session.SessionID then strAdmin = "
Admin: " & strText_Logout & "" & _ " | Tasks | Help 
" If Len(Sess_Array(77)) > 0 Then dstyle = Sess_Array(77) Response.Write "
Cancel Preview Mode
" End If End If %> <%= result_web_name %> <% If isIE then menu_padding = 3: Else: menu_padding = 0 If scr_Name = "default.asp" then Response.Write "" If not sTarget = Empty then Application("Cat_List" & strUnique) = Empty If Application("Cat_List" & strUnique) = Empty then buildOptionList %> <% Select Case scr_Name Case "post_new.asp","admin_imgmod.asp","oir.asp" %> <% End Select %> <% Call Build_List_Top(advArray(25), advArray(24), "xl_logo_decor") %> <% displayTicker = True %>
<%= web_name %>       <%= web_name %>

pageok

<%= RotateBanner(1) %>
<% If displayTicker Then %>
<% End If %> <% Call Build_List_Bottom() %>
<% If CBool(advArray(20)) then %> <% If advArray(28) then %> <% End If %>
<% Else: Response.Write "
" End If %> <% Build_Top_Menu %>
<% Build_Bottom_Menu %> <% '*** Begin Left Portal Bar noPortal = "update.asp,post_new2.asp,advsearch.asp,process.asp,rotstat.asp,advertise.asp,alert.asp,sitemap.asp,viewad.asp,adpreview.asp" If (advArray(26) OR scr_Name = "default.asp") AND InStr(scr_Name, "admin") = 0 AND InStr(noPortal, scr_Name) = 0 Then sdd = dd(objConn) strSQL = "SELECT * FROM " & tablPfx & "Main;" set rsmain = objConn.Execute(strSQL) head_left1 = rsmain(1): display_left1 = rsmain(2): top_left1 = rsmain(3) head_left2 = rsmain(4): display_left2 = rsmain(5): top_left2 = rsmain(6) head_left3 = rsmain(7): display_left3 = rsmain(8): top_left3 = rsmain(9) head_right1 = rsmain(10): display_right1 = rsmain(11): top_right1 = rsmain(12) head_right2 = rsmain(13): display_right2 = rsmain(14): top_right2 = rsmain(15) head_right3 = rsmain(16): display_right3 = rsmain(17): top_right3 = rsmain(18) with_left = rsmain(19): with_right = rsmain(20) rsmain.close templateName = "Main_Page_Center" set rstmpl = objConn.Execute("SELECT " & tablPfx & "Template.body FROM " & tablPfx & "Template WHERE tname='" & templateName & "';") If not rstmpl.EOF then strbody = rstmpl(0) rstmpl.close %>
<% If advArray(27) then %> <% End If %>
<% ' *** START DEFAULT LEFT PORTAL CONTENT. ' *** DEFAULT CONTENT MANAGED FROM [MAIN PAGE CONFIGURATION] ADMIN PAGE Call Build_Box(with_left, 200, head_left1, BuildContent(display_left1, top_left1, 1, with_left), "xl1") Call Build_Box(with_left, 200, head_left2, BuildContent(display_left2, top_left2, 2, with_left), "xl2") Call Build_Box(with_left, 200, head_left3, BuildContent(display_left3, top_left3, 3, with_left), "xl3") ' *** END DEFAULT LEFT PORTAL CONTENT ' ========================================== ' ========== START CUSTOM LEFT PORTAL CONTENT. ============ ' *** Remove Comment sign ['] in FRONT OF [Call Build_...] to enable appropriate box content. ' *** START CUSTOM BOX 1 'Call Build_Box_Top(with_left, 200, "Box Head", "xl4") %> <% 'Call Build_Box_Bottom("Box Head") ' *** END CUSTOM BOX 1 ' *** START CUSTOM BOX 2 'Call Build_Box_Top(with_left, 200, "Box Head", "xl5") %> <% 'Call Build_Box_Bottom("Box Head") ' *** END CUSTOM BOX 2 ' *** START CUSTOM BOX 3 'Call Build_Box_Top(with_left, 200, "Box Head", "xl6") %> <% 'Call Build_Box_Bottom("Box Head") ' *** END CUSTOM BOX 3 ' ============ END CUSTOM LEFT PORTAL CONTENT. =========== %>
<% End If %> <% On Error Resume Next Dim isviewscat, isviewlist, isviewsublist, isviewad, issearch, isadvsearch, defsearchtemplate, defadvsearchtemplate If IsArray(Application("Link_Config" & strUnique)) then isviewscat = CBool(Application("Link_Config" & strUnique)(0)) isviewlist = CBool(Application("Link_Config" & strUnique)(1)) isviewsublist = CBool(Application("Link_Config" & strUnique)(2)) isviewad = CBool(Application("Link_Config" & strUnique)(3)) issearch = CBool(Application("Link_Config" & strUnique)(4)) isadvsearch = CBool(Application("Link_Config" & strUnique)(5)) defsearchtemplate = Application("Link_Config" & strUnique)(6) defadvsearchtemplate = Application("Link_Config" & strUnique)(7) Else Set rsl = objConn.Execute("SELECT cfg7,cfg8,cfg9,cfg10,cfg11,cfg12,cfg1,cfg2 FROM " & tablPfx & "Misccfg WHERE cfgtype='clink';") If rsl.EOF Then rsl.close isviewscat = 0 isviewlist = 0 isviewsublist = 0 isviewad = 0 issearch = 0 isadvsearch = 0 defsearchtemplate = Empty defadvsearchtemplate = Empty objConn.Execute("INSERT INTO " & tablPfx & "Misccfg(cfgtype,cfg7,cfg8,cfg9,cfg10,cfg11,cfg12,cfg1,cfg2) VALUES('clink',0,0,0,0,0,0,'','');") Else isviewscat = CBool(rsl(0)) isviewlist = CBool(rsl(1)) isviewsublist = CBool(rsl(2)) isviewad = CBool(rsl(3)) issearch = CBool(rsl(4)) isadvsearch = CBool(rsl(5)) defsearchtemplate = rsl(6) defadvsearchtemplate = rsl(7) rsl.close End If Application("Link_Config" & strUnique) = Array(isviewscat,isviewlist,isviewsublist,isviewad,issearch,isadvsearch,defsearchtemplate,defadvsearchtemplate) End If On Error Goto 0 Sub RenderTemplate(link_catID, link_scatID, link_cat3ID) On Error Resume Next If Len(CStr(link_catID)) = 0 Or Not isNumeric(link_catID) Then link_catID = 0 If Len(CStr(link_scatID)) = 0 Or Not isNumeric(link_scatID) Then link_scatID = 0 If Len(CStr(link_cat3ID)) = 0 Or Not isNumeric(link_cat3ID) Then link_cat3ID = 0 If link_cat3ID > 0 Then Select Case scr_Name Case "viewsublist.asp": cattname = "cattemplate1" Case "viewad.asp": cattname = "cattemplate2" End Select strSCat = "SELECT " & cattname & " FROM " & tablPfx & "Scat WHERE (sCatID=" & link_cat3ID & " AND " & cattname & " IS NOT NULL AND " & cattname & " <> '');" Else If link_scatID > 0 Then Select Case scr_Name Case "viewlist.asp": cattname = "cattemplate0" Case "viewad.asp": cattname = "cattemplate2" End Select strSCat = "SELECT " & cattname & " FROM " & tablPfx & "Scat WHERE (sCatID=" & link_scatID & " AND " & cattname & " IS NOT NULL AND " & cattname & " <> '');" Else If link_catID > 0 Then Select Case scr_Name Case "viewscat.asp": cattname = "cattemplate5" Case "search.asp": cattname = "cattemplate3" Case "advsearch.asp": cattname = "cattemplate4" End Select strSCat = "SELECT " & cattname & " FROM " & tablPfx & "Cat WHERE (catID=" & link_catID & " AND " & cattname & " IS NOT NULL AND " & cattname & " <> '');" End If End If End If If Len(strSCat) > 0 Then Set tlink_rs = objConn.Execute(strSCat) If not tlink_rs.EOF then cattemplate = tlink_rs(0) tlink_rs.close If Len(Trim(cattemplate)) > 0 Then Call Open_Template(cattemplate, link_catID, link_scatID, link_cat3ID) Else: tlink_rs.close End If Else If scr_Name = "search.asp" And defsearchtemplate <> "none" Then Call Open_Template(defsearchtemplate, 0, 0, 0) If scr_Name = "advsearch.asp" And defadvsearchtemplate <> "none" Then Call Open_Template(defadvsearchtemplate, 0, 0, 0) End If On Error Goto 0 End Sub Sub Open_Template(cattemplate, link_catID, link_scatID, link_cat3ID) On Error Resume Next out_template = ReadFile(Server.MapPath("content\" & cattemplate & ".asp"), False) out_template = Build_Linked_Content(out_template, link_catID, link_scatID, link_cat3ID) Response.Write out_template On Error Goto 0 End Sub Function Build_Linked_Content(base_string, link_catID, link_scatID, link_cat3ID) On Error Resume Next Set re = New RegExp re.Global = True re.IgnoreCase = True re.Pattern = ":RSS=(\S+):" If re.test(base_string) then Set rss_matches = re.execute(base_string) For each match in rss_matches replstring = match.value rssfeed = match.SubMatches(0) base_string = Replace(base_string, replstring, Display_RSS(rssfeed)) Next End If re.Pattern = ":RotateBanner=(\d):" If re.test(base_string) then Set zone_matches = re.execute(base_string) For each match in zone_matches replstring = match.value izone = match.SubMatches(0) base_string = Replace(base_string, replstring, RotateBanner(izone)) Next End If re.Global = False re.Pattern = ":AD=(\d{5}):" If re.test(base_string) then Set ad_matches = re.execute(base_string) For each match in ad_matches replstring = match.value iads = match.SubMatches(0) Display_Content_Ads = DisplayContentAds(iads, link_catID, link_scatID, link_cat3ID) If Len(Display_Content_Ads) = 5 And Right(Display_Content_Ads, 2) = "11" Then Display_Content_Ads = DisplayContentAds(Display_Content_Ads, link_catID, link_scatID, 0) If Len(Display_Content_Ads) = 5 And Right(Display_Content_Ads, 2) = "00" Then Display_Content_Ads = DisplayContentAds(Display_Content_Ads, link_catID, 0, 0) base_string = Replace(base_string, replstring, Display_Content_Ads) Next End If Set re = Nothing Build_Linked_Content = base_string On error Goto 0 End Function Function DisplayContentAds(ads_config, link_catID, link_scatID, link_cat3ID) adNumber = CLng(Mid(ads_config, 1, 1)) adType = CLng(Mid(ads_config, 2, 1)) useImage = CLng(Mid(ads_config, 3, 1)) useCat = CLng(Mid(ads_config, 4, 1)) useDefault = CBool(Mid(ads_config, 5, 1)) Select Case adType Case 1,2,3,7 str_lsort = " ORDER BY pdate DESC " Case 4,5,6,8 Select Case databaseType Case "mssql": str_lsort = " ORDER BY NEWID() " Case "mysql": str_lsort = " ORDER BY Rand() " Case "msaccess": str_lsort = CreateRandomSort() End Select End Select Select Case adType Case 2,5 str_ltype = " AND hotlist = 1" Case 7,8 str_ltype = " AND (hotlist = 1 OR epick = 1)" Case 3,6 str_ltype = " AND epick = 1" End Select Select Case useCat Case 1 If link_catID > 0 Then str_lcat = " AND catID = " & link_catID Case 2 If link_scatID > 0 Then str_lcat = " AND scatID = " & link_scatID Case 3 If link_cat3ID > 0 Then str_lcat = " AND cat3rdID = " & link_cat3ID Else If link_scatID > 0 Then str_lcat = " AND scatID = " & link_scatID End If End Select If mysql then strSQL = "SELECT * FROM " & tablPfx & "Ads WHERE (status = 1" & str_ltype & str_lcat & ")" & str_lsort & "LIMIT 0," & adNumber & ";" Else: strSQL = "SELECT TOP " & adNumber & " * FROM " & tablPfx & "Ads WHERE (status = 1" & str_ltype & str_lcat & ")" & str_lsort & ";" End If Set rsLinkad = objConn.Execute(strSQL) If not rsLinkad.EOF Then linkad_data = rsLinkad.getrows rsLinkad.close Else rsLinkad.close If (useCat = 3 OR useCat = 2) And useDefault then ads_config_new = CStr(adNumber) & CStr(adType) & CStr(useImage) & "11" DisplayContentAds = ads_config_new Exit Function End If If useCat = 1 And useDefault then ads_config_new = CStr(adNumber) & CStr(adType) & CStr(useImage) & "00" DisplayContentAds = ads_config_new Exit Function End If End If If isArray(linkad_data) Then temp_build_link = vbcrlf & "" & vbcrlf temp_build_link = temp_build_link & "
" pullads = UBound(linkad_data,2) + 1 If pullads > adNumber Then pullads = adNumber uploadPATH = server.mappath(upload) & "\" If Cbool(useImage) Then For A = 0 to pullads - 1 link_imageData = linkad_data(12, A) link_adID = linkad_data(1, A) If Len(link_imageData) = 0 Then link_image = "" Else firstImg = Split(link_imageData, sf)(0) firstImgName = Split(firstImg, "|")(0) imgDim = Split(firstImg, "|")(1) w = Split(imgDim, "x")(0) h = Split(imgDim, "x")(1) If w > 100 then koef = w / h w = 100 h = Round(100 / koef) End If If h > 100 then koef = h / w h = 100 w = Round(100 / koef) End If firstImgName_tb = gettf(firstImgName) If Not objFile.FileExists(uploadPATH & firstImgName_tb) then firstImgName_tb = firstImgName link_image = "" End If temp_build_link = temp_build_link & "" Next temp_build_link = temp_build_link & "" End If For A = 0 to pullads - 1 link_adSubject = linkad_data(9, A) link_hot = CLng(linkad_data(18, A)) link_epick = CLng(linkad_data(50, A)) If len(link_adSubject) > 50 then link_adSubject = Left(link_adSubject, 50) & " ..." link_adID = linkad_data(1, A) If link_hot = 1 then link_hot_icon = "
" Else: link_hot_icon = Empty End If If link_epick = 1 then link_epick_icon = "
" Else: link_epick_icon = Empty End If temp_build_link = temp_build_link & "" Next Erase linkad_data temp_build_link = temp_build_link & "
" & link_image & "
" temp_build_link = temp_build_link & "" temp_build_link = temp_build_link & "
" & link_adSubject & "" & link_hot_icon & link_epick_icon & "
" temp_build_link = temp_build_link & vbcrlf & "" & vbcrlf DisplayContentAds = temp_build_link End If End Function Function CreateRandomSort() Randomize gensort = Int((23 * Rnd)) Select Case gensort Case 0: CreateRandomSort = " ORDER BY adID DESC " Case 1: CreateRandomSort = " ORDER BY adID ASC " Case 3: CreateRandomSort = " ORDER BY subject DESC " Case 4: CreateRandomSort = " ORDER BY subject ASC " Case 5: CreateRandomSort = " ORDER BY IP DESC " Case 6: CreateRandomSort = " ORDER BY IP ASC " Case 7: CreateRandomSort = " ORDER BY adcounter DESC " Case 8: CreateRandomSort = " ORDER BY adcounter ASC " Case 9: CreateRandomSort = " ORDER BY userID DESC " Case 10: CreateRandomSort = " ORDER BY city DESC " Case 11: CreateRandomSort = " ORDER BY city ASC " Case 12: CreateRandomSort = " ORDER BY userID ASC " Case 13: CreateRandomSort = " ORDER BY catID DESC " Case 14: CreateRandomSort = " ORDER BY catID ASC " Case 15: CreateRandomSort = " ORDER BY scatID DESC " Case 16: CreateRandomSort = " ORDER BY scatID ASC " Case 17: CreateRandomSort = " ORDER BY pdate DESC " Case 18: CreateRandomSort = " ORDER BY pdate ASC " Case 19: CreateRandomSort = " ORDER BY nick DESC " Case 20: CreateRandomSort = " ORDER BY nick ASC " Case 21: CreateRandomSort = " ORDER BY edate DESC " Case 22: CreateRandomSort = " ORDER BY edate ASC " End Select End Function %> <% If isArray(Application("Search_Misc_Config" & strUnique)) then commonWordsString = Trim(Application("Search_Misc_Config" & strUnique)(0)) zipValuesString = Trim(Application("Search_Misc_Config" & strUnique)(1)) ZipName = Trim(Application("Search_Misc_Config" & strUnique)(2)) AllowCatTree = Cbool(Application("Search_Misc_Config" & strUnique)(3)) DisplayAdsCount = Cbool(Application("Search_Misc_Config" & strUnique)(4)) DropEmptyCategory = Cbool(Application("Search_Misc_Config" & strUnique)(5)) sortCatsList = CLng(Application("Search_Misc_Config" & strUnique)(6)) isUserZip = Cbool(Application("Search_Misc_Config" & strUnique)(7)) isShowMile = Cbool(Application("Search_Misc_Config" & strUnique)(8)) DistanceUnit = CLng(Application("Search_Misc_Config" & strUnique)(9)) EnableRadiusSearch = Cbool(Application("Search_Misc_Config" & strUnique)(10)) displaySubcats = Cbool(Application("Search_Misc_Config" & strUnique)(11)) distanceCalculator = Cbool(Application("Search_Misc_Config" & strUnique)(12)) Else strConfig = "SELECT * FROM " & tablPfx & "Misccfg WHERE cfgtype = 'asearch';" Set asrs = objConn.Execute(strConfig) commonWordsString = asrs(2) zipValuesString = asrs(3) ZipName = asrs(4) AllowCatTree = Cbool(asrs(8)) DisplayAdsCount = Cbool(asrs(9)) DropEmptyCategory = Cbool(asrs(10)) sortCatsList = CLng(asrs(11)) isUserZip = Cbool(asrs(12)) isShowMile = Cbool(asrs(13)) DistanceUnit = CLng(asrs(14)) EnableRadiusSearch = Cbool(asrs(15)) displaySubcats = Cbool(asrs(16)) distanceCalculator = Cbool(asrs(17)) asrs.close as_config_array = Array(commonWordsString,zipValuesString,ZipName,AllowCatTree,DisplayAdsCount, _ DropEmptyCategory,sortCatsList,isUserZip,isShowMile,DistanceUnit,EnableRadiusSearch,displaySubcats,distanceCalculator) Application("Search_Misc_Config" & strUnique) = as_config_array Set as_config_array = Nothing End If commonWordsArray = Split(commonWordsString) If EnableRadiusSearch Then zipValuesString = Replace(zipValuesString, " ", "") zipArray = Split(zipValuesString, ",") Select Case DistanceUnit Case 1 distConverter = 1 mltDistConst = 3963 displayUnit = "mi" Case Else distConverter = 0.6214 mltDistConst = 6377.83 displayUnit = "km" End Select End If Select Case databaseType Case "msaccess" TopAdsLimitMS = "TOP 2000" strRPre = "CDbl(Val(" strRAff = "))" strRAffM = strRAff Case "mssql" TopAdsLimitMS = "TOP 2000" strRPre = "CAST(" strRAff = " AS DECIMAL)" strRAffM = strRAff Case "mysql" TopAdsLimitmySQL = " LIMIT 0,2000" strRPre = "CAST(" strRAff = " AS SIGNED)" 'strRAff = " AS DECIMAL)" strRAffM = " AS SIGNED)" End Select %> <% Dim secure_content, cnv_page, tsize, lisize '=== Conversion Tools page name cnv_page = "db_convert" '=============================== '=== Modify Encode key. Use any string (word) between 10-20 character. tn_encode_key = "change_this_word" '=============================== '=== Logon password to Content Management page secure_content = "admin" '=============================== '*** NOTE: When changing variable values above, make sure to preserve double-quotes enclosure. '*** If changed password to JohnDow for instance, then modified code would look like: secure_content = "JohnDow" '=== Small and large thumb size for alternative full ad view page. tsize = 60 lisize = 350 '=============================== %> <% '*** AD INFO. PROCESSING Dim optArray(20) msgNoAd = "
" & strText_AdisnotFound & "
" & msgBack If Sess_Array(48) = Session.SessionID Or CBool(Sess_Array(35)) then moderator = True If not moderator And cfg_view And Len(CStr(Sess_Array(29))) < 2 then UpdateSessions False Response.Redirect "info.asp?id=4" End If If request.querystring.count = 1 then adID = CStr(request.querystring.item(1)) If NOT isNumeric(adID) Or Len(adID) = 0 Then UpdateSessions False: Response.End Set rs = Server.CreateObject("ADODB.Recordset") strSQL = "SELECT " & tablPfx & "Ads.*, " & tablPfx & "Cat.*, " & tablPfx & "Scat.scatName FROM " & tablPfx & "Ads, " & tablPfx & "Cat, " & tablPfx & "Scat" strSQL = strSQL & " WHERE (adID = '" & adID & "' AND " & tablPfx & "Cat.catID = " & tablPfx & "Ads.catID AND " & tablPfx & "Scat.sCatID = " & tablPfx & "Ads.scatID);" rs.CursorType = 3 rs.Open strSQL, objConn If Not rs.EOF then userID = rs(4) status = CLng(rs(15)) If CStr(userID) = CStr(Sess_Array(29)) then adOwner = True If Not moderator And Not adOwner then If status = 0 Or status = 2 then showAd = False Else: showAd = True End If Else: showAd = True End If End If Else Response.Write msgNoAd UpdateSessions False Response.End End If If not showAd then rs.close Response.Write msgNoAd Else Select Case status Case 0: adStatus = strText_NotActive Case 2: adStatus = strText_Expired Case 1: adStatus = strText_Active Case 3: adStatus = strText_Disabled End Select catID = rs(2) scatID = rs(3) cat3rdID = CLng(rs("cat3rdID")) If cat3rdID > 0 then set rs3 = objConn.Execute("SELECT scatName FROM " & tablPfx & "Scat WHERE sCatID = " & cat3rdID & ";") If Not rs3.EOF then cat3rdName = rs3(0) Else: cat3rdID = 0 End If rs3.close End If catName = rs("catName") For co = 1 to 20 optArray(co) = rs("catOpt" & co) Next subcatName = rs("scatName") adDescr = rs(14) adDescr = formatBody(adDescr) epstatus = CBool(rs("epick")) %> <% '==== change following variable for navigation links separator if necessary. navsp = " ► " '========================================================================== Select Case scr_Name Case "browse.asp": navlinks = navsp & strText_CategoriesList Case "acquire.asp": navlinks = navsp & strText_PurchasePackage Case "acquire_display.asp": navlinks = navsp & strText_PackagesInformation Case "admin_gallery.asp": navlinks = navsp & "" & subject & "" & navsp & strText_SlideShow Case "admin_imgmod.asp": navlinks = navsp & strText_EditImages & navsp & display Case "adpreview.asp": navlinks = navsp & strText_AdPreview & navsp & strText_Someofthefields Case "advertise.asp": navlinks = navsp & strText_Advertisewithus Case "advsearch.asp", "advsearch_ajax.asp": navlinks = navsp & as_link Case "alert.asp": navlinks = navsp & infoText Case "viewad.asp" navlinks = navsp & "" & strText_CategoriesList & "" & navsp & "" & catName & "" navlinks = navlinks & navsp & "" & subcatName & "" If cat3rdID > 0 then navlinks = navlinks & navsp & "" & cat3rdName & "" navlinks = navlinks & navsp & strText_ViewAd Case "forum.asp" navlinks = navsp & "" navlinks = navlinks & navsp & "" & strText_Search & " " & strText_Forums & "" If moderator then navlinks = navlinks & navsp & "Manage" Case "forum_viewpost.asp" navlinks = navsp & "" & currentForum & "" If Len(TopicM) > 60 Then TopicM = Left(TopicM, 60) & "..." navlinks = navlinks & navsp & TopicM If moderator And NOT Sess_Array(79) = "1" then isedit = navsp & "Edit" End If navlinks = navlinks & isedit navlinks = navlinks & navsp & "" & strText_Search & " " & strText_Forums & "" If moderator then navlinks = navlinks & navsp & "Manage" If Sess_Array(79) = "1" Then strForumViewMode = "": Else: strForumViewMode = "" navlinks = navlinks & "" Case "forum_search.asp": navlinks = navsp & "" & strText_Forums & "" & navsp & strText_Search & " " & strText_Forums Case "hotlist.asp": navlinks = navsp & strText_WhatsHot Case "logon.asp": navlinks = navsp & strText_LogonIncorrect Case "post_new.asp": navlinks = navsp & strText_AddImages Case "post_new1.asp": navlinks = navsp & strText_SelectCategory Case "post_start.asp": navlinks = navsp & strText_SubmitAdto & " " & Sess_Array(37) & navsp & "" & strText_CHANGE & "" Case "post_new2.asp": navlinks = navsp & display Case "register.asp", "reg.asp": navlinks = navsp & strText_UserRegistration Case "user_logon.asp": navlinks = navsp & strText_UserLogon Case "sendpass.asp": navlinks = navsp & strText_EmailPassword Case "replies.asp": navlinks = navsp & infoText Case "reply.asp" If Request.Querystring.count > 0 Then If Request("friend") = 1 Then link = "" & adName & "" & navsp & strText_SendToFriend ElseIf Request("report") = 1 Then link = "" & adName & "" & navsp & strText_Report Else link = "" & adName & "" & navsp & strText_ReplytoAd End If navlinks = navsp & link Else: navlinks = navsp & strText_Contactus End If Case "repost.asp": navlinks = navsp & strText_RepostAd Case "repost_opt.asp": navlinks = navsp & strText_Repost Case "rotstat.asp": navlinks = navsp & strText_RotatorStatistics Case "rss_feeds.asp": navlinks = navsp & strText_AvailableRSSFeeds Case "search.asp": navlinks = navsp & link Case "sitemap.asp": navlinks = navsp & strText_SiteMap Case "terms.asp": navlinks = navsp & strText_TermsofUse Case "userfaq.asp": navlinks = navsp & strText_FAQ Case "view_print.asp" navlinks = navsp & "" & catName & "" navlinks = navlinks & navsp & "" & subcatName & "" navlinks = navlinks & navsp & strText_PrintFriendlyView Case "viewscat.asp": navlinks = navsp & "" & strText_CategoriesList & "" & navsp & catName Case "viewlist.asp" navlinks = navsp & "" & strText_CategoriesList & "" navlinks = navlinks & navsp & "" & catName & "" & navsp & subCatName Case "viewsublist.asp" navlinks = navsp & "" & strText_CategoriesList & "" navlinks = navlinks & navsp & "" & catName & "" navlinks = navlinks & navsp & "" & subCatName & "" navlinks = navlinks & navsp & cat3rdName Case "viewuserlist.asp": navlinks = navsp & strText_Alladspostedby & ": " & nick & " " & strText_From & ": " & city & "" Case "admin_import_view.asp": navlinks = navsp & Request("imp") & navsp & "Import Management" End Select %>
<% datePosted = FormatDateTime(CDate(rs(5)), 1) dateExpire = FormatDateTime(CDate(rs(6)), 1) nick = rs(7) adcount = CLng(rs(17)) + 1 If Sess_Array(48) = Session.SessionID then nick = "" & nick & "" userWeb = rs(11) If userWeb = Empty then noSite = True Else userWeb = "Ad Poster's Web Site" End If userWebImage = rs(13) city = rs(8) If city = Empty then noCity = True adPhone = rs(10) If adPhone = Empty then noPhone = True sbg = rs(9) hotlist = Cbool(rs(18)) If hotlist then hot_img = "" & strText_AltHotAd & " " If epstatus then epick_img = " " adSubject = hot_img & epick_img & sbg adImgTempArray = rs(12) '*** END AD INFO. PROCESSING '*** IMAGE ATTACHMENTS PROCESSING If not adImgTempArray = Empty then img = True adImgArray = Split(adImgTempArray, sf) imgArrayDim = UBound(adImgArray) - 1 image_array = UBound(adImgArray) 'strThumbsDisplay = "
" strThumbsDisplay = "
" For d = 0 to imgArrayDim If d = 0 then sthumbclass = "sthumb-sel": Else: sthumbclass= "sthumb" adImg = Split(adImgArray(d), "|")(0) adSize = Split(adImgArray(d), "|")(1) w = CLng(Split(adSize, "x")(0)) h = CLng(Split(adSize, "x")(1)) imageDims = calculateImageSize(w, h, tsize) tw = imageDims(0) th = imageDims(1) adImg_tb = gettf(adImg) If Not objFile.FileExists(uploadPATH & adImg_tb) then adImg_tb = adImg strThumbsDisplay = strThumbsDisplay & "
" strThumbsDisplay = strThumbsDisplay & "" strThumbsDisplay = strThumbsDisplay & "
" & vbcrlf imageLDims = calculateImageSize(w, h, lisize) lw = imageLDims(0) lh = imageLDims(1) If d = 0 then maxWidth = lw maxHeight = lh End If If lw > maxWidth then maxWidth = lw If lh > maxHeight then maxHeight = lh strLImageArray = strLImageArray & "image_array[" & d & "]=""" & Server.URLEncode(adImg) & ";" & w+150 & ";" & h+100 & ";" & lw & ";" & lh & """;" & vbcrLf If d = 0 Then strLImgDisplay = strLImgDisplay & "
" strLImgDisplay = strLImgDisplay & "
" & vbCrLf Else strLImgDisplay = strLImgDisplay & "" & vbCrLf End If Next If imgArrayDim > 2 Then thumbArearWidth = lisize+4: Else: thumbArearWidth = maxWidth+4 strLoader = "" strLImgDisplay = "
" & strLoader & strLImgDisplay If imgArrayDim > 0 Then '*** Select Which Slide Show to start with ********** sl_type = "slide" ' Normal 'sl_type = "trans" ' Translucent 'sl_type = "belt" ' Conveyor Belt 'sl_type = "down" ' Down up 'sl_type = "manual" ' Manual '*** Select Which Slide Show to start with ********** strSlideShow = "" strSlideShow = strSlideShow & "" & strText_SlideShow & "" Else hideImageCell = "style='display:none;'" End If strLImgDisplay = strLImgDisplay & "
" strLImgDisplay = strLImgDisplay & "" strLImgDisplay = strLImgDisplay & "" & strText_ZoomIn & "" strLImgDisplay = strLImgDisplay & strSlideShow strLImgDisplay = strLImgDisplay & "
" strThumbsDisplay = strThumbsDisplay & "
" Else hideImageCell = "style='display:none;'" strLImgDisplay = "" End If If Not userWebImage = Empty And Not isNull(userWebImage) then strWebImage = "" End If '*** END IMAGE ATTACHMENTS PROCESSING '*** MANAGEMENT CONTROLS BUILD-UP If moderator and status = 0 then strAdActivate = "Activate Ad" End If If moderator or adOwner then strAdDelete = "" & strText_Delete & "" If status = 2 then strEditAd = "" & strText_Repost & "" Else If Not status = 3 then strEditAd = "" & strText_Edit_Ad & "" strEditAd = strEditAd & "" & strText_Edit_Images & "" End If End If If status = 3 then strEnableDisable = "" & strText_Enable & "" Else If status = 1 then strEnableDisable = "" & strText_Disable & "" End If End If If moderator and not status = 2 then strDuration = "
 Duration:  " strDuration = strDuration & " " strDuration = strDuration & "
" End If If moderator then If hotlist then strAddRemoveHot = "Remove From Hot List" Else strAddRemoveHot = "Add To Hot List" End If If epstatus then strAddRemovePick = "" Else strAddRemovePick = "" End If strCacheMove = "Cache Ad" strCacheMove = strCacheMove & "Move Ad to other Category" End If If Not Sess_Array(29) = 0 then strAddFavor = "" & strText_AddtoFavorites & "" End If '*** END MANAGEMENT CONTROLS BUILD-UP '*** Added For Linked Templates If isviewad then Call RenderTemplate(catID, scatID, cat3rdID) '*** Added For Linked Templates Response.Write browseAds(adID, catID, scatID, cat3rdID, 1) Call Build_List_Top("center", "99%", "xl_content") %>
" strTempOption = strTempOption & "" If cm mod 2 = 0 Then strTempOption = strTempOption & "" cm = cm + 1 End If End If Next If cm Mod 2 = 0 Then strTempOption = strTempOption & "" If Len(strTempOption) > 0 Then %>
 <%= strText_AdInformation %>:
 <%= adSubject %>
 <%= strText_Viewed %>: <%= adcount %> <%= strText_times %>
<% If not moderator And cfg_reply And Len(CStr(Sess_Array(29))) < 2 then Reply_Link = "info.asp?id=5" Else: Reply_Link = "reply.asp?id=" & adID & "&name=" & Server.URLEncode(sbg) End If %>
 <%= strText_AdPosted %>:  <%= datePosted %>
 <%= strText_AdExpire %>:  <%= dateExpire %>
 <%= strText_UserInformation %>:
<%= strText_Postedby %>:
<%= nick %>
<% If moderator then %>
<%= strText_IPAddress %>:
<%= rs(16) %>
<% End If For uo = 0 to 6 If Not uOpt(uo) = Empty Then nextUserOpt = rs(uo+20) If Not nextUserOpt = Empty Then %>
<%= uOpt(uo) %>:
<%= nextUserOpt %> <% If Instr(1,uOpt(uo),ZipName,1) AND distanceCalculator AND isUserZip then Response.Write BuildZip(nextUserOpt) %>
<% End If End If Next If not noPhone Then %>
<%= strText_Phone %>:
<%= adPhone %>
<% End If If not noCity Then %>
<%= strText_UserLocation %>:
<%= city %>
<% End If If not noSite Then %>
<%= strText_UserWebSite %>:
<%= userWeb %>
<% End If %>
<%= strText_AllUserAds %>:
<%= strText_AllAds %> <%= strText_by %> <%= nick %>
 <%= strText_Status %>:  <%= adStatus %>
<%= strEnableDisable %><%= strAdDelete %>
<%= strEditAd %><%= strText_EmailtoaFriend %><%= strText_ReportInappropriateContent %><%= strAddFavor %><%= strText_PrintFriendly %>
<% If moderator Then %>
 Administration:
<%= strAdActivate %><%= strCacheMove %>
<%= strDuration %>
<%= strAddRemoveHot %><%= strAddRemovePick %>
<% End If %>
<%= strLImgDisplay %><%= strWebImage %>
><%= strThumbsDisplay %>
<% cm = 1 For I = 1 to 20 If not optArray(I) = Empty AND not IsNull(optArray(I)) then nextAdOpt = rs("opt" & I) If not nextAdOpt = Empty AND not IsNull(nextAdOpt) And instr(nextAdOpt, sg) = 0 then If cm mod 2 = 1 Then strTempOption = strTempOption & "
" & optArray(I) & ":
" strTempOption = strTempOption & "
" & nextAdOpt If Instr(1,optArray(I),ZipName,1) AND distanceCalculator AND Not isUserZip then strTempOption = strTempOption & BuildZip(nextAdOpt) strTempOption = strTempOption & "
" strTempOption = strTempOption & "
" strTempOption = strTempOption & "
 
<%= strTempOption %>
<% End If %>
 <%= strText_AdDescription %>:
<%= strText_Textsize %> 1 <%= strText_Textsize %> 2 <%= strText_Textsize %> 3 <%= strText_Textsize %> 4 <%= strText_Textsize %>
<%= adDescr %>
<% Call Build_List_Bottom() rs.close objConn.Execute("UPDATE " & tablPfx & "Ads SET adcounter = " & adcount & " WHERE adID = '" & adID & "';") End If Function browseAds(adID, catID, scatID, cat3rdID, target) Select Case target Case 0: strSQL = "SELECT adID FROM " & tablPfx & "Ads WHERE status = 1 ORDER BY hotlist DESC, pdate DESC;" Case 1: strSQL = "SELECT adID FROM " & tablPfx & "Ads WHERE (status = 1 AND catID = " & CLng(catID) & ") ORDER BY hotlist DESC, pdate DESC;" Case 2: strSQL = "SELECT adID FROM " & tablPfx & "Ads WHERE (status = 1 AND scatID = " & CLng(scatID) & ") ORDER BY hotlist DESC, pdate DESC;" Case 3: strSQL = "SELECT adID FROM " & tablPfx & "Ads WHERE (status = 1 AND cat3rdID = " & CLng(cat3rdID) & ") ORDER BY hotlist DESC, pdate DESC;" End Select set rspage = objConn.Execute(strSQL) If not rspage.EOF then rsdata = rspage.getrows rspage.close totalAds = UBound(rsdata,2) For F = 0 To totalAds current_adID = rsdata(0,F) If CStr(adID) = CStr(current_adID) then If F = 0 then PrevStr = "" Else PrevStr = "" End If If F = totalAds then NextStr = "" Else NextStr = "" End If Exit For End If Next browseAds = "
" & PrevStr & "  " & NextStr & "
" Else: rspage.close End If End Function Function BuildZip(clientZip) BuildZip = " " BuildZip = BuildZip & " " & strText_Distance & "" End Function Function calculateImageSize(byVal iw, byVal ih, lsize) Dim isizeArray(1) If iw > lsize Then koef = iw / ih iw = lsize ih = Round(lsize / koef) End If If ih > lsize Then koef = ih / iw ih = lsize iw = Round(lsize / koef) End If isizeArray(0) = iw isizeArray(1) = ih calculateImageSize = isizeArray End Function %><%'*** Begin Right Portal Bar If (advArray(26) OR scr_Name = "default.asp") AND InStr(scr_Name, "admin") = 0 AND InStr(noPortal, scr_Name) = 0 Then %>
<% ' *** START DEFAULT RIGHT PORTAL CONTENT. ' *** DEFAULT CONTENT MANAGED FROM [MAIN PAGE CONFIGURATION] ADMIN PAGE Call Build_Box(with_right, 200, head_right1, BuildContent(display_right1, top_right1, 1, with_right), "xl7") Call Build_Box(with_right, 200, head_right2, BuildContent(display_right2, top_right2, 2, with_right), "xl8") Call Build_Box(with_right, 200, head_right3, BuildContent(display_right3, top_right3, 3, with_right), "xl9") ' *** END DEFAULT RIGHT PORTAL CONTENT ' ========================================== ' ============ START CUSTOM RIGHT PORTAL CONTENT. ============== ' *** Remove Comment sign ['] in front of [Call Build_...] to enable appropriate box content. ' *** START CUSTOM BOX 1 'Call Build_Box_Top(with_right, 200, "Box Head", "xl10") %> <% 'Call Build_Box_Bottom("Box Head") ' *** END CUSTOM BOX 1 ' *** START CUSTOM BOX 2 'Call Build_Box_Top(with_right, 200, "Box Head", "xl11") %> <% 'Call Build_Box_Bottom("Box Head") ' *** END CUSTOM BOX 2 ' *** START CUSTOM BOX 3 'Call Build_Box_Top(with_right, 200, "Box Head", "xl12") %> <% 'Call Build_Box_Bottom("Box Head") ' *** END CUSTOM BOX 3 ' ============= END CUSTOM RIGHT PORTAL CONTENT. ================ %>
<% End If Build_Top_Search %>
<% Build_Bottom_Search %> <% If CBool(advArray(21)) then %>
<% Else: Response.Write "" End If %>
<% Response.write "" '!!! DO NOT REMOVE !!! UpdateSessions True '!!! DO NOT REMOVE !!! %> <% '=========== START BUILD CUSTOM PORTAL/SIDE BARS BOX CONTENT =========== Sub Build_Box_Top(box_width, box_height, box_head, box_id) If instr(box_width, "%") = 0 Then px = "px" %>
<%= box_head %>
<% End Sub Sub Build_Box_Bottom(box_head) %>
<% End Sub '=========== END BUILD CUSTOM PORTAL/SIDE BARS BOX CONTENT =========== '=========== START BUILD DEFAULT PORTAL CONTENT BOX ================== Sub Build_Box(box_width, box_height, box_head, box_content, box_id) If instr(box_width, "%") = 0 Then px = "px" %>
<%= box_head %>
<%= box_content %>
<% End Sub '=========== END BUILD DEFAULT PORTAL CONTENT BOX ================== '=========== START BUILD NAVIGATION BARS ========================= Sub Build_Top_Menu() %>
<% End Sub Sub Build_Bottom_Menu() %>
<% Response.Write strAdmin '## Links when admin is logged on End Sub Sub Build_Top_Search() %>
<% End Sub Sub Build_Bottom_Search() %>
<% End Sub '=========== END BUILD NAVIGATION BARS =========================== '=========== START BUILD LIST TABLE =========================== Sub Build_List_Top(box_align, box_width, box_id) If instr(box_width, "%") = 0 Then px = "px" Select Case box_align Case "center": dalign = "margin: auto" Case "left": dalign = "float: left" Case "right": dalign = "float: right" End Select %>
<% End Sub Sub Build_List_Bottom() %>
<% End Sub '=========== END BUILD LIST TABLE =========================== %>