/**
 * affiliate_get_level_list()
 *
 * @param $name
 * @param string $selected
 * @param string $parameters
 * @return Dropdown Listbox.  Note personal level value is  AFFILIATE_TIER_LEVELS + 1
 **/
function affiliate_get_level_list($name, $selected = '', $parameters = '')
{
    $status_array = array(array('id' => '', 'text' => TEXT_AFFILIATE_ALL_LEVELS));
    $status_array[] = array('id' => '0', 'text' => TEXT_AFFILIATE_PERSONAL_LEVEL);
    for ($i = 1; $i <= AFFILIATE_TIER_LEVELS; $i++) {
        $status_array[] = array('id' => $i, 'text' => TEXT_AFFILIATE_LEVEL_SUFFIX . $i);
    }
    return xtc_draw_pull_down_menu($name, $status_array, $selected, $parameters);
}
/**
 * affiliate_get_status_list()
 *
 * @param $name
 * @param string $selected
 * @param string $parameters
 * @param bool $show_all - show "All Status" or not
 * @return  Dropdown listbox with order status
 **/
function affiliate_get_status_list($name, $selected = '', $parameters = '', $show_all = true)
{
    if ($show_all == true) {
        $status_array = array(array('id' => '', 'text' => TEXT_AFFILIATE_ALL_STATUS));
    } else {
        $status_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT));
    }
    $status = affiliate_get_status_array();
    for ($i = 0, $n = sizeof($status); $i < $n; $i++) {
        $status_array[] = array('id' => $status[$i]['orders_status_id'], 'text' => $status[$i]['orders_status_name']);
    }
    return xtc_draw_pull_down_menu($name, $status_array, $selected, $parameters);
}
 function display_links($query_numrows, $max_rows_per_page, $max_page_links, $current_page_number, $parameters = '', $page_name = 'page')
 {
     global $PHP_SELF;
     if (xtc_not_null($parameters) && substr($parameters, -1) != '&') {
         $parameters .= '&';
     }
     // calculate number of pages needing links
     $num_pages = ceil($query_numrows / $max_rows_per_page);
     $pages_array = array();
     for ($i = 1; $i <= $num_pages; $i++) {
         $pages_array[] = array('id' => $i, 'text' => $i);
     }
     if ($num_pages > 1) {
         $display_links = xtc_draw_form('pages', basename($PHP_SELF), '', 'get');
         if ($current_page_number > 1) {
             //$display_links .= '<a href="' . xtc_href_link(basename($PHP_SELF), $parameters . $page_name . '=1') . '" class="splitPageLink">' . PREVNEXT_BUTTON_FIRST . ' </a>&nbsp;';
             $display_links .= '<a href="' . xtc_href_link(basename($PHP_SELF), $parameters . $page_name . '=' . ($current_page_number - 1)) . '" class="splitPageLink">' . PREVNEXT_BUTTON_PREV . '</a>&nbsp;&nbsp;';
         } else {
             $display_links .= PREVNEXT_BUTTON_PREV . '&nbsp;&nbsp;';
         }
         $display_links .= sprintf(TEXT_RESULT_PAGE, xtc_draw_pull_down_menu($page_name, $pages_array, $current_page_number, 'onChange="this.form.submit();"'), $num_pages);
         if ($current_page_number < $num_pages && $num_pages != 1) {
             $display_links .= '&nbsp;&nbsp;<a href="' . xtc_href_link(basename($PHP_SELF), $parameters . $page_name . '=' . ($current_page_number + 1)) . '" class="splitPageLink">' . PREVNEXT_BUTTON_NEXT . '</a>';
             //$display_links .= '&nbsp;<a href="' . xtc_href_link(basename($PHP_SELF), $parameters . $page_name . '=' . $num_pages) . '" class="splitPageLink">' . PREVNEXT_BUTTON_LAST . '</a>';
         } else {
             $display_links .= '&nbsp;&nbsp;' . PREVNEXT_BUTTON_NEXT;
         }
         if ($parameters != '') {
             if (substr($parameters, -1) == '&') {
                 $parameters = substr($parameters, 0, -1);
             }
             $pairs = explode('&', $parameters);
             while (list(, $pair) = each($pairs)) {
                 list($key, $value) = explode('=', $pair);
                 $display_links .= xtc_draw_hidden_field(rawurldecode($key), rawurldecode($value));
             }
         }
         if (SID) {
             $display_links .= xtc_draw_hidden_field(session_name(), session_id());
         }
         $display_links .= '</form>';
     } else {
         $display_links = sprintf(TEXT_RESULT_PAGE, $num_pages, $num_pages);
     }
     return $display_links;
 }
/**
 * affiliate_period()
 *
 * @param $start_year
 * @param $start_month
 * @param boolean $return_dropdown
 * @param string $selected_period
 * @return
 **/
