function selection()
 {
     global $order;
     //W. Kaiser - AJAX
     $bank_info_required = $_SESSION['credit_covers'] != true;
     $selection = array('id' => $this->code, 'module' => $this->title, 'fields' => array(array('title' => MODULE_PAYMENT_BANKTRANSFER_TEXT_NOTE, 'field' => MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_INFO), array('title' => MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_OWNER, 'field' => olc_draw_input_field('banktransfer_owner', trim($order->billing['firstname'] . BLANK . $order->billing['lastname'])) . olc_draw_hidden_field('entry_country_id', $order->billing['country']['id'])), array('title' => MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_BLZ, 'field' => olc_draw_input_field('banktransfer_blz', EMPTY_STRING, 'size="10" maxlength="8"', 'text', true, AJAX_BLZ_VALIDATION, $bank_info_required, MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_BLZ, true)), array('title' => MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_NUMBER, 'field' => olc_draw_input_field('banktransfer_number', EMPTY_STRING, 'size="16" maxlength="32"', 'text', true, AJAX_BLZ_VALIDATION, $bank_info_required, MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_NUMBER, true)), array('title' => MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_NAME, 'field' => olc_draw_input_field('banktransfer_bankname', EMPTY_STRING, 'size="32" maxlength="32"')), array('title' => EMPTY_STRING, 'field' => olc_draw_hidden_field('recheckok', $_POST['recheckok']))));
     //W. Kaiser - AJAX
     if (MODULE_PAYMENT_BANKTRANSFER_FAX_CONFIRMATION == TRUE_STRING_S) {
         $selection['fields'][] = array('title' => MODULE_PAYMENT_BANKTRANSFER_TEXT_NOTE, 'field' => MODULE_PAYMENT_BANKTRANSFER_TEXT_NOTE2 . HTML_A_START . MODULE_PAYMENT_BANKTRANSFER_URL_NOTE . '" target="_blank"><b>' . MODULE_PAYMENT_BANKTRANSFER_TEXT_NOTE3 . '</b></a>' . MODULE_PAYMENT_BANKTRANSFER_TEXT_NOTE4);
         $selection['fields'][] = array('title' => MODULE_PAYMENT_BANKTRANSFER_TEXT_BANK_FAX, 'field' => olc_draw_checkbox_field('banktransfer_fax', 'on'));
     }
     return $selection;
 }
Ejemplo n.º 2
0
function build_optional_image_html($i)
{
    global $pic_display_text0, $pic_table_text0, $pic_url_text, $pic_text, $onclick0, $sep, $use_multi_pic_text;
    global $multi_pictures, $pic_table0, $span_start, $thumbs_dir_local, $id_is, $dummy_span, $hidden_text, $end;
    global $original_dir_local, $thumbs_dir_local, $display_visible_text, $display_hidden_text, $pic_table0;
    global $dummy_span, $style_display, $fees, $rab, $div_tex, $onchange, $space;
    $next_i = $i + 1;
    //$index=UNDERSCORE.$i;
    $index = UNDERSCORE . $next_i;
    $my_pic_display_text = $pic_display_text0 . $index;
    $my_pic_table_text = $pic_table_text0 . $next_i;
    $my_pic_url_text = $pic_url_text . $index;
    $my_pic_text = $pic_text . $index;
    $my_use_multi_pic_text = $use_multi_pic_text . $next_i;
    $my_use_multi_pic_div_text = $my_use_multi_pic_text . $div_text;
    $not_last = $i < 12;
    $onclick = $onclick0 . $my_pic_table_text . $sep . $my_pic_url_text . $sep . $my_pic_text;
    if ($not_last) {
        //$onclick.=$sep.$my_use_multi_pic_text.$sep.TRUE_STRING_S;
        $next_i_1 = $next_i + 1;
        $onclick .= $sep . $use_multi_pic_text . $next_i_1 . $div_text . $sep . $next_i;
    }
    $onclick .= $end;
    if ($not_last) {
        $pic_file_name = $multi_pictures[$next_i];
        $use_multi_pic = $pic_file_name != EMPTY_STRING;
        $id = $id_is . $my_pic_text . QUOTE;
        if ($use_multi_pic) {
            $display = $display_visible_text;
            $my_image = olc_image($thumbs_dir_local . $pic_file_name, EMPTY_STRING, EMPTY_STRING, EMPTY_STRING, $id . QUOTE);
            $my_pic_file_name = DIR_WS_ORIGINAL_IMAGES . $pic_file_name;
        } else {
            $display = $display_hidden_text;
            $my_image = SPAN_START . $id . $rab . SPAN_END;
            $my_pic_file_name = EMPTY_STRING;
        }
        $pic_table = str_replace(UNDERSCORE, $display, $pic_table0);
        $pic_table = str_replace(TILDE, $my_pic_table_text, $pic_table);
        $image_html .= HTML_BR . olc_draw_file_field($my_pic_url_text, EMPTY_STRING, str_replace(HASH, $index, $onchange)) . HTML_BR . str_replace(HASH, $my_pic_display_text, $span_start) . $my_pic_file_name . SPAN_END;
        $image_html = str_replace(HASH, $image_html, $pic_table);
        $image_html = str_replace(ATSIGN, $space . $my_image . $dummy_span, $image_html) . olc_draw_hidden_field($my_pic_url_text . $hidden_text, $original_dir_local . $pic_file_name);
        if ($i == 1 || $use_multi_pic) {
            $display = $display_visible_text;
        } else {
            $display = $display_hidden_text;
        }
        $display = $style_display . $display . QUOTE;
        $image_html = '<div nowrap="nowrap"="nowrap" id="' . $my_use_multi_pic_div_text . QUOTE . BLANK . $display . $rab . HTML_BR . olc_draw_checkbox_field($my_use_multi_pic_text, ONE_STRING, $use_multi_pic, $onclick) . HTML_NBSP . sprintf(AUCTIONS_TEXT_AUCTION_USE_MULTI_PIC, $next_i, $fees[$pic_text]) . $image_html . '</div>';
    }
    return $image_html;
}
Ejemplo n.º 3
0
 function ot_gv()
 {
     require_once DIR_FS_INC . 'olc_draw_checkbox_field.inc.php';
     $this->code = 'ot_gv';
     $this->title = MODULE_ORDER_TOTAL_GV_TITLE;
     $this->header = MODULE_ORDER_TOTAL_GV_HEADER;
     $this->description = MODULE_ORDER_TOTAL_GV_DESCRIPTION;
     $this->user_prompt = MODULE_ORDER_TOTAL_GV_USER_PROMPT;
     $this->enabled = MODULE_ORDER_TOTAL_GV_STATUS;
     $this->sort_order = MODULE_ORDER_TOTAL_GV_SORT_ORDER;
     $this->include_shipping = MODULE_ORDER_TOTAL_GV_INC_SHIPPING;
     $this->include_tax = MODULE_ORDER_TOTAL_GV_INC_TAX;
     $this->calculate_tax = MODULE_ORDER_TOTAL_GV_CALC_TAX;
     $this->credit_tax = MODULE_ORDER_TOTAL_GV_CREDIT_TAX;
     $this->tax_class = MODULE_ORDER_TOTAL_GV_TAX_CLASS;
     $this->show_redeem_box = MODULE_ORDER_TOTAL_GV_REDEEM_BOX;
     $this->credit_class = true;
     $this->checkbox = olc_draw_checkbox_field('c' . $this->code, EMPTY_STRING, false, 'onclick="javascript:submitFunction()"') . HTML_NBSP . $this->user_prompt;
     /*
     			$this->checkbox = '<input type="checkbox" onclick="javascript:submitFunction()" name="' . 'c' . $this->code . '">'.
     $this->user_prompt;
     */
     $this->output = array();
 }
            <tr>
            <td width="10%"><?php echo TEXT_PARENT; ?></td>
            <td width="90%"><?php echo olc_draw_pull_down_menu('parent',$categories_array,$content['parent_id']); ?><?php echo olc_draw_checkbox_field('parent_check', 'yes',false).BLANK.TEXT_PARENT_DESCRIPTION; ?></td>
            </tr>
            */
            ?>
      <tr>
      <td valign="top" width="10%"><?php 
            echo TEXT_STATUS;
            ?>
