Advertisement
| null |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: |
#!perl/bin
use CGI::Carp qw(fatalsToBrowser);
# simple CGI script email form data
use CGI;
use CGI qw(param);
my $query = new CGI;
@months = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
@weekDays = qw(Sun Mon Tue Wed Thu Fri Sat Sun);
($second, $minute, $hour, $dayOfMonth, $month, $yearOffset, $dayOfWeek, $dayOfYear, $daylightSavings) = localtime();
$year = 1900 + $yearOffset;
$theTime = "$hour:$minute:$second, $weekDays[$dayOfWeek] $months[$month] $dayOfMonth, $year";
@names = $query->param;
open F, ">data/leave/leavereq $hour$minute $second $months[$month]-$dayOfMonth-$year.txt";
print F "\n", $_, $query->param ($_) foreach $query->param;
close F;
## Create a new CGI object
$query=new CGI;
@super_ids=(
'someone@domain.com',
'another@domain.com'
);
foreach ($query->param){
$$_=$query->param($_);
}
# path to sendmail program, if it's in the cgi-bin directory then no path is needed
# if you use a full path, then use back slashes and single quotes, e.g 'c:\path\to\sendmail'
my $mailprog = 'c:\usr\lib\sendmail';
$| = 1;
open(MAIL, "| $mailprog -t ");
print MAIL "To: $from,$super_ids[$to]\n";
print MAIL "From: $from\n";
print MAIL "Subject: Requestfor leave\n";
print MAIL "Content-type: text/html\n";
print MAIL "\n";
print MAIL "
<html>
$forminfo
</HTML>\n";
close(MAIL);
## Print the MIME type
print "Content-type: text/html\n\n";
print "<BODY BGCOLOR=#f5f5f5><div align=center><table border=0 width=200 height=100% cellspacing=0 cellpadding=0><td width=100% valign=middle align=center><h3>Your Request for Leave has been sent to $super_ids[$to] and $from</h3></td></table></div>\n";
|
|
[x]
The Solution Rating System
|
||
|
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
|
Loading Advertisement... |