本文整理汇总了PHP中Banner::findAllFrom方法的典型用法代码示例。如果您正苦于以下问题:PHP Banner::findAllFrom方法的具体用法?PHP Banner::findAllFrom怎么用?PHP Banner::findAllFrom使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Banner
的用法示例。
在下文中一共展示了Banner::findAllFrom方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Banner
</div>
<svg width="1295" height="633" id="svg" baseProfile="full" version="1.2">
<defs>
<mask id="svgmask1" class="svgmask" maskUnits="userSpaceOnUse" maskContentUnits="userSpaceOnUse" transform="scale(1)" >
<image width="100%" height="633" xlink:href="<?php
echo THEME_PATH;
?>
images/bigbanner-shape.png" />
</mask>
</defs>
<?php
$idx = 0;
$oBanner = new Banner();
$banners = $oBanner->findAllFrom("Banner", "type='home' AND location='background' AND status=1 order by sequence,id");
foreach ($banners as $banner) {
$idx++;
echo '<image id="the-mask' . $idx . '" data-index="' . $idx . '" class="the-mask" mask="url(#svgmask1)" width="100%" height="633" y="0" x="0" xlink:href="' . URL_PUBLIC . 'public/banner/' . $banner->filename . '" />';
}
?>
</svg>
</div>
<div id="bottom-mask"><img src="<?php
echo THEME_PATH;
?>
images/bottom-mask.png"></div>
<?php
示例2: Banner
</div>
<img id="offer-next" src="<?php
echo URL_PUBLIC;
?>
public/themes/css/images/next-arrow.png" />
<img id="offer-prev" src="<?php
echo URL_PUBLIC;
?>
public/themes/css/images/prev-arrow.png" />
</div>
<div class="home-content-main mobile-only">
<?php
$oBanner = new Banner();
$bannerAbout = $oBanner->findAllFrom("Banner", "type='home' AND location='aboutus' AND status=1");
$idx = 1;
if ($oBanner->countFrom('Banner', "1=1") > 0) {
foreach ($bannerAbout as $banner) {
?>
<img class="bg-img" src="<?php
echo URL_PUBLIC;
?>
public/banner/<?php
echo $banner->filename;
?>
" width=100% height=100% />
<?php
}
}
?>