function affiliate_period($name, $start_year, $start_month, $return_dropdown = TRUE, $selected_period = '', $parameters)
{
    $return_array = array(array('id' => '', 'text' => TEXT_AFFILIATE_ALL_PERIODS));
    for ($period_year = $start_year; $period_year <= date("Y"); $period_year++) {
        for ($period_month = 1; $period_month <= 12; $period_month++) {
            if ($period_year == $start_year && $period_month < $start_month) {
                continue;
            }
            if ($period_year == date("Y") && $period_month > date("m")) {
                continue;
            }
            $return_array[] = array('id' => $period_year . '-' . $period_month, 'text' => $period_year . '-' . $period_month);
        }
    }
    if ($return_dropdown) {
        return xtc_draw_pull_down_menu($name, $return_array, $selected_period, $parameters);
    }
}
function xtc_get_country_list($name, $selected = '', $parameters = '')
{
    //    $countries_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT));
    //    Probleme mit register_globals=off -> erstmal nur auskommentiert. Kann u.U. gelöscht werden.
    $countries = xtc_get_countriesList();
    $countries_top_qry = xtc_db_query("select countries_id, countries_name from " . TABLE_COUNTRIES . " where top = '1' order by countries_name");
    while ($countries_values = xtc_db_fetch_array($countries_top_qry)) {
        $countries_array_top[] = array('countries_id' => $countries_values['countries_id'], 'countries_name' => $countries_values['countries_name']);
    }
    for ($i = 0, $n = sizeof($countries_array_top); $i < $n; $i++) {
        $countries_array[] = array('id' => $countries_array_top[$i]['countries_id'], 'text' => $countries_array_top[$i]['countries_name']);
    }
    $countries_array[] = array('id' => '', 'text' => '----------------', 'disabled' => 'disabled');
    for ($i = 0, $n = sizeof($countries); $i < $n; $i++) {
        $countries_array[] = array('id' => $countries[$i]['countries_id'], 'text' => $countries[$i]['countries_name']);
    }
    if (is_array($name)) {
        return xtc_draw_pull_down_menuNote($name, $countries_array, $selected, $parameters);
    }
    return xtc_draw_pull_down_menu($name, $countries_array, $selected, $parameters);
}
 public function getDisplayShip($ship, $missing_text, $wrongShippingFormat)
 {
     $active_array[] = array('id' => '1', 'text' => 'ja');
     $active_array[] = array('id' => '0', 'text' => 'nein');
     $country_array[] = array('id' => '3', 'text' => 'Pauschal');
     $country_array[] = array('id' => '1', 'text' => 'Gewicht');
     $country_array[] = array('id' => '2', 'text' => 'Preis');
     return SHIPPING_TEXT_01 . ' ' . $ship['country'] . '?<br>' . xtc_draw_pull_down_menu('shipping_' . $ship['country'] . '_active', $active_array, $ship['active']) . '<br>' . SHIPPING_TEXT_02 . '<br>' . $wrongShippingFormat . '<br>' . xtc_draw_input_field('shipping_' . $ship['country'] . '_costs', $ship['costs']) . SHIPPING_TEXT_03 . '<br>' . $missing_text . '<br>' . SHIPPING_TEXT_04 . '<br>' . xtc_draw_input_field('shipping_' . $ship['country'] . '_free', $ship['free']) . SHIPPING_TEXT_05 . '<br>' . SHIPPING_TEXT_06 . '<br>' . xtc_draw_pull_down_menu('shipping_' . $ship['country'] . '_type', $country_array, $ship['type']) . '<br><br>';
 }
