本文整理汇总了PHP中simbio_form_table_AJAX::addDateField方法的典型用法代码示例。如果您正苦于以下问题:PHP simbio_form_table_AJAX::addDateField方法的具体用法?PHP simbio_form_table_AJAX::addDateField怎么用?PHP simbio_form_table_AJAX::addDateField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类simbio_form_table_AJAX
的用法示例。
在下文中一共展示了simbio_form_table_AJAX::addDateField方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$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);
}
// member institution
$form->addTextField('text', 'instName', __('Institution'), $rec_d['inst_name'], 'style="width: 100%;"');
示例2:
$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['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 */
示例3: isset
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
$hide_options[] = array('0', __('Show'));
$hide_options[] = array('1', __('Hide'));
$form->addRadio('opacHide', __('Hide in OPAC'), $hide_options, $rec_d['opac_hide'] ? '1' : '0');
// biblio promote to front page
$promote_options[] = array('0', __('Don\'t Promote'));
$promote_options[] = array('1', __('Promote'));
示例4: array
$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'));
$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);
}
示例5: while
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, $rec_d['coll_type_id']);
// item status
// get item status data from database
$item_status_q = $dbs->query("SELECT item_status_id, item_status_name FROM mst_item_status");
$item_status_options[] = array('0', __('Available'));
while ($item_status_d = $item_status_q->fetch_row()) {
$item_status_options[] = array($item_status_d[0], $item_status_d[1]);
}
$form->addSelectList('itemStatusID', __('Item Status'), $item_status_options, $rec_d['item_status_id']);
// order number
$form->addTextField('text', 'orderNo', __('Order Number'), $rec_d['order_no'], 'style="width: 40%;"');
// order date
$form->addDateField('ordDate', __('Order Date'), $rec_d['order_date'] ? $rec_d['order_date'] : date('Y-m-d'));
// received date
$form->addDateField('recvDate', __('Receiving Date'), $rec_d['received_date'] ? $rec_d['received_date'] : date('Y-m-d'));
// item supplier
// get item status data from database
$supplier_q = $dbs->query("SELECT supplier_id, supplier_name FROM mst_supplier");
$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
示例6: date
$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']);
// 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);
}
// member institution
$form->addTextField('text', 'instName', __('Institution'), $rec_d['inst_name'], 'style="width: 100%;"');
示例7: while
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_biblio_item_field_ctype, $coll_type_options, $rec_d['coll_type_id']);
// item status
// get item status data from database
$item_status_q = $dbs->query("SELECT item_status_id, item_status_name FROM mst_item_status");
$item_status_options[] = array('0', lang_mod_biblio_item_field_opt_available);
while ($item_status_d = $item_status_q->fetch_row()) {
$item_status_options[] = array($item_status_d[0], $item_status_d[1]);
}
$form->addSelectList('itemStatusID', lang_mod_biblio_item_field_item_status, $item_status_options, $rec_d['item_status_id']);
// order number
$form->addTextField('text', 'orderNo', lang_mod_biblio_item_field_order_number, $rec_d['order_no'], 'style="width: 40%;"');
// order date
$form->addDateField('ordDate', lang_mod_biblio_item_field_order_date, $rec_d['order_date'] ? $rec_d['order_date'] : date('Y-m-d'));
// received date
$form->addDateField('recvDate', lang_mod_biblio_item_field_received_date, $rec_d['received_date'] ? $rec_d['received_date'] : date('Y-m-d'));
// item supplier
// get item status data from database
$supplier_q = $dbs->query("SELECT supplier_id, supplier_name FROM mst_supplier");
$supplier_options[] = array('0', lang_mod_biblio_item_field_opt_none);
while ($supplier_d = $supplier_q->fetch_row()) {
$supplier_options[] = array($supplier_d[0], $supplier_d[1]);
}
$form->addSelectList('supplierID', lang_mod_biblio_item_field_supplier, $supplier_options, $rec_d['supplier_id']);
// item source
$source_options[] = array('1', lang_mod_biblio_item_field_opt_buy);
$source_options[] = array('2', lang_mod_biblio_item_field_opt_grant);
$form->addRadio('source', lang_mod_biblio_item_field_item_source, $source_options, !empty($rec_d['source']) ? $rec_d['source'] : '1');
// item invoice
示例8:
$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['description'];
// submit button attribute
$form->submit_button_attr = 'name="saveData" value="' . lang_sys_common_form_update . '" class="button"';
}
/* Form Element(s) */
// holiday date start
$form->addDateField('holDate', lang_sys_conf_holiday_field_date_day, $rec_d['holiday_date']);
// holiday date end
if (!$form->edit_mode) {
$form->addDateField('holDateEnd', lang_sys_conf_holiday_field_date_day_end, $rec_d['holiday_date']);
}
// holiday description
$form->addTextField('text', 'holDesc', lang_sys_conf_holiday_field_description . '*', $rec_d['description'], 'style="width: 100%;"');
// edit mode messagge
if ($form->edit_mode) {
echo '<div class="infoBox">' . lang_sys_conf_holiday_common_edit_info . ' : <b>' . $rec_d['description'] . '</b></div>';
}
// print out the form object
echo $form->printOut();
} else {
/* HOLIDAY LIST */
// table spec
示例9: array
$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);
$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(lang_mod_membership_field_expiry_date . '*', $str_input);
}
示例10: isset
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 {
echo __('This theme not customizable');
}
exit;
}
?>
<fieldset class="menuBox">