these example links are not active

Welcome to the www.dtp-aus.com ‘JumpNcount’ script – version 1.3 December ’99.

IMPORTANT INFORMATION THAT MUST BE READ WHEN YOU INTEND TO USE THIS SCRIPT

The program "JMPNCNT.CGI" was written (and ©) by Ron F Woolley, Melbourne Australia. Copyright 1998 and 1999. This script can be altered for personal use,  EXCEPT THAT:
  ALL COPYRIGHT NOTICES must remain in the code, visible on all output pages,
  AND ALL of the header notices MUST REMAIN intact visible as is,
  AND using the script(s) without first reading the README.HTM, is prohibited.

Australian copyright is recognised/supported in over 130 countries per Berne Convention
and other treaties ( including USA ) - copyright registration is not required!

The scripts and associated files remain the property of Ron F Woolley.
NO PROFIT what so ever is to be gained from users of these scripts for the use of these
scripts, except that a reasonable minimal charge for installation may be allowed if installing,
as a site developer, for a user on the users site that is not on / in the developers domain.
This program must NOT be used for multiple JumpNcount users on one site/domain
and the program resource must not be supplied as a remote service

Ron Woolley, the author, MUST be notified via the addresses/URLs below
if any monetary charge is applied for the installation of these scripts.

NOTE: If you use these files, you do so entirely at your own risk, and take on full responsibility for the consequences of using the described files. You must first agree that Ron Woolley / HostingNet, the only permtted supplier of this and/or accompanying files are exempt from any responsibility for all or any resulting problems, losses or costs caused by your using these or any associated files.

If you disagree with any of these requirements,
you must immediately destroy all files.

Although this program script is free to use, if you use it and find it useful, a donation to help continue this support and keep new scripts / upgrades coming would of course be appreciated.
      On line Visa / MasterCard payments are available for donations and low cost installations.

These files can only be obtained via the above web addresses, and
must not be passed on to others in any form by any means what so ever.
This does not contradict any other statements above - ensure you have the latest.


Low cost installations can be carried out by the author; see program page for details link.
This program must be compiled by Perl versions 5+, on Unix servers with Sendmail

VARIABLESFORMSINSTALLINGUTILITIES

revised... Version 1.3, December 1999

ABOUT

v1.3 includes an additional file required by the program for administrative functions.

JumpNcount Perl CGI is one of the usefull simple scripts used in conjunction with a Drop-Down Menu form allowing you to include multiple links in one list on your web page(s) in preference to many hyperlinks. What makes JumpNcount different to most similar programs is that it logs Link Usage counts, and auto creates a log for each different form you install, with count viewing and administration pages.

All relevant files are supplied in one compressed .zip file that includes the recommended directory structure. It is assumed that the .zip file has been uncompressed to the root directory of your site pages on your computer creating the default directory structure included in the .zip file. Then you can easily FTP the configured files to your site. A free utility script is included to create the directory structure.

You MUST alter all reference to "yourdomain.name" at the top of the script, in the example forms and the webmasters page, and change the configuration variables, as described in this Readme text.

Firstly, a few explanations. JumpNcount is basically a "Go To’, ‘Jump’, or ‘URL Loader’ script (to name a few common names given this type of script), but with one very useful addition found in few others. JumpNcount keeps a record of each URL or link requested and updates the count of each; an excellent addition for tracking visitors preferences etc. The links of course can be to other pages within your site or full URLs to other sites.

Once a form is in place, JumpNcount recognises the name of the form (hidden value) and will create a new log file if necessary, or update an existing one. Should the URL or link requested also be a new one, JumpNcount will add it to the relevant file ready for further count updates. Your responsibility is to simply make sure that the URLs included in the HTML form drop down menu are correct, but incorrect or redundant links can be removed from relevant log files easily by the generated admin pages. The link counts in any of your form menu log files can be reset to zero at any time, and log files can be emptied. Admin also allows you to easily change the admin password.

Via the admin pages you can also select a count log to view the current counts for each link (JumpNcount lists all existing logs it has created).

The sample HTML forms supplied in the .zip file can be used and only require you to replace the ‘form action’ path with your own; ie replace "yourdomain.name" with your own domain name path, and change one hidden value for every different menu list you want to log. Except perhaps for the addition of colour, the form can then be copied and pasted directly into your existing pages and URL links added.

