showDetail(); // send http header header('Content-Type: text/xml'); echo ''."\n"; echo $detail->getPrefix(); echo $output; echo $detail->getSuffix(); exit(); } else if (isset($_GET['JSONLD']) AND !empty($_GET['JSONLD'])) { if (!$sysconf['jsonld_detail']) { die('JSON-LD detail is disabled'); } // filter the ID $detail_id = intval($_GET['id']); // include detail library and template include LIB.'detail.inc.php'; // create detail object $detail = new detail($dbs, $detail_id, 'json-ld'); $output = $detail->showDetail(); // send http header header('Content-Type: application/ld+json'); echo $output; exit(); } else { // filter the ID $detail_id = intval($_GET['id']); // include detail library and template include LIB.'detail.inc.php'; if ($sysconf['comment']['enable']) { include LIB.'comment.inc.php'; } if (isset($_POST['comment']) && $_POST['comment']<>"" && ISSET($_SESSION['mid'])) { require SIMBIO.'simbio_DB/simbio_dbop.inc.php'; $data['comment'] = trim(strip_tags($_POST['comment'])); $data['biblio_id'] = $detail_id; $data['member_id'] = $_SESSION['mid']; $data['input_date'] = date('Y-m-d H:i:s'); $data['last_update'] = date('Y-m-d H:i:s'); /* INSERT RECORD MODE */ // insert the data $sql_op = new simbio_dbop($dbs); $insert = $sql_op->insert('comment', $data); if ($insert) { utility::jsAlert(__('Thank you for your comment.')); } else { utility::jsAlert(__('FAILED to strore you comment. Please Contact System Administrator')."\nDEBUG : ".$sql_op->error); } } if (isset($_GET['keywords'])) { $keywords = trim($_GET['keywords']); $keywords_array = explode(' ', $keywords); $searched_words_js_array = '['; foreach($keywords_array as $word) { $word = str_replace(array('"', ',', "'", '-'), '', $word); $searched_words_js_array .= "'$word',"; } $searched_words_js_array = substr_replace($searched_words_js_array, '', -1); $searched_words_js_array .= ']'; } // create detail object $detail = new detail($dbs, $detail_id); $detail->setTemplate($sysconf['template']['dir'].'/'.$sysconf['template']['theme'].'/detail_template.php'); // set the content for info box $info = ''.strtoupper(__('Record Detail')).'
'; if (!defined('LIGHTWEIGHT_MODE')) { $info .= ''.__('Back To Previous').''; } if (isset($sysconf['enable_xml_detail']) && $sysconf['enable_xml_detail'] && !defined('LIGHTWEIGHT_MODE')) { $info .= 'XML Detail'; $info .= 'Cite this'; } // output the record detail echo $detail->showDetail(); $page_title = $detail->record_title.' | '.$sysconf['library_name']; $metadata = $detail->metadata; $image_src = $detail->image_src; $notes = $detail->notes; // get keywords $subject = ''; if(isset($detail->subjects[0]) && count($detail->subjects[0]) > 0) { foreach($detail->subjects as $_subject) { $subject .= strtolower($_subject['topic']).','; } $subject = substr($subject,0,-1); } echo '
'."\n"; }