#!/usr/local/bin/perl ############################################################################################ # SalesDoubler Version 1.3 COPYRIGHT ©1999, Commercial Networks Inc., CommercialNetworks.com ############################################################################################ # Do not remove. # This script is part of SalesDoubler set of scripts. # For more info about SalesDoubler send email to: info@commercialnetworks.com # This script is licenced to be used on kloakit.com server only. # Permission to modify this script is granted only on kloakit.com server. # Any other distribution or use of this script will be considered as a # copyright infringement. require 'cgi-lib.sol'; require 'cgi-lib.pl'; require 'setup.pl'; &ReadParse(*input); $! = 1; print "Content-type: image/gif\n\n"; #print &PrintHeader; #--------------------------------------------------------------------------- #this is adding to particular user database open(FILE,"$data_path/Users/$input{dealer}".".dat") || &CgiDie("Can't open 3"); while() { @data = split(/\|/,"$_"); } close(FILE); $data[0] = $data[0]+1; &GetFileLock("$data_path/Locks/lock.file"); $output = join("|",@data); open(FILE,">$data_path/Users/$input{dealer}".".dat") || &CgiDie("Can't write 1"); print FILE "$output"; close(FILE); #--------------------------------------------------------------------------- #this is adding to administrator's database @data = ""; $output = ""; open(FILE,"$data_path/stats.dat") || &CgiDie("Can't open 3"); while() { @data = split(/\|/,"$_"); } close(FILE); $data[0] = $data[0]+1; $output = join("|",@data); open(FILE,">$data_path/stats.dat") || &CgiDie("Can't write 3"); print FILE "$output"; close(FILE); &ReleaseFileLock("$data_path/Locks/lock.file"); #--------------------------------------------------------------------------- if($input{image} eq "") { $num =0; open(FILE,"$home/banners.fil"); while($_=) { chop; push(@line,$_); $num++; } close(FILE); srand; $index = int(rand($num)); ($file,$color) = split(/ /,$line[$index]); } else { $file = $input{image}; $color = 'FFFFFF'; } open(GIF,"$html_path/Images/$file.gif"); while($_ = ) { print; } close(GIF); 1;