Ejemplo n.º 1
0
 function displaySettings()
 {
     $contents = xtc_draw_form('modules', 'easymarketing.php', 'content=save', 'post');
     $module_keys = $this->keys();
     $keys_extra = array();
     for ($j = 0, $k = sizeof($module_keys); $j < $k; $j++) {
         $key_value_query = xtc_db_query("SELECT configuration_key,\n                                              configuration_value,\n                                              use_function,\n                                              set_function\n                                         FROM " . TABLE_CONFIGURATION . "\n                                        WHERE configuration_key = '" . $module_keys[$j] . "'");
         $key_value = xtc_db_fetch_array($key_value_query);
         if ($key_value['configuration_key'] != '') {
             $keys_extra[$module_keys[$j]]['title'] = constant(strtoupper($key_value['configuration_key'] . '_TITLE'));
         }
         $keys_extra[$module_keys[$j]]['value'] = $key_value['configuration_value'];
         if ($key_value['configuration_key'] != '') {
             $keys_extra[$module_keys[$j]]['description'] = constant(strtoupper($key_value['configuration_key'] . '_DESC'));
         }
         $keys_extra[$module_keys[$j]]['use_function'] = $key_value['use_function'];
         $keys_extra[$module_keys[$j]]['set_function'] = $key_value['set_function'];
     }
     $module_info['keys'] = $keys_extra;
     while (list($key, $value) = each($module_info['keys'])) {
         $contents .= '<b>' . $value['title'] . '</b><br />' . $value['description'] . '<br />';
         if ($value['set_function']) {
             eval('$contents .= ' . $value['set_function'] . "'" . $value['value'] . "', '" . $key . "');");
         } else {
             $contents .= xtc_draw_input_field('configuration[' . $key . ']', $value['value']);
         }
         $contents .= '<br/><br/>';
     }
     $contents .= '<br/>' . xtc_button(BUTTON_SAVE);
     $contents .= '<hr />' . xtc_button_link(MODULE_EM_UNINSTALL_BUTTON, xtc_href_link('easymarketing.php', xtc_get_all_get_params(array('content')) . 'content=check_uninstall'));
     return $contents;
 }
function xtc_create_sort_heading($sortby, $colnum, $heading)
{
    $sort_prefix = '';
    $sort_suffix = '';
    if ($sortby) {
        $sort_prefix = '<a href="' . xtc_href_link(basename($_SERVER['PHP_SELF']), xtc_get_all_get_params(array('page', 'info', 'sort')) . 'page=1&sort=' . $colnum . ($sortby == $colnum . 'a' ? 'd' : 'a')) . '" title="' . TEXT_SORT_PRODUCTS . ($sortby == $colnum . 'd' || substr($sortby, 0, 1) != $colnum ? TEXT_ASCENDINGLY : TEXT_DESCENDINGLY) . TEXT_BY . $heading . '" class="productListing-heading">';
        $sort_suffix = (substr($sortby, 0, 1) == $colnum ? substr($sortby, 1, 1) == 'a' ? '+' : '-' : '') . '</a>';
    }
    return $sort_prefix . $heading . $sort_suffix;
}
Ejemplo n.º 3
0
 /**
  * getBuyNowButton
  *
  * @param integer $id
  * @param string $name
  * @return string
  */
 function getBuyNowButton($id, $name)
 {
     global $PHP_SELF;
     return '<a href="' . xtc_href_link(basename($PHP_SELF), 'action=buy_now&BUYproducts_id=' . $id . '&' . xtc_get_all_get_params(array('action')), 'NONSSL') . '">' . xtc_image_button('button_buy_now.gif', TEXT_BUY . $name . TEXT_NOW) . '</a>';
 }
