diff --git a/admin/modules/bibliography/marcimport.php b/admin/modules/bibliography/marcimport.php
index 7fe05bd..16d644c 100755
--- a/admin/modules/bibliography/marcimport.php
+++ b/admin/modules/bibliography/marcimport.php
@@ -232,7 +232,16 @@
$data['collation'] .= $dimension[0]->getData();
}
}
-
+
+ // RDA Content type
+ $rct_fld = $record->getField('336');
+ if ($rct_fld) {
+ $content_type = $rct_fld->getSubfields('a');
+ // get ID
+ $q = $dbs->query(sprintf('SELECT id FROM mst_content_type WHERE content_type=\'%s\'', $content_type));
+ $data['content_type_id'] = $rct_fld->getSubfields('a');
+ }
+
// Series title
$series_fld = $record->getField('440');
if ($series_fld) {
diff --git a/files/reports/biblio_stat_print_result.html b/files/reports/biblio_stat_print_result.html
deleted file mode 100755
index 7c36140..0000000
--- a/files/reports/biblio_stat_print_result.html
+++ /dev/null
@@ -1,22 +0,0 @@
-
Senayan Membership General Statistic Report
-
-Senayan - Collection Statistic Report
-
-Total Titles | : | 19 (including titles that still don't have items yet) |
-Total Titles with items | : | 8 (only titles that have items) |
-Total Items/Copies | : | 10 |
-Total Checkout Items | : | 1 |
-Total Items In Library | : | 9 |
-Total Titles By Medium/GMD | : | Text : 18, print : 1, |
-Total Items By Collection Type | : | Reference : 7, Textbook : 3, |
-10 Most Popular Titles | : | - Cathedral and the Bazaar: Musings on Linux and Open Source by an Accidental Revolutionary
- Corruption and development : the anti-corruption campaigns
- Linux In a Nutshell
- Ajax : creating Web pages with asynchronous JavaScript and XML
|
-
-
-
\ No newline at end of file
diff --git a/files/reports/loan_stat_print_result.html b/files/reports/loan_stat_print_result.html
deleted file mode 100755
index 2fda295..0000000
--- a/files/reports/loan_stat_print_result.html
+++ /dev/null
@@ -1,23 +0,0 @@
-Senayan Meranti Membership General Statistic Report
-
-Senayan Meranti - Loan Report
-
-Total Loan | : | 9 |
-Total Loan By GMD/Medium | : | Text : 9, |
-Total Loan By Collection Type | : | Reference : 9, |
-Total Loan Transactions | : | 2 |
-Transaction Average (Per Day) | : | 1 |
-Total Peak Transaction | : | 8 |
-Members Already Had Loans | : | 1 |
-Members Never Have Loans Yet | : | 0 |
-Total Overdued Loans | : | 0 |
-
-
-
\ No newline at end of file
diff --git a/files/reports/member_stat_print_result.html b/files/reports/member_stat_print_result.html
deleted file mode 100755
index 227e07e..0000000
--- a/files/reports/member_stat_print_result.html
+++ /dev/null
@@ -1,20 +0,0 @@
-Senayan Meranti Membership General Statistic Report
-
-Senayan Meranti - Membership Report
-
-
-Total Registered Members | : | 1 |
-Total Active Member | : | 1 |
-Total Members By Membership Type | : | Standard : 1, |
-Total Expired Member | : | 0 |
-10 most active members | : | |
-
-
-
diff --git a/lib/detail.inc.php b/lib/detail.inc.php
index 97f9b4c..41e4618 100755
--- a/lib/detail.inc.php
+++ b/lib/detail.inc.php
@@ -226,7 +226,7 @@ protected function htmlOutput()
''."\n";
$this->record_detail['social_shares'] = $_share_btns;
- }
+ }
return $this->record_detail;
@@ -243,14 +243,6 @@ public function MODSoutput()
// get global configuration vars array
global $sysconf;
- // convert to htmlentities
- foreach ($this->record_detail as $_field => $_value) {
- if (is_string($_value)) {
- $this->record_detail[$_field] = preg_replace_callback('/&([a-zA-Z][a-zA-Z0-9]+);/S',
- 'utility::convertXMLentities', htmlspecialchars(trim($_value)));
- }
- }
-
// set prefix and suffix
$this->detail_prefix = ''."\n";
$this->detail_suffix = '';
@@ -270,9 +262,9 @@ public function MODSoutput()
$_title_main = trim($this->record_detail['title']);
}
- $_xml_output .= ''."\n".''.$_title_main.''."\n";
+ $_xml_output .= ''."\n".''."\n";
if ($_title_sub) {
- $_xml_output .= ''.$_title_sub.''."\n";
+ $_xml_output .= ''."\n";
}
$_xml_output .= ''."\n";
@@ -289,42 +281,42 @@ public function MODSoutput()
$_biblio_authors_q->free_result();
// resources type
- $_xml_output .= 'mixed material'."\n";
+ $_xml_output .= ''."\n";
// gmd
- $_xml_output .= 'bibliography'."\n";
+ $_xml_output .= ''."\n";
// imprint/publication data
$_xml_output .= ''."\n";
- $_xml_output .= ''.$this->record_detail['publish_place'].''."\n"
- .''.$this->record_detail['publisher_name'].''."\n"
- .''.$this->record_detail['publish_year'].''."\n";
+ $_xml_output .= 'record_detail['publish_place'].']]>'."\n"
+ .'record_detail['publisher_name'].']]>'."\n"
+ .'record_detail['publish_year'].']]>'."\n";
if ((integer)$this->record_detail['frequency_id'] > 0) {
- $_xml_output .= 'continuing'."\n";
- $_xml_output .= ''.$this->record_detail['frequency'].''."\n";
+ $_xml_output .= ''."\n";
+ $_xml_output .= 'record_detail['frequency'].']]>'."\n";
} else {
- $_xml_output .= 'monographic'."\n";
+ $_xml_output .= ''."\n";
}
- $_xml_output .= ''.$this->record_detail['edition'].''."\n";
+ $_xml_output .= 'record_detail['edition'].']]>'."\n";
$_xml_output .= ''."\n";
// language
$_xml_output .= ''."\n";
- $_xml_output .= ''.$this->record_detail['language_id'].''."\n";
- $_xml_output .= ''.$this->record_detail['language_name'].''."\n";
+ $_xml_output .= 'record_detail['language_id'].']]>'."\n";
+ $_xml_output .= 'record_detail['language_name'].']]>'."\n";
$_xml_output .= ''."\n";
// Physical Description/Collation
$_xml_output .= ''."\n";
- $_xml_output .= ''."\n";
- $_xml_output .= ''.$this->record_detail['collation'].''."\n";
+ $_xml_output .= ''."\n";
+ $_xml_output .= 'record_detail['collation'].']]>'."\n";
$_xml_output .= ''."\n";
// Series title
if ($this->record_detail['series_title']) {
$_xml_output .= ''."\n";
$_xml_output .= ''."\n";
- $_xml_output .= ''.$this->record_detail['series_title'].''."\n";
+ $_xml_output .= 'record_detail['series_title'].']]>'."\n";
$_xml_output .= ''."\n";
$_xml_output .= ''."\n";
}
@@ -332,7 +324,7 @@ public function MODSoutput()
// Note
$_xml_output .= ''.$this->record_detail['notes'].''."\n";
if ($_title_statement_resp) {
- $_xml_output .= ''.$_title_statement_resp.'';
+ $_xml_output .= '';
}
// subject/topic
@@ -341,21 +333,21 @@ public function MODSoutput()
while ($_topic_d = $_biblio_topics_q->fetch_assoc()) {
$_subject_type = strtolower($sysconf['subject_type'][$_topic_d['topic_type']]);
$_xml_output .= '';
- $_xml_output .= '<'.$_subject_type.'>'.$_topic_d['topic'].''.$_subject_type.'>';
+ $_xml_output .= '<'.$_subject_type.'>'.$_subject_type.'>';
$_xml_output .= ''."\n";
}
// classification
- $_xml_output .= ''.$this->record_detail['classification'].'';
+ $_xml_output .= 'record_detail['classification'].']]>';
// ISBN/ISSN
- $_xml_output .= ''.str_replace(array('-', ' '), '', $this->record_detail['isbn_issn']).'';
+ $_xml_output .= 'record_detail['isbn_issn']).']]>';
// Location and Copies information
$_xml_output .= ''."\n";
- $_xml_output .= ''.$sysconf['library_name'].' '.$sysconf['library_subname'].''."\n";
- $_xml_output .= ''.$this->record_detail['call_number'].''."\n";
+ $_xml_output .= ''."\n";
+ $_xml_output .= 'record_detail['call_number'].']]>'."\n";
$_copy_q = $this->obj_db->query('SELECT i.item_code, i.call_number, stat.item_status_name, loc.location_name, stat.rules, i.site FROM item AS i '
.'LEFT JOIN mst_item_status AS stat ON i.item_status_id=stat.item_status_id '
.'LEFT JOIN mst_location AS loc ON i.location_id=loc.location_id '
@@ -364,9 +356,9 @@ public function MODSoutput()
$_xml_output .= ''."\n";
while ($_copy_d = $_copy_q->fetch_assoc()) {
$_xml_output .= ''."\n";
- $_xml_output .= ''.$_copy_d['item_code'].''."\n";
- $_xml_output .= ''.$_copy_d['location_name'].( $_copy_d['site']?' ('.$_copy_d['site'].')':'' ).''."\n";
- $_xml_output .= ''.$_copy_d['call_number'].''."\n";
+ $_xml_output .= ''."\n";
+ $_xml_output .= ''."\n";
+ $_xml_output .= ''."\n";
$_xml_output .= ''."\n";
}
$_xml_output .= ''."\n";
@@ -383,7 +375,7 @@ public function MODSoutput()
if ($attachment_d['access_limit']) { continue; }
$_xml_output .= '';
- $_xml_output .= htmlentities($attachment_d['file_title']);
+ $_xml_output .= '';
$_xml_output .= ''."\n";
}
$_xml_output .= '';
@@ -392,15 +384,15 @@ public function MODSoutput()
// image
if (!empty($this->record_detail['image'])) {
$_image = urlencode($this->record_detail['image']);
- $_xml_output .= ''.htmlentities($_image).''."\n";
+ $_xml_output .= ''."\n";
}
// record info
$_xml_output .= ''."\n";
- $_xml_output .= ''.$this->detail_id.''."\n";
- $_xml_output .= ''.$this->record_detail['input_date'].''."\n";
- $_xml_output .= ''.$this->record_detail['last_update'].''."\n";
- $_xml_output .= 'machine generated'."\n";
+ $_xml_output .= 'detail_id.']]>'."\n";
+ $_xml_output .= 'record_detail['input_date'].']]>'."\n";
+ $_xml_output .= 'record_detail['last_update'].']]>'."\n";
+ $_xml_output .= ''."\n";
$_xml_output .= '';
$_xml_output .= '';
@@ -410,7 +402,7 @@ public function MODSoutput()
/**
- * Record detail output in MODS (Metadata Object Description Schema) XML mode
+ * Record detail output in Dublin Core XML mode
* @return array
*
*/
@@ -418,14 +410,7 @@ public function DublinCoreOutput()
{
// get global configuration vars array
global $sysconf;
-
- // convert to htmlentities
- foreach ($this->record_detail as $_field => $_value) {
- if (is_string($_value)) {
- $this->record_detail[$_field] = preg_replace_callback('/&([a-zA-Z][a-zA-Z0-9]+);/S',
- 'utility::convertXMLentities', htmlspecialchars(trim($_value)));
- }
- }
+ $protocol = isset($_SERVER["HTTPS"]) ? 'https' : 'http';
// set prefix and suffix
$this->detail_prefix = '';
@@ -445,11 +430,11 @@ public function DublinCoreOutput()
$_title_main = trim($this->record_detail['title']);
}
- $_xml_output .= ''.$_title_main;
+ $_xml_output .= ''."\n";
+ $_xml_output .= ']]>'."\n";
// get the authors data
$_biblio_authors_q = $this->obj_db->query('SELECT a.*,ba.level FROM mst_author AS a'
@@ -460,52 +445,52 @@ public function DublinCoreOutput()
$_biblio_authors_q->free_result();
// imprint/publication data
- $_xml_output .= ''.$this->record_detail['publisher_name'].''."\n";
+ $_xml_output .= 'record_detail['publisher_name'].']]>'."\n";
// date
- $_xml_output .= ''.$this->record_detail['publish_year'].''."\n";
+ $_xml_output .= 'record_detail['publish_year'].']]>'."\n";
// edition
- $_xml_output .= ''.$this->record_detail['edition'].''."\n";
+ $_xml_output .= 'record_detail['edition'].']]>'."\n";
// language
- $_xml_output .= ''.$this->record_detail['language_name'].''."\n";
+ $_xml_output .= 'record_detail['language_name'].']]>'."\n";
// Physical Description/Collation
- $_xml_output .= ''.$this->record_detail['gmd_name'].''."\n";
- $_xml_output .= ''.$this->record_detail['gmd_name'].''."\n";
+ $_xml_output .= 'record_detail['gmd_name'].']]>'."\n";
+ $_xml_output .= 'record_detail['gmd_name'].']]>'."\n";
if ((integer)$this->record_detail['frequency_id'] > 0) {
- $_xml_output .= 'Serial'."\n";
+ $_xml_output .= ''."\n";
}
$_xml_output .= ''.$this->record_detail['collation'].''."\n";
// Series title
if ($this->record_detail['series_title']) {
- $_xml_output .= ''.$this->record_detail['series_title'].''."\n";
+ $_xml_output .= 'record_detail['series_title'].']]>'."\n";
}
// Note
- $_xml_output .= ''.$this->record_detail['notes'].''."\n";
- $_xml_output .= ''.$this->record_detail['notes'].''."\n";
+ $_xml_output .= 'record_detail['notes'].']]>'."\n";
+ $_xml_output .= 'record_detail['notes'].']]>'."\n";
// subject/topic
$_biblio_topics_q = $this->obj_db->query('SELECT t.topic, t.topic_type, t.auth_list, bt.level FROM mst_topic AS t
LEFT JOIN biblio_topic AS bt ON t.topic_id=bt.topic_id WHERE bt.biblio_id='.$this->detail_id.' ORDER BY t.auth_list');
while ($_topic_d = $_biblio_topics_q->fetch_assoc()) {
- $_xml_output .= ''.$_topic_d['topic'].''."\n";
+ $_xml_output .= ''."\n";
}
// classification
- $_xml_output .= ''.$this->record_detail['classification'].'';
+ $_xml_output .= 'record_detail['classification'].']]>';
// Permalink
- $_xml_output .= 'detail_id.']]>';
+ $_xml_output .= 'detail_id.']]>';
// ISBN/ISSN
- $_xml_output .= ''.str_replace(array('-', ' '), '', $this->record_detail['isbn_issn']).'';
+ $_xml_output .= 'record_detail['isbn_issn']).']]>';
// Call Number
- $_xml_output .= ''.$this->record_detail['call_number'].''."\n";
+ $_xml_output .= 'record_detail['call_number'].']]>'."\n";
$_copy_q = $this->obj_db->query('SELECT i.item_code, i.call_number, stat.item_status_name, loc.location_name, stat.rules, i.site FROM item AS i '
.'LEFT JOIN mst_item_status AS stat ON i.item_status_id=stat.item_status_id '
@@ -513,7 +498,7 @@ public function DublinCoreOutput()
.'WHERE i.biblio_id='.$this->detail_id);
if ($_copy_q->num_rows > 0) {
while ($_copy_d = $_copy_q->fetch_assoc()) {
- $_xml_output .= ''.$_copy_d['item_code'].''."\n";
+ $_xml_output .= ''."\n";
}
}
@@ -522,11 +507,14 @@ public function DublinCoreOutput()
LEFT JOIN files AS f ON att.file_id=f.file_id WHERE att.biblio_id='.$this->detail_id.' AND att.access_type=\'public\' LIMIT 20');
if ($attachment_q->num_rows > 0) {
while ($attachment_d = $attachment_q->fetch_assoc()) {
+ $dir = '';
+ if ($attachment_d['file_dir']) {
+ $dir = $attachment_d['file_dir'].'/';
+ }
$_xml_output .= ''."\n";
}
}
@@ -534,7 +522,7 @@ public function DublinCoreOutput()
// image
if (!empty($this->record_detail['image'])) {
$_image = urlencode($this->record_detail['image']);
- $_xml_output .= ''."\n";
+ $_xml_output .= ''."\n";
}
return $_xml_output;
diff --git a/sysconfig.inc.php b/sysconfig.inc.php
index f09748c..2e6a730 100755
--- a/sysconfig.inc.php
+++ b/sysconfig.inc.php
@@ -116,6 +116,9 @@ function stripslashes_deep($value)
// library automation module web root dir
define('MWB', SWB.'admin/'.MDL.'/');
+// repository web base dir
+define('REPO_WBS', SWB.REPO.'/');
+
// item status rules
define('NO_LOAN_TRANSACTION', 1);
define('SKIP_STOCK_TAKE', 2);
@@ -482,7 +485,7 @@ function stripslashes_deep($value)
$sysconf['ipaccess']['smc-serialcontrol'] = 'all';
// OAI-PMH settings
-$sysconf['OAI']['enable'] = false;
+$sysconf['OAI']['enable'] = true;
$sysconf['OAI']['identifierPrefix'] = 'oai:slims/';
$sysconf['OAI']['Identify']['baseURL'] = 'http://'.@$_SERVER['SERVER_NAME'].':'.@$_SERVER['SERVER_PORT'].SWB.'oai.php';
$sysconf['OAI']['Identify']['repositoryName'] = 'SLiMS Senayan Library Management System OAI-PMh';