本文整理汇总了PHP中Gallery::getWhere方法的典型用法代码示例。如果您正苦于以下问题:PHP Gallery::getWhere方法的具体用法?PHP Gallery::getWhere怎么用?PHP Gallery::getWhere使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gallery
的用法示例。
在下文中一共展示了Gallery::getWhere方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
function index()
{
$gal = new Gallery();
$arrGal = $gal->getWhere("gallery_active = 1 AND gallery_carousel = 0 ORDER BY gallery_name ASC");
// pr($arrGal);
$arr['arrGal'] = $arrGal;
$layout_id = "Gallery_index";
$file = Layout::getFile($layout_id);
// echo "Pages/".$layout_id."/".$file;
Mold::theme("Pages/" . $layout_id . "/" . $file, $arr);
// Mold::theme("Pages/Gallery_index",$arr);
}
示例2: galleryLoad
function galleryLoad()
{
$gal = new Gallery();
$arrGal = $gal->getWhere("gallery_name != '' ORDER BY gallery_date DESC");
foreach ($arrGal as $gal) {
$gp = new Galleryphoto();
$gp->getMainpic($gal->gallery_id);
?>
<div class="gallery-item col-md-4">
<div class="paddingmargingallery">
<?php
if ($gp->photo_filename != "") {
?>
<div class="col-md-4 col-sm-4 col-xs-4">
<img class="img-responsive img-rounded"
src="<?php
echo _SPPATH;
echo $this->uploadURLThumb;
echo $gp->photo_filename;
?>
">
</div>
<?php
}
?>
<div class="col-md-8 col-sm-8 col-xs-8">
<div class="gallery-date ">
<small><?php
echo indonesian_date($gal->gallery_date);
?>
</small>
</div>
<div class="gallery-name" onclick="gallery_open(<?php
echo $gal->gallery_id;
?>
);">
<?php
echo $gal->gallery_name;
?>
</div>
</div>
<div class="clearfix"></div>
<div class="gp_menu" style="margin:0 auto; padding-top: 5px;">
<button type="button"
onclick="if(confirm('<?php
echo Lang::t("Are You Sure? This will delete the selected album and all the pictures within the album");
?>
'))gallery_delete(<?php
echo $gal->gallery_id;
?>
);event.preventDefault();"
class="btn btn-default"><?php
echo Lang::t('delete');
?>
</button>
</div>
</div>
</div>
<?php
}
}
示例3: galleryLoad
function galleryLoad()
{
$gal = new Gallery();
$arrGal = $gal->getWhere("gallery_name != '' ORDER BY gallery_date DESC");
foreach ($arrGal as $gal) {
$gp = new Galleryphoto();
$gp->getMainpic($gal->gallery_id);
?>
<div class="gallery-item col-md-4" >
<div style="position: absolute; width: 20px; height: 20px; padding: 5px; z-index:1;">
<input onclick="gallery_actived('<?php
echo $gal->gallery_id;
?>
');" type="checkbox" <?php
if ($gal->gallery_active) {
echo "checked";
}
?>
>
</div>
<div class="paddingmargingallery">
<?php
if ($gp->photo_filename != "") {
?>
<img style="cursor: pointer;" onclick="gallery_open(<?php
echo $gal->gallery_id;
?>
);" width="100%" src="<?php
echo _SPPATH . _PHOTOURL;
?>
thumbnail/<?php
echo $gp->photo_filename;
?>
">
<?php
}
?>
<div class="gallery-date ">
<small><?php
echo indonesian_date($gal->gallery_date);
?>
</small>
</div>
<div style="cursor: pointer;" class="gallery-name" onclick="gallery_open(<?php
echo $gal->gallery_id;
?>
);">
<?php
echo $gal->gallery_name;
?>
</div>
<div class="clearfix"></div>
<div class="gp_menu" style="margin:0 auto; padding-top: 5px;">
<button type="button" onclick="if(confirm('<?php
echo Lang::t("Are You Sure? This will delete the selected album and all the pictures within the album");
?>
'))gallery_delete(<?php
echo $gal->gallery_id;
?>
);event.preventDefault();" class="btn btn-default"><?php
echo Lang::t('delete');
?>
</button>
</div>
</div>
</div>
<?php
}
}