#!/usr/bin/perl ######################################################################### # # # ClickBank Member Order # # # # Version 1.0 Last Update: Feb. 17, 2003 # # # ######################################################################### # # # Copyright (c) 2003 Internet Express Products # # All Rights Reserved. # # # # This software is the confidential and proprietary information of # # Internet Express Products. You shall not disclose such Confidential # # Information and shall use it only in accordance with the terms of # # the license agreement you entered into with Internet Express # # Products. # # # # Internet Express Products MAKES NO REPRESENTATIONS OR WARRANTIES # # ABOUT # THE SUITABILITY OF THE SOFTWARE, EITHER EXPRESSED OR # # IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF # # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR # # NON-INFRINGEMENT. # # # # INTERNET EXPRESS PRODUCTS SHALL NOT BE LIABLE FOR ANY DAMAGES # # SUFFERED BY LICENSEE AS A RESULT OF USE. # # # # DISTRIBUTION OF THIS SOFTWARE OR ITS DERIVATIVES IS STRICTLY # # PROHIBITED # # # # Larry Wagar # # http://expressproducts.net # # webmaster@expressproducts.net # # # ######################################################################### use CGI::Carp qw/fatalsToBrowser/; ############################################################################ # Configuration Settings ############################################################################ # Full URL to your members area. # This is used on the final confirmation page to give then a link # to your members area. $members_url = "http://www.allanimedownloads.com/members/index.html"; # This is the Unix path to your .htpasswd file. # This should match the location of were you set up the .htaccess file to use. $passwordfile = "./members/.htpasswd"; # Admin email so that they can email you if there is a problem. $admin = 'http://www.allanimedownloads.com/contact.php'; # Your ClickBank account name. $account = "allanime"; # Your ClickBank product number. $product_id = "1"; # Your product description. $product_desc = "Anime Gold Membership [Sales Price]"; # This should match the secret key that you set up # in your ClickBank Account $secret_key = "TOPO198"; # This is the path to the template file that the script uses # for the page design. This is a standard Dreamweaver template file # if you are a Dreamweaver users or you can just edit the html, but # do not remove this line from the page: # {DATA} # This is where the information from this script will be printed. $template = "./template.html"; ############################################################################ # End Configuration Settings ############################################################################ $product_desc =~ s/ /_/g; %form_data = &get_data(); if ($form_data{'username'} ne "") { $username = $form_data{'username'}; #check if username already exists $found = 0; open (PASS, "$passwordfile"); while () { @data = split(/\:/, $_); if ($username eq $data[0]) { $found = 1; } } close (PASS); if ($found eq "0") { $buy_url = "http://www.clickbank.net/sell.cgi?link=$account/$product_id/$product_desc&user=$username"; print "Location: $buy_url\n\n"; } else { $message = "That username is already taken!"; &orderform; } } elsif ($form_data{'cbreceipt'} ne "") { print "Content-Type: text/html\n\n"; $valid = &cbValid; if ($valid eq "1") { # Only add if the name is not already in the file $found = 0; open (PASS, "$passwordfile"); while () { @data = split(/\:/, $_); if ($form_data{'user'} eq $data[0]) { $found = 1; } } if ($found eq "1") { &header; print qq~

There appears to be a problem adding your to the password file!

"That username is now taken"

Please use our Contact Form to send us your receipt #$form_data{'cbreceipt'} and we will email you back with a username and password.

Thank you...

~; &footer; } else { $password = crypt($form_data{'cbreceipt'}, "YL"); open (PASSFILE, ">>$passwordfile"); print PASSFILE "$form_data{'user'}\:"; print PASSFILE "$password\n"; close(PASSFILE); &header; print qq~

Here are your login details:
Username: $form_data{'user'}
Password: $form_data{'cbreceipt'}

We do not provide replacements if you lose your login informations. Please be careful.

Login to MEMBERS AREA!

Credit Card will be billed by "CLICKBANK / KEYNETICS".

~; &footer; } } else { &header; print qq~

There appears to be a problem with your order!

Please use our Contact Us form if you need help.

Thank you...

~; &footer; } } else { &orderform; } ############################################################ # Order Form ############################################################ sub orderform { print "Content-Type: text/html\n\n"; &header; print qq~

$message

Enter Desired Username:

~; &footer; } ######################################################################### # Header ######################################################################### sub header { open (TEMPLATE, "$template") || print "Cant open $template"; while (