/**
 * 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 olc_draw_pull_down_menu($name, $status_array, $selected, $parameters);
}
Example #2
0
function olc_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 = olc_get_countries();
    $countries_array = array();
    for ($i = 0, $n = sizeof($countries); $i < $n; $i++) {
        $countries_array[] = array('id' => $countries[$i]['countries_id'], 'text' => $countries[$i]['countries_name']);
    }
    return olc_draw_pull_down_menu($name, $countries_array, $selected, $parameters);
}
Example #3
0
/**
 * 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 olc_draw_pull_down_menu($name, $status_array, $selected, $parameters);
}
 function selection()
 {
     global $order;
     for ($i = 1; $i < 13; $i++) {
         $expires_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%B', mktime(0, 0, 0, $i, 1, 2000)));
     }
     $today = getdate();
     for ($i = $today['year']; $i < $today['year'] + 10; $i++) {
         $expires_year[] = array('id' => strftime('%y', mktime(0, 0, 0, 1, 1, $i)), 'text' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i)));
     }
     $selection = array('id' => $this->code, 'module' => $this->title, 'fields' => array(array('title' => MODULE_PAYMENT_2CHECKOUT_TEXT_CREDIT_CARD_OWNER_FIRST_NAME, 'field' => olc_draw_input_field('pm_2checkout_cc_owner_firstname', $order->billing['firstname'])), array('title' => MODULE_PAYMENT_2CHECKOUT_TEXT_CREDIT_CARD_OWNER_LAST_NAME, 'field' => olc_draw_input_field('pm_2checkout_cc_owner_lastname', $order->billing['lastname'])), array('title' => MODULE_PAYMENT_2CHECKOUT_TEXT_CREDIT_CARD_NUMBER, 'field' => olc_draw_input_field('pm_2checkout_cc_number')), array('title' => MODULE_PAYMENT_2CHECKOUT_TEXT_CREDIT_CARD_EXPIRES, 'field' => olc_draw_pull_down_menu('pm_2checkout_cc_expires_month', $expires_month) . HTML_NBSP . olc_draw_pull_down_menu('pm_2checkout_cc_expires_year', $expires_year)), array('title' => MODULE_PAYMENT_2CHECKOUT_TEXT_CREDIT_CARD_CHECKNUMBER, 'field' => olc_draw_input_field('pm_2checkout_cc_cvv', EMPTY_STRING, 'size="4" maxlength="3"') . '&nbsp;<small>' . MODULE_PAYMENT_2CHECKOUT_TEXT_CREDIT_CARD_CHECKNUMBER_LOCATION . '</small>')));
     return $selection;
 }
 function selection()
 {
     global $order;
     if (MODULE_PAYMENT_PSIGATE_INPUT_MODE == 'Local') {
         for ($i = 1; $i < 13; $i++) {
             $expires_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%B', mktime(0, 0, 0, $i, 1, 2000)));
         }
         $today = getdate();
         for ($i = $today['year']; $i < $today['year'] + 10; $i++) {
             $expires_year[] = array('id' => strftime('%y', mktime(0, 0, 0, 1, 1, $i)), 'text' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i)));
         }
         $selection = array('id' => $this->code, 'module' => $this->title, 'fields' => array(array('title' => MODULE_PAYMENT_PSIGATE_TEXT_CREDIT_CARD_OWNER, 'field' => $order->billing['firstname'] . BLANK . $order->billing['lastname']), array('title' => MODULE_PAYMENT_PSIGATE_TEXT_CREDIT_CARD_NUMBER, 'field' => olc_draw_input_field('psigate_cc_number')), array('title' => MODULE_PAYMENT_PSIGATE_TEXT_CREDIT_CARD_EXPIRES, 'field' => olc_draw_pull_down_menu('psigate_cc_expires_month', $expires_month) . HTML_NBSP . olc_draw_pull_down_menu('psigate_cc_expires_year', $expires_year))));
     } else {
         $selection = array('id' => $this->code, 'module' => $this->title);
     }
     return $selection;
 }
Example #6
0
/**
 * 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 olc_draw_pull_down_menu($name, $return_array, $selected_period, $parameters);
    }
}
 function display_links($query_numrows, $max_rows_per_page, $max_page_links, $current_page_number, $parameters = '', $page_name = 'page')
 {
     if (olc_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 = olc_draw_form('pages', CURRENT_SCRIPT, '', 'get');
         if ($current_page_number > 1) {
             $display_links .= HTML_A_START . olc_href_link(CURRENT_SCRIPT, $parameters . $page_name . '=' . ($current_page_number - 1), NONSSL) . '" class="splitPageLink">' . PREVNEXT_BUTTON_PREV . '</a>&nbsp;&nbsp;';
         } else {
             $display_links .= PREVNEXT_BUTTON_PREV . '&nbsp;&nbsp;';
         }
         $display_links .= sprintf(TEXT_RESULT_PAGE, olc_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="' . olc_href_link(CURRENT_SCRIPT, $parameters . $page_name . '=' . ($current_page_number + 1), NONSSL) . '" class="splitPageLink">' . PREVNEXT_BUTTON_NEXT . HTML_A_END;
         } 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 .= olc_draw_hidden_field(rawurldecode($key), rawurldecode($value));
             }
         }
         if (SID) {
             $display_links .= olc_draw_hidden_field(session_name(), session_id());
         }
         $display_links .= '</form>';
     } else {
         $display_links = sprintf(TEXT_RESULT_PAGE, $num_pages, $num_pages);
     }
     return $display_links;
 }
     $contents = array('form' => olc_draw_form('countries', FILENAME_COUNTRIES, 'page=' . $_GET['page'] . '&action=insert'));
     $contents[] = array('text' => TEXT_INFO_INSERT_INTRO);
     $contents[] = array('text' => HTML_BR . TEXT_INFO_COUNTRY_NAME . HTML_BR . olc_draw_input_field('countries_name'));
     $contents[] = array('text' => HTML_BR . TEXT_INFO_COUNTRY_CODE_2 . HTML_BR . olc_draw_input_field('countries_iso_code_2'));
     $contents[] = array('text' => HTML_BR . TEXT_INFO_COUNTRY_CODE_3 . HTML_BR . olc_draw_input_field('countries_iso_code_3'));
     $contents[] = array('text' => HTML_BR . TEXT_INFO_ADDRESS_FORMAT . HTML_BR . olc_draw_pull_down_menu('address_format_id', olc_get_address_formats()));
     $contents[] = array('align' => 'center', 'text' => HTML_BR . olc_image_submit('button_insert.gif', IMAGE_INSERT) . '&nbsp;<a href="' . olc_href_link(FILENAME_COUNTRIES, 'page=' . $_GET['page']) . '">' . olc_image_button('button_cancel.gif', IMAGE_CANCEL) . HTML_A_END);
     break;
 case 'edit':
     $heading[] = array('text' => HTML_B_START . TEXT_INFO_HEADING_EDIT_COUNTRY . HTML_B_END);
     $contents = array('form' => olc_draw_form('countries', FILENAME_COUNTRIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->countries_id . '&action=save'));
     $contents[] = array('text' => TEXT_INFO_EDIT_INTRO);
     $contents[] = array('text' => HTML_BR . TEXT_INFO_COUNTRY_NAME . HTML_BR . olc_draw_input_field('countries_name', $cInfo->countries_name));
     $contents[] = array('text' => HTML_BR . TEXT_INFO_COUNTRY_CODE_2 . HTML_BR . olc_draw_input_field('countries_iso_code_2', $cInfo->countries_iso_code_2));
     $contents[] = array('text' => HTML_BR . TEXT_INFO_COUNTRY_CODE_3 . HTML_BR . olc_draw_input_field('countries_iso_code_3', $cInfo->countries_iso_code_3));
     $contents[] = array('text' => HTML_BR . TEXT_INFO_ADDRESS_FORMAT . HTML_BR . olc_draw_pull_down_menu('address_format_id', olc_get_address_formats(), $cInfo->address_format_id));
     $contents[] = array('align' => 'center', 'text' => HTML_BR . olc_image_submit('button_update.gif', IMAGE_UPDATE) . '&nbsp;<a href="' . olc_href_link(FILENAME_COUNTRIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->countries_id) . '">' . olc_image_button('button_cancel.gif', IMAGE_CANCEL) . HTML_A_END);
     break;
 case 'delete':
     $heading[] = array('text' => HTML_B_START . TEXT_INFO_HEADING_DELETE_COUNTRY . HTML_B_END);
     $contents = array('form' => olc_draw_form('countries', FILENAME_COUNTRIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->countries_id . '&action=deleteconfirm'));
     $contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
     $contents[] = array('text' => '<br/><b>' . $cInfo->countries_name . HTML_B_END);
     $contents[] = array('align' => 'center', 'text' => HTML_BR . olc_image_submit('button_delete.gif', IMAGE_UPDATE) . '&nbsp;<a href="' . olc_href_link(FILENAME_COUNTRIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->countries_id) . '">' . olc_image_button('button_cancel.gif', IMAGE_CANCEL) . HTML_A_END);
     break;
 default:
     if (is_object($cInfo)) {
         $heading[] = array('text' => HTML_B_START . $cInfo->countries_name . HTML_B_END);
         $contents[] = array('align' => 'center', 'text' => HTML_A_START . olc_href_link(FILENAME_COUNTRIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->countries_id . '&action=edit') . '">' . olc_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . olc_href_link(FILENAME_COUNTRIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->countries_id . '&action=delete') . '">' . olc_image_button('button_delete.gif', IMAGE_DELETE) . HTML_A_END);
         $contents[] = array('text' => HTML_BR . TEXT_INFO_COUNTRY_NAME . HTML_BR . $cInfo->countries_name);
         $contents[] = array('text' => HTML_BR . TEXT_INFO_COUNTRY_CODE_2 . BLANK . $cInfo->countries_iso_code_2);
?>
</td>
            <td class="main" align="right"><?php 
echo TITLE_TYPE . BLANK . olc_draw_pull_down_menu('type', $type_array, $_GET['type'] ? $_GET['type'] : 'daily', 'onchange="this.form.submit();"');
?>
<noscript><input type="submit" value="GO"></noscript><br/>
<?php 
switch ($_GET['type']) {
    case 'yearly':
        break;
    case 'monthly':
        echo TITLE_YEAR . BLANK . olc_draw_pull_down_menu('year', $years_array, $_GET['year'] ? $_GET['year'] : date('Y'), 'onchange="this.form.submit();"') . '<noscript><input type="submit" value="GO"></noscript>';
        break;
    default:
    case 'daily':
        echo TITLE_MONTH . BLANK . olc_draw_pull_down_menu('month', $months_array, $_GET['month'] ? $_GET['month'] : date('n'), 'onchange="this.form.submit();"') . '<noscript><input type="submit" value="GO"></noscript><br/>' . TITLE_YEAR . BLANK . olc_draw_pull_down_menu('year', $years_array, $_GET['year'] ? $_GET['year'] : date('Y'), 'onchange="this.form.submit();"') . '<noscript><input type="submit" value="GO"></noscript>';
        break;
}
?>
            </td>
          <?php 
echo olc_draw_hidden_field('page', $_GET['page']) . olc_draw_hidden_field('bID', $_GET['bID']);
?>
</form></tr>
        </table></td>
      </tr>
      <tr>
        <td><?php 
echo olc_draw_separator('pixel_trans.gif', '1', '10');
?>
</td>
                $cid_db = $cInfo->customers_id;
            }
            $heading[] = array('text' => HTML_B_START . TEXT_INFO_HEADING_DELETE_CUSTOMER . HTML_B_END);
            $contents = array('form' => olc_draw_form('customers', FILENAME_CUSTOMERS, olc_get_all_get_params(array('cID', 'action')) . 'cID=' . $cid_db . '&action=deleteconfirm'));
            $contents[] = array('text' => TEXT_DELETE_INTRO . '<br/><br/><b>' . $cInfo->customers_firstname . BLANK . $cInfo->customers_lastname . HTML_B_END);
            if ($cInfo->number_of_reviews > 0) {
                $contents[] = array('text' => HTML_BR . olc_draw_checkbox_field('delete_reviews', 'on', true) . BLANK . sprintf(TEXT_DELETE_REVIEWS, $cInfo->number_of_reviews));
            }
            $contents[] = array('align' => 'center', 'text' => HTML_BR . olc_image_submit('button_delete.gif', IMAGE_DELETE) . BLANK . HTML_A_START . olc_href_link(FILENAME_CUSTOMERS, olc_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id) . '">' . olc_image_button('button_cancel.gif', IMAGE_CANCEL) . HTML_A_END);
            break;
        case 'editstatus':
            if ($cId != 1) {
                $customers_history_query = olc_db_query(SELECT . "new_value, old_value, date_added, customer_notified from " . TABLE_CUSTOMERS_STATUS_HISTORY . " where customers_id = '" . $cId_db . "' order by customers_status_history_id desc");
                $heading[] = array('text' => HTML_B_START . TEXT_INFO_HEADING_STATUS_CUSTOMER . HTML_B_END);
                $contents = array('form' => olc_draw_form('customers', FILENAME_CUSTOMERS, olc_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=statusconfirm'));
                $contents[] = array('text' => HTML_BR . olc_draw_pull_down_menu('status', $customers_statuses_array, $cInfo->customers_status));
                $contents[] = array('text' => '
				<table nowrap="nowrap" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td style="border-bottom: 1px solid; border-color: #000000;" nowrap="nowrap" class="smallText" align="center">
						<b>' . TABLE_HEADING_NEW_VALUE . '</b>
					</td>
					<td style="border-bottom: 1px solid; border-color: #000000;" nowrap="nowrap" class="smallText" align="center">
						<b>' . TABLE_HEADING_DATE_ADDED . '</b>
					</td>
			</tr>
			');
                if (olc_db_num_rows($customers_history_query)) {
                    while ($customers_history = olc_db_fetch_array($customers_history_query)) {
                        $contents[] = array('text' => '<tr>' . NEW_LINE . '<td class="smallText">' . $customers_statuses_array[$customers_history['new_value']]['text'] . '</td>' . NEW_LINE . '<td class="smallText" align="center">' . olc_datetime_short($customers_history['date_added']) . '</td>' . NEW_LINE . '<td class="smallText" align="center">');
                        $contents[] = array('text' => '</tr>' . NEW_LINE);
	<td class="main"><?php 
    echo TEXT_BANNERS_URL;
    ?>
</td>
	<td class="main"><?php 
    echo olc_draw_input_field('banners_url', $bInfo->banners_url);
    ?>
</td>
	</tr>
	<tr>
	<td class="main" valign="top"><?php 
    echo TEXT_BANNERS_GROUP;
    ?>
</td>
	<td class="main"><?php 
    echo olc_draw_pull_down_menu('banners_group', $groups_array, $bInfo->banners_group) . TEXT_BANNERS_NEW_GROUP . HTML_BR . olc_draw_input_field('new_banners_group', EMPTY_STRING, EMPTY_STRING, sizeof($groups_array) > 0 ? false : true);
    ?>
</td>
	</tr>
	<tr>
	<td colspan="2"><?php 
    echo olc_draw_separator('pixel_trans.gif', '1', '10');
    ?>
</td>
	</tr>
	<tr>
	<td class="main" valign="top"><?php 
    echo TEXT_BANNERS_IMAGE;
    ?>
</td>
	<td class="main"><?php 
require_once DIR_FS_INC . 'olc_draw_form.inc.php';
require_once DIR_FS_INC . 'olc_draw_pull_down_menu.inc.php';
require_once DIR_FS_INC . 'olc_draw_hidden_field.inc.php';
require_once DIR_FS_INC . 'olc_hide_session_id.inc.php';
$count_cur = 0;
if (is_object($currencies)) {
    reset($currencies->currencies);
    $currencies_array = array();
    while (list($key, $value) = each($currencies->currencies)) {
        $count_cur++;
        $currencies_array[] = array('id' => $key, 'text' => $value['title']);
    }
}
// dont show box if there's only 1 currency
if ($count_cur > 1) {
    $hidden_get_variables = EMPTY_STRING;
    reset($_GET);
    $exclude = array('currency', olc_session_name(), 'x', 'y');
    while (list($key, $value) = each($_GET)) {
        if (!in_array($key, $exclude)) {
            $hidden_get_variables .= olc_draw_hidden_field($key, $value);
        }
    }
    // reset var
    olc_smarty_init($box_smarty, $cacheid);
    $box_content = EMPTY_STRING;
    $box_content = olc_draw_form('currencies', olc_href_link(CURRENT_SCRIPT, EMPTY_STRING, $request_type, false), 'get') . olc_draw_pull_down_menu('currency', $currencies_array, SESSION_CURRENCY, 'onchange="this.form.submit();"') . $hidden_get_variables . olc_hide_session_id() . '</form>';
    $box_smarty->assign('BOX_CONTENT', $box_content);
    $box_currencies = $box_smarty->fetch(CURRENT_TEMPLATE_BOXES . 'box_currencies' . HTML_EXT, $cacheid);
    $smarty->assign('box_CURRENCIES', $box_currencies);
}
    }
    if (!$manufacturers_id) {
        $products_id = $_GET['products_id'];
        if ($products_id) {
            $manufacturers_query = olc_db_query("select manufacturers_id from " . TABLE_PRODUCTS . " where products_id = " . $products_id);
            if (olc_db_num_rows($manufacturers_query)) {
                $products_data = olc_db_fetch_array($manufacturers_query);
                $manufacturers_id = $products_data['manufacturers_id'];
            }
        } else {
            $manufacturers_id = $_GET['filter_id'];
        }
    }
    $form_name_text = 'manufacturers';
    if (USE_AJAX) {
        $onchange = "make_AJAX_Request_POST('" . $form_name_text . "','" . FILENAME_DEFAULT . "')";
    } else {
        $onchange = 'this.form.submit()';
    }
    $box_content = olc_draw_form($form_name_text, olc_href_link(FILENAME_DEFAULT, EMPTY_STRING, NONSSL, false), 'get');
    $box_content .= olc_draw_pull_down_menu('manufacturers_id', $manufacturers_array, $manufacturers_id, 'onchange="' . $onchange . '" size="' . MAX_MANUFACTURERS_LIST . QUOTE) . olc_hide_session_id() . '
</form>
';
    $box_smarty->assign('BOX_CONTENT', $box_content);
    $box_manufacturers = $box_smarty->fetch(CURRENT_TEMPLATE_BOXES . 'box_manufacturers' . HTML_EXT, $cacheid);
} else {
    if (IS_AJAX_PROCESSING) {
        $box_manufacturers = HTML_NBSP;
    }
}
$smarty->assign('box_MANUFACTURERS', $box_manufacturers);
 function display()
 {
     $customers_statuses_array = olc_get_customers_statuses();
     // build Currency Select
     $curr = '';
     $currencies = olc_db_query("SELECT code FROM " . TABLE_CURRENCIES);
     while ($currencies_data = olc_db_fetch_array($currencies)) {
         $curr .= olc_draw_radio_field('currencies', $currencies_data['code'], true) . $currencies_data['code'] . HTML_BR;
     }
     return array('text' => EXPORT_STATUS_TYPE . HTML_BR . EXPORT_STATUS . HTML_BR . olc_draw_pull_down_menu('status', $customers_statuses_array, '1') . HTML_BR . CURRENCY . HTML_BR . CURRENCY_DESC . HTML_BR . $curr . EXPORT_TYPE . HTML_BR . EXPORT . HTML_BR . olc_draw_radio_field('export', 'no', false) . EXPORT_NO . HTML_BR . olc_draw_radio_field('export', 'yes', true) . EXPORT_YES . HTML_BR . HTML_BR . olc_image_submit('button_export.gif', IMAGE_UPDATE) . HTML_A_START . olc_href_link(FILENAME_MODULE_EXPORT, 'set=' . $_GET['set'] . '&module=kelkoo') . '">' . olc_image_button('button_cancel.gif', IMAGE_CANCEL) . HTML_A_END);
 }
}
$module_smarty->assign('country_id_content', $country_id_content);
if (ACCOUNT_STATE == TRUE_STRING_S) {
    $module_smarty->assign('ACCOUNT_STATE', TRUE_STRING_S);
    $state = olc_get_zone_name($a_country, $a_zone_id, $a_state);
    if ($is_read_only == true) {
        $state_content = olc_get_zone_name($affiliate['affiliate_country_id'], $affiliate['affiliate_zone_id'], $affiliate['affiliate_state']);
    } elseif ($error == true) {
        if ($entry_state_error == true) {
            if ($entry_state_has_zones == true) {
                $zones_array = array();
                $zones_query = olc_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . olc_db_input($a_country) . "' order by zone_name");
                while ($zones_values = olc_db_fetch_array($zones_query)) {
                    $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);
                }
                $state_content = olc_draw_pull_down_menu('a_state', $zones_array) . HTML_NBSP . ENTRY_STATE_ERROR;
            } else {
                $state_content = olc_draw_input_field('a_state') . HTML_NBSP . ENTRY_STATE_ERROR;
            }
        } else {
            $state_content = $state . olc_draw_hidden_field('a_zone_id') . olc_draw_hidden_field('a_state');
        }
    } else {
        $state_content = olc_draw_input_field('a_state', olc_get_zone_name($affiliate['affiliate_country_id'], $affiliate['affiliate_zone_id'], $affiliate['affiliate_state'])) . HTML_NBSP . ENTRY_STATE_TEXT;
    }
    $module_smarty->assign('state_content', $state_content);
}
if ($is_read_only == true) {
    $telephone_content = $affiliate['affiliate_telephone'];
} elseif ($error == true) {
    if ($entry_telephone_error == true) {
    function choose_audience()
    {
        $products_array = array();
        $products_query = olc_db_query("select pd.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.language_id = '" . SESSION_LANGUAGE_ID . "' and pd.products_id = p.products_id and p.products_status = '1' order by pd.products_name");
        while ($products = olc_db_fetch_array($products_query)) {
            $products_array[] = array('id' => $products['products_id'], 'text' => $products['products_name']);
        }
        $choose_audience_string = '
<script language="javascript" type="text/javascript"><!--
function mover(move) {
  if (move == \'remove\') {
    for (x=0; x<(document.notifications.products.length); x++) {
      if (document.notifications.products.options[x].selected) {
        with(document.notifications.elements[\'chosen[]\']) {
          options[options.length] = new Option(document.notifications.products.options[x].text,document.notifications.products.options[x].value);
        }
        document.notifications.products.options[x] = null;
        x = -1;
      }
    }
  }
  if (move == \'add\') {
    for (x=0; x<(document.notifications.elements[\'chosen[]\'].length); x++) {
      if (document.notifications.elements[\'chosen[]\'].options[x].selected) {
        with(document.notifications.products) {
          options[options.length] = new Option(document.notifications.elements[\'chosen[]\'].options[x].text,document.notifications.elements[\'chosen[]\'].options[x].value);
        }
        document.notifications.elements[\'chosen[]\'].options[x] = null;
        x = -1;
      }
    }
  }
  return true;
}

function selectAll(FormName, SelectBox) 
{
  temp = "document." + FormName + ".elements[\'" + SelectBox + "\']";
  Source = eval(temp);

  for (x=0; x<(Source.length); x++) {
    Source.options[x].selected = "true";
  }

  if (x<1)
  {
    alert(\'' . JS_PLEASE_SELECT_PRODUCTS . '\');
    return false;
  } else {
';
        if (USE_AJAX) {
            $choose_audience_string = '
	    return make_AJAX_Request_POST(FormName,"");
';
        } else {
            $choose_audience_string = '
	    return true;
';
        }
        $choose_audience_string = '
	}
}
//--></script>
';
        $page = $_GET['page'];
        $nID = $_GET['nID'];
        $choose_audience_string .= olc_draw_form('notifications', FILENAME_NEWSLETTERS, 'post', 'page=' . $page . '&nID=' . $nID . '&action=confirm', 'onsubmit="return selectAll(\'notifications\', \'chosen[]\')"') . '	<table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
	    <td align="center" class="main"><b>' . TEXT_PRODUCTS . '</b><br/>' . olc_draw_pull_down_menu('products', $products_array, '', 'size="20" style="width: 20em;" multiple') . '			</td>
	    <td align="center" class="main">&nbsp;<br/><a href="' . olc_href_link(FILENAME_NEWSLETTERS, 'page=' . $page . '&nID=' . $nID . '&action=confirm&global=true') . '">
				<input type="button" value="' . BUTTON_GLOBAL . '" style="width: 8em;"></a><br/><br/><br/>
				<input type="button" value="' . BUTTON_SELECT . '" style="width: 8em;" onclick="javascript:mover(\'remove\');"><br/><br/>
				<input type="button" value="' . BUTTON_UNSELECT . '" style="width: 8em;" onclick="javascript:mover(\'add\');"><br/><br/><br/>
				<input type="submit" value="' . BUTTON_SUBMIT . '" style="width: 8em;"><br/><br/>
				<a href="' . olc_href_link(FILENAME_NEWSLETTERS, 'page=' . $page . '&nID=' . $nID) . '">
				<input type="button" value="' . BUTTON_CANCEL . '" style="width: 8em;"></a>
			</td>
	    <td align="center" class="main"><b>' . TEXT_SELECTED_PRODUCTS . '</b><br/>' . olc_draw_pull_down_menu('chosen[]', array(), '', 'size="20" style="width: 20em;" multiple') . '			</td>
	  </tr>
	</table>
</form>';
        return $choose_audience_string;
    }
    }
    $parameters = olc_get_all_get_params(array('action')) . 'action=buy_now&BUYproducts_id=#&gallery=true&line=§';
    $header = HTML_BR . HTML_NBSP . HTML_A_START;
    $trailer0 = '" title="' . APOS . ATSIGN . APOS . ' (~' . BLANK . SESSION_CURRENCY . RPAREN . str_replace(APOS, EMPTY_STRING, TEXT_NOW) . '">' . ATSIGN . HTML_A_END . HTML_NBSP;
    $product_query = olc_db_query($products_listing_split->sql_query);
    $categories = array(array('id' => EMPTY_STRING, 'text' => TEXT_ALL_CATEGORIES));
    $categories = olc_get_categories($categories, 0, EMPTY_STRING);
    $form_name = 'categories_form';
    if (USE_AJAX) {
        $onchange = 'return make_AJAX_Request_POST(\'' . $form_name . '\',\'' . FILENAME_GALLERY . '\'' . RPAREN;
    } else {
        $onchange = $form_name . '.submit()';
    }
    $main_content = olc_draw_form($form_name, FILENAME_GALLERY) . $table_start . '
		    <td class="fieldKey">' . ENTRY_CATEGORIES . '</td>
		    <td class="fieldValue">' . olc_draw_pull_down_menu('categories_id', $categories, $categories_id, 'onchange="' . $onchange . QUOTE) . '
				</td>
		    <td width="70%">&nbsp;</td>
		  </tr>
		  <tr>
				<td colspan="3"><hr/></td>
' . $table_end . '
	</form>
';
    $current_row = $table_start;
    $line = 1;
    $current_image = 0;
    while ($product = olc_db_fetch_array($product_query)) {
        $products_image = $product['products_image'];
        if ($products_image) {
            $products_image = DIR_WS_THUMBNAIL_IMAGES . $products_image;
						onclick="javascript:return deleteOption();" title="Löscht die Option aus der Datenbank" />-->
						<!--
						&nbsp;&nbsp;&nbsp;&nbsp;
						<input' . str_replace("#", "add_up", $image_data) . ' value="Add"
						onclick="javascript:return amAddAttributeToProduct();" title="Das Attribut dem aktuellen Produkt hinzufĂĽgen" />
						&nbsp;&nbsp;<b>Das Attribut dem aktuellen Produkt hinzufĂĽgen</b>
						-->
					</td>
				</tr>

				<tr class="optionValue">
					<td width="60" align="center" valign="top">
						<img' . str_replace("#", "arrow", $image_data) . ' />
					</td>
					<td valign="top" width="41%">
						' . olc_draw_pull_down_menu("optionValueDropDown", $optionValueDrop, $selectedOptionValue) . '
						<br/><br/>&nbsp;&nbsp;
						<input' . str_replace("#", "add_new", $image_data) . '
						onclick="javascript:return amAddOptionValue();" title="FĂĽgt der Liste einen neuen Optionswert hinzu" />
						&nbsp;&nbsp;<b>Neuen Optionswert definieren</b>
						<!--<input' . str_replace("#", "delete", $image_data) . '
						onclick="javascript:return deleteOptionValue();" title="Löscht den Options-Wert aus der Datenbank" />-->
					</td>
					<td width="15%" valign="top">
						Preis: ' . drawDropDownPrefix($prefix_0_id) . olc_draw_input_field("newPrice", "", $newPrice_id) . '
					</td>
					<td width="41%" valign="top">
						<input' . str_replace("#", "add_up", $image_data) . ' value="Add"
						onclick="javascript:return amAddAttributeToProduct();" title="Das Attribut dem aktuellen Produkt hinzufĂĽgen" border="0"  />
						&nbsp;&nbsp;<b>Das Attribut dem aktuellen Produkt hinzufĂĽgen</b>
					</td>
            $customers_status_ids = $customers_status_count;
            $customers_status_end = $customers_status_ids - 1;
        } else {
            for ($customers_status_start = 1; $customers_status_start <= $customers_status_count; $customers_status_start++) {
                if ($customers_status_id == $customers_statuses_array[$customers_status_start]['id']) {
                    break;
                }
            }
            $customers_status_end = $customers_status_start;
        }
    } else {
        if ($customers_status_count - 1 > 1) {
            $customers_statuses_array[0]['text'] = TEXT_CATALOGUE_ALL_VARIATIONS;
            $main_content .= olc_draw_form('parameter', CURRENT_SCRIPT, BLANK) . HTML_BR . HTML_BR;
            $main_content .= olc_draw_hidden_field('process', TRUE_STRING_S);
            $main_content .= TEXT_INFO_HEADING_STATUS_CUSTOMER . BLANK . olc_draw_pull_down_menu('group_status', $customers_statuses_array, DEFAULT_CUSTOMERS_STATUS_ID_ADMIN) . HTML_BR . HTML_BR;
            $main_content .= '
	<p>' . olc_image_submit('button_confirm.gif', IMAGE_BUTTON_CONTINUE, 'onclick="javascript:show_message()"') . '
	</p>
</form>
<script>
var message_visible=true,style_display,style_display_show="inline",style_display_hide="none";
var message_element_style;

function show_message()
{
	message_element_style=document.getElementById("message").style;
	message_element_style.display=style_display_show;
	setInterval("toggle_visibility()", 1000);
}
 if ($action == $entry_state_text) {
     require_once DIR_FS_INC . 'olc_parse_input_field_data.inc.php';
     $zone_id = 'zone_id';
     $zone_name = 'zone_name';
     $db_data_query = olc_db_query($sql_select . $zone_id . COMMA . $zone_name . SQL_FROM . TABLE_PREFIX_COMMON . 'zones' . " where zone_country_id = '" . $current_value . "' order by " . $zone_name);
     $rows = olc_db_num_rows($db_data_query);
     if ($rows >= 1) {
         $id = 'id';
         $text = 'text';
         while ($value = olc_db_fetch_array($db_data_query)) {
             $zones_array[] = array($id => $value[$zone_id], $text => $value[$zone_name]);
         }
         if ($rows > 1) {
             require_once DIR_FS_INC . 'olc_not_null.inc.php';
             require_once DIR_FS_INC . 'olc_draw_pull_down_menu.inc.php';
             $main_content = olc_draw_pull_down_menu('entry_state', $zones_array);
         } else {
             require_once DIR_FS_INC . 'olc_draw_input_field.inc.php';
             $main_content = olc_draw_input_field($entry_state_text, $zones_array[0]['text']);
         }
     } else {
         $main_content = HTML_NBSP;
     }
     $build_selection = true;
 } else {
     $check_banktransfer_number = $action == $banktransfer_number;
     $current_value = str_replace("*", "%", $current_value);
     $sql_where_condition = $sql_select_data . SQL_LIKE . APOS . $current_value . HASH . APOS;
     if ($add_land_condition) {
         $sql_where_condition .= SQL_AND . "land = '" . $land . APOS;
     }
          <tr>
            <td class="pageHeading"><?php 
        echo HEADING_TITLE;
        ?>
</td>
            <td class="main"><?php 
        echo olc_draw_form('status', FILENAME_COUPON_ADMIN, '', 'get');
        $status_array[] = array('id' => 'Y', 'text' => TEXT_COUPON_ACTIVE);
        $status_array[] = array('id' => 'N', 'text' => TEXT_COUPON_INACTIVE);
        $status_array[] = array('id' => '*', 'text' => TEXT_COUPON_ALL);
        if ($_GET['status']) {
            $status = olc_db_prepare_input($_GET['status']);
        } else {
            $status = 'Y';
        }
        echo HEADING_TITLE_STATUS . BLANK . olc_draw_pull_down_menu('status', $status_array, $status, 'onchange="this.form.submit();"');
        ?>
              </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">
                <td class="dataTableHeadingContent"><?php 
        echo COUPON_NAME;
        ?>
</td>
    $affiliate = array();
    $affiliate[] = array('id' => '', 'text' => TEXT_SELECT_AFFILIATE);
    $affiliate[] = array('id' => '***', 'text' => TEXT_ALL_AFFILIATES);
    //    $affiliate[] = array('id' => '**D', 'text' => TEXT_NEWSLETTER_AFFILIATES);
    $mail_query = olc_db_query("select affiliate_email_address, affiliate_firstname, affiliate_lastname from " . TABLE_AFFILIATE . " order by affiliate_lastname");
    while ($affiliate_values = olc_db_fetch_array($mail_query)) {
        $affiliate[] = array('id' => $affiliate_values['affiliate_email_address'], 'text' => $affiliate_values['affiliate_lastname'] . ', ' . $affiliate_values['affiliate_firstname'] . LPAREN . $affiliate_values['affiliate_email_address'] . RPAREN);
    }
    ?>
              <tr>
                <td class="main"><?php 
    echo TEXT_AFFILIATE;
    ?>
</td>
                <td><?php 
    echo olc_draw_pull_down_menu('affiliate_email_address', $affiliate, $_GET['affiliate']);
    ?>
</td>
              </tr>
              <tr>
                <td colspan="2"><?php 
    echo olc_draw_separator('pixel_trans.gif', '1', '10');
    ?>
</td>
              </tr>
              <tr>
                <td class="main"><?php 
    echo TEXT_FROM;
    ?>
</td>
                <td><?php 
              <td class="pageHeading" align="right"><?php 
echo olc_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT);
?>
</td>
            </tr>
<?php 
//Medreces insert Filter categories & manufactures !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
?>
            <tr class="dataTableHeadingRow"><?php 
echo olc_draw_form('filter_xsell_products', FILENAME_XSELL_PRODUCTS, $first_entrance ? '' : olc_get_all_get_params());
?>
                <td class="dataTableHeadingRow" align="left">Set Filters</td>
                <td class="smallText" align="right">
                  <?php 
echo 'to Categories:&nbsp' . olc_draw_pull_down_menu('categories_id', olc_get_category_tree(), $CATEGORIES_id);
echo '<br/>to Manufacturers:&nbsp' . olc_draw_pull_down_menu('manufacturers_id', $manufacturers_array, $MANUFACTURES_id);
?>
                </td>
				<td class="dataTableContent" align="right"><?php 
echo olc_image_submit('button_select.gif', 'GO!!!');
?>
</td>
            </form></tr>
<?php 
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
?>
          </table>
        </td>
      </tr>
      <!-- body_text //-->
      <tr><td width="100%" valign="top">
    }
}
?>
</div>
          <tr>
            <td style="border-top: 1px solid;" class="main"><?php 
echo TEXT_PRODUCTS_DISCOUNT_ALLOWED;
?>
</td>
            <td style="border-top: 1px solid;" class="main"><?php 
echo olc_draw_input_field('products_discount_allowed', $pInfo->products_discount_allowed);
?>
%</td>
          </tr>
          <tr>
            <td colspan="2"><?php 
echo olc_draw_separator('pixel_trans.gif', '1', '10');
?>
</td>
          </tr>
          <tr>
            <td class="main"><?php 
echo TEXT_PRODUCTS_TAX_CLASS;
?>
</td>
            <td class="main"><?php 
echo olc_draw_pull_down_menu('products_tax_class_id', $tax_class_array, $pInfo->products_tax_class_id);
?>
</td>
          </tr>
        </table>
     }
     $contents[] = array('text' => HTML_BR . TEXT_INFO_CUSTOMERS_STATUS_NAME . $customers_status_inputs_string);
     $contents[] = array('text' => HTML_BR . olc_image(DIR_WS_ICONS . $cInfo->customers_status_image, $cInfo->customers_status_name) . HTML_BR . DIR_WS_ICONS . '<br/><b>' . $cInfo->customers_status_image . HTML_B_END);
     $contents[] = array('text' => HTML_BR . TEXT_INFO_CUSTOMERS_STATUS_IMAGE . HTML_BR . olc_draw_file_field('customers_status_image', $cInfo->customers_status_image));
     $contents[] = array('text' => HTML_BR . TEXT_INFO_CUSTOMERS_STATUS_PUBLIC_INTRO . HTML_BR . ENTRY_CUSTOMERS_STATUS_PUBLIC . BLANK . olc_draw_pull_down_menu('customers_status_public', $customers_status_public_array, $cInfo->customers_status_public));
     $contents[] = array('text' => HTML_BR . TEXT_INFO_CUSTOMERS_STATUS_SHOW_PRICE_INTRO . HTML_BR . ENTRY_CUSTOMERS_STATUS_SHOW_PRICE . BLANK . olc_draw_pull_down_menu('customers_status_show_price', $customers_status_show_price_array, $cInfo->customers_status_show_price));
     $contents[] = array('text' => HTML_BR . TEXT_INFO_CUSTOMERS_STATUS_SHOW_PRICE_TAX_INTRO . HTML_BR . ENTRY_CUSTOMERS_STATUS_SHOW_PRICE_TAX . BLANK . olc_draw_pull_down_menu('customers_status_show_price_tax', $customers_status_show_price_tax_array, $cInfo->customers_status_show_price_tax));
     $contents[] = array('text' => HTML_BR . TEXT_INFO_CUSTOMERS_STATUS_ADD_TAX_INTRO . HTML_BR . ENTRY_CUSTOMERS_STATUS_ADD_TAX . BLANK . olc_draw_pull_down_menu('customers_status_add_tax_ot', $customers_status_add_tax_ot_array, $cInfo->customers_status_add_tax_ot));
     $contents[] = array('text' => HTML_BR . TEXT_INFO_CUSTOMERS_STATUS_DISCOUNT_PRICE_INTRO . HTML_BR . TEXT_INFO_CUSTOMERS_STATUS_DISCOUNT_PRICE . BLANK . olc_draw_input_field('customers_status_discount', $cInfo->customers_status_discount));
     $contents[] = array('text' => HTML_BR . TEXT_INFO_CUSTOMERS_STATUS_DISCOUNT_ATTRIBUTES_INTRO . HTML_BR . ENTRY_CUSTOMERS_STATUS_DISCOUNT_ATTRIBUTES . BLANK . olc_draw_pull_down_menu('customers_status_discount_attributes', $customers_status_discount_attributes_array, $cInfo->customers_status_discount_attributes));
     $contents[] = array('text' => HTML_BR . TEXT_INFO_CUSTOMERS_STATUS_DISCOUNT_OT_XMEMBER_INTRO . '<br/> ' . ENTRY_OT_XMEMBER . BLANK . olc_draw_pull_down_menu('customers_status_ot_discount_flag', $customers_status_ot_discount_flag_array, $cInfo->customers_status_ot_discount_flag) . HTML_BR . TEXT_INFO_CUSTOMERS_STATUS_DISCOUNT_PRICE . BLANK . olc_draw_input_field('customers_status_ot_discount', $cInfo->customers_status_ot_discount));
     $contents[] = array('text' => HTML_BR . TEXT_INFO_CUSTOMERS_STATUS_GRADUATED_PRICES_INTRO . HTML_BR . ENTRY_GRADUATED_PRICES . BLANK . olc_draw_pull_down_menu('customers_status_graduated_prices', $customers_status_graduated_prices_array, $cInfo->customers_status_graduated_prices));
     $contents[] = array('text' => HTML_BR . TEXT_INFO_CUSTOMERS_STATUS_PAYMENT_UNALLOWED_INTRO . HTML_BR . ENTRY_CUSTOMERS_STATUS_PAYMENT_UNALLOWED . BLANK . olc_draw_input_field('customers_status_payment_unallowed', $cInfo->customers_status_payment_unallowed));
     $contents[] = array('text' => HTML_BR . TEXT_INFO_CUSTOMERS_STATUS_SHIPPING_UNALLOWED_INTRO . HTML_BR . ENTRY_CUSTOMERS_STATUS_SHIPPING_UNALLOWED . BLANK . olc_draw_input_field('customers_status_shipping_unallowed', $cInfo->customers_status_shipping_unallowed));
     $contents[] = array('text' => HTML_BR . TEXT_INFO_CUSTOMERS_FSK18_INTRO . HTML_BR . ENTRY_CUSTOMERS_FSK18 . BLANK . olc_draw_pull_down_menu('customers_fsk18', $customers_fsk18_array, $cInfo->customers_fsk18));
     $contents[] = array('text' => HTML_BR . TEXT_INFO_CUSTOMERS_FSK18_DISPLAY_INTRO . HTML_BR . ENTRY_CUSTOMERS_FSK18_DISPLAY . BLANK . olc_draw_pull_down_menu('customers_fsk18_display', $customers_fsk18_display_array, $cInfo->customers_fsk18_display));
     if (DEFAULT_CUSTOMERS_STATUS_ID != $cInfo->customers_status_id) {
         $contents[] = array('text' => HTML_BR . olc_draw_checkbox_field('default') . BLANK . TEXT_SET_DEFAULT);
     }
     $contents[] = array('align' => 'center', 'text' => HTML_BR . olc_image_submit('button_update.gif', IMAGE_UPDATE) . BLANK . HTML_A_START . olc_href_link(FILENAME_CUSTOMERS_STATUS, 'page=' . $_GET['page'] . '&cID=' . $cInfo->customers_status_id) . '">' . olc_image_button('button_cancel.gif', IMAGE_CANCEL) . HTML_A_END);
     break;
 case 'delete':
     $heading[] = array('text' => HTML_B_START . TEXT_INFO_HEADING_DELETE_CUSTOMERS_STATUS . HTML_B_END);
     $contents = array('form' => olc_draw_form('status', FILENAME_CUSTOMERS_STATUS, 'page=' . $_GET['page'] . '&cID=' . $cInfo->customers_status_id . '&action=deleteconfirm'));
     $contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
     $contents[] = array('text' => '<br/><b>' . $cInfo->customers_status_name . HTML_B_END);
     if ($remove_status) {
         $contents[] = array('align' => 'center', 'text' => HTML_BR . olc_image_submit('button_delete.gif', IMAGE_DELETE) . BLANK . HTML_A_START . olc_href_link(FILENAME_CUSTOMERS_STATUS, 'page=' . $_GET['page'] . '&cID=' . $cInfo->customers_status_id) . '">' . olc_image_button('button_cancel.gif', IMAGE_CANCEL) . HTML_A_END);
     }
     break;
 default:
(c) 2003	    nextcommerce (search.php,v 1.9 2003/08/17); www.nextcommerce.org
(c) 2004      XT - Commerce; www.xt-commerce.com

Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
olc_smarty_init($box_smarty, $cacheid);
require_once DIR_FS_INC . 'olc_draw_pull_down_menu.inc.php';
require_once DIR_FS_INC . 'olc_draw_checkbox_field.inc.php';
require_once DIR_FS_INC . 'olc_draw_selection_field.inc.php';
require_once DIR_FS_INC . 'olc_image_submit.inc.php';
require_once DIR_FS_INC . 'olc_get_categories.inc.php';
require_once DIR_FS_INC . 'olc_get_manufacturers.inc.php';
require_once DIR_FS_INC . 'olc_hide_session_id.inc.php';
$selections = '
<table border="0" cellspacing="0" cellpadding="2">
  <tr>
    <td class="infoBoxContents">' . ENTRY_CATEGORIES . HTML_BR . olc_draw_pull_down_menu('categories_id', olc_get_categories(array(array('id' => EMPTY_STRING, 'text' => TEXT_ALL_CATEGORIES)))) . olc_draw_hidden_field('inc_subcat', ONE_STRING) . '
		</td>
  </tr>';
$manufacturers_pulldown = olc_get_manufacturers();
if ($manufacturers_pulldown) {
    $selections .= '<tr><td class="infoBoxContents">' . ENTRY_MANUFACTURERS . HTML_BR . olc_draw_pull_down_menu('manufacturers_id', $manufacturers_pulldown) . '</td></tr>';
}
$selections .= '</table>';
$box_smarty->assign('FORM_ACTION', olc_draw_form('quick_find', olc_href_link(FILENAME_ADVANCED_SEARCH_RESULT, EMPTY_STRING, NONSSL, false), 'get') . olc_hide_session_id());
$box_smarty->assign('INPUT_SEARCH', olc_draw_input_field('keywords', EMPTY_STRING, 'size="16" maxlength="100"'));
$box_smarty->assign('SELECTIONS', $selections);
$box_smarty->assign('BUTTON_SUBMIT', olc_image_submit('button_quick_find.gif', BOX_HEADING_SEARCH, 'align="middle"'));
$box_smarty->assign('LINK_ADVANCED', olc_href_link(FILENAME_ADVANCED_SEARCH));
$box_search = $box_smarty->fetch(CURRENT_TEMPLATE_BOXES . 'box_search' . HTML_EXT, $cacheid);
$smarty->assign('box_SEARCH', $box_search);
// set default value in dropdown!
$default_array = array();
if ($content['content_file'] == EMPTY_STRING) {
    $default_array[] = array('id' => 'default', 'text' => TEXT_SELECT);
    $default_value = $pInfo->options_template;
    $files = array_merge($default_array, $files);
} else {
    $default_array[] = array('id' => 'default', 'text' => TEXT_NO_FILE);
    $default_value = $pInfo->options_template;
    $files = array_merge($default_array, $files);
}
echo '
	          	<td class="main">' . TEXT_CHOOSE_OPTIONS_TEMPLATE . ':' . '</td>';
echo '
	          	<td class="main">
	          		' . olc_draw_pull_down_menu('options_template', $files, $default_value);
?>
		        </td>
		      </tr>
		    </table>
		  </td>
	  </tr>
	</table>
	<br /><br />
	<?php 
$products_id = $pInfo->products_id;
for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
    $lang_id = $languages[$i]['id'];
    ?>
	 <table width="100%" border="0">
	  <tr>
 function selection()
 {
     if (USE_PAYPAL_WPP) {
         global $order;
         $expires_month = array();
         for ($i = 1; $i < 13; $i++) {
             $expires_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%B', mktime(0, 0, 0, $i, 1, 2000)));
         }
         $expires_year = array();
         $today = getdate();
         $year = $today['year'];
         for ($i = $today['year']; $i < $year + 10; $i++) {
             $expires_year[] = array('id' => strftime('%y', mktime(0, 0, 0, 1, 1, $i)), 'text' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i)));
         }
         require_once DIR_FS_INC . 'olc_draw_pull_down_menu.inc.php';
         require_once DIR_FS_INC . 'olc_draw_input_field.inc.php';
         $date_expires = mktime(0, 0, 0, date('m') + 1, date('d'), date('Y'));
         $month = date('m', $date_expires);
         $year = date('Y', $date_expires);
         $paypal_image_dir = PAYPAL_IPN_DIR . 'images/';
         $img_visa = olc_image($paypal_image_dir . 'visa.gif', ' Visa ', EMPTY_STRING, EMPTY_STRING, 'align="absmiddle"');
         $img_mc = olc_image($paypal_image_dir . 'mastercard.gif', ' MasterCard ', EMPTY_STRING, EMPTY_STRING, 'align="absmiddle"');
         /*
         $img_discover = olc_image($paypal_image_dir.'discover.gif',' Discover ',
         EMPTY_STRING,EMPTY_STRING,'align="absmiddle"');
         
         $img_amex = olc_image($paypal_image_dir.'amex.gif',' American Express ',
         EMPTY_STRING,EMPTY_STRING,'align="absmiddle"');
         */
         $paypal_cc_txt = sprintf(MODULE_PAYMENT_PAYPAL_DP_CC_TEXT, $img_visa, $img_mc, $img_paypal, $img_amex, $img_discover);
         $selection = array('id' => $this->code, 'module' => MODULE_PAYMENT_PAYPAL_DP_TEXT_TITLE . $paypal_cc_txt, 'fields' => array(array('title' => MODULE_PAYMENT_PAYPAL_DP_TEXT_CREDIT_CARD_FIRSTNAME, 'field' => olc_draw_input_field('paypalwpp_cc_firstname', $order->billing['firstname'])), array('title' => MODULE_PAYMENT_PAYPAL_DP_TEXT_CREDIT_CARD_LASTNAME, 'field' => olc_draw_input_field('paypalwpp_cc_lastname', $order->billing['lastname'])), array('title' => MODULE_PAYMENT_PAYPAL_DP_TEXT_CREDIT_CARD_TYPE, 'field' => olc_draw_pull_down_menu('paypalwpp_cc_type', array(array('id' => 'Visa', 'text' => 'Visa'), array('id' => 'MasterCard', 'text' => 'MasterCard')))), array('title' => MODULE_PAYMENT_PAYPAL_DP_TEXT_CREDIT_CARD_NUMBER, 'field' => olc_draw_input_field('paypalwpp_cc_number', EMPTY_STRING)), array('title' => MODULE_PAYMENT_PAYPAL_DP_TEXT_CREDIT_CARD_EXPIRES, 'field' => olc_draw_pull_down_menu('paypalwpp_cc_expires_month', $expires_month, $month) . HTML_NBSP . olc_draw_pull_down_menu('paypalwpp_cc_expires_year', $expires_year, $year)), array('title' => MODULE_PAYMENT_PAYPAL_DP_TEXT_CREDIT_CARD_CHECKNUMBER, 'field' => olc_draw_input_field('paypalwpp_cc_checkcode', EMPTY_STRING, 'size="4" maxlength="4"') . HTML_NBSP . '<small>' . MODULE_PAYMENT_PAYPAL_DP_TEXT_CREDIT_CARD_CHECKNUMBER_LOCATION . '</small>')));
         /*
         if (MODULE_PAYMENT_PAYPAL_DP_BUTTON_PAYMENT_PAGE == 'Yes')
         {
         	if (isset($_SESSION[$his->ec_checkout_text]))
         	{
         		unset($_SESSION[$his->ec_checkout_text]);
         	}
         	else
         	{
         		$selection['fields'][] = array(
         		'title' => HTML_BR.HTML_BR.HTML_B_START.MODULE_PAYMENT_PAYPAL_DP_TEXT_EC_HEADER.HTML_B_END,
         		'field' => HTML_BR.HTML_BR.'
         	<table border="0" cellspacing="3" cellpadding="3">
         		<tr>
         			<td valign="top">
         				<a href="'.olc_href_link(FILENAME_EC_PROCESS,
         				'title="'.MODULE_PAYMENT_PAYPAL_DP_TEXT_BUTTON_TEXT.'"', SSL).'">
         					<img src="'.MODULE_PAYMENT_PAYPAL_EC_BUTTON_URL.'" border=0>
         				</a>
         			</td>
         			<td valign="top" class="main">
         			'.TEXT_PAYPALWPP_EC_BUTTON_DESCRIPTION_TEXT.'
         			</td>
         		</tr>
         	</table>
         ');
         	}
         }
         */
     }
     return $selection;
 }
