function osc_cfg_set_countries_pulldown_menu($default, $key = null)
{
    $name = !empty($key) ? 'configuration[' . $key . ']' : 'configuration_value';
    $countries_array = array();
    foreach (Address::getCountries() as $country) {
        $countries_array[] = array('id' => $country['id'], 'text' => $country['name']);
    }
    return HTML::selectMenu($name, $countries_array, $default);
}
function osc_cfg_set_weight_classes_pulldown_menu($default, $key = null)
{
    $name = empty($key) ? 'configuration_value' : 'configuration[' . $key . ']';
    $weight_class_array = array();
    foreach (Weight::getClasses() as $class) {
        $weight_class_array[] = array('id' => $class['id'], 'text' => $class['title']);
    }
    return HTML::selectMenu($name, $weight_class_array, $default);
}
예제 #3
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>';
 }
function osc_cfg_set_zone_classes_pull_down_menu($default, $key = null)
{
    $OSCOM_PDO = Registry::get('PDO');
    $name = empty($key) ? 'configuration_value' : 'configuration[' . $key . ']';
    $zone_class_array = array(array('id' => '0', 'text' => OSCOM::getDef('parameter_none')));
    $Qzones = $OSCOM_PDO->query('select geo_zone_id, geo_zone_name from :table_geo_zones order by geo_zone_name');
    $Qzones->execute();
    while ($Qzones->fetch()) {
        $zone_class_array[] = array('id' => $Qzones->valueInt('geo_zone_id'), 'text' => $Qzones->value('geo_zone_name'));
    }
    return HTML::selectMenu($name, $zone_class_array, $default);
}
function osc_cfg_set_order_statuses_pull_down_menu($default, $key = null)
{
    $OSCOM_PDO = Registry::get('PDO');
    $OSCOM_Language = Registry::get('Language');
    $name = empty($key) ? 'configuration_value' : 'configuration[' . $key . ']';
    $statuses_array = array(array('id' => '0', 'text' => OSCOM::getDef('default_entry')));
    $Qstatuses = $OSCOM_PDO->prepare('select orders_status_id, orders_status_name from :table_orders_status where language_id = :language_id order by orders_status_name');
    $Qstatuses->bindInt(':language_id', $OSCOM_Language->getID());
    $Qstatuses->execute();
    while ($Qstatuses->fetch()) {
        $statuses_array[] = array('id' => $Qstatuses->valueInt('orders_status_id'), 'text' => $Qstatuses->value('orders_status_name'));
    }
    return HTML::selectMenu($name, $statuses_array, $default);
}
예제 #6
0
    public function getInputField($value) {
      $OSCOM_PDO = Registry::get('PDO');

      $array = array(array('id' => '',
                           'text' => OSCOM::getDef('none')));

      $Qm = $OSCOM_PDO->query('select manufacturers_id, manufacturers_name from :table_manufacturers order by manufacturers_name');

      while ( $Qm->fetch() ) {
        $array[] = array('id' => $Qm->valueInt('manufacturers_id'),
                         'text' => $Qm->value('manufacturers_name'));
      }

      return HTML::selectMenu('attributes[' . self::getID() . ']', $array, $value);
    }
예제 #7
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>';
     }
 }
예제 #8
0
    public function getInputField($value) {
      $OSCOM_Language = Registry::get('Language');
      $OSCOM_PDO = Registry::get('PDO');

      $array = array();

      $Qstatus = $OSCOM_PDO->prepare('select id, title from :table_shipping_availability where languages_id = :languages_id order by title');
      $Qstatus->bindInt(':languages_id', $OSCOM_Language->getID());
      $Qstatus->execute();

      while ( $Qstatus->fetch() ) {
        $array[] = array('id' => $Qstatus->valueInt('id'),
                         'text' => $Qstatus->value('title'));
      }

      return HTML::selectMenu('attributes[' . self::getID() . ']', $array, $value);
    }
예제 #9
0
  <form name="lImport" class="dataForm" action="<?php 
