function getData() { global $request_type, $oscTemplate; $OSCOM_Db = Registry::get('Db'); $data = ''; $Qmanufacturers = $OSCOM_Db->query('select manufacturers_id, manufacturers_name from :table_manufacturers order by manufacturers_name'); $manufacturers = $Qmanufacturers->fetchAll(); if (!empty($manufacturers)) { if (count($manufacturers) <= MAX_DISPLAY_MANUFACTURERS_IN_A_LIST) { // Display a list $manufacturers_list = '<ul class="nav nav-pills nav-stacked">'; foreach ($manufacturers as $m) { $manufacturers_name = strlen($m['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN ? substr($m['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $m['manufacturers_name']; if (isset($_GET['manufacturers_id']) && $_GET['manufacturers_id'] == $m['manufacturers_id']) { $manufacturers_name = '<strong>' . $manufacturers_name . '</strong>'; } $manufacturers_list .= '<li><a href="' . OSCOM::link('index.php', 'manufacturers_id=' . (int) $m['manufacturers_id']) . '">' . $manufacturers_name . '</a></li>'; } $manufacturers_list .= '</ul>'; $data = $manufacturers_list; } else { // Display a drop-down $manufacturers_array = array(); if (MAX_MANUFACTURERS_LIST < 2) { $manufacturers_array[] = array('id' => '', 'text' => PULL_DOWN_DEFAULT); } foreach ($manufacturers as $m) { $manufacturers_name = strlen($m['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN ? substr($m['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $m['manufacturers_name']; $manufacturers_array[] = array('id' => $m['manufacturers_id'], 'text' => $manufacturers_name); } $data = HTML::form('manufacturers', OSCOM::link('index.php', '', $request_type, false), 'get', null, ['session_id' => true]) . HTML::selectField('manufacturers_id', $manufacturers_array, isset($_GET['manufacturers_id']) ? $_GET['manufacturers_id'] : '', 'onchange="this.form.submit();" size="' . MAX_MANUFACTURERS_LIST . '"') . '</form>'; } } return $data; }
function choose_audience() { $OSCOM_Db = Registry::get('Db'); $OSCOM_Language = Registry::get('Language'); $products_array = []; $Qproducts = $OSCOM_Db->get(['products p', 'products_description pd'], ['pd.products_id', 'pd.products_name'], ['pd.language_id' => $OSCOM_Language->getId(), 'pd.products_id' => ['rel' => 'p.products_id'], 'p.products_status' => '1'], 'pd.products_name'); while ($Qproducts->fetch()) { $products_array[] = ['id' => $Qproducts->valueInt('products_id'), 'text' => $Qproducts->value('products_name')]; } $choose_audience_string = '<script type="text/javascript"><!-- function mover(move) { if (move == \'remove\') { for (x=0; x<(document.notifications.products.length); x++) { if (document.notifications.products.options[x].selected) { with(document.notifications.elements[\'chosen[]\']) { options[options.length] = new Option(document.notifications.products.options[x].text,document.notifications.products.options[x].value); } document.notifications.products.options[x] = null; x = -1; } } } if (move == \'add\') { for (x=0; x<(document.notifications.elements[\'chosen[]\'].length); x++) { if (document.notifications.elements[\'chosen[]\'].options[x].selected) { with(document.notifications.products) { options[options.length] = new Option(document.notifications.elements[\'chosen[]\'].options[x].text,document.notifications.elements[\'chosen[]\'].options[x].value); } document.notifications.elements[\'chosen[]\'].options[x] = null; x = -1; } } } return true; } function selectAll(FormName, SelectBox) { temp = "document." + FormName + ".elements[\'" + SelectBox + "\']"; Source = eval(temp); for (x=0; x<(Source.length); x++) { Source.options[x].selected = "true"; } if (x<1) { alert(\'' . OSCOM::getDef('js_please_select_products') . '\'); return false; } else { return true; } } //--></script>'; $global_button = HTML::button(OSCOM::getDef('button_global'), 'fa fa-globe', OSCOM::link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'] . '&action=confirm&global=true')); $cancel_button = HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'])); $choose_audience_string .= '<form name="notifications" action="' . OSCOM::link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'] . '&action=confirm') . '" method="post" onsubmit="return selectAll(\'notifications\', \'chosen[]\')"><table border="0" width="100%" cellspacing="0" cellpadding="2">' . "\n" . ' <tr>' . "\n" . ' <td align="center" class="smallText"><strong>' . OSCOM::getDef('text_products') . '</strong><br />' . HTML::selectField('products', $products_array, '', 'size="20" style="width: 20em;" multiple') . '</td>' . "\n" . ' <td align="center" class="smallText"> <br />' . $global_button . '<br /><br /><br /><input type="button" value="' . OSCOM::getDef('button_select') . '" style="width: 8em;" onClick="mover(\'remove\');"><br /><br /><input type="button" value="' . OSCOM::getDef('button_unselect') . '" style="width: 8em;" onClick="mover(\'add\');"><br /><br /><br />' . HTML::button(OSCOM::getDef('image_send'), 'fa fa-envelope') . '<br /><br />' . $cancel_button . '</td>' . "\n" . ' <td align="center" class="smallText"><strong>' . OSCOM::getDef('text_selected_products') . '</strong><br />' . HTML::selectField('chosen[]', array(), '', 'size="20" style="width: 20em;" multiple') . '</td>' . "\n" . ' </tr>' . "\n" . '</table></form>'; return $choose_audience_string; }
public static function getBannerGroupSelection($value, $key = '') { $OSCOM_Db = Registry::get('Db'); $name = !empty($key) ? 'configuration[' . $key . ']' : 'configuration_value'; $groups = [['id' => '', 'text' => '--None--']]; $Qgroups = $OSCOM_Db->query('select distinct banners_group from :table_banners order by banners_group'); while ($Qgroups->fetch()) { $groups[] = ['id' => $Qgroups->value('banners_group'), 'text' => $Qgroups->value('banners_group')]; } return HTML::selectField($name, $groups, $value); }
function execute() { global $PHP_SELF, $currencies, $oscTemplate; if (substr(basename($PHP_SELF), 0, 8) != 'checkout') { if (isset($currencies) && is_object($currencies) && count($currencies->currencies) > 1) { reset($currencies->currencies); $currencies_array = array(); foreach ($currencies->currencies as $key => $value) { $currencies_array[] = array('id' => $key, 'text' => $value['title']); } $hidden_get_variables = ''; foreach ($_GET as $key => $value) { if (is_string($value) && $key != 'currency' && $key != session_name() && $key != 'x' && $key != 'y') { $hidden_get_variables .= HTML::hiddenField($key, $value); } } $form_output = HTML::form('currencies', OSCOM::link($PHP_SELF, '', false), 'get', null, ['session_id' => true]) . HTML::selectField('currency', $currencies_array, $_SESSION['currency'], 'onchange="this.form.submit();"') . $hidden_get_variables . '</form>'; ob_start(); include 'includes/modules/boxes/templates/currencies.php'; $data = ob_get_clean(); $oscTemplate->addBlock($data, $this->group); } } }
<tr> <td class="main"><?php echo OSCOM::getDef('entry_newsletter'); ?> </td> <td class="main"> <?php if ($processed == true) { if ($cInfo->customers_newsletter == '1') { echo OSCOM::getDef('entry_newsletter_yes'); } else { echo OSCOM::getDef('entry_newsletter_no'); } echo HTML::hiddenField('customers_newsletter'); } else { echo HTML::selectField('customers_newsletter', $newsletter_array, $cInfo->customers_newsletter == '1' ? '1' : '0'); } ?> </td> </tr> </table></td> </tr> <tr> <td align="right" class="smallText"><?php echo HTML::button(OSCOM::getDef('image_save'), 'fa fa-save') . HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('action')))); ?> </td> </tr></form> <?php } else { ?>
<label for="inputState" class="control-label col-sm-3"><?php echo ENTRY_STATE; ?> </label> <div class="col-sm-9"> <?php if ($process == true) { if ($entry_state_has_zones == true) { $zones_array = array(); $Qzones = $OSCOM_Db->prepare('select zone_name from :table_zones where zone_country_id = :zone_country_id order by zone_name'); $Qzones->bindInt(':zone_country_id', $country); $Qzones->execute(); while ($Qzones->fetch()) { $zones_array[] = array('id' => $Qzones->value('zone_name'), 'text' => $Qzones->value('zone_name')); } echo HTML::selectField('state', $zones_array, 0, 'id="inputState"'); } else { echo HTML::inputField('state', NULL, 'id="inputState" placeholder="' . ENTRY_STATE_TEXT . '"'); } } else { echo HTML::inputField('state', NULL, 'id="inputState" placeholder="' . ENTRY_STATE_TEXT . '"'); } ?> </div> </div> <?php } ?> <div class="form-group has-feedback">
$Qfilter->execute(); } if ($Qfilter->getPageSetTotalRows() > 1) { echo '<div>' . HTML::form('filter', OSCOM::link('index.php', '', false), 'get', null, ['session_id' => true]) . '<p align="right">' . OSCOM::getDef('text_show') . ' '; if (isset($_GET['manufacturers_id']) && !empty($_GET['manufacturers_id'])) { echo HTML::hiddenField('manufacturers_id', $_GET['manufacturers_id']); $options = array(array('id' => '', 'text' => OSCOM::getDef('text_all_categories'))); } else { echo HTML::hiddenField('cPath', $cPath); $options = array(array('id' => '', 'text' => OSCOM::getDef('text_all_manufacturers'))); } echo HTML::hiddenField('sort', $_GET['sort']); while ($Qfilter->fetch()) { $options[] = array('id' => $Qfilter->valueInt('id'), 'text' => $Qfilter->value('name')); } echo HTML::selectField('filter_id', $options, isset($_GET['filter_id']) ? $_GET['filter_id'] : '', 'onchange="this.form.submit()"'); echo '</p></form></div>' . "\n"; } } include 'includes/content/product_listing.php'; ?> </div> <?php } else { // default page ?> <div class="page-header"> <h1><?php
<label for="inputState" class="control-label col-sm-3"><?php echo ENTRY_STATE; ?> </label> <div class="col-sm-9"> <?php if ($process == true) { if ($entry_state_has_zones == true) { $zones_array = array(); $Qzones = $OSCOM_Db->prepare('select zone_name from :table_zones where zone_country_id = :zone_country_id order by zone_name'); $Qzones->bindInt(':zone_country_id', $country); $Qzones->execute(); while ($Qzones->fetch()) { $zones_array[] = array('id' => $Qzones->value('zone_name'), 'text' => $Qzones->value('zone_name')); } echo HTML::selectField('state', $zones_array); } else { echo HTML::inputField('state'); } } else { echo HTML::inputField('state', isset($entry['entry_country_id']) ? tep_get_zone_name($entry['entry_country_id'], $entry['entry_zone_id'], $entry['entry_state']) : ''); } if (tep_not_null(ENTRY_STATE_TEXT)) { echo '<span class="help-block">' . ENTRY_STATE_TEXT . '</span>'; } ?> </div> </div> <?php }
?> <td><table border="0" cellpadding="0" cellspacing="2"> <?php $customers = [['id' => '', 'text' => OSCOM::getDef('text_select_customer')], ['id' => '***', 'text' => OSCOM::getDef('text_all_customers')], ['id' => '**D', 'text' => OSCOM::getDef('text_newsletter_customers')]]; $Qcustomers = $OSCOM_Db->get('customers', ['customers_email_address', 'customers_firstname', 'customers_lastname'], null, 'customers_lastname'); while ($Qcustomers->fetch()) { $customers[] = ['id' => $Qcustomers->value('customers_email_address'), 'text' => $Qcustomers->value('customers_lastname') . ', ' . $Qcustomers->value('customers_firstname') . ' (' . $Qcustomers->value('customers_email_address') . ')']; } ?> <tr> <td class="main"><?php echo OSCOM::getDef('text_customer'); ?> </td> <td><?php echo HTML::selectField('customers_email_address', $customers, isset($_GET['customer']) ? $_GET['customer'] : ''); ?> </td> </tr> <tr> <td colspan="2"> </td> </tr> <tr> <td class="main"><?php echo OSCOM::getDef('text_from'); ?> </td> <td><?php echo HTML::inputField('from', EMAIL_FROM); ?> </td>
$contents = array('form' => HTML::form('countries', OSCOM::link(FILENAME_COUNTRIES, 'page=' . $_GET['page'] . '&action=insert'))); $contents[] = array('text' => OSCOM::getDef('text_info_insert_intro')); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_country_name') . '<br />' . HTML::inputField('countries_name')); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_country_code_2') . '<br />' . HTML::inputField('countries_iso_code_2')); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_country_code_3') . '<br />' . HTML::inputField('countries_iso_code_3')); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_address_format') . '<br />' . HTML::selectField('address_format_id', tep_get_address_formats())); $contents[] = array('align' => 'center', 'text' => '<br />' . HTML::button(OSCOM::getDef('image_save'), 'fa fa-save') . HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link(FILENAME_COUNTRIES, 'page=' . $_GET['page']))); break; case 'edit': $heading[] = array('text' => '<strong>' . OSCOM::getDef('text_info_heading_edit_country') . '</strong>'); $contents = array('form' => HTML::form('countries', OSCOM::link(FILENAME_COUNTRIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->countries_id . '&action=save'))); $contents[] = array('text' => OSCOM::getDef('text_info_edit_intro')); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_country_name') . '<br />' . HTML::inputField('countries_name', $cInfo->countries_name)); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_country_code_2') . '<br />' . HTML::inputField('countries_iso_code_2', $cInfo->countries_iso_code_2)); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_country_code_3') . '<br />' . HTML::inputField('countries_iso_code_3', $cInfo->countries_iso_code_3)); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_address_format') . '<br />' . HTML::selectField('address_format_id', tep_get_address_formats(), $cInfo->address_format_id)); $contents[] = array('align' => 'center', 'text' => '<br />' . HTML::button(OSCOM::getDef('image_save'), 'fa fa-save') . HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link(FILENAME_COUNTRIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->countries_id))); break; case 'delete': $heading[] = array('text' => '<strong>' . OSCOM::getDef('text_info_heading_delete_country') . '</strong>'); $contents = array('form' => HTML::form('countries', OSCOM::link(FILENAME_COUNTRIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->countries_id . '&action=deleteconfirm'))); $contents[] = array('text' => OSCOM::getDef('text_info_delete_intro')); $contents[] = array('text' => '<br /><strong>' . $cInfo->countries_name . '</strong>'); $contents[] = array('align' => 'center', 'text' => '<br />' . HTML::button(OSCOM::getDef('image_delete'), 'fa fa-trash') . HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link(FILENAME_COUNTRIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->countries_id))); break; default: if (is_object($cInfo)) { $heading[] = array('text' => '<strong>' . $cInfo->countries_name . '</strong>'); $contents[] = array('align' => 'center', 'text' => HTML::button(OSCOM::getDef('image_edit'), 'fa fa-edit', OSCOM::link(FILENAME_COUNTRIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->countries_id . '&action=edit')) . HTML::button(OSCOM::getDef('image_delete'), 'fa fa-trash', OSCOM::link(FILENAME_COUNTRIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->countries_id . '&action=delete'))); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_country_name') . '<br />' . $cInfo->countries_name); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_country_code_2') . ' ' . $cInfo->countries_iso_code_2);
function tep_get_country_list($name, $selected = '', $parameters = '') { $countries_array = array(array('id' => '', 'text' => OSCOM::getDef('pull_down_default'))); $countries = tep_get_countries(); for ($i = 0, $n = sizeof($countries); $i < $n; $i++) { $countries_array[] = array('id' => $countries[$i]['countries_id'], 'text' => $countries[$i]['countries_name']); } return HTML::selectField($name, $countries_array, $selected, $parameters); }
<label> <?php echo HTML::checkboxField('inc_subcat', '1', true, 'id="entryIncludeSubs"') . ' '; ?> </label> </div> </div> </div> <div class="form-group"> <label for="entryManufacturers" class="control-label col-sm-3"><?php echo ENTRY_MANUFACTURERS; ?> </label> <div class="col-sm-9"> <?php echo HTML::selectField('manufacturers_id', tep_get_manufacturers(array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS))), null, 'id="entryManufacturers"'); ?> </div> </div> <div class="form-group"> <label for="PriceFrom" class="control-label col-sm-3"><?php echo ENTRY_PRICE_FROM; ?> </label> <div class="col-sm-9"> <?php echo HTML::inputField('pfrom', '', 'id="PriceFrom" placeholder="' . ENTRY_PRICE_FROM_TEXT . '"'); ?> </div> </div> <div class="form-group">
<div class="col-xs-9"> <?php echo HTML::inputField('CFG_ADMIN_DIRECTORY', 'admin', 'required aria-required="true" id="adminDir"'); ?> <span class="glyphicon glyphicon-asterisk form-control-feedback inputRequirement"></span> <span class="help-block">This is the directory where the administration section will be installed. You should change this for security reasons.</span> </div> </div> <?php } ?> <div class="form-group has-feedback"> <label for="Zulu" class="control-label col-xs-3">Time Zone</label> <div class="col-xs-9"> <?php echo HTML::selectField('CFG_TIME_ZONE', DateTime::getTimeZones(), date_default_timezone_get()); ?> <span class="glyphicon glyphicon-asterisk form-control-feedback inputRequirement"></span> <span class="help-block">The time zone to base the date and time on.</span> </div> </div> <p><?php echo HTML::button('Continue To Step 4', 'triangle-1-e', null, 'primary', null, 'btn-success btn-block'); ?> </p> <?php foreach ($_POST as $key => $value) { if ($key != 'x' && $key != 'y') { echo HTML::hiddenField($key, $value);
<div class="pull-right"> <?php echo HTML::button(OSCOM::getDef('image_delete'), 'fa fa-trash', OSCOM::link('action_recorder.php', 'action=expire' . (isset($_GET['module']) && in_array($_GET['module'], $modules_array) ? '&module=' . $_GET['module'] : '')), null, 'btn-danger'); ?> </div> <h2><i class="fa fa-tasks"></i> <a href="<?php echo OSCOM::link('action_recorder.php'); ?> "><?php echo OSCOM::getDef('heading_title'); ?> </a></h2> <?php echo HTML::form('search', OSCOM::link('action_recorder.php'), 'get', 'class="form-inline"', ['session_id' => true]) . HTML::inputField('search', null, 'placeholder="' . OSCOM::getDef('text_filter_search') . '"') . HTML::selectField('module', $modules_list_array, null, 'onchange="this.form.submit();"') . '</form>'; ?> <table class="oscom-table table table-hover"> <thead> <tr class="info"> <th><?php echo OSCOM::getDef('table_heading_module'); ?> </th> <th><?php echo OSCOM::getDef('table_heading_customer'); ?> </th> <th><?php echo OSCOM::getDef('table_heading_identifier');
case 'new': $heading[] = array('text' => '<strong>' . OSCOM::getDef('text_info_heading_new_zone') . '</strong>'); $contents = array('form' => HTML::form('zones', OSCOM::link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&action=insert'))); $contents[] = array('text' => OSCOM::getDef('text_info_insert_intro')); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_zones_name') . '<br />' . HTML::inputField('zone_name')); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_zones_code') . '<br />' . HTML::inputField('zone_code')); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_country_name') . '<br />' . HTML::selectField('zone_country_id', tep_get_countries())); $contents[] = array('align' => 'center', 'text' => '<br />' . HTML::button(OSCOM::getDef('image_save'), 'fa fa-save') . HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link(FILENAME_ZONES, 'page=' . $_GET['page']))); break; case 'edit': $heading[] = array('text' => '<strong>' . OSCOM::getDef('text_info_heading_edit_zone') . '</strong>'); $contents = array('form' => HTML::form('zones', OSCOM::link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id . '&action=save'))); $contents[] = array('text' => OSCOM::getDef('text_info_edit_intro')); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_zones_name') . '<br />' . HTML::inputField('zone_name', $cInfo->zone_name)); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_zones_code') . '<br />' . HTML::inputField('zone_code', $cInfo->zone_code)); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_country_name') . '<br />' . HTML::selectField('zone_country_id', tep_get_countries(), $cInfo->countries_id)); $contents[] = array('align' => 'center', 'text' => '<br />' . HTML::button(OSCOM::getDef('image_save'), 'fa fa-save') . HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id))); break; case 'delete': $heading[] = array('text' => '<strong>' . OSCOM::getDef('text_info_heading_delete_zone') . '</strong>'); $contents = array('form' => HTML::form('zones', OSCOM::link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id . '&action=deleteconfirm'))); $contents[] = array('text' => OSCOM::getDef('text_info_delete_intro')); $contents[] = array('text' => '<br /><strong>' . $cInfo->zone_name . '</strong>'); $contents[] = array('align' => 'center', 'text' => '<br />' . HTML::button(OSCOM::getDef('image_delete'), 'fa fa-trash') . HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id))); break; default: if (isset($cInfo) && is_object($cInfo)) { $heading[] = array('text' => '<strong>' . $cInfo->zone_name . '</strong>'); $contents[] = array('align' => 'center', 'text' => HTML::button(OSCOM::getDef('image_edit'), 'fa fa-edit', OSCOM::link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id . '&action=edit')) . HTML::button(OSCOM::getDef('image_delete'), 'fa fa-trash', OSCOM::link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id . '&action=delete'))); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_zones_name') . '<br />' . $cInfo->zone_name . ' (' . $cInfo->zone_code . ')'); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_country_name') . ' ' . $cInfo->countries_name);
function tep_cfg_pull_down_order_statuses($order_status_id, $key = '') { $OSCOM_Db = Registry::get('Db'); $OSCOM_Language = Registry::get('Language'); $name = !empty($key) ? 'configuration[' . $key . ']' : 'configuration_value'; $statuses_array = [['id' => '0', 'text' => OSCOM::getDef('text_default')]]; $Qstatus = $OSCOM_Db->get('orders_status', ['orders_status_id', 'orders_status_name'], ['language_id' => $OSCOM_Language->getId()], 'orders_status_name'); while ($Qstatus->fetch()) { $statuses_array[] = ['id' => $Qstatus->valueInt('orders_status_id'), 'text' => $Qstatus->value('orders_status_name')]; } return HTML::selectField($name, $statuses_array, $order_status_id); }
} } if (is_string($_GET['products_id']) && isset($_SESSION['cart']->contents[$_GET['products_id']]['attributes'][$Qpa->value('products_options_id')])) { $selected_attribute = $_SESSION['cart']->contents[$_GET['products_id']]['attributes'][$Qpa->value('products_options_id')]; } else { $selected_attribute = false; } ?> <div class="form-group"> <label class="control-label col-xs-3"><?php echo $Qpa->value('products_options_name') . ':'; ?> </label> <div class="col-xs-9"> <?php echo HTML::selectField('id[' . $Qpa->valueInt('products_options_id') . ']', $products_options_array, $selected_attribute, '', true); ?> </div> </div> <?php } while ($Qpa->fetch()); ?> </div> </div> <?php } ?> <div class="clearfix"></div>
$heading[] = array('text' => OSCOM::getDef('text_info_heading_delete_order')); $contents = array('form' => HTML::form('orders', OSCOM::link('orders.php', tep_get_all_get_params(array('action')) . '&action=deleteconfirm'))); $contents[] = array('text' => OSCOM::getDef('text_info_delete_intro') . '<br /><br /><strong>#' . $order->info['id'] . '</strong> ' . HTML::outputProtected($order->customer['name']) . ' (' . strip_tags($order->info['total']) . ')'); $contents[] = array('text' => HTML::checkboxField('restock') . ' ' . OSCOM::getDef('text_info_restock_product_quantity')); $contents[] = array('text' => HTML::button(OSCOM::getDef('image_delete'), 'fa fa-trash', null, null, 'btn-danger') . HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link('orders.php', tep_get_all_get_params(array('action'))), null, 'btn-link')); } break; } if (tep_not_null($heading) && tep_not_null($contents)) { $show_listing = false; echo HTML::panel($heading, $contents, ['type' => 'info']); } } } if ($show_listing === true) { echo HTML::form('orders', OSCOM::link('orders.php'), 'get', 'class="form-inline"', ['session_id' => true]) . HTML::inputField('oID', null, 'placeholder="' . OSCOM::getDef('heading_title_search') . '"') . HTML::hiddenField('action', 'edit') . '</form>' . HTML::form('status', OSCOM::link('orders.php'), 'get', 'class="form-inline"', ['session_id' => true]) . HTML::selectField('status', array_merge(array(array('id' => '', 'text' => OSCOM::getDef('text_all_orders'))), $orders_statuses), '', 'onchange="this.form.submit();"') . '</form>'; ?> <table class="oscom-table table table-hover"> <thead> <tr class="info"> <th><?php echo OSCOM::getDef('table_heading_customers'); ?> </th> <th class="text-right"><?php echo OSCOM::getDef('table_heading_order_total'); ?> </th> <th></th> <th class="text-right"><?php
if ($action == 'list') { switch ($saction) { case 'new': $heading[] = array('text' => '<strong>' . OSCOM::getDef('text_info_heading_new_sub_zone') . '</strong>'); $contents = array('form' => HTML::form('zones', OSCOM::link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&' . (isset($_GET['sID']) ? 'sID=' . $_GET['sID'] . '&' : '') . 'saction=insert_sub'))); $contents[] = array('text' => OSCOM::getDef('text_info_new_sub_zone_intro')); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_country') . '<br />' . HTML::selectField('zone_country_id', tep_get_countries(OSCOM::getDef('text_all_countries')), '', 'onchange="update_zone(this.form);"')); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_country_zone') . '<br />' . HTML::selectField('zone_id', tep_prepare_country_zones_pull_down())); $contents[] = array('align' => 'center', 'text' => '<br />' . HTML::button(OSCOM::getDef('image_save'), 'fa fa-save') . HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&' . (isset($_GET['sID']) ? 'sID=' . $_GET['sID'] : '')))); break; case 'edit': $heading[] = array('text' => '<strong>' . OSCOM::getDef('text_info_heading_edit_sub_zone') . '</strong>'); $contents = array('form' => HTML::form('zones', OSCOM::link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $sInfo->association_id . '&saction=save_sub'))); $contents[] = array('text' => OSCOM::getDef('text_info_edit_sub_zone_intro')); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_country') . '<br />' . HTML::selectField('zone_country_id', tep_get_countries(OSCOM::getDef('text_all_countries')), $sInfo->zone_country_id, 'onchange="update_zone(this.form);"')); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_country_zone') . '<br />' . HTML::selectField('zone_id', tep_prepare_country_zones_pull_down($sInfo->zone_country_id), $sInfo->zone_id)); $contents[] = array('align' => 'center', 'text' => '<br />' . HTML::button(OSCOM::getDef('image_save'), 'fa fa-save') . HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $sInfo->association_id))); break; case 'delete': $heading[] = array('text' => '<strong>' . OSCOM::getDef('text_info_heading_delete_sub_zone') . '</strong>'); $contents = array('form' => HTML::form('zones', OSCOM::link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $sInfo->association_id . '&saction=deleteconfirm_sub'))); $contents[] = array('text' => OSCOM::getDef('text_info_delete_sub_zone_intro')); $contents[] = array('text' => '<br /><strong>' . $sInfo->countries_name . '</strong>'); $contents[] = array('align' => 'center', 'text' => '<br />' . HTML::button(OSCOM::getDef('image_delete'), 'fa fa-trash') . HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $sInfo->association_id))); break; default: if (isset($sInfo) && is_object($sInfo)) { $heading[] = array('text' => '<strong>' . $sInfo->countries_name . '</strong>'); $contents[] = array('align' => 'center', 'text' => HTML::button(OSCOM::getDef('image_edit'), 'fa fa-edit', OSCOM::link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $sInfo->association_id . '&saction=edit')) . HTML::button(OSCOM::getDef('image_delete'), 'fa fa-trash', OSCOM::link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $sInfo->association_id . '&saction=delete'))); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_date_added') . ' ' . DateTime::toShort($sInfo->date_added)); if (tep_not_null($sInfo->last_modified)) {
<label> <?php echo HTML::checkboxField('inc_subcat', '1', true, 'id="entryIncludeSubs"'); ?> </label> </div> </div> </div> <div class="form-group"> <label for="entryManufacturers" class="control-label col-sm-3"><?php echo OSCOM::getDef('entry_manufacturers'); ?> </label> <div class="col-sm-9"> <?php echo HTML::selectField('manufacturers_id', tep_get_manufacturers(array(array('id' => '', 'text' => OSCOM::getDef('text_all_manufacturers')))), null, 'id="entryManufacturers"'); ?> </div> </div> <div class="form-group"> <label for="PriceFrom" class="control-label col-sm-3"><?php echo OSCOM::getDef('entry_price_from'); ?> </label> <div class="col-sm-9"> <?php echo HTML::inputField('pfrom', '', 'id="PriceFrom" placeholder="' . OSCOM::getDef('entry_price_from_text') . '"'); ?> </div> </div> <div class="form-group">
function confirmation() { global $order; $OSCOM_Db = Registry::get('Db'); $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') { $Qtokens = $OSCOM_Db->get('customers_sagepay_tokens', ['id', 'card_type', 'number_filtered', 'expiry_date'], ['customers_id' => $_SESSION['customer_id']], 'date_added'); if ($Qtokens->fetch() !== false) { $content .= '<table id="sagepay_table" border="0" width="100%" cellspacing="0" cellpadding="2">'; do { $content .= '<tr class="moduleRow" id="sagepay_card_' . $Qtokens->valueInt('id') . '">' . ' <td width="40" valign="top"><input type="radio" name="sagepay_card" value="' . $Qtokens->valueInt('id') . '" /></td>' . ' <td valign="top">' . $Qtokens->valueProtected('number_filtered') . ' ' . tep_output_string_protected(substr($Qtokens->value('expiry_date'), 0, 2)) . '/' . strftime('%Y', mktime(0, 0, 0, 1, 1, 2000 + substr($Qtokens->value('expiry_date'), 2))) . ' ' . $Qtokens->valueProtected('card_type') . '</td>' . '</tr>'; if (MODULE_PAYMENT_SAGE_PAY_DIRECT_VERIFY_WITH_CVC == 'True') { $content .= '<tr class="moduleRowExtra" id="sagepay_card_cvc_' . $Qtokens->valueInt('id') . '">' . ' <td width="40" valign="top"> </td>' . ' <td valign="top">' . MODULE_PAYMENT_SAGE_PAY_DIRECT_CREDIT_CARD_CVC . ' ' . HTML::inputField('cc_cvc_tokens_nh-dns[' . $Qtokens->valueInt('id') . ']', '', 'size="5" maxlength="4"') . '</td>' . '</tr>'; } } while ($Qtokens->fetch()); $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>' . HTML::selectField('cc_type', $card_types, '', 'id="sagepay_card_type"') . '</td>' . '</tr>' . '<tr>' . ' <td width="30%">' . MODULE_PAYMENT_SAGE_PAY_DIRECT_CREDIT_CARD_OWNER . '</td>' . ' <td>' . HTML::inputField('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>' . HTML::inputField('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>' . HTML::selectField('cc_starts_month', $months_array, '', 'id="sagepay_card_date_start"') . ' ' . HTML::selectField('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>' . HTML::selectField('cc_expires_month', $months_array) . ' ' . HTML::selectField('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>' . HTML::inputField('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>' . HTML::inputField('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>' . HTML::checkboxField('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; }
function confirmation() { global $order, $currencies; $OSCOM_Db = Registry::get('Db'); $months_array = array(); for ($i = 1; $i < 13; $i++) { $months_array[] = array('id' => tep_output_string(sprintf('%02d', $i)), 'text' => tep_output_string_protected(sprintf('%02d', $i))); } $today = getdate(); $years_array = array(); for ($i = $today['year']; $i < $today['year'] + 10; $i++) { $years_array[] = array('id' => tep_output_string(strftime('%Y', mktime(0, 0, 0, 1, 1, $i))), 'text' => tep_output_string_protected(strftime('%Y', mktime(0, 0, 0, 1, 1, $i)))); } $content = ''; if (!$this->isValidCurrency($_SESSION['currency'])) { $content .= sprintf(MODULE_PAYMENT_BRAINTREE_CC_CURRENCY_CHARGE, $currencies->format($order->info['total'], true, DEFAULT_CURRENCY), DEFAULT_CURRENCY, $_SESSION['currency']); } if (MODULE_PAYMENT_BRAINTREE_CC_TOKENS == 'True') { $Qtokens = $OSCOM_Db->get('customers_braintree_tokens', ['id', 'card_type', 'number_filtered', 'expiry_date'], ['customers_id' => $_SESSION['customer_id']], 'date_added'); if ($Qtokens->fetch() !== false) { $content .= '<table id="braintree_table" border="0" width="100%" cellspacing="0" cellpadding="2">'; do { $content .= '<tr class="moduleRow" id="braintree_card_' . $Qtokens->valueInt('id') . '">' . ' <td width="40" valign="top"><input type="radio" name="braintree_card" value="' . $Qtokens->valueInt('id') . '" /></td>' . ' <td valign="top">' . MODULE_PAYMENT_BRAINTREE_CC_CREDITCARD_LAST_4 . ' ' . $Qtokens->valueProtected('number_filtered') . ' ' . tep_output_string_protected(substr($Qtokens->value('expiry_date'), 0, 2) . '/' . substr($Qtokens->value('expiry_date'), 2)) . ' ' . $Qtokens->valueProtected('card_type') . '</td>' . '</tr>'; if (MODULE_PAYMENT_BRAINTREE_CC_VERIFY_WITH_CVV == 'True') { $content .= '<tr class="moduleRowExtra" id="braintree_card_cvv_' . $Qtokens->valueInt('id') . '">' . ' <td width="40" valign="top"> </td>' . ' <td valign="top">' . MODULE_PAYMENT_BRAINTREE_CC_CREDITCARD_CVV . ' <input type="text" size="5" maxlength="4" autocomplete="off" data-encrypted-name="token_cvv[' . $Qtokens->valueInt('id') . ']" /></td>' . '</tr>'; } } while ($Qtokens->fetch()); $content .= '<tr class="moduleRow" id="braintree_card_0">' . ' <td width="40" valign="top"><input type="radio" name="braintree_card" value="0" /></td>' . ' <td valign="top">' . MODULE_PAYMENT_BRAINTREE_CC_CREDITCARD_NEW . '</td>' . '</tr>' . '</table>'; } } $content .= '<table id="braintree_table_new_card" border="0" width="100%" cellspacing="0" cellpadding="2">' . '<tr>' . ' <td width="30%">' . MODULE_PAYMENT_BRAINTREE_CC_CREDITCARD_OWNER . '</td>' . ' <td>' . HTML::inputField('name', $order->billing['firstname'] . ' ' . $order->billing['lastname']) . '</td>' . '</tr>' . '<tr>' . ' <td width="30%">' . MODULE_PAYMENT_BRAINTREE_CC_CREDITCARD_NUMBER . '</td>' . ' <td><input type="text" maxlength="20" autocomplete="off" data-encrypted-name="number" /></td>' . '</tr>' . '<tr>' . ' <td width="30%">' . MODULE_PAYMENT_BRAINTREE_CC_CREDITCARD_EXPIRY . '</td>' . ' <td>' . HTML::selectField('month', $months_array) . ' / ' . HTML::selectField('year', $years_array) . '</td>' . '</tr>'; if (MODULE_PAYMENT_BRAINTREE_CC_VERIFY_WITH_CVV == 'True') { $content .= '<tr>' . ' <td width="30%">' . MODULE_PAYMENT_BRAINTREE_CC_CREDITCARD_CVV . '</td>' . ' <td><input type="text" size="5" maxlength="4" autocomplete="off" data-encrypted-name="cvv" /></td>' . '</tr>'; } if (MODULE_PAYMENT_BRAINTREE_CC_TOKENS == 'True') { $content .= '<tr>' . ' <td width="30%"> </td>' . ' <td>' . HTML::checkboxField('cc_save', 'true') . ' ' . MODULE_PAYMENT_BRAINTREE_CC_CREDITCARD_SAVE . '</td>' . '</tr>'; } $content .= '</table>'; if (!$this->templateClassExists()) { $content .= $this->getSubmitCardDetailsJavascript(); } $confirmation = array('title' => $content); return $confirmation; }
<label for="banners_url"><?php echo OSCOM::getDef('text_banners_url'); ?> </label> <?php echo HTML::inputField('banners_url', $bInfo->banners_url); ?> </div> <div class="form-group"> <label for="banners_group"><?php echo OSCOM::getDef('text_banners_group'); ?> </label> <?php echo HTML::selectField('banners_group', $groups_array, $bInfo->banners_group); ?> <label for="new_banners_group"><?php echo OSCOM::getDef('text_banners_new_group') . (sizeof($groups_array) > 0 ? '' : OSCOM::getDef('text_field_required')); ?> </label> <?php echo HTML::inputField('new_banners_group'); ?> </div> <div class="form-group"> <label for="banners_image"><?php echo OSCOM::getDef('text_banners_image'); ?>
<div class="form-group"> <label for="inputState" class="control-label col-sm-3"><?php echo OSCOM::getDef('entry_state'); ?> </label> <div class="col-sm-9"> <?php if ($process == true) { if ($entry_state_has_zones == true) { $zones_array = array(); $Qzones = $OSCOM_Db->get('zones', 'zone_name', ['zone_country_id' => $country], 'zone_name'); while ($Qzones->fetch()) { $zones_array[] = array('id' => $Qzones->value('zone_name'), 'text' => $Qzones->value('zone_name')); } echo HTML::selectField('state', $zones_array, 0, 'id="inputState" aria-describedby="atState"'); if (tep_not_null(OSCOM::getDef('entry_state_text'))) { echo '<span id="atState" class="help-block">' . OSCOM::getDef('entry_state_text') . '</span>'; } } else { echo HTML::inputField('state', NULL, 'id="inputState" placeholder="' . OSCOM::getDef('entry_state_text') . '"'); } } else { echo HTML::inputField('state', NULL, 'id="inputState" placeholder="' . OSCOM::getDef('entry_state_text') . '"'); } ?> </div> </div> <?php }
$products_options_array[] = array('id' => $Qpo->valueInt('products_options_values_id'), 'text' => $Qpo->value('products_options_values_name')); if ($Qpo->valueDecimal('options_values_price') != 0) { $products_options_array[count($products_options_array) - 1]['text'] .= ' (' . $Qpo->value('price_prefix') . $currencies->display_price($Qpo->valueDecimal('options_values_price'), tep_get_tax_rate($Qproduct->valueInt('products_tax_class_id'))) . ') '; } } if (is_string($_GET['products_id']) && isset($_SESSION['cart']->contents[$_GET['products_id']]['attributes'][$Qpa->value('products_options_id')])) { $selected_attribute = $_SESSION['cart']->contents[$_GET['products_id']]['attributes'][$Qpa->value('products_options_id')]; } else { $selected_attribute = false; } ?> <strong><?php echo $Qpa->value('products_options_name') . ':'; ?> </strong><br /><?php echo HTML::selectField('id[' . $Qpa->valueInt('products_options_id') . ']', $products_options_array, $selected_attribute, 'style="width: 200px;"'); ?> <br /> <?php } while ($Qpa->fetch()); ?> </p> <?php } ?> <div class="clearfix"></div> <?php if ($Qproduct->value('products_date_available') > date('Y-m-d H:i:s')) {
</tr> <?php } ?> </table></td> </tr> </table></td> <?php $heading = array(); $contents = array(); switch ($action) { case 'new': $heading[] = array('text' => '<strong>' . OSCOM::getDef('text_info_heading_new_currency') . '</strong>'); $contents = array('form' => HTML::form('currencies', OSCOM::link(FILENAME_CURRENCIES, 'page=' . $_GET['page'] . (isset($cInfo) ? '&cID=' . $cInfo->currencies_id : '') . '&action=insert'))); $contents[] = array('text' => OSCOM::getDef('text_info_insert_intro')); $contents[] = array('text' => '<br />' . HTML::selectField('cs', $currency_select_array, '', 'onchange="updateForm();"')); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_currency_title') . '<br />' . HTML::inputField('title')); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_currency_code') . '<br />' . HTML::inputField('code')); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_currency_symbol_left') . '<br />' . HTML::inputField('symbol_left')); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_currency_symbol_right') . '<br />' . HTML::inputField('symbol_right')); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_currency_decimal_point') . '<br />' . HTML::inputField('decimal_point')); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_currency_thousands_point') . '<br />' . HTML::inputField('thousands_point')); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_currency_decimal_places') . '<br />' . HTML::inputField('decimal_places')); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_currency_value') . '<br />' . HTML::inputField('value')); $contents[] = array('text' => '<br />' . HTML::checkboxField('default') . ' ' . OSCOM::getDef('text_set_default')); $contents[] = array('align' => 'center', 'text' => '<br />' . HTML::button(OSCOM::getDef('image_save'), 'fa fa-save') . HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link(FILENAME_CURRENCIES, 'page=' . $_GET['page'] . '&cID=' . $_GET['cID']))); break; case 'edit': $heading[] = array('text' => '<strong>' . OSCOM::getDef('text_info_heading_edit_currency') . '</strong>'); $contents = array('form' => HTML::form('currencies', OSCOM::link(FILENAME_CURRENCIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->currencies_id . '&action=save'))); $contents[] = array('text' => OSCOM::getDef('text_info_edit_intro'));
$contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_language_name') . '<br />' . HTML::inputField('name')); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_language_code') . '<br />' . HTML::inputField('code')); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_language_image') . '<br />' . HTML::selectField('image', $icons)); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_language_directory') . '<br />' . HTML::selectField('directory', $directories)); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_language_sort_order') . '<br />' . HTML::inputField('sort_order')); $contents[] = array('text' => '<br />' . HTML::checkboxField('default') . ' ' . OSCOM::getDef('text_set_default')); $contents[] = array('align' => 'center', 'text' => '<br />' . HTML::button(OSCOM::getDef('image_save'), 'fa fa-save') . HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link(FILENAME_LANGUAGES, 'page=' . $_GET['page'] . '&lID=' . $_GET['lID']))); break; case 'edit': $heading[] = array('text' => '<strong>' . OSCOM::getDef('text_info_heading_edit_language') . '</strong>'); $contents = array('form' => HTML::form('languages', OSCOM::link(FILENAME_LANGUAGES, 'page=' . $_GET['page'] . '&lID=' . $lInfo->languages_id . '&action=save'))); $contents[] = array('text' => OSCOM::getDef('text_info_edit_intro')); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_language_name') . '<br />' . HTML::inputField('name', $lInfo->name)); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_language_code') . '<br />' . HTML::inputField('code', $lInfo->code)); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_language_image') . '<br />' . HTML::selectField('image', $icons, $lInfo->image)); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_language_directory') . '<br />' . HTML::selectField('directory', $directories, $lInfo->directory)); $contents[] = array('text' => '<br />' . OSCOM::getDef('text_info_language_sort_order') . '<br />' . HTML::inputField('sort_order', $lInfo->sort_order)); if (DEFAULT_LANGUAGE != $lInfo->code) { $contents[] = array('text' => '<br />' . HTML::checkboxField('default') . ' ' . OSCOM::getDef('text_set_default')); } $contents[] = array('align' => 'center', 'text' => '<br />' . HTML::button(OSCOM::getDef('image_save'), 'fa fa-save') . HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link(FILENAME_LANGUAGES, 'page=' . $_GET['page'] . '&lID=' . $lInfo->languages_id))); break; case 'delete': $heading[] = array('text' => '<strong>' . OSCOM::getDef('text_info_heading_delete_language') . '</strong>'); $contents[] = array('text' => OSCOM::getDef('text_info_delete_intro')); $contents[] = array('text' => '<br /><strong>' . $lInfo->name . '</strong>'); $contents[] = array('align' => 'center', 'text' => '<br />' . ($remove_language ? HTML::button(OSCOM::getDef('image_delete'), 'fa fa-trash', OSCOM::link(FILENAME_LANGUAGES, 'page=' . $_GET['page'] . '&lID=' . $lInfo->languages_id . '&action=deleteconfirm')) : '') . HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link(FILENAME_LANGUAGES, 'page=' . $_GET['page'] . '&lID=' . $lInfo->languages_id))); break; default: if (is_object($lInfo)) { $heading[] = array('text' => '<strong>' . $lInfo->name . '</strong>');
function tep_get_country_list($name, $selected = '', $parameters = '') { $countries_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT)); $countries = tep_get_countries(); for ($i = 0, $n = sizeof($countries); $i < $n; $i++) { $countries_array[] = array('id' => $countries[$i]['countries_id'], 'text' => $countries[$i]['countries_name']); } return HTML::selectField($name, $countries_array, $selected, $parameters); }
<div class="form-group has-feedback"> <label for="adminDir">Administration Directory Name</label> <?php echo HTML::inputField('CFG_ADMIN_DIRECTORY', 'admin', 'required aria-required="true" id="adminDir"'); ?> <span class="help-block">This is the directory where the administration section will be installed. You should change this for security reasons.</span> </div> <?php } ?> <div class="form-group has-feedback"> <label for="Zulu">Time Zone</label> <?php echo HTML::selectField('TIME_ZONE', DateTime::getTimeZones(), date_default_timezone_get(), 'id="Zulu"'); ?> <span class="help-block">The time zone to base the date and time on.</span> </div> <p><?php echo HTML::button('Continue to Step 4', 'triangle-1-e', null, null, 'btn-success'); ?> </p> <?php foreach ($_POST as $key => $value) { if ($key != 'x' && $key != 'y') { echo HTML::hiddenField($key, $value); } }
} break; case 'move_product': $heading[] = array('text' => OSCOM::getDef('text_info_heading_move_product')); $contents = array('form' => HTML::form('products', OSCOM::link(FILENAME_CATEGORIES, 'action=move_product_confirm&cPath=' . $cPath)) . HTML::hiddenField('products_id', $pInfo->products_id)); $contents[] = array('text' => OSCOM::getDef('text_move_products_intro', ['products_name' => $pInfo->products_name])); $contents[] = array('text' => OSCOM::getDef('text_info_current_categories') . '<br /><strong>' . tep_output_generated_category_path($pInfo->products_id, 'product') . '</strong>'); $contents[] = array('text' => OSCOM::getDef('text_move', ['item_name' => $pInfo->products_name]) . '<br />' . HTML::selectField('move_to_category_id', tep_get_category_tree(), $current_category_id)); $contents[] = array('text' => HTML::button(OSCOM::getDef('image_move'), 'fa fa-share', null, null, 'btn-success') . HTML::button(OSCOM::getDef('image_cancel'), null, OSCOM::link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id), null, 'btn-link')); break; case 'copy_to': $heading[] = array('text' => OSCOM::getDef('text_info_heading_copy_to')); $contents = array('form' => HTML::form('copy_to', OSCOM::link(FILENAME_CATEGORIES, 'action=copy_to_confirm&cPath=' . $cPath)) . HTML::hiddenField('products_id', $pInfo->products_id)); $contents[] = array('text' => OSCOM::getDef('text_info_copy_to_intro')); $contents[] = array('text' => OSCOM::getDef('text_info_current_categories') . '<br /><strong>' . tep_output_generated_category_path($pInfo->products_id, 'product') . '</strong>'); $contents[] = array('text' => OSCOM::getDef('text_categories') . '<br />' . HTML::selectField('categories_id', tep_get_category_tree(), $current_category_id)); $contents[] = array('text' => OSCOM::getDef('text_how_to_copy') . '<br />' . HTML::radioField('copy_as', 'link', true) . ' ' . OSCOM::getDef('text_copy_as_link') . '<br />' . HTML::radioField('copy_as', 'duplicate') . ' ' . OSCOM::getDef('text_copy_as_duplicate')); $contents[] = array('text' => HTML::button(OSCOM::getDef('image_copy'), 'fa fa-copy', null, null, 'btn-success') . HTML::button(OSCOM::getDef('image_cancel'), null, OSCOM::link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id), null, 'btn-link')); break; } if (tep_not_null($heading) && tep_not_null($contents)) { $show_listing = false; echo HTML::panel($heading, $contents, ['type' => 'info']); } } } if ($show_listing === true) { ?> <table class="oscom-table table table-hover"> <thead>