if ($affiliate_payment_split->number_of_rows > 0) {
    $affiliate_payment_values = xtc_db_query($affiliate_payment_split->sql_query);
    $number_of_payment = 0;
    while ($affiliate_payment = xtc_db_fetch_array($affiliate_payment_values)) {
        $number_of_payment++;
        if ($number_of_payment / 2 == floor($number_of_payment / 2)) {
            $affiliate_payment_table .= '<tr class="productListing-even">';
        } else {
            $affiliate_payment_table .= '<tr class="productListing-odd">';
        }
        $affiliate_payment_table .= '<td class="smallText" align="right">' . $affiliate_payment['affiliate_payment_id'] . '</td>';
        $affiliate_payment_table .= '<td class="smallText" align="center">' . xtc_date_short($affiliate_payment['affiliate_payment_date']) . '</td>';
        $affiliate_payment_table .= '<td class="smallText" align="right">' . $xtPrice->xtcFormat($affiliate_payment['affiliate_payment_total'], true) . '</td>';
        $affiliate_payment_table .= '<td class="smallText" align="right">' . $affiliate_payment['affiliate_payment_status_name'] . '</td>';
    }
    $smarty->assign('affiliate_payment_table', $affiliate_payment_table);
}
if ($affiliate_payment_split->number_of_rows > 0) {
    $smarty->assign('affiliate_payment_split_count', $affiliate_payment_split->display_count(TEXT_DISPLAY_NUMBER_OF_PAYMENTS));
    $smarty->assign('affiliate_payment_split_link', $affiliate_payment_split->display_links(MAX_DISPLAY_PAGE_LINKS, xtc_get_all_get_params(array('page', 'info', 'x', 'y'))));
}
$affiliate_payment_values = xtc_db_query("select sum(affiliate_payment_total) as total from " . TABLE_AFFILIATE_PAYMENT . " where affiliate_id = '" . $_SESSION['affiliate_id'] . "'");
$affiliate_payment = xtc_db_fetch_array($affiliate_payment_values);
$smarty->assign('affiliate_payment_total', $xtPrice->xtcFormat($affiliate_payment['total'], true));
$smarty->assign('language', $_SESSION['language']);
$smarty->caching = 0;
$main_content = $smarty->fetch(CURRENT_TEMPLATE . '/module/affiliate_payment.html');
$smarty->assign('main_content', $main_content);
$smarty->assign('language', $_SESSION['language']);
$smarty->caching = 0;
$smarty->display(CURRENT_TEMPLATE . '/index.html');
Ejemplo n.º 5
0
if ($specials_split->number_of_rows > 0) {
    //BOF - Dokuman - 2009-06-05 - replace table with div
    /*
      $smarty->assign('NAVBAR', '
      <table border="0" width="100%" cellspacing="0" cellpadding="2">
                <tr>
                  <td class="smallText">'.$specials_split->display_count(TEXT_DISPLAY_NUMBER_OF_SPECIALS).'</td>
                  <td align="right" class="smallText">'.TEXT_RESULT_PAGE.' '.$specials_split->display_links(MAX_DISPLAY_PAGE_LINKS, xtc_get_all_get_params(array ('page', 'info', 'x', 'y'))).'</td>
                </tr>
              </table>
      ');
    */
    $smarty->assign('NAVBAR', '
  <div style="width:100%;font-size:smaller">
    <div style="float:left">' . $specials_split->display_count(TEXT_DISPLAY_NUMBER_OF_SPECIALS) . '</div>
    <div style="float:right">' . TEXT_RESULT_PAGE . ' ' . $specials_split->display_links(MAX_DISPLAY_PAGE_LINKS, xtc_get_all_get_params(array('page', 'info', 'x', 'y'))) . '</div>
    <br style="clear:both" />
  </div>
  ');
    //EOF - Dokuman - 2009-06-05 - replace table with div
}
$smarty->assign('language', $_SESSION['language']);
$smarty->assign('module_content', $module_content);
$main_content = $smarty->fetch(CURRENT_TEMPLATE . '/module/specials.html');
$smarty->assign('main_content', $main_content);
$smarty->caching = 0;
if (!defined('RM')) {
    $smarty->load_filter('output', 'note');
}
$smarty->display(CURRENT_TEMPLATE . '/index.html');
include 'includes/application_bottom.php';
   http://www.xt-commerce.com

   Copyright (c) 2003 XT-Commerce
   -----------------------------------------------------------------------------------------
   based on: 
   (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
   (c) 2002-2003 osCommerce(add_a_quickie.php,v 1.10 2001/12/19); www.oscommerce.com 

   Released under the GNU General Public License 
   -----------------------------------------------------------------------------------------
   Third Party contribution:
   Add A Quickie v1.0 Autor  Harald Ponce de Leon
    
   Released under the GNU General Public License
   ---------------------------------------------------------------------------------------*/
// reset var
$box_smarty = new smarty();
$box_content = '';
$box_smarty->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
// BOF - GTB - 2010-09-20 - correct the Formular in dependences of the request type SSL / NONSSL
$box_smarty->assign('FORM_ACTION', '<form id="quick_add" method="post" action="' . xtc_href_link(basename($PHP_SELF), xtc_get_all_get_params(array('action')) . 'action=add_a_quickie', $request_type) . '">');
//$box_smarty->assign('FORM_ACTION','<form id="quick_add" method="post" action="' . xtc_href_link(basename($PHP_SELF), xtc_get_all_get_params(array ('action')) . 'action=add_a_quickie', 'NONSSL') . '">');
// EOF - GTB - 2010-09-20 - correct the Formular in dependences of the request type SSL / NONSSL
$box_smarty->assign('INPUT_FIELD', xtc_draw_input_field('quickie', '', 'style="width:170px"'));
$box_smarty->assign('SUBMIT_BUTTON', xtc_image_submit('button_add_quick.gif', BOX_HEADING_ADD_PRODUCT_ID));
$box_smarty->assign('FORM_END', '</form>');
$box_smarty->assign('BOX_CONTENT', $box_content);
$box_smarty->assign('language', $_SESSION['language']);
$box_smarty->caching = 0;
$box_add_a_quickie = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_add_a_quickie.html');
$smarty->assign('box_ADD_QUICKIE', $box_add_a_quickie);
    echo $showMessage;
} elseif ($messageBox == 'ERROR') {
    $showMessage = showMessageError($message);
    echo $showMessage;
}
?>
</div>
<div class="pageHeading col-xs-12 col-sm-6">            
    <p class="h2">
        <?php 
echo MODULE_PAYMENT_BILLSAFE_2_DETAILS;
?>
    </p>
</div>
<div class="pageHeading text-right col-xs-12 col-sm-6"><?php 
echo '<a class="btn btn-default" href="' . xtc_href_link(FILENAME_ORDERS, xtc_get_all_get_params(array('action'))) . '">' . BUTTON_BACK . '</a>';
?>
</div>
<div class="col-xs-12"><img width="100%" height="1" border="0" alt="" src="images/pixel_black.gif"></div>

<div class="col-xs-12 col-sm-4">           
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr>
<td class="main" valign="top"><strong><?php 
echo MODULE_PAYMENT_BILLSAFE_2_BADDRESS;
?>
</strong></td>
</tr><tr>
<td class="main"><?php 
$customer = xtc_db_fetch_array(xtc_db_query('SELECT * FROM billsafe_orders_user_2 WHERE bsorders_id  ="' . xtc_db_input($billsafe_orders['id']) . '"'));
$country_query = xtc_db_query('SELECT countries_name FROM countries WHERE countries_iso_code_2 = "' . xtc_db_input($customer['country']) . '"');
$country = xtc_db_fetch_array($country_query);
Ejemplo n.º 8
0
 $heading = array();
 $contents = array();
 switch ($_GET['action']) {
     case 'delete':
         $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_ORDER . '</b>');
         $contents = array('form' => xtc_draw_form('orders', FILENAME_ORDERS, xtc_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 . ' ' . $cInfo->customers_lastname . '</b>');
         $contents[] = array('text' => '<br />' . xtc_draw_checkbox_field('restock') . ' ' . TEXT_INFO_RESTOCK_PRODUCT_QUANTITY);
         $contents[] = array('align' => 'center', 'text' => '<br /><input type="submit" class="button" value="' . BUTTON_DELETE . '"><a class="button" href="' . xtc_href_link(FILENAME_ORDERS, xtc_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id) . '">' . BUTTON_CANCEL . '</a>');
         break;
     default:
         if (is_object($oInfo)) {
             $heading[] = array('text' => '<b>[' . $oInfo->orders_id . ']&nbsp;&nbsp;' . xtc_datetime_short($oInfo->date_purchased) . '</b>');
             $contents[] = array('align' => 'center', 'text' => '<a class="button" href="' . xtc_href_link(FILENAME_ORDERS, xtc_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit') . '">' . BUTTON_EDIT . '</a> <a class="button" href="' . xtc_href_link(FILENAME_ORDERS, xtc_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=delete') . '">' . BUTTON_DELETE . '</a>');
             if (AFTERBUY_ACTIVATED == 'true') {
                 $contents[] = array('align' => 'center', 'text' => '<a class="button" href="' . xtc_href_link(FILENAME_ORDERS, xtc_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=afterbuy_send') . '">' . BUTTON_AFTERBUY_SEND . '</a>');
             }
             // RATEPAY START
             include 'includes/ratepay_order_buttons.php';
             // RATEPAY END
             //$contents[] = array('align' => 'center', 'text' => '');
             $contents[] = array('text' => '<br />' . TEXT_DATE_ORDER_CREATED . ' ' . xtc_date_short($oInfo->date_purchased));
             if (xtc_not_null($oInfo->last_modified)) {
                 $contents[] = array('text' => TEXT_DATE_ORDER_LAST_MODIFIED . ' ' . xtc_date_short($oInfo->last_modified));
             }
             $contents[] = array('text' => '<br />' . TEXT_INFO_PAYMENT_METHOD . ' ' . $oInfo->payment_method);
             // elari added to display product list for selected order
             $order = new order($oInfo->orders_id);
             // BOF - Tomcraft - 2010-04-22 - Added a missing language definition
             //$contents[] = array ('text' => '<br /><br />'.sizeof($order->products).' Products ');
             $contents[] = array('text' => '<br /><br />' . sizeof($order->products) . '&nbsp;' . TEXT_PRODUCTS);
if (file_exists($pdffile)) {
    $pdflink = xtc_href_link(FILENAME_PDFBILL_DISPLAY, 'oID=' . $_GET['order_id']);
    $pdflink = sprintf('<a href="%s">' . PDFBILL_DOWNLOAD_INVOICE . '</a>', $pdflink);
    $smarty->assign('IPDFBILL_INVOICE_DOWNLOAD', $pdflink);
}
// --- eof -- ipdfbill --------
// Stuff
$smarty->assign('ORDER_NUMBER', $order->info['order_id']);
//DokuMan - 2011-08-31 - fix order_id assignment
$smarty->assign('ORDER_DATE', xtc_date_long($order->info['date_purchased']));
$smarty->assign('ORDER_STATUS', $order->info['orders_status']);
$smarty->assign('BILLING_LABEL', xtc_address_format($order->billing['format_id'], $order->billing, 1, ' ', '<br />'));
$smarty->assign('PRODUCTS_EDIT', xtc_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'));
// web28 - 2011-04-14 - change SSL -> NONSSL
$smarty->assign('SHIPPING_ADDRESS_EDIT', xtc_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL'));
$smarty->assign('BILLING_ADDRESS_EDIT', xtc_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL'));
$smarty->assign('BUTTON_PRINT', '<a style="cursor:pointer" onclick="javascript:window.open(\'' . xtc_href_link(FILENAME_PRINT_ORDER, 'oID=' . $order->info['order_id']) . '\', \'popup\', \'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no, width=640, height=600\')">' . xtc_image_button('button_print.gif', TEXT_PRINT) . '</a>');
$from_history = preg_match("/page=/i", xtc_get_all_get_params());
// referer from account_history yes/no
$back_to = $from_history ? FILENAME_ACCOUNT_HISTORY : FILENAME_ACCOUNT;
// if from account_history => return to account_history
$smarty->assign('BUTTON_BACK', '<a href="' . xtc_href_link($back_to, xtc_get_all_get_params(array('order_id')), 'SSL') . '">' . xtc_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>');
$smarty->assign('language', $_SESSION['language']);
$main_content = $smarty->fetch(CURRENT_TEMPLATE . '/module/account_history_info.html');
$smarty->assign('main_content', $main_content);
$smarty->caching = 0;
if (!defined('RM')) {
    $smarty->load_filter('output', 'note');
}
$smarty->display(CURRENT_TEMPLATE . '/index.html');
include 'includes/application_bottom.php';
Ejemplo n.º 10
0
        while ($specials = xtc_db_fetch_array($specials_query)) {
            $specials_array[] = $specials['products_id'];
        }
    }
    ?>
<!-- BOF - Tomcraft - 2009-11-06 - SPIFFY CAL 2.1 //-->
<script type="text/javascript">
  var specialExpires = new ctlSpiffyCalendarBox("specialExpires", "new_special", "specials_expires","btnDate1","<?php 
    echo $expires_date;
    ?>
",2);
</script>
<!-- EOF - Tomcraft - 2009-11-06 - SPIFFY CAL 2.1 //-->
<div class='col-xs-12'>
     <form name="new_special" <?php 
    echo 'action="' . xtc_href_link(FILENAME_SPECIALS, xtc_get_all_get_params(array('action', 'info', 'sID')) . 'action=' . $form_action, 'NONSSL') . '"';
    ?>
 method="post"><?php 
    if ($form_action == 'update') {
        echo xtc_draw_hidden_field('specials_id', $_GET['sID']);
    }
    ?>
        <div class="col-xs-12">
          
                <div class="main col-xs-12 col-sm-1"><?php 
    echo TEXT_SPECIALS_PRODUCT;
    echo $sInfo->products_name ? "" : '';
    ?>
&nbsp;</div>
	   <?php 
    $price = $sInfo->products_price;
</td>
          <td class="dataTableContent">
            <?php 
        echo '<input type="submit" class="btn btn-default" onclick="this.blur();" value="' . BUTTON_INSERT . '"/>';
        ?>
          </td>
        </form>
      </tr>
      <?php 
    }
    ?>
    
  </table>
  <table border="0" width="100%" cellspacing="0" cellpadding="2">
    <tr>
      <td class="smallText" valign="top"><?php 
    echo $products_split->display_count($products_query_numrows, MAX_DISPLAY_PRODUCTS_SEARCH_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_PRODUCTS);
    ?>
</td>
      <td class="smallText" align="right"><?php 
    echo $products_split->display_links($products_query_numrows, MAX_DISPLAY_PRODUCTS_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], xtc_get_all_get_params(array('page')));
    ?>
</td>
    </tr>
  </table>
  <?php 
}
?>

    </div>
<!-- Artikel Einfügen Ende //-->
Ejemplo n.º 12
0
if (!isset($lng) || !is_object($lng)) {
    //EOF - 2010-02-28 - Fix Undefined variable: lng
    include DIR_WS_CLASSES . 'language.php';
    $lng = new language();
}
$languages_string = '';
$count_lng = '';
reset($lng->catalog_languages);
while (list($key, $value) = each($lng->catalog_languages)) {
    $count_lng++;
    //BOF - Dokuman - 2010-01-29 - code optimization
    //$languages_string .= ' <a href="' . xtc_href_link(basename($PHP_SELF), 'language=' . $key.'&'.xtc_get_all_get_params(array('language', 'currency')), $request_type) . '">' . xtc_image('lang/' .  $value['directory'] .'/' . $value['image'], $value['name']) . '</a> ';
    if (SEARCH_ENGINE_FRIENDLY_URLS == 'true') {
        $languages_string .= ' <a href="' . xtc_href_link(basename($PHP_SELF), 'language=' . $key . '&' . xtc_get_all_get_params(array('language', 'currency')), $request_type) . '">' . xtc_image('lang/' . $value['directory'] . '/' . $value['image'], $value['name']) . '</a> ';
    } else {
        $languages_string .= ' <a href="' . xtc_href_link(basename($PHP_SELF), 'language=' . $key . '&amp;' . xtc_get_all_get_params(array('language', 'currency')), $request_type) . '">' . xtc_image('lang/' . $value['directory'] . '/' . $value['image'], $value['name']) . '</a> ';
    }
    //EOF - Dokuman - 2010-01-29 - code optimization
}
// dont show box if there's only 1 language
if ($count_lng > 1) {
    $box_smarty = new smarty();
    $box_smarty->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
    $box_content = '';
    $box_smarty->assign('BOX_CONTENT', $languages_string);
    $box_smarty->assign('language', $_SESSION['language']);
    // set cache ID
    $box_smarty->caching = 0;
    $box_languages = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_languages.html');
    $smarty->assign('box_LANGUAGES', $box_languages);
}
Ejemplo n.º 13
0
    echo DATETIME;
    ?>
</td>
											<td class="dataTableHeadingContent"><?php 
    echo CUSTOMER;
    ?>
</td>
										</tr>
										<?php 
    foreach ($logs as $log) {
        ?>
											<tr <?php 
        echo $log['event_id'] == $event_id ? 'class="dataTableRowSelected"' : 'class="dataTableRow"';
        ?>
 onmouseover="this.style.cursor='pointer'" onclick="document.location.href='<?php 
        echo xtc_href_link(basename($PHP_SELF), xtc_get_all_get_params(array('event_id')) . 'event_id=' . $log['event_id']);
        ?>
'">
												<td class="dataTableContent"><?php 
        echo $log['event_id'];
        ?>
</td>
												<td class="dataTableContent"><?php 
        echo $log['date_created'];
        ?>
</td>
												<td class="dataTableContent"><?php 
        echo $log['customers_name'];
        ?>
&nbsp;</td>
											</tr>
Ejemplo n.º 14
0
                            if ($_POST['copy_as'] == 'link') {
                                $catfunc->link_product($product_id, $dest_category_id);
                            } elseif ($_POST['copy_as'] == 'duplicate') {
                                $catfunc->duplicate_product($product_id, $dest_category_id);
                            } else {
                                $messageStack->add_session('Copy type not specified.', 'error');
                            }
                        }
                    }
                }
                $action = is_array($_POST['multi_products']) && isset($_POST['link_to_product']) ? '&action=new_product' : '';
                $pID = is_array($_POST['multi_products']) && isset($_POST['multi_products']) ? '&pID=' . end($_POST['multi_products']) : '';
                xtc_redirect(xtc_href_link(FILENAME_CATEGORIES, 'cPath=' . $dest_category_id . $pID . $action . '&' . xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID'))));
            }
            // --- MULTI COPY ENDS ---
            xtc_redirect(xtc_href_link(FILENAME_CATEGORIES, 'cPath=' . $_GET['cPath'] . '&' . xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID'))));
            break;
            #EOB multi_action_confirm
    }
    //EOB switch action
}
//EOB if action
// check if the catalog image directory exists
if (is_dir(DIR_FS_CATALOG_IMAGES)) {
    if (!is_writeable(DIR_FS_CATALOG_IMAGES)) {
        $messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_NOT_WRITEABLE, 'error');
    }
} else {
    $messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_DOES_NOT_EXIST, 'error');
}
// end of pre-checks and actions, HTML output follows
Ejemplo n.º 15
0
 function before_process()
 {
     if (isset($_SESSION['payment']) && $_SESSION['payment'] == $this->code) {
         if (isset($_SESSION['paypal']['paymentId'])) {
             if ($_POST['comments_added'] != '') {
                 $_SESSION['comments'] = xtc_db_prepare_input($_POST['comments']);
             }
             $error_mess = '';
             if (DISPLAY_CONDITIONS_ON_CHECKOUT == 'true' && $_POST['conditions'] != 'conditions') {
                 $error_mess = '1';
             }
             if ($_POST['check_address'] != 'address') {
                 $error_mess .= '2';
             }
             if (!isset($_SESSION['shipping']) || $_SESSION['shipping'] !== false && !is_array($_SESSION['shipping'])) {
                 $error_mess .= '3';
             }
             if ($error_mess != '') {
                 xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_CONFIRMATION, xtc_get_all_get_params(array('conditions_message')) . 'conditions=true&conditions_message=' . $error_mess, 'SSL', true, false));
             }
         }
     }
 }
Ejemplo n.º 16
0
                 xtc_redirect(xtc_href_link(FILENAME_DEFAULT));
             }
         }
     }
     xtc_redirect(xtc_href_link($goto, xtc_get_all_get_params(array('action', 'BUYproducts_id'))));
     break;
 case 'cust_order':
     if (isset($_SESSION['customer_id']) && isset($_GET['pid'])) {
         $_GET['pid'] = (int) $_GET['pid'];
         if (xtc_has_product_attributes($_GET['pid'])) {
             xtc_redirect(xtc_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $_GET['pid']));
         } else {
             $_SESSION['cart']->add_cart($_GET['pid'], $_SESSION['cart']->get_quantity($_GET['pid']) + 1);
         }
     }
     xtc_redirect(xtc_href_link($goto, xtc_get_all_get_params($parameters), 'NONSSL'));
     break;
     // BOF - Tomcraft - 2011-02-01 - Paypal Express Modul
 // BOF - Tomcraft - 2011-02-01 - Paypal Express Modul
 case 'paypal_express_checkout':
     if (defined('MODULE_PAYMENT_PAYPALEXPRESS_STATUS') && MODULE_PAYMENT_PAYPALEXPRESS_STATUS == 'True') {
         if (!is_object($product)) {
             require_once DIR_WS_CLASSES . 'product.php';
             $product = new product();
         }
         $o_paypal->paypal_express_auth_call();
         xtc_redirect($o_paypal->payPalURL);
     }
     break;
     // EOF - Tomcraft - 2011-02-01 - Paypal Express Modul
     ## Paypal
              </tr>
            </table></td>
