$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"; } $output .= " </td>\n"; $output .= " </table>\n";
document[img_name1].src = img_src1; } // --> </script> <?php echo "<table width='780' border='0' cellpadding='1' cellspacing='0' style='font-family: Arial,Helvetica,sans-serif;font-size: 12px;color: #000;background-color: #CCC;border: 1px solid #999;'>\n"; echo " <tr>\n"; echo " <td align='center'>\n"; echo " <table width='100%' border='0' cellpadding='1' cellspacing='0'>\n"; echo " <td width='50%' valign='top'>\n"; /* Find photos and display them */ echo " <table cellpadding='0' cellspacing='0' border='0'>\n"; $photo_count = 0; for ($a = 'a'; $a <= 'j'; $a++) { if (photo_exists($idx_dir . 'photos/', $mls_id, $a)) { $photo_src = photo_exists($idx_dir . 'photos/', $mls_id, $a); $photo_count++; if ($photo_count == 1) { $img_info = getimagesize($idx_dir . 'photos/' . $photo_src); if ($img_info[1] < 390) { echo " <tr><td colspan='5' align='center'><a name='photo'></a><img src='" . $http_photos . $photo_src . "' alt='Photo' title='Photo' name='Photo' " . $img_info[3] . " border='0' /></td></tr>\n"; } else { echo " <tr><td colspan='5' align='center'><a name='photo'></a><img src='" . $http_photos . $photo_src . "' alt='Photo' title='Photo' name='Photo' width='390' height='293' border='0' /></td></tr>\n"; } echo " <tr>\n"; } echo " <td align='center'><a href='#photo' onclick=\"roll('Photo', '" . $http_photos . $photo_src . "')\"><img src='" . $http_photos . $photo_src . "' alt='Photo Thumbnail' title='Photo Thumbnail' width='78' height='59' border='0' /></a></td>\n"; if ($photo_count == 5) { echo " </tr>\n"; echo " <tr>\n"; }
function thumbnailPhoto($abs_photos, $listingID, $width = '95', $height = '71') { global $http_photos, $http_imgs; for ($i = 3; $i >= 0; $i--) { if (photo_exists($abs_photos, $listingID, $i)) { $src = photo_exists($abs_photos, $listingID, $i); } } if (!empty($src)) { // Adjust the dimensions of the thumbnail to fit our requirements $image_info = getimagesize($abs_photos . $src); $new_height = $image_info[1] / $image_info[0] * $width; $new_width = $image_info[2] / $image_info[0] * $height; $output .= "<img src='" . $http_photos . $src . "' width='{$width}' height='{$new_height}' border='0' alt='Thumbnail photo' title='Thumbnail photo' />"; } else { $output = "<img src='" . $http_imgs . "nophoto.jpg' width='95' height='71' border='0' alt='No photo available' title='No photo available' />"; } return $output; }
if (@mysql_query($sql_delete)) { header("Location: " . $PHP_SELF . "?msg=Item deleted."); exit; } else { echo "<p>Error deleting item: " . mysql_error() . "</p>"; } break; // *** Delete Photo *** // *** Delete Photo *** case 'delete-photo': if (photo_exists($image_fullpath, $item_num, $photo_num)) { if (unlink($image_fullpath . photo_exists($image_fullpath, $item_num, $photo_num))) { header("Location: {$PHP_SELF}?action=edit&id=" . $id . "&msg=Photo deleted."); exit; } else { echo "Error deleting image. " . photo_exists($uploaddir_abs, $item_num, $photo_num) . "<br />\n"; exit; } } break; // *** Default *** // *** Default *** default: $page_title = "Update Inventory Item"; include 'header.php'; /* Capture the search variables */ $cat = $_POST['cat']; $subcat = $_POST['subcat']; $brand = $_POST['brand']; $spot = $_POST['spot']; /* Variables for testing
} } $cell_num = 0; while ($row1 = @mysql_fetch_array($result1)) { $cell_num++; if ($cell_num == 1) { echo " <tr>\n"; } echo " <td><a href='product.php?id=" . $row1['id'] . "'>"; if (thumbnail_exists($image_fullpath, $row1['item_num'], 1)) { $image_src = $image_path . thumbnail_exists($image_fullpath, $row1['item_num'], 1); $image_info = getimagesize($image_src); echo "<img src='{$image_src}' " . $image_info[3] . " border='0' alt='" . $row1['id'] . "' /></a>\n"; } else { if (photo_exists($image_fullpath, $row1['item_num'], 1)) { $image_src = $image_path . photo_exists($image_fullpath, $row1['item_num'], 1); $image_info = getimagesize($image_src); echo "<img src='{$image_src}' " . $image_info[3] . " border='0' alt='" . $row1['id'] . "' /></a>\n"; } else { echo "<img src='images/no_image.jpg' width='200' height='150' border='0' alt='No image available' /></a>\n"; } } echo "<br />\n"; echo "<a href='product.php?id=" . $row1['id'] . "' class='product_link'>\n"; $arr_field_limits = explode(',', $field_limits); if (!empty($row1[3])) { echo "<b>"; if (!empty($arr_field_limits[0])) { echo stripslashes(substr($row1[3], 0, $arr_field_limits[0])) . "..."; } else { echo $row1[3];
echo " <td><font face='Arial,Helvetica' size='2'>" . $row['pool'] . "</font></td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td><font face='Arial,Helvetica' size='2'> </font></td>\n"; echo " <td><font face='Arial,Helvetica' size='2'></font></td>\n"; echo " <td><font face='Arial,Helvetica' size='2'>Furnished: </font></td>\n"; echo " <td><font face='Arial,Helvetica' size='2'>" . $row['furnished'] . "</font></td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td colspan='4'><font face='Arial,Helvetica' size='2'>" . $row['descr'] . "</font></td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td colspan='4'>\n"; for ($i = 1; $i <= 10; $i++) { if (photo_exists($uploaddir_abs, $photo_name, $i)) { $photo_src = photo_exists($uploaddir_abs, $photo_name, $i); $img_info = getimagesize($uploaddir_abs . $photo_src); if ($img_info[0] < 641) { echo "<img src='" . $uploaddir_rel . $photo_src . "' " . $img_info[3] . " border='0' /><br /><br />"; } else { $new_height = $img_info[1] / $img_info[0] * 640; echo "<img src='" . $uploaddir_rel . $photo_src . "' width='640' height='{$new_height}' border='0' /><br /><br />\n"; } } else { echo " "; } } echo " </td>\n"; echo " </tr>\n"; } echo " </table>\n";