Can anyone answer this for me please? I am assuming that I can put something in this code thats in the html_record_form sub?? since the add_failure sub only refers to the html_record_form sub anyway. But Im not positive on that or where or what to put. Can anyone help? TIA!
Code:
if ($form_upload_mod) {
if (-e "$SAVE_DIRECTORY/$rec{$db_key}") {
@files = &_readdir($rec{$db_key});
@photo = qw ();
foreach $file (@files) {
next if ($file =~ /^\./); # Skip "." and ".." entries..
next if ($file =~ /^index/); # Skip index.htm type files..
push (@photo, $file);
++$num_files;
@stats = stat "$SAVE_DIRECTORY/$rec{$db_key}/$file";
$prev_bytes +=$stats[7];
}
foreach $file (@files) {
next if ($file =~ /^\./); # Skip "." and ".." entries..
next if ($file =~ /^index/); # Skip index.htm type files..
print qq|<tr><td><$font>Delete file
<input type="checkbox" name="$file" value="delete"></td>
<td><img src="$SAVE_DIRECTORY_URL/$rec{$db_key}/$file"></td></tr>|;
}
}
$new_files=$MAXIMUM_FILES - $num_files;
$new_bytes=$MAXIMUM_UPLOAD - $prev_bytes;
for ($u=1;$u<=$new_files ;++$u) {
print qq|<TR><TD colspan=2><$font>You currently have $num_files files associated with this record, for a total of $prev_bytes bytes. You may upload up to $new_files additional files, with a total byte size of $new_bytes bytes.</font></TD></TR>
<TR><TD><$font>Photo:</font></TD><TD><INPUT TYPE="FILE" name="file-to-upload-$u" SIZE="30"></TD></TR> |;
}