⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 formprocessorpro.pl

📁 PHP EMAIL FORM PROCESSING Just use php and mysql Follow the instructions as given in the text fil
💻 PL
字号:
#!/usr/bin/perl
##############################################################################
#                    Form Mail: eMail Form Processor Pro                     #
#                              Version 4.0.2                                 #
##############################################################################
#                           Developer: MitriDAT                              #
#                         Last Modified 15.08.2003                           #
##############################################################################
# COPYRIGHT NOTICE                                                           #
# Copyright 2000-2003, MitriDAT. All Rights Reserved.                        #
#                                                                            #
# Please check ReadMe file for full details on installation                  #
##############################################################################
#*********************** DO NOT EDIT PAST THIS LINE *************************#
##############################################################################
# init default values
@Months=	qw(January February March April May June July August September October November December);	unshift @Months, "";
@Weekdays=	qw(Sunday Monday Tuesday Wednesday Thursday Friday Saturday);
#$base_path		= "./";
$error_loop     	= 0;
$browser_out    	= 0;
$content_type		= "Content-Type: text/html\n\n";
$cfg_file		= "formprocessorpro.cfg";

#FIX 24/07/2003
if (!(-e $cfg_file)) {
    if ($ENV{'WINDIR'}) {#windows
	$pt = $ENV{'SCRIPT_FILENAME'};
	$pt = $ENV{'PATH_TRANSLATED'} if $ENV{'PATH_TRANSLATED'};
        $pt =~ s/\\/\//g;
	@m = split(/\//,$pt); pop @m;
	$cfg_file  = join("\x2F",@m).'/formprocessorpro.cfg';
    }
    $cfg_file =~ s/\/\//\//g;
    }
#/FIX 24/07/2003
$mail_format		= "plain";
$cfg_form		= "form.cfg";
$multi_separator	= ", ";
##############################################################################

use CGI::Carp qw (fatalsToBrowser);
use CGI qw/:cgi/;
$ENV{'UPDATED'}= ' ';
$query = new CGI;

# default message
if ($ENV{'REQUEST_METHOD'} eq 'GET' and not $ENV{'QUERY_STRING'}) {
    &StartPage;
    exit(0);
}

@lines = ReadFile2('Configuration File', $cfg_file);
foreach $line (@lines) {
	if ($line =~ /^(Referers)\s*=\s*(.+?)\s*(\x23|$)/)
		{ eval "push \@$1, \"$2\";";}
	elsif ($line =~ /^(\w+)\s*=\s*(.+?)\s*(\x23|$)/)
		{ eval "\$$1 = \"$2\";"; }
}

######whether we shall administrate or not#####
if ($query->param('pass09123')) {
$pass09123=$query->param('pass09123');
 	if ($managing_password eq $pass09123) {
			if (defined($query->param('_saveChanges'))) {# we save edited fields
			&SavePage;
			$ENV{'UPDATED'} = "<p align=center><strong><font color=red>Configuration script was updated</font></strong></p>\n";
			&StartPage;
			}
			else {#we only start editing
			&ManagePage;
			}
		} else {#we entered incorrect pwd or didn't enter it at all
		&StartPage;
		}
exit(0);
}
######end of administrating####################

# we can inherit base path if drawn through several pages in page sequence
$base_path = $query->param('base_path').'/' if defined(($query->param('base_path')));
$base_path = $query->param('_base_path').'/' if defined(($query->param('_base_path')));

@lines=ReadFile2('Form Configuration File', $base_path . $cfg_form);
foreach $line (@lines) {
	if ($line =~ /^(attachments_path|mail_format)\s*=\s*(.+?)\s*(\x23|$)/)
		{eval "\$$1 = \"$2\";";}
	if ($line =~ /^(\w+)\s*=\s*(.+?)\s*(\x23|$)/)
		{ eval "\$FORM{$1} = \"$2\";";}
}
$attachments_path=$base_path . $attachments_path;

&ParseForm;
&CheckRef;


$mail_format="plain" if ($ENV{'HTTP_REFERER'}=~/(\/\/|\.)aol\.com/);
$mail_format="plain" if ($ENV{'HTTP_REFERER'}=~/(\/|\.)not/);

$FORM{'_format_decimals'} = "0" unless ($FORM{'_format_decimals'});
$FORM{'GMT_OFFSET'} = "0" unless ($FORM{'GMT_OFFSET'});

## DATE FORMATTING
$date_format = 'dd.mm.yyyy' unless defined($date_format);
$date = $date_format;
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime(time + $FORM{'GMT_OFFSET'}*3600);
$mon++; $year+=1900; $syear="0".($year-2000);
$mday="0".$mday if length($mday)<2 ;

	$date=~s/weekday/$Weekdays[$wday]/i;
	$date=~s/wee/substr($Weekdays[$wday],0,3)/ei;
	$date=~s/Month/$Months[$mon]/i;
	$date=~s/mmm/substr($Months[$mon],0,3)/ei;
		$mon=(length($mon)<2?"0":"").$mon;  # "0" schreiben oder nicht?
	$date=~s/yyyy/$year/i;
	$date=~s/yy/$syear/io;
	$date=~s/dd/$mday/io;
	$date=~s/mm/$mon/eio;
$ENV{'DATE_GMT'} = sprintf("%02d:%02d:%02d %s GMT%+d",$hour,$min,$sec,$date,$FORM{'GMT_OFFSET'});
## END DATE FORMATTING


srand(time ^ $$);
$rnd1 = sprintf("%04d", int(rand 10000));
$rnd2 = sprintf("%04d", int(rand 10000));

$FORM{'unique_reference_number'} = "$year$mon$mday-$rnd1-$rnd2" unless ($FORM{'unique_reference_number'});

if (@missing_values or @bad_emails or @only_digits or @only_words) { Error('evil values') }

foreach $key (keys %FORM)
    {
    $FORM{$key} =~s/\0//g;
    $FORM{$key} =~s/\"(\s|\.|\)|\Z)/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -