本文整理汇总了PHP中tep_draw_radio_field函数的典型用法代码示例。如果您正苦于以下问题:PHP tep_draw_radio_field函数的具体用法?PHP tep_draw_radio_field怎么用?PHP tep_draw_radio_field使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tep_draw_radio_field函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _draw_stocked_attributes
function _draw_stocked_attributes()
{
global $languages_id;
$out = '';
$attributes = $this->_build_attributes_array(true, false);
if (sizeof($attributes) > 0) {
$combinations = array();
$selected_combination = 0;
$this->_build_attributes_combinations($attributes, $this->show_out_of_stock == 'True', $this->mark_out_of_stock, $combinations, $selected_combination);
$combname = '';
foreach ($attributes as $attrib) {
$combname .= ', ' . $attrib['oname'];
}
$combname = substr($combname, 2) . ':';
foreach ($combinations as $combindex => $comb) {
$out .= "<tr>\n";
$out .= ' <td align="right" class=main><b>' . $combname . "</b></td>\n <td class=main>";
$out .= tep_draw_radio_field('attrcomb', $combinations[$combindex]['id'], $combindex == $selected_combination) . $comb['text'];
$out .= "</td>\n";
$out .= "</tr>\n";
$combname = '';
}
}
$out .= $this->_draw_out_of_stock_message_js($attributes);
return $out;
}
示例2: radio_option
function radio_option()
{
$string = '';
$select_array = func_get_args();
$key_value = array_shift($select_array);
for ($i = 0, $j = count($select_array); $i < $j; $i++) {
$checked = $key_value == $select_array[$i] ? true : false;
$string .= '<div>' . tep_draw_radio_field('configuration_value', $select_array[$i], $checked);
$string .= $select_array[$i] . '</div>';
}
return $string;
}
示例3: selection
function selection()
{
$selection = array('id' => $this->code, 'module' => $this->title, 'description' => $this->description);
$selection['fields'] = array();
if (tep_not_null(MODULE_PAYMENT_CHEQUE_ACCOUNT_TYPE)) {
$selection['fields'][] = array('title' => MODULE_PAYMENT_CHEQUE_ACCOUNT_TYPE, 'field' => tep_draw_radio_field('check_account_type', 'Checking', true) . MODULE_PAYMENT_CHEQUE_ACCOUNT_TYPE_CHECKING . '<br />' . "\n" . tep_draw_radio_field('check_account_type', 'Savings') . MODULE_PAYMENT_CHEQUE_ACCOUNT_TYPE_SAVINGS);
}
$selection['fields'][] = array('title' => MODULE_PAYMENT_CHEQUE_BANK_NAME, 'field' => tep_draw_input_field('check_bank_name'));
$selection['fields'][] = array('title' => MODULE_PAYMENT_CHEQUE_ROUTING_NUMBER, 'field' => tep_draw_input_field('check_routing_number') . ' ' . MODULE_PAYMENT_CHEQUE_ROUTING_NUMBER_TEXT);
$selection['fields'][] = array('title' => MODULE_PAYMENT_CHEQUE_ACCOUNT_NUMBER, 'field' => tep_draw_input_field('check_account_number') . ' ' . MODULE_PAYMENT_CHEQUE_ACCOUNT_NUMBER_TEXT);
return $selection;
}
示例4: get
function get($fID)
{
$result = array('data' => $this->get_field_info($fID), 'options' => $this->get_options($fID));
$options_array = $result['options'];
foreach ($options_array as $option => $options_data) {
$values_array = $this->get_values($option);
$html_type = 0;
if (isset($this->flat_array[$options_data['form_types_id']])) {
$html_type = $this->flat_array[$options_data['form_types_id']];
}
$drop_down_array = array();
foreach ($values_array as $key => $value) {
switch ($html_type) {
case 'CHECK-BOX':
$result['options'][$option]['values'][$key] = array('name' => $value['form_values_name'], 'default' => $value['form_values_default'], 'html' => tep_draw_checkbox_field('checkbox[' . $value['form_values_id'] . ']', 'on') . '<sep>' . $value['form_values_name']);
break;
case 'DROP_DOWN':
$drop_down_array[] = array('id' => $value['form_values_id'], 'text' => $value['form_values_name']);
break;
case 'INPUT-LINE':
$result['options'][$option]['values'][$key] = array('name' => $value['form_values_name'], 'default' => $value['form_values_default'], 'html' => $value['form_values_name'] . '<sep>' . tep_draw_input_field('input[' . $value['form_values_id'] . ']'));
break;
case 'RADIO':
$selection = false;
if ($value['form_values_name'] == $value['form_values_default']) {
$selection = true;
}
$result['options'][$option]['values'][$key] = array('name' => $value['form_values_name'], 'default' => $value['form_values_default'], 'html' => tep_draw_radio_field('radio[' . $option['form_options_id'] . ']', $value['form_values_name'], $selection) . '<sep>' . $value['form_values_name']);
break;
case 'TEXT-AREA':
$result['options'][$option]['values'][$key] = array('name' => $value['form_values_name'], 'default' => $value['form_values_default'], 'html' => '');
break;
default:
if (empty($result['options'][$option]['values'][$key])) {
$result['options'][$option]['values'][$key] = array('name' => $value['form_values_name'], 'default' => $value['form_values_default'], 'html' => $value['form_values_name'] . '<sep>' . $value['form_values_default']);
}
break;
}
}
if ($html_type == 'DROP_DOWN') {
$result['options'][$option]['values'][$key] = array('name' => $option['form_options_name'], 'default' => '', 'html' => $option['form_options_name'] . '<sep>' . tep_draw_pull_down_menu('dropdown[' . $option['form_options_id'] . ']', $drop_down_array));
}
}
return $result;
}
示例5: tep_draw_form
</table></td>
</tr>
<tr>
<td>
<?php
echo tep_draw_form('coupon', 'coupon_admin.php', 'action=update&oldaction=' . ($_GET['oldaction'] == 'voucheredit' ? $_GET['oldaction'] : $_GET['action']) . '&cid=' . $_GET['cid']);
?>
<table border="0" width="100%" cellspacing="0" cellpadding="6">
<tr>
<td align="left" class="main"><?php
echo COUPON_STATUS;
?>
</td>
<td align="left"><?php
echo tep_draw_radio_field('coupon_status', 'Y', $in_status) . ' ' . IMAGE_ICON_STATUS_GREEN . ' ' . tep_draw_radio_field('coupon_status', 'N', $out_status) . ' ' . IMAGE_ICON_STATUS_RED;
?>
</td>
<td align="left" class="main"><?php
echo COUPON_STATUS_HELP;
?>
</td>
</tr>
<?php
$languages = tep_get_languages();
for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
$language_id = $languages[$i]['id'];
?>
<tr>
<td align="left" class="main"><?php
示例6: tep_draw_textarea_field
<td><table border="0" width="100%" cellspacing="2" cellpadding="2">
<tr>
<td class="main"><?php
echo tep_draw_textarea_field('review', 'soft', 60, 15);
?>
</td>
</tr>
<tr>
<td class="smallText" align="right"><?php
echo TEXT_NO_HTML;
?>
</td>
</tr>
<tr>
<td class="main"><?php
echo '<b>' . SUB_TITLE_RATING . '</b> ' . TEXT_BAD . ' ' . tep_draw_radio_field('rating', '1') . ' ' . tep_draw_radio_field('rating', '2') . ' ' . tep_draw_radio_field('rating', '3') . ' ' . tep_draw_radio_field('rating', '4') . ' ' . tep_draw_radio_field('rating', '5') . ' ' . TEXT_GOOD;
?>
</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php
echo tep_draw_separator('pixel_trans.gif', '100%', '10');
?>
</td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
示例7: tep_draw_radio_field
if (ACCOUNT_GENDER == 'true') {
if (isset($gender)) {
$male = $gender == 'm' ? true : false;
$female = $gender == 'f' ? true : false;
} else {
$male = false;
$female = false;
}
?>
<tr>
<td class="main"><?php
echo ENTRY_GENDER;
?>
</td>
<td class="main"><?php
echo tep_draw_radio_field('gender', 'm', $male) . ' ' . MALE . ' ' . tep_draw_radio_field('gender', 'f', $female) . ' ' . FEMALE . ' ' . (tep_not_null(ENTRY_GENDER_TEXT) ? '<span class="inputRequirement">' . ENTRY_GENDER_TEXT . '</span>' : '');
?>
</td>
</tr>
<?php
}
?>
<tr>
<td class="main"><?php
echo ENTRY_FIRST_NAME;
?>
</td>
<td class="main"><?php
echo tep_draw_input_field('firstname') . ' ' . (tep_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="inputRequirement">' . ENTRY_FIRST_NAME_TEXT . '</span>' : '');
?>
</td>
示例8: tep_draw_radio_field
Released under the GNU General Public License
*/
if (!isset($process)) {
$process = false;
}
if (ACCOUNT_GENDER == 'true') {
if (isset($gender)) {
$male = $gender == 'm' ? true : false;
} else {
$male = $entry['entry_gender'] == 'm' ? true : false;
}
$female = !$male;
$xoopsTpl->assign("gender", 1);
$xoopsTpl->assign("male", tep_draw_radio_field('gender', 'm', $male));
$xoopsTpl->assign("female", tep_draw_radio_field('gender', 'f', $female));
if (tep_not_null(ENTRY_GENDER_TEXT)) {
$xoopsTpl->assign("gender_entry", '<span class="inputRequirement">' . ENTRY_GENDER_TEXT . '</span>');
}
}
$xoopsTpl->assign("firstname", tep_draw_input_field('firstname', $entry['entry_firstname']));
$xoopsTpl->assign("lastname", tep_draw_input_field('lastname', $entry['entry_lastname']));
$xoopsTpl->assign("seperator", tep_draw_separator('pixel_trans.gif', '100%', '10'));
if (tep_not_null(ENTRY_FIRST_NAME_TEXT)) {
$xoopsTpl->assign("firstname_entry", '<span class="inputRequirement">' . ENTRY_FIRST_NAME_TEXT . '</span>');
}
if (tep_not_null(ENTRY_LAST_NAME_TEXT)) {
$xoopsTpl->assign("lastname_entry", '<span class="inputRequirement">' . ENTRY_LAST_NAME_TEXT . '</span>');
}
if (ACCOUNT_COMPANY == 'true') {
$xoopsTpl->assign("company", 1);
示例9: tep_draw_separator
<td><?php
echo tep_draw_separator('pixel_trans.gif', '10', '1');
?>
</td>
<td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr class="moduleRow">
<td width="10"><?php
echo tep_draw_separator('pixel_trans.gif', '10', '1');
?>
</td>
<td class="main" colspan="2"><b><?php
echo tep_output_string_protected($addresses['firstname'] . ' ' . $addresses['lastname']);
?>
</b></td>
<td class="main" align="right"><?php
echo tep_draw_radio_field('address', $addresses['address_book_id'], $addresses['address_book_id'] == $checked);
?>
<span style="color:red">Select</span></td>
<td width="10"><?php
echo tep_draw_separator('pixel_trans.gif', '10', '1');
?>
</td>
</tr>
<tr>
<td width="10"><?php
echo tep_draw_separator('pixel_trans.gif', '10', '1');
?>
</td>
<td colspan="3"><table border="0" cellspacing="0" cellpadding="2">
<tr>
<td width="10"><?php
示例10: array
break;
case 'move_product':
$heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_MOVE_PRODUCT . '</b>');
$contents = array('form' => tep_draw_form('products', FILENAME_CATEGORIES, 'action=move_product_confirm&cPath=' . $cPath) . tep_draw_hidden_field('products_id', $pInfo->products_id));
$contents[] = array('text' => sprintf(TEXT_MOVE_PRODUCTS_INTRO, $pInfo->products_name));
$contents[] = array('text' => '<br>' . TEXT_INFO_CURRENT_CATEGORIES . '<br><b>' . tep_output_generated_category_path($pInfo->products_id, 'product') . '</b>');
$contents[] = array('text' => '<br>' . sprintf(TEXT_MOVE, $pInfo->products_name) . '<br>' . tep_draw_pull_down_menu('move_to_category_id', tep_get_category_tree(), $current_category_id));
$contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_move.gif', IMAGE_MOVE) . ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
break;
case 'copy_to':
$heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_COPY_TO . '</b>');
$contents = array('form' => tep_draw_form('copy_to', FILENAME_CATEGORIES, 'action=copy_to_confirm&cPath=' . $cPath) . tep_draw_hidden_field('products_id', $pInfo->products_id));
$contents[] = array('text' => TEXT_INFO_COPY_TO_INTRO);
$contents[] = array('text' => '<br>' . TEXT_INFO_CURRENT_CATEGORIES . '<br><b>' . tep_output_generated_category_path($pInfo->products_id, 'product') . '</b>');
$contents[] = array('text' => '<br>' . TEXT_CATEGORIES . '<br>' . tep_draw_pull_down_menu('categories_id', tep_get_category_tree(), $current_category_id));
$contents[] = array('text' => '<br>' . TEXT_HOW_TO_COPY . '<br>' . tep_draw_radio_field('copy_as', 'link', true) . ' ' . TEXT_COPY_AS_LINK . '<br>' . tep_draw_radio_field('copy_as', 'duplicate') . ' ' . TEXT_COPY_AS_DUPLICATE);
$contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_copy.gif', IMAGE_COPY) . ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
break;
default:
if ($rows > 0) {
if (isset($cInfo) && is_object($cInfo)) {
// category info box contents
$heading[] = array('text' => '<b>' . $cInfo->categories_name . '</b>');
$contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $cInfo->categories_id . '&action=edit_category') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $cInfo->categories_id . '&action=delete_category') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a> <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $cInfo->categories_id . '&action=move_category') . '">' . tep_image_button('button_move.gif', IMAGE_MOVE) . '</a>');
$contents[] = array('text' => '<br>' . TEXT_DATE_ADDED . ' ' . tep_date_short($cInfo->date_added));
if (tep_not_null($cInfo->last_modified)) {
$contents[] = array('text' => TEXT_LAST_MODIFIED . ' ' . tep_date_short($cInfo->last_modified));
}
$contents[] = array('text' => '<br>' . tep_info_image($cInfo->categories_image, $cInfo->categories_name, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT) . '<br>' . $cInfo->categories_image);
$contents[] = array('text' => '<br>' . TEXT_SUBCATEGORIES . ' ' . $cInfo->childs_count . '<br>' . TEXT_PRODUCTS . ' ' . $cInfo->products_count);
} elseif (isset($pInfo) && is_object($pInfo)) {
示例11: tep_draw_input_field
echo TEXT_MANUFACTURERS_FEATURED_DATE;
?>
</td>
<td class="main"><?php
echo '<small>(YYYY-MM-DD)</small><br>' . tep_draw_input_field('manufacturers_featured_until', isset($mInfo->manufacturers_featured_until) ? $mInfo->manufacturers_featured_until : '', 'id="manufacturers"');
?>
</td>
</tr>
<tr>
<td class="main"><br><?php
echo TEXT_MANUFACTURER_FEATURED;
echo ' <span title="' . MANUFACTURER_FEATURED_HELP . '|' . MANUFACTURER_FEATURED_HELP_TEXT . '">' . tep_image(DIR_WS_ICONS . 'help.png', '');
?>
</span></td>
<td class="main"><br><?php
echo tep_draw_radio_field('manufacturer_featured', '1', $in_fm_status) . ' ' . TEXT_MANUFACTURER_YES . ' ' . tep_draw_radio_field('manufacturer_featured', '0', $out_fm_status) . ' ' . TEXT_MANUFACTURER_NO;
?>
</td>
</tr>
<tr>
<td class="main"><?php
echo TEXT_MANUFACTURER_FEATURED_DATE;
?>
</td>
<td class="main"><?php
echo '<small>(YYYY-MM-DD)</small><br>' . tep_draw_input_field('manufacturer_featured_until', isset($mInfo->manufacturer_featured_until) ? $mInfo->manufacturer_featured_until : '', 'id="manufacturer"');
?>
</td>
</tr>
</table>
</td>
示例12: tep_draw_radio_field
echo TEXT_ENTER_PAYMENT_INFORMATION . '<br /><br />' . "\n";
}
$js_string = '';
$radio_buttons = 0;
for ($i = 0, $n = sizeof($selection); $i < $n; $i++) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<?php
if ($selection[$i]['id'] == $payment || $n == 1) {
echo ' <tr id="defaultSelected" class="moduleRowSelected">' . "\n";
} else {
echo ' <tr class="moduleRow">' . "\n";
}
?>
<td valign="top"><?php
echo tep_draw_radio_field('payment', $selection[$i]['id'], $i == 0, 'id="rb' . $i . '"' . (tep_not_null($selection[$i]['error']) ? ' disabled="disabled"' : ' onclick="showSelectionFields(\'' . $selection[$i]['id'] . '\');"'));
?>
</td>
<td valign="top" width="100%"><?php
echo '<label for="rb' . $i . '"><strong>' . $selection[$i]['module'] . '</strong></label><br />' . (tep_not_null($selection[$i]['error']) ? '<span class="errorText">' . $selection[$i]['error'] . '</span>' : nl2br(trim($selection[$i]['description'])));
if (isset($selection[$i]['fields']) && is_array($selection[$i]['fields'])) {
$js_string .= (tep_not_null($js_string) ? ',' : '') . '"' . $selection[$i]['id'] . '"';
?>
<table border="0" cellspacing="0" cellpadding="0" id="payment_<?php
echo $selection[$i]['id'];
?>
" style="display: <?php
echo $selection[$i]['id'] == $payment || $i == 0 && !isset($payment) ? 'block' : 'none';
?>
;">
<?php
示例13: tep_draw_radio_field
</p>
<?php
}
$radio_buttons = 0;
?>
<ul class="formatted-list">
<?php
for ($i = 0, $n = sizeof($selection); $i < $n; $i++) {
?>
<li class="moduleRow paymentRow<?php
echo $selection[$i]['id'] == $paymentMethod ? ' moduleRowSelected' : '';
?>
">
<?php
if (sizeof($selection) > 1) {
echo tep_draw_radio_field('payment', $selection[$i]['id'], $selection[$i]['id'] == $paymentMethod);
} else {
echo tep_draw_hidden_field('payment', $selection[$i]['id']);
}
?>
<span class="method-name"><?php
echo $selection[$i]['module'];
?>
</span>
<?php
if (isset($selection[$i]['error'])) {
echo $selection[$i]['error'];
} elseif (isset($selection[$i]['fields']) && is_array($selection[$i]['fields']) && $selection[$i]['id'] == $paymentMethod) {
for ($j = 0, $n2 = sizeof($selection[$i]['fields']); $j < $n2; $j++) {
echo $selection[$i]['fields'][$j]['title'];
echo $selection[$i]['fields'][$j]['field'];
示例14: tep_draw_pull_down_menu
<td><?php
echo tep_draw_pull_down_menu('banners_group_manufacturers_id', $manufacturers_pull_down, $banners_group_section == 'manufacturers' ? $banners_group_id : '', ' onChange="if (Number(this.value)) $(\'group_section_manufacturers\').checked=true"');
?>
</tr>
<tr>
<td><?php
echo tep_draw_radio_field('banners_group_section', 'info', 0, $banners_group_section, ' id="group_section_info"');
?>
Info Page:</td>
<td><?php
echo tep_draw_pull_down_menu('banners_group_info_id', $info_pull_down, $banners_group_section == 'info' ? $banners_group_id : '', ' onChange="if (Number(this.value)) $(\'group_section_info\').checked=true"');
?>
</tr>
<tr>
<td><?php
echo tep_draw_radio_field('banners_group_section', 'other', 0, $banners_group_section, ' id="group_section_other"');
?>
Other:</td>
<td><?php
echo tep_draw_input_field('banners_group_other', $banners_group_section == 'other' ? $banner['banners_group'] : '', ' onChange="if (this.value!=\'\') $(\'group_section_other\').checked=true"');
?>
</tr>
</table>
<!--?php echo tep_draw_pull_down_menu('banners_group', $groups_array, $bInfo->banners_group) . TEXT_BANNERS_NEW_GROUP . '<br>' . tep_draw_input_field('new_banners_group', '', '', ((sizeof($groups_array) > 0) ? false : true)); ?-->
</td>
</tr>
<tr>
<td colspan="2"><?php
echo tep_draw_separator('pixel_trans.gif', '1', '10');
?>
示例15: Translate
if (ACCOUNT_GENDER == 'true' && !tep_session_is_registered('customer_id')) {
$gender = $billingAddress['entry_gender'];
if (isset($gender)) {
$male = $gender == 'm' ? true : false;
$female = $gender == 'f' ? true : false;
} else {
$male = false;
$female = false;
}
?>
<tr>
<td colspan="2"><?php
echo Translate('Geslacht');
?>
<?php
echo tep_draw_radio_field('billing_gender', 'm', $male) . ' ' . Translate('man') . ' ' . tep_draw_radio_field('billing_gender', 'f', $female) . ' ' . Translate('vrouw');
?>
</td>
</tr>
<?php
}
if (ACCOUNT_COMPANY == 'true') {
?>
<tr>
<td>
<?php
if (!tep_session_is_registered('customer_id')) {
?>
<label class="formLabel" for="billing_company"><?php
echo Translate('Bedrijf');
?>