if ($_GET['action'] == 'list') {
    switch ($_GET['saction']) {
        case 'new':
            $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_NEW_SUB_ZONE . '</b>');
            $contents = array('form' => xtc_draw_form('zones', FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $_GET['sID'] . '&saction=insert_sub'));
            $contents[] = array('text' => TEXT_INFO_NEW_SUB_ZONE_INTRO);
            $contents[] = array('text' => '<br />' . TEXT_INFO_COUNTRY . '<br />' . xtc_draw_pull_down_menu('zone_country_id', xtc_get_countries(TEXT_ALL_COUNTRIES), '', 'onChange="update_zone(this.form);"'));
            $contents[] = array('text' => '<br />' . TEXT_INFO_COUNTRY_ZONE . '<br />' . xtc_draw_pull_down_menu('zone_id', xtc_prepare_country_zones_pull_down()));
            $contents[] = array('align' => 'center', 'text' => '<br /><input type="submit" class="btn btn-default" onclick="this.blur();" value="' . BUTTON_INSERT . '"/> <a class="btn btn-default" onclick="this.blur();" href="' . xtc_href_link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $_GET['sID']) . '">' . BUTTON_CANCEL . '</a>');
            break;
        case 'edit':
            $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_EDIT_SUB_ZONE . '</b>');
            $contents = array('form' => xtc_draw_form('zones', FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $sInfo->association_id . '&saction=save_sub'));
            $contents[] = array('text' => TEXT_INFO_EDIT_SUB_ZONE_INTRO);
            $contents[] = array('text' => '<br />' . TEXT_INFO_COUNTRY . '<br />' . xtc_draw_pull_down_menu('zone_country_id', xtc_get_countries(TEXT_ALL_COUNTRIES), $sInfo->zone_country_id, 'onChange="update_zone(this.form);"'));
            $contents[] = array('text' => '<br />' . TEXT_INFO_COUNTRY_ZONE . '<br />' . xtc_draw_pull_down_menu('zone_id', xtc_prepare_country_zones_pull_down($sInfo->zone_country_id), $sInfo->zone_id));
            $contents[] = array('align' => 'center', 'text' => '<br /><input type="submit" class="btn btn-default" onclick="this.blur();" value="' . BUTTON_UPDATE . '"/> <a class="btn btn-default" onclick="this.blur();" href="' . xtc_href_link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $sInfo->association_id) . '">' . BUTTON_CANCEL . '</a>');
            break;
        case 'delete':
            $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_SUB_ZONE . '</b>');
            $contents = array('form' => xtc_draw_form('zones', FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $sInfo->association_id . '&saction=deleteconfirm_sub'));
            $contents[] = array('text' => TEXT_INFO_DELETE_SUB_ZONE_INTRO);
            $contents[] = array('text' => '<br /><b>' . $sInfo->countries_name . '</b>');
            $contents[] = array('align' => 'center', 'text' => '<br /><input type="submit" class="btn btn-default" onclick="this.blur();" value="' . BUTTON_DELETE . '"/> <a class="btn btn-default" onclick="this.blur();" href="' . xtc_href_link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $sInfo->association_id) . '">' . BUTTON_CANCEL . '</a>');
            break;
        default:
            if (is_object($sInfo)) {
                $heading[] = array('text' => '<b>' . $sInfo->countries_name . '</b>');
                $contents[] = array('align' => 'center', 'text' => '<a class="btn btn-default" onclick="this.blur();" href="' . xtc_href_link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $sInfo->association_id . '&saction=edit') . '#edit-box">' . BUTTON_EDIT . '</a> <a class="btn btn-default" onclick="this.blur();" href="' . xtc_href_link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $_GET['spage'] . '&sID=' . $sInfo->association_id . '&saction=delete') . '#edit-box">' . BUTTON_DELETE . '</a>');
                $contents[] = array('text' => '<br />' . TEXT_INFO_DATE_ADDED . ' ' . xtc_date_short($sInfo->date_added));
                if (xtc_not_null($sInfo->last_modified)) {
            <div class='col-xs-12 hidden-sm hidden-md hidden-lg'><hr></div>
            <div class="col-xs-12 col-sm-4"> <?php 
    echo REPORT_STATUS_FILTER;
    ?>
<br /> 
                    <?php 
    echo xtc_draw_pull_down_menu('status', array_merge(array(array('id' => '0', 'text' => REPORT_ALL)), $orders_statuses), $_GET['status']);
    ?>
 
                    
                    <br /><?php 
    echo REPORT_CAMPAIGN_FILTER;
    ?>
<br /> 
<?php 
    echo xtc_draw_pull_down_menu('campaign', array_merge(array(array('id' => '0', 'text' => REPORT_ALL)), $campaigns), $_GET['campaign']);
    ?>
 
                    

                

                </div> 
            <div class='col-xs-12 hidden-sm hidden-md hidden-lg'><hr></div>
                  <div class="col-xs-12 text-right">
                  <?php 
    echo '<input type="submit" class="btn btn-default" onclick="this.blur();" value="' . BUTTON_UPDATE . '"/>';
    ?>
                  </div>
            </div>
<?php 
    ?>
</td>
            <td align="right"><table border="0" width="100%" cellspacing="0" cellpadding="0">
              <tr><?php 
    echo xtc_draw_form('orders', FILENAME_AFFILIATE_PAYMENT, '', 'get');
    ?>
                <td class="smallText" align="right"><?php 
    echo HEADING_TITLE_SEARCH . ' ' . xtc_draw_input_field('sID', '', 'size="12"') . xtc_draw_hidden_field('action', 'edit');
    ?>
</td>
              </form></tr>
              <tr><?php 
    echo xtc_draw_form('status', FILENAME_AFFILIATE_PAYMENT, '', 'get');
    ?>
                <td class="smallText" align="right"><?php 
    echo HEADING_TITLE_STATUS . ' ' . xtc_draw_pull_down_menu('status', array_merge(array(array('id' => '', 'text' => TEXT_ALL_PAYMENTS)), $payments_statuses), '', 'onChange="this.form.submit();"');
    ?>
</td>
              </form></tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
              <tr class="dataTableHeadingRow">
                <td class="dataTableHeadingContent"><?php 
    echo TABLE_HEADING_AFILIATE_NAME;
    ?>
    </td>
    <td class="dataTableContent" align="left">
    <?php 
    echo xtc_draw_input_field('billing_city', $order->billing['city']);
    ?>
    </td>  
</tr>
<tr class="dataTableRow">
    <td class="dataTableContent" align="left">
    <?php 
    echo TEXT_COUNTRY;
    ?>
    </td>
    <td class="dataTableContent" align="left">
    <?php 
    echo xtc_draw_pull_down_menu('billing_country_id', xtc_get_countries('', 1), $billing_countries_id);
    ?>
    </td>
</tr>
</table>

<?php 
    echo '<input type="submit" class="btn btn-default" onclick="this.blur();" value="' . TEXT_SAVE_CUSTOMERS_DATA . '"/>';
    ?>
    <br>
    <hr>
</div>
</form>
<?php 
}
?>
             $contents[] = array('text' => '<br/>');
             $contents[] = array('align' => 'left', 'text' => '<a class="btn btn-default" onclick="this.blur();" href="' . xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array('cID', 'action', 'edit')) . 'cID=' . $cInfo->customers_id . '&action=edit&edit=' . $addresses['address_book_id']) . '">' . BUTTON_EDIT . '</a>&nbsp;<a class="btn btn-default" onclick="this.blur();" href="' . xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array('cID', 'action', 'delete', 'edit')) . 'cID=' . $cInfo->customers_id . '&action=address_book&delete=' . $addresses['address_book_id']) . '">' . BUTTON_DELETE . '</a>' . ($cInfo->customers_default_address_id != $addresses['address_book_id'] ? '&nbsp;<a class="btn btn-default" onclick="this.blur();" href="' . xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array('cID', 'action', 'delete', 'default')) . 'cID=' . $cInfo->customers_id . '&action=update_default_adressbook&default=' . $addresses['address_book_id']) . '">' . TEXT_SET_DEFAULT . '</a>' : ''));
             $contents[] = array('text' => '<hr size="1"/>');
         }
     }
     if (!isset($_GET['delete'])) {
         $contents[] = array('align' => 'right', 'text' => xtc_count_customer_address_book_entries() < MAX_ADDRESS_BOOK_ENTRIES ? '<a class="btn btn-default" onclick="this.blur();" href="' . xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array('cID', 'action', 'edit')) . 'cID=' . $cInfo->customers_id . '&action=edit&edit=0') . '">' . BUTTON_INSERT . '</a>&nbsp;<a class="btn btn-default" href="' . xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array('cID', 'action', 'delete')) . 'cID=' . $cInfo->customers_id) . '">' . BUTTON_CANCEL . '</a>' : '<a class="btn btn-default" href="' . xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array('cID', 'action', 'delete')) . 'cID=' . $cInfo->customers_id) . '">' . BUTTON_CANCEL . '</a>');
         $contents[] = array('text' => '<br/>');
     }
     break;
 case 'editstatus':
     if ($_GET['cID'] != 1) {
         $customers_history_query = xtc_db_query("SELECT new_value, old_value, date_added, customer_notified FROM " . TABLE_CUSTOMERS_STATUS_HISTORY . " WHERE customers_id = '" . xtc_db_input($_GET['cID']) . "' order by customers_status_history_id desc");
         $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_STATUS_CUSTOMER . '</b>');
         $contents = array('form' => xtc_draw_form('customers', FILENAME_CUSTOMERS, xtc_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=statusconfirm'));
         $contents[] = array('text' => '<br />' . xtc_draw_pull_down_menu('status', $customers_statuses_array, $cInfo->customers_status));
         $contents[] = array('text' => '<table nowrap border="0" cellspacing="0" cellpadding="0"><tr><td style="border-bottom: 1px solid; border-color: #000000;" nowrap class="smallText" align="center"><b>' . TABLE_HEADING_NEW_VALUE . ' </b></td><td style="border-bottom: 1px solid; border-color: #000000;" nowrap class="smallText" align="center"><b>' . TABLE_HEADING_DATE_ADDED . '</b></td></tr>');
         if (xtc_db_num_rows($customers_history_query)) {
             while ($customers_history = xtc_db_fetch_array($customers_history_query)) {
                 $contents[] = array('text' => '<tr>' . "\n" . '<td class="smallText">' . $customers_statuses_id_array[$customers_history['new_value']]['text'] . '</td>' . "\n" . '<td class="smallText" align="center">' . xtc_datetime_short($customers_history['date_added']) . '</td>' . "\n" . '<td class="smallText" align="center">');
                 // web28 - 2011-10-31 - change  $customers_statuses_array  to $customers_statuses_id_array
                 $contents[] = array('text' => '</tr>' . "\n");
             }
         } else {
             $contents[] = array('text' => '<tr>' . "\n" . ' <td class="smallText" colspan="2">' . TEXT_NO_CUSTOMER_HISTORY . '</td>' . "\n" . ' </tr>' . "\n");
         }
         $contents[] = array('text' => '</table>');
         $contents[] = array('align' => 'center', 'text' => '<br /><input type="submit" class="btn btn-default" value="' . BUTTON_UPDATE . '"><a class="btn btn-default" href="' . xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id) . '">' . BUTTON_CANCEL . '</a>');
         $status = isset($_POST['status']) ? xtc_db_prepare_input($_POST['status']) : '';
         // maybe this line not needed to recheck...
     }
   (c) 2002-2003 osCommerce(new_attributes_change); www.oscommerce.com
   (c) 2003	 nextcommerce (new_attributes_change.php,v 1.8 2003/08/14); www.nextcommerce.org
   (c) 2006  xt-commerce(new_attributes_select.php 901 2005-04-29); www.xt-commerce.com

   Released under the GNU General Public License
   
   products_attribtues_options (c) www.rpa-com.de
   --------------------------------------------------------------*/
