本文整理汇总了PHP中photo::getPhotoById方法的典型用法代码示例。如果您正苦于以下问题:PHP photo::getPhotoById方法的具体用法?PHP photo::getPhotoById怎么用?PHP photo::getPhotoById使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类photo
的用法示例。
在下文中一共展示了photo::getPhotoById方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: editphotos
function editphotos($rid)
{
$sql = "select * from `rentorhire_images` where rentorhire_id='" . $rid . "'";
$result = $this->mysql->getdata($sql);
$str = "";
$i = 1;
$photos = $this->getPhotos($rid);
if (is_array($photos)) {
$ph = new photo();
foreach ($photos as $data) {
$img = $ph->getPhotoById($data['photo_id'], 2);
$str .= '<div id="image' . $i . '">' . $i . '. <a href="javascript:;" onclick="loadPage(\'/ajax/display_image.php?id=' . $data['photo_id'] . '\')"><img src="' . $img . '" border="0"></a>';
$str .= "<a href=\"javascript:;\" onclick=\"loadAjax('/ajax/rentorhire/removeimage.php?imageid=" . $data['photo_id'] . "','image" . $i . "');\">Remove this Image</a></div>";
$i++;
}
}
return $str;
}
示例2: photo
<?php
session_start();
require_once $_SERVER['DOCUMENT_ROOT'] . "/common/class/photo.class.php";
$ph = new photo();
$img = $ph->getPhotoById($_GET['id'], 3);
echo '<img src="' . $img . '">';
示例3: photo
<tr>
<th valign="top"> Description:</th> <td valign="top"><?php
echo $rentorhire_data['description'];
?>
</td>
</tr>
<tr>
<th valign="top"> Related photos:</th>
<td><?php
$photos = $rentorhire->getPhotos($_GET['id']);
if ($photos) {
echo "<ul style=\"list-style:none\">";
$ph = new photo();
foreach ($photos as $photo) {
$img = $ph->getPhotoById($photo['photo_id'], 2);
echo '<li><a href="javascript:;" onclick="loadPage(\'/ajax/display_image.php?id=' . $photo['photo_id'] . '\')"><img src="' . $img . '" border="0"></a></li>';
}
echo "</ul>";
}
?>
</td>
</tr>
</table>
<?php
include "subfooter.php";