Example #29
0
    while ($customers_statuses_value = olc_db_fetch_array($customers_statuses_array)) {
        $customers[] = array('id' => $customers_statuses_value['customers_status_id'], 'text' => $customers_statuses_value['customers_status_name']);
    }
    // End customers Status 1.x
    $mail_query = olc_db_query("select customers_email_address, customers_firstname, customers_lastname from " . TABLE_CUSTOMERS . " order by customers_lastname");
    while ($customers_values = olc_db_fetch_array($mail_query)) {
        $customers[] = array('id' => $customers_values['customers_email_address'], 'text' => $customers_values['customers_lastname'] . ', ' . $customers_values['customers_firstname'] . LPAREN . $customers_values['customers_email_address'] . RPAREN);
    }
    ?>
              <tr>
                <td class="main"><?php 
    echo TEXT_CUSTOMER;
    ?>
</td>
                <td><?php 
    echo olc_draw_pull_down_menu('customers_email_address', $customers, $_GET['customer']);
    ?>
</td>
              </tr>
              <tr>
                <td colspan="2"><?php 
    echo olc_draw_separator('pixel_trans.gif', '1', '10');
    ?>
</td>
              </tr>
              <tr>
                <td class="main"><?php 
    echo TEXT_FROM;
    ?>
</td>
                <td><?php 
    ?>
</td>
            <td align="right"><table border="0" width="100%" cellspacing="0" cellpadding="0">
              <tr><?php 
    echo olc_draw_form('orders', FILENAME_AFFILIATE_PAYMENT, '', 'get');
    ?>
                <td class="smallText" align="right"><?php 
    echo HEADING_TITLE_SEARCH . BLANK . olc_draw_input_field('sID', '', 'size="12"') . olc_draw_hidden_field('action', 'edit');
    ?>
</td>
              </form></tr>
              <tr><?php 
    echo olc_draw_form('status', FILENAME_AFFILIATE_PAYMENT, '', 'get');
    ?>
                <td class="smallText" align="right"><?php 
    echo HEADING_TITLE_STATUS . BLANK . olc_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;
    ?>