<% Dim strError, eSetup If objConn.Errors.Count <> 0 Or err.Number <> 0 Then Response.Write "
Errors Detected while connecting to SQL server.

" Response.Write "Make sure you have created an empty database, specified correct server name and logon credentials.

" Response.Write "(Please read SETUP-MANUAL.PDF for setup information.)

" 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 "


" collectErrors showErrors 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.
" & err.description Response.End End If dbPATH = server.mappath(dbFolder) & "\" uplPATH = server.mappath(upload) & "\" bannerPATH = server.mappath(bnrLocation) & "\" eSetup = server.mappath("sql_setup") & "\" Set x = objFile.GetFolder(dbPATH) Set x = objFile.GetFolder(uplPATH) Set x = objFile.GetFolder(bannerPATH) Set x = objFile.GetFolder(eSetup) If err.Number <> 0 Then Response.Write "
Errors Detected: " Response.Write "Please make sure you have properly pointed path to ""banners"" and ""upload"" folder " Response.Write "in config/config.asp and ""sql_setup"" folder exists
" Response.Write "
Current path to banners specified in config.asp is: bnrLocation = """ & bnrLocation & """
" Response.Write "
Current path to cl_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 Case "phase4": Phase4 True Case "phase4a": Phase4 False Case "phase5": Phase5 Case "phase6": Phase6 Case "phase7": Phase7 End Select Sub Welcome() %>
Version 3.1 - MySQL - Setup

Connected to SQL Server: <%= UCase(MySQLServer) %>

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 "
" writeFile dbPATH & "/setup", "test" writeFile bannerPATH & "setup", "test" writeFile uplPATH & "setup", "test" Response.Write "" If tstatus(err.number) then Response.Write "" Response.Write "
" Response.Write "Testing Folders Permissions.
Write to db/banners/cl_upload Folders


Recommended Actions: Make sure you have ""Write"" NTFS Permission to '" & dbfolder & "rotator', '" & upload & "', '" & bnrLocation & "' and their content for IUSR_... account.
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 set x = objFile.GetFile(eSetup & "setup_db.mdb") Response.Write "SQL Setup Source Database (setup_db.mdb)" If tstatus(err.number) then Response.Write "

Recommended Actions: Make sure you have placed ""setup_db.mdb"" database into ""sql_setup"" folder" Response.Write "As well as the existence of all of the original files from the package.
" startOver Exit Sub End If Response.Write "" %>


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() %>
Rapid Classified MySQL Database Setup

Please enter User ID and Password for the account which has rights to create/modify tables in  SQL database: <%= MySQLDBName %> on server <%= UCase(MySQLServer) %>

User ID:
Password:

 


Use this button if you already created tables 
and would like to reset Admin Password!


Use this button if you already created tables, setup Classified 
but would like to reset some of the data to the default values!
You will have a chance to select more options at the next page.

<% End Sub %> <% Sub tableRestore(table) On Error Resume Next objConn.Execute("DELETE FROM " & tablPfx & table & ";") Set rsSetup = objConnSetup.Execute("SELECT * FROM tbl" & table & ";") If Not rsSetup.EOF Then rsdata = rsSetup.getrows rsSetup.close rc = UBound(rsdata,2) fc = UBound(rsdata,1) strSQL = "SELECT * FROM " & tablPfx & table & ";" rs.CursorLocation = 3 rs.CursorType = 2 rs.LockType = 3 rs.Open strSQL, strConn For j = 0 To rc rs.AddNew For f = 0 to fc If Not rs.Fields(f).Name = "ID" Then rs(f) = rsdata(f,j) Next Next rs.Update rs.close Erase rsdata Set rsdata = Nothing Else: rsSetup.close End If On Error Goto 0 End Sub Sub templateRestore(template) On Error Resume Next objConn.Execute("DELETE FROM " & tablPfx & "Template WHERE tname = '" & sq(template) & "';") Set rsSetup = objConnSetup.Execute("SELECT * FROM tblTemplate WHERE tname = '" & sq(template) & "';") If Not rsSetup.EOF Then rsdata = rsSetup.getrows rsSetup.close objConn.Execute("INSERT INTO " & tablPfx & "Template(tname, title, subject, body, type) VALUES('" & _ rsdata(1,0) & "','" & rsdata(2,0) & "','" & rsdata(3,0) & "','" & rsdata(4,0) & "'," & rsdata(5,0) & ");") Erase rsdata Set rsdata = Nothing Else: rsSetup.close End If On Error Goto 0 End Sub Sub phase4 (isCustom) If not isCustom then Set objConnSetup = Server.CreateObject("ADODB.Connection") Set rsSetup = Server.CreateObject("ADODB.Recordset") strConnSetup = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & eSetup & "setup_db.mdb" & ";" objConnSetup.open strConnSetup tblArray = Array("Advert","Cat","Counter","Fees","Main","Opt","OptTypes","Pack","Scat","Template") For each table in tblArray Call tableRestore(table) Next Set rsSetup = Nothing objConnSetup.close Set objConnSetup = Nothing %>

 

