Пример #1
0
 public function initialize()
 {
     $OSCOM_PDO = Registry::get('PDO');
     $Qmanufacturers = $OSCOM_PDO->query('select manufacturers_id as id, manufacturers_name as text from :table_manufacturers order by manufacturers_name');
     $Qmanufacturers->setCache('manufacturers');
     $Qmanufacturers->execute();
     $manufacturers_array = array(array('id' => '', 'text' => OSCOM::getDef('pull_down_default')));
     foreach ($Qmanufacturers->fetchAll() as $m) {
         $manufacturers_array[] = $m;
     }
     $this->_content = '<form name="manufacturers" action="' . OSCOM::getLink() . '" method="get">' . HTML::hiddenField('Index', null) . HTML::selectMenu('Manufacturers', $manufacturers_array, null, 'onchange="this.form.submit();" size="' . BOX_MANUFACTURERS_LIST_SIZE . '" style="width: 100%"') . HTML::hiddenSessionIDField() . '</form>';
 }
Пример #2
0
 public function initialize()
 {
     $OSCOM_Currencies = Registry::get('Currencies');
     $data = array();
     foreach ($OSCOM_Currencies->getData() as $key => $value) {
         $data[] = array('id' => $key, 'text' => $value['title']);
     }
     if (count($data) > 1) {
         $hidden_get_params = '';
         foreach ($_GET as $key => $value) {
             if ($key != 'currency' && $key != Registry::get('Session')->getName() && $key != 'x' && $key != 'y') {
                 $hidden_get_params .= HTML::hiddenField($key, $value);
             }
         }
         $this->_content = '<form name="currencies" action="' . OSCOM::getLink(null, null, null, 'AUTO', false) . '" method="get">' . $hidden_get_params . HTML::selectMenu('currency', $data, $_SESSION['currency'], 'onchange="this.form.submit();" style="width: 100%"') . HTML::hiddenSessionIDField() . '</form>';
     }
 }
Пример #3
0
  <p><?php 
echo OSCOM::getDef('introduction_batch_delete_languages');
?>
</p>

<?php 
$check_default_flag = false;
$Qlanguages = $OSCOM_PDO->query('select languages_id, name, code from :table_languages where languages_id in ("' . implode('", "', array_unique(array_filter(array_slice($_POST['batch'], 0, MAX_DISPLAY_SEARCH_RESULTS), 'is_numeric'))) . '") order by name');
$Qlanguages->execute();
$names_string = '';
while ($Qlanguages->fetch()) {
    if ($Qlanguages->value('code') == DEFAULT_LANGUAGE) {
        $check_default_flag = true;
    }
    $names_string .= HTML::hiddenField('batch[]', $Qlanguages->valueInt('languages_id')) . '<b>' . $Qlanguages->value('name') . ' (' . $Qlanguages->value('code') . ')</b>, ';
}
if (!empty($names_string)) {
    $names_string = substr($names_string, 0, -2);
}
echo '<p>' . $names_string . '</p>';
if ($check_default_flag === false) {
    echo '<p>' . HTML::button(array('priority' => 'primary', 'icon' => 'trash', 'title' => OSCOM::getDef('button_delete'))) . ' ' . HTML::button(array('href' => OSCOM::getLink(), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel'))) . '</p>';
} else {
    echo '<p><b>' . OSCOM::getDef('introduction_delete_language_invalid') . '</b></p>';
    echo '<p>' . HTML::button(array('href' => OSCOM::getLink(), 'priority' => 'primary', 'icon' => 'triangle-1-w', 'title' => OSCOM::getDef('button_back'))) . '</p>';
}
?>

  </form>
</div>
while ($Qcfg->fetch()) {
    if (strlen($Qcfg->value('set_function')) > 0) {
        $value_field = Configuration::callUserFunc($Qcfg->value('set_function'), $Qcfg->value('configuration_value'), $Qcfg->value('configuration_key'));
    } else {
        $value_field = HTML::inputField('configuration[' . $Qcfg->value('configuration_key') . ']', $Qcfg->value('configuration_value'));
    }
    ?>

    <p><label for="configuration[<?php 
    echo $Qcfg->valueProtected('configuration_key');
    ?>
]"><?php 
    echo $Qcfg->valueProtected('configuration_title');
    ?>
</label><?php 
    echo $value_field . HTML::hiddenField('batch[]', $Qcfg->valueInt('configuration_id'));
    ?>
</p>

    <p><?php 
    echo $Qcfg->value('configuration_description');
    ?>
</p>

<?php 
}
?>

  </fieldset>

  <p><?php 
Пример #5
0
<?php 
                if ($OSCOM_Shipping->numberOfQuotes() > 1 || count($quotes['methods']) > 1) {
                    ?>
            <td><?php 
                    echo $OSCOM_Currencies->displayPrice($methods['cost'], $quotes['tax_class_id']);
                    ?>
</td>
            <td align="right"><?php 
                    echo HTML::radioField('shipping_mod_sel', $quotes['id'] . '_' . $methods['id'], $OSCOM_ShoppingCart->getShippingMethod('id'));
                    ?>
</td>
<?php 
                } else {
                    ?>
            <td align="right" colspan="2"><?php 
                    echo $OSCOM_Currencies->displayPrice($methods['cost'], $quotes['tax_class_id']) . HTML::hiddenField('shipping_mod_sel', $quotes['id'] . '_' . $methods['id']);
                    ?>
</td>
<?php 
                }
                ?>
            <td width="10">&nbsp;</td>
          </tr>
<?php 
                $radio_buttons++;
            }
        }
        ?>
        </table></td>
      </tr>
