}
     $messageStack->add_session(SUCCESS_BILLING, 'success');
     vam_redirect(vam_href_link(FILENAME_AFFILIATE_PAYMENT, vam_get_all_get_params(array('action')) . 'action=edit'));
     break;
 case 'update_payment':
     $pID = vam_db_prepare_input($_GET['pID']);
     $status = vam_db_prepare_input($_POST['status']);
     $payment_updated = false;
     $check_status_query = vam_db_query("select af.affiliate_email_address, ap.affiliate_lastname, ap.affiliate_firstname, ap.affiliate_payment_status, ap.affiliate_payment_date, ap.affiliate_payment_date from " . TABLE_AFFILIATE_PAYMENT . " ap, " . TABLE_AFFILIATE . " af where affiliate_payment_id = '" . vam_db_input($pID) . "' and af.affiliate_id = ap.affiliate_id ");
     $check_status = vam_db_fetch_array($check_status_query);
     if ($check_status['affiliate_payment_status'] != $status) {
         vam_db_query("update " . TABLE_AFFILIATE_PAYMENT . " set affiliate_payment_status = '" . vam_db_input($status) . "', affiliate_last_modified = now() where affiliate_payment_id = '" . vam_db_input($pID) . "'");
         $affiliate_notified = '0';
         // Notify Affiliate
         if ($_POST['notify'] == 'on') {
             $email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_AFFILIATE_PAYMENT_NUMBER . ' ' . $pID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . vam_catalog_href_link(FILENAME_CATALOG_AFFILIATE_PAYMENT_INFO, 'payment_id=' . $pID, 'SSL') . "\n" . EMAIL_TEXT_PAYMENT_BILLED . ' ' . vam_date_long($check_status['affiliate_payment_date']) . "\n\n" . sprintf(EMAIL_TEXT_STATUS_UPDATE, $payments_status_array[$status]);
             vam_php_mail(AFFILIATE_EMAIL_ADDRESS, EMAIL_SUPPORT_NAME, $check_status['affiliate_email_address'], $check_status['affiliate_firstname'] . ' ' . $check_status['affiliate_lastname'], '', EMAIL_SUPPORT_REPLY_ADDRESS, EMAIL_SUPPORT_REPLY_ADDRESS_NAME, '', '', EMAIL_TEXT_SUBJECT, nl2br($email), $email);
             $affiliate_notified = '1';
         }
         vam_db_query("insert into " . TABLE_AFFILIATE_PAYMENT_STATUS_HISTORY . " (affiliate_payment_id, affiliate_new_value, affiliate_old_value, affiliate_date_added, affiliate_notified) values ('" . vam_db_input($pID) . "', '" . vam_db_input($status) . "', '" . $check_status['affiliate_payment_status'] . "', now(), '" . $affiliate_notified . "')");
         $order_updated = true;
     }
     if ($order_updated) {
         $messageStack->add_session(SUCCESS_PAYMENT_UPDATED, 'success');
     }
     vam_redirect(vam_href_link(FILENAME_AFFILIATE_PAYMENT, vam_get_all_get_params(array('action')) . 'action=edit'));
     break;
 case 'deleteconfirm':
     $pID = vam_db_prepare_input($_GET['pID']);
     vam_db_query("delete from " . TABLE_AFFILIATE_PAYMENT . " where affiliate_payment_id = '" . vam_db_input($pID) . "'");
     vam_db_query("delete from " . TABLE_AFFILIATE_PAYMENT_STATUS_HISTORY . " where affiliate_payment_id = '" . vam_db_input($pID) . "'");
            echo '                  <tr class="productListing-even">';
        } else {
            echo '                  <tr class="productListing-odd">';
        }
        ?>
                <td class="dataTableContent"><?php 
        echo $affiliate_clickthroughs['affiliate_firstname'] . " " . $affiliate_clickthroughs['affiliate_lastname'];
        ?>
</td>
                <td class="dataTableContent" align="center"><?php 
        echo vam_date_short($affiliate_clickthroughs['affiliate_clientdate']);
        ?>
</td>
<?php 
        if ($affiliate_clickthroughs['affiliate_products_id'] > 0) {
            $link_to = '<a href="' . vam_catalog_href_link(FILENAME_CATALOG_PRODUCT_INFO, 'products_id=' . $affiliate_clickthroughs['affiliate_products_id']) . '" target="_blank">' . $affiliate_clickthroughs['products_name'] . '</a>';
        } else {
            $link_to = "Startpage";
        }
        ?>
                <td class="dataTableContent"><?php 
        echo $link_to;
        ?>
