$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"'; // edit mode flag set if ($rec_q->num_rows > 0) { $form->edit_mode = true; // record ID for delete process $form->record_id = $itemID; // form record title $form->record_title = $rec_d[$type . '_type']; // submit button attribute $form->submit_button_attr = 'name="saveData" value="' . __('Update') . '" class="button"'; } /* Form Element(s) */ // cmc code $form->addTextField('text', 'code', __('Code') . '*', $rec_d['code'], 'style="width: 20%;" maxlength="3"'); // cmc name $form->addTextField('text', 'name', __('Name') . '*', $rec_d[$type . '_type'], 'style="width: 60%;"'); // marc leader code $form->addTextField('text', 'code2', __('MARC Leader Code') . '*', $rec_d['code2'], 'style="width: 20%;"'); // edit mode messagge if ($form->edit_mode) { echo '<div class="infoBox">' . __('You are going to edit ' . $type . ' data') . ' : <b>' . $rec_d[$type . '_type'] . '</b> <br />' . __('Last Update') . $rec_d['last_update'] . '</div>'; //mfc } // print out the form object echo $form->printOut(); } else { /* GMD LIST */ // table spec $table_spec = 'mst_' . $type . '_type AS g';
$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"'; // edit mode flag set if ($rec_q->num_rows > 0) { $form->edit_mode = true; // record ID for delete process $form->record_id = $itemID; // form record title $form->record_title = $rec_d['group_name']; // submit button attribute $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>';
$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->addAnything(__('Expiry Date') . '*', $str_input); }
$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"'; // edit mode flag set if ($rec_q->num_rows > 0) { $form->edit_mode = true; // record ID for delete process $form->record_id = $itemID; // form record title $form->record_title = $rec_d['language_name']; // submit button attribute $form->submit_button_attr = 'name="saveData" value="' . __('Update') . '" class="button"'; } /* Form Element(s) */ // language ID $form->addTextField('text', 'langID', __('Language Code') . '*', $rec_d['language_id'], 'style="width: 20%;" maxlength="5"'); // language_name $form->addTextField('text', 'langName', __('Language') . '*', $rec_d['language_name'], 'style="width: 60%;"'); // print out the form object echo '<div class="infoBox">' . __('You are going to edit language data') . ' : <b>' . $rec_d['language_name'] . '</b> <br />' . __('Last Update') . $rec_d['last_update'] . '</div>'; //mfc echo $form->printOut(); } else { /* DOCUMENT LANGUAGE LIST */ // table spec $table_spec = 'mst_language AS l'; // create datagrid $datagrid = new simbio_datagrid(); if ($can_read and $can_write) { $datagrid->setSQLColumn('l.language_id', 'l.language_name AS \'' . __('Language') . '\'', 'l.last_update AS \'' . __('Last Update') . '\''); } else {
$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"'; // edit mode flag set if ($rec_q->num_rows > 0) { $form->edit_mode = true; // record ID for delete process $form->record_id = $itemID; // form record title $form->record_title = $rec_d['item_status_name']; // submit button attribute $form->submit_button_attr = 'name="saveData" value="' . __('Update') . '" class="button"'; } /* Form Element(s) */ // item status code $form->addTextField('text', 'itemStatusID', __('Item Status Code') . '*', $rec_d['item_status_id'], 'style="width: 20%;" maxlength="3"'); // item status name $form->addTextField('text', 'itemStatus', __('Item Status Name') . '*', $rec_d['item_status_name'], 'style="width: 60%;"'); // item status rules $rules = array(); if ($rec_d['no_loan']) { $rules[] = NO_LOAN_TRANSACTION; } if ($rec_d['skip_stock_take']) { $rules[] = SKIP_STOCK_TAKE; } $form->addCheckbox('rules', __('Rules'), $rules_option, $rules); // edit mode messagge if ($form->edit_mode) { echo '<div class="infoBox">' . __('You are going to edit Item Status data') . ' : <b>' . $rec_d['item_status_name'] . '</b> <br />' . __('Last Update') . $rec_d['last_update'] . '</div>'; //mfc
echo __('EXPORT TOOL'); ?> <hr /> <?php echo __('Export bibliographics data to CSV file'); ?> </div> </fieldset> <?php // create new instance $form = new simbio_form_table_AJAX('mainForm', $_SERVER['PHP_SELF'], 'post'); $form->submit_button_attr = 'name="doExport" value="' . __('Export 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) */ // field separator $form->addTextField('text', 'fieldSep', __('Field Separator') . '*', '' . htmlentities(',') . '', 'style="width: 10%;" maxlength="3"'); // field enclosed $form->addTextField('text', 'fieldEnc', __('Field Enclosed With') . '*', '' . htmlentities('"') . '', 'style="width: 10%;"'); // record separator $rec_sep_options[] = array('NEWLINE', 'NEWLINE'); $rec_sep_options[] = array('RETURN', 'CARRIAGE RETURN'); $form->addSelectList('recordSep', __('Record Separator'), $rec_sep_options); // number of records to export $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();
$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"'; // edit mode flag set if ($rec_q->num_rows > 0) { $form->edit_mode = true; // record ID for delete process $form->record_id = $itemID; // form record title $form->record_title = $rec_d['author_name']; // submit button attribute $form->submit_button_attr = 'name="saveData" value="' . __('Update') . '" class="button"'; } /* Form Element(s) */ // author name $form->addTextField('text', 'authorName', __('Author Name') . '*', $rec_d['author_name'], 'style="width: 60%;"'); // author year $form->addTextField('text', 'authorYear', __('Author Year'), $rec_d['author_year'], 'style="width: 60%;"'); // authority type foreach ($sysconf['authority_type'] as $auth_type_id => $auth_type) { $auth_type_options[] = array($auth_type_id, $auth_type); } $form->addSelectList('authorityType', __('Authority Type'), $auth_type_options, $rec_d['authority_type']); // authority list $form->addTextField('text', 'authList', __('Authority Files'), $rec_d['auth_list'], 'style="width: 30%;"'); // edit mode messagge if ($form->edit_mode) { echo '<div class="infoBox">' . __('You are going to edit author data') . ' : <b>' . $rec_d['author_name'] . '</b> <br />' . __('Last Update') . $rec_d['last_update'] . '</div>'; //mfc } // print out the form object
$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"'; // edit mode flag set if ($rec_q->num_rows > 0) { $form->edit_mode = true; // record ID for delete process $form->record_id = $itemID; // form record title $form->record_title = $rec_d['member_type_name']; // submit button attribute $form->submit_button_attr = 'name="saveData" value="' . __('Update') . '" class="button"'; } /* Form Element(s) */ // member type name $form->addTextField('text', 'memberTypeName', __('Member Type Name') . '*', $rec_d['member_type_name'], 'style="width: 100%;"'); // loan limit $form->addTextField('text', 'loanLimit', __('Loan Limit'), $rec_d['loan_limit'], 'size="5"'); // loan periode $form->addTextField('text', 'loanPeriode', __('Loan Periode (In Days)'), $rec_d['loan_periode'], 'size="5"'); // enable reserve $enable_resv_chbox[0] = array('1', __('Enable')); $enable_resv_chbox[1] = array('0', __('Disable')); $form->addRadio('enableReserve', __('Reserve'), $enable_resv_chbox, !empty($rec_d['enable_reserve']) ? $rec_d['enable_reserve'] : '1'); // reserve limit $form->addTextField('text', 'reserveLimit', __('Reserve Limit'), $rec_d['reserve_limit'], 'size="5"'); // membership periode $form->addTextField('text', 'memberPeriode', __('Membership Periode (In Days)'), $rec_d['member_periode'], 'size="5"'); // reborrow limit $form->addTextField('text', 'reborrowLimit', __('Reborrow Limit'), $rec_d['reborrow_limit'], 'size="5"'); // fine each day
// submit button attribute $form->submit_button_attr = 'name="saveData" value="' . __('Update') . '" class="btn btn-default"'; // element visibility class toogle $visibility = 'makeHidden'; // custom field data query $_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'] . '" /> ';
$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"'; // edit mode flag set if ($rec_q->num_rows > 0) { $form->edit_mode = true; // record ID for delete process $form->record_id = $itemID; // form record title $form->record_title = $rec_d['location_name']; // submit button attribute $form->submit_button_attr = 'name="saveData" value="' . __('Update') . '" class="button"'; } /* Form Element(s) */ // location code $form->addTextField('text', 'locationID', __('Location Code') . '*', $rec_d['location_id'], 'style="width: 20%;" maxlength="3"'); // location name $form->addTextField('text', 'locationName', __('Location Name') . '*', $rec_d['location_name'], 'style="width: 60%;"'); // edit mode messagge if ($form->edit_mode) { echo '<div class="infoBox">' . __('You are going to edit location data') . ' : <b>' . $rec_d['location_name'] . '</b> <br />' . __('Last Update') . $rec_d['last_update'] . '</div>'; //mfc } // print out the form object echo $form->printOut(); } else { /* LOCATION LIST */ // table spec $table_spec = 'mst_location AS l'; // create datagrid $datagrid = new simbio_datagrid();
<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();
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->addSelectList('template', __('Public Template'), $tpl_options, $sysconf['template']['theme']);
$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"'; // edit mode flag set if ($rec_q->num_rows > 0) { $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) {
$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"'; // edit mode flag set if ($rec_q->num_rows > 0) { $form->edit_mode = true; // record ID for delete process $form->record_id = $itemID; // form record title $form->record_title = $rec_d['coll_type_name']; // submit button attribute $form->submit_button_attr = 'name="saveData" value="' . __('Update') . '" class="button"'; } /* Form Element(s) */ // coll_type_name $form->addTextField('text', 'collTypeName', __('Collection Type') . '*', $rec_d['coll_type_name'], 'style="width: 60%;"'); // edit mode messagge if ($form->edit_mode) { echo '<div class="infoBox">' . __('You are going to edit collection type data') . ' : <b>' . $rec_d['coll_type_name'] . '</b> <br />' . __('Last Update') . $rec_d['last_update'] . '</div>'; //mfc } // print out the form object echo $form->printOut(); } else { /* COLLECTION TYPE LIST */ // table spec $table_spec = 'mst_coll_type AS ct'; // create datagrid $datagrid = new simbio_datagrid(); if ($can_read and $can_write) { $datagrid->setSQLColumn('ct.coll_type_id', 'ct.coll_type_name AS \'' . __('Collection Type') . '\'', 'ct.last_update AS \'' . __('Last Update') . '\'');
$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"'; // edit mode flag set if ($rec_q->num_rows > 0) { $form->edit_mode = true; // record ID for delete process $form->record_id = $itemID; // form record title $form->record_title = $rec_d['frequency']; // submit button attribute $form->submit_button_attr = 'name="saveData" value="' . __('Update') . '" class="button"'; } /* Form Element(s) */ // frequency name $form->addTextField('text', 'frequencyName', __('Frequency') . '*', $rec_d['frequency'], 'style="width: 60%;"'); // frequency language // get language data related to this record from database $lang_q = $dbs->query('SELECT language_id, language_name FROM mst_language'); $lang_options = array(); while ($lang_d = $lang_q->fetch_row()) { $lang_options[] = array($lang_d[0], $lang_d[1]); } $form->addSelectList('languagePrefix', __('Language'), $lang_options, $rec_d['language_prefix']); // frequency time increment $form->addTextField('text', 'timeIncrement', __('Time Increment') . '*', $rec_d['time_increment'], 'style="width: 10%;"'); // frequency time unit $unit_options[] = array('day', __('Day')); $unit_options[] = array('week', __('Week')); $unit_options[] = array('month', __('Month')); $unit_options[] = array('year', __('Year'));
// 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()) { $location_options[] = array($location_d[0], $location_d[1]); } $form->addSelectList('locationID', __('Location'), $location_options, $rec_d['location_id']); // item site $form->addTextField('text', 'itemSite', __('Shelf Location'), $rec_d['site'], 'style="width: 40%;"'); // collection type // 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");
$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"'; // edit mode flag set if ($rec_q->num_rows > 0) { $form->edit_mode = true; // record ID for delete process $form->record_id = $itemID; // form record title $form->record_title = $rec_d['place_name']; // submit button attribute $form->submit_button_attr = 'name="saveData" value="' . __('Update') . '" class="button"'; } /* Form Element(s) */ // place name $form->addTextField('text', 'placeName', __('Place Name') . '*', $rec_d['place_name'], 'style="width: 60%;"'); // edit mode messagge if ($form->edit_mode) { echo '<div class="infoBox">' . __('You are going to edit place data') . ' : <b>' . $rec_d['place_name'] . '</b> <br />' . __('Last Update') . $rec_d['last_update'] . '</div>'; //mfc } // print out the form object echo $form->printOut(); } else { /* PLACE LIST */ // table spec $sql_criteria = 'pl.place_id > 1'; if (isset($_GET['type']) && $_GET['type'] == 'orphaned') { $table_spec = 'mst_place AS pl LEFT JOIN biblio AS b ON pl.place_id = b.publish_place_id'; $sql_criteria = 'b.publish_place_id IS NULL'; } else {
$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"'; // edit mode flag set if ($rec_q->num_rows > 0) { $form->edit_mode = true; // record ID for delete process $form->record_id = $itemID; // form record title $form->record_title = $rec_d['supplier_name']; // submit button attribute $form->submit_button_attr = 'name="saveData" value="' . __('Update') . '" class="button"'; } /* Form Element(s) */ // supplier name $form->addTextField('text', 'supplierName', __('Supplier Name') . '*', $rec_d['supplier_name'], 'style="width: 60%;"'); // supplier address $form->addTextField('textarea', 'supplierPlace', __('Address'), $rec_d['address'], 'style="width: 100%;" rows="2"'); // supplier contact $form->addTextField('text', 'supplierContact', __('Contact'), $rec_d['contact'], 'style="width: 60%;"'); // supplier phone $form->addTextField('text', 'supplierPhone', __('Phone Number'), $rec_d['phone'], 'style="width: 60%;"'); // supplier fax $form->addTextField('text', 'supplierFax', __('Fax Number'), $rec_d['fax'], 'style="width: 60%;"'); // supplier account number $form->addTextField('text', 'supplierAccount', __('Account Number'), $rec_d['account'], 'style="width: 60%;"'); // edit mode messagge if ($form->edit_mode) { echo '<div class="infoBox">' . __('You are going to edit Supplier data') . ' : <b>' . $rec_d['supplier_name'] . '</b> <br />' . __('Last Update') . $rec_d['last_update'] . '</div>'; //mfc }
} } exit; } // page title $page_title = 'Add New Pattern'; ob_start(); // create form instance $form = new simbio_form_table_AJAX('mainFormPattern', $_SERVER['PHP_SELF'], 'post'); $form->submit_button_attr = 'name="saveData" value="' . __('Save') . '" 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"'; // Prefix code pattern $form->addTextField('text', 'prefix', __('Prefix'), 'P', 'style="width: 60%;"'); // Suffix code pattern $form->addTextField('text', 'suffix', __('Suffix'), 'S', 'style="width: 60%;"'); // length serial number $form->addTextField('text', 'length_serial', __('Length serial number'), '5', 'style="width: 60%;"'); $form->addHidden('saveData', 'save'); // print out the object echo '<div style="padding:20px;">'; echo $form->printOut(); // preview patternt echo '<hr><h4>Preview: <b id="preview">P00000S</b></h4><hr>'; echo '</div>'; ?> <script type="text/javascript"> $('#mainFormPattern').keyup(function (e) { e.preventDefault();
$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"'; // edit mode flag set if ($rec_q->num_rows > 0) { $form->edit_mode = true; // record ID for delete process $form->record_id = $itemID; // form record title $form->record_title = $rec_d['frequency']; // submit button attribute $form->submit_button_attr = 'name="saveData" value="' . lang_sys_common_form_update . '" class="button"'; } /* Form Element(s) */ // frequency name $form->addTextField('text', 'frequencyName', lang_mod_masterfile_frequency_form_field_frequency_name . '*', $rec_d['frequency'], 'style="width: 60%;"'); // frequency language // get language data related to this record from database $lang_q = $dbs->query('SELECT language_id, language_name FROM mst_language'); $lang_options = array(); while ($lang_d = $lang_q->fetch_row()) { $lang_options[] = array($lang_d[0], $lang_d[1]); } $form->addSelectList('languagePrefix', lang_mod_biblio_field_lang, $lang_options, $rec_d['language_prefix']); // frequency time increment $form->addTextField('text', 'timeIncrement', lang_mod_masterfile_frequency_form_field_frequency_time_increment . '*', $rec_d['time_increment'], 'style="width: 10%;"'); // frequency time unit $unit_options[] = array('day', lang_sys_common_day); $unit_options[] = array('week', lang_sys_common_week); $unit_options[] = array('month', lang_sys_common_month); $unit_options[] = array('year', lang_sys_common_year);
$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"'; // edit mode flag set if ($rec_q->num_rows > 0) { $form->edit_mode = true; // record ID for delete process $form->record_id = $itemID; // form record title $form->record_title = $rec_d['author_name']; // submit button attribute $form->submit_button_attr = 'name="saveData" value="' . lang_sys_common_form_update . '" class="button"'; } /* Form Element(s) */ // author name $form->addTextField('text', 'authorName', lang_mod_masterfile_author_form_field_name . '*', $rec_d['author_name'], 'style="width: 60%;"'); // authority type foreach ($sysconf['authority_type'] as $auth_type_id => $auth_type) { $auth_type_options[] = array($auth_type_id, $auth_type); } $form->addSelectList('authorityType', lang_mod_masterfile_author_form_field_authority, $auth_type_options, $rec_d['authority_type']); // authority list $form->addTextField('text', 'authList', lang_mod_masterfile_authority_files, $rec_d['auth_list'], 'style="width: 30%;"'); // edit mode messagge if ($form->edit_mode) { echo '<div class="infoBox">' . lang_mod_masterfile_author_common_edit_info . '<b>' . $rec_d['author_name'] . '</b> <br />' . lang_mod_masterfile_author_common_last_update . $rec_d['last_update'] . '</div>'; } // print out the form object echo $form->printOut(); } else { /* AUTHOR LIST */
$form->record_id = $itemID; } else { $form->addHidden('updateRecordID', $itemID); $form->addHidden('itemCollID', $_POST['itemCollID']); $form->back_button = false; } // form record title $form->record_title = $rec_d['title']; // 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 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)">' . __('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'] . '"></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)">' . __('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'] . '"></iframe>'; $form->addAnything(__('Author(s)'), $str_input); // biblio gmd
// submit button attribute $form->submit_button_attr = 'name="saveData" value="' . __('Update') . '" class="button"'; // element visibility class toogle $visibility = 'makeHidden'; // custom field data query $_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(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
// record ID for delete process if (!$changecurrent) { // form record id $form->record_id = $itemID; } else { $form->addHidden('updateRecordID', $itemID); $form->back_button = false; } // form record title $form->record_title = $rec_d['realname']; // submit button attribute $form->submit_button_attr = 'name="saveData" value="' . __('Update') . '" class="button"'; } /* Form Element(s) */ // user name $form->addTextField('text', 'userName', __('Login Username') . '*', $rec_d['username'], 'style="width: 50%;"'); // user real name $form->addTextField('text', 'realName', __('Real Name') . '*', $rec_d['realname'], 'style="width: 50%;"'); // user group // only appear by user who hold system module privileges if (!$changecurrent and $can_read and $can_write) { // add hidden element as a flag that we dont change group data $form->addHidden('noChangeGroup', '1'); // user group $group_query = $dbs->query('SELECT group_id, group_name FROM user_group WHERE group_id != 1'); // initiliaze group options $group_options = array(); while ($group_data = $group_query->fetch_row()) { $group_options[] = array($group_data[0], $group_data[1]); }
$form->table_header_attr = 'class="alterCell" style="font-weight: bold;"'; $form->table_content_attr = 'class="alterCell2"'; // edit mode flag set if ($rec_q->num_rows > 0) { $form->edit_mode = true; // record ID for delete process // form record id $form->record_id = $itemID; // form record title $form->record_title = $rec_d['content_title']; // submit button attribute $form->submit_button_attr = 'name="saveData" value="' . __('Update') . '" class="button"'; } /* Form Element(s) */ // content title $form->addTextField('text', 'contentTitle', __('Content Title') . '*', $rec_d['content_title'], 'style="width: 100%;"'); // content path $form->addTextField('text', 'contentPath', __('Path (Must be unique)') . '*', $rec_d['content_path'], 'style="width: 50%;"'); // content description $form->addTextField('textarea', 'contentDesc', __('Content Description'), htmlentities($rec_d['content_desc'], ENT_QUOTES), 'style="width: 100%; height: 500px;"'); // edit mode messagge if ($form->edit_mode) { echo '<div class="infoBox">' . __('You are going to update Content data'), ' : <b>' . $rec_d['content_title'] . '</b> <br />' . __('Last Updated') . $rec_d['last_update'] . '</div>'; //mfc } // print out the form object // init TinyMCE instance echo '<script type="text/javascript">tinyMCE.init({ // Options mode : "exact", elements : "contentDesc", theme : "advanced", plugins : "safari,style,table,media,searchreplace,directionality,visualchars,xhtmlxtras,compat2x",
$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"'; // edit mode flag set if ($rec_q->num_rows > 0) { $form->edit_mode = true; // record ID for delete process $form->record_id = $itemID; // form record title $form->record_title = $rec_d['module_name']; // submit button attribute $form->submit_button_attr = 'name="saveData" value="' . __('Update') . '" class="button"'; } /* Form Element(s) */ // module $form->addTextField('text', 'moduleName', __('Module Name') . '*', $rec_d['module_name'], 'style="width: 50%;"'); // module path $form->addTextField('text', 'modulePath', __('Module Path') . '*', $rec_d['module_path'], 'style="width: 100%;"'); // module desc $form->addTextField('text', 'moduleDesc', __('Module Description'), $rec_d['module_desc'], 'style="width: 100%;"'); // edit mode messagge if ($form->edit_mode) { echo '<div class="infoBox">' . __('You are going to edit data') . ' : <b>' . $rec_d['module_name'] . '</b></div>'; //mfc } // print out the form object echo $form->printOut(); } else { /* MODULE LIST */ // table spec $table_spec = 'mst_module AS mdl';
$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"'; // edit mode flag set if ($rec_q->num_rows > 0) { $form->edit_mode = true; // record ID for delete process $form->record_id = $itemID; // form record title $form->record_title = $rec_d['topic']; // submit button attribute $form->submit_button_attr = 'name="saveData" value="' . __('Update') . '" class="button"'; } /* Form Element(s) */ // subject $form->addTextField('text', 'topic', __('Subject') . '*', $rec_d['topic'], 'style="width: 60%;"'); // 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%;"'); // 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 {
// record ID for delete process $form->record_id = $itemID; // form record title $form->record_title = $rec_d['description']; // submit button attribute $form->submit_button_attr = 'name="saveData" value="' . __('Update') . '" class="btn btn-default"'; } /* Form Element(s) */ // holiday date start $form->addDateField('holDate', __('Holiday Date Start'), $rec_d['holiday_date']); // holiday date end if (!$form->edit_mode) { $form->addDateField('holDateEnd', __('Holiday Date End'), $rec_d['holiday_date']); } // holiday description $form->addTextField('text', 'holDesc', __('Holiday Description') . '*', $rec_d['description'], 'style="width: 100%;"'); // edit mode messagge if ($form->edit_mode) { echo '<div class="infoBox">' . __('You are going to edit holiday data') . ' : <b>' . $rec_d['description'] . '</b></div>'; //mfc } // print out the form object echo $form->printOut(); } else { /* HOLIDAY LIST */ // table spec $table_spec = 'holiday'; // create datagrid $datagrid = new simbio_datagrid(); if ($can_read and $can_write) { $datagrid->setSQLColumn('holiday_id', "holiday_dayname AS '" . __('Day name') . "'", "holiday_date AS '" . __('Holiday Date Start') . "'", "description AS '" . __('Holiday Description') . "'");
$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"'; // edit mode flag set if ($rec_q->num_rows > 0) { $form->edit_mode = true; // record ID for delete process $form->record_id = $itemID; // form record title $form->record_title = $rec_d['gmd_name']; // submit button attribute $form->submit_button_attr = 'name="saveData" value="' . __('Update') . '" class="button"'; } /* Form Element(s) */ // gmd code $form->addTextField('text', 'gmdCode', __('GMD Code') . '*', $rec_d['gmd_code'], 'style="width: 20%;" maxlength="3"'); // gmd name $form->addTextField('text', 'gmdName', __('GMD Name') . '*', $rec_d['gmd_name'], 'style="width: 60%;"'); // edit mode messagge if ($form->edit_mode) { echo '<div class="infoBox">' . __('You are going to edit gmd data') . ' : <b>' . $rec_d['gmd_name'] . '</b> <br />' . __('Last Update') . $rec_d['last_update'] . '</div>'; //mfc } // print out the form object echo $form->printOut(); } else { /* GMD LIST */ // table spec $table_spec = 'mst_gmd AS g'; // create datagrid $datagrid = new simbio_datagrid();
$form->table_header_attr = 'class="alterCell" style="font-weight: bold;"'; $form->table_content_attr = 'class="alterCell2"'; // edit mode flag set if ($rec_q->num_rows > 0) { $form->edit_mode = true; // record ID for delete process // form record id $form->record_id = $itemID; // form record title $form->record_title = $rec_d['content_title']; // submit button attribute $form->submit_button_attr = 'name="saveData" value="' . lang_sys_common_form_update . '" class="button"'; } /* Form Element(s) */ // content title $form->addTextField('text', 'contentTitle', lang_sys_content_field_title . '*', $rec_d['content_title'], 'style="width: 100%;"'); // content path $form->addTextField('text', 'contentPath', lang_sys_content_field_path . '*', $rec_d['content_path'], 'style="width: 50%;"'); // content description $form->addTextField('textarea', 'contentDesc', lang_sys_content_field_desc, htmlentities($rec_d['content_desc'], ENT_QUOTES), 'style="width: 100%; height: 500px;"'); // edit mode messagge if ($form->edit_mode) { echo '<div class="infoBox">' . lang_sys_content_common_edit_info, ' : <b>' . $rec_d['content_title'] . '</b> <br />' . lang_sys_content_common_last_update . $rec_d['last_update'] . '</div>'; } // print out the form object // init TinyMCE instance echo '<script type="text/javascript">tinyMCE.init({ // Options mode : "exact", elements : "contentDesc", theme : "advanced", plugins : "safari,style,table,media,searchreplace,directionality,visualchars,xhtmlxtras,compat2x", skin : "o2k7", skin_variant : "silver",