defined('_VALID_XTC') or die('Direct Access to this location is not allowed.');
if ($_GET['action'] != 'delete_product_option') {
    $options_dropdown_order = '';
    $options = array();
    $options[] = array('id' => 'products_options_id', 'text' => TEXT_OPTION_ID);
    $options[] = array('id' => 'products_options_name', 'text' => TEXT_OPTION_NAME);
    $options[] = array('id' => 'products_options_sortorder', 'text' => TEXT_SORTORDER);
    $options_dropdown_order = xtc_draw_pull_down_menu('selected', $options, $_GET['option_order_by'], 'onchange="go_option()" ') . "\n";
    //BOF Sortierung nach...
    if ($_GET['option_order_by']) {
        $option_order_by = $_GET['option_order_by'];
    } else {
        $option_order_by = 'products_options_id';
    }
    //BOF Seitenschaltung
    $option_page = (int) $_GET['option_page'];
    if (defined('MAX_ROW_LISTS_ATTR_OPTIONS')) {
        $per_page = (int) MAX_ROW_LISTS_ATTR_OPTIONS;
    } else {
        $per_page = (int) MAX_ROW_LISTS_OPTIONS;
        //aus Sprachdatei (veraltet)
    }
    if (isset($_GET['searchoption'])) {
foreach (glob(DIR_WS_INCLUDES . "widgets/*/*.xml") as $widget) {
    $widget_conf = simplexml_load_file($widget);
    $widgets_query = xtc_db_query("SELECT *\r\n                            FROM " . TABLE_WIDGETS . "\r\n                            WHERE customer_id = '" . $customer_id . "'\r\n                            AND widgets_path = '" . $widget . "'");
    $widget_result = xtc_db_fetch_array($widgets_query);
    $widgets_array[] = $widget_result;
    $status = WIDGET_STATUS_NOT_ACTIVE_TEXT;
    if ($widget_result['widgets_active']) {
        $status = WIDGET_STATUS_ACTIVE_TEXT;
    }
    $widgets_dropdown[] = array('id' => $widget_result['widgets_id'], 'text' => $widget_conf->name . "(" . $status . ")");
    $widgets_id[] = $widget_result['widgets_id'];
}
$parameters = 'onchange="this.form.submit()"';
echo xtc_draw_form('widget_status', FILENAME_START, '');
echo xtc_draw_hidden_field('action', 'widget_active');
echo '<div class="pull-right">' . xtc_draw_pull_down_menu('widgets', $widgets_dropdown, $selected, $parameters) . '</div>';
echo '</form>';
echo xtc_draw_form('save_widgets_positions', FILENAME_START, '');
echo xtc_draw_hidden_field('action', 'widget_save_position');
echo '<div class="pull-right"><button class="btn btn-default" type="submit" id="submit_position">&nbsp;<span class="glyphicon glyphicon-th"></span>&nbsp;</button></div>';
?>
    
<h1 id="1"><?php 
echo HEADING_TITLE;
?>
</h1>

<div class="grid-stack">
<?php 
#MN: Load all widgets
foreach ($widgets_array as $widget) {
/**
 * xtc_cfg_pull_down_customers_status_list()
 *
 * @param mixed $customers_status_id
 * @param string $key
 * @return
 */
function xtc_cfg_pull_down_customers_status_list($customers_status_id, $key = '')
{
    $name = $key ? 'configuration[' . $key . ']' : 'configuration_value';
    return xtc_draw_pull_down_menu($name, xtc_get_customers_statuses(), $customers_status_id);
}
             } else {
                 $cat_tree = xtc_get_category_tree();
             }
             $tree = '';
             for ($i = 0; $n = sizeof($cat_tree), $i < $n; $i++) {
                 $tree .= '<input type="checkbox" name="dest_cat_ids[]" value="' . $cat_tree[$i]['id'] . '"><font size="1">' . $cat_tree[$i]['text'] . '</font><br />';
             }
             $contents[] = array('text' => $tree . '<br /><hr noshade>');
             $contents[] = array('text' => '<b>' . TEXT_SINGLECOPY . '</b><br />' . TEXT_SINGLECOPY_DESC);
         }
         if (is_array($_POST['multi_products'])) {
             $category_tree = xtc_get_category_tree('0', '', '0');
         } else {
             $category_tree = xtc_get_category_tree();
         }
         $contents[] = array('text' => '<br />' . TEXT_SINGLECOPY_CATEGORY . '<br />' . xtc_draw_pull_down_menu('dest_category_id', $category_tree, $current_category_id) . '<br /><hr noshade>');
         $contents[] = array('text' => '<strong>' . TEXT_HOW_TO_COPY . '</strong><br />' . xtc_draw_radio_field('copy_as', 'link', true) . ' ' . TEXT_COPY_AS_LINK . '<br />' . xtc_draw_radio_field('copy_as', 'duplicate') . ' ' . TEXT_COPY_AS_DUPLICATE . '<br /><hr noshade>');
         $contents[] = array('text' => '<br />' . TEXT_HOW_TO_LINK . '<br />' . '<input type="checkbox" name="link_to_product" value="link_to_product" checked="checked"><font size="1">' . TEXT_HOW_TO_LINK_INFO . '</font><br /><hr noshade>');
         $contents[] = array('text' => '<strong>' . TEXT_ATTRIBUTE_COPY . '</strong><br />' . '<input type="checkbox" name="attr_copy" value="attr_copy"><font size="1">' . TEXT_ATTRIBUTE_COPY_INFO . '</font><br /><hr noshade>');
         $contents[] = array('align' => 'center', 'text' => '<input class="btn btn-default" type="submit" name="multi_copy_confirm" value="' . BUTTON_COPY . '"> <a class="btn btn-default" href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&cID=' . $cInfo->categories_id) . '">' . BUTTON_CANCEL . '</a>');
         //close multi-action form
         $contents[] = array('text' => '</form>');
     }
     // multi_copy confirm ENDS
     break;
 default:
     if ($rows > 0) {
         if (isset($cInfo) && is_object($cInfo)) {
             // category info box contents
             $heading[] = array('align' => 'center', 'text' => '<b>' . $cInfo->categories_name . '</b>');
             //Multi Element Actions
            for ($i = 0, $n = count($list); $i < $n; $i++) {
                $profile_array[] = array('id' => $list[$i]['id'], 'text' => $list[$i]['name']);
            }
        }
        for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
            ?>
                  <tr>
                    <td class="dataTableConfig col-left"><div style="float:left;margin-right:5px;"><?php 
            echo xtc_image(DIR_WS_LANGUAGES . $languages[$i]['directory'] . '/admin/images/' . $languages[$i]['image']);
            ?>
</div><?php 
            echo TEXT_PAYPAL_MODULE_PROFILE;
            ?>
</td>
                    <td class="dataTableConfig col-middle"><?php 
            echo xtc_draw_pull_down_menu('config[profile][PAYPAL_' . strtoupper($module->code . '_' . $languages[$i]['code']) . '_PROFILE]', $profile_array, $paypal->get_config('PAYPAL_' . strtoupper($module->code . '_' . $languages[$i]['code']) . '_PROFILE'));
            ?>
</td>
                    <td class="dataTableConfig col-right"></td>
                  </tr>
                  <?php 
        }
        if ($module->code == 'paypalplus') {
            ?>
                    <tr>
                      <td class="dataTableConfig col-left"><?php 
            echo TEXT_PAYPAL_MODULE_USE_TABS;
            ?>
</td>
                      <td class="dataTableConfig col-middle"><?php 
            echo draw_on_off_selection('config[profile][MODULE_PAYMENT_PAYPALPLUS_USE_TABS]', $status_array, $paypal->get_config('MODULE_PAYMENT_PAYPALPLUS_USE_TABS'));
function shopDrawPulldownMenu($name, $values, $default)
{
    return xtc_draw_pull_down_menu($name, $values, $default);
}
                    <td class="dataTableConfig col-middle"><?php 
    echo xtc_draw_pull_down_menu('config[presentation][locale_code]', $locale_code_array, strtoupper(DEFAULT_LANGUAGE));
    ?>
</td>
                    <td class="dataTableConfig col-right"><?php 
    echo TEXT_PAYPAL_PROFILE_LOCALE_INFO;
    ?>
</td>
                  </tr>
                  <tr>
                    <td class="dataTableConfig col-left"><?php 
    echo TEXT_PAYPAL_PROFILE_PAGE;
    ?>
</td>
                    <td class="dataTableConfig col-middle"><?php 
    echo xtc_draw_pull_down_menu('config[flow_config][landing_page_type]', $landingpage_array, '');
    ?>
</td>
                    <td class="dataTableConfig col-right"><?php 
    echo TEXT_PAYPAL_PROFILE_PAGE_INFO;
    ?>
</td>
                  </tr>
                  <tr>
                    <td class="dataTableConfig col-left"><?php 
    echo TEXT_PAYPAL_PROFILE_ADDRESS;
    ?>
</td>
                    <td class="dataTableConfig col-middle"><?php 
    echo draw_on_off_selection('config[input_fields][address_override]', $status_array, false);
    ?>
Exemple #19
0
              <?php 
    echo xtc_draw_form('orders', FILENAME_ORDERS, '', 'get');
    ?>
                <?php 
    echo HEADING_TITLE_SEARCH . ' ' . xtc_draw_input_field('oID', '', 'size="12"') . xtc_draw_hidden_field('action', 'edit') . xtc_draw_hidden_field(xtc_session_name(), xtc_session_id());
    ?>
              </form>
</td>
  </tr>
  <tr>
    <td class="main" valign="top">Customers</td>
    <td class="main" valign="top" align="right"><?php 
    echo xtc_draw_form('status', FILENAME_ORDERS, '', 'get');
    ?>
                <?php 
    echo HEADING_TITLE_STATUS . ' ' . xtc_draw_pull_down_menu('status', array_merge(array(array('id' => '', 'text' => TEXT_ALL_ORDERS)), array(array('id' => '0', 'text' => TEXT_VALIDATING)), $orders_statuses), '', 'onChange="this.form.submit();"') . xtc_draw_hidden_field(xtc_session_name(), xtc_session_id());
    ?>
              </form></td>
  </tr>
</table>




        </td>
      </tr>
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
              <tr class="dataTableHeadingRow">
                if (count($files) == 0) {
                    $files = $default_array;
                } else {
                    $files = array_merge($default_array, $files);
                }
            } else {
                $default_array[] = array('id' => 'default', 'text' => TEXT_NO_FILE);
                $default_value = $content['content_file'];
                if (count($files) == 0) {
                    $files = $default_array;
                } else {
                    $files = array_merge($default_array, $files);
                }
            }
            echo '<br />' . TEXT_CHOOSE_FILE_SERVER . '</br>';
            echo xtc_draw_pull_down_menu('select_file', $files, $default_value);
            if (!empty($content['content_file'])) {
                echo TEXT_CURRENT_FILE . ' <b>' . $content['content_file'] . '</b><br />';
            }
            ?>
                                    </div>
                                  </div>
                                  <div class="col-xs-12">
                                    <div class="col-sm-2 col-xs-12"  valign="top"></div>
                                    <div class="col-sm-10 col-xs-12" colspan="90%" valign="top"><br /><?php 
            echo TEXT_FILE_DESCRIPTION;
            ?>
