public static function parse($data) { global $lC_Currencies; $default_value = null; if (isset($data['simple_option']) && $data['simple_option'] !== false) { $options = array(); $group_id = ''; $group_title = ''; unset($data['simple_option']); foreach ($data as $key => $val) { if (isset($val['group_title']) && empty($val['group_title']) === false) { $group_title = $val['group_title']; break; } } $string = '<div class="margin-left margin-bottom">' . ' <table class="full-width">' . ' <tr>' . ' <td valign="top" class="third-width"><label class="margin-right small-margin-top">' . $group_title . '</label></td>' . ' <td valign="top">'; reset($data); $cnt = 0; foreach ($data as $key => $val) { $price_ind = (double) $val['price_modifier'] < 0.0 ? '-' : '+'; $price_formatted = (double) $val['price_modifier'] != 0.0 ? $price_ind . $lC_Currencies->format(number_format($val['price_modifier'], DECIMAL_PLACES), $lC_Currencies->getCode()) : null; $options[$val['value_id']] = $val['price_modifier']; $group_id = $val['group_id']; $group_title = $val['group_title']; $string .= '<div class="radio no-margin-top small-margin-bottom mid-margin-left"> <label> <input type="radio" ' . ($cnt == 0 ? 'checked="checked"' : '') . ' name="simple_options[' . $group_id . ']" value="' . $val['value_id'] . '" modifier="' . $val['price_modifier'] . '" onchange="refreshPrice();" id="simple_options_' . $group_id . '_' . $val['value_id'] . '"> <span style="font-size:.9em;">' . ' ' . $val['value_title'] . ' ' . $price_formatted . '</span> </label> </div>'; $cnt++; } $string .= ' </td>' . ' </tr>' . ' </table>' . '</div>'; } else { foreach ($data['data'] as $variant) { if ($variant['default'] === true) { $default_value = (string) $variant['id']; break; } } $string = '<table border="0" cellspacing="0" cellpadding="2" class="full-width">' . ' <tr>' . ' <td valign="top" class="third-width">' . $data['title'] . ': </td>' . ' <td>' . lc_draw_radio_field('variants[' . $data['group_id'] . ']', $data['data'], $default_value, 'onchange="refreshPrice();" id="variants_' . $data['group_id'] . '"', '<br />') . '</td>' . ' </tr>' . '</table>'; } return $string; }
' <label for="language_import" class="label" style="width:0px !important"><?php echo $lC_Language->get('field_language_selection'); ?> </label>'+ ' <?php echo lc_draw_pull_down_menu('language_import', null, null, 'class="input with-small-padding" style = "width:30%"'); ?> '+ ' </p>'+ ' <p class="button-height inline-label">'+ ' <label for="import_type" class="absolute-left"><strong><?php echo $lC_Language->get('field_import_type'); ?> </strong></label>'+ ' <div class="button-height inline-label"><?php echo lc_draw_radio_field('import_type', array(array('id' => 'add', 'text' => $lC_Language->get('only_add_new_records')), array('id' => 'update', 'text' => $lC_Language->get('only_update_existing_records')), array('id' => 'replace', 'text' => $lC_Language->get('replace_all'))), 'add', 'class="switch medium"'); ?> </div>'+ ' </p>'+ ' </form>'+ ' </div>'+ '</div>', title: '<?php echo $lC_Language->get('modal_heading_import_language'); ?> ', width: 500, actions: { 'Close' : { color: 'red', click: function(win) { win.closeModal(); }
<?php /** @package catalog::modules @author Loaded Commerce, LLC @copyright Copyright 2003-2013 Loaded Commerce Development Team @copyright Portions Copyright 2003 osCommerce @license https://github.com/loadedcommerce/loaded7/blob/master/LICENSE.txt @version $Id: address_book_details.php v1.0 2013-08-08 datazen $ */ if (ACCOUNT_GENDER > -1) { echo '<li>' . lc_draw_label($lC_Language->get('field_customer_gender'), null, 'fake', ACCOUNT_GENDER > 0) . lc_draw_radio_field('gender', array(array('id' => 'm', 'text' => $lC_Language->get('gender_male')), array('id' => 'f', 'text' => $lC_Language->get('gender_female'))), isset($Qentry) ? $Qentry->value('entry_gender') : (!$lC_Customer->hasDefaultAddress() ? $lC_Customer->getGender() : null)) . '</li>'; } echo '<li>' . lc_draw_label($lC_Language->get('field_customer_first_name'), null, 'firstname', true) . lc_draw_input_field('firstname', isset($Qentry) ? $Qentry->value('entry_firstname') : (!$lC_Customer->hasDefaultAddress() ? $lC_Customer->getFirstName() : null)) . '</li>'; echo '<li>' . lc_draw_label($lC_Language->get('field_customer_last_name'), null, 'lastname', true) . lc_draw_input_field('lastname', isset($Qentry) ? $Qentry->value('entry_lastname') : (!$lC_Customer->hasDefaultAddress() ? $lC_Customer->getLastName() : null)) . '</li>'; if (ACCOUNT_COMPANY > -1) { echo '<li>' . lc_draw_label($lC_Language->get('field_customer_company'), null, 'company', ACCOUNT_COMPANY > 0) . lc_draw_input_field('company', isset($Qentry) ? $Qentry->value('entry_company') : null) . '</li>'; } echo '<li>' . lc_draw_label($lC_Language->get('field_customer_street_address'), null, 'street_address', true) . lc_draw_input_field('street_address', isset($Qentry) ? $Qentry->value('entry_street_address') : null) . '</li>'; if (ACCOUNT_SUBURB > -1) { echo '<li>' . lc_draw_label($lC_Language->get('field_customer_suburb'), null, 'suburb', ACCOUNT_SUBURB > 0) . lc_draw_input_field('suburb', isset($Qentry) ? $Qentry->value('entry_suburb') : null) . '</li>'; } if (ACCOUNT_POST_CODE > -1) { echo '<li>' . lc_draw_label($lC_Language->get('field_customer_post_code'), null, 'postcode', ACCOUNT_POST_CODE > 0) . lc_draw_input_field('postcode', isset($Qentry) ? $Qentry->value('entry_postcode') : null) . '</li>'; } echo '<li>' . lc_draw_label($lC_Language->get('field_customer_city'), null, 'city', true) . lc_draw_input_field('city', isset($Qentry) ? $Qentry->value('entry_city') : null) . '</li>'; if (ACCOUNT_STATE > -1) { echo '<li>' . lc_draw_label($lC_Language->get('field_customer_state'), null, 'state', ACCOUNT_STATE > 0) . (isset($Qentry) ? lC_AddressBook::getZonesField($Qentry->valueInt('entry_country_id')) : lC_AddressBook::getZonesField(STORE_COUNTRY)) . '</li>'; } echo '<li>' . lc_draw_label($lC_Language->get('field_customer_country'), null, 'country', true) . lc_draw_pull_down_menu('country', lC_AddressBook::getCountriesDropdownArray(), isset($Qentry) ? $Qentry->valueInt('entry_country_id') : STORE_COUNTRY) . '</li>'; if (ACCOUNT_TELEPHONE > -1) {
} if (file_exists(LOCAL_EXE_ZIP)) { $compress_array[] = array('id' => 'zip', 'text' => TEXT_INFO_USE_ZIP); } echo lc_draw_radio_field('compress', $compress_array, 'no', null, '<br />'); ?> </p> <p> <?php if (is_dir(DIR_FS_BACKUP) && is_writeable(DIR_FS_BACKUP)) { echo lc_draw_checkbox_field('download', array(array('id' => 'yes', 'text' => TEXT_INFO_DOWNLOAD_ONLY))) . '*<br /><br />*' . TEXT_INFO_BEST_THROUGH_HTTPS; } else { echo lc_draw_radio_field('download', array(array('id' => 'yes', 'text' => TEXT_INFO_DOWNLOAD_ONLY)), true) . '*<br /><br />*' . TEXT_INFO_BEST_THROUGH_HTTPS; } ?> </p> <p align="center"><?php echo '<input type="submit" value="' . IMAGE_BACKUP . '" class="operationButton"> <input type="button" value="' . IMAGE_CANCEL . '" onclick="toggleInfoBox(\'bDefault\');" class="operationButton">'; ?> </p> </form> </div> </div> <div id="infoBox_bRestoreLocal" <?php
echo '<tr class="module-row cursor-pointer" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n"; } ?> <td><?php echo $methods['title']; ?> </td> <?php if ($lC_Shipping->numberOfQuotes() > 1 || sizeof($quotes['methods']) > 1) { ?> <td><?php echo $lC_Currencies->displayPrice($methods['cost'], $quotes['tax_class_id']); ?> </td> <td class="text-right"><?php echo lc_draw_radio_field('shipping_mod_sel', $quotes['id'] . '_' . $methods['id'], $lC_ShoppingCart->getShippingMethod('id'), 'id="' . $quotes['id'] . '_' . $counter . '"', ''); ?> </td> <?php } else { ?> <td class="content-checkout-listing-blank"></td> <td class="text-right"><?php echo $lC_Currencies->displayPrice($methods['cost'], $quotes['tax_class_id']) . lc_draw_hidden_field('shipping_mod_sel', $quotes['id'] . '_' . $methods['id']); ?> </td> <?php } ?> </tr> <?php
?> <table class="content-checkout-payment-methods-table table table-hover table-responsive no-margin-bottom"> <?php if ($n == 1 || $lC_ShoppingCart->hasBillingMethod() && $selection[$i]['id'] == $lC_ShoppingCart->getBillingMethod('id')) { echo '<tr class="module-row-selected cursor-pointer" id="default-selected" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n"; } else { echo '<tr class="module-row cursor-pointer" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n"; } if ($n > 1) { ?> <td><?php echo $selection[$i]['module']; ?> </td> <td class="text-right"><?php echo lc_draw_radio_field('payment_method', $selection[$i]['id'], $lC_ShoppingCart->hasBillingMethod() ? $lC_ShoppingCart->getBillingMethod('id') : null, 'id="pm_' . $counter . '"', ''); ?> </td> <?php } else { ?> <td class="content-checkout-listing-blank no-padding-left"></td> <td><?php echo $selection[$i]['module'] . lc_draw_hidden_field('payment_method', $selection[$i]['id']); ?> </td> <?php } ?> </tr>
$.modal({ content: '<div id="backupContent">'+ ' <form name="bBackup" id="bBackup" action="" method="post">'+ ' <p><?php echo $lC_Language->get('introduction_new_backup'); ?> </p>'+ ' <p><?php echo lc_draw_radio_field('compression', $compression_array, 'none', null, ' <br />'); ?> </p>'+ ' <p><?php if (!lc_empty(DIR_FS_BACKUP) && @is_dir(DIR_FS_BACKUP) && @is_writeable(DIR_FS_BACKUP)) { echo lc_draw_checkbox_field('download_only', array(array('id' => 'yes', 'text' => $lC_Language->get('field_download_only')))); } else { echo lc_draw_radio_field('download_only', array(array('id' => 'yes', 'text' => $lC_Language->get('field_download_only'))), true); } ?> </p>'+ ' </form>'+ '</div>', title: '<?php echo $lC_Language->get('modal_heading_new_backup'); ?> ', width: 300, actions: { 'Close' : { color: 'red', click: function(win) { win.closeModal(); } }
echo '<table class="table no-margin-bottom content-checkout-address-selection-table">'; if ($Qaddresses->valueInt('address_book_id') == $lC_ShoppingCart->getShippingAddress('id') || lC_AddressBook::numberOfEntries() == 1) { echo '<tr class="module-row-selected cursor-pointer" id="default-selected" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n"; } else { echo '<tr class="module-row cursor-pointer" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n"; } ?> <td class=""><span class="strong"><?php echo $Qaddresses->valueProtected('firstname') . ' ' . $Qaddresses->valueProtected('lastname'); ?> </span><br /><small><?php echo str_replace($Qaddresses->valueProtected('firstname') . ' ' . $Qaddresses->valueProtected('lastname') . ', ', '', lC_Address::format($Qaddresses->toArray(), ', ')); ?> </small></td> <td class="text-right"><?php echo lc_draw_radio_field('address', $Qaddresses->valueInt('address_book_id'), $lC_ShoppingCart->getShippingAddress('id'), 'id="address_' . $radio_buttons . '"', ''); ?> </td> </tr> </table> <?php $radio_buttons++; } ?> </div> <?php } } ?> </div> <?php
public static function getRatesData() { $result = array(); $services = array(array('id' => 'oanda', 'text' => 'Oanda (http://www.oanda.com)'), array('id' => 'xe', 'text' => 'XE (http://www.xe.com)')); $result['ratesSelection'] = lc_draw_radio_field('service', $services, null, 'class="input"', '<br />'); return $result; }
<div class="form-group"><label><?php echo $lC_Language->get('field_customer_email_address'); ?> </label><input class="form-control" type="text" name="customer_email_address" value="<?php echo $lC_Customer->isLoggedOn() ? $lC_Customer->getEmailAddress() : null; ?> "></div> <div class="form-group"><label><?php echo $lC_Language->get('field_customer_comments'); ?> </label><textarea class="form-control" name="review" rows="5" cols="25"></textarea></div> <div class="form-group no-margin-bottom"><label class="margin-right"><?php echo $lC_Language->get('field_review_rating'); ?> </label><span class="content-reviews-rating-title-bad with-padding-no-top-bottom strong"><?php echo $lC_Language->get('review_lowest_rating_title') . '</span><span class="content-reviews-rating-stars">' . lc_draw_radio_field('rating', array('1', '2', '3', '4', '5'), '3', null, null) . '</span><span class="content-reviews-rating-title-good with-padding-no-top-bottom strong">' . $lC_Language->get('review_highest_rating_title'); ?> </span></div> </form> </div> </div> </div> <div class="button-set clearfix large-margin-bottom"> <button class="pull-right btn btn-lg btn-primary large-margin-right" onclick="$('#reviews_new').submit();" type="button"><?php echo $lC_Language->get('button_write_review'); ?> </button> <button class="pull-left btn btn-lg btn-default large-margin-left" onclick="window.location.href='<?php echo lc_href_link(FILENAME_PRODUCTS, 'reviews&' . $lC_Product->getID()); ?> '" type="button"><?php