本文整理汇总了PHP中api::biblio_load方法的典型用法代码示例。如果您正苦于以下问题:PHP api::biblio_load方法的具体用法?PHP api::biblio_load怎么用?PHP api::biblio_load使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类api
的用法示例。
在下文中一共展示了api::biblio_load方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: die
$can_write = utility::havePrivilege('bibliography', 'w');
if (!$can_write) {
die('<div class="errorBox">' . __('You are not authorized to view this section') . '</div>');
}
// page title
$page_title = 'Authority List';
// get id from url
$biblioID = 0;
if (isset($_GET['biblioID']) and !empty($_GET['biblioID'])) {
$biblioID = (int) $_GET['biblioID'];
}
// start the output buffer
ob_start();
if ($sysconf['log']['biblio']) {
if (!isset($_SESSION['_prevrawdata'][$biblioID])) {
$_SESSION['_prevrawdata'][$biblioID] = api::biblio_load($dbs, $biblioID);
}
}
?>
<script type="text/javascript">
function confirmProcess(int_biblio_id, int_item_id)
{
var confirmBox = confirm('<?php
echo addslashes(__('Are you sure to remove selected author?'));
?>
' + "\n" + '<?php
echo addslashes(__('Once deleted, it can\'t be restored!'));
?>
');
if (confirmBox) {
// set hidden element value
示例2: array
// make an array
$_POST['itemID'] = array((int) $_POST['itemID']);
}
// loop array
$http_query = '';
foreach ($_POST['itemID'] as $itemID) {
$itemID = (int) $itemID;
// check if this biblio data still have an item
$_sql_biblio_item_q = sprintf('SELECT b.title, COUNT(item_id) FROM biblio AS b
LEFT JOIN item AS i ON b.biblio_id=i.biblio_id
WHERE b.biblio_id=%d GROUP BY title', $itemID);
$biblio_item_q = $dbs->query($_sql_biblio_item_q);
$biblio_item_d = $biblio_item_q->fetch_row();
if ($biblio_item_d[1] < 1) {
if ($sysconf['log']['biblio']) {
$_rawdata = api::biblio_load($dbs, $itemID);
api::bibliolog_write($dbs, $itemID, $_SESSION['uid'], $_SESSION['realname'], $biblio_item_d[0], 'delete', 'description', $_rawdata, 'Data bibliografi dihapus.');
}
if (!$sql_op->delete('biblio', "biblio_id={$itemID}")) {
$error_num++;
} else {
// write log
utility::writeLogs($dbs, 'staff', $_SESSION['uid'], 'bibliography', $_SESSION['realname'] . ' DELETE bibliographic data (' . $biblio_item_d[0] . ') with biblio_id (' . $itemID . ')');
// delete related data
$sql_op->delete('biblio_topic', "biblio_id={$itemID}");
$sql_op->delete('biblio_author', "biblio_id={$itemID}");
$sql_op->delete('biblio_attachment', "biblio_id={$itemID}");
$sql_op->delete('biblio_relation', "biblio_id={$itemID}");
$sql_op->delete('search_biblio', "biblio_id={$itemID}");
// add to http query for UCS delete
$http_query .= "itemID[]={$itemID}&";