<fieldset class="menuBox"> <div class="menuBoxInner importIcon"> <?php echo strtoupper(lang_mod_membership_import_data) . '<hr />' . lang_mod_membership_import_data_description; ?> </div> </fieldset> <div id="importInfo" class="infoBox" style="display: none;"> </div><div id="importError" class="errorBox" style="display: none;"> </div> <?php // create new instance $form = new simbio_form_table_AJAX('mainForm', $_SERVER['PHP_SELF'] . '', 'post'); $form->submit_button_attr = 'name="doImport" value="' . lang_mod_member_import_button_start . '" class="button"'; // form table attributes $form->table_attr = 'align="center" id="dataList" cellpadding="5" cellspacing="0"'; $form->table_header_attr = 'class="alterCell" style="font-weight: bold;"'; $form->table_content_attr = 'class="alterCell2"'; /* Form Element(s) */ // csv files $str_input = simbio_form_element::textField('file', 'importFile'); $str_input .= ' Maximum ' . $sysconf['max_upload'] . ' KB'; $form->addAnything(lang_mod_member_import_field_file . '*', $str_input); // field separator $form->addTextField('text', 'fieldSep', lang_mod_member_import_field_field_separator . '*', '' . htmlentities(',') . '', 'style="width: 10%;"'); // field enclosed $form->addTextField('text', 'fieldEnc', lang_mod_member_import_field_field_enclosed . '*', '' . htmlentities('"') . '', 'style="width: 10%;"'); // number of records to import $form->addTextField('text', 'recordNum', lang_mod_member_import_field_record_number, '0', 'style="width: 10%;"'); // records offset $form->addTextField('text', 'recordOffset', lang_mod_member_import_field_record_offset, '1', 'style="width: 10%;"'); // output the form echo $form->printOut();
$form->edit_mode = true; // record ID for delete process $form->record_id = $itemID; // form record title $form->record_title = str_ireplace('label-', '', $rec_d['label_name']); // submit button attribute $form->submit_button_attr = 'name="saveData" value="' . __('Update') . '" class="button"'; } /* Form Element(s) */ // label name $form->addTextField('text', 'labelName', __('Label Name') . '*', $rec_d['label_name'], 'style="width: 60%;" maxlength="20"'); // label image if (empty($rec_d['label_image'])) { $str_input = simbio_form_element::textField('file', 'labelImage'); $str_input .= ' Maximum ' . $sysconf['max_image_upload'] . ' KB. All image will be automatically resized.'; $form->addAnything(__('File Attachment'), $str_input); } else { $str_input = '<div><img src="' . SWB . IMAGES_DIR . '/labels/' . $rec_d['label_image'] . '" align="middle" /> <strong>' . $rec_d['label_image'] . '</strong></div>'; $str_input .= simbio_form_element::textField('file', 'labelImage'); $str_input .= ' Maximum ' . $sysconf['max_image_upload'] . ' KB. All image will be automatically resized.'; $form->addAnything(__('File Attachment'), $str_input); } // label desc $form->addTextField('text', 'labelDesc', __('Label Description'), $rec_d['label_desc'], 'style="width: 100%;" maxlength="50"'); // edit mode messagge if ($form->edit_mode) { echo '<div class="infoBox">' . __('You are going to edit Label data') . ' : <b>' . $rec_d['label_name'] . ' - ' . $rec_d['label_desc'] . '</b> <br />' . __('Last Update') . $rec_d['last_update'] . '</div>'; //mfc } // print out the form object echo $form->printOut();
utility::jsAlert(__('Settings saved. Refreshing page')); echo '<script type="text/javascript">top.location.href = \'' . AWB . 'index.php?mod=system\';</script>'; exit; } /* Config Vars update process end */ // create new instance $form = new simbio_form_table_AJAX('mainForm', $_SERVER['PHP_SELF'], 'post'); $form->submit_button_attr = 'name="updateData" value="' . __('Save Settings') . '" class="btn btn-default"'; // form table attributes $form->table_attr = 'align="center" id="dataList" cellpadding="5" cellspacing="0"'; $form->table_header_attr = 'class="alterCell" style="font-weight: bold;"'; $form->table_content_attr = 'class="alterCell2"'; // load settings from database utility::loadSettings($dbs); // version status $form->addAnything('Senayan Version', '<strong>' . SENAYAN_VERSION . '</strong>'); // library name $form->addTextField('text', 'library_name', __('Library Name'), $sysconf['library_name'], 'style="width: 100%;"'); // library subname $form->addTextField('text', 'library_subname', __('Library Subname'), $sysconf['library_subname'], 'style="width: 100%;"'); /* Form Element(s) */ // public template // scan template directory $template_dir = SB . $sysconf['template']['dir']; $dir = new simbio_directory($template_dir); $dir_tree = $dir->getDirectoryTree(1); // sort array by index ksort($dir_tree); // loop array foreach ($dir_tree as $dir) { $tpl_options[] = array($dir, $dir);
$form->submit_button_attr = 'name="saveData" value="' . __('Update') . '" class="button"'; } /* Form Element(s) */ // group $form->addTextField('text', 'groupName', __('Group Name') . '*', $rec_d['group_name'], 'style="width: 60%;"'); // privileges // get group access data $priv_data = array(); $rec_q = $dbs->query('SELECT * FROM group_access WHERE group_id=' . (!empty($rec_d['group_id']) ? $rec_d['group_id'] : 0)); while ($access_data = $rec_q->fetch_assoc()) { $priv_data[$access_data['module_id']]['r'] = $access_data['r']; $priv_data[$access_data['module_id']]['w'] = $access_data['w']; } $priv_table = ''; include 'module_priv_form.inc.php'; $form->addAnything(__('Privileges'), $priv_table); // edit mode messagge if ($form->edit_mode) { // print out the object echo '<div class="infoBox">' . __('You are going to edit Group data') . ' : <b>' . $rec_d['group_name'] . '</b> <br />' . __('Last Update') . $rec_d['last_update'] . '</div>'; //mfc } echo $form->printOut(); } else { /* GROUP LIST */ // table spec $table_spec = 'user_group AS ug'; // create datagrid $datagrid = new simbio_datagrid(); $datagrid->setSQLColumn('ug.group_id', 'ug.group_name AS \'' . __('Group Name') . '\'', 'ug.last_update AS \'' . __('Last Update') . '\''); $datagrid->setSQLorder('group_name ASC');
utility::writeLogs($dbs, 'staff', $_SESSION['uid'], 'system', $_SESSION['realname'] . ' change application global configuration'); utility::jsAlert(__('Settings saved. Refreshing page')); echo '<script type="text/javascript">parent.location.href = \'../../index.php?mod=system\';</script>'; } /* Config Vars update process end */ // create new instance $form = new simbio_form_table_AJAX('mainForm', $_SERVER['PHP_SELF'], 'post'); $form->submit_button_attr = 'name="updateData" value="' . __('Save Settings') . '" class="button"'; // form table attributes $form->table_attr = 'align="center" id="dataList" cellpadding="5" cellspacing="0"'; $form->table_header_attr = 'class="alterCell" style="font-weight: bold;"'; $form->table_content_attr = 'class="alterCell2"'; // load settings from database utility::loadSettings($dbs); // version status $form->addAnything('UCS Version', '<strong>' . UCS_VERSION . '</strong>'); // library name $form->addTextField('text', 'library_name', __('Library Name'), $sysconf['server']['name'], 'style="width: 100%;"'); // library subname $form->addTextField('text', 'library_subname', __('Library Subname'), $sysconf['server']['subname'], 'style="width: 100%;"'); /* Form Element(s) */ // public template // scan template directory $template_dir = UCS_BASE_DIR . 'themes'; $dir = new simbio_directory($template_dir); $dir_tree = $dir->getDirectoryTree(1); // sort array by index ksort($dir_tree); // loop array foreach ($dir_tree as $dir) { $tpl_options[] = array($dir, $dir);
foreach ($sysconf['system_user_type'] as $id => $name) { $utype_options[] = array($id, $name); } $form->addSelectList('userType', __('User Type') . '*', $utype_options, $rec_d['user_type']); // user e-mail $form->addTextField('text', 'eMail', __('E-Mail'), $rec_d['email'], 'style="width: 50%;"'); // social media link $str_input = ''; $social_media = array(); if ($rec_d['social_media']) { $social_media = @unserialize($rec_d['social_media']); } foreach ($sysconf['social'] as $id => $social) { $str_input .= '<div class="social-input"><span class="social-label">' . $social . '</span><span class="social-form"><input type="text" name="social[' . $id . ']" value="' . (isset($social_media[$id]) ? $social_media[$id] : '') . '" placeholder="' . $social . '" /></span></div>' . "\n"; } $form->addAnything(__('Social Media'), $str_input); // user photo $str_input = ''; if ($rec_d['user_image']) { $str_input = '<div id="imageFilename"><a href="' . SWB . 'images/persons/' . $rec_d['user_image'] . '" class="openPopUp notAJAX"><strong>' . $rec_d['user_image'] . '</strong></a> <a href="' . MWB . 'system/app_user.php" postdata="removeImage=true&uimg=' . $itemID . '&img=' . $rec_d['user_image'] . '" loadcontainer="imageFilename" class="makeHidden removeImage">' . __('REMOVE IMAGE') . '</a></div>'; } $str_input .= simbio_form_element::textField('file', 'image'); $str_input .= ' ' . __('Maximum') . ' ' . $sysconf['max_image_upload'] . ' KB'; if ($sysconf['webcam'] !== false) { $str_input .= '<p>' . __('or take a photo') . '</p>'; $str_input .= '<textarea id="base64picstring" name="base64picstring" style="display: none;"></textarea>'; $str_input .= '<button id="btn_load" onclick="loadcam(this)">' . __('Load Camera') . '</button> | '; $str_input .= __('Ratio:') . ' <select onchange="aspect(this)"><option value="1">1x1</option><option value="2" selected>2x3</option><option value="3">3x4</option></select> | '; $str_input .= __('Format:') . ' <select id="cmb_format" onchange="if(pause){set();}"><option value="png">PNG</option><option value="jpg">JPEG</option></select> | '; $str_input .= '<button id="btn_pause" onclick="snapshot(this)" disabled>' . __('Capture') . '</button> | '; $str_input .= '<button id="btn_reset" onclick="$(\'textarea#base64picstring\').val(\'\');">' . __('Reset') . '</button>';
<fieldset class="menuBox"> <div class="menuBoxInner importIcon"> <?php echo strtoupper(__('Import Data')) . '<hr />' . __('Import for members data from CSV file'); ?> </div> </fieldset> <div id="importInfo" class="infoBox" style="display: none;"> </div><div id="importError" class="errorBox" style="display: none;"> </div> <?php // create new instance $form = new simbio_form_table_AJAX('mainForm', $_SERVER['PHP_SELF'] . '', 'post'); $form->submit_button_attr = 'name="doImport" value="' . __('Import Now') . '" class="button"'; // form table attributes $form->table_attr = 'align="center" id="dataList" cellpadding="5" cellspacing="0"'; $form->table_header_attr = 'class="alterCell" style="font-weight: bold;"'; $form->table_content_attr = 'class="alterCell2"'; /* Form Element(s) */ // csv files $str_input = simbio_form_element::textField('file', 'importFile'); $str_input .= ' Maximum ' . $sysconf['max_upload'] . ' KB'; $form->addAnything(__('File To Import') . '*', $str_input); // field separator $form->addTextField('text', 'fieldSep', __('Field Separator') . '*', '' . htmlentities(',') . '', 'style="width: 10%;"'); // field enclosed $form->addTextField('text', 'fieldEnc', __('Field Enclosed With') . '*', '' . htmlentities('"') . '', 'style="width: 10%;"'); // number of records to import $form->addTextField('text', 'recordNum', __('Number of Records To Export (0 for all records)'), '0', 'style="width: 10%;"'); // records offset $form->addTextField('text', 'recordOffset', __('Start From Record'), '1', 'style="width: 10%;"'); // output the form echo $form->printOut();
} $biblio_q = $dbs->query('SELECT biblio_id, title, call_number FROM biblio WHERE biblio_id=' . $biblioID); $biblio_d = $biblio_q->fetch_assoc(); $b_title = $biblio_d['title']; $b_id = $biblio_d['biblio_id']; $def_call_number = $biblio_d['call_number']; } /* Form Element(s) */ // title if (!$in_pop_up) { $str_input = $b_title; $str_input .= '<div class="makeHidden"><a title="Edit Bibliographic Data" style="font-weight: bold; color: #ff9900;" href="javascript: openWin(\'' . MODULES_WEB_ROOT_DIR . 'bibliography/pop_biblio.php?inPopUp=true&action=detail&itemID=' . $rec_d['biblio_id'] . '&itemCollID=' . $rec_d['item_id'] . '\', \'popBiblio\', 600, 400, true)">Edit Biblographic data</a></div>'; } else { $str_input = $b_title; } $form->addAnything(lang_mod_biblio_item_field_title, $str_input); $form->addHidden('biblioTitle', $b_title); $form->addHidden('biblioID', $b_id); // item code $str_input = simbio_form_element::textField('text', 'itemCode', $rec_d['item_code'], 'onblur="ajaxCheckID(\'' . SENAYAN_WEB_ROOT_DIR . 'admin/AJAX_check_id.php\', \'item\', \'item_code\', \'msgBox\', \'itemCode\')" style="width: 40%;"'); $str_input .= ' <span id="msgBox"> </span>'; $form->addAnything(lang_mod_biblio_item_field_itemcode, $str_input); // call number $form->addTextField('text', 'callNumber', lang_mod_biblio_field_call_number, isset($rec_d['call_number']) ? $rec_d['call_number'] : $def_call_number, 'style="width: 40%;"'); // inventory code $form->addTextField('text', 'inventoryCode', lang_mod_biblio_item_field_inventory, $rec_d['inventory_code'], 'style="width: 100%;"'); // item location // get location data related to this record from database $location_q = $dbs->query("SELECT location_id, location_name FROM mst_location"); $location_options = array(); while ($location_d = $location_q->fetch_row()) {
$form->submit_button_attr = 'name="saveData" value="' . lang_sys_common_form_update . '" class="button"'; // element visibility class toogle $visibility = 'makeHidden'; } /* Form Element(s) */ // biblio title $form->addTextField('textarea', 'title', lang_mod_biblio_field_title . '*', $rec_d['title'], 'rows="1" style="width: 100%; overflow: auto;"'); // biblio edition $form->addTextField('text', 'edition', lang_mod_biblio_field_edition, $rec_d['edition'], 'style="width: 40%;"'); // biblio specific detail info/area $form->addTextField('textarea', 'specDetailInfo', lang_mod_biblio_field_specific_detail, $rec_d['spec_detail_info'], 'rows="2" style="width: 100%"'); // biblio item add if (!$in_pop_up and $form->edit_mode) { $str_input = '<div class="makeHidden"><a href="javascript: openWin(\'' . MODULES_WEB_ROOT_DIR . 'bibliography/pop_item.php?inPopUp=true&action=detail&biblioID=' . $rec_d['biblio_id'] . '\', \'popItem\', 600, 400, true)">' . lang_mod_biblio_link_item_add . '</a></div>'; $str_input .= '<iframe name="itemIframe" id="itemIframe" class="borderAll" style="width: 100%; height: 70px;" src="' . MODULES_WEB_ROOT_DIR . 'bibliography/iframe_item_list.php?biblioID=' . $rec_d['biblio_id'] . '"></iframe>' . "\n"; $form->addAnything('Item(s) Data', $str_input); } // biblio authors $str_input = '<div class="' . $visibility . '"><a href="javascript: openWin(\'' . MODULES_WEB_ROOT_DIR . 'bibliography/pop_author.php?biblioID=' . $rec_d['biblio_id'] . '\', \'popAuthor\', 500, 200, true)">' . lang_mod_biblio_link_author_add . '</a></div>'; $str_input .= '<iframe name="authorIframe" id="authorIframe" class="borderAll" style="width: 100%; height: 70px;" src="' . MODULES_WEB_ROOT_DIR . 'bibliography/iframe_author.php?biblioID=' . $rec_d['biblio_id'] . '"></iframe>'; $form->addAnything(lang_mod_biblio_field_authors, $str_input); // biblio gmd // get gmd data related to this record from database $gmd_q = $dbs->query('SELECT gmd_id, gmd_name FROM mst_gmd'); $gmd_options = array(); while ($gmd_d = $gmd_q->fetch_row()) { $gmd_options[] = array($gmd_d[0], $gmd_d[1]); } $form->addSelectList('gmdID', lang_mod_biblio_field_gmd, $gmd_options, $rec_d['gmd_id']); // biblio publish frequencies // get frequency data related to this record from database
?> <hr /> <?php echo lang_mod_biblio_import_header_text; ?> </div> </fieldset> <div id="importInfo" class="infoBox" style="display: none;"> </div><div id="importError" class="errorBox" style="display: none;"> </div> <?php // create new instance $form = new simbio_form_table_AJAX('mainForm', $_SERVER['PHP_SELF'], 'post'); $form->submit_button_attr = 'name="doImport" value="' . lang_mod_biblio_import_form_button_start . '" class="button"'; // form table attributes $form->table_attr = 'align="center" id="dataList" cellpadding="5" cellspacing="0"'; $form->table_header_attr = 'class="alterCell" style="font-weight: bold;"'; $form->table_content_attr = 'class="alterCell2"'; /* Form Element(s) */ // csv files $str_input = simbio_form_element::textField('file', 'importFile'); $str_input .= ' Maximum ' . $sysconf['max_upload'] . ' KB'; $form->addAnything(lang_mod_biblio_import_form_field_file_input, $str_input); // field separator $form->addTextField('text', 'fieldSep', lang_mod_biblio_import_form_field_separator, '' . htmlentities(',') . '', 'style="width: 10%;" maxlength="3"'); // field enclosed $form->addTextField('text', 'fieldEnc', lang_mod_biblio_import_form_field_enclosed, '' . htmlentities('"') . '', 'style="width: 10%;"'); // number of records to import $form->addTextField('text', 'recordNum', lang_mod_biblio_import_form_field_rec_to_export, '0', 'style="width: 10%;"'); // records offset $form->addTextField('text', 'recordOffset', lang_mod_biblio_import_form_field_rec_start, '1', 'style="width: 10%;"'); // output the form echo $form->printOut();
$gmd_q = $dbs->query('SELECT gmd_id, gmd_name FROM mst_gmd'); $gmd_options[] = array('0', lang_mod_stocktake_init_field_option_all); while ($gmd_d = $gmd_q->fetch_row()) { $gmd_options[] = array($gmd_d[0], $gmd_d[1]); } $form->addSelectList('gmdID', lang_mod_stocktake_init_field_GMD, $gmd_options); // collection type // get coll_type data related to this record from database $coll_type_q = $dbs->query('SELECT coll_type_id, coll_type_name FROM mst_coll_type'); $coll_type_options[] = array('0', lang_mod_stocktake_init_field_option_all); while ($coll_type_d = $coll_type_q->fetch_row()) { $coll_type_options[] = array($coll_type_d[0], $coll_type_d[1]); } $form->addSelectList('collTypeID', lang_mod_stocktake_init_field_colltype, $coll_type_options); // location // get language data related to this record from database $location_q = $dbs->query("SELECT location_id, location_name FROM mst_location"); $location_options[] = array('0', lang_mod_stocktake_init_field_option_all); while ($location_d = $location_q->fetch_row()) { $location_options[] = array($location_d[0], $location_d[1]); } $form->addSelectList('location', lang_mod_stocktake_init_field_location, $location_options); // item site $form->addTextField('text', 'itemSite', lang_mod_stocktake_init_field_site, '', 'style="width: 20%;"'); // classification; $str_input = simbio_form_element::textField('text', 'classification', '', 'style="width: 60%;"'); $str_input .= '<br />' . lang_mod_stocktake_init_field_class_text; $form->addAnything(lang_mod_stocktake_init_field_classification, $str_input); // print out the object echo $form->printOut(); }
$form->edit_mode = true; // record ID for delete process $form->record_id = $itemID; // form record title $form->record_title = str_ireplace('label-', '', $rec_d['label_name']); // submit button attribute $form->submit_button_attr = 'name="saveData" value="' . lang_sys_common_form_update . '" class="button"'; } /* Form Element(s) */ // label name $form->addTextField('text', 'labelName', lang_mod_masterfile_label_form_field_label_name . '*', $rec_d['label_name'], 'style="width: 60%;" maxlength="20"'); // label image if (empty($rec_d['label_image'])) { $str_input = simbio_form_element::textField('file', 'labelImage'); $str_input .= ' Maximum ' . $sysconf['max_image_upload'] . ' KB. All image will be automatically resized.'; $form->addAnything(lang_mod_biblio_field_attachment, $str_input); } else { $str_input = '<div><img src="' . SENAYAN_WEB_ROOT_DIR . IMAGES_DIR . '/labels/' . $rec_d['label_image'] . '" align="middle" /> <strong>' . $rec_d['label_image'] . '</strong></div>'; $str_input .= simbio_form_element::textField('file', 'labelImage'); $str_input .= ' Maximum ' . $sysconf['max_image_upload'] . ' KB. All image will be automatically resized.'; $form->addAnything(lang_mod_biblio_field_attachment, $str_input); } // label desc $form->addTextField('text', 'labelDesc', lang_mod_masterfile_label_form_field_label_desc, $rec_d['label_desc'], 'style="width: 100%;" maxlength="50"'); // edit mode messagge if ($form->edit_mode) { echo '<div class="infoBox">' . lang_mod_masterfile_label_common_edit_info . ' : <b>' . $rec_d['label_name'] . ' - ' . $rec_d['label_desc'] . '</b> <br />' . lang_mod_masterfile_label_common_last_update . $rec_d['last_update'] . '</div>'; } // print out the form object echo $form->printOut(); } else {
} /* Form Element(s) */ // biblio title $form->addTextField('textarea', 'title', __('Title') . '*', $rec_d['title'], 'rows="1" style="width: 100%; overflow: auto;"'); // modified by hendro wicaksono // biblio sor statement of responsibility $form->addTextField('text', 'sor', __('Statement of Responsibility'), $rec_d['sor'], 'style="width: 40%;"'); // end of modification // biblio edition $form->addTextField('text', 'edition', __('Edition'), $rec_d['edition'], 'style="width: 40%;"'); // biblio specific detail info/area $form->addTextField('textarea', 'specDetailInfo', __('Specific Detail Info'), $rec_d['spec_detail_info'], 'rows="2" style="width: 100%"'); // biblio item batch add $str_input = __('Pattern') . ': <input type="text" class="small_input" name="itemCodePattern" value="' . $sysconf['batch_item_code_pattern'] . '" /> '; $str_input .= __('From') . ': <input type="text" class="small_input" name="itemCodeStart" value="0" /> ' . __('To') . ' <input type="text" class="small_input" name="itemCodeEnd" value="0" />'; $form->addAnything(__('Item(s) code batch generator'), $str_input); // biblio item add if (!$in_pop_up and $form->edit_mode) { $str_input = '<div class="makeHidden"><a class="notAJAX button" href="javascript: openHTMLpop(\'' . MODULES_WEB_ROOT_DIR . 'bibliography/pop_item.php?inPopUp=true&action=detail&biblioID=' . $rec_d['biblio_id'] . '\', 650, 400, \'' . __('Items/Copies') . '\')">' . __('Add New Items') . '</a></div>'; $str_input .= '<iframe name="itemIframe" id="itemIframe" class="borderAll" style="width: 100%; height: 70px;" src="' . MODULES_WEB_ROOT_DIR . 'bibliography/iframe_item_list.php?biblioID=' . $rec_d['biblio_id'] . '&block=1"></iframe>' . "\n"; $form->addAnything(__('Item(s) Data'), $str_input); } // biblio authors $str_input = '<div class="' . $visibility . '"><a class="notAJAX button" href="javascript: openHTMLpop(\'' . MODULES_WEB_ROOT_DIR . 'bibliography/pop_author.php?biblioID=' . $rec_d['biblio_id'] . '\', 500, 200, \'' . __('Authors/Roles') . '\')">' . __('Add Author(s)') . '</a></div>'; $str_input .= '<iframe name="authorIframe" id="authorIframe" class="borderAll" style="width: 100%; height: 70px;" src="' . MODULES_WEB_ROOT_DIR . 'bibliography/iframe_author.php?biblioID=' . $rec_d['biblio_id'] . '&block=1"></iframe>'; $form->addAnything(__('Author(s)'), $str_input); // biblio gmd // get gmd data related to this record from database $gmd_q = $dbs->query('SELECT gmd_id, gmd_name FROM mst_gmd'); $gmd_options = array(); while ($gmd_d = $gmd_q->fetch_row()) {
// check if member expired $curr_date = date('Y-m-d'); $compared_date = simbio_date::compareDates($rec_d['expire_date'], $curr_date); $is_expired = $compared_date == $curr_date; $expired_message = ''; if ($is_expired) { // extend membership $chbox_array[] = array('1', lang_mod_membership_field_extend); $form->addCheckBox('extend', lang_mod_membership_field_extend_membership, $chbox_array); $expired_message = '<b style="color: #FF0000;">(' . lang_mod_membership_common_error_membership_expired . ')</b>'; } } // member code $str_input = simbio_form_element::textField('text', 'memberID', $rec_d['member_id'], 'id="memberID" onblur="ajaxCheckID(\'' . SENAYAN_WEB_ROOT_DIR . 'admin/AJAX_check_id.php\', \'member\', \'member_id\', \'msgBox\', \'memberID\')" style="width: 30%;"'); $str_input .= ' <span id="msgBox"> </span>'; $form->addAnything(lang_mod_membership_field_member_id . '*', $str_input); // member name $form->addTextField('text', 'memberName', lang_mod_membership_field_name . '*', $rec_d['member_name'], 'style="width: 100%;"'); // member birth date $form->addDateField('birthDate', lang_mod_membership_field_birth_date, $rec_d['birth_date']); if ($form->edit_mode) { // member since $form->addAnything(lang_mod_membership_field_member_since, $rec_d['member_since_date']); } // member register date $form->addDateField('regDate', lang_mod_membership_field_register_date, $rec_d['register_date']); // member expire date if ($form->edit_mode) { $form->addDateField('expDate', lang_mod_membership_field_expiry_date, $rec_d['expire_date']); } else { $chbox_array[] = array('1', lang_mod_membership_field_opt_autoset);
$_sql_rec_cust_q = sprintf('SELECT * FROM biblio_custom WHERE biblio_id=%d', $itemID); $rec_cust_q = $dbs->query($_sql_rec_cust_q); $rec_cust_d = $rec_cust_q->fetch_assoc(); } // include custom fields file if (file_exists(MDLBS . 'bibliography/custom_fields.inc.php')) { include MDLBS . 'bibliography/custom_fields.inc.php'; } /* Form Element(s) */ // biblio title $form->addTextField('textarea', 'title', __('Title') . '*', $rec_d['title'], 'rows="1" style="width: 100%; overflow: auto;"', __('Main title of collection. Separate child title with colon and pararel title with equal (=) sign.')); // biblio authors // $str_input = '<div class="'.$visibility.'"><a class="notAJAX button" href="javascript: openHTMLpop(\''.MWB.'bibliography/pop_author.php?biblioID='.$rec_d['biblio_id'].'\', 500, 200, \''.__('Authors/Roles').'\')">'.__('Add Author(s)').'</a></div>'; $str_input = '<div class="' . $visibility . '"><a class="notAJAX button btn btn-info openPopUp" href="' . MWB . 'bibliography/pop_author.php?biblioID=' . $rec_d['biblio_id'] . '" title="' . __('Authors/Roles') . '">' . __('Add Author(s)') . '</a></div>'; $str_input .= '<iframe name="authorIframe" id="authorIframe" class="borderAll" style="width: 100%; height: 70px;" src="' . MWB . 'bibliography/iframe_author.php?biblioID=' . $rec_d['biblio_id'] . '&block=1"></iframe>'; $form->addAnything(__('Author(s)'), $str_input); // modified by hendro wicaksono // biblio sor statement of responsibility $form->addTextField('text', 'sor', __('Statement of Responsibility'), $rec_d['sor'], 'style="width: 40%;"', __('Main source of information to show who has written, composed, illustrated, or in other ways contributed to the existence of the item.')); // end of modification // biblio edition $form->addTextField('text', 'edition', __('Edition'), $rec_d['edition'], 'style="width: 40%;"', __('A version of publication having substantial changes or additions.')); // biblio specific detail info/area $form->addTextField('textarea', 'specDetailInfo', __('Specific Detail Info'), $rec_d['spec_detail_info'], 'rows="2" style="width: 100%"', __('explain more details about an item e.g. scale within a map, running time in a movie dvd.')); // biblio item batch add $str_input = __('Pattern') . ': <input type="text" class="small_input" name="itemCodePattern" value="' . $sysconf['batch_item_code_pattern'] . '" /> '; $str_input .= __('From') . ': <input type="text" class="small_input" name="itemCodeStart" value="0" /> ' . __('To') . ' <input type="text" class="small_input" name="itemCodeEnd" value="0" /> '; // get collection type data related to this record from database $coll_type_q = $dbs->query("SELECT coll_type_id, coll_type_name FROM mst_coll_type"); $coll_type_options = array(); while ($coll_type_d = $coll_type_q->fetch_row()) {
// subject $form->addTextField('text', 'topic', __('Subject') . '*', $rec_d['topic'], 'style="width: 60%;"'); // classification $form->addTextField('text', 'class', __('Classification Code'), $rec_d['classification'], 'style="width: 30%;"'); // subject type foreach ($sysconf['subject_type'] as $subj_type_id => $subj_type) { $subj_type_options[] = array($subj_type_id, $subj_type); } $form->addSelectList('subjectType', __('Subject Type'), $subj_type_options, $rec_d['topic_type']); // authority list $form->addTextField('text', 'authList', __('Authority Files'), $rec_d['auth_list'], 'style="width: 30%;"'); // vocabolary control if (!$in_pop_up and $form->edit_mode) { $str_input = '<div class="makeHidden"><a class="notAJAX button btn btn-info openPopUp" href="' . MWB . 'master_file/pop_vocabolary_control.php?itemID=' . $itemID . '" title="' . __('Vocabulary Control') . '" height="400">' . __('Add New Vocabulary') . '</a></div>'; $str_input .= '<iframe name="itemIframe" id="itemIframe" class="borderAll" style="width: 98%; height: 200px;" src="' . MWB . 'master_file/iframe_vocabolary_control.php?itemID=' . $itemID . '"></iframe>' . "\n"; $form->addAnything(__('Vocabulary Control'), $str_input); } // edit mode messagge if ($form->edit_mode) { echo '<div class="infoBox">' . __('You are going to edit Subject data') . ' : <b>' . $rec_d['topic'] . '</b> <br />' . __('Last Update') . $rec_d['last_update'] . '</div>'; //mfc } // print out the form object echo $form->printOut(); } else { /* TOPIC LIST */ // table spec $sql_criteria = 't.topic_id >= 1'; if (isset($_GET['type']) && $_GET['type'] == 'orphaned') { $table_spec = 'mst_topic AS t LEFT JOIN biblio_topic AS bt ON t.topic_id=bt.topic_id'; $sql_criteria = 'bt.biblio_id IS NULL OR bt.topic_id IS NULL';
} $biblio_q = $dbs->query('SELECT biblio_id, title, call_number FROM biblio WHERE biblio_id=' . $biblioID); $biblio_d = $biblio_q->fetch_assoc(); $b_title = $biblio_d['title']; $b_id = $biblio_d['biblio_id']; $def_call_number = $biblio_d['call_number']; } /* Form Element(s) */ // title if (!$in_pop_up) { $str_input = $b_title; $str_input .= '<div class="makeHidden"><a title="Edit Bibliographic Data" class="notAJAX" style="font-weight: bold; color: #f90;" href="javascript: openHTMLpop(\'' . MODULES_WEB_ROOT_DIR . 'bibliography/pop_biblio.php?inPopUp=true&action=detail&itemID=' . $rec_d['biblio_id'] . '&itemCollID=' . $rec_d['item_id'] . '\', 650, 500, \'' . __('Edit Biblographic data') . '\')">' . __('Edit Biblographic data') . '</a></div>'; } else { $str_input = $b_title; } $form->addAnything(__('Title'), $str_input); $form->addHidden('biblioTitle', $b_title); $form->addHidden('biblioID', $b_id); // item code $str_input = simbio_form_element::textField('text', 'itemCode', $rec_d['item_code'], 'onblur="ajaxCheckID(\'' . SENAYAN_WEB_ROOT_DIR . 'admin/AJAX_check_id.php\', \'item\', \'item_code\', \'msgBox\', \'itemCode\')" style="width: 40%;"'); $str_input .= ' <span id="msgBox"> </span>'; $form->addAnything(__('Item Code'), $str_input); // call number $form->addTextField('text', 'callNumber', __('Call Number'), isset($rec_d['call_number']) ? $rec_d['call_number'] : $def_call_number, 'style="width: 40%;"'); // inventory code $form->addTextField('text', 'inventoryCode', __('Inventory Code'), $rec_d['inventory_code'], 'style="width: 100%;"'); // item location // get location data related to this record from database $location_q = $dbs->query("SELECT location_id, location_name FROM mst_location"); $location_options = array(); while ($location_d = $location_q->fetch_row()) {
if (isset($_GET['type'])) { $type = trim($_GET['type']); } if (!in_array($type, array('barcode', 'label', 'membercard'))) { $type = 'barcode'; } // include printed settings configuration file include SB . 'admin' . DS . 'admin_template' . DS . 'printed_settings.inc.php'; // check for custom template settings $custom_settings = SB . 'admin' . DS . $sysconf['admin_template']['dir'] . DS . $sysconf['template']['theme'] . DS . 'printed_settings.inc.php'; if (file_exists($custom_settings)) { include $custom_settings; } // create form instance $form = new simbio_form_table_AJAX('mainForm', $_SERVER['PHP_SELF'], 'post'); $form->submit_button_attr = 'name="updateSettings" value="' . __('Save Settings') . '" class="btn btn-primary"'; // form table attributes $form->table_attr = 'align="center" id="dataList" cellpadding="5" cellspacing="0"'; $form->table_header_attr = 'class="alterCell" style="font-weight: bold;"'; $form->table_content_attr = 'class="alterCell2"'; // load print settings from database loadPrintSettings($dbs, $type); $form->addAnything(__('Print setting for'), ucwords($type)); foreach ($sysconf['print'][$type] as $setting_name => $val) { $setting_name_label = ucwords(str_ireplace('_', ' ', $setting_name)); $form->addTextField('text', $type . '[' . $setting_name . ']', __($setting_name_label), $val, 'style="width: 90%;"'); } $form->addHidden('settingType', $type); // print out the object echo $form->printOut(); /* main content end */
// submit button attribute $form->submit_button_attr = 'name="saveData" value="' . __('Update') . '" class="button"'; // element visibility class toogle $visibility = 'makeHidden'; } /* Form Element(s) */ // biblio title $form->addTextField('textarea', 'title', __('Title') . '*', $rec_d['title'], 'rows="1" style="width: 100%; overflow: auto;"'); // biblio edition $form->addTextField('text', 'edition', __('Edition'), $rec_d['edition'], 'style="width: 40%;"'); // biblio specific detail info/area $form->addTextField('textarea', 'specDetailInfo', __('Specific Detail Info'), $rec_d['spec_detail_info'], 'rows="2" style="width: 100%"'); // biblio authors $str_input = '<div class="' . $visibility . '"><a class="notAJAX" href="javascript: openWin(\'' . MODULES_WEB_ROOT_DIR . 'bibliography/pop_author.php?biblioID=' . $rec_d['biblio_id'] . '\', \'popAuthor\', 500, 200, true)">' . __('Add Author(s)') . '</a></div>'; $str_input .= '<iframe name="authorIframe" id="authorIframe" class="borderAll" style="width: 100%; height: 70px;" src="' . MODULES_WEB_ROOT_DIR . 'bibliography/iframe_author.php?biblioID=' . $rec_d['biblio_id'] . '&block=1"></iframe>'; $form->addAnything(__('Author(s)'), $str_input); // biblio gmd // get gmd data related to this record from database $gmd_q = $dbs->query('SELECT gmd_id, gmd_name FROM mst_gmd'); $gmd_options = array(); while ($gmd_d = $gmd_q->fetch_row()) { $gmd_options[] = array($gmd_d[0], $gmd_d[1]); } $form->addSelectList('gmdID', __('GMD'), $gmd_options, $rec_d['gmd_id']); // biblio publish frequencies // get frequency data related to this record from database $freq_q = $dbs->query('SELECT frequency_id, frequency FROM mst_frequency'); $freq_options[] = array('0', strtoupper(__('Not Applicable'))); while ($freq_d = $freq_q->fetch_row()) { $freq_options[] = array($freq_d[0], $freq_d[1]); }
$gmd_q = $dbs->query('SELECT gmd_id, gmd_name FROM mst_gmd'); $gmd_options[] = array('0', __('ALL')); while ($gmd_d = $gmd_q->fetch_row()) { $gmd_options[] = array($gmd_d[0], $gmd_d[1]); } $form->addSelectList('gmdID', __('GMD'), $gmd_options); // collection type // get coll_type data related to this record from database $coll_type_q = $dbs->query('SELECT coll_type_id, coll_type_name FROM mst_coll_type'); $coll_type_options[] = array('0', __('ALL')); while ($coll_type_d = $coll_type_q->fetch_row()) { $coll_type_options[] = array($coll_type_d[0], $coll_type_d[1]); } $form->addSelectList('collTypeID', __('Collection Type'), $coll_type_options); // location // get language data related to this record from database $location_q = $dbs->query("SELECT location_id, location_name FROM mst_location"); $location_options[] = array('0', __('ALL')); while ($location_d = $location_q->fetch_row()) { $location_options[] = array($location_d[0], $location_d[1]); } $form->addSelectList('location', __('Location'), $location_options); // item site $form->addTextField('text', 'itemSite', __('Shelf Location'), '', 'style="width: 20%;"'); // classification; $str_input = simbio_form_element::textField('text', 'classification', '', 'style="width: 60%;"'); $str_input .= '<br />' . __('Separate each class comma sign. Use * for wildcard'); $form->addAnything(__('Classification'), $str_input); // print out the object echo $form->printOut(); }
// include custom fields file if (file_exists(MODULES_BASE_DIR . 'bibliography/custom_fields.inc.php')) { include MODULES_BASE_DIR . 'bibliography/custom_fields.inc.php'; } /* Form Element(s) */ // biblio title $form->addTextField('textarea', 'title', __('Title') . '*', $rec_d['title'], 'rows="1" style="width: 100%; overflow: auto;"'); // biblio edition $form->addTextField('text', 'edition', __('Edition'), $rec_d['edition'], 'style="width: 40%;"'); // biblio specific detail info/area $form->addTextField('textarea', 'specDetailInfo', __('Specific Detail Info'), $rec_d['spec_detail_info'], 'rows="2" style="width: 100%"'); // biblio item add if (!$in_pop_up and $form->edit_mode) { $str_input = '<div class="makeHidden"><a class="notAJAX" href="javascript: openHTMLpop(\'' . MODULES_WEB_ROOT_DIR . 'bibliography/pop_item.php?inPopUp=true&action=detail&biblioID=' . $rec_d['biblio_id'] . '\', 650, 400, \'' . __('Items/Copies') . '\')">' . __('Add New Items') . '</a></div>'; $str_input .= '<iframe name="itemIframe" id="itemIframe" class="borderAll" style="width: 100%; height: 70px;" src="' . MODULES_WEB_ROOT_DIR . 'bibliography/iframe_item_list.php?biblioID=' . $rec_d['biblio_id'] . '&block=1"></iframe>' . "\n"; $form->addAnything('Item(s) Data', $str_input); } // biblio authors $str_input = '<div class="' . $visibility . '"><a class="notAJAX" href="javascript: openHTMLpop(\'' . MODULES_WEB_ROOT_DIR . 'bibliography/pop_author.php?biblioID=' . $rec_d['biblio_id'] . '\', 500, 200, \'' . __('Authors/Roles') . '\')">' . __('Add Author(s)') . '</a></div>'; $str_input .= '<iframe name="authorIframe" id="authorIframe" class="borderAll" style="width: 100%; height: 70px;" src="' . MODULES_WEB_ROOT_DIR . 'bibliography/iframe_author.php?biblioID=' . $rec_d['biblio_id'] . '&block=1"></iframe>'; $form->addAnything(__('Author(s)'), $str_input); // biblio gmd // get gmd data related to this record from database $gmd_q = $dbs->query('SELECT gmd_id, gmd_name FROM mst_gmd'); $gmd_options = array(); while ($gmd_d = $gmd_q->fetch_row()) { $gmd_options[] = array($gmd_d[0], $gmd_d[1]); } $form->addSelectList('gmdID', __('GMD'), $gmd_options, $rec_d['gmd_id']); // biblio publish frequencies // get frequency data related to this record from database
// check if member expired $curr_date = date('Y-m-d'); $compared_date = simbio_date::compareDates($rec_d['expire_date'], $curr_date); $is_expired = $compared_date == $curr_date; $expired_message = ''; if ($is_expired) { // extend membership $chbox_array[] = array('1', __('Extend')); $form->addCheckBox('extend', __('Extend Membership'), $chbox_array); $expired_message = '<b style="color: #FF0000;">(' . __('Membership Already Expired') . ')</b>'; } } // member code $str_input = simbio_form_element::textField('text', 'memberID', $rec_d['member_id'], 'id="memberID" onblur="ajaxCheckID(\'' . SENAYAN_WEB_ROOT_DIR . 'admin/AJAX_check_id.php\', \'member\', \'member_id\', \'msgBox\', \'memberID\')" style="width: 30%;"'); $str_input .= ' <span id="msgBox"> </span>'; $form->addAnything(__('Member ID') . '*', $str_input); // member name $form->addTextField('text', 'memberName', __('Member Name') . '*', $rec_d['member_name'], 'style="width: 100%;"'); // member birth date $form->addDateField('birthDate', __('Birth Date'), $rec_d['birth_date']); if ($form->edit_mode) { // member since $form->addAnything(__('Member Since'), $rec_d['member_since_date']); } // member register date $form->addDateField('regDate', __('Register Date'), $rec_d['register_date']); // member expire date if ($form->edit_mode) { $form->addDateField('expDate', __('Expiry Date'), $rec_d['expire_date']); } else { $chbox_array[] = array('1', __('Auto Set'));
// check if member expired $curr_date = date('Y-m-d'); $compared_date = simbio_date::compareDates($rec_d['expire_date'], $curr_date); $is_expired = $compared_date == $curr_date; $expired_message = ''; if ($is_expired) { // extend membership $chbox_array[] = array('1', __('Extend')); $form->addCheckBox('extend', __('Extend Membership'), $chbox_array); $expired_message = '<b style="color: #FF0000;">(' . __('Membership Already Expired') . ')</b>'; } } // member code $str_input = simbio_form_element::textField('text', 'memberID', $rec_d['member_id'], 'id="memberID" onblur="ajaxCheckID(\'' . SENAYAN_WEB_ROOT_DIR . 'admin/AJAX_check_id.php\', \'member\', \'member_id\', \'msgBox\', \'memberID\')" style="width: 30%;"'); $str_input .= ' <span id="msgBox"> </span>'; $form->addAnything(__('Member ID') . '*', $str_input); // member name $form->addTextField('text', 'memberName', __('Member Name') . '*', $rec_d['member_name'], 'style="width: 100%;"'); // member birth date $form->addDateField('birthDate', __('Birth Date'), $rec_d['birth_date']); // member since date $form->addDateField('sinceDate', __('Member Since') . '*', $form->edit_mode ? $rec_d['member_since_date'] : date('Y-m-d')); // member register date $form->addDateField('regDate', __('Register Date') . '*', $form->edit_mode ? $rec_d['register_date'] : date('Y-m-d')); // member expire date if ($form->edit_mode) { $form->addDateField('expDate', __('Expiry Date') . '*', $rec_d['expire_date']); } else { $chbox_array[] = array('1', __('Auto Set')); $str_input = '<div>' . simbio_form_element::checkBox('extend', $chbox_array, '1') . '</div>'; $str_input .= '<div>' . simbio_form_element::dateField('expDate', $rec_d['expire_date']) . '</div>';
$form->submit_button_attr = 'name="saveData" value="' . lang_sys_common_form_update . '" class="button"'; } /* Form Element(s) */ // group $form->addTextField('text', 'groupName', lang_sys_conf_group_field_name . '*', $rec_d['group_name'], 'style="width: 60%;"'); // privileges // get group access data $priv_data = array(); $rec_q = $dbs->query('SELECT * FROM group_access WHERE group_id=' . (!empty($rec_d['group_id']) ? $rec_d['group_id'] : 0)); while ($access_data = $rec_q->fetch_assoc()) { $priv_data[$access_data['module_id']]['r'] = $access_data['r']; $priv_data[$access_data['module_id']]['w'] = $access_data['w']; } $priv_table = ''; include 'module_priv_form.inc.php'; $form->addAnything(lang_sys_conf_group_field_privileges, $priv_table); // edit mode messagge if ($form->edit_mode) { // print out the object echo '<div class="infoBox">' . lang_sys_conf_group_common_edit_info . ' : <b>' . $rec_d['group_name'] . '</b> <br />' . lang_sys_conf_group_common_last_update . $rec_d['last_update'] . '</div>'; } echo $form->printOut(); } else { /* GROUP LIST */ // table spec $table_spec = 'user_group AS ug'; // create datagrid $datagrid = new simbio_datagrid(); if ($can_read and $can_write) { $datagrid->setSQLColumn('ug.group_id', 'ug.group_name AS \'' . lang_sys_conf_group_field_name . '\'', 'ug.last_update AS \'' . lang_sys_conf_user_common_last_update . '\''); } else {