本文整理汇总了PHP中simbio_form_element类的典型用法代码示例。如果您正苦于以下问题:PHP simbio_form_element类的具体用法?PHP simbio_form_element怎么用?PHP simbio_form_element使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了simbio_form_element类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showComment
function showComment($_detail_id)
{
global $dbs;
require SIMBIO . 'simbio_GUI/paging/simbio_paging.inc.php';
$_list_comment = '';
$_recs_each_page = 3;
$_pages_each_set = 10;
$_all_recs = 0;
if (isset($_GET['page']) && $_GET['page'] > 1) {
$page = $_GET['page'];
} else {
$page = 1;
}
$_sql = "Select c.comment, m.member_name, c.input_date from comment AS c\n\t\t LEFT JOIN biblio AS b ON b.biblio_id = c.biblio_id\n\t\t LEFT JOIN member AS m ON m.member_id = c.member_id\n\t\t WHERE b.biblio_id =" . $_detail_id . " ORDER BY c.last_update DESC";
$commlist = $dbs->query($_sql);
if ($commlist) {
$_all_recs = $commlist->num_rows;
}
if ($_all_recs > 0) {
$_page = ($page - 1) * $_recs_each_page;
$_sql .= " Limit " . $_page . ", " . $_recs_each_page;
$commlist = $dbs->query($_sql);
$_list_comment .= '<div class="comment-found">' . $_all_recs . __(' comments available') . '</div>';
while ($_data = $commlist->fetch_assoc()) {
$_list_comment .= '<div class="comments">';
$_list_comment .= '<div class="comment-member">' . $_data['member_name'] . __(' at ') . $_data['input_date'] . __(' write') . '</div>';
$_list_comment .= '<div class="comment-content">' . $_data['comment'] . '</div>';
$_list_comment .= '</div>';
}
$_list_comment .= '<div class="comment-found">' . simbio_paging::paging($_all_recs, $_recs_each_page, $int_pages_each_set = 10, '', '_self') . '</div>';
}
if (isset($_SESSION['mid'])) {
// Comment form
$_forms = '<form method="post" action="index.php?p=show_detail&id=' . $_detail_id . '" class="comment-form">';
$_forms .= simbio_form_element::textField('textarea', 'comment', '', 'placeholder="Add your comment" class="comment-input"') . '<br />';
$_forms .= '<input type="submit" name="SaveComment" value="Save comment" class="button">';
$_forms .= '</form>';
return $_list_comment . $_forms;
} else {
return $_list_comment;
}
}
示例2: __
?>
</div>
<div class="divRowContent">
<?php
echo simbio_form_element::dateField('startDate', '2000-01-01');
?>
</div>
</div>
<div class="divRow">
<div class="divRowLabel"><?php
echo __('Register Date Until');
?>
</div>
<div class="divRowContent">
<?php
echo simbio_form_element::dateField('untilDate', date('Y-m-d'));
?>
</div>
</div>
<div class="divRow">
<div class="divRowLabel"><?php
echo __('Record each page');
?>
</div>
<div class="divRowContent"><input type="text" name="recsEachPage" size="3" maxlength="3" value="<?php
echo $num_recs_show;
?>
" /> <?php
echo __('Set between 20 and 200');
?>
</div>
示例3: __
?>
</div>
</div>
<div class="divRow">
<div class="divRowLabel"><?php
echo __('Month');
?>
</div>
<div class="divRowContent">
<?php
$current_month = date('m');
$month_options = array();
foreach ($months as $idx => $month) {
$month_options[] = array($idx, $month);
}
echo simbio_form_element::selectList('month', $month_options, $current_month);
?>
</div>
</div>
</div>
<div style="padding-top: 10px; clear: both;">
<input type="button" name="moreFilter" value="<?php
echo __('Show More Filter Options');
?>
" />
<input type="submit" name="applyFilter" value="<?php
echo __('Apply Filter');
?>
" />
<input type="hidden" name="reportView" value="true" />
</div>
示例4: __
$form->addTextField('text', 'memberFax', __('Fax Number'), $rec_d['member_fax'], 'style="width: 60%;"');
// member pin
$form->addTextField('text', 'memberPIN', __('Personal ID Number'), $rec_d['pin'], 'style="width: 100%;"');
// member notes
$form->addTextField('textarea', 'memberNotes', __('Notes'), $rec_d['member_notes'], 'rows="2" style="width: 100%;"');
// member is_pending
$form->addCheckBox('isPending', __('Pending Membership'), array(array('1', __('Yes'))), $rec_d['is_pending']);
// member photo
if ($rec_d['member_image']) {
$str_input = '<a href="' . SENAYAN_WEB_ROOT_DIR . 'images/persons/' . $rec_d['member_image'] . '" target="_blank"><strong>' . $rec_d['member_image'] . '</strong></a><br />';
$str_input .= simbio_form_element::textField('file', 'image');
$str_input .= ' ' . __('Maximum') . ' ' . $sysconf['max_image_upload'] . ' KB';
//mfc
$form->addAnything(__('Photo'), $str_input);
} else {
$str_input = simbio_form_element::textField('file', 'image');
$str_input .= ' ' . __('Maximum') . ' ' . $sysconf['max_image_upload'] . ' KB';
//mfc
$form->addAnything(__('Photo'), $str_input);
}
// member email
$form->addTextField('text', 'memberEmail', __('E-mail'), $rec_d['member_email'], 'style="width: 40%;"');
// member password
$form->addTextField('password', 'memberPasswd', __('New Password'), null, 'style="width: 40%;"');
// member password confirmation
$form->addTextField('password', 'memberPasswd2', __('Confirm New Password'), null, 'style="width: 40%;"');
// edit mode messagge
if ($form->edit_mode) {
echo '<div class="infoBox" style="overflow: auto;">' . '<div style="float: left; width: 80%;">' . __('You are going to edit member data') . ' : <b>' . $rec_d['member_name'] . '</b> <br />' . __('Last Updated') . ' ' . $rec_d['last_update'] . ' ' . $expired_message . '<div>' . __('Leave Password field blank if you don\'t want to change the password') . '</div>' . '</div>';
if ($rec_d['member_image']) {
if (file_exists(IMAGES_BASE_DIR . 'persons/' . $rec_d['member_image'])) {
示例5: __
</div>
</div>
<div class="divRow">
<div class="divRowLabel"><?php
echo __('Location');
?>
</div>
<div class="divRowContent">
<?php
$loc_q = $dbs->query('SELECT location_id, location_name FROM mst_location');
$loc_options = array();
$loc_options[] = array('0', __('ALL'));
while ($loc_d = $loc_q->fetch_row()) {
$loc_options[] = array($loc_d[0], $loc_d[1]);
}
echo simbio_form_element::selectList('location', $loc_options);
?>
</div>
</div>
<div class="divRow">
<div class="divRowLabel"><?php
echo __('Record each page');
?>
</div>
<div class="divRowContent"><input type="text" name="recsEachPage" size="3" maxlength="3" value="<?php
echo $num_recs_show;
?>
" /> <?php
echo __('Set between 20 and 200');
?>
</div>
示例6: simbio_directory
// create simbio directory object
$repo = new simbio_directory(REPO_BASE_DIR);
$repo_dir_tree = $repo->getDirectoryTree(5);
$repodir_options[] = array('', __('Repository ROOT'));
if (is_array($repo_dir_tree)) {
// sort array by index
ksort($repo_dir_tree);
// loop array
foreach ($repo_dir_tree as $dir) {
$repodir_options[] = array($dir, $dir);
}
}
// add repo directory options to select list
$form->addSelectList('fileDir', __('Repo. Directory'), $repodir_options);
// file upload
$str_input = simbio_form_element::textField('file', 'file2attach');
$str_input .= ' Maximum ' . $sysconf['max_upload'] . ' KB';
$form->addAnything(__('File To Attach'), $str_input);
}
// file url
$form->addTextField('textarea', 'fileURL', __('URL'), $file_attach_d['file_url'], 'rows="1" style="width: 100%; overflow: auto;"');
// file description
$form->addTextField('textarea', 'fileDesc', __('Description'), $file_attach_d['file_desc'], 'rows="2" style="width: 100%; overflow: auto;"');
// file access
$acctype_options[] = array('public', __('Public'));
$acctype_options[] = array('private', __('Private'));
$form->addSelectList('accessType', __('Access'), $acctype_options, $file_attach_d['access_type']);
// file access limit if set to public
$group_query = $dbs->query('SELECT member_type_id, member_type_name FROM mst_member_type');
$group_options = array();
while ($group_data = $group_query->fetch_row()) {
示例7: __
?>
</div>
</div>
<div class="divRow">
<div class="divRowLabel"><?php
echo __('Year');
?>
</div>
<div class="divRowContent">
<?php
$current_year = date('Y');
$year_options = array();
for ($y = $current_year; $y > 1999; $y--) {
$year_options[] = array($y, $y);
}
echo simbio_form_element::selectList('year', $year_options, $current_year - 1);
?>
</div>
</div>
</div>
<div style="padding-top: 10px; clear: both;">
<input type="submit" name="applyFilter" value="<?php
echo __('Apply Filter');
?>
" />
<input type="hidden" name="reportView" value="true" />
</div>
</form>
</fieldset>
<!-- filter end -->
<div class="dataListHeader" style="padding: 3px;"><span id="pagingBox"></span></div>
示例8: __
<!--reserve specific javascript functions end-->
<!--item loan form-->
<div style="padding: 5px; background-color: #ccc;">
<form name="reserveForm" id="search" action="circulation_action.php" method="post" style="display: inline;">
<?php
echo __('Search Collection');
?>
:<br />
<?php
// AJAX expression
$ajax_exp = "ajaxFillSelect('item_AJAX_lookup_handler.php', 'item', 'i.item_code:title', 'reserveItemID', \$('#bib_search_str').val())";
$biblio_options[] = array('0', 'Title');
echo simbio_form_element::textField('text', 'bib_search_str', '', 'style="width: 10%;" onkeyup="' . $ajax_exp . '"');
echo simbio_form_element::selectList('reserveItemID', $biblio_options, '', 'class="marginTop" style="width: 70%;"');
echo simbio_form_element::textField('submit', 'addReserve', __('Add Reserve'));
?>
</form>
</div>
<!--item loan form end-->
<?php
// check if there is member ID
if (isset($_SESSION['memberID'])) {
$memberID = trim($_SESSION['memberID']);
$reserve_list_q = $dbs->query("SELECT r.*, b.title FROM reserve AS r\r\n LEFT JOIN biblio AS b ON r.biblio_id=b.biblio_id\r\n WHERE r.member_id='{$memberID}'");
// create table object
$reserve_list = new simbio_table();
$reserve_list->table_attr = 'align="center" style="width: 100%;" cellpadding="3" cellspacing="0"';
$reserve_list->table_header_attr = 'class="dataListHeader" style="font-weight: bold;"';
$reserve_list->highlight_row = true;
示例9: __
echo $_SERVER['PHP_SELF'];
?>
" target="reportView">
<div id="filterForm">
<div class="divRow">
<div class="divRowLabel"><?php
echo __('Recap By');
?>
:</div>
<div class="divRowContent">
<?php
$recapby_options[] = array('', __('Classification'));
$recapby_options[] = array('gmd', __('GMD'));
$recapby_options[] = array('collType', __('Collection Type'));
$recapby_options[] = array('language', __('Language'));
echo simbio_form_element::selectList('recapBy', $recapby_options);
?>
</div>
</div>
</div>
<div style="padding-top: 10px; clear: both;">
<input type="submit" name="applyFilter" value="<?php
echo __('Apply Filter');
?>
" />
<!--
<input type="button" name="moreFilter" value="<?php
echo __('Show More Filter Options');
?>
" onclick="showHideTableRows('filterForm', 1, this, '<?php
echo __('Show More Filter Options');
示例10: array
$supplier_options[] = array('0', __('Not Applicable'));
while ($supplier_d = $supplier_q->fetch_row()) {
$supplier_options[] = array($supplier_d[0], $supplier_d[1]);
}
$form->addSelectList('supplierID', __('Supplier'), $supplier_options, $rec_d['supplier_id']);
// item source
$source_options[] = array('1', __('Buy'));
$source_options[] = array('2', __('Prize/Grant'));
$form->addRadio('source', __('Source'), $source_options, !empty($rec_d['source']) ? $rec_d['source'] : '1');
// item invoice
$form->addTextField('text', 'invoice', __('Invoice'), $rec_d['invoice'], 'style="width: 100%;"');
// invoice date
$form->addDateField('invcDate', __('Invoice Date'), $rec_d['invoice_date'] ? $rec_d['invoice_date'] : date('Y-m-d'));
// price
$str_input = simbio_form_element::textField('text', 'price', !empty($rec_d['price']) ? $rec_d['price'] : '0', 'style="width: 40%;"');
$str_input .= simbio_form_element::selectList('priceCurrency', $sysconf['currencies'], $rec_d['price_currency']);
$form->addAnything(__('Price'), $str_input);
// edit mode messagge
if ($form->edit_mode) {
echo '<div class="infoBox">' . __('You are going to edit Item data') . ': <b>' . $rec_d['title'] . '</b> ' . '<br />' . __('Last Updated') . ' ' . $rec_d['last_update'];
echo '</div>' . "\n";
}
// print out the form object
echo $form->printOut();
} else {
require SIMBIO_BASE_DIR . 'simbio_UTILS/simbio_tokenizecql.inc.php';
require LIB_DIR . 'biblio_list_model.inc.php';
if ($sysconf['index']['type'] == 'default' || isset($_GET['searchby']) && $_GET['searchby'] == 'item') {
require LIB_DIR . 'biblio_list.inc.php';
$title_field_idx = 1;
// callback function to show title and authors in datagrid
示例11: array
$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();
}
示例12: viewKardexes
/**
* View kardex list
* @return string
**/
public function viewKardexes()
{
$_can_read = utility::havePrivilege('serial_control', 'r');
$_can_write = utility::havePrivilege('serial_control', 'w');
// start the output buffer
ob_start();
?>
<script type="text/javascript">
function confirmProcess(int_serial_id, int_kardex_id)
{
var confirmBox = confirm('Are you sure to remove selected Kardex data?' + "\n" + 'Once deleted, it can\'t be restored!');
if (confirmBox) {
// set hidden element value
document.hiddenActionForm.serialID.value = int_serial_id;
document.hiddenActionForm.remove.value = int_kardex_id;
// submit form
document.hiddenActionForm.submit();
}
}
</script>
<?php
$_table = new simbio_table();
$_table->table_attr = 'align="center" class="detailTable" style="width: 100%;" cellpadding="2" cellspacing="0"';
$_table->table_header_attr = 'class="dataListHeader" style="font-weight: bold;"';
$_table->highlight_row = true;
$_table->setHeader(array(' ', __('Date Expected'), __('Date Received'), __('Seq. Number'), __('Note')));
if ($_can_read and $_can_write) {
$_add_link = '<span title="Add New Kardex" class="extendLink"> </span>';
$_date_exp = simbio_form_element::dateField('dateExpected[0]');
$_date_rec = simbio_form_element::dateField('dateReceived[0]');
$_seq_num = simbio_form_element::textField('text', 'seqNumber[0]', '', 'width: 100%;');
$_notes = simbio_form_element::textField('text', 'notes[0]', '', 'width: 100%;');
$_table->appendTableRow(array($_add_link, $_date_exp, $_date_rec, $_seq_num, $_notes));
$_table->setCellAttr(1, null, 'valign="top" class="alterCell2" style="font-weight: bold; width: auto;"');
$_table->setCellAttr(1, 0, 'valign="top" class="alterCell2" style="font-weight: bold; width: 5%;"');
$_table->setCellAttr(1, 1, 'valign="top" class="alterCell2" style="font-weight: bold; width: 25%;"');
$_table->setCellAttr(1, 2, 'valign="top" class="alterCell2" style="font-weight: bold; width: 25%;"');
}
$_row = 2;
foreach ($this->getKardexes() as $_kardex) {
// alternate the row color
$_row_class = $_row % 2 == 0 ? 'alterCell' : 'alterCell2';
if ($_can_read and $_can_write) {
// kardex removal links
$_remove_link = '<a href="#" onclick="confirmProcess(' . $this->serial_id . ', ' . $_kardex['kardex_id'] . ')" class="trashLink notAJAX"> </a>';
$_date_exp = simbio_form_element::dateField('dateExpected[' . $_kardex['kardex_id'] . ']', $_kardex['date_expected']);
$_date_rec = simbio_form_element::dateField('dateReceived[' . $_kardex['kardex_id'] . ']', $_kardex['date_received']);
$_seq_num = simbio_form_element::textField('text', 'seqNumber[' . $_kardex['kardex_id'] . ']', $_kardex['seq_number'], 'width: 100%;');
$_notes = simbio_form_element::textField('text', 'notes[' . $_kardex['kardex_id'] . ']', $_kardex['notes'], 'width: 100%;');
} else {
$_remove_link = ' ';
$_date_exp = $_kardex['date_expected'];
$_date_rec = $_kardex['date_received'];
$_seq_num = $_kardex['seq_number'];
$_notes = $_kardex['notes'];
}
$_table->appendTableRow(array($_remove_link, $_date_exp, $_date_rec, $_seq_num, $_notes));
$_table->setCellAttr($_row, null, 'valign="top" class="' . $_row_class . '" style="font-weight: bold; width: auto;"');
$_table->setCellAttr($_row, 0, 'valign="top" class="' . $_row_class . '" style="font-weight: bold; width: 5%;"');
$_table->setCellAttr($_row, 1, 'valign="top" class="' . $_row_class . '" style="font-weight: bold; width: 25%;"');
$_table->setCellAttr($_row, 2, 'valign="top" class="' . $_row_class . '" style="font-weight: bold; width: 25%;"');
$_row++;
}
// button
$_button_grp = '<div style="padding: 3px; background: #999999;"><input type="submit" class="button" name="saveKardexes" value="' . __('Save') . '" /></div>';
// header
echo '<div style="padding: 5px; background: #CCCCCC;">' . __('Kardex Detail for subscription') . ' <strong>' . $this->serial_period . '</strong></div>';
if ($_can_read and $_can_write) {
echo '<form method="post" name="kardexListForm" id="kardexListForm" action="' . $_SERVER['PHP_SELF'] . '">';
echo $_button_grp;
}
echo $_table->printTable();
if ($_can_read and $_can_write) {
echo $_button_grp;
echo simbio_form_element::hiddenField('serialID', $this->serial_id);
echo '</form>';
// hidden form
echo '<form name="hiddenActionForm" method="post" action="' . $_SERVER['PHP_SELF'] . '"><input type="hidden" name="serialID" value="0" /><input type="hidden" name="remove" value="0" /></form>';
}
/* main content end */
$_content = ob_get_clean();
return $_content;
}
示例13: str_ireplace
// 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();
} else {
/* GMD LIST */
// table spec
示例14: __
echo __('This report loan items which will due in 3 to 0 days');
?>
</div>
<form method="get" action="<?php
echo $_SERVER['PHP_SELF'];
?>
" target="reportView">
<div id="filterForm">
<div class="divRow">
<div class="divRowLabel"><?php
echo __('Member ID') . '/' . __('Member Name');
?>
</div>
<div class="divRowContent">
<?php
echo simbio_form_element::textField('text', 'id_name', '', 'style="width: 50%"');
?>
</div>
</div>
<div class="divRow">
<div class="divRowLabel"><?php
echo __('Record each page');
?>
</div>
<div class="divRowContent"><input type="text" name="recsEachPage" size="3" maxlength="3" value="<?php
echo $num_recs_show;
?>
" /> <?php
echo __('Set between 20 and 200');
?>
</div>
示例15: array
$loc_options[] = array('0', __('ALL'));
while ($loc_d = $loc_q->fetch_row()) {
$loc_options[] = array($loc_d[0], $loc_d[1]);
}
echo simbio_form_element::selectList('location', $loc_options);
?>
</div>
</div>
<div class="divRow">
<div class="divRowLabel"><?php
echo __('Publish year');
?>
</div>
<div class="divRowContent">
<?php
echo simbio_form_element::textField('text', 'publishYear', '', 'style="width: 50%"');
?>
</div>
</div>
<div class="divRow">
<div class="divRowLabel"><?php
echo __('Record each page');
?>
</div>
<div class="divRowContent"><input type="text" name="recsEachPage" size="3" maxlength="3" value="<?php
echo $num_recs_show;
?>
" /> <?php
echo __('Set between 20 and 200');
?>
</div>