</div>
                                  </div>
                                  <div class="col-xs-12">
                                    <div class="col-sm-2 col-xs-12"  valign="top"><?php 
                <?php 
} elseif (isset($_GET['action']) && $_GET['action'] == 'new') {
    $list = $paypal->available_webhooks();
    if (is_array($list) && count($list) > 0) {
        echo xtc_draw_form('config', basename($PHP_SELF), xtc_get_all_get_params(array('action')) . 'action=insert');
        for ($i = 0, $t = count($list); $i < $t; $i++) {
            ?>
                    <tr>
                      <td class="dataTableConfig col-left"><?php 
            echo $list[$i]['name'];
            ?>
</td>
                      <td class="dataTableConfig col-middle">
                        <?php 
            echo xtc_draw_checkbox_field('config[data][' . $i . '][name]', $list[$i]['name'], 'checked="checked"');
            echo xtc_draw_pull_down_menu('config[data][' . $i . '][orders_status]', $orders_statuses, '-1', 'style="width: 300px;"');
            ?>
                      </td>
                      <td class="dataTableConfig col-right"><?php 
            echo $list[$i]['description'];
            ?>
</td>
                    </tr>
                    <?php 
        }
        ?>
                  <tr>
                    <td class="txta-r" colspan="3" style="border:none;">
                      <a class="button" href="<?php 
        echo xtc_href_link(basename($PHP_SELF));
        ?>
  </tr>
';
        unset($hidden_fields[$field_name]);
    } else {
        $post_data .= '
  <tr>' . $text_start . TEXT_COUNTRY . $text_end . $field_start_2 . xtc_get_country_list($country_text, $country, 'onchange=" country_drop_down_change(this,\'' . CURRENT_SCRIPT . '\')"') . HTML_BR . $required_start . TEXT_COUNTRY_LONG . $font_strong_end . xtc_draw_hidden_field_installer($country_1_text) . '</td>
  </tr>
  <tr>' . $text_start . TEXT_STATE . $text_end . $field_start_2;
        if ($entry_state_has_zones) {
            $zones_array = array();
            $zones_query = xtc_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . $country . "' order by zone_name");
            while ($zones_values = xtc_db_fetch_array($zones_query)) {
                $zone_name = $zones_values['zone_name'];
                $zones_array[] = array('id' => $zone_name, 'text' => $zone_name);
            }
            $post_data .= xtc_draw_pull_down_menu($state_text, $zones_array, $country);
        } else {
            $post_data .= xtc_draw_input_field_installer($state_text, EMPTY_STRING, $text_text, $size40);
        }
        $post_data .= $required_start . $text_end . '
	</tr>
';
    }
}
unset($hidden_fields[$country_text]);
unset($hidden_fields[$country_1_text]);
unset($hidden_fields[$state_text]);
$headline = str_replace(HASH, TITLE_SHOP_CONFIG, $headline0);
$headline = str_replace(ATSIGN, TITLE_SHOP_CONFIG_NOTE, $headline);
$post_data .= $headline;
for ($i = 0; $i < $old_fields_1_count; $i++) {
<td class="dataTableHeadingContent"><?php 
echo MODULE_PAYMENT_BILLSAFE_2_UPDATEARTICLELISTVOUCHER;
?>
</td>
</tr><tr class="dataTableRow">
<td class="dataTableContent" align="right" valign="top">
<form id="voucher" method="POST" action="<?php 
echo $post_url;
?>
">
<input id="voucherAmount" type="text" style="float:none;" maxlength="4" name="voucherAmount" size="4" value="" />,<input style="float:none;" id="voucherAmountKomma" type="text" maxlength="2" name="voucherAmountKomma" size="2" value="" />&nbsp;<?php 
echo $currency;
?>
,&nbsp;<?php 
echo MODULE_PAYMENT_BILLSAFE_2_TAX . ': ';
echo xtc_draw_pull_down_menu('voucherTax', $tax_class_array, $tax_class_id);
?>
<br /><br />
<input type="submit" name="updateArticleListVoucher" value="<?php 
echo MODULE_PAYMENT_BILLSAFE_2_UPDATEARTICLELISTVOUCHER;
?>
" />
</form></td></tr></table></div>
<div class='col-xs-12 col-sm-3'><a class="btn btn-default" href="Javascript:void()" onclick="window.open('<?php 
echo xtc_href_link('billsafe_print_order_2.php', 'oID=' . $order_id);
?>
', 'popup', 'toolbar=0, width=640, height=600')"><?php 
echo BUTTON_INVOICE;
?>
</a><br /><br />
    <a class="btn btn-default" href="https://client.billsafe.de" target="_blank"><?php 
            if (isset($_GET['manufacturers_id'])) {
                $manufacturer_dropdown .= xtc_draw_hidden_field('manufacturers_id', (int) $_GET['manufacturers_id']) . PHP_EOL;
                $options = array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES));
                // DokuMan - 2012-03-27 - added missing "id" for xtc_draw_pull_down_menu
            } else {
                $manufacturer_dropdown .= xtc_draw_hidden_field('cat', $current_category_id) . PHP_EOL;
                $options = array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS));
                // DokuMan - 2012-03-27 - added missing "id" for xtc_draw_pull_down_menu
            }
            if (isset($_GET['sort']) && !empty($_GET['sort'])) {
                $manufacturer_dropdown .= xtc_draw_hidden_field('sort', $_GET['sort']) . PHP_EOL;
            }
            while ($filterlist = xtc_db_fetch_array($filterlist_query, true)) {
                $options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']);
            }
            $manufacturer_dropdown .= xtc_draw_pull_down_menu('filter_id', $options, isset($_GET['filter_id']) ? (int) $_GET['filter_id'] : '', 'onchange="this.form.submit()"') . PHP_EOL;
            $manufacturer_dropdown .= '<noscript><input type="submit" value="' . SMALL_IMAGE_BUTTON_VIEW . '" id="filter_submit" /></noscript>' . PHP_EOL;
            $manufacturer_dropdown .= xtc_hide_session_id() . PHP_EOL;
            //Session ID nur anhängen, wenn Cookies deaktiviert sind
            $manufacturer_dropdown .= '</form>' . PHP_EOL;
        }
    }
    include DIR_WS_MODULES . FILENAME_PRODUCT_LISTING;
    /**
     * default content page
     *
     */
} else {
    $shop_content_data = $main->getContentData(5);
    $default_smarty->assign('title', $shop_content_data['content_heading']);
    include DIR_WS_INCLUDES . FILENAME_CENTER_MODULES;
function tr_dropdown($fieldname, $text_arr, $value_arr, $default_value = '')
{
    ?>
    <tr align="left">
      <th width="15%" class="BilldataTableContent"><?php 
    echo $text_arr['question'];
    ?>
</th>
      <td colspan="3" class="BilldataTableContent">
<?php 
    echo xtc_draw_pull_down_menu($fieldname, $value_arr, $default_value);
    ?>
      </td>
    </tr>
<?php 
}
    ?>
                  <?php 
    echo HEADING_TITLE_SEARCH . ' ' . xtc_draw_input_field('oID', '', 'size="12"') . xtc_draw_hidden_field('action', 'edit') . xtc_draw_hidden_field(xtc_session_name(), xtc_session_id());
    ?>
                  </form>
                    </div>
                    <div class='col-xs-12'>
                  <?php 
    echo xtc_draw_form('payment_method_status', FILENAME_ORDERS, '', 'get');
    ?>
                  <?php 
    echo HEADING_TITLE_STATUS . ' ' . xtc_draw_pull_down_menu('status', array_merge(array(array('id' => '', 'text' => TEXT_ALL_ORDERS)), array(array('id' => '0', 'text' => TEXT_VALIDATING)), $orders_statuses), isset($_GET['status']) && xtc_not_null($_GET['status']) ? (int) $_GET['status'] : '', 'onchange="this.form.submit();"');
    ?>
 <br />
                  <?php 
    echo HEADING_CHOOSE_PAYMENT . ' ' . xtc_draw_pull_down_menu('payment_method', array_merge(array(array('id' => '', 'text' => TEXT_ALL_PAYMENT_METHODS)), $payment_methods), isset($_GET['payment_method']) && xtc_not_null($_GET['payment_method']) ? $_GET['payment_method'] : '', 'onchange="this.form.submit();"') . xtc_draw_hidden_field(xtc_session_name(), xtc_session_id());
    ?>
                  </form>
                    </div>
                </div>
            </div>
<div class='col-xs-12'><br></div>
            <div class='col-xs-12'>
                <div id='responsive_table' class='table-responsive pull-left col-sm-12'>
                <table class="table table-bordered table-striped">
                    <tr class="dataTableHeadingRow">
                      <td class="dataTableHeadingContent"><?php 
    echo TABLE_HEADING_CUSTOMERS;
    ?>
</td>
                      <td class="dataTableHeadingContent" align="right"><?php 
 function display()
 {
     $interval_array = array(array('id' => '86400', 'text' => '24 Stunden'), array('id' => '43200', 'text' => '12 Stunden'), array('id' => '21600', 'text' => '6 Stunden'), array('id' => '10800', 'text' => '3 Stunden'), array('id' => '3600', 'text' => '1 Stunden'));
     return array('text' => '<br/><b>' . MODULE_JANOLAW_UPDATE_INTERVAL_TITLE . '</b>
                         <br/>' . MODULE_JANOLAW_UPDATE_INTERVAL_DESC . '<br/>' . xtc_draw_pull_down_menu('configuration[MODULE_JANOLAW_UPDATE_INTERVAL]', $interval_array, MODULE_JANOLAW_UPDATE_INTERVAL) . '<br />' . '<br /><div align="center">' . xtc_button('OK') . xtc_button_link(BUTTON_CANCEL, xtc_href_link(FILENAME_MODULE_EXPORT, 'set=' . $_GET['set'] . '&module=janolaw')) . "</div>");
 }
function xtc_cfg_select_root_category($configuration, $key)
{
    global $category_dropdown;
    $shop_root_category_id = 0;
    $category_dropdown[] = array('id' => $shop_root_category_id, 'text' => MODULE_EM_ROOT_CATEGORY_DEFAULT_TITLE);
    getCategoryTree($shop_root_category_id, 0);
    return xtc_draw_pull_down_menu('configuration[' . $key . ']', $category_dropdown, $configuration);
}
 function display()
 {
     $customers_statuses_array = xtc_get_customers_statuses();
     // build Currency Select
     $curr = '';
     $currencies = xtc_db_query("SELECT code FROM " . TABLE_CURRENCIES);
     while ($currencies_data = xtc_db_fetch_array($currencies)) {
         $curr .= xtc_draw_radio_field('currencies', $currencies_data['code'], true) . $currencies_data['code'] . '<br />';
     }
     $campaign_array = array(array('id' => '', 'text' => TEXT_NONE));
     $campaign_query = xtc_db_query("select campaigns_name, campaigns_refID from " . TABLE_CAMPAIGNS . " order by campaigns_id");
     while ($campaign = xtc_db_fetch_array($campaign_query)) {
         $campaign_array[] = array('id' => 'refID=' . $campaign['campaigns_refID'] . '&', 'text' => $campaign['campaigns_name']);
     }
     return array('text' => EXPORT_STATUS_TYPE . '<br />' . EXPORT_STATUS . '<br />' . xtc_draw_pull_down_menu('status', $customers_statuses_array, '1') . '<br />' . CURRENCY . '<br />' . CURRENCY_DESC . '<br />' . $curr . CAMPAIGNS . '<br />' . CAMPAIGNS_DESC . '<br />' . xtc_draw_pull_down_menu('campaign', $campaign_array) . '<br />' . EXPORT_TYPE . '<br />' . EXPORT . '<br />' . xtc_draw_radio_field('export', 'no', false) . EXPORT_NO . '<br />' . xtc_draw_radio_field('export', 'yes', true) . EXPORT_YES . '<br />' . '<br />' . xtc_button(BUTTON_EXPORT) . xtc_button_link(BUTTON_CANCEL, xtc_href_link(FILENAME_MODULE_EXPORT, 'set=' . $_GET['set'] . '&module=preisauskunft')));
 }
    </div>
  </div>
<?php 
    }
}
W4B_graduated_prices_edit_logic();
?>
  <div class='col-xs-12'>
    <div class='col-sm-6 col-xs-12 main'><?php 
echo TEXT_PRODUCTS_DISCOUNT_ALLOWED;
?>
</div>
    <div class='col-sm-6 col-xs-12 main'><?php 
echo xtc_draw_input_field('products_discount_allowed', $pInfo->products_discount_allowed);
?>
</div>
  </div>
    <div class='col-xs-12'>
        <br>
    </div>
  <div class='col-xs-12'>
    <div class='col-sm-6 col-xs-12 main'><?php 
echo TEXT_PRODUCTS_TAX_CLASS;
?>
</div>
    <div class='col-sm-6 col-xs-12 main'><?php 
echo xtc_draw_pull_down_menu('products_tax_class_id', $tax_class_array, $pInfo->products_tax_class_id);
?>
</div>
  </div>
</div>