Changeset 11891


Ignore:
Timestamp:
2006-05-30T16:47:04+12:00 (18 years ago)
Author:
mdewsnip
Message:

Now shows the construction date of the places on the architect pages.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cic-hcap/perllib/plugins/CICPlug.pm

    r11887 r11891  
    638638    $place_images_sql_handle->{LongReadLen} = 65536;
    639639
     640    # Prepare SQL statement for getting the Place "date of construction"
     641    my $place_construction_date_sql_statement = "SELECT Date FROM tblConstruction_and_Dates WHERE Entry_ID=?";
     642    my $place_construction_date_sql_handle = $dbh->prepare($place_construction_date_sql_statement);
     643
    640644    # Get a list of all the designers, and the places they worked on
    641645    my %designer_name_to_place_ids_mapping;
     
    671675    my $designer_places_image_html = "";
    672676    foreach my $designer_place_id (@{$designer_name_to_place_ids_mapping{$designer_name}}) {
     677        # Get place date of construction
     678        $place_construction_date_sql_handle->execute($designer_place_id) or die "Could not execute SQL statement.";
     679        my $designer_place_construction_date_value = $place_construction_date_sql_handle->fetchrow() || "";
     680
    673681        # Get the first image for this place
    674682        $place_images_sql_handle->execute($designer_place_id) or die "Could not execute SQL statement.";
     
    682690        $designer_place_image_small_file_name =~ s/ /%20/g;
    683691        my $designer_place_image_small_file_link = "_httpcollection_/index/assoc/[assocfilepath]/$designer_place_image_small_file_name";
    684         $designer_places_image_html .= "<tr><td valign=\"top\"><a href=\"_gwcgi_?a=d&d=p$designer_place_id\"><img src=\"$designer_place_image_small_file_link\"/></a></td><td valign=\"top\"><a href=\"_gwcgi_?a=d&d=p$designer_place_id\"><span class=\"cictext\">$designer_place_image_name</span></a></td></tr>\n";
     692        $designer_places_image_html .= "<tr><td valign=\"top\"><a href=\"_gwcgi_?a=d&d=p$designer_place_id\"><img src=\"$designer_place_image_small_file_link\"/></a></td><td valign=\"top\"><a href=\"_gwcgi_?a=d&d=p$designer_place_id\"><span class=\"cictext\">$designer_place_image_name</span></a><br /><b>Date of construction:</b> $designer_place_construction_date_value</td></tr>\n";
    685693        }
    686694    }
Note: See TracChangeset for help on using the changeset viewer.