本文整理匯總了PHP中Attachments::del方法的典型用法代碼示例。如果您正苦於以下問題:PHP Attachments::del方法的具體用法?PHP Attachments::del怎麽用?PHP Attachments::del使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Attachments
的用法示例。
在下文中一共展示了Attachments::del方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: flash
if (!$result) {
flash();
} else {
flash("success", "album.php");
}
}
setvar("AlbumTypes", $_PB_CACHE['albumtype']);
if (isset($_GET['do'])) {
$do = trim($_GET['do']);
if (!empty($_GET['id'])) {
$id = intval($_GET['id']);
}
if ($do == "del" && !empty($id)) {
//get attach info
$album_info = $pdb->GetRow("SELECT * FROM {$tb_prefix}albums ab WHERE ab.member_id=" . $the_memberid . " AND ab.id={$id}");
$attachment->del($album_info['attachment_id'], "member_id=" . $the_memberid);
$result = $album->del(intval($id), "member_id=" . $the_memberid);
}
if ($do == "edit") {
if (!empty($id)) {
$album_info = $pdb->GetRow("SELECT a.title,a.description,ab.id,a.attachment,ab.type_id FROM {$tb_prefix}attachments a LEFT JOIN {$tb_prefix}albums ab ON a.id=ab.attachment_id WHERE a.member_id=" . $the_memberid . " AND a.id={$id}");
if (!empty($album_info['attachment'])) {
$album_info['image'] = pb_get_attachmenturl($album_info['attachment'], "../");
}
setvar("item", $album_info);
}
$tpl_file = "album_edit";
template($tpl_file);
exit;
}
}