So, the script has an in-built administration page for; changing the encrypted password authorising admin changes, viewing each menu count log, resetting counts to zero, clearing a whole log, and deleting redundant logged links. Access to the Admin page is via a form (see webmasters page sample) by entering the required access password, and an encrypted password protects you from unauthorised attempts to edit defaults; should the admin page be found in your browser history cache etc.

There are no require files or other prepared files to worry about because every time you install a new drop down menu form, JumpNcount detects it and creates a new log for that particular menu. JumpNcount also auto installs to the relevant log for counting, any new URLs that you add to your menu forms. Once the script is installed, all you have to do is install the menu forms – very simple.

The cgi-bin directory and any subdirectories of it should be protected from user access by system default, so they are an ideal place for maximum security (nothing can be done if your server is hacked into). Scripts can access info files, but files cannot be accessed from outside.

Please NOTE:
If you install and use this script, please contact us at jmpcntreport@dtp-aus.com with server type details and how the script installed and worked etc, for our report base.
( a vote at cgi.resourceindex.com - via red form on the JumpNcount program page - or any other cgi links site would also be appreciated to help "spread the word" )
  Thank you.

For INTERMEDIATE installation experience - Help / Advice information is available.
The CONFIGURATION VARIABLES in DETAIL

CHECKING FOR CORRECT REFERRERS - Bad Referrer, Access Denied!
This option in the script allows you create an "array" of Domain names and IP numbers that jmpncnt.cgi will respond positively to. By including the acceptable calls to your pages and/or your IP#, ie 'www.yourdomain.com' and ‘yourdomain.com' you effectively stop improper use of your lists and admin from distant sites (entries are only accepted from your site, not remote copies of your pages elsewhere – they try all the time). The array is named "
@referers" and you simply (MUST) enter your preferences in place of the examples. NOTE: The brackets, quotes and commas enclosing each item must be included else an error will occur, ie:
('www.yourdomain.com','yourdomain.com','000.000.000.000',)
Leave out the IP# if you do not have a true domain name with a static IP#. "www.ahost.net/mysite/" etc will also work for second level site calls etc. This is a first level security feature.

This will block acces via a browsers command line AND remote copies of pages containing links to the program - EVEN YOU !!

At this point I will bring your attention to the semi colons ( ; ) appearing at the end of each variables. These MUST remain else an error will occur.

PATHS TO FILES ACCESSED BY SCRIPT
The defaults used in the script assume you will place it in your cgi-bin and add a directory to it called "hlnks". If you have to use other directory names, or your "cgi-bin" has a different name, then you will have to change the paths accordingly; "cgi-yourdomain" is not uncommon. There are three path types that can be used at various times with in a program or script.

A full URL is the same as the path you enter in your browsers address box when typing in a site path that you wish to go to: ie 'http://www.wooz.com/harry.htm'. A relative path is a path description to a source, relative to the directory of the program, file or web page that is calling it: ie "jimbo.htm" means that the file being called should be in the same directory. "inone/jimbo.htm" refers to a file that should be in a directory named 'inone' which is a subdirectory within the current directory, and "../jimbo.htm" means that the file should be in a directory one above the current directory, and "../../jimbo.htm" is in a directory two above etc.

For some servers, a simple relative path called by a script is unacceptable, so a path relative to the sites root directory must be called. There are also variations to this description but
"
web/yourdomain/yourdirectory/jimbo.htm" (example only)
is a relative root path description that works on many servers. Another root path is
"
/home/yourdomain/www/yourdirectory/jimbo.htm".
If you have trouble with accessing the default simple relative path included in the script, try the root reference ie:
"
web/yourdomain/cgi-bin/hlnks" etc.
If this is still a problem, look in any installed scripts on your server for a reference, or contact your hosting support staff.

NOTE: If you have problems, double check ALL permission's (below) before changing the default paths, unless you know in advance what the paths should be.

