I am using the "old" upload mod and it is working fine - however, I am trying to get DBMan to send the admin an email whenever someone uploads a file - I know the code goes in the Upload_Success in the html.pl - however, I want the email to give the userID when a file is uploaded.
Here is what I have - but the userID does not print out in the email.
# ---------------------------------------------------
&html_print_headers;
print qq|
<html>
<head>
<title>$html_title: Upload Success</title>
</head>
<body background="http://melhialu.hostme.com/images/bg.gif" LINK="#008000" VLINK="#008000">
<center>
<table border=1 bgcolor="#FFFFFF" cellpadding=5 cellspacing=3 width=590 align=center valign=top>
<tr>
<td colspan="2" bgcolor="#008000">
<FONT FACE="MS Sans Serif, arial,helvetica" size=1 COLOR="#FFFFFF">
<b>$html_title: Upload Success</b>
</font>
</td>
</tr>
<tr>
<td>
<p><center><$font_title><b>Upload Success</b></font></center><br>
<P><Font face="Verdana, Arial, Helvetica" Size=2>Your file was successfully uploaded:</FONT>
|;
&html_record_long(&get_record($in{$db_key}));
print qq|</font></p></td></tr></table>|;
&html_footer;
print qq|</td></tr></table></center></body></html>|;
open (MAIL, "|$mail_prog -t");
print MAIL "To: support\@cocoahighalumni.com\n";
print MAIL "Reply-to: support\@cocoahighalumni.com\n";
print MAIL "From:$in{'UserID'}\n";
print MAIL "Subject: Picture Uploaded !\n";
print MAIL "\n\n";
print MAIL "The Following User: $in{'UserID'} has uploaded a picture. \n" ;
print MAIL "in the MHS ALUMNI database. \n" ;
print MAIL "\n\n";close (MAIL);
}
Thanks!
----------------------------
donm
Here is what I have - but the userID does not print out in the email.
Code:
sub html_upload_success { # ---------------------------------------------------
&html_print_headers;
print qq|
<html>
<head>
<title>$html_title: Upload Success</title>
</head>
<body background="http://melhialu.hostme.com/images/bg.gif" LINK="#008000" VLINK="#008000">
<center>
<table border=1 bgcolor="#FFFFFF" cellpadding=5 cellspacing=3 width=590 align=center valign=top>
<tr>
<td colspan="2" bgcolor="#008000">
<FONT FACE="MS Sans Serif, arial,helvetica" size=1 COLOR="#FFFFFF">
<b>$html_title: Upload Success</b>
</font>
</td>
</tr>
<tr>
<td>
<p><center><$font_title><b>Upload Success</b></font></center><br>
<P><Font face="Verdana, Arial, Helvetica" Size=2>Your file was successfully uploaded:</FONT>
|;
&html_record_long(&get_record($in{$db_key}));
print qq|</font></p></td></tr></table>|;
&html_footer;
print qq|</td></tr></table></center></body></html>|;
open (MAIL, "|$mail_prog -t");
print MAIL "To: support\@cocoahighalumni.com\n";
print MAIL "Reply-to: support\@cocoahighalumni.com\n";
print MAIL "From:$in{'UserID'}\n";
print MAIL "Subject: Picture Uploaded !\n";
print MAIL "\n\n";
print MAIL "The Following User: $in{'UserID'} has uploaded a picture. \n" ;
print MAIL "in the MHS ALUMNI database. \n" ;
print MAIL "\n\n";close (MAIL);
}
Thanks!
----------------------------
donm