Download Perl Scripts

Petition 50108Petition - $1.50 Version 50108
Add to Cart



back
download
support
demo/see it work
buy
RSS Feed
_______________________________________

Petition Script by Intelliscript.net
(c) 2001-2003 CrookedBush.com Inc.

_______________________________________
Thanks for Registering!

The Petition script allows you to accept virtual signatures
online. Users use Java to digitally sign an e-petition.

Report any bugs to jasonsilver@crookedbush.com.

Yours,
Jason Silver

_______________________________________
Overview:
--------

How It Works:


Users visit your page, and read the petition. If they choose to sign it, they may use
their mouse as a pen, and sign a Java applet. They can also be required to include
their contact information.

Later when you wish to view the petition, you go to another page. You may print this
page by choosing 'print' on your browser.

_______________________________________
Installation Overview:
-----------------------
NOTE: If you are updating your script, simply replace the new script(s),
but DO NOT replace the signature_data.cgi file. Doing so will
erase your existing signatures.

1. Setting some options at the beginning of the signature.pl file
2. Setting some options at the beginning of the view_petition.pl file
3. Modifying the petition.htm file to reflect your own petition.
4. Using FTP to upload the files
5. Setting permissions on the files
6. Testing the script by submitting and viewing your own signature
_______________________________________
Here's How!
-----------

1. Using a text editor like textpad, or notepad, open the signature.pl script
Change the path to perl so that it's configured for your server.
It's usually:
#!/usr/local/bin/perl
or
#!/usr/bin/perl

Change the variables to reflect your server's settings as well. If you don't
know these, contact the administrator of your server, or pay me to do a
installation.

$datapath = '/home/sites/site27/web/test_area/petition'; # path to script. No trailing slash
$datafilename = 'signature_data.cgi'; # database text file where signatures are saved. CHMOD it 777
$emailprog = '/var/qmail/bin/qmail-inject';
$admin_email = 'your@email.ca';
$url_to_petition_script = 'http://www.yoursite.ca/cgi-bin/view_petition.pl';

2. Using a text editor like textpad, or notepad, open the view_petition.pl script
Change the path to perl so that it's configured for your server.
It's usually:
#!/usr/local/bin/perl
or
#!/usr/bin/perl

Change the variables below to suit your server. If you are unsure, contact your server's
administrator, or pay me to install it for you.

$datapath = '/home/sites/site27/web/test_area/petition'; # no trailing slash
$datafilename = 'signature_data.cgi'; # database text file where signatures are saved. CHMOD it 777
$url_to_applet = "http://yoursite.com/petition/"; # URL only to directory applet is located in
$sigs_per_page = 10; # even number
$password = "password"; # to show full information, include ?pass=(yourpass) in the address bar. eg: http://www.yoursite.com/petition/view_petition.pl?pass=password

3. Using a text editor like textpad or notepad, open the petition.htm file.
Set up the petition to appear however you want. Be sure to include the form information.
It should look similar to the following, but you will want to change the provinces to reflect
your own country.

IMPORTANT: change action="signature.pl" to reflect the full URL to your signature.pl file.
eg: action="http://www.yourserver.com/cgi-bin/signature.pl"

<form method="POST" action="signature.pl" onSubmit="if (sign) {signature.value=sign.signature();}">
<input type="hidden" name="signature" value><div align="left"><p><font face="Arial"
size="3">Signature:</font></p>
</div><p>
<applet width="250" height="65" code="sign.class" name=sign align="center">
<param name="signature" value="">You need to enable Java to view this signature applet, or download an
up-to-date browser.
</applet>
<font face="Tahoma" size="1"><br>(Please try to make your signature as authentic as possible).</font>
<input type="button" value="Clear" onclick="if (sign) { sign.clear();}"> </p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td><font face="Tahoma, Arial" size="2">Name</font></td>
<td><input type="text" name="name" size="20"></td>
</tr>
<tr>
<td><font face="Tahoma, Arial" size="2">Street</font></td>
<td><input type="text" name="street" size="20"></td>
</tr>
<tr>
<td><font face="Tahoma, Arial" size="2">City</font></td>
<td><input type="text" name="city" size="20"></td>
</tr>
<tr>
<td><font face="Tahoma, Arial" size="2">Province</font></td>
<td><select name="province" size="1">
<option value="AB">Alberta</option>
<option value="BC">British Columbia</option>
<option value="MB">Manitoba</option>
<option value="NB">New Brunswick</option>
<option value="NF">Newfoundland</option>
<option value="NS">Nova Scotia</option>
<option value="ON">Ontario</option>
<option value="PEI">Prince Edward Island</option>
<option value="QB">Quebec</option>
<option value="SK">Saskatchewan</option>
<option value="YK">Yukon</option>
<option value="NT">Northwest Territories</option>
</select></td>
</tr>
<tr>
<td><font face="Tahoma, Arial" size="2">Postal Code</font></td>
<td><input type="text" name="postal_code" size="20"></td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="Submit"></td>
</tr>
</table>
</form>


4. Use an FTP program like WS_FTP or CuteFTP (just some examples I'm aware of) and
create a directory outside of the cgi-bin called petition. Upload the following
files to this directory:
icon_petition.jpg
petition.htm
scanvas.class
sign.class

5. Now upload the following files to your cgi-bin:
signature.pl
view_petition.pl
signature_data.cgi

Set permissions (CHMOD) on the two .pl files so they are executable. (755).
The owner should be able read, write, and execute.
The group should be able to read, and execute.
Also, other should be able to read, and execute.
Set the permissions (CHMOD) on the signature_data.cgi file to 777.
The owner should be able read, write, and execute.
The group should be able to read, write and execute.
Also, other should be able to read, write, and execute.

NOW, TO TEST:

7. From a browser, open the page petition.htm and sign it.

8. Now from a browser open the page view_petition.pl and see if it displays
the signatures.

TROUBLE?

Check the FAQ's at http://www.intelliscript.net/

_______________________________________
www.Intelliscript.net
Copyright 2003 CrookedBush.com Inc.


 
top next download faq demo/see it work purchase xml pad file RSS Syndication OPML List - All Programs



[admin]

FileCABINET Script - Create a File Download section on your site.

In the Spotlight

Shopping Cart $0.00
Add to Cart
 If your products are saved in spreadsheet format, just export them as delimited files and your shopping cart is ready. A simple text file database serves this shopping cart.
[more & download links]

What People Say

FantasyBetting $4.99
Add to Cart After testing several scripts, some of which were very expensive and others free, I must commend Fantasy Betting. I would not be surprise if more free sports betting or sports content related websites change to this script. I say that for anyone with a sports website, fantasy betting script is a must have.
James Eddisson
FreeBetWorld.net
[more & download links]

Post Page Comment