When I do a view of my database records, if there is more than 1 page of records to be displayed, the records that used the default graphic (i.e., did not upload a graphic during the add process) do not show up with their default graphic.
If I have only 1 page of records to display, it works fine.
The only place I print the graphics is in HTML_RECORD_FORM:
print qq|
<TABLE WIDTH="475" CELLPADDING=0 CELLSPACING=0 BORDER=1 BGCOLOR="#99ccff">
<TR> <TD Align="RIGHT" VALIGN="TOP" WIDTH="150">
|;
opendir (GRAPHIC, "$SAVE_DIRECTORY") or &cgierr("unable to open directory in delete records: $SAVE_DIRECTORY. Reason: $!");
@files = readdir(GRAPHIC);
closedir (GRAPHIC);
$file_test = $rec{$db_key} . ".";
foreach $file (@files) {
if ($file =~ /^$file_test/) {
print qq|
<img src="$SAVE_DIRECTORY_URL/$file" width=150 height=100>|;
$graphic_found=1;
}
}
unless ($graphic_found) {
print qq|
<img src="http://server.walkermls.info/uploads/nophoto.jpg" width=150 height=100>|;
}
Do I need to put this code somewhere else too for multiple page displays?
If I have only 1 page of records to display, it works fine.
The only place I print the graphics is in HTML_RECORD_FORM:
print qq|
<TABLE WIDTH="475" CELLPADDING=0 CELLSPACING=0 BORDER=1 BGCOLOR="#99ccff">
<TR> <TD Align="RIGHT" VALIGN="TOP" WIDTH="150">
|;
opendir (GRAPHIC, "$SAVE_DIRECTORY") or &cgierr("unable to open directory in delete records: $SAVE_DIRECTORY. Reason: $!");
@files = readdir(GRAPHIC);
closedir (GRAPHIC);
$file_test = $rec{$db_key} . ".";
foreach $file (@files) {
if ($file =~ /^$file_test/) {
print qq|
<img src="$SAVE_DIRECTORY_URL/$file" width=150 height=100>|;
$graphic_found=1;
}
}
unless ($graphic_found) {
print qq|
<img src="http://server.walkermls.info/uploads/nophoto.jpg" width=150 height=100>|;
}
Do I need to put this code somewhere else too for multiple page displays?