ADMIN Password $adminword_fle
The file path relative to the script that will be created when you create an Admin Password. DO NOT edit this file – the new password will be encrypted. When you first start the script successfully for administration from a form using the Access Password, create a new Admin password immediately to secure your data from visitors. The current password will be nothing (null) and you enter the new word twice to be sure. Once accepted you have to enter the admin password in the editing forms next to the submit buttons whenever you try to edit any options. The supplied password file includes a notice. This file should not have to be up-loaded via FTP. (if your server allows scripts to create files, jmpncnt.cgi will attempt to make this file and add the message line – only if the file is missing).

SCRIPT Path $cgi_url
When you edit the configuration values from the admin page, the script needs to embed the path to its self.

LOG DIRECTORY $f_name
The count logs are created in a directory named "hlnks". NOTE: Do not include a forward slash after this value if you do need to change it.

RETURN PAGE URL $htm_url
The value for this variable needs to be altered to include the URL path, relative or full, to any page that you wish to return to when exiting the admin pages.

COUNT LOGS FILE EXTENSION $extnsn
This value is for the file name "extension" that jmpncnt.cgi adds or looks for in count log file names. You can change this if you wish but that shouldn’t be necessary.

Admin ACCESS PASSWORD $theword
(Not the Admin password) You MUST enter an Access Password in the script before installing the program. To display the admin page, simply enter your access password into the webmasters page (or equivalent) form entry box. If you enter the password correctly, the script will recognise it and the admin page will be generated for you.


For INTERMEDIATE installation experience - Help / Advice information is available.
INSTALLING

THE PATH TO PERL
At the top of the script (and must remain as the first line) is a default path to the Perl program on your host server. This can vary slightly between UNIX servers. If you have problems running the scripts, check with your host support staff about the correct path described in this line. The default entry is "
#!/usr/bin/perl" and another common variation is "#!/usr/local/bin/perl". In Perl scripts the hash sign "#" character comments out the code on a line starting with this character. Here it has a special meaning to Perl and MUST remain. Check with other installed scripts also if you do not know what this line should look like.

SCRIPT and FILES PERMISSIONS
Each log file does not require special permissions. The directory that they are placed in will need to have read and write permissions. Either read and write chmod 766 (r+w) or possibly chmod 777 (r+w+x) will work - try the first before the latter. (makedir.cgi will attempt to create and set this directory for you)... if using 777 change the directory values first, not the files.

UP LOADING FILES (Posting)
The script must be given read and execute permissions – chmod 755 (r+x).

CGI-BIN permissions are set by the server and no attempt should be made to change them. Should you have to use another directory, AND your server allows the execution of Perl CGI scripts in other directories, then that directory should be set with read and execute permissions - chmod 755 (r+x).

By far the biggest problems faced when installing scripts are firstly the file transport encoding used and secondly the permissions settings set for both files and new directories. Bitmap images must be sent to the server using the "Binary" protocol. Text files, ie html pages, CGI SCRIPTS and require files, MUST be sent in "ASCII" format. Failure to do this will result in a server failing to recognise and execute the scripts. Although often referred to as programs, scripts must be compiled before they do anything. As an example, files with the .EXE extension on programs that are installed on Wintel machines are pre-compiled binary executable programs. Perl scripts on the other hand are compiled in memory by Perl each time they are called before they can be executed. The script (text) must be in ASCII text format for the interpreter to be able to read it.

I REPEAT: Up load scripts and text as "ASCII" files, images as "Binary".


THE FORM

The sample forms require changes to the "action" attribute that needs to be set to the script path on your site. Also, each different form should be given a different name, or the one form (and one name) can be used on many pages. It would be best to identify each form with the page that form is on, but do not use names any longer than 12 characters, AND use only alphanumeric characters (no spaces etc for Unix). Remember that these names are converted to File Names.

The hidden input containing the form name value is named "nme"

This form is supplied as a sample in the .zip file. Remember: The drop down menu name, "url", must remain unaltered. There are three "sample only" option values and list texts included. These must of course be deleted, but you can see where the actual URL must be included, and where to place the descriptive text that will be seen in the list (this is how any "jump" or "go to" menu list would be set up). You add as many ‘option’s as you need for each list. NOTE: Local relative paths must be relative to the cgi-bin.