</td>
                <td class="dataTableContent" align="center"><?php 
        echo $affiliate_clickthroughs['affiliate_clientbrowser'];
        ?>
</td>
              </tr>
              <tr>
                <td class="dataTableContent"><?php 
示例#3
0
     if ($_POST['notify'] == 'on') {
         $notify_comments = '';
         if ($_POST['notify_comments'] == 'on') {
             //$notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $comments)."\n\n";
             $notify_comments = $comments;
         } else {
             $notify_comments = '';
         }
         // assign language to template for caching
         $vamTemplate->assign('language', $_SESSION['language']);
         $vamTemplate->caching = false;
         $vamTemplate->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
         $vamTemplate->assign('logo_path', HTTP_SERVER . DIR_WS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/img/');
         $vamTemplate->assign('NAME', $check_status['customers_name']);
         $vamTemplate->assign('ORDER_NR', $oID);
         $vamTemplate->assign('ORDER_LINK', vam_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL'));
         $vamTemplate->assign('ORDER_DATE', vam_date_long($check_status['date_purchased']));
         $vamTemplate->assign('NOTIFY_COMMENTS', $notify_comments);
         $vamTemplate->assign('ORDER_STATUS', $orders_status_array[$status]);
         $html_mail = $vamTemplate->fetch(CURRENT_TEMPLATE . '/admin/mail/' . $order->info['language'] . '/change_order_mail.html');
         $txt_mail = $vamTemplate->fetch(CURRENT_TEMPLATE . '/admin/mail/' . $order->info['language'] . '/change_order_mail.txt');
         // create subject
         $billing_subject = str_replace('{$nr}', $oID, EMAIL_BILLING_SUBJECT);
         vam_php_mail(EMAIL_BILLING_ADDRESS, EMAIL_BILLING_NAME, $check_status['customers_email_address'], $check_status['customers_name'], '', EMAIL_BILLING_REPLY_ADDRESS, EMAIL_BILLING_REPLY_ADDRESS_NAME, '', '', $billing_subject, $html_mail, $txt_mail);
         $customer_notified = '1';
     }
     vam_db_query("insert into " . TABLE_ORDERS_STATUS_HISTORY . " (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . vam_db_input($oID) . "', '" . vam_db_input($status) . "', now(), '" . $customer_notified . "', '" . vam_db_input($comments) . "')");
     $order_updated = true;
 }
 if ($order_updated) {
     $messageStack->add_session(SUCCESS_ORDER_UPDATED, 'success');
        // csv export
        echo date(DATE_FORMAT, $sr->showDate) . SR_SEPARATOR1 . date(DATE_FORMAT, $sr->showDateEnd) . SR_SEPARATOR1;
        echo $info[0]['order'] . SR_SEPARATOR1;
        echo $info[$last - 1]['totitem'] . SR_SEPARATOR1;
        echo $currencies->format($info[$last - 1]['totsum']) . SR_SEPARATOR1;
        echo $currencies->format($info[0]['shipping']) . SR_NEWLINE;
    }
    if ($srDetail) {
        for ($i = 0; $i < $last; $i++) {
            if ($srMax == 0 or $i < $srMax) {
                if ($srExp < 2) {
                    ?>
                    <tr class="dataTableRow" onmouseover="this.className='dataTableRowOver';this.style.cursor='hand'" onmouseout="this.className='dataTableRow'">
                    <td class="dataTableContent">&nbsp;</td>
                    <td class="dataTableContent" align="left"><a href="<?php 
                    echo vam_catalog_href_link("product_info.php?products_id=" . $info[$i]['pid']);
                    ?>
" target="_blank"><?php 
                    echo $info[$i]['pmodel'] . ' : ' . $info[$i]['pname'];
                    ?>
</a>
<?php 
                    if (is_array($info[$i]['attr'])) {
                        $attr_info = $info[$i]['attr'];
                        foreach ($attr_info as $attr) {
                            echo '<div style="font-style:italic;">&nbsp;' . $attr['quant'] . 'x ';
                            //  $attr['options'] . ': '
                            $flag = 0;
                            foreach ($attr['options_values'] as $value) {
                                if ($flag > 0) {
                                    echo "," . $value;