echo OSCOM::getLink(null, null, 'Import&Process');
?>
" method="post">

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

  <fieldset>
    <p><label for="language_import"><?php 
echo OSCOM::getDef('field_language_selection');
?>
</label><?php 
echo HTML::selectMenu('language_import', $languages_array);
?>
</p>
    <p><label for="import_type"><?php 
echo OSCOM::getDef('field_import_type');
?>
</label><br /><?php 
echo HTML::radioField('import_type', array(array('id' => 'add', 'text' => OSCOM::getDef('only_add_new_records')), array('id' => 'update', 'text' => OSCOM::getDef('only_update_existing_records')), array('id' => 'replace', 'text' => OSCOM::getDef('replace_all'))), 'add', null, '<br />');
?>
</p>
  </fieldset>

  <p><?php 
echo HTML::button(array('priority' => 'primary', 'icon' => 'triangle-1-se', 'title' => OSCOM::getDef('button_import'))) . ' ' . HTML::button(array('href' => OSCOM::getLink(), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel')));
?>
</p>
예제 #10
0
        <td class="inputDescription"><?php echo OSCOM::getDef('param_database_username_description'); ?></td>
      </tr>
      <tr>
        <td class="inputField"><?php echo OSCOM::getDef('param_database_password') . '<br />' . HTML::inputField('DB_SERVER_PASSWORD', null, 'class="text"'); ?></td>
        <td class="inputDescription"><?php echo OSCOM::getDef('param_database_password_description'); ?></td>
      </tr>
      <tr>
        <td class="inputField"><?php echo OSCOM::getDef('param_database_name') . '<br />' . HTML::inputField('DB_DATABASE', null, 'class="text"'); ?></td>
        <td class="inputDescription"><?php echo OSCOM::getDef('param_database_name_description'); ?></td>
      </tr>
      <tr>
        <td class="inputField"><?php echo OSCOM::getDef('param_database_port') . '<br />' . HTML::inputField('DB_SERVER_PORT', null, 'class="text"'); ?></td>
        <td class="inputDescription"><?php echo OSCOM::getDef('param_database_port_description'); ?></td>
      </tr>
      <tr>
        <td class="inputField"><?php echo OSCOM::getDef('param_database_type') . '<br />' . HTML::selectMenu('DB_DATABASE_CLASS', $db_table_types); ?></td>
        <td class="inputDescription"><?php echo OSCOM::getDef('param_database_type_description'); ?></td>
      </tr>
      <tr>
        <td class="inputField"><?php echo OSCOM::getDef('param_database_prefix') . '<br />' . HTML::inputField('DB_TABLE_PREFIX', 'osc_', 'class="text"'); ?></td>
        <td class="inputDescription"><?php echo OSCOM::getDef('param_database_prefix_description'); ?></td>
      </tr>
    </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>

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

<script type="text/javascript">
예제 #11
0
" method="post">

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

  <fieldset>
    <p>(<a href="javascript:selectAllFromPullDownMenu('groups');"><u><?php 
echo OSCOM::getDef('select_all');
?>
</u></a> | <a href="javascript:resetPullDownMenuSelection('groups');"><u><?php 
echo OSCOM::getDef('select_none');
?>
</u></a>)<br /><?php 
echo HTML::selectMenu('groups[]', $groups_array, array('account', 'checkout', 'general', 'index', 'info', 'order', 'products', 'search'), 'id="groups" size="10" multiple="multiple"');
?>
</p>

    <p><?php 
echo HTML::checkboxField('include_data', array(array('id' => '', 'text' => OSCOM::getDef('field_export_with_data'))), true);
?>
</p>
  </fieldset>

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

  </form>
예제 #12
0
  <form name="rEdit" class="dataForm" action="<?php 
echo OSCOM::getLink(null, null, 'EntrySave&Process&id=' . $_GET['id'] . '&rID=' . $OSCOM_ObjectInfo->getInt('tax_rates_id'));
?>
" method="post">

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

  <fieldset>
    <p><label for="tax_zone_id"><?php 
echo OSCOM::getDef('field_tax_rate_zone_group');
?>
</label><?php 
echo HTML::selectMenu('tax_zone_id', $zones_array, $OSCOM_ObjectInfo->getInt('geo_zone_id'));
?>
</p>
    <p><label for="tax_rate"><?php 
echo OSCOM::getDef('field_tax_rate');
?>
</label><?php 
echo HTML::inputField('tax_rate', $OSCOM_ObjectInfo->get('tax_rate'));
?>
</p>
    <p><label for="tax_description"><?php 
echo OSCOM::getDef('field_tax_rate_description');
?>
</label><?php 
echo HTML::inputField('tax_description', $OSCOM_ObjectInfo->get('tax_description'));
?>
예제 #13
0
  <form name="rNew" class="dataForm" action="<?php 
echo OSCOM::getLink(null, null, 'EntrySave&Process&id=' . $_GET['id']);
?>
" method="post">

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

  <fieldset>
    <p><label for="tax_zone_id"><?php 
echo OSCOM::getDef('field_tax_rate_zone_group');
?>
</label><?php 
echo HTML::selectMenu('tax_zone_id', $zones_array);
?>
</p>
    <p><label for="tax_rate"><?php 
echo OSCOM::getDef('field_tax_rate');
?>
</label><?php 
echo HTML::inputField('tax_rate');
?>
</p>
    <p><label for="tax_description"><?php 
echo OSCOM::getDef('field_tax_rate_description');
?>
</label><?php 
echo HTML::inputField('tax_description');
?>
    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';
예제 #15
0
 /**
  * Generate a time zone selection menu
  * 
  * @param $name string The name of the selection field
  * @param $default The default value
  * @return string
  * @since v3.0.1
  */
 public static function timeZoneSelectMenu($name, $default = null)
 {
     if (!isset($default)) {
         $default = date_default_timezone_get();
     }
     $result = array();
     foreach (DateTime::getTimeZones() as $zone => $zones_array) {
         foreach ($zones_array as $key => $value) {
             $result[] = array('id' => $key, 'text' => $value, 'group' => $zone);
         }
     }
     return HTML::selectMenu($name, $result, $default);
 }
예제 #16
0
          <td width="70%" valign="top">
            <h4><?php echo OSCOM::getDef('subsection_price'); ?></h4>

            <fieldset>
              <p><label for="variants_price_tax_class"><?php echo OSCOM::getDef('field_tax_class'); ?></label><?php echo HTML::selectMenu('variants_price_tax_class', $OSCOM_Application->getTaxClassesList(), null, 'onchange="updateGross(\'variants_price\');"'); ?></p>
              <p><label for="variants_price"><?php echo OSCOM::getDef('field_price_net'); ?></label><?php echo HTML::inputField('variants_price', null, 'onkeyup="updateGross(\'variants_price\')"'); ?></p>
              <p><label for="variants_price_gross"><?php echo OSCOM::getDef('field_price_gross'); ?></label><?php echo HTML::inputField('variants_price_gross', null, 'onkeyup="updateNet(\'variants_price\')"'); ?></p>
            </fieldset>

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

            <fieldset>
              <p id="vstatus"><label for="variants_status"><?php echo OSCOM::getDef('field_status'); ?></label><?php echo HTML::radioField('variants_status', array(array('id' => '1', 'text' => OSCOM::getDef('status_enabled')), array('id' => '0', 'text' => OSCOM::getDef('status_disabled')))); ?></p>
              <p><label for="variants_model"><?php echo OSCOM::getDef('field_model'); ?></label><?php echo HTML::inputField('variants_model', null); ?></p>
              <p><label for="variants_quantity"><?php echo OSCOM::getDef('field_quantity'); ?></label><?php echo HTML::inputField('variants_quantity', null); ?></p>
              <p><label for="variants_weight"><?php echo OSCOM::getDef('field_weight'); ?></label><?php echo HTML::inputField('variants_weight', null, 'size="6"'). HTML::selectMenu('variants_weight_class', $OSCOM_Application->getWeightClassesList(), SHIPPING_WEIGHT_UNIT); ?></p>
              <p><label for="variants_default"><?php echo OSCOM::getDef('field_default'); ?></label><?php echo HTML::checkboxField('variants_default'); ?></p>
            </fieldset>

<script>
$(function() {
  $('#vstatus').buttonset();
});
</script>

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

      <p id="variantSubmitButtonsNew"><?php echo HTML::button(array('type' => 'button', 'params' => 'onclick="processVariantForm();"', 'priority' => 'primary', 'icon' => 'plus', 'title' => OSCOM::getDef('button_add'))) . ' ' . HTML::button(array('type' => 'button', 'params' => 'onclick="closeVariantForm();"', 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel'))); ?></p>
      <p id="variantSubmitButtonsEdit"><?php echo HTML::button(array('type' => 'button', 'params' => 'data-vButtonType="henrysBucket"', 'priority' => 'primary', 'icon' => 'arrowrefresh-1-n', 'title' => OSCOM::getDef('button_update'))) . ' ' . HTML::button(array('type' => 'button', 'params' => 'onclick="closeVariantForm();"', 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel'))); ?></p>
예제 #17
0
?>
</h1>

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

<form id="liveSearchForm">
  <?php 
echo HTML::inputField('search', null, 'id="liveSearchField" class="searchField" placeholder="' . OSCOM::getDef('placeholder_search') . '"') . HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => OSCOM::getDef('button_reset')));
?>

  <span style="float: right;"><?php 
echo HTML::selectMenu('logs', $OSCOM_Application->getLogList(), null, 'onchange="viewLog();"');
?>
</span>
</form>

<div style="padding: 20px 5px 5px 5px; height: 16px;">
  <span id="batchTotalPages"></span>
  <span id="batchPageLinks"></span>
</div>

<table border="0" width="100%" cellspacing="0" cellpadding="2" class="dataTable" id="coreUpdateDataTable">
  <thead>
    <tr>
      <th><?php 
echo OSCOM::getDef('table_heading_release_version');
?>
예제 #18
0
        <td width="<?php echo $data_width;?>" height="100%" valign="top">
          <h4><?php echo OSCOM::getDef('subsection_data'); ?></h4>

          <fieldset>
            <p id="productStatusField"><label for="products_status"><?php echo OSCOM::getDef('field_status'); ?></label><?php echo HTML::radioField('products_status', array(array('id' => '1', 'text' => OSCOM::getDef('status_enabled')), array('id' => '0', 'text' => OSCOM::getDef('status_disabled'))), (!$new_product ? $OSCOM_ObjectInfo->get('products_status') : '0')); ?></p>

<script>$('#productStatusField').buttonset();</script>

<?php
  if ( $new_product || ($OSCOM_ObjectInfo->getInt('has_children') !== 1) ) {
?>

            <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);
  }
?>
  </li>

<?php 
}
?>

  <li>

<?php 
echo HTML::label(OSCOM::getDef('field_customer_country'), 'country', null, true);
$countries_array = array(array('id' => '', 'text' => OSCOM::getDef('pull_down_default')));
foreach (Address::getCountries() as $country) {
    $countries_array[] = array('id' => $country['id'], 'text' => $country['name']);
}
echo HTML::selectMenu('country', $countries_array, isset($osC_oiAddress) && $osC_oiAddress->exists('country_id') ? $osC_oiAddress->getInt('country_id') : STORE_COUNTRY);
?>

  </li>

<?php 
if (ACCOUNT_TELEPHONE > -1) {
    ?>

  <li><?php 
    echo HTML::label(OSCOM::getDef('field_customer_telephone_number'), 'telephone', null, ACCOUNT_TELEPHONE > 0) . HTML::inputField('telephone', isset($osC_oiAddress) && $osC_oiAddress->exists('telephone') ? $osC_oiAddress->get('telephone') : null);
    ?>
</li>

<?php 
}
예제 #20
0
?>
</td>
      </tr>
      <tr>
        <td class="inputField"><?php 
echo OSCOM::getDef('param_database_port') . '<br />' . HTML::inputField('DB_SERVER_PORT', null, 'class="text"');
?>
</td>
        <td class="inputDescription"><?php 
echo OSCOM::getDef('param_database_port_description');
?>
</td>
      </tr>
      <tr>
        <td class="inputField"><?php 
echo OSCOM::getDef('param_database_type') . '<br />' . HTML::selectMenu('DB_DATABASE_CLASS', $db_table_types);
?>
</td>
        <td class="inputDescription"><?php 
echo OSCOM::getDef('param_database_type_description');
?>
</td>
      </tr>
      <tr>
        <td class="inputField"><?php 
echo OSCOM::getDef('param_database_prefix') . '<br />' . HTML::inputField('DB_TABLE_PREFIX', 'osc_', 'class="text"');
?>
</td>
        <td class="inputDescription"><?php 
echo OSCOM::getDef('param_database_prefix_description');
?>
예제 #21
0
?>

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

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

<form id="liveSearchForm">
  <?php 
echo HTML::inputField('search', null, 'id="liveSearchField" class="searchField" placeholder="' . OSCOM::getDef('placeholder_search') . '"') . HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => OSCOM::getDef('button_reset'))) . '&nbsp;' . HTML::selectMenu('cid', array_merge(array(array('id' => '0', 'text' => OSCOM::getDef('top_category'))), $OSCOM_Application->getCategoryList()));
?>

  <span style="float: right;">

