Directory Classified Ad Program

Unix and NT

A Very Versatile Program for use as links pages, directory, classified ads, frequently asked questions, or anything where you need a menu driven program.

This Program is completely cgi driven, there are no HTML files. All the HTML pages the user sees are created on-the-fly by the program.

View the program in action and add your site to the directory.

Free Download the FreeWare Version of the Directory/classifieds.


There are 4 files to the program

Note: The Menu is automatically generated by the program, and will list all the categories that you setup in the dir_setup.pl. The index.cgi will generate a plain text menu, hyper-links, that are clickable to each category.
For the directory.cgi, a dropdown list is created for the menu and appears on each listing page of the directory.

This is a very easy to set-up program. Follow the step by step instructions below.

  1. Make a directory (folder) under your main Dir. called 'directory' (no quotes)
  2. chmod the directory to 777
  3. Make a sub-directory called 'data' - this is where the data files are stored for the different categories.
  4. chmod the directory 'data' to 777 The program can not write files to the 'data' directory unless it has full permissions ie 777
  5. Make a directory, (folder), under your cgi-bin called 'directory' (no quotes)
  6. FTP all the .cgi and .pl files to the /cgi-bin/directory
  7. chmod all the .cgi files to 755

  8. Don't send me emails asking how to chmod Check the FAQ

  9. Configure the variables in the dir_setup.pl file. (see below)

  10. No configuration of the other files is necessary.
  11. NOTE: chmod is not necessary if you are using this program on an NT server.
    On NT systems you may need to put the complete path in the 'reqiuire' statement -> require ("dir_setup.pl"); <- in the .cgi scripts.
There are no HTML files to this program. All the data is stored in .txt files for the different categories. The .txt files are stored in the data directory as a 'flat file database'. There is one entry per line. All the HTML the user sees is created 'on the fly' by the cgi's.

The tricky part about this configuration is the setting-up of the categories. The category set-up is as follows:

Be very careful that the quotes (") and commas (,) are exactly right.

Program configuration, is all in the dir_setup.pl, below


                      ### *** IMPORTANT *** ###

### *** If FTP'ing this file, be sure to send in ASCII format *** ###


             ### *** Configure the Variables Below *** ###

# Enter the root path for the data directory
$rootpath = '/usr/var/www/docs/rlaj/program/directory/data';

# Enter the Web Address of the directory.cgi
$directory_cgi = 'http://www.rlaj.com/program/directory/directory.cgi';

# Enter the Web Address of the listing.cgi
$listing_cgi = 'http://www.rlaj.com/program/directory/listing.cgi';

# Enter the Web Address of the logo for the top of all pages
$logo = 'http://www.rlaj.com/homeimages/ezhtml2.gif';

# Enter the Web Address of the clickable gif for all pages
# This is used for a link to the listing.cgi - for users to list their site
$Listing_Link = 'http://www.rlaj.com/program/directory/list.gif';

# Enter the limit you want to put on the length of the description 
# for the entry.
$desc_limit = '200';

# Enter the Title for your pages
$title = 'Welcome to RLAJ.COM - The Directory';

# Enter the BODY Tag parameters for your pages
$Body = '';

# Enter the Table Background Color for The DropDown List
$TableBg = 'BGCOLOR=#A4A4FF';




# Below, enter your categories and file names in the following format:
# "Category,filename",
# Put only one per line - make sure you have all quotes and commas in the
# proper places, or you will get a server error.
# DO NOT USE SPACES IN THE FILENAME

@category = ( ### *** DO NOT DISTURB THIS LINE "Announcements,announce", "Antiques Collectables,antiques", "Art/Crafts,art", "Automotive,auto", "Books,books", "Business Opportunities,business_op", "Business Services,business_sv", "Clothing,clothing", "Computer Hardware,comp_hardware", "Computer Software,comp_software", "Education,edu", "Electronics,electronics", "Entertainment,entertain", "Help Wanted,helpwanted", "Hobbies,hobby", "Investment Oppertunities,investopp", "Jewelry,jewelry", "Miscellaneous,misc", "Misc. Transportation,mist_tran", "MLM,mlm", "Music,music", "Personals,personal", "Pets,pets", "Real Estate,realestate", "Services Needed,svce_needed", "Services Offered,svce_offered", "Sports,sports", "Travel,travel", "Video,video", "Wanted,wanted", "Work at Home,workathome", ); ### *** DO NOT DISTURB THIS LINE