<% Else %>

RAPID CLASSIFIED V3.1 DEFAULT SETTINGS RESTORE MODE

Select what you would like to restore and click "Restore"
Default Site Geometry Configuration
Default Categories Structure
Default Pricing Schemes
Default Main Page Configuration
Default Option Sets
Default Membership Packages
 
Some of the Default Email and Page Content Templates
Admin_Notify Send_Password 
Alerts Update_Registration
Advertisement Update_Verification
Content_News User_FAQ
Credits_Add User_FAQ_Pay 
Credits_Remove Verification
Expired_Notification Main_Page_Center
Modified_Ad_Pending Package_Expire
New_Ad_Approved Package_Add
New_Ad_Pending Package_Remove
Registration User_FAQ_Pack
       
<% End If End Sub Dim objConnSetup, rsSetup, strConnSetup Sub phase7() Set objConnSetup = Server.CreateObject("ADODB.Connection") Set rsSetup = Server.CreateObject("ADODB.Recordset") strConnSetup = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & eSetup & "setup_db.mdb" & ";" objConnSetup.open strConnSetup If Request.Form("C1") = 1 then tableRestore "Advert" If Request.Form("C2") = 1 then tableRestore "Cat": tableRestore "Scat" If Request.Form("C3") = 1 then tableRestore "Fees" If Request.Form("C4") = 1 then tableRestore "Main" If Request.Form("C5") = 1 then tableRestore "OptTypes" If Request.Form("C6") = 1 then tableRestore "Pack" If Request.Form("C30") = 1 then tableRestore "Template" If Request.Form("C8") = 1 then templateRestore "Admin_Notify" If Request.Form("C9") = 1 then templateRestore "Alerts" If Request.Form("C10") = 1 then templateRestore "Advertisement" If Request.Form("C11") = 1 then templateRestore "Content_News" If Request.Form("C12") = 1 then templateRestore "Credits_Add" If Request.Form("C13") = 1 then templateRestore "Credits_Remove" If Request.Form("C14") = 1 then templateRestore "Expired_Notification" If Request.Form("C15") = 1 then templateRestore "Modified_Ad_Pending" If Request.Form("C16") = 1 then templateRestore "New_Ad_Approved" If Request.Form("C17") = 1 then templateRestore "New_Ad_Pending" If Request.Form("C18") = 1 then templateRestore "Registration" If Request.Form("C19") = 1 then templateRestore "Send_Password" If Request.Form("C20") = 1 then templateRestore "Update_Registration" If Request.Form("C21") = 1 then templateRestore "Update_Verification" If Request.Form("C22") = 1 then templateRestore "User_FAQ" If Request.Form("C23") = 1 then templateRestore "User_FAQ_Pay" If Request.Form("C24") = 1 then templateRestore "Verification" If Request.Form("C25") = 1 then templateRestore "Main_Page_Center" If Request.Form("C26") = 1 then templateRestore "Package_Expire" If Request.Form("C27") = 1 then templateRestore "Package_Add" If Request.Form("C28") = 1 then templateRestore "Package_Remove" If Request.Form("C29") = 1 then templateRestore "User_FAQ_Pack" Set rsSetup = Nothing objConnSetup.close Set objConnSetup = Nothing 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 %>

 

  Restore Completed... to Classified >>

<% End Sub Sub phase5() %>
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 phase6() 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 Set objMD5 = New MD5 objMD5.Text = "" strLogon = objMD5.HEXMD5 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 & "admin_logon,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 & "','" & strLogon & "',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 Sub collectErrors() For each errItem in objConn.Errors errNumber = errItem.Number errDescription = errItem.Description If errNumber <> 0 then strError = strError & "" & errNumber & "" strError = strError & "" & errDescription & "" End If Next objConn.Errors.Clear End Sub Sub showErrors() If not strError = Empty then With Response .Write "
" .Write "" .Write strError .Write "" .Write "
Error Number:Description:
Current Database Provider Connection String" .Write " is:

strConn = """ & strConn & """
" End With strError = Empty End If End Sub Sub tableRet(iErr, tbl) If iErr = 0 Or err.number = 0 then ret = "....OK" Else: ret = "....Failed" End If If Lcase(tbl) = "user" then Response.Write "Table " & tablUPfx & tbl & " creation:" & ret & "" Else: Response.Write "Table " & tablPfx & tbl & " creation:" & ret & "" End If End Sub %>