コード例 #1
0
 $data_results1 = $result1->fetchAll(PDO::FETCH_ASSOC);
 $num_rows1 = count($data_results1);
 /* Debugging info */
 if ($debugging !== false) {
     echo "<p class='debugging'>\n";
     echo "num_rows1: {$num_rows1}<br />\n";
     echo "str_url_vars: {$str_url_vars}<br />\n";
     echo "</p>\n";
 }
 echo "<table width='100%' border='0' cellpadding='2' cellspacing='0' style='font-family: Arial,Helvetica,sans-serif;font-size: 14px;color: #000;'>\n";
 if ($num_rows1 > 0) {
     echo "<tr><td colspan='4' align='center' style='background-color: #FFF;font-size: 16px;font-weight: bold;'>Residential</td></tr>\n";
 }
 foreach ($data_results1 as $row1) {
     // Initial photo check
     photoCheck($abs_photos, $row1[$db_mls_id]);
     echo "<tr style='background-color: #999'>\n";
     echo " <td valign='top'><strong>MLS# " . $row1[$db_mls_id] . "</strong></td>\n";
     echo " <td colspan='2' valign='top' align='center'><strong>" . $row1[$db_city] . "</strong></td>\n";
     echo " <td valign='top' align='right'><strong>\$" . number_format($row1[$db_price]) . "</strong></td>\n";
     echo "</tr>\n";
     echo "<tr style='background-color: #CCC'>\n";
     echo " <td align='center' valign='middle'><a href='" . $http_home . "details_residential.php?mls_id=" . $row1[$db_mls_id] . "&{$str_url_vars}' target='_blank'>";
     // Display thumbnail photo
     echo thumbnailPhoto($abs_photos, $row1[$db_mls_id]);
     echo " </a></td>\n";
     echo " <td valign='top'><strong>Subdivision:</strong> " . $row1[$db_subdivision] . "<br /><strong>Bedrooms:</strong> " . $row1[$db_bedrooms] . "<br /><strong>Baths:</strong> " . $row1[$db_baths] . "</td>\n";
     echo " <td valign='top'><strong>Total SqFt:</strong> " . $row1[$db_total_sqft] . "<br /><strong>Year Built:</strong> " . $row1[$db_year_built] . "<br /><strong>Pool:</strong> " . $row1[$db_pool_yn] . "</td>\n";
     echo " <td valign='top'><a href='" . $http_home . "details_residential.php?mls_id=" . $row1[$db_mls_id] . "&{$str_url_vars}' target='_blank' style='font-weight: bold;text-decoration: none;'><img src='" . $http_imgs . "details.gif' border='0' alt='Click for more details' title='Click for more details' />More Details</a><br />\n";
     if (!empty($row1[$db_virtual_tour_url])) {
         echo "  <img src='" . $http_imgs . "vir_tour.gif' border='0' alt='Virtual Tour icon' />Virtual Tour available\n";
コード例 #2
0
$output .= "    <p style='font-size: 16px;font-weight: bold; text-align: center'><span style='font-size: 14px;'>Offered at</span><br />\$" . number_format($data_listing[$db_price]) . "</p>\n";
if (!empty($data_listing[$db_virtual_tour_url])) {
    if (substr($data_listing[$db_virtual_tour_url], 0, 7) != "http://") {
        $virt_url = "http://" . $data_listing[$db_virtual_tour_url];
    } else {
        $virt_url = $data_listing[$db_virtual_tour_url];
    }
    $output .= "    <p style='font-size: 14px;font-weight: bold; text-align: center'><a href='{$virt_url}' target='_blank'><img src='" . $http_imgs . "vir_tour.gif' border='0' alt='Virtual Tour icon' />View the Virtual Tour</a></p>\n";
}
if ($photo_count > 1) {
    $output .= "    <p style='font-size: 12px; text-align: left;'>Click on a photo thumbnail to the left to view that photo.</p>\n";
    /* Find photos and display them in lightbox */
    $output .= " <table cellpadding='0' cellspacing='0' border='0'>\n";
    $photo_count = 0;
    // Initial photo check for lightbox
    photoCheck($abs_photos, $mls_id);
    for ($a = 0; $a <= 100; $a++) {
        if (photo_exists($abs_photos, $mls_id, $a)) {
            $photo_src = photo_exists($abs_photos, $mls_id, $a);
            $photo_count++;
            if ($photo_count == 1) {
                $img_info = getimagesize($abs_photos . $photo_src);
                if ($img_info[1] < 390) {
                    $output .= "  <tr><td colspan='5' align='center'><p style='font-size: 12px; text-align: center;'>Click <a href='" . $http_photos . $photo_src . "' rel='lightbox[gallery]'>here</a> view all photos.</p></td></tr>\n";
                }
                $output .= "  <tr>\n";
            }
            $output .= "   <td align='center'><a href='" . $http_photos . $photo_src . "' rel='lightbox[gallery]'></a></td>\n";
        }
    }
    $output .= " </table>\n";