<?php 
if ($OSCOM_Application->getCurrentCategoryID() > 0) {
    echo HTML::button(array('href' => OSCOM::getLink(null, null, 'cid=' . $OSCOM_CategoryTree->getParentID($OSCOM_Application->getCurrentCategoryID())), 'priority' => 'secondary', 'icon' => 'triangle-1-w', 'title' => OSCOM::getDef('button_back'))) . ' ';
}
echo HTML::button(array('href' => OSCOM::getLink(null, null, 'Save&cid=' . $OSCOM_Application->getCurrentCategoryID()), 'icon' => 'plus', 'title' => OSCOM::getDef('button_insert')));
?>

  </span>
</form>

<script>
예제 #22
0
  <p><?php 
echo OSCOM::getDef('introduction_edit_zone_entry');
?>
</p>

  <fieldset>
    <p><label for="zone_country_id"><?php 
echo OSCOM::getDef('field_country');
?>
</label><?php 
echo HTML::selectMenu('zone_country_id', $countries_array, $OSCOM_ObjectInfo->get('zone_country_id'), 'onchange="update_zone(this.form);"');
?>
</p>
    <p><label for="zone_id"><?php 
echo OSCOM::getDef('field_zone');
?>
</label><?php 
echo HTML::selectMenu('zone_id', $zones_array, $OSCOM_ObjectInfo->get('zone_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']), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel')));
?>
</p>

  </form>