<?php 
    $heading = array();
    $contents = array();
    switch ($_GET['action']) {
        case 'delete':
            $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_PAYMENT . '</b>');
            $contents = array('form' => xtc_draw_form('payment', FILENAME_AFFILIATE_PAYMENT, xtc_get_all_get_params(array('pID', 'action')) . 'pID=' . $pInfo->affiliate_payment_id . '&action=deleteconfirm'));
            $contents[] = array('text' => TEXT_INFO_DELETE_INTRO . '<br>');
            $contents[] = array('align' => 'center', 'text' => '<br>' . xtc_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . xtc_href_link(AFFILIATE_PAYMENT, xtc_get_all_get_params(array('pID', 'action')) . 'pID=' . $pInfo->affiliate_payment_id) . '">' . xtc_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
            break;
        default:
            if (is_object($pInfo)) {
                $heading[] = array('text' => '<b>[' . $pInfo->affiliate_payment_id . ']&nbsp;&nbsp;' . xtc_datetime_short($pInfo->affiliate_payment_date) . '</b>');
                $contents[] = array('align' => 'center', 'text' => '<a href="' . xtc_href_link(FILENAME_AFFILIATE_PAYMENT, xtc_get_all_get_params(array('pID', 'action')) . 'pID=' . $pInfo->affiliate_payment_id . '&action=edit') . '">' . xtc_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . xtc_href_link(FILENAME_AFFILIATE_PAYMENT, xtc_get_all_get_params(array('pID', 'action')) . 'pID=' . $pInfo->affiliate_payment_id . '&action=delete') . '">' . xtc_image_button('button_delete.gif', IMAGE_DELETE) . '</a>');
                $contents[] = array('align' => 'center', 'text' => '<a href="' . xtc_href_link(FILENAME_AFFILIATE_INVOICE, 'pID=' . $pInfo->affiliate_payment_id) . '" TARGET="_blank">' . xtc_image_button('button_invoice.gif', IMAGE_ORDERS_INVOICE) . '</a> ');
            }
            break;
    }
    if (xtc_not_null($heading) && xtc_not_null($contents)) {
        echo '            <td  width="25%" valign="top">' . "\n";
        $box = new box();
        echo $box->infoBox($heading, $contents);
        echo '            </td>' . "\n";
    }
    ?>
          </tr>
        </table></td>
      </tr>
