本文整理汇总了PHP中utility::collection_load方法的典型用法代码示例。如果您正苦于以下问题:PHP utility::collection_load方法的具体用法?PHP utility::collection_load怎么用?PHP utility::collection_load使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类utility
的用法示例。
在下文中一共展示了utility::collection_load方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: simbio_dbop
$bid = (int) $_POST['bid'];
$sql_op = new simbio_dbop($dbs);
// check if the item still on loan
$loan_q = $dbs->query('SELECT DISTINCT l.item_code, b.title FROM loan AS l
LEFT JOIN item AS i ON l.item_code=i.item_code
LEFT JOIN biblio AS b ON i.biblio_id=b.biblio_id
WHERE i.item_id=' . $id . ' AND l.is_lent=1 AND l.is_return=0');
$loan_d = $loan_q->fetch_row();
// send an alert if the member cant be deleted
if ($loan_q->num_rows > 0) {
echo '<script type="text/javascript">';
echo 'alert(\'' . __('Item data can not be deleted because still on hold by members') . '\');';
echo 'self.location.href = \'iframe_item_list.php?biblioID=' . $bid . '\';';
echo '</script>';
} else {
$collection = utility::collection_load($dbs, $bid);
$item = utility::item_load_by_id($dbs, $id);
if ($sql_op->delete('item', 'item_id=' . $id)) {
utility::writeLogs($dbs, 'staff', $_SESSION['uid'], 'bibliography', $_SESSION['realname'] . ' DELETE item data (' . $item['item_code'] . ') with title (' . $collection['title'] . ')');
echo '<script type="text/javascript">';
echo 'alert(\'' . __('Item succesfully removed!') . '\');';
echo 'self.location.href = \'iframe_item_list.php?biblioID=' . $bid . '\';';
echo '</script>';
} else {
echo '<script type="text/javascript">';
echo 'alert(\'' . __('Item FAILED to removed!') . '\');';
echo 'self.location.href = \'iframe_item_list.php?biblioID=' . $bid . '\';';
echo '</script>';
}
}
}