</div>
예제 #23
0
</div>

<div style="clear: both;"></div>

<div class="infoBox">
  <h3><?php 
echo HTML::icon('edit.png') . ' ' . $OSCOM_ObjectInfo->getProtected('categories_name');
?>
</h3>

  <fieldset>
    <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_ObjectInfo->getInt('parent_id'));
?>
</p>
    <p><label><?php 
echo OSCOM::getDef('field_name');
?>
</label></p>

<?php 
foreach ($OSCOM_Language->getAll() as $l) {
    echo '<p>' . $OSCOM_Language->showImage($l['code']) . '&nbsp;' . $l['name'] . '<br />' . HTML::inputField('categories_name[' . $l['id'] . ']', Categories::get($OSCOM_ObjectInfo->getInt('categories_id'), 'categories_name', $l['id'])) . '</p>';
}
?>

    <p><label><?php 
echo OSCOM::getDef('field_image');
예제 #24
0
      </li>
      <li><?php 
echo HTML::checkboxField('recursive', array(array('id' => '1', 'text' => OSCOM::getDef('field_search_recursive'))), true);
?>
</li>
      <li>

<?php 
echo HTML::label(OSCOM::getDef('field_search_manufacturers'), 'manufacturer');
$manufacturers_array = array(array('id' => '', 'text' => OSCOM::getDef('filter_all_manufacturers')));
$Qmanufacturers = $OSCOM_PDO->query('select manufacturers_id, manufacturers_name from :table_manufacturers order by manufacturers_name');
$Qmanufacturers->execute();
while ($Qmanufacturers->fetch()) {
    $manufacturers_array[] = array('id' => $Qmanufacturers->valueInt('manufacturers_id'), 'text' => $Qmanufacturers->value('manufacturers_name'));
}
echo HTML::selectMenu('manufacturer', $manufacturers_array);
?>

      </li>
      <li><?php 