<?php 
Ejemplo n.º 18
0
            $_SESSION['customer_last_name'] = $check_customer['customers_lastname'];
            $_SESSION['customer_id'] = $check_customer['customers_id'];
            $_SESSION['customer_vat_id'] = $check_customer['customers_vat_id'];
            $_SESSION['customer_default_address_id'] = $check_customer['customers_default_address_id'];
            $_SESSION['customer_country_id'] = $check_country['entry_country_id'];
            $_SESSION['customer_zone_id'] = $check_country['entry_zone_id'];
            $date_now = date('Ymd');
            xtc_db_query("update " . TABLE_CUSTOMERS_INFO . " SET customers_info_date_of_last_logon = now(), customers_info_number_of_logons = customers_info_number_of_logons+1 WHERE customers_info_id = '" . (int) $_SESSION['customer_id'] . "'");
            xtc_write_user_info((int) $_SESSION['customer_id']);
            // restore cart contents
            $_SESSION['cart']->restore_contents();
            if (is_object($econda)) {
                $econda->_loginUser();
            }
            if (isset($_SESSION['REFERER']) && !empty($_SESSION['REFERER'])) {
                xtc_redirect(xtc_href_link($_SESSION['REFERER'], xtc_get_all_get_params(array('review_prod_id')) . (isset($_GET['review_prod_id']) ? 'products_id=' . $_GET['review_prod_id'] : '')));
            } elseif ($_SESSION['cart']->count_contents() > 0 && !isset($_GET['review_prod_id']) && !isset($_GET['order_id'])) {
                xtc_redirect(xtc_href_link(FILENAME_SHOPPING_CART), 'NONSSL');
            } else {
                xtc_redirect(xtc_href_link(FILENAME_DEFAULT), 'NONSSL');
            }
        }
    }
}
$breadcrumb->add(NAVBAR_TITLE_LOGIN, xtc_href_link(FILENAME_LOGIN, '', 'SSL'));
require DIR_WS_INCLUDES . 'header.php';
if (isset($_GET['info_message'])) {
    $info_message = $_GET['info_message'];
}
$smarty->assign('info_message', $info_message);
$smarty->assign('account_option', ACCOUNT_OPTIONS);
                echo TEXT_PAYPAL_CAPTURE_SUBMIT;
                ?>