<form method="POST" action="http://yourdomain.name/cgi-bin/jmpncnt.cgi">
  <input type="hidden" name="nme" value="Page3">
     <select name="url" size="1">
     <option value="http://www.ghi.jkl/">Bloggs Software</option>
     <option value="../stensls.htm">Free Stencils and stuff</option>
     <option value="http://www.abc.def/wiz/wooz.htm">Joes Diner</option>
  </select>
  <input type="submit" value="Go To" name="send">
</form>

There are prepared HTML versions of this form in the .zip file (form(#).htm). One describes the use of a bitmap in place of the standard grey submit button.


So, assuming the default directory structure is used, you will up load into:

Directory:
cgi-bin (server)
jmpncnt.cgi. (chmod 755)
cgi-bin/hlnks (chmod 766 or 777)
admins.pl, jcnt.pw (chmod 766 or 777)


UTILITIES

Webmasters page
There is a webmasters "utility access" HTML page in the .zip file (webmster.html). If you do not have a similar page, I suggest you use this one and place it in a password protected directory. Once you change the action value to the script (the ‘action’ path of the form), it will allow you to enter the access password and open the Admin Page when ever you need to. There is a hidden value in this form also. You could also add other utility links to this page.

If you add it to an open directory, at least make sure you have a server default page (ie a dummy index.htm or default.htm etc) in the same directory, AND do not link it to or from any other page (else search engine robots will find it). If found by a clever visitor, they might get into your admin page, but remember you can also apply an encrypted password to protect the program from any unauthorised editing; and your "hlnks" directory SHOULD also be protected ie ‘cgi-bin/hlnks’. (You have a very unsafe site if the cgi-bin and its sub directories can be accessed from your browser)

Referrer checking will block acces via a browsers command line AND remote copies of pages containing links to the program - EVEN YOU !! Access ONLY via an ON-SITE link.

UTILITY testbin.cgi
I have created a simple utility script that can be placed in your cgi-bin and run from your browsers command line. This script will, in almost all cases, detect the Perl version you are using and report its findings. If it reports version 4 as the only default, then you must ask your Host Service for the correct path to Perl 5 (Always top and FIRST line in all scripts). JumpNcount is a Perl 5 script, for Unix servers using Sendmail.

The latest version of tesbin.cgi attempts to ascertain server paths to all Perl versions and paths to Sendmail. Either or both of these may not be listed depending on server set-up. Testbin.cgi also now allows you to check your path to perl by attempting a mail out. To do this change in the code near the top the full URL to the testbin.cgi program.

So!
Change the program URL in the code - only variable to change.
Place "testbin.cgi" in your cgi-bin directory and chmod 755 (7=r+w+x, 5=r+x).
Then run from a browser command line, ie http://www.yourdomain.path/cgi-bin/testbin.cgi

UTILITY makedir.cgi
I have created a simple utility script that can be placed in your cgi-bin and run from your browsers command line. If your server allows directory creation via cgi scripts, then this utility will attempt to create the default (recommended) directories and file names for you, and set the permissions. It is unprotected and there is no guarantee that it will work; try it at your own risk (disclaimer only). It has worked well on many sites.

Try installing and running this script first. It will report success or failure when creating the files/directories and prove the correctness of your Perl Path", plus indicate that the default relative paths will work OK. If the default urls/paths are not used, then you will have to change them first.

To use it, make sure the "Perl Path" at the top of the script is correct. NOTE: the default Dir/File permissions are set to 766. Change these values to 777 if your site so requires BEFORE running the script. If running the script is successful, you only have to FTP your supplied files over the new empty ones. (note: for security reasons, makedir does NOT prepare an empty file for cgi scripts, you must upload them (as ascii) and set chmod 755 your self)

Once run, delete the file immediately because it has no input protection and could be run again by some low-life wanting to cause mischief. NOTE: If you find yourself locked out of access to new directories, simply change the dir chmod values to 777 and re-run; that should fix it.

So!
Place "makedir.cgi" in your cgi-bin directory and chmod 755 (7=r+w+x, 5=r+x). Then run from a browser command line, ie: http://www.yourdomain.path/cgi-bin/makedir.cgi

Enjoy - & please let me know how you get on with this script, how/what server type it installed to.
      Ron