echo HTML::label(OSCOM::getDef('field_search_price_from'), 'pfrom') . HTML::inputField('pfrom');
?>
</li>
      <li><?php 
echo HTML::label(OSCOM::getDef('field_search_price_to'), 'pto') . HTML::inputField('pto');
?>
</li>
      <li><?php 
echo HTML::label(OSCOM::getDef('field_search_date_from'), 'datefrom_days') . HTML::dateSelectMenu('datefrom', null, false, null, null, date('Y') - $OSCOM_Search->getMinYear(), 0);
?>
</li>
    } else {
      state = null;
    }

    $.getJSON('<?php 
echo OSCOM::getRPCLink(null, null, 'GetZones');
?>
', { country_id: $('#ab_country').val() }, function (response) {
      if ( response.rpcStatus == 1 ) {
        var len = response.zones.length;

        if ( len > 0 ) {
          var html = '';

          $('#ab_state').replaceWith('<?php 
echo HTML::selectMenu('ab_state', array());
?>
');

          for (var i = 0; i < len; i++) {
            html += '<option value="' + response.zones[i].id + '">' + response.zones[i].name + '</option>';
          }

          $('#ab_state').append(html);

          if ( zone_id > 0 ) {
            $('#ab_state').val(zone_id);
          }
        } else {
          $('#ab_state').replaceWith('<?php 
echo HTML::inputField('ab_state');
예제 #26
0
</label><?php 
echo HTML::inputField('numeric_separator_decimal', $OSCOM_ObjectInfo->get('numeric_separator_decimal'));
?>
</p>
    <p><label for="numeric_separator_thousands"><?php 
echo OSCOM::getDef('field_currency_separator_thousands');
?>
</label><?php 
echo HTML::inputField('numeric_separator_thousands', $OSCOM_ObjectInfo->get('numeric_separator_thousands'));
?>
</p>
    <p><label for="parent_id"><?php 
echo OSCOM::getDef('field_parent_language');
?>
</label><?php 
echo HTML::selectMenu('parent_id', $languages_array, $OSCOM_ObjectInfo->get('parent_id'));
?>
</p>
    <p><label for="sort_order"><?php 
echo OSCOM::getDef('field_sort_order');
?>
</label><?php 
echo HTML::inputField('sort_order', $OSCOM_ObjectInfo->get('sort_order'));
?>
</p>

<?php 
if ($OSCOM_ObjectInfo->get('code') != DEFAULT_LANGUAGE) {
    ?>

    <p><label for="default"><?php 
예제 #27
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;
    }
예제 #28
0
 public function testTimeZoneSelectMenu()
 {
     $result = array();
     foreach (DateTime::getTimeZones() as $zone => $zones_array) {
         foreach ($zones_array as $key => $value) {
             $result[] = array('id' => $key, 'text' => $value, 'group' => $zone);
         }
     }
     $this->assertEquals(HTML::selectMenu('timezone', $result, 'Europe/Berlin'), HTML::timeZoneSelectMenu('timezone', 'Europe/Berlin'));
 }