">
                    </form>
                  </div>
                  <?php 
            }
            if ((in_array('captured', $status_array) || in_array('completed', $status_array)) && $admin_info_array['total'] > $amount_array['refund']) {
                ?>
                  <div class="pp_capture pp_box">
                    <div class="pp_boxheading"><?php 
                echo TEXT_PAYPAL_REFUND;
                ?>
</div>
                    <?php 
                echo xtc_draw_form('capture', FILENAME_ORDERS, xtc_get_all_get_params());
                echo xtc_draw_hidden_field('cmd', 'refund');
                echo '<div class="refund_row">';
                echo '<div class="' . (10 - $count['refund'] > 0 ? 'info_message' : 'error_message') . '">' . TEXT_PAYPAL_REFUND_LEFT . ' ' . (10 - $count['refund']) . '</div>';
                echo '<br/>';
                echo '<label for="refund_comment" style="vertical-align: top; margin-top: 5px;">' . TEXT_PAYPAL_REFUND_COMMENT . '</label>';
                echo xtc_draw_textarea_field('refund_comment', '', '60', '8', '', 'id="refund_comment"');
                echo '<br/>';
                echo '<label for="refund_price">' . TEXT_PAYPAL_REFUND_AMOUNT . '</label>';
                echo xtc_draw_input_field('refund_price', '', 'id="refund_price" style="width: 135px"');
                echo '</div>';
                ?>
                    <br />
                    <input type="submit" class="button" name="refund_submit" value="<?php 
                echo TEXT_PAYPAL_REFUND_SUBMIT;
                ?>
define('ASK_URL', 'http://submissions.ask.com/ping?sitemap=');
$SEO_DOMAINS = array(GOOGLE_URL, LIVE_URL, ASK_URL);
define('SITEMAPINDEX_HEADER', "<?xml version='1.0' encoding='UTF-8'?>" . "\n" . '
          <sitemapindex xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' . "\n" . '
              xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd"' . "\n" . '
              xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' . "\n");
define('SITEMAPINDEX_FOOTER', '</sitemapindex>');
define('SITEMAPINDEX_ENTRY', "\t" . '<sitemap>' . "\n\t\t" . '<loc>%s</loc>' . "\n\t\t" . '<lastmod>%s</lastmod>' . "\n\t" . '</sitemap>' . "\n");
define('SITEMAP_HEADER', "<?xml version='1.0' encoding='UTF-8'?>" . "\n" . '
          <urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' . "\n" . '
                   xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"' . "\n" . '
                   xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' . "\n");
define('SITEMAP_FOOTER', '</urlset>');
define('SITEMAP_ENTRY', "\t" . '<url>' . "\n\t\t" . '<loc>%s</loc>' . "\n\t\t" . '<priority>%s</priority>' . "\n\t\t" . '<lastmod>%s</lastmod>' . "\n\t\t" . '<changefreq>%s</changefreq>' . "\n\t" . '</url>' . "\n");
$smarty = new Smarty();
$breadcrumb->add('Google Sitemap', xtc_href_link(FILENAME_GOOGLE_SITEMAP, xtc_get_all_get_params(), 'NONSSL'));
// include boxes
require DIR_FS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/source/boxes.php';
require DIR_WS_INCLUDES . 'header.php';
include DIR_WS_MODULES . 'default.php';
define('SITEMAP_CATALOG', HTTP_SERVER . DIR_WS_CATALOG);
$usegzip = false;
$autogenerate = false;
$output_to_file = false;
$notify_google = false;
$notify_url = '';
$c_cat_total = 0;
$c_prod_total = 0;
// request over http or command line?
if (count($_GET) > 0) {
    // use gzip
    ?>
"><?php 
    echo BUTTON_CANCEL;
    ?>
</a>
                    <input type="submit" class="button" name="submit" value="<?php 
    echo BUTTON_UPDATE;
    ?>
">
                  </td>
                </tr>
                <?php 
} elseif (isset($_GET['action']) && $_GET['action'] == 'new') {
    $list = $paypal->available_webhooks();
    if (is_array($list) && count($list) > 0) {
        echo xtc_draw_form('config', basename($PHP_SELF), xtc_get_all_get_params(array('action')) . 'action=insert');
        for ($i = 0, $t = count($list); $i < $t; $i++) {
            ?>
                    <tr>
                      <td class="dataTableConfig col-left"><?php 
            echo $list[$i]['name'];
            ?>
</td>
                      <td class="dataTableConfig col-middle">
                        <?php 
            echo xtc_draw_checkbox_field('config[data][' . $i . '][name]', $list[$i]['name'], 'checked="checked"');
            echo xtc_draw_pull_down_menu('config[data][' . $i . '][orders_status]', $orders_statuses, '-1', 'style="width: 300px;"');
            ?>
                      </td>
                      <td class="dataTableConfig col-right"><?php 
            echo $list[$i]['description'];
function shopGetAllGetParams($exclude_array)
{
    return xtc_get_all_get_params($exclude_array);
}
 function build_express_checkout_button()
 {
     // Stand: 01.06.2009
     global $PHP_SELF;
     if (defined('MODULE_PAYMENT_PAYPALEXPRESS_STATUS')) {
         if ($_SESSION['allow_checkout'] == 'true' && $_SESSION['cart']->show_total() > 0 && MODULE_PAYMENT_PAYPALEXPRESS_STATUS == 'true') {
             $unallowed_modules = explode(',', $_SESSION['customers_status']['customers_status_payment_unallowed']);
             if (!in_array('paypalexpress', $unallowed_modules)) {
                 include DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/paypalexpress.php';
                 $alt = defined('MODULE_PAYMENT_PAYPALEXPRESS_ALT_BUTTON') ? MODULE_PAYMENT_PAYPALEXPRESS_ALT_BUTTON : 'PayPal';
                 $source = strtoupper($_SESSION['language_code']) == 'DE' ? 'epaypal_de.gif' : 'epaypal_en.gif';
                 $button = '<a style="cursor:pointer;" onfocus="if(this.blur) this.blur();" onmouseover="window.status = ' . "''" . '; return true;" href="' . xtc_href_link(basename($PHP_SELF), xtc_get_all_get_params(array('action')) . 'action=paypal_express_checkout') . '"><img src="' . DIR_WS_ICONS . $source . '" alt="' . $alt . '" title="' . $alt . '" /></a>';
                 return $button;
             }
         }
     }
     return;
 }
        }
        break;
}
//end switch
if (xtc_not_null($heading) && xtc_not_null($contents)) {
    //display info box
    echo '<div class="col-md-3 col-sm-12 col-xs-12 pull-right edit-box-class">' . "\n";
    echo box::infoBox($heading, $contents);
    // cYbercOsmOnauT - 2011-02-05 - Changed methods of the classes box and tableBox to static
    echo '</div>' . "\n";
    ?>
            <script>
                //responsive_table
                $('#responsive_table').addClass('col-md-9');
            </script>               
            <?php 
}
?>
      </div>

          <div class="smallText" align="center" style="padding:5px;">
          <span style="padding-right:50px;"><?php 
echo $products_split->display_count($products_query_numrows, MAX_DISPLAY_LIST_PRODUCTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_PRODUCTS);
?>
</span>
          <?php 
echo $products_split->display_links($products_query_numrows, MAX_DISPLAY_LIST_PRODUCTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], xtc_get_all_get_params(array('page', 'action', 'pID', 'cID')));
?>
          </div>
          <div class="smallText" valign="top">&nbsp;</div>
 * xt:Commerce is a protected trademark and represented by the xt:Commerce GmbH (Austria)
 *
 * @copyright Copyright 2003-2007 xt:Commerce (Winger/Zanier), www.xt-commerce.com
 * @copyright based on Copyright 2002-2003 osCommerce; www.oscommerce.com
 * @copyright Porttions Copyright 2003-2007 Zen Cart Development Team
 * @copyright Porttions Copyright 2004 DevosC.com
 * @license http://www.xt-commerce.com.com/license/2_0.txt GNU Public License V2.0
 *
 * For questions, help, comments, discussion, etc., please join the
 * xt:Commerce Support Forums at www.xt-commerce.com
 *
 */
if (isset($error)) {
    echo $error;
}
echo xtc_draw_form('refund_transaction', FILENAME_PAYPAL, xtc_get_all_get_params(array('action')) . 'action=perform');
echo xtc_draw_hidden_field('txn_id', $ipn_data['txn_id']);
echo xtc_draw_hidden_field('amount', $ipn_data['mc_gross']);
echo xtc_draw_hidden_field('ipn_id', (int) $_GET['paypal_ipn_id']);
?>
<div class="highlightbox">
	<p class="h3"><?php 
echo TEXT_PAYPAL_CAPTURE_TRANSACTION;
?>
</p>
	<p><?php 
echo TEXT_PAYPAL_NOTE_CAPTURE_INFO;
?>
</p>
        <div class="col-xs-12"><hr noshade></div>
		<div class="col-xs-12">
   ---------------------------------------------------------------------------------------*/
$module_smarty = new Smarty();
$module_smarty->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
$result = true;
// include needed functions
require_once DIR_FS_INC . 'xtc_get_all_get_params.inc.php';
require_once DIR_FS_INC . 'xtc_get_vpe_name.inc.php';
$listing_split = new splitPageResults($listing_sql, isset($_GET['page']) ? (int) $_GET['page'] : 1, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id');
$module_content = array();
$category = array();
if ($listing_split->number_of_rows > 0) {
    $navigation = '
    <table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
        <td class="smallText">' . $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS) . '</td>
        <td class="smallText" align="right">' . TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, xtc_get_all_get_params(array('page', 'info', 'x', 'y', 'keywords')) . (isset($_GET['keywords']) ? '&keywords=' . urlencode($_GET['keywords']) : '')) . '</td>
      </tr>
    </table>';
    $group_check = '';
    if (GROUP_CHECK == 'true') {
        $group_check = "and c.group_permission_" . $_SESSION['customers_status']['customers_status_id'] . "=1 ";
    }
    $category_query = xtDBquery("SELECT cd.categories_description,\n                                      cd.categories_name,\n                                      cd.categories_heading_title,\n                                      c.listing_template,\n                                      c.categories_image\n                                 FROM " . TABLE_CATEGORIES . " c,\n                                      " . TABLE_CATEGORIES_DESCRIPTION . " cd\n                                WHERE c.categories_id = '" . $current_category_id . "'\n                                  AND cd.categories_id = '" . $current_category_id . "'\n                                      " . $group_check . "\n                                  AND cd.language_id = '" . $_SESSION['languages_id'] . "'\n                                LIMIT 1");
    $category = xtc_db_fetch_array($category_query, true);
    $image = '';
    if ($category['categories_image'] != '') {
        $image = DIR_WS_IMAGES . 'categories/' . $category['categories_image'];
        if (!file_exists($image)) {
            $image = DIR_WS_IMAGES . 'categories/noimage.gif';
        }
    }
        if (xtc_not_null($history['delivery_name'])) {
            $order_type = TEXT_ORDER_SHIPPED_TO;
            $order_name = $history['delivery_name'];
        } else {
            $order_type = TEXT_ORDER_BILLED_TO;
            $order_name = $history['billing_name'];
        }
        $module_content[] = array('ORDER_ID' => $history['orders_id'], 'ORDER_STATUS' => $history['orders_status_name'], 'ORDER_DATE' => xtc_date_long($history['date_purchased']), 'ORDER_PRODUCTS' => $products['count'], 'ORDER_TOTAL' => strip_tags($history['order_total']), 'ORDER_BUTTON' => '<a href="' . xtc_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'page=' . (empty($_GET['page']) ? "1" : (int) $_GET['page']) . '&order_id=' . $history['orders_id'], 'SSL') . '">' . xtc_image_button('small_view.gif', SMALL_IMAGE_BUTTON_VIEW) . '</a>');
        require_once DIR_FS_INC . 'xtc_get_tracking_link.php';
        $module_content[count($module_content) - 1]['TRACKING_LINKS'] = xtc_get_tracking_link($history['orders_id']);
    }
}
if ($orders_total > 0) {
    $smarty->assign('SPLIT_BAR', '
	          <div class="smallText" style="clear:both;"><div style="float:left;">' . $history_split->display_count(TEXT_DISPLAY_NUMBER_OF_ORDERS) . '</div>
              <div align="right">' . TEXT_RESULT_PAGE . ' ' . $history_split->display_links(MAX_DISPLAY_PAGE_LINKS, xtc_get_all_get_params(array('page', 'info', 'x', 'y'))) . '</div>
              </div>');
}
$smarty->assign('order_content', $module_content);
$smarty->assign('language', $_SESSION['language']);
$smarty->assign('BUTTON_BACK', '<a href="' . xtc_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . xtc_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>');
$smarty->caching = 0;
$main_content = $smarty->fetch(CURRENT_TEMPLATE . '/module/account_history.html');
$smarty->assign('language', $_SESSION['language']);
$smarty->assign('main_content', $main_content);
$smarty->caching = 0;
if (!defined('RM')) {
    $smarty->load_filter('output', 'note');
}
$smarty->display(CURRENT_TEMPLATE . '/index.html');
include 'includes/application_bottom.php';
Ejemplo n.º 28
0
 $special_expires_date_query = "SELECT expires_date\n                                   FROM " . TABLE_SPECIALS . "\n                                  WHERE products_id = '" . $product->data['products_id'] . "'\n                                    AND status = '1'";
 $special_expires_date_query = xtDBquery($special_expires_date_query);
 $sDate = xtc_db_fetch_array($special_expires_date_query, true);
 $info_smarty->assign('PRODUCTS_EXPIRES', $sDate['expires_date'] != '0000-00-00 00:00:00' ? xtc_date_short($sDate['expires_date']) : '');
 // FSK18
 $info_smarty->assign('PRODUCTS_FSK18', $product->data['products_fsk18'] == '1' ? 'true' : '');
 //get shippingstatus image and name
 if (ACTIVATE_SHIPPING_STATUS == 'true') {
     $info_smarty->assign('SHIPPING_NAME', $main->getShippingStatusName($product->data['products_shippingtime']));
     $info_smarty->assign('SHIPPING_IMAGE', $main->getShippingStatusImage($product->data['products_shippingtime']));
     // BOF - Tutorial: Umsetzung der EU-Verbraucherrichtlinie vom 13.06.2014
     $info_smarty->assign('SHIPPING_NAME_LINK', $main->getShippingStatusName($product->data['products_shippingtime'], true));
     // EOF - Tutorial: Umsetzung der EU-Verbraucherrichtlinie vom 13.06.2014
 }
 // form tags
 $info_smarty->assign('FORM_ACTION', xtc_draw_form('cart_quantity', xtc_href_link(FILENAME_PRODUCT_INFO, xtc_get_all_get_params(array('action')) . 'action=add_product')));
 $info_smarty->assign('FORM_END', '</form>');
 //products formated price
 $info_smarty->assign('PRODUCTS_PRICE', $products_price['formated']);
 //get products vpe
 $info_smarty->assign('PRODUCTS_VPE', $main->getVPEtext($product->data, $products_price['plain']));
 //web28 - 2012-04-17 - use classes function getVPEtext()
 // products id
 $info_smarty->assign('PRODUCTS_ID', $product->data['products_id']);
 // products name
 $info_smarty->assign('PRODUCTS_NAME', $product->data['products_name']);
 // price incl tax and shipping link
 if ($_SESSION['customers_status']['customers_status_show_price'] != '0') {
     if (isset($xtPrice->TAX[$product->data['products_tax_class_id']])) {
         $tax_info = $main->getTaxInfo($xtPrice->TAX[$product->data['products_tax_class_id']]);
         $info_smarty->assign('PRODUCTS_TAX_INFO', $tax_info);
Ejemplo n.º 29
0
 }
 // elari cs v3.x changed for added iplog module
 $contents[] = array('align' => 'center', 'text' => '<table>
                                         <tr>
                                           <td style="text-align: center;">
                                             <a class="btn btn-default" onclick="this.blur();" href="' . xtc_href_link(FILENAME_ORDERS, 'cID=' . $cInfo->customers_id) . '">' . BUTTON_ORDERS . '</a>
                                           </td>
                                           <td style="text-align: center;">
                                             <a class="btn btn-default" onclick="this.blur();" href="' . xtc_href_link(FILENAME_MAIL, 'selected_box=tools&customer=' . $cInfo->customers_email_address) . '">' . BUTTON_EMAIL . '</a>
                                           </td>
                                         </tr>
                                         <tr>
                                           <td style="text-align: center;">
                                             <a class="btn btn-default" onclick="this.blur();" href="' . xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=iplog') . '">' . BUTTON_IPLOG . '</a></td>
                                           <td style="text-align: center;">
                                             <a class="btn btn-default" onclick="this.blur();" href="' . xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=new_order') . '" onclick="return confirm(\'' . NEW_ORDER . '\')">' . BUTTON_NEW_ORDER . '</a>
                                           </td>
                                         </tr>
                                       </table>');
 //BOF - DokuMan - 2010-11-02 - Workaround for customer details not showing on iplog-Box
 if ($action == 'iplog') {
     $info_query = xtc_db_query("SELECT\n                                                          customers_info_date_account_created as date_account_created,\n                                                          customers_info_date_account_last_modified as date_account_last_modified,\n                                                          customers_info_date_of_last_logon as date_last_logon,\n                                                          customers_info_number_of_logons as number_of_logons\n                                                     FROM " . TABLE_CUSTOMERS_INFO . " WHERE customers_info_id = '" . $cInfo->customers_id . "'");
     $info = xtc_db_fetch_array($info_query);
     $country_query = xtc_db_query("SELECT countries_name FROM " . TABLE_COUNTRIES . " WHERE countries_id = '" . (int) $cInfo->entry_country_id . "'");
     $country = xtc_db_fetch_array($country_query);
     $reviews_query = xtc_db_query("SELECT COUNT(*) as number_of_reviews FROM " . TABLE_REVIEWS . " WHERE customers_id = '" . (int) $cInfo->customers_id . "'");
     $reviews = xtc_db_fetch_array($reviews_query);
     $contents[] = array('text' => '<br />' . TEXT_DATE_ACCOUNT_CREATED . ' ' . xtc_date_short($info['date_account_created']));
     $contents[] = array('text' => '<br />' . TEXT_DATE_ACCOUNT_LAST_MODIFIED . ' ' . xtc_date_short($info['date_account_last_modified']));
     $contents[] = array('text' => '<br />' . TEXT_INFO_DATE_LAST_LOGON . ' ' . xtc_date_short($info['date_last_logon']));
     $contents[] = array('text' => '<br />' . TEXT_INFO_NUMBER_OF_LOGONS . ' ' . $info['number_of_logons']);
// create smarty elements
$smarty = new Smarty();
// include boxes
require DIR_FS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/source/boxes.php';
// include needed functions
require_once DIR_FS_INC . 'xtc_count_customer_address_book_entries.inc.php';
require_once DIR_FS_INC . 'xtc_address_label.inc.php';
require_once DIR_FS_INC . 'xtc_get_address_format_id.inc.php';
require_once DIR_FS_INC . 'xtc_address_format.inc.php';
require_once DIR_FS_INC . 'xtc_get_country_name.inc.php';
require_once DIR_FS_INC . 'xtc_get_zone_code.inc.php';
// BOF - Tomcraft - 2009-10-03 - Paypal Express Modul
$params = '';
$link_checkout_shipping = FILENAME_CHECKOUT_SHIPPING;
if (isset($_SESSION['paypal']['PayerID'])) {
    $params = xtc_get_all_get_params();
    $link_checkout_shipping = FILENAME_CHECKOUT_CONFIRMATION;
} elseif (@is_array($_SESSION['nvpReqArray'])) {
    $link_checkout_shipping = FILENAME_PAYPAL_CHECKOUT;
    if (PAYPAL_EXPRESS_ADDRESS_CHANGE == 'true') {
        $_SESSION['pp_allow_address_change'] = 'true';
    }
}
// EOF - Tomcraft - 2009-10-03 - Paypal Express Modul
// if the customer is not logged on, redirect them to the login page
if (!isset($_SESSION['customer_id'])) {
    xtc_redirect(xtc_href_link(FILENAME_LOGIN, '', 'SSL'));
}
// if there is nothing in the customers cart, redirect them to the shopping cart page
if ($_SESSION['cart']->count_contents() < 1) {
    xtc_redirect(xtc_href_link(FILENAME_SHOPPING_CART));