Warning: chmod(): Operation not permitted in /var/www/hopeinstoughton_www/wp-content/plugins/simple-universal-google-analytics/main.php on line 8 [0] in function chmod in /var/www/hopeinstoughton_www/wp-content/plugins/simple-universal-google-analytics/main.php on line 8 [1] in function include_once in /var/www/hopeinstoughton_www/wp-settings.php on line 560 [2] in function require_once in /var/www/hopeinstoughton_www/wp-config.php on line 85 [3] in function require_once in /var/www/hopeinstoughton_www/wp-load.php on line 50 [4] in function require_once in /var/www/hopeinstoughton_www/wp-blog-header.php on line 13 [5] in function require in /var/www/hopeinstoughton_www/index.php on line 17
| Server IP : 94.177.8.99 / Your IP : 216.73.217.165 Web Server : Apache/2.4.58 (Ubuntu) System : Linux aries 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64 User : www-data ( 33) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/hopeinstoughton_books/_oldsite/ |
Upload File : |
<?php
/*
to do: barcode, location (drawer, etc), type (new, s/h, damaged)
to do: button to borrow, button to purchase, link to details page
no front cover: 802072206720
front cover: 802072423639
*/
require './inc/include.php';
$barcode = empty($_GET['bc']) ? '' : $_GET['bc'];
// get info from database
$DATABASE->Open();
$dbarcode = $DATABASE->formatString($barcode);
$sql = <<<BLOCK
select a1.ba_name as ba_name1,a2.ba_name as ba_name2,ds_barcode,bt_title,
ds_title,ds_group,ds_wear,ds_cost,ds_location,dl_desc,bt_dim,bt_id
from dt_stock
inner join dt_title on ds_title=bt_id
inner join dt_location on ds_location=dl_id
left outer join dt_author as a1 on a1.ba_id=bt_author1
left outer join dt_author as a2 on a2.ba_id=bt_author2
where ds_barcode=$dbarcode
BLOCK;
$DATA = $DATABASE->Lookup($sql);
DatabaseError();
$DATABASE->Close();
$title = ip_AsTitle($DATA, 2);
if (empty($DATA['ds_barcode'])) {
$title = 'This barcode is not in use';
$current_price = '-';
$DATA['bt_id'] = 0;
} else {
$current_price = '$' . ip_ItemCost($DATA);
}
if (empty($DATA['bt_dim'])) {
$dim = array();
} else {
$dim = unserialize($DATA['bt_dim']);
}
$wd = isset($dim['wd']) ? intval($dim['wd']) : 0;
$ht = isset($dim['ht']) ? intval($dim['ht']) : 0;
// Display Details (with image)
$id = $DATA['bt_id'];
echo <<<BLOCK
<table border="0" width="580" cellspacing="0" cellpadding="3">
<tr><td rowspan="4" width="$wd"><img src="/inc/image.php?id=$id" width="$wd" height="$ht" alt="cover" border="0"></td>
<td><span id="poptitle">$title</span></td></tr>
<tr><td><span id="popprice">$current_price</span></td></tr>
<tr><td valign="bottom"><span id="popdetails"></span>...</td></tr>
</table>
<p>Press <ESC> to close this window</p>
BLOCK;
// choose layout based on presence of photo
?>