</td>
      <td width="90%"><?php 
            if ($content['content_status'] == '1') {
                echo olc_draw_checkbox_field('status', 'yes', true) . BLANK . TEXT_STATUS_DESCRIPTION;
            } else {
                echo olc_draw_checkbox_field('status', 'yes', false) . BLANK . TEXT_STATUS_DESCRIPTION;
            }
            ?>
<br/><br/></td>
   </tr>
   <tr>
      <td width="10%"><?php 
            echo TEXT_TITLE;
            ?>
</td>
      <td width="90%"><?php 
            echo olc_draw_input_field('cont_title', $content['content_title'], 'size="60"');
            ?>
</td>
   </tr>
   <tr>
                     }
                 }
                 $show_saved_cart = true;
                 $module_content_save = $module_content;
                 include_once DIR_WS_MODULES . 'order_details_cart.php';
                 $module_content = $module_content_save;
                 $show_saved_cart = false;
             }
         } else {
             $parameters = 'basket_id=' . $basket_id;
             $cart_content = EMPTY_STRING;
         }
         $link = olc_href_link(CURRENT_SCRIPT, $parameters);
         $date = $basket['basket_date_added'];
         $date = substr($date, 6, 2) . DOT . substr($date, 4, 2) . DOT . substr($date, 0, 4);
         $module_content[] = array('show_order_details' => $show_order_details, 'BOX_SELECT' => olc_draw_radio_field('cart_select[]', $basket_id, $selected), 'NAME' => $basket['basket_name'], 'DATE' => $date, 'BOX_DELETE' => olc_draw_checkbox_field('cart_delete[]', $basket_id), 'LINK' => $link);
     }
 } else {
     $error_message = olc_get_smarty_config_variable($smarty, 'shopping_cart', 'text_no_saved_cart');
 }
 $cart_restore_text = 'cart_restore';
 if ($error_message) {
     $module_smarty->assign('ERROR_MESSAGE', $error_message);
 } else {
     $module_smarty->assign(MODULE_CONTENT, $module_content);
     if ($bid) {
         $MODULE_order_details_text = 'MODULE_order_details';
         $module_smarty->assign($MODULE_order_details_text, $smarty->_tpl_vars[$MODULE_order_details_text]);
         $smarty->assign($MODULE_order_details_text, EMPTY_STRING);
     }
 }
    $smarty->assign('GLOBAL_NOTIFICATION', '0');
} else {
    $smarty->assign('GLOBAL_NOTIFICATION', '1');
}
if ($global['global_product_notifications'] != '1') {
    $products_check_query = olc_db_query("select count(*) as total from " . TABLE_PRODUCTS_NOTIFICATIONS . " where customers_id = '" . (int) $_SESSION['customer_id'] . APOS);
    $products_check = olc_db_fetch_array($products_check_query);
    if ($products_check['total'] > 0) {
        $counter = 0;
        $notifications_products = '<table width="100%" border="0" cellspacing="0" cellpadding="0">';
        $products_query = olc_db_query("select pd.products_id, pd.products_name from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_NOTIFICATIONS . " pn where pn.customers_id = '" . (int) $_SESSION['customer_id'] . "' and pn.products_id = pd.products_id and pd.language_id = '" . SESSION_LANGUAGE_ID . "' order by pd.products_name");
        while ($products = olc_db_fetch_array($products_query)) {
            $notifications_products .= '

                  <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="javascript:checkBox(\'products[' . $counter . ']\')">
                    <td class="main" width="30">' . olc_draw_checkbox_field('products[' . $counter . ']', $products['products_id'], true, 'onclick="javascript:checkBox(\'products[' . $counter . ']\')"') . '</td>
                    <td class="main"><b>' . $products['products_name'] . '</b></td>
                  </tr> ';
            $counter++;
        }
        $notifications_products .= '</table>';
        $smarty->assign('PRODUCTS_NOTIFICATION', $notifications_products);
    } else {
    }
}
$smarty->assign('FORM_ACTION', olc_draw_form('account_notifications', olc_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', SSL)) . olc_draw_hidden_field('action', 'process'));
$smarty->assign('BUTTON_BACK', HTML_A_START . olc_href_link(FILENAME_ACCOUNT, '', SSL) . '">' . olc_image_button('button_back.gif', IMAGE_BUTTON_BACK) . HTML_A_END);
$smarty->assign('BUTTON_CONTINUE', olc_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE));
$main_content = $smarty->fetch(CURRENT_TEMPLATE_MODULE . 'account_notifications' . HTML_EXT, SMARTY_CACHE_ID);
$smarty->assign(MAIN_CONTENT, $main_content);
require BOXES;
        $homepage_content = $a_homepage . olc_draw_hidden_field('a_homepage');
    }
} else {
    $homepage_content = olc_draw_input_field('a_homepage', $affiliate['affiliate_homepage']) . HTML_NBSP . ENTRY_AFFILIATE_HOMEPAGE_TEXT;
}
$module_smarty->assign('homepage_content', $homepage_content);
if ($is_read_only == false) {
    $module_smarty->assign('PASSWORD_READONLY', FALSE_STRING_S);
    if ($error == true) {
        $module_smarty->assign('error', TRUE_STRING_S);
        if ($entry_password_error == true) {
            $password_content = olc_draw_password_field('a_password') . HTML_NBSP . ENTRY_PASSWORD_ERROR;
        } else {
            $password_content = PASSWORD_HIDDEN . olc_draw_hidden_field('a_password') . olc_draw_hidden_field('a_confirmation');
        }
    } else {
        $password_content = olc_draw_password_field('a_password') . HTML_NBSP . ENTRY_PASSWORD_TEXT;
    }
    if ($error == false || $entry_password_error == true) {
        $password_confirmation_content = olc_draw_password_field('a_confirmation') . HTML_NBSP . ENTRY_PASSWORD_CONFIRMATION_TEXT;
    }
    $agb_content = olc_draw_checkbox_field('a_agb', $value = '1', $checked = $affiliate['affiliate_agb']) . sprintf(ENTRY_AFFILIATE_ACCEPT_AGB, olc_href_link(FILENAME_CONTENT, 'coID=900', SSL));
    if ($entry_agb_error == true) {
        $agb_content .= HTML_BR . ENTRY_AFFILIATE_AGB_ERROR;
    }
    $module_smarty->assign('agb_content', $agb_content);
    $module_smarty->assign('password_content', $password_content);
    $module_smarty->assign('password_confirmation_content', $password_confirmation_content);
}
$module = $module_smarty->fetch(CURRENT_TEMPLATE_MODULE . 'affiliate_account_details' . HTML_EXT, $cacheid);
$smarty->assign(MAIN_CONTENT, $module);
        $manufacturer_inputs_string = '';
        $languages = olc_get_languages();
        for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
            $manufacturer_inputs_string .= HTML_BR . olc_image(DIR_WS_LANGUAGES . $languages[$i]['directory'] . '/admin/images/' . $languages[$i]['image'], $languages[$i]['name']) . HTML_NBSP . olc_draw_input_field('manufacturers_url[' . $languages[$i]['id'] . ']', olc_get_manufacturer_url($mInfo->manufacturers_id, $languages[$i]['id']), $field_size);
        }
        $contents[] = array('text' => HTML_BR . TEXT_MANUFACTURERS_URL . $manufacturer_inputs_string);
        $contents[] = array('align' => 'center', 'text' => HTML_BR . olc_image_submit('button_save.gif', IMAGE_SAVE) . BLANK . HTML_A_START . olc_href_link(FILENAME_MANUFACTURERS, $page_parameter . '&mID=' . $mInfo->manufacturers_id) . '">' . olc_image_button('button_cancel.gif', IMAGE_CANCEL) . HTML_A_END);
        break;
    case 'delete':
        $heading[] = array('text' => HTML_B_START . TEXT_HEADING_DELETE_MANUFACTURER . HTML_B_END);
        $contents = array('form' => olc_draw_form('manufacturers', FILENAME_MANUFACTURERS, $page_parameter . '&mID=' . $mInfo->manufacturers_id . '&action=deleteconfirm'));
        $contents[] = array('text' => TEXT_DELETE_INTRO);
        $contents[] = array('text' => '<br/><b>' . $mInfo->manufacturers_name . HTML_B_END);
        $contents[] = array('text' => HTML_BR . olc_draw_checkbox_field('delete_image', '', true) . BLANK . TEXT_DELETE_IMAGE);
        if ($mInfo->products_count > 0) {
            $contents[] = array('text' => HTML_BR . olc_draw_checkbox_field('delete_products') . BLANK . TEXT_DELETE_PRODUCTS);
            $contents[] = array('text' => HTML_BR . sprintf(TEXT_DELETE_WARNING_PRODUCTS, $mInfo->products_count));
        }
        $contents[] = array('align' => 'center', 'text' => HTML_BR . olc_image_submit('button_delete.gif', IMAGE_DELETE) . BLANK . HTML_A_START . olc_href_link(FILENAME_MANUFACTURERS, $page_parameter . '&mID=' . $mInfo->manufacturers_id) . '">' . olc_image_button('button_cancel.gif', IMAGE_CANCEL) . HTML_A_END);
        break;
    default:
        if (is_object($mInfo)) {
            $heading[] = array('text' => HTML_B_START . $mInfo->manufacturers_name . HTML_B_END);
            $contents[] = array('align' => 'center', 'text' => HTML_A_START . olc_href_link(FILENAME_MANUFACTURERS, $page_parameter . '&mID=' . $mInfo->manufacturers_id . '&action=edit') . '">' . olc_image_button('button_edit.gif', IMAGE_EDIT) . '</a>
			<a href="' . olc_href_link(FILENAME_MANUFACTURERS, $page_parameter . '&mID=' . $mInfo->manufacturers_id . '&action=delete') . '">' . olc_image_button('button_delete.gif', IMAGE_DELETE) . HTML_A_END);
            $contents[] = array('text' => HTML_BR . TEXT_DATE_ADDED . BLANK . olc_date_short($mInfo->date_added));
            if (olc_not_null($mInfo->last_modified)) {
                $contents[] = array('text' => TEXT_LAST_MODIFIED . BLANK . olc_date_short($mInfo->last_modified));
            }
            $contents[] = array('text' => HTML_BR . olc_info_image($mInfo->manufacturers_image, $mInfo->manufacturers_name));
            $contents[] = array('text' => HTML_BR . TEXT_PRODUCTS . BLANK . $mInfo->products_count);
            <td><table border="0" cellspacing="0" cellpadding="2">
              <tr>
                <td class="main"><b><?php 
    echo PAYMENT_STATUS;
    ?>
</b> <?php 
    echo olc_draw_pull_down_menu('status', $payments_statuses, $payments['affiliate_payment_status']);
    ?>
</td>
              </tr>
              <tr>
                <td class="main"><b><?php 
    echo PAYMENT_NOTIFY_AFFILIATE;
    ?>
</b><?php 
    echo olc_draw_checkbox_field('notify', '', true);
    ?>
</td>
              </tr>
            </table></td>
            <td valign="top"><?php 
    echo olc_image_submit('button_update.gif', IMAGE_UPDATE);
    ?>
</td>
          </tr>
        </table></td>
      </form></tr>

      <tr>
        <td><?php 
    echo olc_draw_separator('pixel_trans.gif', '1', '10');
Ejemplo n.º 10
0
    echo $orders_split->display_links($orders_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $page, olc_get_all_get_params(array('page', 'oID', 'action')));
    ?>
</td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
<?php 
    $heading = array();
    $contents = array();
    switch ($action) {
        case 'delete':
            $heading[] = array('text' => HTML_B_START . TEXT_INFO_HEADING_DELETE_ORDER . HTML_B_END);
            $contents = array('form' => olc_draw_form('orders', FILENAME_ORDERS, olc_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=deleteconfirm'));
            $contents[] = array('text' => TEXT_INFO_DELETE_INTRO . '<br/><br/><b>' . $cInfo->customers_firstname . BLANK . $cInfo->customers_lastname . HTML_B_END);
            $contents[] = array('text' => HTML_BR . olc_draw_checkbox_field('restock') . BLANK . TEXT_INFO_RESTOCK_PRODUCT_QUANTITY);
            $contents[] = array('align' => 'center', 'text' => HTML_BR . olc_image_submit('button_delete.gif', IMAGE_DELETE) . BLANK . HTML_A_START . olc_href_link(FILENAME_ORDERS, olc_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id) . '">' . olc_image_button('button_cancel.gif', IMAGE_CANCEL) . HTML_A_END);
            break;
        default:
            if (is_object($oInfo)) {
                $heading[] = array('text' => '<b>[' . $oInfo->orders_id . ']&nbsp;&nbsp;' . olc_datetime_short($oInfo->date_purchased) . HTML_B_END);
                $contents[] = array('align' => 'center', 'text' => HTML_A_START . olc_href_link(FILENAME_ORDERS, olc_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit') . '">' . olc_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . olc_href_link(FILENAME_ORDERS, olc_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=delete') . '">' . olc_image_button('button_delete.gif', IMAGE_DELETE) . HTML_A_END);
                //$contents[] = array('align' => 'center', 'text' => EMPTY_STRING);
                $contents[] = array('text' => HTML_BR . TEXT_DATE_ORDER_CREATED . BLANK . olc_date_short($oInfo->date_purchased));
                if (olc_not_null($oInfo->last_modified)) {
                    $contents[] = array('text' => TEXT_DATE_ORDER_LAST_MODIFIED . BLANK . olc_date_short($oInfo->last_modified));
                }
                $contents[] = array('text' => HTML_BR . TEXT_INFO_PAYMENT_METHOD . BLANK . $oInfo->payment_method);
                //begin PayPal_Shopping_Cart_IPN
                if (strtolower($oInfo->payment_method) == 'paypal_ipn') {
                    include_once PAYPAL_IPN_DIR . 'Functions/general.func.php';
$smarty->assign('INPUT_KEYWORDS', olc_draw_input_field('keywords', EMPTY_STRING, 'style="width: 100%"'));
$smarty->assign('CHECKBOX_DESCRIPTION', olc_draw_checkbox_field('search_in_description', '1'));
$smarty->assign('HELP_LINK', 'javascript:popupWindow(\'' . olc_href_link(FILENAME_POPUP_SEARCH_HELP) . '\'' . RPAREN);
$smarty->assign('BUTTON_SUBMIT', olc_image_submit('button_search.gif', IMAGE_BUTTON_SEARCH));
$options_box = '
<table border="0" cellspacing="0" cellpadding="2">
  <tr>
    <td class="fieldKey">' . ENTRY_CATEGORIES . '</td>
    <td class="fieldValue">
    	' . olc_draw_pull_down_menu('categories_id', olc_get_categories(array(array('id' => EMPTY_STRING, 'text' => TEXT_ALL_CATEGORIES)))) . HTML_BR . '
		</td>
  </tr>
  <tr>
    <td class="fieldKey">&nbsp;</td>
    <td class="smallText">
    	' . olc_draw_checkbox_field('inc_subcat', '1', true) . BLANK . ENTRY_INCLUDE_SUBCATEGORIES . '
   	</td>
  </tr>
';
$manufacturers_pulldown = olc_get_manufacturers();
if ($manufacturers_pulldown) {
    $options_box .= '
	<tr>
    <td class="fieldKey">' . ENTRY_MANUFACTURERS . '</td>
    <td class="fieldValue">' . olc_draw_pull_down_menu('manufacturers_id', $manufacturers_pulldown) . '</td>
  </tr>
';
}
$options_box .= '
  <tr>
    <td class="fieldKey">' . ENTRY_PRICE_FROM . '</td>
Ejemplo n.º 12
0
function display_checkbox_field($smarty_name, $field_desc, $field_desc_size, $field_name, $field_condition, $field_value, $error, $entry_error, $entry_error_desc)
{
    field_init($field_name, $field_desc, $field_desc_size, $field_backcolor, $error, $entry_error, $entry_error_desc);
    global $have_entry_error, $error_text, $display_text, $IsUserMode;
    if ($IsUserMode) {
        global $smarty;
    }
    $checkbox_field = olc_draw_checkbox_field($field_name, $field_condition, false, $field_value);
    $checkbox_field .= $field_desc . ERROR_SPAN_START . HTML_NBSP . ERROR_SPAN_END;
    if ($IsUserMode) {
        $smarty->assign($smarty_name, $checkbox_field);
    } else {
        $display_text .= $checkbox_field . DOUBLE_SPACE;
    }
    field_output($field_name, 'dummmy_check', EMPTY_STRING);
}
Ejemplo n.º 13
0
<?php 
$heading = array();
$contents = array();
switch ($_GET['action']) {
    case 'backup':
        $heading[] = array('text' => HTML_B_START . TEXT_INFO_HEADING_NEW_BACKUP . HTML_B_END);
        $contents = array('form' => olc_draw_form('backup', FILENAME_BACKUP, 'action=backupnow'));
        $contents[] = array('text' => TEXT_INFO_NEW_BACKUP);
        if ($messageStack->size > 0) {
            $contents[] = array('text' => HTML_BR . olc_draw_radio_field('compress', 'no', true) . BLANK . TEXT_INFO_USE_NO_COMPRESSION);
            $contents[] = array('text' => HTML_BR . olc_draw_radio_field('download', 'yes', true) . BLANK . TEXT_INFO_DOWNLOAD_ONLY . '*<br/><br/>*' . TEXT_INFO_BEST_THROUGH_HTTPS);
        } else {
            $contents[] = array('text' => HTML_BR . olc_draw_radio_field('compress', 'gzip', true) . BLANK . TEXT_INFO_USE_GZIP);
            $contents[] = array('text' => olc_draw_radio_field('compress', 'zip') . BLANK . TEXT_INFO_USE_ZIP);
            $contents[] = array('text' => olc_draw_radio_field('compress', 'no') . BLANK . TEXT_INFO_USE_NO_COMPRESSION);
            $contents[] = array('text' => HTML_BR . olc_draw_checkbox_field('download', 'yes') . BLANK . TEXT_INFO_DOWNLOAD_ONLY . '*<br/><br/>*' . TEXT_INFO_BEST_THROUGH_HTTPS);
        }
        $contents[] = array('align' => 'center', 'text' => HTML_BR . olc_image_submit('button_backup.gif', IMAGE_BACKUP) . '&nbsp;<a href="' . olc_href_link(FILENAME_BACKUP) . '">' . olc_image_button('button_cancel.gif', IMAGE_CANCEL) . HTML_A_END);
        break;
    case 'restore':
        $heading[] = array('text' => HTML_B_START . $buInfo->date . HTML_B_END);
        $contents[] = array('text' => olc_break_string(sprintf(TEXT_INFO_RESTORE, DIR_FS_BACKUP . ($buInfo->compression != TEXT_NO_EXTENSION ? substr($buInfo->file, 0, strrpos($buInfo->file, '.')) : $buInfo->file), $buInfo->compression != TEXT_NO_EXTENSION ? TEXT_INFO_UNPACK : ''), 35, BLANK));
        $contents[] = array('align' => 'center', 'text' => '<br/><a href="' . olc_href_link(FILENAME_BACKUP, 'file=' . $buInfo->file . '&action=restorenow') . '">' . olc_image_button('button_restore.gif', IMAGE_RESTORE) . '</a>&nbsp;<a href="' . olc_href_link(FILENAME_BACKUP, 'file=' . $buInfo->file) . '">' . olc_image_button('button_cancel.gif', IMAGE_CANCEL) . HTML_A_END);
        break;
    case 'restorelocal':
        $heading[] = array('text' => HTML_B_START . TEXT_INFO_HEADING_RESTORE_LOCAL . HTML_B_END);
        $contents = array('form' => olc_draw_form('restore', FILENAME_BACKUP, 'action=restorelocalnow', 'post', 'enctype="multipart/form-data"'));
        $contents[] = array('text' => TEXT_INFO_RESTORE_LOCAL . '<br/><br/>' . TEXT_INFO_BEST_THROUGH_HTTPS);
        $contents[] = array('text' => HTML_BR . olc_draw_file_field('sql_file'));
        $contents[] = array('text' => TEXT_INFO_RESTORE_LOCAL_RAW_FILE);
        $contents[] = array('align' => 'center', 'text' => HTML_BR . olc_image_submit('button_restore.gif', IMAGE_restore) . '&nbsp;<a href="' . olc_href_link(FILENAME_BACKUP) . '">' . olc_image_button('button_cancel.gif', IMAGE_CANCEL) . HTML_A_END);
$orders_query = olc_db_query("select orders_id from " . TABLE_ORDERS . " where customers_id = '" . (int) $_SESSION['customer_id'] . "' order by date_purchased desc limit 1");
$orders = olc_db_fetch_array($orders_query);
if ($global['global_product_notifications'] != '1') {
    $products_array = array();
    $products_query = olc_db_query("select products_id, products_name from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int) $orders['orders_id'] . "' order by products_name");
    while ($products = olc_db_fetch_array($products_query)) {
        $products_array[] = array('id' => $products['products_id'], 'text' => $products['products_name']);
    }
}
require DIR_WS_INCLUDES . 'header.php';
if ($global['global_product_notifications'] != '1') {
    $notifications = '<p class="productsNotifications">';
    $products_displayed = array();
    for ($i = 0, $n = sizeof($products_array); $i < $n; $i++) {
        if (!in_array($products_array[$i]['id'], $products_displayed)) {
            $notifications .= olc_draw_checkbox_field('notify[]', $products_array[$i]['id']) . BLANK . $products_array[$i]['text'] . HTML_BR;
            $products_displayed[] = $products_array[$i]['id'];
        }
    }
    $notifications .= '</p>';
} else {
    $notifications .= TEXT_SEE_ORDERS . '<br/><br/>' . TEXT_CONTACT_STORE_OWNER;
}
$smarty->assign('NOTIFICATION_BLOCK', $notifications);
$smarty->assign('FORM_ACTION', olc_draw_form('order', olc_href_link(FILENAME_CHECKOUT_SUCCESS, 'action=update', SSL)));
$smarty->assign('BUTTON_CONTINUE', olc_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE));
$button_print_link = olc_href_link(FILENAME_PRINT_ORDER, 'oID=' . $orders['orders_id'], SSL, true, true, false);
$title = PRINT_ORDER_CONFIRMATION;
if (INCLUDE_PDF_INVOICE) {
    $parameter = EMPTY_STRING;
    $title .= PDF_FORMAT;
        echo "<option VALUE=\"" . $current_product_id . "\">" . $title;
    }
    echo "</SELECT>";
    echo "</td></tr>";
    // start change for Attribute Copy
    $copy_query = olc_db_query("SELECT DISTINCT pd.products_name, pd.products_id FROM " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_id = pd.products_id AND pd.products_id LIKE '%' AND pd.language_id = '" . SESSION_LANGUAGE_ID . "' ORDER BY pd.products_name ASC");
    if (olc_db_num_rows($copy_query)) {
        echo "<tr>";
        echo "<td class=\"main\"><br/><b>" . TEXT_SELECT_PRODUCT_COPY . "<br/></td>";
        echo "</tr>";
        echo "<tr>";
        echo "<td class=\"main\"><select name=\"copy_product_id\">";
        echo '<option value="0">' . TEXT_SELECT_PRODUCT_COPY_NO_COPY . '</option>';
        while ($copy_res = olc_db_fetch_array($copy_query, olc_db_ASSOC)) {
            echo '<option value="' . $copy_res['products_id'] . '">' . $copy_res['products_name'] . '</option>';
        }
        echo '</select></td></tr>';
        echo "<tr>";
        echo "\t<td class=\"main\">" . HTML_BR . olc_draw_checkbox_field('no_edit', TRUE_STRING_S, false) . HTML_NBSP . TEXT_ATTRIBUTES_DIRECT_STORE . "</td>";
        echo "</tr>";
        // end change for Attribute Copy
    }
    echo "<tr>";
    echo "\t<td class=\"main\"><br/>" . olc_image_submit('button_edit.gif', EMPTY_STRING) . "</td>";
    echo "</tr>";
} else {
    echo TEXT_ATTRIBUTES_NO_PRODUCTS;
}
?>
</form>
require_once DIR_FS_INC . 'olc_draw_selection_field.inc.php';
require_once DIR_FS_INC . 'olc_image_button.inc.php';
if (!isset($_SESSION['customer_id'])) {
    olc_redirect(olc_href_link(FILENAME_LOGIN, '', SSL));
}
$newsletter_query = olc_db_query("select customers_newsletter from " . TABLE_CUSTOMERS . " where customers_id = '" . (int) $_SESSION['customer_id'] . APOS);
$newsletter = olc_db_fetch_array($newsletter_query);
if (isset($_POST['action']) && $_POST['action'] == 'process') {
    if (isset($_POST['newsletter_general']) && is_numeric($_POST['newsletter_general'])) {
        $newsletter_general = olc_db_prepare_input($_POST['newsletter_general']);
    } else {
        $newsletter_general = '0';
    }
    if ($newsletter_general != $newsletter['customers_newsletter']) {
        $newsletter_general = $newsletter['customers_newsletter'] == '1' ? '0' : '1';
        olc_db_query(SQL_UPDATE . TABLE_CUSTOMERS . " set customers_newsletter = '" . (int) $newsletter_general . "' where customers_id = '" . (int) $_SESSION['customer_id'] . APOS);
    }
    $messageStack->add_session('account', SUCCESS_NEWSLETTER_UPDATED, 'success');
    olc_redirect(olc_href_link(FILENAME_ACCOUNT));
}
$breadcrumb->add(NAVBAR_TITLE_1_ACCOUNT_NEWSLETTERS, olc_href_link(FILENAME_ACCOUNT, '', SSL));
$breadcrumb->add(NAVBAR_TITLE_2_ACCOUNT_NEWSLETTERS, olc_href_link(FILENAME_ACCOUNT_NEWSLETTERS, '', SSL));
require DIR_WS_INCLUDES . 'header.php';
$smarty->assign('FORM_ACTION', olc_draw_form('account_newsletter', olc_href_link(FILENAME_ACCOUNT_NEWSLETTERS, '', SSL)) . olc_draw_hidden_field('action', 'process'));
$smarty->assign('CHECKBOX', olc_draw_checkbox_field('newsletter_general', '1', $newsletter['customers_newsletter'] == '1' ? true : false, 'onclick="javascript:checkBox(\'newsletter_general\')"'));
$smarty->assign('BUTTON_BACK', HTML_A_START . olc_href_link(FILENAME_ACCOUNT, '', SSL) . '">' . olc_image_button('button_back.gif', IMAGE_BUTTON_BACK) . HTML_A_END);
$smarty->assign('BUTTON_CONTINUE', olc_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE));
$main_content = $smarty->fetch(CURRENT_TEMPLATE_MODULE . 'account_newsletter' . HTML_EXT, SMARTY_CACHE_ID);
$smarty->assign(MAIN_CONTENT, $main_content);
require BOXES;
$smarty->display(INDEX_HTML);
Ejemplo n.º 17
0
         $shop_content_data = olc_db_fetch_array($shop_content_query);
         if ($shop_content_data['content_file'] != EMPTY_STRING) {
             $conditions = '<iframe SRC="' . DIR_WS_CATALOG . 'media/content/' . $shop_content_data['content_file'] . '" width="100%" height="500" style="background-color:transparent";>';
             $conditions .= '</iframe>';
         } else {
             $conditions = '<textarea name="blabla" cols="60" rows="10" readonly="readonly">' . strip_tags(str_replace(HTML_BR, NEW_LINE, $shop_content_data['content_text'])) . '</textarea>';
         }
         $smarty->assign('FORM_ACTION', olc_draw_form('ec_checkout', FILENAME_EC_PROCESS, olc_href_link(FILENAME_CHECKOUT_CONFIRMATION, EMPTY_STRING, SSL), 'post', 'action=process'));
         $smarty->assign('AGB', $conditions);
         $smarty->assign('AGB_checkbox', olc_draw_checkbox_field('conditions', TRUE_STRING_S));
         $checkout_payment = 'checkout_payment';
         $accept_agb = 'accept_agb';
         $s = olc_get_smarty_config_variable($smarty, $checkout_payment, 'text_' . $accept_agb);
         $smarty->assign(strtoupper($accept_agb), str_replace('@', SESSION_LANGUAGE, $s));
         // W. Kaiser
         $smarty->assign('FERNAG_checkbox', olc_draw_checkbox_field('fernag', TRUE_STRING_S));
         $accept_fernag = 'accept_fernag';
         $s = olc_get_smarty_config_variable($smarty, $checkout_payment, 'text_' . $accept_fernag);
         $smarty->assign(strtoupper($accept_fernag), str_replace('@', SESSION_LANGUAGE, $s));
         // W. Kaiser
         $smarty->assign('BUTTON_CONTINUE', olc_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE));
         $main_content = $smarty->fetch(CURRENT_TEMPLATE_MODULE . 'ec_process' . HTML_EXT, SMARTY_CACHE_ID);
         $smarty->assign(MAIN_CONTENT, $main_content);
         $smarty->display(INDEX_HTML);
     } else {
         $process = true;
     }
 }
 if ($process) {
     require DIR_WS_LANGUAGES . SESSION_LANGUAGE . SLASH . FILENAME_EC_PROCESS;
     require DIR_WS_CLASSES . 'payment.php';
Ejemplo n.º 18
0
	</table></td>
	</tr>
	</table></td>
	<?php 
    $heading = array();
    $contents = array();
    switch ($action) {
        case 'confirm':
            if ($cInfo->customers_id) {
                $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>
include_once DIR_FS_INC . 'olc_get_smarty_config_variable.inc.php';
$conditions_text = 'conditions';
$fernag_text = 'fernag';
$smarty->assign('AGB_checkbox', olc_draw_checkbox_field($conditions_text, TRUE_STRING_S, $_SESSION[$conditions_text]));
$checkout_confirmation = 'checkout_confirmation';
$accept_agb = 'accept_agb';
$s = olc_get_smarty_config_variable($smarty, $checkout_confirmation, 'text_' . $accept_agb);
$smarty->assign(strtoupper($accept_agb), str_replace(ATSIGN, SESSION_LANGUAGE, $s));
//Only display FernAG-Info for a customer in germany or austria from a shop in the same country!
if (CUSTOMER_COUNTRY_ID == STORE_COUNTRY && (STORE_COUNTRY == 81 || STORE_COUNTRY == 14)) {
    // W. Kaiser
    if (!isset($_SESSION[$fernag_text])) {
        $s = $_POST[$fernag_text];
        $_SESSION[$fernag_text] = $s ? $s : $_GET[$fernag_text];
    }
    $s = olc_draw_checkbox_field($fernag_text, TRUE_STRING_S, $_SESSION[$fernag_text]);
} else {
    $s = olc_draw_hidden_field($fernag_text, TRUE_STRING_S);
}
$smarty->assign('FERNAG_checkbox', $s);
$accept_fernag = 'accept_fernag';
$s = olc_get_smarty_config_variable($smarty, $checkout_confirmation, 'text_' . $accept_fernag);
$smarty->assign(strtoupper($accept_fernag), str_replace(ATSIGN, SESSION_LANGUAGE, $s));
$smarty->assign('CHECKOUT_BUTTON', olc_image_submit('button_confirm_order.gif', IMAGE_BUTTON_CONFIRM_ORDER));
$smarty->assign('GENERAL_DISCLAIMER', GENERAL_DISCLAIMER);
$error_message = $_GET['error_message'];
if ($error_message) {
    $smarty->assign('error', nl2br($error_message));
}
require BOXES;
$main_content = $smarty->fetch(CURRENT_TEMPLATE_MODULE . 'checkout_confirmation' . HTML_EXT, SMARTY_CACHE_ID);
        <td align="left"><?php 
        echo olc_draw_input_field('coupon_min_order', $coupon_min_order);
        ?>
</td>
        <td align="left" class="main"><?php 
        echo COUPON_MIN_ORDER_HELP;
        ?>
</td>
      </tr>
      <tr>
        <td align="left" class="main"><?php 
        echo COUPON_FREE_SHIP;
        ?>
</td>
        <td align="left"><?php 
        echo olc_draw_checkbox_field('coupon_free_ship', $coupon_free_ship);
        ?>
</td>
        <td align="left" class="main"><?php 
        echo COUPON_FREE_SHIP_HELP;
        ?>
</td>
      </tr>
      <tr>
        <td align="left" class="main"><?php 
        echo COUPON_CODE;
        ?>
</td>
        <td align="left"><?php 
        echo olc_draw_input_field('coupon_code', $coupon_code);
        ?>
echo '
	<br /><span class="pageHeading">' . PROMOTION_HEADER . '</span>
	<table width="100%" cellpadding="3" cellspacing="0" border="0">
	  <tr>
	    <td valign="top" colspan="2">
				<table width="100%" cellpadding="0" cellspacing="1" border="0">
				  <tr>
				    <td class="main">' . olc_draw_checkbox_field("products_promotion_status", ONE_STRING, $pInfo->products_promotion_status == ONE_STRING) . HTML_NBSP . HTML_B_START . PROMOTION_ON . HTML_B_END . '
				    </td>
				  </tr>
				  <tr>
				    <td class="main">' . olc_draw_checkbox_field("products_promotion_show_title", ONE_STRING, $pInfo->products_promotion_show_title == ONE_STRING) . HTML_NBSP . HTML_B_START . PROMOTION_PRODUCT_TITLE . HTML_B_END . '
					   </td>
				  </tr>
				  <tr>
				    <td class="main">' . olc_draw_checkbox_field("products_promotion_show_desc", ONE_STRING, $pInfo->products_promotion_show_desc == ONE_STRING) . HTML_NBSP . HTML_B_START . PROMOTION_PRODUCT_DESCRIPTION . HTML_B_END . '
					   </td>
				  </tr>
				</table>
				<br/>
				<table cellpadding="2" cellspacing="1" border="0" style="padding-top: 5px;">
				  <tr>
				    <td class="main">' . $lang_image . PROMOTION_TITLE . HTML_B_END . '</td>
				  </tr>
				  <tr>
				    <td class="main">' . $title . '</td>
				  </tr>
				  <tr>
				    <td class="main">' . $lang_image . PROMOTION_IMAGE . HTML_B_END . '</td>
				  </tr>
				  <tr>
         $products_qty .= olc_draw_hidden_field($cart_stock_quantity_text, olc_get_products_stock($product_id), $parameter5);
     }
 }
 $auctionid = $product['auctionid'];
 if ($auctionid) {
     //no deletebox
     $mydelete = EMPTY_STRING;
     //quantity is hidden - no changes can be made by the user
     $myquantity = $products_quantity . str_replace(HASH, $products_quantity, $hidden_quantity) . str_replace(HASH, $product_id, $hidden_product_id);
     //link to ebay-auction
     $mylink = str_replace(HASH, $auctionid, $ebay_link);
     //as title show ebayicon - so user knows that this is the product bought at ebay
     $myimage = HTML_A_START . $mylink . '">' . $ebay_image . HTML_A_END;
 } else {
     //if product is not a auction - deletebox can be shown
     $mydelete = olc_draw_checkbox_field($cart_delete_text, $product_id, false, $parameter2);
     //quantity box can be shown
     $myquantity = $products_qty;
     $myimage = EMPTY_STRING;
     //link to product
     $mylink = str_replace(HASH, $product_id, $link);
 }
 $module_content[$i] = array($products_element_text => $i, $products_name_text => strip_tags($product[$name_text]), $big_products_id_text => $product_id, $products_qty_text => $myquantity, $products_model_text => $product[$model_text], $products_addon_info_text => $myimage . $mark_stock, $products_tax_text => number_format($product[$tax_text], TAX_DECIMAL_PLACES), $products_image_text => $image, $box_delete_text => $mydelete, $products_link_text => $mylink, $products_price_text => $total_price, $products_single_price_text => olc_format_price($price_single, 1, 1), $products_short_description_text => strip_tags(olc_get_short_description($product_id)), $products_attributes_text => EMPTY_STRING);
 //W. Kaiser - AJAX
 // Product options names
 $product_attributes = $product[$attributes_text];
 $attributes_exist = isset($product_attributes) ? true : false;
 if ($attributes_exist) {
     reset($product_attributes);
     while (list($option, $value) = each($product_attributes)) {
         $product_option = $product[$option];
        break;
    case 'copy_to':
        $heading[] = array('text' => HTML_B_START . TEXT_INFO_HEADING_COPY_TO . HTML_B_END);
        $contents = array('form' => olc_draw_form('copy_to', FILENAME_CATEGORIES, 'action=copy_to_confirm&cPath=' . $cPath) . olc_draw_hidden_field('products_id', $pInfo->products_id));
        $contents[] = array('text' => TEXT_INFO_COPY_TO_INTRO);
        $categories_contained = olc_output_generated_category_path($pInfo->products_id, 'product');
        $contents[] = array('text' => HTML_BR . TEXT_INFO_CURRENT_CATEGORIES . '<br/><b>' . $categories_contained . HTML_B_END);
        if (QUICKLINK_ACTIVATED == TRUE_STRING_S) {
            $contents[] = array('text' => '<hr noshade="noshade"/>');
            $contents[] = array('text' => HTML_B_START . TEXT_MULTICOPY . '</b><br/>' . TEXT_MULTICOPY_DESC);
            $cat_tree = olc_get_category_tree();
            $tree = EMPTY_STRING;
            for ($i = 0; $n = sizeof($cat_tree), $i < $n; $i++) {
                $cat_tree_text = $cat_tree[$i]['text'];
                //$tree .='<input type="checkbox" name="cat_ids[]" value="'.$cat_tree[$i]['id'].'"><font size="1">'
                $tree .= olc_draw_checkbox_field('cat_ids[]', $cat_tree[$i]['id'], !(strpos($categories_contained, str_replace(HTML_NBSP, EMPTY_STRING, $cat_tree_text)) === false)) . $cat_tree_text . '</font><br/>';
            }
            $contents[] = array('text' => $tree . '<br/><hr noshade="noshade"/>');
            $contents[] = array('text' => HTML_B_START . TEXT_SINGLECOPY . '</b><br/>' . TEXT_SINGLECOPY_DESC);
        }
        $contents[] = array('text' => HTML_BR . TEXT_CATEGORIES . HTML_BR . olc_draw_pull_down_menu('categories_id', olc_get_category_tree(), $current_category_id));
        $contents[] = array('text' => HTML_BR . TEXT_HOW_TO_COPY . HTML_BR . olc_draw_radio_field('copy_as', 'link', true) . HTML_NBSP . TEXT_COPY_AS_LINK . HTML_BR . olc_draw_radio_field('copy_as', 'duplicate') . HTML_NBSP . TEXT_COPY_AS_DUPLICATE);
        $contents[] = array('align' => 'center', 'text' => HTML_BR . olc_image_submit('button_copy.gif', IMAGE_COPY) . BLANK . HTML_A_START . olc_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id) . '">' . olc_image_button('button_cancel.gif', IMAGE_CANCEL) . HTML_A_END);
        break;
    default:
        if ($rows > 0) {
            if (is_object($cInfo)) {
                // category info box contents
                $heading[] = array('text' => HTML_B_START . $cInfo->categories_name . HTML_B_END);
                $contents[] = array('align' => 'center', 'text' => HTML_A_START . olc_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $cInfo->categories_id . '&action=edit_category') . '">' . olc_image_button('button_edit.gif', IMAGE_EDIT) . '</a>
		<a href="' . olc_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $cInfo->categories_id . '&action=delete_category') . '">' . olc_image_button('button_delete.gif', IMAGE_DELETE) . '</a> <a href="' . olc_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $cInfo->categories_id . '&action=move_category') . '">' . olc_image_button('button_move.gif', IMAGE_MOVE) . HTML_A_END);
     $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:
     if (is_object($cInfo)) {
         $heading[] = array('text' => HTML_B_START . $cInfo->customers_status_name . HTML_B_END);
}
//  echo $customer_id . $customer_status_name . $customer_status_value['customers_status_discount'] . $customer_status_value['customers_status_ot_discount'];
if ($customer_status_value['customers_status_discount'] != 0) {
    $colspan++;
    echo '<td align="right" class="tableHeading">' . TABLE_HEADING_DISCOUNT . '</td>';
}
echo '<td align="right" class="tableHeading">' . TABLE_HEADING_TOTAL . '</td>';
echo '</tr>';
echo '<tr>';
echo '<td colspan="' . $colspan . '">' . olc_draw_separator() . '</td>';
echo '</tr>';
for ($i = 0, $n = sizeof($products); $i < $n; $i++) {
    echo '  <tr>' . NEW_LINE;
    // Delete box only for shopping cart
    if ($is_shopping_cart) {
        echo '    <td align="center" valign="top">' . olc_draw_checkbox_field('cart_delete[]', $products[$i]['id']) . '</td>' . NEW_LINE;
    }
    // Quantity box or information as an input box or text
    if ($is_shopping_cart) {
        echo '    <td align="center" valign="top">' . olc_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . olc_draw_hidden_field('products_id[]', $products[$i]['id']) . '</td>' . NEW_LINE;
    } else {
        echo '    <td align="center" valign="top" class ="main">' . $products[$i]['quantity'] . '</td>' . NEW_LINE;
    }
    // Model
    $link = '    <td valign="top" class="main"><a href="' . olc_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">';
    if ($is_shopping_cart) {
        if ($product_list_model) {
            echo $link . $products[$i]['model'] . '</a></td>' . NEW_LINE;
        }
    }
    // Product name, with or without link
										<tr>
											<td width="10%"><?php 
        echo TEXT_TO;
        ?>
</td>
											<td width="90%">
												<?php 
        for ($i = 0, $n = sizeof($customers_status); $i < $n; $i++) {
            $group_query = olc_db_query("SELECT count(*) as count\n\t\t\t\t\t\t\t\t\t\t\t\t                          FROM " . TABLE_NEWSLETTER_RECIPIENTS . "\n\t\t\t\t\t\t\t\t\t\t\t\t                          WHERE mail_status='1' and\n\t\t\t\t\t\t\t\t\t\t\t\t                          customers_status='" . $customers_status[$i]['id'] . APOS);
            $group_data = olc_db_fetch_array($group_query);
            $group_query = olc_db_query("SELECT count(*) as count\n\t\t\t\t\t\t\t\t\t\t\t\t                          FROM " . TABLE_CUSTOMERS . "\n\t\t\t\t\t\t\t\t\t\t\t\t                          WHERE\n\t\t\t\t\t\t\t\t\t\t\t\t                          customers_status='" . $customers_status[$i]['id'] . APOS);
            $group_data_all = olc_db_fetch_array($group_query);
            echo olc_draw_checkbox_field('status[' . $i . ']', 'yes', true) . BLANK . $customers_status[$i]['text'] . '  <i>(<b>' . $group_data['count'] . HTML_B_END . TEXT_USERS . $group_data_all['count'] . BLANK . BOX_CUSTOMERS . ')
														<br/>';
        }
        echo olc_draw_checkbox_field('status_all', 'yes', false) . ' <b>' . TEXT_NEWSLETTER_ONLY . HTML_B_END;
        ?>
											</td>
										</tr>
										<tr>
										  <td width="10%"><?php 
        echo TEXT_CC;
        ?>
</td>
										  <td width="90%"><?php 
        echo olc_draw_textarea_field('cc', 'soft', '100%', '3', $newsletters_data['cc']);
        ?>
</td>
										</tr>
							      <tr>
								      <td width="10%" valign="top"><?php 
				        	<tr>
					          <td colspan="2" class="errorText">
												' . $error_message . '
										</td>
				          </tr>
';
}
if ($is_customers) {
    $checkbox_xplain = TEXT_SEND_EMAIL;
} else {
    $checkbox_xplain = TEXT_USE_FILTER;
}
$main_content .= '
					        <tr>
					          <td class="pageSubHeading">
					          	' . SELECT_FILE . HTML_BR . olc_draw_file_field($import_file_text) . HTML_BR . $import_file_display . HTML_BR . HTML_BR . SELECT_MAP . HTML_BR . olc_draw_file_field($map_file_text) . HTML_BR . $map_file_display . HTML_BR . olc_draw_checkbox_field($check_box_text, ONE_STRING, $csv_check_box_value == true) . HTML_NBSP . HTML_B_START . $checkbox_xplain . HTML_B_END . HTML_BR . HTML_BR;
if ($not_is_customers) {
    $main_content .= SELECT_FILTER . HTML_BR . olc_draw_file_field($user_filter_file_text) . HTML_BR . $user_filter_file_display . HTML_BR . HTML_BR;
}
$main_content .= olc_draw_submit_button('submit', BUTTON_IMPORT, 'class="button" onclick="javascript:this.blur();"') . '
					          </td>
					        </tr>
	      				</table>
	      				<p>&nbsp;</p>
	      			</td>
  					</tr>
					</table>
        </form>
' . HTML_HR . olc_draw_form($export_text, $script, $export_parameter, 'POST', 'enctype="multipart/form-data"') . '
					<table width="100%" border="0" cellspacing="5" cellpadding="0">
					  <tr>
</td>
	</tr>
	</table></td>
	</tr>
	</table></td>
	<?php 
    $heading = array();
    $contents = array();
    switch ($_GET['action']) {
        case 'delete':
            $heading[] = array('text' => HTML_B_START . $abInfo->affiliate_banners_title . HTML_B_END);
            $contents = array('form' => olc_draw_form('affiliate_banners', FILENAME_AFFILIATE_BANNER_MANAGER, 'page=' . $_GET['page'] . '&abID=' . $abInfo->affiliate_banners_id . '&action=deleteconfirm'));
            $contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
            $contents[] = array('text' => '<br/><b>' . $abInfo->affiliate_banners_title . HTML_B_END);
            if ($abInfo->affiliate_banners_image) {
                $contents[] = array('text' => HTML_BR . olc_draw_checkbox_field('delete_image', 'on', true) . BLANK . TEXT_INFO_DELETE_IMAGE);
            }
            $contents[] = array('align' => 'center', 'text' => HTML_BR . olc_image_submit('button_delete.gif', IMAGE_DELETE) . '&nbsp;<a href="' . olc_href_link(FILENAME_AFFILIATE_BANNER_MANAGER, 'page=' . $_GET['page'] . '&abID=' . $_GET['abID']) . '">' . olc_image_button('button_cancel.gif', IMAGE_CANCEL) . HTML_A_END);
            break;
        default:
            if (is_object($abInfo)) {
                $sql = "select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . $abInfo->affiliate_products_id . "' and language_id = '" . SESSION_LANGUAGE_ID . APOS;
                $product_description_query = olc_db_query($sql);
                $product_description = olc_db_fetch_array($product_description_query);
                $heading[] = array('text' => HTML_B_START . $abInfo->affiliate_banners_title . HTML_B_END);
                $contents[] = array('align' => 'center', 'text' => HTML_A_START . olc_href_link(FILENAME_AFFILIATE_BANNER_MANAGER, 'page=' . $_GET['page'] . '&abID=' . $abInfo->affiliate_banners_id . '&action=new') . '">' . olc_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . olc_href_link(FILENAME_AFFILIATE_BANNER_MANAGER, 'page=' . $_GET['page'] . '&abID=' . $abInfo->affiliate_banners_id . '&action=delete') . '">' . olc_image_button('button_delete.gif', IMAGE_DELETE) . HTML_A_END);
                $contents[] = array('text' => $product_description['products_name']);
                $contents[] = array('text' => HTML_BR . TEXT_BANNERS_DATE_ADDED . BLANK . olc_date_short($abInfo->affiliate_date_added));
                $contents[] = array('text' => '' . sprintf(TEXT_BANNERS_STATUS_CHANGE, olc_date_short($abInfo->affiliate_date_status_change)));
            }
            break;
    $module_smarty->assign('INPUT_CODE', olc_draw_input_field('postcode', $entry['entry_postcode']) . HTML_NBSP . (olc_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="inputRequirement">' . ENTRY_POST_CODE_TEXT . '</span>' : ''));
    $module_smarty->assign('INPUT_CITY', olc_draw_input_field('city', $entry['entry_city']) . HTML_NBSP . (olc_not_null(ENTRY_CITY_TEXT) ? '<span class="inputRequirement">' . ENTRY_CITY_TEXT . '</span>' : ''));
    if (ACCOUNT_STATE == TRUE_STRING_S) {
        $module_smarty->assign('state', '1');
        if ($process) {
            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($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_input = olc_draw_pull_down_menu('state', $zones_array);
            } else {
                $state_input = olc_draw_input_field('state');
            }
        } else {
            $state_input = olc_draw_input_field('state', olc_get_zone_name($entry['entry_country_id'], $entry['entry_zone_id'], $entry['entry_state']));
        }
        if (olc_not_null(ENTRY_STATE_TEXT)) {
            $state_input .= '&nbsp;<span class="inputRequirement">' . ENTRY_STATE_TEXT;
        }
        $module_smarty->assign('INPUT_STATE', $state_input);
    }
    $module_smarty->assign('SELECT_COUNTRY', olc_get_country_list('country', $entry['entry_country_id']) . HTML_NBSP . (olc_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COUNTRY_TEXT . '</span>' : ''));
    if (isset($edit) && $_SESSION['customer_default_address_id'] != $edit || isset($edit) == false) {
        $module_smarty->assign('new', '1');
        $module_smarty->assign('CHECKBOX_PRIMARY', olc_draw_checkbox_field('primary', 'on', false));
    }
    $main_content = $module_smarty->fetch(CURRENT_TEMPLATE_MODULE . 'address_book_details' . HTML_EXT, $cacheid);
    $smarty->assign('MODULE_address_book_details', $main_content);
}