本文整理汇总了PHP中simbio_form_table_AJAX::addCheckBox方法的典型用法代码示例。如果您正苦于以下问题:PHP simbio_form_table_AJAX::addCheckBox方法的具体用法?PHP simbio_form_table_AJAX::addCheckBox怎么用?PHP simbio_form_table_AJAX::addCheckBox使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类simbio_form_table_AJAX
的用法示例。
在下文中一共展示了simbio_form_table_AJAX::addCheckBox方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
// custom field properties
$cf_dbfield = $cfield['dbfield'];
$cf_label = $cfield['label'];
$cf_default = $cfield['default'];
$cf_data = isset($cfield['data']) && $cfield['data'] ? $cfield['data'] : array();
// custom field processing
if (in_array($cfield['type'], array('text', 'longtext', 'numeric'))) {
$cf_max = isset($cfield['max']) ? $cfield['max'] : '200';
$cf_width = isset($cfield['width']) ? $cfield['width'] : '50';
$form->addTextField($cfield['type'] == 'longtext' ? 'textarea' : 'text', $cf_dbfield, $cf_label, isset($rec_cust_d[$cf_dbfield]) ? $rec_cust_d[$cf_dbfield] : $cf_default, 'style="width: ' . $cf_width . '%;" maxlength="' . $cf_max . '"');
} else {
if ($cfield['type'] == 'dropdown') {
$form->addSelectList($cf_dbfield, $cf_label, $cf_data, isset($rec_cust_d[$cf_dbfield]) ? $rec_cust_d[$cf_dbfield] : $cf_default);
} else {
if ($cfield['type'] == 'checklist') {
$form->addCheckBox($cf_dbfield, $cf_label, $cf_data, isset($rec_cust_d[$cf_dbfield]) ? $rec_cust_d[$cf_dbfield] : $cf_default);
} else {
if ($cfield['type'] == 'choice') {
$form->addRadio($cf_dbfield, $cf_label, $cf_data, isset($rec_cust_d[$cf_dbfield]) ? $rec_cust_d[$cf_dbfield] : $cf_default);
} else {
if ($cfield['type'] == 'date') {
$form->addDateField($cf_dbfield, $cf_label, isset($rec_cust_d[$cf_dbfield]) ? $rec_cust_d[$cf_dbfield] : $cf_default);
}
}
}
}
}
}
}
}
// biblio hide from opac
示例2: date
// form record title
$form->record_title = $rec_d['member_name'];
// submit button attribute
$form->submit_button_attr = 'name="saveData" value="' . __('Update') . '" class="button"';
}
/* Form Element(s) */
if ($form->edit_mode) {
// 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'));
示例3: array
// 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->addCheckBox('groups', __('Group(s)'), $group_options, unserialize($rec_d['groups']));
}
// user password
$form->addTextField('password', 'passwd1', __('New Password') . '*', '', 'style="width: 50%;"');
// user password confirm
$form->addTextField('password', 'passwd2', __('Confirm New Password') . '*', '', 'style="width: 50%;"');
// edit mode messagge
if ($form->edit_mode) {
echo '<div class="infoBox">' . __('You are going to edit user profile'), ' : <b>' . $rec_d['realname'] . '</b> <br />' . __('Last Update') . $rec_d['last_update'] . ' //mfc
<br />' . __('Leave Password field blank if you don\'t want to change the password') . '</div>';
}
// print out the form object
echo $form->printOut();
} else {
// only administrator have privileges to view user list
if (!($can_read and $can_write) or $_SESSION['uid'] != 1) {
示例4: strtoupper
} else {
?>
<fieldset class="menuBox">
<div class="menuBoxInner errorIcon">
<strong style="color: #f00;"><?php
echo strtoupper(__('Finish Stock Take'));
?>
<hr />
<?php
echo __('Are you sure to end current stock take proccess? Once it finished there is no way you can rollback this stock take');
?>
</strong>
</div>
</fieldset>
<?php
// create new instance
$form = new simbio_form_table_AJAX('stockTakeForm', $_SERVER['PHP_SELF'], 'post');
$form->submit_button_attr = 'value="' . __('Finish Stock Take') . '" class="button" style="color: #f00; border-color: #f00;"';
// 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) */
// purge lost item
$purge_options[] = array('1', __('Yes'));
$form->addCheckBox('purge', __('Purge Lost Item'), $purge_options);
// hidden item
$form->addHidden('confirmFinish', 'true');
// print out the object
echo $form->printOut();
}
示例5: strtoupper
} else {
?>
<fieldset class="menuBox">
<div class="menuBoxInner errorIcon">
<strong style="color: #FF0000;"><?php
echo strtoupper(lang_mod_stocktake_finish);
?>
<hr />
<?php
echo lang_mod_stocktake_finish_confirmation;
?>
</strong>
</div>
</fieldset>
<?php
// create new instance
$form = new simbio_form_table_AJAX('stockTakeForm', $_SERVER['PHP_SELF'], 'post');
$form->submit_button_attr = 'value="' . lang_mod_stocktake_finish . '" class="button" style="color: #FF0000; border-color: #FF0000;"';
// 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) */
// purge lost item
$purge_options[] = array('1', lang_mod_stocktake_field_opt_yes);
$form->addCheckBox('purge', lang_mod_stocktake_purge_lost, $purge_options);
// hidden item
$form->addHidden('confirmFinish', 'true');
// print out the object
echo $form->printOut();
}
示例6: array
$admin_tpl_options[] = array($dir, $dir);
}
$form->addSelectList('admin_template', __('Admin Template'), $admin_tpl_options, $sysconf['admin_template']['theme']);
// application language
require_once LANG . 'localisation.php';
$form->addSelectList('default_lang', __('Default App. Language'), $available_languages, $sysconf['default_lang']);
// opac result list number
$result_num_options[] = array('10', '10');
$result_num_options[] = array('20', '20');
$result_num_options[] = array('30', '30');
$result_num_options[] = array('40', '40');
$result_num_options[] = array('50', '50');
$form->addSelectList('opac_result_num', __('Number Of Collections To Show In OPAC Result List'), $result_num_options, $sysconf['opac_result_num']);
// homepage setting
$promote_options[] = array('1', 'Yes');
$form->addCheckBox('enable_promote_titles', __('Show Promoted Titles at Homepage'), $promote_options, $sysconf['enable_promote_titles'] ? '1' : '0');
// enable quick return
$options = null;
$options[] = array('0', __('Disable'));
$options[] = array('1', __('Enable'));
$form->addSelectList('quick_return', __('Quick Return'), $options, $sysconf['quick_return'] ? '1' : '0');
// circulation receipt
$options = null;
$options[] = array('0', __('Don\'t Print'));
$options[] = array('1', __('Print'));
$form->addSelectList('circulation_receipt', __('Print Circulation Receipt'), $options, $sysconf['circulation_receipt'] ? '1' : '0');
// enable manual changes of loan and due date in circulation transaction
$options = null;
$options[] = array('0', __('Disable'));
$options[] = array('1', __('Enable'));
$form->addSelectList('allow_loan_date_change', __('Loan and Due Date Manual Change'), $options, $sysconf['allow_loan_date_change'] ? '1' : '0');
示例7: array
// user real name
$form->addTextField('text', 'realName', lang_sys_conf_user_field_real . '*', $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->addCheckBox('groups', lang_sys_conf_user_field_group, $group_options, unserialize($rec_d['groups']));
}
// user password
$form->addTextField('password', 'passwd1', lang_sys_conf_user_field_password_3 . '*', '', 'style="width: 50%;"');
// user password confirm
$form->addTextField('password', 'passwd2', lang_sys_conf_user_field_password_4 . '*', '', 'style="width: 50%;"');
// edit mode messagge
if ($form->edit_mode) {
echo '<div class="infoBox">' . lang_sys_conf_user_common_edit_info, ' : <b>' . $rec_d['realname'] . '</b> <br />' . lang_sys_conf_user_common_last_update . $rec_d['last_update'] . '
<br />' . lang_sys_conf_user_common_info_1 . '</div>';
}
// print out the form object
echo $form->printOut();
} else {
/* USER LIST */
// table spec
示例8: date
// form record title
$form->record_title = $rec_d['member_name'];
// submit button attribute
$form->submit_button_attr = 'name="saveData" value="' . __('Update') . '" class="button"';
}
/* Form Element(s) */
if ($form->edit_mode) {
// 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>';
}
}
// include custom fields file
if (file_exists(MODULES_BASE_DIR . 'membership/member_custom_fields.inc.php')) {
include MODULES_BASE_DIR . 'membership/member_custom_fields.inc.php';
}
// 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']);
示例9: array
}
}
} else {
$lang_options[] = array('english', 'English');
}
$form->addSelectList('default_lang', lang_sys_conf_form_field_language, $lang_options, $sysconf['default_lang']);
// opac result list number
$result_num_options[] = array('10', '10');
$result_num_options[] = array('20', '20');
$result_num_options[] = array('30', '30');
$result_num_options[] = array('40', '40');
$result_num_options[] = array('40', '50');
$form->addSelectList('opac_result_num', lang_sys_conf_form_field_opac_result, $result_num_options, $sysconf['opac_result_num']);
// homepage setting
$promote_options[] = array('1', 'Yes');
$form->addCheckBox('enable_promote_titles', lang_sys_conf_form_field_promote_titles, $promote_options, $sysconf['enable_promote_titles'] ? '1' : '0');
// enable quick return
$options = null;
$options[] = array('0', lang_sys_conf_form_option_disable);
$options[] = array('1', lang_sys_conf_form_option_enable);
$form->addSelectList('quick_return', lang_sys_conf_form_field_quick_return, $options, $sysconf['quick_return'] ? '1' : '0');
// enable loan limit overriden
$options = null;
$options[] = array('0', lang_sys_conf_form_option_disable);
$options[] = array('1', lang_sys_conf_form_option_enable);
$form->addSelectList('loan_limit_override', lang_sys_conf_form_field_limit_overide, $options, $sysconf['loan_limit_override'] ? '1' : '0');
// enable bibliography xml detail
$options = null;
$options[] = array('0', lang_sys_conf_form_option_disable);
$options[] = array('1', lang_sys_conf_form_option_enable);
$form->addSelectList('enable_xml_detail', lang_sys_conf_form_field_opac_xml, $options, $sysconf['enable_xml_detail'] ? '1' : '0');
示例10: date
// form record title
$form->record_title = $rec_d['member_name'];
// submit button attribute
$form->submit_button_attr = 'name="saveData" value="' . lang_sys_common_form_update . '" class="button"';
}
/* Form Element(s) */
if ($form->edit_mode) {
// 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']);
}
示例11: isset
$cf_label = $cfield['label'];
$cf_default = $cfield['default'];
$cf_data = isset($cfield['data']) && $cfield['data'] ? $cfield['data'] : array();
$form->addHidden('themeDir', $_GET['theme']);
$form->addHidden('themeType', $_GET['customize']);
// custom field processing
if (in_array($cfield['type'], array('text', 'longtext', 'numeric'))) {
$cf_max = isset($cfield['max']) ? $cfield['max'] : '200';
$cf_width = isset($cfield['width']) ? $cfield['width'] : '50';
$form->addTextField($cfield['type'] == 'longtext' ? 'textarea' : 'text', $cf_dbfield, $cf_label, isset($sysconf['template'][$cf_dbfield]) ? $sysconf['template'][$cf_dbfield] : $cf_default, 'style="width: ' . $cf_width . '%;" maxlength="' . $cf_max . '"');
} else {
if ($cfield['type'] == 'dropdown') {
$form->addSelectList($cf_dbfield, $cf_label, $cf_data, isset($sysconf['template'][$cf_dbfield]) ? $sysconf['template'][$cf_dbfield] : $cf_default);
} else {
if ($cfield['type'] == 'checklist') {
$form->addCheckBox($cf_dbfield, $cf_label, $cf_data, isset($sysconf['template'][$cf_dbfield]) ? $sysconf['template'][$cf_dbfield] : $cf_default);
} else {
if ($cfield['type'] == 'choice') {
$form->addRadio($cf_dbfield, $cf_label, $cf_data, isset($sysconf['template'][$cf_dbfield]) ? $sysconf['template'][$cf_dbfield] : $cf_default);
} else {
if ($cfield['type'] == 'date') {
$form->addDateField($cf_dbfield, $cf_label, isset($sysconf['template'][$cf_dbfield]) ? $sysconf['template'][$cf_dbfield] : $cf_default);
}
}
}
}
}
}
// print out the form object
echo $form->printOut();
} else {