<% If err.Number <> 0 Then Response.Write "
Errors Detected: " Response.Write " Please make sure you have properly pointed path to database folder " Response.Write "in config/config.asp and existence of ""cldb31.mdb""" Response.Write "

Current path to database specified in config.asp is: dbfolder = """ & dbfolder & """" Response.Write "

Current Database provider string in config.asp is:
strConn = """ & strConn & """" Response.Write "

There is a slight chance that the ADO object on your server is failing or you may improperly modified config.asp. To verify that, remove a comment " Response.Write "character ['] in front of the On Error Resume Next statement in config/config.asp page and run setup again to read an explicit error" Response.Write "
" Response.End End If %> <% Set objFile = Server.CreateObject("Scripting.FileSystemObject") If err.Number <> 0 Then Response.Write "
Errors Detected: " Response.Write "It appears your IIS Server does not support ""File System Object"". Please consult with your provider." Response.End End If s = Chr(15) dbPATH = server.mappath(dbFolder) & "\" uplPATH = server.mappath(upload) & "\" bannerPATH = server.mappath(bnrLocation) & "\" Set x = objFile.GetFolder(uplPATH) Set x = objFile.GetFolder(bannerPATH) If err.Number <> 0 Then Response.Write "
Errors Detected: " Response.Write "Please make sure you have properly pointed path to ""banners"" and ""cl_upload"" folder " Response.Write "in config/config.asp
" Response.Write "
Current path to banners specified in config.asp is: bnrLocation = """ & bnrLocation & """
" Response.Write "
Current path to upload specified in config.asp is: upload = """ & upload & """
" Response.End End If On Error Goto 0 Select Case Request.Form("setup") Case Empty: Welcome Case "phase1": Phase1 Case "phase2": Phase2 Case "phase3": Phase3 End Select Sub Welcome() %>
Version 3.1 - Access 2000 - Setup

Please read Setup-Manual.pdf and follow directions for initial Classified Board setup. The most important part, is to have assigned "Write" and "Delete" NTFS permissions to "db", "cl_upload" and "banners" folders and their subfolders for account IUSR_... on IIS server. Please contact your host provider for assistance with permissions or explore your WebSite management "Control Panel". Some web providers allow to set permissions from site management "Control Panel" and some already have necessary rights granted for all folders.

The rest of the Setup and Board Configuration is done via this page.

Click "Next" to continue:

<% End sub Sub Phase1 On Error Resume Next Response.Write "
" Response.Write "" set rs = objConn.Execute("SELECT " & tablPfx & "Temp.* FROM " & tablPfx & "Temp;") rs.close If tstatus(err.number) then Response.Write "" Response.Write "
Testing Database Integrity and Permissions.
Database Test


Recommended Actions: Make sure you have a correct Access db file specified in config/config.asp
Current line in config.asp for database path is: strConn=""" & strConn & """
" startOver Exit Sub End If writeFile dbPATH & "/setup", "test" writeFile bannerPATH & "setup", "test" writeFile uplPATH & "setup", "test" Response.Write "Write to db/banners/cl_upload Folders" If tstatus(err.number) then Response.Write "

Recommended Actions: Make sure you have ""Write"" NTFS Permission to '" & dbfolder & "rotator', '" & upload & "', '" & bnrLocation & "' and their content for IUSR_... account." Response.Write "As well as the existence of all of the original files from the package..
" startOver Exit Sub End If objFile.DeleteFile uplPATH & "setup" objFile.DeleteFile bannerPATH & "setup" objFile.DeleteFile dbPATH & "/setup" Response.Write "Delete from db/banners/cl_upload Folders" If tstatus(err.number) then Response.Write "

Recommended Actions: Make sure you have ""Delete"" NTFS Permission to '" & dbfolder & "rotator', '" & upload & "', '" & bnrLocation & "' and their content for IUSR_... account." Response.Write "As well as the existence of all of the original files from the package." startOver Exit Sub End If Response.Write "" %>


The Database is checked. No errors were found.

Click "Next" to continue:

<% On Error Goto 0 End Sub Function tstatus(error) If CLng(error) <> 0 then Response.Write "............. FAILED" & vbCrLf tstatus = True Else Response.Write "............. OK" & vbCrLf tstatus = False End If End Function Sub phase2() %>
Classified Board Configuration and Preferences

You need to have at list one email account and access to SMTP server for the Classified board to run properly. Email account is used to send verification keys to users, notify them when ad is posted, activated, expired, notify administrator when new ad is posted, send news letters etc.

Note: This form contain only basic configuration options. After setup is complete, logon to admin page and explore "Admin_Help"  for further customization.

All Fields are Mandatory Except SMTP ID and SMTP Password

Site and Email Configuration:   Classify Board Preferences:

Specify Your Site Name. This name will be used for site title and reference within outgoing Emails to your Site users.

 

Leave this option checked if you wish to verify your users Email while they create an account on your site.

Site Name:   Verify Users Email: 

This field is critical and must be correctly filled!
Specify URL address to the location of classify board scripts folder. Make sure to have a slash at the end of the address. For instance: http://www.yourweb.com/classify/  

 

Leave this option checked if you wish to view and approve ads before posting on public pages.

 Site URL:   Approve Ads (moderate): 

Specify Administrator's Email Address. This address is used to notify Administrator about new ads posted to the board.

 

Specify a Maximum number of characters the ads description can have

Administrator's Email:   Maximum Chr. within Ad's body: 

Specify an outgoing Email Address. This address is used to notify users about ad posting/expiration account verification etc. Can be the same as Administrator Email address. 

 

Specify number of ads listed in subcategory on a page. 

Notification Email:   Number of Ads listed per Page: 

Specify Outgoing SMTP server which will be used to send outgoing Emails

 

Specify maximum number of ads user can post or have active. 

Outgoing SMTP server:   Allow to post no more than:  ads

Some SMTP servers require authentication. Enter basic authentication ID and Password for access. Those fields are optional. ID and Password are only valid for CDOSYS ASPEmail and JMail. Not valid for ASPMail. For CDONTS, the configuration for authentication is done on IIS. Leave blank if no authentication is requires.
Some providers may have custom configuration for CDOSYS mail. This means the code needs to be adjusted in mailmodule.asp according to your provider's standards.

 

The admin page logon ID and password are empty. Click "Logon" to enter admin area after the setup is complete. Once there, immediately go to "Admin Preferences" and set your admin ID and password.

SMTP Logon ID:    
SMTP Logon Password:  

 

Select appropriate Email method, which you would like to use. Make sure you have appropriate component installed on IIS server before making your selection. 

   
Email Method:    
   
User Optional Registration Fields:  
  
Optional Field 1:  

User Optional fields will appear on user registration form in addition to the preset fields, but will have optional status. Meaning those fields will be filled during registration time at user discretion.
Ads Style Selector (if checked) allows user to change ads style while posting. Styles are selected from available .css

Preset User Fields are: User Name/Nick, Email, City, Password.

Optional Field 2:  
Optional Field 3:  
Optional Field 4:  
Optional Field 5:  
Optional Field 6:  
Optional Field 7:  
Ads Style Selector:  
 


<% End Sub Sub phase3() objConn.Execute("DELETE FROM " & tablPfx & "Config;") web_name = sq(Request.Form("P1")) web_site = Request.Form("P2") admin_email = Request.Form("P3") notify_email = Request.Form("P4") mailHost = Request.Form("P5") SMTPID = Request.Form("P6") SMTPPAss = Request.Form("P7") emailMethod = Request.Form("P8") Opt0 = sq(Request.Form("Opt0")) Opt1 = sq(Request.Form("Opt1")) Opt2 = sq(Request.Form("Opt2")) Opt3 = sq(Request.Form("Opt3")) Opt4 = sq(Request.Form("Opt4")) Opt5 = sq(Request.Form("Opt5")) Opt6 = sq(Request.Form("Opt6")) Opt7 = sq(Request.Form("Opt7")) If web_name = Empty Or _ web_site = Empty Or _ admin_email = Empty Or _ notify_email = Empty Or _ mailHost = Empty then noGo "

One or more fields are Empty. Click 'Back' to make corrections!

" Exit Sub End If If not adminPass = adminConf then noGo "

Password do not match. Click 'Back' to make corrections!

" Exit Sub End If eadmin_email = sq(CryptText(admin_email, adminkey, False)) notify_email = sq(CryptText(notify_email, adminkey, False)) mailHost = sq(CryptText(mailHost, adminkey, False)) eSMTPID = sq(CryptText(SMTPID, adminkey, False)) eSMTPPAss = sq(CryptText(SMTPPAss, adminkey, False)) verify_user = CLng(Request.Form("P9")) moderate = CLng(Request.Form("P10")) maxChr = CLng(Request.Form("P11")) pp = CLng(Request.Form("P12")) ap = CLng(Request.Form("P16")) isnotfree = 0 listAlpha = 1 siteMetaDescr = "Post Free Classified Ads with Photo. Buy, Sell, Advertise or Promote with our Classifieds system." siteMetaKey = "free classified, classified, classified ads, ads, free ads, advertise, computers, automobiles, electronics, jobs, personals, pets, animals, real estate, rentals, promotion, advertise, announcements" strSQL = "INSERT INTO " & tablPfx & "Config(web_name,web_site,admin_email,notify_email,mailHost,SMTPID,SMTPPass,emailMethod,verify_user,moderate,maxChr,pp,ap,isnotfree," strSQL = strSQL & "listAlpha,iwidth,iheight,isize,largeimage,catpos,alertlimit,onbehalf,dstyle,uOpt0,uOpt1,uOpt2,uOpt3,uOpt4,uOpt5,uOpt6,uOpt7," strSQL = strSQL & "detectIP,IsCache,default_to_cat,siteMetaDescr,siteMetaKey)" strSQL = strSQL & " VALUES ('" & web_name & "','" & web_site & "','" & eadmin_email & "','" & notify_email & "','" & mailHost & "','" & eSMTPID & "','" strSQL = strSQL & eSMTPPAss & "','" & emailMethod & "'," & verify_user & "," & moderate & "," & maxChr & "," & pp & "," & ap strSQL = strSQL & "," & isnotfree & "," & listAlpha & ",400,400,50,0,2,4,0,'maroon.css','" &Opt0 & "','" & Opt1 & "','" & Opt2 & "','" & Opt3 & "','" & Opt4 & "','" & Opt5 strSQL = strSQL & "','" & Opt6 & "','" & Opt7 & "',0,0,1,'" & siteMetaDescr & "','" & siteMetaKey & "');" objConn.Execute(strSQL) For I = 0 to 6 If I = 0 then struOptType = "uOptType" & I & "='0'" Else: struOptType = struOptType & ",uOptType" & I & "='0'" End If struOptSearch = struOptSearch & ",uOptSearch" & I & "=0" Next objConn.Execute("UPDATE " & tablPfx & "Config SET " & struOptType & struOptSearch & ", isWysiwyg=0, imagelimit=5, isevents=1, ispack=0, istn=0, seclog=0;") On Error Resume Next objFile.DeleteFile dbPATH & "\setup" On Error Goto 0 Application("Classify_Main_Config" & strUnique) = Empty Application("Classify_Payment_Config" & strUnique) = Empty Application("advert" & strUnique) = Empty Application("cl_marquee" & strUnique) = Empty Application("cl_rotator" & strUnique) = Empty Application("Today_Expire_Flag" & strUnique) = Empty Application("Cat_List" & strUnique) = Empty Call sendEmail(admin_email, admin_email, web_name & " - Test", "This is a test. Your Classify Board is operational!") %>


Setup has been completed!

A test Email has been sent to <%= admin_email %> !

Remove following pages from your server before opening your board to public:
!setup.asp, !access_setup.asp, !mssql_setup.asp, !mysql_setup.asp.

Make sure to go to "Admin. Preferences" page and set your Admin ID and Password!

 

Click Finish, Logon as administrator by clicking "Logon" at the next page (ID and password are empty)


<% End Sub Sub noGo(msg) Response.Write msg %>
<% End Sub Sub startOver() Response.Write "

" End Sub %>