本文整理汇总了PHP中tep_draw_checkbox_field函数的典型用法代码示例。如果您正苦于以下问题:PHP tep_draw_checkbox_field函数的具体用法?PHP tep_draw_checkbox_field怎么用?PHP tep_draw_checkbox_field使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tep_draw_checkbox_field函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
function execute()
{
global $HTTP_GET_VARS, $HTTP_POST_VARS, $oscTemplate, $customer_id, $order_id;
if (tep_session_is_registered('customer_id')) {
$global_query = tep_db_query("select global_product_notifications from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int) $customer_id . "'");
$global = tep_db_fetch_array($global_query);
if ($global['global_product_notifications'] != '1') {
if (isset($HTTP_GET_VARS['action']) && $HTTP_GET_VARS['action'] == 'update') {
if (isset($HTTP_POST_VARS['notify']) && is_array($HTTP_POST_VARS['notify']) && !empty($HTTP_POST_VARS['notify'])) {
$notify = array_unique($HTTP_POST_VARS['notify']);
foreach ($notify as $n) {
if (is_numeric($n) && $n > 0) {
$check_query = tep_db_query("select products_id from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . (int) $n . "' and customers_id = '" . (int) $customer_id . "' limit 1");
if (!tep_db_num_rows($check_query)) {
tep_db_query("insert into " . TABLE_PRODUCTS_NOTIFICATIONS . " (products_id, customers_id, date_added) values ('" . (int) $n . "', '" . (int) $customer_id . "', now())");
}
}
}
}
}
$products_displayed = array();
$products_query = tep_db_query("select products_id, products_name from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int) $order_id . "' order by products_name");
while ($products = tep_db_fetch_array($products_query)) {
if (!isset($products_displayed[$products['products_id']])) {
$products_displayed[$products['products_id']] = tep_draw_checkbox_field('notify[]', $products['products_id']) . ' ' . $products['products_name'];
}
}
$products_notifications = implode('<br />', $products_displayed);
ob_start();
include DIR_WS_MODULES . 'content/' . $this->group . '/templates/product_notifications.php';
$template = ob_get_clean();
$oscTemplate->addContent($template, $this->group);
}
}
}
示例2: showInterface
function showInterface()
{
global $pInfo;
if (MODULE_SHIPPING_FREIGHTQUOTE_STATUS != 'True') {
return false;
}
$template = array('TITLE' => TEXT_PRODUCTS_FREIGHTQUOTE, 'LABEL_ENABLE' => TEXT_PRODUCTS_FREIGHTQUOTE_ENABLE, 'LABEL_CLASS' => TEXT_PRODUCTS_FREIGHTQUOTE_CLASS, 'LABEL_DIMENSIONS' => TEXT_PRODUCTS_FREIGHTQUOTE_DIMENSIONS, 'LABEL_NMFC' => TEXT_PRODUCTS_FREIGHTQUOTE_NMFC, 'LABEL_HZMT' => TEXT_PRODUCTS_FREIGHTQUOTE_HZMT, 'LABEL_COMMODITY_TYPE' => TEXT_PRODUCTS_FREIGHTQUOTE_COMMODITY_TYPE, 'LABEL_PACKAGE_TYPE' => TEXT_PRODUCTS_FREIGHTQUOTE_PACKAGE_TYPE, 'LABEL_CONTENT_TYPE' => TEXT_PRODUCTS_FREIGHTQUOTE_CONTENT_TYPE);
$boolean_dropdown = array(array('id' => 'true', 'text' => 'True'), array('id' => 'false', 'text' => 'False'));
$classes = array(array('id' => '50', 'text' => '50'), array('id' => '55', 'text' => '55'), array('id' => '60', 'text' => '60'), array('id' => '65', 'text' => '65'), array('id' => '70', 'text' => '70'), array('id' => '77.5', 'text' => '77.5'), array('id' => '85', 'text' => '85'), array('id' => '92.5', 'text' => '92.5'), array('id' => '100', 'text' => '100'), array('id' => '110', 'text' => '110'), array('id' => '125', 'text' => '125'), array('id' => '150', 'text' => '150'), array('id' => '175', 'text' => '175'), array('id' => '200', 'text' => '200'), array('id' => '250', 'text' => '250'), array('id' => '300', 'text' => '300'), array('id' => '400', 'text' => '400'), array('id' => '500', 'text' => '500'));
$packages = array(array('id' => 'Bags', 'text' => 'Bags'), array('id' => 'Bales', 'text' => 'Bales'), array('id' => 'Boxes', 'text' => 'Boxes'), array('id' => 'Bundles', 'text' => 'Bundles'), array('id' => 'Carpets', 'text' => 'Carpets'), array('id' => 'Coils', 'text' => 'Coils'), array('id' => 'Crates', 'text' => 'Crates'), array('id' => 'Cylinders', 'text' => 'Cylinders'), array('id' => 'Drums', 'text' => 'Drums'), array('id' => 'Pails', 'text' => 'Pails'), array('id' => 'Reels', 'text' => 'Reels'), array('id' => 'Rolls', 'text' => 'Rolls'), array('id' => 'TubesPipes', 'text' => 'Tubes/Pipes'), array('id' => 'Motorcycle', 'text' => 'Motorcycle'), array('id' => 'ATV', 'text' => 'ATV'), array('id' => 'Pallets_48x40', 'text' => 'Pallets 48x40'), array('id' => 'Pallets_other', 'text' => 'Pallets Other'), array('id' => 'Pallets_120x120', 'text' => 'Pallets 120x120'), array('id' => 'Pallets_120x100', 'text' => 'Pallets 120x100'), array('id' => 'Pallets_120x80', 'text' => 'Pallets 120x80'), array('id' => 'Pallets_europe', 'text' => 'Pallets Europe'), array('id' => 'Pallets_48x48', 'text' => 'Pallets 48x48'), array('id' => 'Pallets_60x48', 'text' => 'Pallets 60x48'));
$commodities = array(array('id' => 'GeneralMerchandise', 'text' => 'General Merchandise'), array('id' => 'Machinery', 'text' => 'Machinery'), array('id' => 'HouseholdGoods', 'text' => 'Household Goods'), array('id' => 'FragileGoods', 'text' => 'Fragile Goods'), array('id' => 'ComputerHardware', 'text' => 'Computer Hardware'), array('id' => 'BottledProducts', 'text' => 'Bottled Products'), array('id' => 'BottleBeverages', 'text' => 'Bottle Beverages'), array('id' => 'NonPerishableFood', 'text' => 'Non Perishable Food'), array('id' => 'SteelSheet', 'text' => 'Steel Sheet'), array('id' => 'BrandedGoods', 'text' => 'Branded Goods'), array('id' => 'PrecisionInstruments', 'text' => 'Precision Instruments'), array('id' => 'ChemicalsHazardous', 'text' => 'Chemicals Hazardous'), array('id' => 'FineArt', 'text' => 'Fine Art'), array('id' => 'Automobiles', 'text' => 'Automobiles'), array('id' => 'CellPhones', 'text' => 'Cell Phones'), array('id' => 'NewMachinery', 'text' => 'New Machinery'), array('id' => 'UsedMachinery', 'text' => 'Used Machinery'), array('id' => 'HotTubs', 'text' => 'Hot Tubs'));
$contents = array(array('id' => 'NewCommercialGoods', 'text' => 'New Commercial Goods'), array('id' => 'UsedCommercialGoods', 'text' => 'Used Commercial Goods'), array('id' => 'HouseholdGoods', 'text' => 'Household Goods'), array('id' => 'FragileGoods', 'text' => 'Fragile Goods'), array('id' => 'Automobile', 'text' => 'Automobile'), array('id' => 'Motorcycle', 'text' => 'Motorcycle'), array('id' => 'AutoOrMotorcycle', 'text' => 'Auto or Motorcycle'));
$template['DROPDOWN_CLASS'] = tep_draw_pull_down_menu('products_freightquote_class', $classes, $pInfo->products_freightquote_class);
$template['FIELD_ENABLE'] = tep_draw_checkbox_field('products_freightquote_enable', '1', $pInfo->products_freightquote_enable == '1' ? true : false);
$template['FIELDS_DIMENSIONS'] = tep_draw_input_field('products_freightquote_length', $pInfo->products_freightquote_length, 'maxlength=3 style="width:50px"') . 'L x ' . tep_draw_input_field('products_freightquote_width', $pInfo->products_freightquote_width, 'maxlength=3 style="width:50px"') . 'W x ' . tep_draw_input_field('products_freightquote_height', $pInfo->products_freightquote_height, 'maxlength=3 style="width:50px"') . 'H';
$template['FIELD_NMFC'] = tep_draw_input_field('products_freightquote_nmfc', $pInfo->products_freightquote_nmfc, 'maxlength=100');
$template['DROPDOWN_HZMT'] = tep_draw_pull_down_menu('products_freightquote_hzmt', $boolean_dropdown, $pInfo->products_freightquote_hzmt == 'true' ? 'true' : 'false');
$template['DROPDOWN_PACKAGE_TYPES'] = tep_draw_pull_down_menu('products_freightquote_package_type', $packages, $pInfo->products_freightquote_package_type);
$template['DROPDOWN_COMMODITY_TYPES'] = tep_draw_pull_down_menu('products_freightquote_commodity_type', $commodities, $pInfo->products_freightquote_commodity_type);
$template['DROPDOWN_CONTENT_TYPES'] = tep_draw_pull_down_menu('products_freightquote_content_type', $contents, $pInfo->products_freightquote_content_type);
$template_file = file_get_contents($this->fqDirectory . 'freightquote_interface.tpl');
foreach ($template as $key => $val) {
$template_file = str_replace($key, $val, $template_file);
}
echo $template_file;
}
示例3: 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;
}
示例4: selection
function selection()
{
global $order;
for ($i = 1; $i < 13; $i++) {
$expires_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%B', mktime(0, 0, 0, $i, 1, 2000)));
}
$today = getdate();
for ($i = $today['year']; $i < $today['year'] + 10; $i++) {
$expires_year[] = array('id' => strftime('%y', mktime(0, 0, 0, 1, 1, $i)), 'text' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i)));
}
// Depending on whether CreLoaded is collecting the CC# or not. If
// CreLoaded is collecting then we must allow the user to enter it,
// here we output the form fields to collect the cc#
if (!$this->quantum_gets_cc) {
$selection = array('id' => $this->code, 'module' => $this->public_title, 'fields' => array(array('title' => MODULE_PAYMENT_QUANTUMQGWDBE_TEXT_CREDIT_CARD_OWNER, 'field' => tep_draw_input_field('quantumqgwdbe_cc_owner', $order->billing['firstname'] . ' ' . $order->billing['lastname'])), array('title' => MODULE_PAYMENT_QUANTUMQGWDBE_TEXT_CREDIT_CARD_NUMBER, 'field' => tep_draw_input_field('quantumqgwdbe_cc_number')), array('title' => MODULE_PAYMENT_QUANTUMQGWDBE_TEXT_CREDIT_CARD_EXPIRES, 'field' => tep_draw_pull_down_menu('quantumqgwdbe_cc_expires_month', $expires_month) . ' ' . tep_draw_pull_down_menu('quantumqgwdbe_cc_expires_year', $expires_year))));
if ($this->uses_cvv) {
array_push($selection['fields'], array('title' => MODULE_PAYMENT_QUANTUMQGWDBE_TEXT_CREDIT_CARD_CVV, 'field' => tep_draw_input_field('quantumqgwdbe_cvv', '', "SIZE=4, MAXLENGTH=4") . ' ' . '<a href="cvv.html" target="_blank">' . '<u><i>' . '(What is CVV?)' . '</i></u></a>', 'field' => tep_draw_input_field('quantumqgwdbe_cvv', '', "SIZE=4, MAXLENGTH=4")), array('title' => MODULE_PAYMENT_QUANTUMQGWDBE_TEXT_NOT_CVV, 'field' => tep_draw_checkbox_field('quantumqgwdbe_notcvv', '1')), array('title' => MODULE_PAYMENT_QUANTUMQGWDBE_TEXT_REASON_NOT_CVV, 'field' => tep_draw_pull_down_menu('quantumqgwdbe_cvvtype', $this->cvvtype, '2')));
}
} else {
$selection = array('id' => $this->code, 'module' => $this->title, 'fields' => array(array('title' => 'Continue', 'field' => tep_draw_hidden_field('quantumqgwdbe_cc_owner', ''))));
}
return $selection;
}
示例5: output
//.........这里部分代码省略.........
} else {
if ($field_data['name'] == 'billing_firstname') {
if (isset($_POST[get_class($this) . '_' . $field])) {
$billing_firstname = $_POST[get_class($this) . '_' . $field];
} else {
$billing_firstname = $to['billing_name'];
$billing_firstname = end(explode(' ', $billing_firstname));
}
$html .= '<input type="' . $field_data['input'] . '" id="' . get_class($this) . '_input_' . $field . '" name="' . get_class($this) . '_' . $field . '" value="' . $billing_firstname . '" />';
} else {
if ($field_data['name'] == 'billing_lastname') {
if (isset($_POST[get_class($this) . '_' . $field])) {
$billing_lastname = $_POST[get_class($this) . '_' . $field];
} else {
$billing_lastname = $to['billing_name'];
$billing_lastname_temp = end(explode(' ', $billing_lastname));
$billing_lastname = substr($billing_lastname, 0, -strlen($billing_lastname_temp));
}
$html .= '<input type="' . $field_data['input'] . '" id="' . get_class($this) . '_input_' . $field . '" name="' . get_class($this) . '_' . $field . '" value="' . $billing_lastname . '" />';
} else {
if ($field_data['name'] == 'delivery_firstname') {
if (isset($_POST[get_class($this) . '_' . $field])) {
$delivery_firstname = $_POST[get_class($this) . '_' . $field];
} else {
$delivery_firstname = $to['delivery_name'];
$delivery_firstname = end(explode(' ', $delivery_firstname));
}
$html .= '<input type="' . $field_data['input'] . '" id="' . get_class($this) . '_input_' . $field . '" name="' . get_class($this) . '_' . $field . '" value="' . $delivery_firstname . '" />';
} else {
if ($field_data['name'] == 'delivery_lastname') {
if (isset($_POST[get_class($this) . '_' . $field])) {
$delivery_lastname = $_POST[get_class($this) . '_' . $field];
} else {
$delivery_lastname = $to['delivery_name'];
$delivery_lastname_temp = end(explode(' ', $delivery_lastname));
$delivery_lastname = substr($delivery_lastname, 0, -strlen($delivery_lastname_temp));
}
$html .= '<input type="' . $field_data['input'] . '" id="' . get_class($this) . '_input_' . $field . '" name="' . get_class($this) . '_' . $field . '" value="' . $delivery_lastname . '" />';
////////////////////////////////////////////////////////////////* #1539 - Shipping address
} else {
if ($field_data['name'] == 'delivery_telephone' && $to['delivery_telephone'] == '') {
$delivery_telephone = $to['customers_telephone'];
$html .= '<input type="' . $field_data['input'] . '" id="' . get_class($this) . '_input_' . $field . '" name="' . get_class($this) . '_' . $field . '" value="' . $delivery_telephone . '" />';
////////////////////////////////////////////////////////////////* #1539 - Shipping address
} else {
$html .= '<input type="' . $field_data['input'] . '" id="' . get_class($this) . '_input_' . $field . '" name="' . get_class($this) . '_' . $field . '" value="' . (isset($_POST[get_class($this) . '_' . $field]) ? $_POST[get_class($this) . '_' . $field] : $to[$field]) . '" />';
}
}
}
}
}
}
$html .= '</div>';
//end controle
$html .= '</div>';
//end control-group
}
}
$html .= '</div>';
//end well
$html .= '</div>';
//end span6
}
$html .= '</div>';
//end row-fluid
if ($this->config['create_account']['value'] == 'true' && !tep_session_is_registered('customer_id')) {
$html .= '<div class="alert alert-error" id="emailCheck" style="display:none;">' . Translate('Het ingegeven e-mailadres bestaat al in ons systeem. Gelieve een te registreren met een ander e-mailadres') . '</div>';
$html .= '<a href="#" id="show_create_account_button" style="display:none;margin-bottom:5px;">' . Translate('Uw gegevens onthouden voor de volgende keer?') . '</a>';
$html .= '<div id="create_account_block">';
$html .= '<h3>' . Translate('Maak een account aan') . '</h3>';
$html .= '<div class="well form-inline">';
if (!empty($this->errors[get_class($this)]['create_account'])) {
$html .= '<div class="alert alert-error">' . $this->errors[get_class($this)]['create_account'] . '</div>';
}
//Terms
$html .= '<div id="CAparagraph">';
$html .= tep_draw_checkbox_field('TermsAgree', 'true', false, 'id="TermsAgree"');
$html .= '<label for="TermsAgree">';
$termsAgree = sprintf(Translate("Ik heb de %s gelezen en ga hiermee akkoord"), '<a href="' . tep_href_link('conditions_modal.php') . '" target="_blank">' . Translate('Algemene voorwaarden') . '</a>');
if (CONDITIONS_CREATE_ACCOUNT == 'Link') {
$html .= $termsAgree;
} else {
$html .= strip_tags($termsAgree);
}
$html .= '</label>';
$html .= '</div>';
//Password field
$html .= '<input type="password" id="' . get_class($this) . '_input_password" name="' . get_class($this) . '_password" value="' . (isset($_POST[get_class($this) . '_password']) ? $_POST[get_class($this) . '_password'] : '') . '" placeholder="' . Translate('Wachtwoord') . '" /> ';
//Password2 field
$html .= '<input type="password" id="' . get_class($this) . '_input_password2" name="' . get_class($this) . '_password2" value="' . (isset($_POST[get_class($this) . '_password2']) ? $_POST[get_class($this) . '_password2'] : '') . '" placeholder="' . Translate('Wachtwoord bevestigen') . '" /> ';
//Create account button
$html .= '<button type="submit" name="action" value="create_account" class="btn">' . Translate('Registreer') . '</button>';
$html .= '</div>';
//end well
$html .= '</div>';
//End create_account_block
}
}
return $html;
}
示例6: tep_draw_pull_down_menu
<label class="control-label col-sm-3 col-lg-3 text-right"><?php
echo ENTRY_CATEGORIES;
?>
</label>
<div class="col-sm-9 col-lg-9"><?php
echo tep_draw_pull_down_menu('categories_id', tep_get_categories(array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES))), null, 'class="form-control"');
?>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3 col-lg-3 text-right margin-top" style="padding-left:0px;"><?php
echo ENTRY_INCLUDE_SUBCATEGORIES;
?>
</label>
<div class="col-sm-9 col-lg-9"><?php
echo tep_draw_checkbox_field('inc_subcat', null, null, 'class="form-control"', null);
?>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3 col-lg-3 text-right small-margin-top"><?php
echo ENTRY_MANUFACTURERS;
?>
</label>
<div class="col-sm-9 col-lg-9"><?php
echo tep_draw_pull_down_menu('manufacturers_id', tep_get_manufacturers(array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS))), null, 'class="form-control"');
?>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3 col-lg-3 text-right small-margin-top"><?php
示例7: tep_draw_pull_down_menu
<tr class="infoBoxContents">
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td class="fieldKey"><?php
echo ENTRY_CATEGORIES;
?>
</td>
<td class="fieldValue"><?php
echo tep_draw_pull_down_menu('categories_id', tep_get_categories(array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES))));
?>
</td>
</tr>
<tr>
<td class="fieldKey"> </td>
<td class="smallText"><?php
echo tep_draw_checkbox_field('inc_subcat', '1', true) . ' ' . ENTRY_INCLUDE_SUBCATEGORIES;
?>
</td>
</tr>
<tr>
<td colspan="2"><?php
echo tep_draw_separator('pixel_trans.gif', '100%', '10');
?>
</td>
</tr>
<tr>
<td class="fieldKey"><?php
echo ENTRY_MANUFACTURERS;
?>
</td>
<td class="fieldValue"><?php
示例8: tep_draw_input_field
?>
</td>
<td class="item_entry" style="width:200px">
<?php
echo tep_draw_input_field('employees_id', '', 'size="1" maxlength="10" style="width: 100%"' . ($_POST['action'] == 'enter_data' && $_POST['employees_status'] == 'new' ? '' : ' disabled'));
?>
</td>
<td class="item_entry"> </td>
<td class="item_entry">
<?php
echo TEXT_EMPLOYEES_RESET_PASSWORD;
?>
</td>
<td class="item_entry" style="text-align:right;width:25px">
<?php
echo tep_draw_checkbox_field('employees_reset_password', true, false, $_POST['action'] == 'enter_data' && $_POST['employees_status'] != 'new' ? '' : ' disabled');
?>
</td>
</tr>
<tr>
<td class="item_entry">
<?php
echo TEXT_EMPLOYEES_LOGIN;
?>
</td>
<td class="item_entry" style="width:200px">
<?php
echo tep_draw_input_field('employees_login', '', 'size="1" maxlength="16" style="width: 100%"' . ($_POST['action'] == 'enter_data' ? '' : ' disabled'));
?>
</td>
<td class="item_entry" colspan="3"> </td>
示例9: tep_db_query
<?php
/*$result = tep_db_query("
SELECT c.categories_id AS id, t.products_types_name AS tname, cd.categories_name AS name FROM categories c
JOIN categories_description AS cd ON cd.categories_id = c.categories_id
RIGHT JOIN products_types AS t ON t.products_types_id = c.products_types_id
AND cd.language_id = 2
AND t.language_id = 2
AND c.products_types_id = 1
AND c.parent_id = 0
;");*/
$result = tep_db_query("\n\t\t\tSELECT c.categories_id AS id, cd.categories_name AS name FROM categories c\n\t\t\tJOIN categories_description AS cd ON cd.categories_id = c.categories_id\n\t\t\tAND cd.language_id = 2\n\t\t\tAND c.products_types_id = 1\n\t\t\tAND c.parent_id = 0\n\t\t\t;");
while ($val = tep_db_fetch_array($result)) {
?>
<div>
<?php
echo tep_draw_checkbox_field('subscribe_[' . $val['id'] . ']', '1', 0);
?>
<!--a href="<?php
echo tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $val['id']);
?>
"-->
<?php
echo $val['tname'] . '' . $val['name'];
?>
<!--/a-->
</div>
<?php
}
?>
</fieldset>
<br>
示例10: array
break;
case 'edit':
$heading[] = array('text' => '<strong>' . TEXT_INFO_HEADING_EDIT_CURRENCY . '</strong>');
$contents = array('form' => tep_draw_form('currencies', FILENAME_CURRENCIES, 'cID=' . $cInfo->currencies_id . '&action=save'));
$contents[] = array('text' => TEXT_INFO_EDIT_INTRO);
$contents[] = array('text' => '<br>' . TEXT_INFO_CURRENCY_TITLE . '<br>' . tep_draw_input_field('title', $cInfo->title));
$contents[] = array('text' => '<br>' . TEXT_INFO_CURRENCY_CODE . '<br>' . tep_draw_input_field('code', $cInfo->code));
$contents[] = array('text' => '<br>' . TEXT_INFO_CURRENCY_SYMBOL_LEFT . '<br>' . tep_draw_input_field('symbol_left', $cInfo->symbol_left));
$contents[] = array('text' => '<br>' . TEXT_INFO_CURRENCY_SYMBOL_RIGHT . '<br>' . tep_draw_input_field('symbol_right', $cInfo->symbol_right));
$contents[] = array('text' => '<br>' . TEXT_INFO_CURRENCY_DECIMAL_POINT . '<br>' . tep_draw_input_field('decimal_point', $cInfo->decimal_point));
$contents[] = array('text' => '<br>' . TEXT_INFO_CURRENCY_THOUSANDS_POINT . '<br>' . tep_draw_input_field('thousands_point', $cInfo->thousands_point));
$contents[] = array('text' => '<br>' . TEXT_INFO_CURRENCY_DECIMAL_PLACES . '<br>' . tep_draw_input_field('decimal_places', $cInfo->decimal_places));
$contents[] = array('text' => '<br>' . TEXT_INFO_CURRENCY_VALUE . '<br>' . tep_draw_input_field('value', $cInfo->value));
$contents[] = array('text' => '<br>' . tep_draw_checkbox_field('allow_auto_update', '1', $cInfo->allow_auto_update == '1') . TEXT_INFO_CURRENCY_ALLOW_AUTO_UPDATE);
if (DEFAULT_CURRENCY != $cInfo->code) {
$contents[] = array('text' => '<br>' . tep_draw_checkbox_field('default') . ' ' . TEXT_INFO_SET_AS_DEFAULT);
}
$contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_update.gif', IMAGE_UPDATE) . ' <a href="' . tep_href_link(FILENAME_CURRENCIES, 'cID=' . $cInfo->currencies_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
break;
case 'delete':
$heading[] = array('text' => '<strong>' . TEXT_INFO_HEADING_DELETE_CURRENCY . '</strong>');
$contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
$contents[] = array('text' => '<br><strong>' . $cInfo->title . '</strong>');
$contents[] = array('align' => 'center', 'text' => '<br>' . ($remove_currency ? '<a href="' . tep_href_link(FILENAME_CURRENCIES, 'cID=' . $cInfo->currencies_id . '&action=deleteconfirm') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a>' : '') . ' <a href="' . tep_href_link(FILENAME_CURRENCIES, 'cID=' . $cInfo->currencies_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
break;
default:
if (is_object($cInfo)) {
$heading[] = array('text' => '<strong>' . $cInfo->title . '</strong>');
$contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_CURRENCIES, 'cID=' . $cInfo->currencies_id . '&action=edit') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_CURRENCIES, 'cID=' . $cInfo->currencies_id . '&action=delete') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a>' . ($cInfo->allow_auto_update == '1' ? ' <a href="' . tep_href_link(FILENAME_CURRENCIES, 'cID=' . $cInfo->currencies_id . '¤cyID=' . $cInfo->currencies_id . '&action=update') . '">' . tep_image_button('button_update.gif', IMAGE_UPDATE) . '</a>' : ''));
$contents[] = array('text' => '<br>' . TEXT_INFO_CURRENCY_TITLE . ' ' . $cInfo->title);
$contents[] = array('text' => TEXT_INFO_CURRENCY_CODE . ' ' . $cInfo->code);
示例11: tep_build_epf_pulldown
<td class="fieldValue">
<?php
if ($e['uses_list']) {
$epf_values = tep_build_epf_pulldown($e['id'], $languages_id);
if ($e['multi_select']) {
// multi-select field
echo TEXT_FOR_FIELD . tep_draw_radio_field('match' . $e['id'], 'any', true) . TEXT_MATCH_ANY . tep_draw_radio_field('match' . $e['id'], 'all') . TEXT_MATCH_ALL . '</td></tr><tr><td class="fieldKey">' . $e['label'] . '</td><td class="fieldValue">';
$col = 0;
echo '<table><tr>';
foreach ($epf_values as $value) {
$col++;
if ($col > $e['columns']) {
echo '</tr><tr>';
$col = 1;
}
echo '<td>' . tep_draw_checkbox_field($e['field'] . '[]', $value['id'], false, 'id="' . $value['id'] . '"') . '</td><td>' . tep_get_extra_field_list_value($value['id'], false, $e['display_type']) . '<td><td> </td>';
}
echo '</tr></table>';
} else {
// single select field
$epf_values = array_merge(array(array('id' => '', 'text' => TEXT_ANY_VALUE)), $epf_values);
if ($e['use_checkbox']) {
$col = 0;
echo '<table><tr>';
foreach ($epf_values as $value) {
$col++;
if ($col > $e['columns']) {
echo '</tr><tr>';
$col = 1;
}
echo '<td>' . tep_draw_radio_field($e['field'], $value['id'], $value['id'] == '', 'id="' . $e['field'] . '_' . $value['id'] . '"') . '</td><td>' . ($value['id'] == '' ? TEXT_ANY_VALUE : tep_get_extra_field_list_value($value['id'], false, $e['display_type'])) . '<td><td> </td>';
示例12: display_multi_entries
function display_multi_entries()
{
extract(tep_load('defs', 'database'));
$html_string = '';
$html_string .= ' <div class="comboHeading">' . "\n" . ' <div>' . TEXT_SELECT_MULTIGTEXT . '</div>' . "\n" . ' </div>' . "\n" . ' <div class="formArea">' . tep_draw_form('mc', $cDefs->script, tep_get_all_get_params('action') . 'action=insert_multi_entries', 'post') . "\n" . ' <table class="tabledata">' . "\n" . ' <tr class="dataTableHeadingRow">' . "\n" . ' <th class="calign"><a href="#gtext_id" class="page_select" title="' . TEXT_PAGE_SELECT . '">' . tep_image(DIR_WS_ICONS . 'icon_tick.png', TEXT_PAGE_SELECT) . '</a></th>' . "\n" . ' <th>' . TABLE_HEADING_GTEXT . tep_draw_hidden_field('multi_form', 'insert_multi_entries') . '</th>' . "\n" . ' </tr>' . "\n";
$buttons = array('<a href="' . tep_href_link($cDefs->script, tep_get_all_get_params('action', 'mcpage') . 'action=list') . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>', tep_image_submit('button_insert.gif', IMAGE_INSERT));
$rows = 0;
$zones_query_raw = "select gt.gtext_id, gt.gtext_title from " . TABLE_GTEXT . " gt order by gt.gtext_title";
$zones_split = new splitPageResults($zones_query_raw, SEO_PAGE_SPLIT, '', 'mcpage');
$zones_query = $db->query($zones_split->sql_query);
$bCheck = false;
while ($zones_array = $db->fetch_array($zones_query)) {
$check_query = $db->query("select count(*) as total from " . TABLE_SEO_TO_GTEXT . " where gtext_id = '" . (int) $zones_array['gtext_id'] . "'");
$check_array = $db->fetch_array($check_query);
$bCheck = $check_array['total'] ? true : false;
$rows++;
$row_class = $rows % 2 ? 'dataTableRow' : 'dataTableRowAlt';
if ($bCheck) {
$row_class = 'dataTableRowGreen';
}
$html_string .= ' <tr class="' . $row_class . '">' . "\n" . ' <td class="calign">' . ($bCheck ? 'Included' : tep_draw_checkbox_field('gtext_id[' . $zones_array['gtext_id'] . ']')) . '</td>' . "\n" . ' <td>' . $zones_array['gtext_title'] . '</td>' . "\n" . ' </tr>' . "\n";
}
$html_string .= ' </table><div class="formButtons">' . implode('', $buttons) . '</div></form></div>' . "\n" . ' <div class="listArea splitLine">' . "\n" . ' <div class="floater">' . $zones_split->display_count(TEXT_DISPLAY_NUMBER_OF_ENTRIES) . '</div>' . "\n" . ' <div class="floatend">' . $zones_split->display_links(tep_get_all_get_params('action', 'mcpage') . 'action=multi_entries') . '</div>' . "\n" . ' </div>' . "\n";
return $html_string;
}
示例13: array
$heading[] = array('text' => '<strong>' . TEXT_INFO_HEADING_DELETE_TYPE . '</strong>');
$contents = array('form' => tep_draw_form('boards', FILENAME_BOARDS, tep_get_all_get_params(array('action', 'tID', 'page')) . 'tID=' . $sInfo->boards_types_id . '&action=delete_type_confirm'));
$contents[] = array('text' => TEXT_INFO_DELETE_TYPE_INTRO);
$contents[] = array('text' => '<br><strong>' . $tInfo->boards_types_name . '</strong>');
$contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . tep_href_link(FILENAME_BOARDS, tep_get_all_get_params(array('tID', 'action', 'page')) . 'tID=' . $tInfo->boards_types_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
break;
case 'delete_app':
case 'delete':
$heading[] = array('text' => '<strong>' . ($action == 'delete_app' ? TEXT_INFO_HEADING_DELETE_APP : TEXT_INFO_HEADING_DELETE) . '</strong>');
$contents = array('form' => tep_draw_form('boards', FILENAME_BOARDS, tep_get_all_get_params(array('bID', 'action')) . 'bID=' . $bInfo->boards_id . '&action=delete_confirm'));
$contents[] = array('text' => $action == 'delete_app' ? TEXT_INFO_DELETE_APP_INTRO : TEXT_INFO_DELETE_INTRO);
if (tep_not_null($bInfo->boards_name)) {
$contents[] = array('text' => '<br><strong>' . $bInfo->boards_name . '</strong>');
}
if (tep_not_null($bInfo->customers_ip)) {
$contents[] = array('text' => '<br>' . tep_draw_checkbox_field('board_blacklist', '1', false, '', 'onclick="if (this.checked) document.getElementById(\'board_blacklist_comment\').style.display = \'block\'; else document.getElementById(\'board_blacklist_comment\').style.display = \'none\';"') . ' ' . TEXT_DELETE_BOARD_BLACKLIST . '<div id="board_blacklist_comment" style="display: none;"><br>' . TEXT_DELETE_BOARD_BLACKLIST_COMMENTS . '<br>' . tep_draw_input_field('board_blacklist_reason', TEXT_DELETE_BOARD_BLACKLIST_COMMENTS_DEFAULT, 'size="35"') . '</div>');
}
$contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . tep_href_link(FILENAME_BOARDS, tep_get_all_get_params(array('bID', 'action')) . 'bID=' . $bInfo->boards_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
break;
default:
if (is_object($tInfo)) {
$heading[] = array('text' => '<strong>' . $tInfo->boards_types_name . '</strong>');
if (DEBUG_MODE == 'on') {
$contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_BOARDS, tep_get_all_get_params(array('bID', 'action', 'tID')) . 'tID=' . $tInfo->boards_types_id . '&action=edit_type') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_BOARDS, tep_get_all_get_params(array('bID', 'action', 'tID')) . 'tID=' . $tInfo->boards_types_id . '&action=delete_type') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a><br><br>');
}
if (tep_not_null($tInfo->boards_types_short_description)) {
$contents[] = array('text' => $tInfo->boards_types_short_description);
}
$contents[] = array('text' => '<br>' . TEXT_INFO_BOARDS_COUNT . ' ' . (int) $tInfo->boards_count);
$contents[] = array('text' => '<br>' . TEXT_INFO_DATE_ADDED . ' ' . tep_date_short($tInfo->date_added));
if (tep_not_null($tInfo->last_modified)) {
示例14: array_merge
$types_array = $g_db->fetch_array($types_query);
$votes_array = array_merge($votes_array, $types_array);
} else {
$votes_array['title'] = TEXT_INFO_NA;
}
$inf_link = tep_href_link($g_script, tep_get_all_get_params('action', 'vtID') . 'vtID=' . $votes_array['auto_id']);
$votes_array['ip_address'] = $g_http->ip2s($votes_array['ip_address']);
if (!empty($vtID) && $vtID == $votes_array['auto_id']) {
$vtInfo = new objectInfo($votes_array);
echo ' <tr class="dataTableRowSelected">' . "\n";
} else {
echo ' <tr class="' . $row_class . ' row_link" href="' . $inf_link . '">' . "\n";
}
?>
<td class="calign"><?php
echo tep_draw_checkbox_field('mark[' . $votes_array['auto_id'] . ']', 1);
?>
</td>
<td><?php
echo '<a href="' . $link . '" title="' . $votes_array['title'] . '">' . $votes_array['title'] . '</a>';
?>
</td>
<td><?php
echo ($votes_array['votes_type'] == 1 ? TEXT_INFO_PAGE : TEXT_INFO_COLLECTION) . '</a>';
?>
</td>
<td><?php
echo $votes_array['ip_address'];
?>
</td>
<td><?php
示例15: confirmation
function confirmation()
{
global $order, $customer_id;
$card_types = array();
foreach ($this->getCardTypes() as $key => $value) {
$card_types[] = array('id' => $key, 'text' => $value);
}
$today = getdate();
$months_array = array();
for ($i = 1; $i < 13; $i++) {
$months_array[] = array('id' => sprintf('%02d', $i), 'text' => sprintf('%02d', $i));
}
$year_valid_to_array = array();
for ($i = $today['year']; $i < $today['year'] + 10; $i++) {
$year_valid_to_array[] = array('id' => strftime('%y', mktime(0, 0, 0, 1, 1, $i)), 'text' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i)));
}
$year_valid_from_array = array();
for ($i = $today['year'] - 4; $i < $today['year'] + 1; $i++) {
$year_valid_from_array[] = array('id' => strftime('%y', mktime(0, 0, 0, 1, 1, $i)), 'text' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i)));
}
$content = '';
if (MODULE_PAYMENT_SAGE_PAY_DIRECT_TOKENS == 'True') {
$tokens_query = tep_db_query("select id, card_type, number_filtered, expiry_date from customers_sagepay_tokens where customers_id = '" . (int) $customer_id . "' order by date_added");
if (tep_db_num_rows($tokens_query) > 0) {
$content .= '<table id="sagepay_table" border="0" width="100%" cellspacing="0" cellpadding="2">';
while ($tokens = tep_db_fetch_array($tokens_query)) {
$content .= '<tr class="moduleRow" id="sagepay_card_' . (int) $tokens['id'] . '">' . ' <td width="40" valign="top"><input type="radio" name="sagepay_card" value="' . (int) $tokens['id'] . '" /></td>' . ' <td valign="top">' . tep_output_string_protected($tokens['number_filtered']) . ' ' . tep_output_string_protected(substr($tokens['expiry_date'], 0, 2)) . '/' . strftime('%Y', mktime(0, 0, 0, 1, 1, 2000 + substr($tokens['expiry_date'], 2))) . ' ' . tep_output_string_protected($tokens['card_type']) . '</td>' . '</tr>';
if (MODULE_PAYMENT_SAGE_PAY_DIRECT_VERIFY_WITH_CVC == 'True') {
$content .= '<tr class="moduleRowExtra" id="sagepay_card_cvc_' . (int) $tokens['id'] . '">' . ' <td width="40" valign="top"> </td>' . ' <td valign="top">' . MODULE_PAYMENT_SAGE_PAY_DIRECT_CREDIT_CARD_CVC . ' ' . tep_draw_input_field('cc_cvc_tokens_nh-dns[' . (int) $tokens['id'] . ']', '', 'size="5" maxlength="4"') . '</td>' . '</tr>';
}
}
$content .= '<tr class="moduleRow" id="sagepay_card_0">' . ' <td width="40" valign="top"><input type="radio" name="sagepay_card" value="0" /></td>' . ' <td valign="top">' . MODULE_PAYMENT_SAGE_PAY_DIRECT_CREDIT_CARD_NEW . '</td>' . '</tr>' . '</table>';
}
}
$content .= '<table id="sagepay_table_new_card" border="0" width="100%" cellspacing="0" cellpadding="2">' . '<tr>' . ' <td width="30%">' . MODULE_PAYMENT_SAGE_PAY_DIRECT_CREDIT_CARD_TYPE . '</td>' . ' <td>' . tep_draw_pull_down_menu('cc_type', $card_types, '', 'id="sagepay_card_type"') . '</td>' . '</tr>' . '<tr>' . ' <td width="30%">' . MODULE_PAYMENT_SAGE_PAY_DIRECT_CREDIT_CARD_OWNER . '</td>' . ' <td>' . tep_draw_input_field('cc_owner', $order->billing['firstname'] . ' ' . $order->billing['lastname'], 'maxlength="50"') . '</td>' . '</tr>' . '<tr>' . ' <td width="30%">' . MODULE_PAYMENT_SAGE_PAY_DIRECT_CREDIT_CARD_NUMBER . '</td>' . ' <td>' . tep_draw_input_field('cc_number_nh-dns', '', 'maxlength="20"') . '</td>' . '</tr>';
if (MODULE_PAYMENT_SAGE_PAY_DIRECT_ALLOW_MAESTRO == 'True' || MODULE_PAYMENT_SAGE_PAY_DIRECT_ALLOW_AMEX == 'True') {
$content .= '<tr>' . ' <td width="30%">' . MODULE_PAYMENT_SAGE_PAY_DIRECT_CREDIT_CARD_STARTS . '</td>' . ' <td>' . tep_draw_pull_down_menu('cc_starts_month', $months_array, '', 'id="sagepay_card_date_start"') . ' ' . tep_draw_pull_down_menu('cc_starts_year', $year_valid_from_array) . ' ' . MODULE_PAYMENT_SAGE_PAY_DIRECT_CREDIT_CARD_STARTS_INFO . '</td>' . '</tr>';
}
$content .= '<tr>' . ' <td width="30%">' . MODULE_PAYMENT_SAGE_PAY_DIRECT_CREDIT_CARD_EXPIRES . '</td>' . ' <td>' . tep_draw_pull_down_menu('cc_expires_month', $months_array) . ' ' . tep_draw_pull_down_menu('cc_expires_year', $year_valid_to_array) . '</td>' . '</tr>';
if (MODULE_PAYMENT_SAGE_PAY_DIRECT_ALLOW_MAESTRO == 'True') {
$content .= '<tr>' . ' <td width="30%">' . MODULE_PAYMENT_SAGE_PAY_DIRECT_CREDIT_CARD_ISSUE_NUMBER . '</td>' . ' <td>' . tep_draw_input_field('cc_issue_nh-dns', '', 'id="sagepay_card_issue" size="3" maxlength="2"') . ' ' . MODULE_PAYMENT_SAGE_PAY_DIRECT_CREDIT_CARD_ISSUE_NUMBER_INFO . '</td>' . '</tr>';
}
if (MODULE_PAYMENT_SAGE_PAY_DIRECT_VERIFY_WITH_CVC == 'True') {
$content .= '<tr>' . ' <td width="30%">' . MODULE_PAYMENT_SAGE_PAY_DIRECT_CREDIT_CARD_CVC . '</td>' . ' <td>' . tep_draw_input_field('cc_cvc_nh-dns', '', 'size="5" maxlength="4"') . '</td>' . '</tr>';
}
if (MODULE_PAYMENT_SAGE_PAY_DIRECT_TOKENS == 'True') {
$content .= '<tr>' . ' <td width="30%"> </td>' . ' <td>' . tep_draw_checkbox_field('cc_save', 'true') . ' ' . MODULE_PAYMENT_SAGE_PAY_DIRECT_CREDIT_CARD_SAVE . '</td>' . '</tr>';
}
$content .= '</table>';
$content .= !$this->templateClassExists() ? $this->getSubmitCardDetailsJavascript() : '';
$confirmation = array('title' => $content);
return $confirmation;
}