本文整理匯總了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
}
}
?>