<?php 
</h3>

  <form name="lDefineBatch" class="dataForm" action="<?php 
echo OSCOM::getLink(null, null, 'BatchSaveDefinitions&Process&id=' . $_GET['id'] . '&group=' . $_GET['group']);
?>
" method="post">

  <p><?php 
echo OSCOM::getDef('introduction_edit_language_definitions');
?>
</p>

  <fieldset>

<?php 
foreach ($_POST['batch'] as $id) {
    $OSCOM_ObjectInfo = new ObjectInfo(Languages::getDefinition($id));
    echo '<p><label for="def[' . $OSCOM_ObjectInfo->getProtected('definition_key') . ']">' . $OSCOM_ObjectInfo->getProtected('definition_key') . '</label>' . HTML::textareaField('def[' . $OSCOM_ObjectInfo->get('definition_key') . ']', $OSCOM_ObjectInfo->get('definition_value')) . HTML::hiddenField('batch[]', $OSCOM_ObjectInfo->getInt('id')) . '</p>';
}
?>

  </fieldset>

  <p><?php 
echo HTML::button(array('priority' => 'primary', 'icon' => 'check', 'title' => OSCOM::getDef('button_save'))) . ' ' . HTML::button(array('href' => OSCOM::getLink(null, null, 'id=' . $_GET['id'] . '&group=' . $_GET['group']), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel')));
?>
</p>

  </form>
</div>
    if (isset($_GET['Manufacturers']) && !empty($_GET['Manufacturers'])) {
        $filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from :table_products p, :table_products_to_categories p2c, :table_categories c, :table_categories_description cd, :table_templates_boxes tb, :table_product_attributes pa where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id and cd.language_id = '" . (int) $OSCOM_Language->getID() . "' and tb.code = 'Manufacturers' and tb.id = pa.id and pa.products_id = p.products_id and pa.value = '" . (int) $_GET['Manufacturers'] . "' order by cd.categories_name";
    } else {
        $filterlist_sql = "select distinct m.manufacturers_id as id, m.manufacturers_name as name from :table_products p, :table_products_to_categories p2c, :table_manufacturers m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . $OSCOM_Category->getID() . "' order by m.manufacturers_name";
    }
    $Qfilterlist = $OSCOM_PDO->query($filterlist_sql);
    $Qfilterlist->execute();
    $filter_result = $Qfilterlist->fetchAll();
    if (count($filter_result) > 1) {
        echo '<p><form name="filter" action="' . OSCOM::getLink() . '" method="get">' . $OSCOM_Language->get('filter_show') . '&nbsp;';
        if (isset($_GET['Manufacturers']) && !empty($_GET['Manufacturers'])) {
            echo HTML::hiddenField('Manufacturers', $_GET['Manufacturers']);
            $options = array(array('id' => '', 'text' => OSCOM::getDef('filter_all_categories')));
        } else {
            echo HTML::hiddenField('cPath', $OSCOM_Category->getPath());
            $options = array(array('id' => '', 'text' => OSCOM::getDef('filter_all_manufacturers')));
        }
        if (isset($_GET['sort'])) {
            echo HTML::hiddenField('sort', $_GET['sort']);
        }
        foreach ($filter_result as $f) {
            $options[] = array('id' => $f['id'], 'text' => $f['name']);
        }
        echo HTML::selectMenu('filter', $options, isset($_GET['filter']) ? $_GET['filter'] : null, 'onchange="this.form.submit()"') . HTML::hiddenSessionIDField() . '</form></p>' . "\n";
    }
}
if (isset($_GET['Manufacturers']) && !empty($_GET['Manufacturers'])) {
    $OSCOM_Products->setManufacturer($_GET['Manufacturers']);
}
$products_listing = $OSCOM_Products->execute();
require OSCOM::BASE_DIRECTORY . 'Core/Site/Shop/Application/Products/pages/product_listing.php';
Пример #8
0
    public static function getBatchPagesPullDownMenu($batch_keyword = 'page', $total, $parameters = null) {
      $batch_number = (isset($_GET[$batch_keyword]) && is_numeric($_GET[$batch_keyword]) ? $_GET[$batch_keyword] : 1);
      $number_of_pages = ceil($total / MAX_DISPLAY_SEARCH_RESULTS);

      $pages_array = array();

      for ( $i = 1; $i <= $number_of_pages; $i++ ) {
        $pages_array[] = array('id' => $i,
                               'text' => $i);
      }

      $hidden_parameter = '';

      if ( !empty($parameters) ) {
        $parameters = explode('&', $parameters);

        foreach ( $parameters as $parameter ) {
          $keys = explode('=', $parameter, 2);

          if ( $keys[0] != $batch_keyword ) {
            $hidden_parameter .= HTML::hiddenField($keys[0], (isset($keys[1]) ? $keys[1] : ''));
          }
        }
      }

      $string = '<form action="' . OSCOM::getLink(null, null) . '" action="get">' . $hidden_parameter .
                sprintf(OSCOM::getDef('result_set_current_page'), HTML::selectMenu($batch_keyword, $pages_array, $batch_number, 'onchange="this.form.submit();"'), $number_of_pages) .
                HTML::hiddenSessionIDField() . '</form>';

      return $string;
    }
Пример #9
0
<?php

/**
 * osCommerce Online Merchant
 * 
 * @copyright Copyright (c) 2011 osCommerce; http://www.oscommerce.com
 * @license BSD License; http://www.oscommerce.com/bsdlicense.txt
 */
use osCommerce\OM\Core\HTML;
use osCommerce\OM\Core\OSCOM;
$Qcountries = $OSCOM_PDO->query('select countries_id, countries_name from :table_countries where countries_id in ("' . implode('", "', array_unique(array_filter(array_slice($_POST['batch'], 0, MAX_DISPLAY_SEARCH_RESULTS), 'is_numeric'))) . '") order by countries_name');
$Qcountries->execute();
$names_string = '';
while ($Qcountries->fetch()) {
    $names_string .= HTML::hiddenField('batch[]', $Qcountries->valueInt('countries_id')) . '<b>' . $Qcountries->valueProtected('countries_name') . '</b>, ';
}
if (!empty($names_string)) {
    $names_string = substr($names_string, 0, -2);
}
?>

<h1><?php 
echo $OSCOM_Template->getIcon(32) . HTML::link(OSCOM::getLink(), $OSCOM_Template->getPageTitle());
?>
</h1>

<?php 
if ($OSCOM_MessageStack->exists()) {
    echo $OSCOM_MessageStack->get();
}
?>
Пример #10
0
    </table>

    <p align="right"><?php 
echo HTML::button(array('priority' => 'primary', 'icon' => 'triangle-1-e', 'title' => OSCOM::getDef('button_continue'))) . ' ' . HTML::button(array('href' => OSCOM::getLink(null, OSCOM::getDefaultSiteApplication()), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel')));
?>
</p>

<?php 
foreach ($_POST as $key => $value) {
    if ($key != 'x' && $key != 'y') {
        if (is_array($value)) {
            for ($i = 0, $n = count($value); $i < $n; $i++) {
                echo HTML::hiddenField($key . '[]', $value[$i]);
            }
        } else {
            echo HTML::hiddenField($key, $value);
        }
    }
}
?>

    </form>
  </div>
</div>

<script type="text/javascript">
  $("#installForm").submit(function(e) {
    if ( formSuccess == false ) {
      e.preventDefault();

      prepareDB();
Пример #11
0
?>
</h1>

<?php 
if ($OSCOM_MessageStack->exists('Search')) {
    echo $OSCOM_MessageStack->get('Search');
}
?>

<form name="search" action="<?php 
echo OSCOM::getLink(null, null, null, 'NONSSL', false);
?>
" method="get" onsubmit="return check_form(this);">

<?php 
echo HTML::hiddenField('Search', null);
?>

<div class="moduleBox">
  <h6><?php 
echo OSCOM::getDef('search_criteria_title');
?>
</h6>

  <div class="content">
    <?php 
echo HTML::inputField('Q', null, 'style="width: 99%;"');
?>
  </div>
</div>
echo HTML::icon('trash.png') . ' ' . OSCOM::getDef('action_heading_batch_delete_zone_entries');
?>
</h3>

  <form name="zDeleteBatch" class="dataForm" action="<?php 
echo OSCOM::getLink(null, null, 'BatchDeleteEntries&Process&id=' . $_GET['id']);
?>
" method="post">

  <p><?php 
echo OSCOM::getDef('introduction_batch_delete_zone_entries');
?>
</p>

<?php 
$Qentries = $OSCOM_PDO->query('select z2gz.association_id, z2gz.zone_country_id, c.countries_name, z2gz.zone_id, z.zone_name from :table_zones_to_geo_zones z2gz left join :table_countries c on (z2gz.zone_country_id = c.countries_id) left join :table_zones z on (z2gz.zone_id = z.zone_id) where z2gz.association_id in ("' . implode('", "', array_unique(array_filter(array_slice($_POST['batch'], 0, MAX_DISPLAY_SEARCH_RESULTS), 'is_numeric'))) . '") order by c.countries_name, z.zone_name');
$Qentries->execute();
$names_string = '';
while ($Qentries->fetch()) {
    $names_string .= HTML::hiddenField('batch[]', $Qentries->valueInt('association_id')) . '<b>' . ($Qentries->valueInt('zone_country_id') > 0 ? $Qentries->value('countries_name') : OSCOM::getDef('all_countries')) . ': ' . ($Qentries->valueInt('zone_id') > 0 ? $Qentries->value('zone_name') : OSCOM::getDef('all_zones')) . '</b>, ';
}
if (!empty($names_string)) {
    $names_string = substr($names_string, 0, -2) . HTML::hiddenField('subaction', 'confirm');
}
echo '<p>' . $names_string . '</p>';
echo '<p>' . HTML::button(array('priority' => 'primary', 'icon' => 'trash', 'title' => OSCOM::getDef('button_delete'))) . ' ' . HTML::button(array('href' => OSCOM::getLink(null, null, 'id=' . $_GET['id']), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel'))) . '</p>';
?>

  </form>
</div>
Пример #13
0
<?php 
    }
}
if (isset($_SESSION['comments']) && !empty($_SESSION['comments'])) {
    ?>

<div class="moduleBox">
  <h6><?php 
    echo '<b>' . OSCOM::getDef('order_comments_title') . '</b> ' . HTML::link(OSCOM::getLink(null, 'Checkout', 'Payment', 'SSL'), '<span class="orderEdit">' . OSCOM::getDef('order_text_edit_title') . '</span>');
    ?>
</h6>

  <div class="content">
    <?php 
    echo nl2br(HTML::outputProtected($_SESSION['comments'])) . HTML::hiddenField('comments', $_SESSION['comments']);
    ?>
  </div>
</div>

<?php 
}
?>

<div class="submitFormButtons" style="text-align: right;">

<?php 
if ($OSCOM_ShoppingCart->hasBillingMethod() && $OSCOM_PaymentModule->hasGateway()) {
    $form_action_url = $OSCOM_PaymentModule->getGatewayURL();
} else {
    $form_action_url = OSCOM::getLink(null, null, 'Process', 'SSL');
Пример #14
0
if ($OSCOM_ObjectInfo->get('code') != DEFAULT_CURRENCY) {
    ?>

    <p><label for="default"><?php 
    echo OSCOM::getDef('field_set_default');
    ?>
</label><?php 
    echo HTML::checkboxField('default');
    ?>
</p>

<?php 
}
?>

  </fieldset>

  <p>

<?php 
if ($OSCOM_ObjectInfo->get('code') == DEFAULT_CURRENCY) {
    echo HTML::hiddenField('is_default', 'true');
}
echo HTML::button(array('priority' => 'primary', 'icon' => 'check', 'title' => OSCOM::getDef('button_save'))) . ' ' . HTML::button(array('href' => OSCOM::getLink(), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel')));
?>

  </p>

  </form>
</div>
Пример #15
0
 function initialize()
 {
     $this->_title_link = OSCOM::getLink(null, 'Search');
     $this->_content = '<form name="search" action="' . OSCOM::getLink() . '" method="get">' . HTML::hiddenField('Search', null) . HTML::inputField('Q', null, 'style="width: 80%;" maxlength="30"') . '&nbsp;' . HTML::hiddenSessionIDField() . HTML::button(array('icon' => 'search', 'title' => OSCOM::getDef('box_search_heading'))) . '</form>';
 }
Пример #16
0
            <p><label for="products_model"><?php echo OSCOM::getDef('field_model'); ?></label><?php echo HTML::inputField('products_model', (!$new_product ? $OSCOM_ObjectInfo->get('products_model') : null)); ?></p>
            <p><label for="products_quantity"><?php echo OSCOM::getDef('field_quantity'); ?></label><?php echo HTML::inputField('products_quantity', (!$new_product ? $OSCOM_ObjectInfo->get('products_quantity') : null)); ?></p>
            <p><label for="products_weight"><?php echo OSCOM::getDef('field_weight'); ?></label><?php echo HTML::inputField('products_weight', (!$new_product ? $OSCOM_ObjectInfo->get('products_weight') : null)) . HTML::selectMenu('products_weight_class', $OSCOM_Application->getWeightClassesList(), (!$new_product ? $OSCOM_ObjectInfo->get('products_weight_class') : SHIPPING_WEIGHT_UNIT)); ?></p>

<?php
  }
?>

          </fieldset>
        </td>
      </tr>
    </table>

<?php
  if ( !$new_product && ($OSCOM_ObjectInfo->getInt('has_children') === 1) ) {
    echo HTML::hiddenField('products_tax_class_id', 0) . HTML::hiddenField('products_price', 0) . HTML::hiddenField('products_model') . HTML::hiddenField('products_quantity', 0), HTML::hiddenField('products_weight', 0), HTML::hiddenField('products_weight_class', 0);
  }
?>

    <h4><?php echo OSCOM::getDef('subsection_attributes'); ?></h4>

    <fieldset>

<?php
  $installed = ProductAttributes::getInstalled();

  foreach ( $installed['entries'] as $pa ) {
    $pamo = 'osCommerce\\OM\\Core\\Site\\Admin\\Module\\ProductAttribute\\' . $pa['code'];
    $pam = new $pamo();

    echo '<p><label for="pa_' . $pa['code'] . '">' . $pa['title'] . '</label>' . $pam->getInputField(!$new_product && isset($attributes[$pa['id']]) ? $attributes[$pa['id']] : null) . '</p>';
echo OSCOM::getLink(null, null, 'BatchDeleteDefinitions&Process&id=' . $_GET['id'] . '&group=' . $_GET['group']);
?>
" method="post">

  <p><?php 
echo OSCOM::getDef('introduction_batch_delete_language_definitions');
?>
</p>

  <fieldset>

<?php 
$names_string = '';
foreach ($_POST['batch'] as $id) {
    $OSCOM_ObjectInfo = new ObjectInfo(Languages::getDefinition($id));
    $names_string .= HTML::hiddenField('batch[]', $OSCOM_ObjectInfo->getInt('id')) . '<b>' . $OSCOM_ObjectInfo->getProtected('definition_key') . '</b><br />';
}
if (!empty($names_string)) {
    $names_string = substr($names_string, 0, -6);
}
echo '<p>' . $names_string . '</p>';
?>

  </fieldset>

  <p><?php 
echo HTML::button(array('priority' => 'primary', 'icon' => 'trash', 'title' => OSCOM::getDef('button_delete'))) . ' ' . HTML::button(array('href' => OSCOM::getLink(null, null, 'id=' . $_GET['id'] . '&group=' . $_GET['group']), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel')));
?>
</p>

  </form>
Пример #18
0
  <form name="ccEditBatch" class="dataForm" action="<?php 
echo OSCOM::getLink(null, null, 'BatchSave&Process');
?>
" method="post">

  <p><?php 
echo OSCOM::getDef('introduction_batch_edit_cards');
?>
</p>

<?php 
$Qcc = $OSCOM_PDO->query('select id, credit_card_name from :table_credit_cards where id in ("' . implode('", "', array_unique(array_filter(array_slice($_POST['batch'], 0, MAX_DISPLAY_SEARCH_RESULTS), 'is_numeric'))) . '") order by credit_card_name');
$Qcc->execute();
$names_string = '';
while ($Qcc->fetch()) {
    $names_string .= HTML::hiddenField('batch[]', $Qcc->valueInt('id')) . '<b>' . $Qcc->valueProtected('credit_card_name') . '</b>, ';
}
if (!empty($names_string)) {
    $names_string = substr($names_string, 0, -2);
}
echo '<p>' . $names_string . '</p>';
echo '<p>' . HTML::radioField('type', array(array('id' => 'activate', 'text' => OSCOM::getDef('activate')), array('id' => 'deactivate', 'text' => OSCOM::getDef('deactivate'))), 'activate') . '</p>';
?>

  <p><?php 
echo HTML::button(array('priority' => 'primary', 'icon' => 'check', 'title' => OSCOM::getDef('button_save'))) . ' ' . HTML::button(array('href' => OSCOM::getLink(), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel')));
?>
</p>

  </form>
</div>
Пример #19
0
  <p><?php 
echo OSCOM::getDef('introduction_batch_delete_tax_classes');
?>
</p>

<?php 
$check_tax_classes_flag = array();
$Qclasses = $OSCOM_PDO->query('select tax_class_id, tax_class_title from :table_tax_class where tax_class_id in ("' . implode('", "', array_unique(array_filter(array_slice($_POST['batch'], 0, MAX_DISPLAY_SEARCH_RESULTS), 'is_numeric'))) . '") order by tax_class_title');
$Qclasses->execute();
$names_string = '';
while ($Qclasses->fetch()) {
    if (TaxClasses::hasProducts($Qclasses->valueInt('tax_class_id'))) {
        $check_tax_classes_flag[] = $Qclasses->value('tax_class_title');
    }
    $names_string .= HTML::hiddenField('batch[]', $Qclasses->valueInt('tax_class_id')) . '<b>' . $Qclasses->value('tax_class_title') . ' (' . sprintf(OSCOM::getDef('total_entries'), TaxClasses::getNumberOfTaxRates($Qclasses->valueInt('tax_class_id'))) . ')</b>, ';
}
if (!empty($names_string)) {
    $names_string = substr($names_string, 0, -2);
}
echo '<p>' . $names_string . '</p>';
if (empty($check_tax_classes_flag)) {
    echo '<p>' . HTML::button(array('priority' => 'primary', 'icon' => 'trash', 'title' => OSCOM::getDef('button_delete'))) . ' ' . HTML::button(array('href' => OSCOM::getLink(), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel'))) . '</p>';
} else {
    echo '<p><b>' . OSCOM::getDef('batch_delete_warning_tax_class_in_use') . '</b></p>' . '<p>' . implode(', ', $check_tax_classes_flag) . '</p>';
    echo '<p>' . HTML::button(array('href' => OSCOM::getLink(), 'icon' => 'triangle-1-w', 'title' => OSCOM::getDef('button_back'))) . '</p>';
}
?>

  </form>
</div>
Пример #20
0
  <p><?php echo OSCOM::getDef('introduction_batch_delete_zone_groups'); ?></p>

<?php
  $check_tax_zones_flag = array();

  $Qzones = $OSCOM_PDO->query('select geo_zone_id, geo_zone_name from :table_geo_zones where geo_zone_id in (\'' . implode('\', \'', array_unique(array_filter(array_slice($_POST['batch'], 0, MAX_DISPLAY_SEARCH_RESULTS), 'is_numeric'))) . '\') order by geo_zone_name');
  $Qzones->execute();

  $names_string = '';

  while ( $Qzones->fetch() ) {
    if ( ZoneGroups::hasTaxRates($Qzones->valueInt('geo_zone_id')) ) {
      $check_tax_zones_flag[] = $Qzones->value('geo_zone_name');
    }

    $names_string .= HTML::hiddenField('batch[]', $Qzones->valueInt('geo_zone_id')) . '<b>' . $Qzones->valueProtected('geo_zone_name') . ' (' . sprintf(OSCOM::getDef('total_entries'), ZoneGroups::getNumberOfEntries($Qzones->valueInt('geo_zone_id'))) . ')</b>, ';
  }

  if ( !empty($names_string) ) {
    $names_string = substr($names_string, 0, -2);
  }

  echo '<p>' . $names_string . '</p>';

  if ( empty($check_tax_zones_flag) ) {
    echo '<p>' . HTML::button(array('priority' => 'primary', 'icon' => 'trash', 'title' => OSCOM::getDef('button_delete'))) . ' ' . HTML::button(array('href' => OSCOM::getLink(), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel'))) . '</p>';
  } else {
    echo '<p><b>' . OSCOM::getDef('batch_delete_warning_group_in_use_tax_rate') . '</b></p>' .
         '<p>' . implode(', ', $check_tax_zones_flag) . '</p>';

    echo '<p>' . HTML::button(array('href' => OSCOM::getLink(), 'priority' => 'primary', 'icon' => 'triangle-1-w', 'title' => OSCOM::getDef('button_back'))) . '</p>';
Пример #21
0
  <form name="aDeleteBatch" class="dataForm" action="<?php 
echo OSCOM::getLink(null, null, 'BatchDelete&Process');
?>
" method="post">

  <p><?php 
echo OSCOM::getDef('introduction_batch_delete_administrators');
?>
</p>

<?php 
$Qadmins = $OSCOM_PDO->query('select id, user_name from :table_administrators where id in ("' . implode('", "', array_unique(array_filter(array_slice($_POST['batch'], 0, MAX_DISPLAY_SEARCH_RESULTS), 'is_numeric'))) . '") order by user_name');
$Qadmins->execute();
$names_string = '';
while ($Qadmins->fetch()) {
    $names_string .= HTML::hiddenField('batch[]', $Qadmins->valueInt('id')) . '<b>' . $Qadmins->valueProtected('user_name') . '</b>, ';
}
if (!empty($names_string)) {
    $names_string = substr($names_string, 0, -2);
}
echo '<p>' . $names_string . '</p>';
?>

  <p><?php 
echo HTML::button(array('priority' => 'primary', 'icon' => 'trash', 'title' => OSCOM::getDef('button_delete'))) . ' ' . HTML::button(array('href' => OSCOM::getLink(), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel')));
?>
</p>

  </form>
</div>
Пример #22
0
  <h3><?php 
echo HTML::icon('move.png') . ' ' . OSCOM::getDef('action_heading_batch_move_categories');
?>
</h3>

  <p><?php 
echo OSCOM::getDef('introduction_batch_move_categories');
?>
</p>

  <fieldset>

<?php 
$categories = '';
foreach ($_POST['batch'] as $c) {
    $categories .= HTML::hiddenField('batch[]', $c) . '<b>' . $OSCOM_CategoryTree->getData($c, 'name') . '</b>, ';
}
if (!empty($categories)) {
    $categories = substr($categories, 0, -2);
}
echo '<p>' . $categories . '</p>';
?>

    <p><label for="parent_id"><?php 
echo OSCOM::getDef('field_parent_category');
?>
</label><?php 
echo HTML::selectMenu('parent_id', array_merge(array(array('id' => '0', 'text' => OSCOM::getDef('top_category'))), $OSCOM_Application->getCategoryList()), $OSCOM_Application->getCurrentCategoryID());
?>
</p>
  </fieldset>
Пример #23
0
           '            <td>' . $pv['quantity'] . '</td>' .
           '            <td align="right"><span class="variantActions"><span class="defaultVariantActions"><a href="#" onclick="openEditVariantForm(' . $key . '); return false;">' . HTML::icon('edit.png') . '</a> <a href="#" onclick="deleteVariant(\'' . $key . '\'); return false;">' . HTML::icon('trash.png') . '</a></span></span></td>' .
           '          </tr>';
    }
  }
?>

        </tbody>
      </table>

      <div style="padding: 2px;">
        <span id="dataTableLegend"><?php echo '<b>' . OSCOM::getDef('table_action_legend') . '</b> ' . HTML::icon('edit.png') . '&nbsp;' . OSCOM::getDef('icon_edit') . '&nbsp;&nbsp;' . HTML::icon('trash.png') . '&nbsp;' . OSCOM::getDef('icon_trash'); ?></span>
      </div>

<?php
  echo HTML::hiddenField('assigned_variants', json_encode($v), 'id="assigned_variants"') . HTML::hiddenField('deleted_variants', null, 'id="deleted_variants"');
?>

<script>
$(function() {
  prettifyDataTable();
});
</script>

    </div>

    <div id="variantForm" style="display: none;">
      <table border="0" width="100%" cellspacing="0" cellpadding="2">
        <tr>
          <td width="30%" valign="top">
            <h4><?php echo OSCOM::getDef('subsection_variants'); ?></h4>
        $address_string .= '<div class="abActions" style="float: right;"><span class="default"><a href="#" onclick="showEditAddressForm(\'' . $ab['address_book_id'] . '\'); return false;">' . HTML::icon('edit.png') . '</a>&nbsp;<a href="#" onclick="deleteAddress(\'' . $ab['address_book_id'] . '\'); return false;">' . HTML::icon('trash.png') . '</a></span></div>';
        echo '      <li id="abEntry' . $ab['address_book_id'] . '" style="float: left; margin: 10px; padding: 10px; border: 1px solid #999; background-color: #fff; box-shadow: 4px 4px 8px #ccc;">' . $address_string . '</li>';
    }
}
?>

      <li style="float: left; margin: 10px; padding: 10px; border: 1px solid #999; background-color: #e6f1f6; box-shadow: 4px 4px 8px #ccc; text-align: center;"><a href="#" onclick="showNewAddressForm(); return false;">Add New Address</a></li>
    </ul>

    <div style="clear: both; padding: 5px;"></div>
  </div>
</div>

<?php 
if ($new_customer === false) {
    echo $address_fields . HTML::hiddenField('ab_default_id', $OSCOM_ObjectInfo->get('customers_default_address_id'));
}
?>

<div id="dialogDeleteAddress" title="<?php 
echo HTML::output(OSCOM::getDef('dialog_delete_address_title'));
?>
">
  <p><span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span><?php 
echo OSCOM::getDef('dialog_delete_address_desc');
?>
</p>
</div>

<div id="dialogDeleteNewAddress" title="<?php 
echo HTML::output(OSCOM::getDef('dialog_delete_new_address_title'));
Пример #25
0
            <td colspan="3"><?php 
        echo '<b>' . $selection[$i]['module'] . '</b>';
        ?>
</td>
            <td align="right"><?php 
        echo HTML::radioField('payment_method', $selection[$i]['id'], $OSCOM_ShoppingCart->hasBillingMethod() ? $OSCOM_ShoppingCart->getBillingMethod('id') : null);
        ?>
</td>

<?php 
    } else {
        ?>

            <td colspan="4"><?php 
        echo '<b>' . $selection[$i]['module'] . '</b>' . HTML::hiddenField('payment_method', $selection[$i]['id']);
        ?>
</td>

<?php 
    }
    ?>

            <td width="10">&nbsp;</td>
          </tr>

<?php 
    if (isset($selection[$i]['error'])) {
        ?>

          <tr>
echo HTML::icon('trash.png') . ' ' . OSCOM::getDef('action_heading_batch_delete_tax_rates');
?>
</h3>

  <form name="rDeleteBatch" class="dataForm" action="<?php 
echo OSCOM::getLink(null, null, 'BatchDeleteEntries&Process&id=' . $_GET['id']);
?>
" method="post">

  <p><?php 
echo OSCOM::getDef('introduction_batch_delete_tax_rates');
?>
</p>

<?php 
$Qentries = $OSCOM_PDO->query('select tax_rates_id, tax_description from :table_tax_rates where tax_rates_id in ("' . implode('", "', array_unique(array_filter(array_slice($_POST['batch'], 0, MAX_DISPLAY_SEARCH_RESULTS), 'is_numeric'))) . '") order by tax_description');
$Qentries->execute();
$names_string = '';
while ($Qentries->fetch()) {
    $names_string .= HTML::hiddenField('batch[]', $Qentries->valueInt('tax_rates_id')) . '<b>' . $Qentries->valueProtected('tax_description') . '</b>, ';
}
if (!empty($names_string)) {
    $names_string = substr($names_string, 0, -2);
}
echo '<p>' . $names_string . '</p>';
echo '<p>' . HTML::button(array('priority' => 'primary', 'icon' => 'trash', 'title' => OSCOM::getDef('button_delete'))) . ' ' . HTML::button(array('href' => OSCOM::getLink(null, null, 'id=' . $_GET['id']), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel'))) . '</p>';
?>

  </form>
</div>
Пример #27
0
 public function testHiddenField()
 {
     $this->assertEquals('<input type="hidden" name="action" value="confirm" id="hfAction" />', HTML::hiddenField('action', 'confirm', 'id="hfAction"'));
 }