本文整理匯總了PHP中Gallery::getByID方法的典型用法代碼示例。如果您正苦於以下問題:PHP Gallery::getByID方法的具體用法?PHP Gallery::getByID怎麽用?PHP Gallery::getByID使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Gallery
的用法示例。
在下文中一共展示了Gallery::getByID方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: id
function id($args)
{
list($id, $name) = $args;
$id = tin($id);
$gal = new Gallery();
$gal->getByID($id);
// pr($gal);
$gs = new Galleryphoto();
$arrPic = $gs->getWhere("gallery_id = '{$id}' ORDER BY photo_zindex DESC");
$arr['gal'] = $gal;
$arr['id'] = $id;
$arr['arrPic'] = $arrPic;
$layout_id = "Gallery_id";
$file = Layout::getFile($layout_id);
// echo "Pages/".$layout_id."/".$file;
Mold::theme("Pages/" . $layout_id . "/" . $file, $arr);
// Mold::theme("Pages/Gallery_id",$arr);
}
示例2: galleryUpdateDes
function galleryUpdateDes()
{
$gid = isset($_POST['gid']) ? addslashes($_POST['gid']) : 0;
if ($gid == 0) {
die('No ID');
}
$newname = trim(rtrim(isset($_POST['newname']) ? addslashes($_POST['newname']) : '0'));
if ($newname == '0') {
die('No ID');
}
if ($newname == "Click here to enter description") {
die('No Update');
}
$gal = new Gallery();
$gal->getByID($gid);
$gal->gallery_description = trim(rtrim($newname));
$gal->load = 1;
$gal->save();
}
示例3: galleryUseCarousel
function galleryUseCarousel()
{
$gid = isset($_GET['gid']) ? addslashes($_GET['gid']) : '0';
if ($gid == '0') {
die("Please provide ID");
}
$ck = isset($_GET['ck']) ? addslashes($_GET['ck']) : '0';
$gal = new Gallery();
$gal->getByID($gid);
if ($gal->gallery_carousel) {
$gal->gallery_carousel = 0;
} else {
$gal->gallery_carousel = 1;
}
$gal->load = 1;
if ($gal->save()) {
echo $gal->gallery_carousel;
} else {
echo "no";
}
}