Exemplo n.º 1
0
                    $amount = $currencies->format($amount);
                }
                if ($_GET['action'] == 'voucherdelete') {
                    $contents[] = array('text' => TEXT_CONFIRM_DELETE . '</br></br>' . '<a class="button" href="' . vam_href_link('coupon_admin.php', 'action=confirmdelete&cid=' . $_GET['cid'], 'NONSSL') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/submit.png', '', '12', '12') . '&nbsp;' . BUTTON_CONFIRM . '</span></a>' . '<a class="button" href="' . vam_href_link('coupon_admin.php', 'cid=' . $cInfo->coupon_id, 'NONSSL') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/cancel.png', '', '12', '12') . '&nbsp;' . BUTTON_CANCEL . '</span></a>');
                } else {
                    $prod_details = NONE;
                    if ($cInfo->restrict_to_products) {
                        $prod_details = '<A HREF="listproducts.php?cid=' . $cInfo->coupon_id . '" TARGET="_blank" ONCLICK="window.open(\'listproducts.php?cid=' . $cInfo->coupon_id . '\', \'Valid_Categories\', \'scrollbars=yes,resizable=yes,menubar=yes,width=600,height=600\'); return false">View</A>';
                    }
                    $cat_details = NONE;
                    if ($cInfo->restrict_to_categories) {
                        $cat_details = '<A HREF="listcategories.php?cid=' . $cInfo->coupon_id . '" TARGET="_blank" ONCLICK="window.open(\'listcategories.php?cid=' . $cInfo->coupon_id . '\', \'Valid_Categories\', \'scrollbars=yes,resizable=yes,menubar=yes,width=600,height=600\'); return false">View</A>';
                    }
                    $coupon_name_query = vam_db_query("select coupon_name from " . TABLE_COUPONS_DESCRIPTION . " where coupon_id = '" . $cInfo->coupon_id . "' and language_id = '" . $_SESSION['languages_id'] . "'");
                    $coupon_name = vam_db_fetch_array($coupon_name_query);
                    $contents[] = array('text' => COUPON_NAME . '&nbsp;::&nbsp; ' . $coupon_name['coupon_name'] . '<br />' . COUPON_AMOUNT . '&nbsp;::&nbsp; ' . $amount . '<br />' . COUPON_STARTDATE . '&nbsp;::&nbsp; ' . vam_date_short($cInfo->coupon_start_date) . '<br />' . COUPON_FINISHDATE . '&nbsp;::&nbsp; ' . vam_date_short($cInfo->coupon_expire_date) . '<br />' . COUPON_USES_COUPON . '&nbsp;::&nbsp; ' . $cInfo->uses_per_coupon . '<br />' . COUPON_USES_USER . '&nbsp;::&nbsp; ' . $cInfo->uses_per_user . '<br />' . COUPON_PRODUCTS . '&nbsp;::&nbsp; ' . $prod_details . '<br />' . COUPON_CATEGORIES . '&nbsp;::&nbsp; ' . $cat_details . '<br />' . DATE_CREATED . '&nbsp;::&nbsp; ' . vam_date_short($cInfo->date_created) . '<br />' . DATE_MODIFIED . '&nbsp;::&nbsp; ' . vam_date_short($cInfo->date_modified) . '<br /><br />' . '<table border=0 align=center><tr><td align="center"><a class="button" href="' . vam_href_link('coupon_admin.php', 'action=email&cid=' . $cInfo->coupon_id, 'NONSSL') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/email.png', '', '12', '12') . '&nbsp;' . BUTTON_EMAIL . '</span></a></td></tr><tr><td align="center">' . '<a class="button" href="' . vam_href_link('coupon_admin.php', 'action=voucheredit&cid=' . $cInfo->coupon_id, 'NONSSL') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/edit.png', '', '12', '12') . '&nbsp;' . BUTTON_EDIT . '</span></a></td></tr><tr><td align="center">' . '<a class="button" href="' . vam_href_link('coupon_admin.php', 'action=voucherdelete&cid=' . $cInfo->coupon_id, 'NONSSL') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/delete.png', '', '12', '12') . '&nbsp;' . BUTTON_DELETE . '</span></a></td></tr><tr><td align="center">' . '<a class="button" href="' . vam_href_link('coupon_admin.php', 'action=voucherreport&cid=' . $cInfo->coupon_id, 'NONSSL') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/stat.png', '', '12', '12') . '&nbsp;' . BUTTON_REPORT . '</span></a></center></td></tr>');
                }
                break;
        }
        ?>
    <td width="25%" valign="top">
<?php 
        $box = new box();
        echo $box->infoBox($heading, $contents);
        echo '            </td>' . "\n";
}
?>
      </tr>
    </table></td>
<!-- body_text_eof //-->
  </tr>
        }
        ?>
                <td class="dataTableContent"><?php 
        echo '<a href="' . vam_href_link(FILENAME_AFFILIATE_PAYMENT, vam_get_all_get_params(array('pID', 'action')) . 'pID=' . $pInfo->affiliate_payment_id . '&action=edit') . '">' . vam_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a>&nbsp;' . $payments['affiliate_firstname'] . ' ' . $payments['affiliate_lastname'];
        ?>
</td>
                <td class="dataTableContent" align="right"><?php 
        echo $currencies->format(strip_tags($payments['affiliate_payment']));
        ?>
</td>
                <td class="dataTableContent" align="right"><?php 
        echo $currencies->format(strip_tags($payments['affiliate_payment'] + $payments['affiliate_payment_tax']));
        ?>
</td>
                <td class="dataTableContent" align="center"><?php 
        echo vam_date_short($payments['affiliate_payment_date']);
        ?>
</td>
                <td class="dataTableContent" align="right"><?php 
        echo $payments['affiliate_payment_status_name'];
        ?>
</td>
                <td class="dataTableContent" align="right"><?php 
        if (is_object($pInfo) && $payments['affiliate_payment_id'] == $pInfo->affiliate_payment_id) {
            echo vam_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', '');
        } else {
            echo '<a href="' . vam_href_link(FILENAME_AFFILIATE_PAYMENT, vam_get_all_get_params(array('pID')) . 'pID=' . $payments['affiliate_payment_id']) . '">' . vam_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>';
        }
        ?>
&nbsp;</td>
              </tr>
Exemplo n.º 3
0
    $vamTemplate->assign('7', MODULE_PAYMENT_SCHET_7);
    $vamTemplate->assign('8', MODULE_PAYMENT_SCHET_8);
    $vamTemplate->assign('9', MODULE_PAYMENT_SCHET_9);
    $vamTemplate->assign('10', MODULE_PAYMENT_SCHET_10);
    $vamTemplate->assign('11', MODULE_PAYMENT_SCHET_11);
    $vamTemplate->assign('12', MODULE_PAYMENT_SCHET_12);
    $vamTemplate->assign('13', $order->customer['firstname']);
    $vamTemplate->assign('14', $order->customer['lastname']);
    $iw = new inwords();
    $vamTemplate->assign('summa', $iw->get($order->info['total_value']));
    $vamTemplate->assign('extra_fields_data', vam_get_extra_fields_order($order_check['customers_id'], $_SESSION['languages_id']));
    // assign language to template for caching
    $vamTemplate->assign('language', $_SESSION['language']);
    $vamTemplate->assign('charset', $_SESSION['language_charset']);
    $vamTemplate->assign('oID', (int) $_GET['oID']);
    if ($order->info['payment_method'] != '' && $order->info['payment_method'] != 'no_payment') {
        include DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/' . $order->info['payment_method'] . '.php';
        $payment_method = constant(strtoupper('MODULE_PAYMENT_' . $order->info['payment_method'] . '_TEXT_TITLE'));
    }
    $vamTemplate->assign('PAYMENT_METHOD', $payment_method);
    $vamTemplate->assign('COMMENT', $order->info['comments']);
    $vamTemplate->assign('DATE', vam_date_short($order->info['date_purchased']));
    $path = DIR_WS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/';
    $vamTemplate->assign('tpl_path', $path);
    // dont allow cache
    $vamTemplate->caching = false;
    $vamTemplate->display(CURRENT_TEMPLATE . '/module/schet.html');
} else {
    $vamTemplate->assign('ERROR', 'You are not allowed to view this order!');
    $vamTemplate->display(CURRENT_TEMPLATE . '/module/error_message.html');
}
Exemplo n.º 4
0
while ($one = vam_db_fetch_array($query, true)) {
    //
    $qI = 0;
    $qIcon = '';
    if ($qI = strpos($one['content'], 'src="')) {
        $qI = $qI + 5;
        $qIcon = substr($one['content'], $qI);
        $qI = strpos($qIcon, '"');
        $qIcon = '<img class="newsImage" src="' . substr($qIcon, 0, $qI) . '" alt="Image" />';
    }
    //
    $SEF_parameter = '';
    if (SEARCH_ENGINE_FRIENDLY_URLS == 'true') {
        $SEF_parameter = '&headline=' . vam_cleanName($one['headline']);
    }
    $module_content[] = array('NEWS_HEADING' => $one['headline'], 'NEWS_CONTENT' => $one['content'], 'NEWS_ID' => $one['news_id'], 'NEWS_ICON' => $qIcon, 'NEWS_DATA' => vam_date_short($one['date_added']), 'NEWS_LINK_MORE' => vam_href_link(FILENAME_NEWS, 'news_id=' . $one['news_id'] . $SEF_parameter, 'NONSSL'));
}
if (sizeof($module_content) > 0) {
    $module->assign('NEWS_LINK', vam_href_link(FILENAME_NEWS));
    $module->assign('language', $_SESSION['language']);
    $module->assign('module_content', $module_content);
    // set cache ID
    if (!CacheCheck()) {
        $module->caching = 0;
        $module = $module->fetch(CURRENT_TEMPLATE . '/module/latest_news_default.html');
    } else {
        $module->caching = 1;
        $module->cache_lifetime = CACHE_LIFETIME;
        $module->cache_modified_check = CACHE_CHECK;
        $module = $module->fetch(CURRENT_TEMPLATE . '/module/latest_news_default.html', $cache_id);
    }
   (c) 2004	 xt:Commerce (upcoming_products.php,v 1.7 2003/08/22); xt-commerce.com

   Released under the GNU General Public License 
   ---------------------------------------------------------------------------------------*/
$module = new vamTemplate();
$module->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
// include needed functions
require_once DIR_FS_INC . 'vam_date_short.inc.php';
$module_content = array();
//fsk18 lock
$fsk_lock = '';
if ($_SESSION['customers_status']['customers_fsk18_display'] == '0') {
    $fsk_lock = ' and p.products_fsk18!=1';
}
if (GROUP_CHECK == 'true') {
    $group_check = "and p.group_permission_" . $_SESSION['customers_status']['customers_status_id'] . "=1 ";
}
$expected_query = vamDBquery("select p.products_id,\n                                  pd.products_name,\n                                  products_date_available as date_expected from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd\n                                  where to_days(products_date_available) >= to_days(now())\n                                  and p.products_id = pd.products_id\n                                  " . $group_check . "\n                                  " . $fsk_lock . "\n                                  and pd.language_id = '" . (int) $_SESSION['languages_id'] . "'\n                                  order by " . EXPECTED_PRODUCTS_FIELD . " " . EXPECTED_PRODUCTS_SORT . "\n                                  limit " . MAX_DISPLAY_UPCOMING_PRODUCTS);
if (vam_db_num_rows($expected_query, true) > 0) {
    $row = 0;
    while ($expected = vam_db_fetch_array($expected_query, true)) {
        $row++;
        $module_content[] = array('PRODUCTS_LINK' => vam_href_link(FILENAME_PRODUCT_INFO, vam_product_link($expected['products_id'], $expected['products_name'])), 'PRODUCTS_NAME' => $expected['products_name'], 'PRODUCTS_DATE' => vam_date_short($expected['date_expected']));
    }
    $module->assign('language', $_SESSION['language']);
    $module->assign('module_content', $module_content);
    // set cache ID
    $module->caching = 0;
    $module = $module->fetch(CURRENT_TEMPLATE . '/module/upcoming_products.html');
    $default->assign('MODULE_upcoming_products', $module);
}
Exemplo n.º 6
0
            if ($downloads_values['download_is_pin'] == 1) {
                //PIN processing
                $pinstring = $downloads_values['download_pin_code'];
                $box_content .= $downloads_values['products_name'] . ': ' . $pinstring . '<br />';
            } else {
                //usual stuff
                // The link will appear only if:
                // - Download remaining count is > 0, AND
                // - The file is present in the DOWNLOAD directory, AND EITHER
                // - No expiry date is enforced (maxdays == 0), OR
                // - The expiry date is not reached
                if ($downloads_values['download_count'] > 0 && file_exists(DIR_FS_DOWNLOAD . $downloads_values['orders_products_filename']) && ($downloads_values['download_maxdays'] == 0 || $download_timestamp > time())) {
                    $box_content .= BOX_TEXT_DOWNLOAD . '<br /><br /><a href="' . vam_href_link(FILENAME_DOWNLOAD, 'order=' . $last_order . '&id=' . $downloads_values['orders_products_download_id']) . '">' . $downloads_values['products_name'] . '</a><br /><a href="' . vam_href_link(FILENAME_DOWNLOAD, 'order=' . $last_order . '&id=' . $downloads_values['orders_products_download_id']) . '"><span class="Requirement"><strong>' . BOX_TEXT_DOWNLOAD_NOW . '</strong></span></a><br /><br />';
                } else {
                    $box_content .= $downloads_values['products_name'];
                }
                $box_content .= TABLE_HEADING_DOWNLOAD_DATE . vam_date_short($download_expiry) . '<br />';
                $box_content .= TABLE_HEADING_DOWNLOAD_COUNT . $downloads_values['download_count'] . '<br /><br />';
            }
        }
        if (!strstr($_SERVER['SCRIPT_NAME'], FILENAME_ACCOUNT_HISTORY_INFO)) {
            $box_content .= TEXT_FOOTER_DOWNLOAD . '<a href="' . vam_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL') . '">' . TEXT_DOWNLOAD_MY_ACCOUNT . '</a>';
        }
        $box->assign('BOX_CONTENT', $box_content);
        $box->caching = 0;
        $box->assign('language', $_SESSION['language']);
        $box_download = $box->fetch(CURRENT_TEMPLATE . '/boxes/box_download.html');
        $vamTemplate->assign('box_DOWNLOADS', $box_download);
    }
}
// /downloads
Exemplo n.º 7
0
$heading = array();
$contents = array();
$heading[] = array('text' => '[' . $gInfo->coupon_id . '] ' . ' ' . $currencies->format($gInfo->coupon_amount));
$redeem_query = vam_db_query("select * from " . TABLE_COUPON_REDEEM_TRACK . " where coupon_id = '" . $gInfo->coupon_id . "'");
$redeemed = 'No';
if (vam_db_num_rows($redeem_query) > 0) {
    $redeemed = 'Yes';
}
$contents[] = array('text' => TEXT_INFO_SENDERS_ID . ' ' . $gInfo->customer_id_sent);
$contents[] = array('text' => TEXT_INFO_AMOUNT_SENT . ' ' . $currencies->format($gInfo->coupon_amount));
$contents[] = array('text' => TEXT_INFO_DATE_SENT . ' ' . vam_date_short($gInfo->date_sent));
$contents[] = array('text' => TEXT_INFO_VOUCHER_CODE . ' ' . $gInfo->coupon_code);
$contents[] = array('text' => TEXT_INFO_EMAIL_ADDRESS . ' ' . $gInfo->emailed_to);
if ($redeemed == 'Yes') {
    $redeem = vam_db_fetch_array($redeem_query);
    $contents[] = array('text' => '<br />' . TEXT_INFO_DATE_REDEEMED . ' ' . vam_date_short($redeem['redeem_date']));
    $contents[] = array('text' => TEXT_INFO_IP_ADDRESS . ' ' . $redeem['redeem_ip']);
    $contents[] = array('text' => TEXT_INFO_CUSTOMERS_ID . ' ' . $redeem['customer_id']);
} else {
    $contents[] = array('text' => '<br />' . TEXT_INFO_NOT_REDEEMED);
}
if (vam_not_null($heading) && vam_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>
Exemplo n.º 8
0
 //Single Product Actions
 $contents[] = array('align' => 'center', 'text' => '<div style="padding-top: 5px; font-weight: bold; width: 90%; margin-top: 5px;">' . TEXT_ACTIVE_ELEMENT . '</div>');
 $contents[] = array('align' => 'center', 'text' => '<table border=0><tr><td align="center"><a class="button" href="' . vam_href_link(FILENAME_CATEGORIES, vam_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=new_product') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/edit.png', '', '12', '12') . '&nbsp;' . BUTTON_EDIT . '</span></a></td></tr><tr><td align="center"><form action="' . FILENAME_NEW_ATTRIBUTES . '" name="edit_attributes" method="post"><input type="hidden" name="action" value="edit"><input type="hidden" name="current_product_id" value="' . $pInfo->products_id . '"><input type="hidden" name="cpath" value="' . $cPath . '"><span class="button"><button type="submit" value="' . BUTTON_EDIT_ATTRIBUTES . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/add.png', '', '12', '12') . '&nbsp;' . BUTTON_EDIT_ATTRIBUTES . '</button></span></form></td></tr><tr><td align="center" style="text-align: center;"><form action="' . FILENAME_CATEGORIES . '" name="edit_crossselling" method="GET"><input type="hidden" name="action" value="edit_crossselling"><input type="hidden" name="current_product_id" value="' . $pInfo->products_id . '"><input type="hidden" name="cpath" value="' . $cPath . '"><span class="button"><button type="submit" value="' . BUTTON_EDIT_CROSS_SELLING . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/add.png', '', '12', '12') . '&nbsp;' . BUTTON_EDIT_CROSS_SELLING . '</button></span></form></td></tr></table>');
 //Insert new Element Actions
 $contents[] = array('align' => 'center', 'text' => '<div style="padding-top: 5px; font-weight: bold; width: 90%; margin-top: 5px;">' . TEXT_INSERT_ELEMENT . '</div>');
 if (!$_GET['search']) {
     $contents[] = array('align' => 'center', 'text' => '<table border=0><tr><td align="center"><a class="button" href="' . vam_href_link(FILENAME_CATEGORIES, vam_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'cPath=' . $cPath . '&action=new_category') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/categories.png', '', '12', '12') . '&nbsp;' . BUTTON_NEW_CATEGORIES . '</span></a></td></tr><tr><td align="center"><a class="button" href="' . vam_href_link(FILENAME_CATEGORIES, vam_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'cPath=' . $cPath . '&action=new_product') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/products.png', '', '12', '12') . '&nbsp;' . BUTTON_NEW_PRODUCTS . '</span></a></td></tr></table>');
 }
 //Informations
 $contents[] = array('align' => 'center', 'text' => '<div style="padding-top: 5px; font-weight: bold; width: 90%; margin-top: 5px;">' . TEXT_INFORMATIONS . '</div>');
 $contents[] = array('text' => '<div style="padding-left: 30px;">' . TEXT_DATE_ADDED . ' ' . vam_date_short($pInfo->products_date_added) . '</div>');
 if (vam_not_null($pInfo->products_last_modified)) {
     $contents[] = array('text' => '<div style="padding-left: 30px;">' . TEXT_LAST_MODIFIED . '&nbsp;' . vam_date_short($pInfo->products_last_modified) . '</div>');
 }
 if (date('Y-m-d') < $pInfo->products_date_available) {
     $contents[] = array('text' => '<div style="padding-left: 30px;">' . TEXT_DATE_AVAILABLE . ' ' . vam_date_short($pInfo->products_date_available) . '</div>');
 }
 // START IN-SOLUTION Berechung des Bruttopreises
 $price = $pInfo->products_price;
 $price = vam_round($price, PRICE_PRECISION);
 $price_string = '' . TEXT_PRODUCTS_PRICE_INFO . '&nbsp;' . $currencies->format($price);
 if (PRICE_IS_BRUTTO == 'true' && ($_GET['read'] == 'only' || $_GET['action'] != 'new_product_preview')) {
     $price_netto = vam_round($price, PRICE_PRECISION);
     $tax_query = vam_db_query("select tax_rate from " . TABLE_TAX_RATES . " where tax_class_id = '" . $pInfo->products_tax_class_id . "' ");
     $tax = vam_db_fetch_array($tax_query);
     $price = $price * ($tax[tax_rate] + 100) / 100;
     $price_string = '' . TEXT_PRODUCTS_PRICE_INFO . '&nbsp;' . $currencies->format($price) . ' - ' . TXT_NETTO . $currencies->format($price_netto);
 }
 $contents[] = array('text' => '<div style="padding-left: 30px;">' . $price_string . '</div><div style="padding-left: 30px;">' . TEXT_PRODUCTS_DISCOUNT_ALLOWED_INFO . '&nbsp;' . $pInfo->products_discount_allowed . '</div><div style="padding-left: 30px;">' . TEXT_PRODUCTS_QUANTITY_INFO . '&nbsp;' . $pInfo->products_quantity . '</div>');
 // END IN-SOLUTION
 //$contents[] = array('text' => '<br />' . TEXT_PRODUCTS_PRICE_INFO . ' ' . $currencies->format($pInfo->products_price) . '<br />' . TEXT_PRODUCTS_QUANTITY_INFO . ' ' . $pInfo->products_quantity);
Exemplo n.º 9
0
     }
     if ($cInfo->customers_id != 1) {
         $contents[] = array('align' => 'center', 'text' => '<a class="button" href="' . vam_href_link(FILENAME_CUSTOMERS, vam_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=confirm') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/delete.png', '', '12', '12') . '&nbsp;' . BUTTON_DELETE . '</span></a>');
     }
     if ($cInfo->customers_id != 1) {
         $contents[] = array('align' => 'center', 'text' => '<a class="button" href="' . vam_href_link(FILENAME_CUSTOMERS, vam_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=editstatus') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/customer_status.png', '', '12', '12') . '&nbsp;' . BUTTON_STATUS . '</span></a>');
     }
     // elari cs v3.x changed for added accounting module
     if ($cInfo->customers_id != 1) {
         $contents[] = array('align' => 'center', 'text' => '<a class="button" ' . ($cs_id != 0 ? 'onClick="alert(\'Сначала определите пользователя в группу Админ (кнопка Статус покупателя)!\\nДоступ в админку можно настраивать только для пользователей, состоящих в группе Админ.\');"' : '') . ' href="' . vam_href_link(FILENAME_ACCOUNTING, vam_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/gear.png', '', '12', '12') . '&nbsp;' . BUTTON_ACCOUNTING . '</span></a>');
     }
     // elari cs v3.x changed for added iplog module
     $contents[] = array('align' => 'center', 'text' => '<table><tr><td style="text-align: center;"><a class="button" href="' . vam_href_link(FILENAME_ORDERS, 'cID=' . $cInfo->customers_id) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/categories.png', '', '12', '12') . '&nbsp;' . BUTTON_ORDERS . '</span></a></td><td style="text-align: center;"><a class="button" href="' . vam_href_link(FILENAME_MAIL, 'selected_box=tools&customer=' . $cInfo->customers_email_address) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/email.png', '', '12', '12') . '&nbsp;' . BUTTON_EMAIL . '</span></a></td></tr><tr><td style="text-align: center;"><a class="button" href="' . vam_href_link(FILENAME_CUSTOMERS, vam_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=iplog') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/ip.png', '', '12', '12') . '&nbsp;' . BUTTON_IPLOG . '</span></a></td><td style="text-align: center;"><a class="button" href="' . vam_href_link(FILENAME_CUSTOMERS, vam_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=new_order') . '" onClick="return confirm(\'' . NEW_ORDER . '\')"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/add.png', '', '12', '12') . '&nbsp;' . BUTTON_NEW_ORDER . '</span></a></td></tr></table>');
     $contents[] = array('text' => '<br />' . TEXT_DATE_ACCOUNT_CREATED . ' ' . vam_date_short($cInfo->date_account_created));
     $contents[] = array('text' => '<br />' . TEXT_DATE_ACCOUNT_LAST_MODIFIED . ' ' . vam_date_short($cInfo->date_account_last_modified));
     $contents[] = array('text' => '<br />' . TEXT_INFO_DATE_LAST_LOGON . ' ' . vam_date_short($cInfo->date_last_logon));
     $contents[] = array('text' => '<br />' . TEXT_INFO_NUMBER_OF_LOGONS . ' ' . $cInfo->number_of_logons);
     $contents[] = array('text' => '<br />' . TEXT_INFO_COUNTRY . ' ' . $cInfo->countries_name);
     $contents[] = array('text' => '<br />' . TEXT_INFO_NUMBER_OF_REVIEWS . ' ' . $cInfo->number_of_reviews);
 }
 if ($_GET['action'] == 'iplog') {
     if (isset($_GET['cID'])) {
         $contents[] = array('text' => '<br /><b>IPLOG :');
         $customers_id = vam_db_prepare_input($_GET['cID']);
         $customers_log_info_array = vam_get_user_info($customers_id);
         if (vam_db_num_rows($customers_log_info_array)) {
             while ($customers_log_info = vam_db_fetch_array($customers_log_info_array)) {
                 $contents[] = array('text' => '<tr>' . "\n" . '<td class="smallText">' . $customers_log_info['customers_ip_date'] . ' ' . $customers_log_info['customers_ip'] . ' ' . $customers_log_info['customers_advertiser']);
             }
         }
     }
                ?>
</td>
<?php 
                break;
            case '4':
                ?>
                      <td class="dataTableContent" align="right"><?php 
                echo vam_date_long(date("Y-m-d\\ H:i:s", $sr->showDate));
                ?>
</td>
<?php 
                break;
            default:
                ?>
                      <td class="dataTableContent" align="right"><?php 
                echo vam_date_short(date("Y-m-d\\ H:i:s", $sr->showDate)) . " - " . vam_date_short(date("Y-m-d\\ H:i:s", $sr->showDateEnd));
                ?>
</td>
<?php 
        }
        ?>
                      <td class="dataTableContent" align="right"><?php 
        echo $info[0]['order'];
        ?>
</td>
                      <td class="dataTableContent" align="right"><?php 
        echo $info[$last - 1]['totitem'];
        ?>
</td>
                      <td class="dataTableContent" align="right"><?php 
        echo $currencies->format($info[$last - 1]['totsum']);
Exemplo n.º 11
0
   Copyright (c) 2007 VaM Shop
   -----------------------------------------------------------------------------------------
   Released under the GNU General Public License 
   ---------------------------------------------------------------------------------------*/
$box = new vamTemplate();
$box->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
$sql = "\n    SELECT\n        faq_id,\n        question,\n        answer,\n        date_added\n    FROM " . TABLE_FAQ . "\n    WHERE\n         status = '1'\n         and language = '" . (int) $_SESSION['languages_id'] . "'\n    ORDER BY date_added DESC\n    LIMIT " . MAX_DISPLAY_FAQ . "\n    ";
$module_content = array();
$query = vamDBquery($sql);
while ($one = vam_db_fetch_array($query, true)) {
    $SEF_parameter = '';
    if (SEARCH_ENGINE_FRIENDLY_URLS == 'true') {
        $SEF_parameter = '&question=' . vam_cleanName($one['question']);
    }
    $module_content[] = array('FAQ_QUESTION' => $one['question'], 'FAQ_ANSWER' => $one['answer'], 'FAQ_ID' => $one['faq_id'], 'FAQ_DATA' => vam_date_short($one['date_added']), 'FAQ_LINK_MORE' => vam_href_link(FILENAME_FAQ, 'faq_id=' . $one['faq_id'] . $SEF_parameter, 'NONSSL'));
}
if (sizeof($module_content) > 0) {
    $box->assign('FAQ_LINK', vam_href_link(FILENAME_FAQ));
    $box->assign('language', $_SESSION['language']);
    $box->assign('module_content', $module_content);
    // set cache ID
    if (USE_CACHE == 'false') {
        $box->caching = 0;
        $module = $box->fetch(CURRENT_TEMPLATE . '/boxes/box_faq.html');
    } else {
        $box->caching = 1;
        $box->cache_lifetime = CACHE_LIFETIME;
        $box->cache_modified_check = CACHE_CHECK;
        $module = $box->fetch(CURRENT_TEMPLATE . '/boxes/box_faq.html', $cache_id);
    }
Exemplo n.º 12
0
switch ($coupon['coupon_type']) {
    case 'F':
        $text_coupon_help .= sprintf(TEXT_COUPON_HELP_FIXED, $vamPrice->Format($coupon['coupon_amount'], true));
        break;
    case 'P':
        $text_coupon_help .= sprintf(TEXT_COUPON_HELP_FIXED, number_format($coupon['coupon_amount'], 2) . '%');
        break;
    case 'S':
        $text_coupon_help .= TEXT_COUPON_HELP_FREESHIP;
        break;
    default:
}
if ($coupon['coupon_minimum_order'] > 0) {
    $text_coupon_help .= sprintf(TEXT_COUPON_HELP_MINORDER, $vamPrice->Format($coupon['coupon_minimum_order'], true));
}
$text_coupon_help .= sprintf(TEXT_COUPON_HELP_DATE, vam_date_short($coupon['coupon_start_date']), vam_date_short($coupon['coupon_expire_date']));
$text_coupon_help .= '<b>' . TEXT_COUPON_HELP_RESTRICT . '</b>';
$text_coupon_help .= '<br /><br />' . TEXT_COUPON_HELP_CATEGORIES;
$coupon_get = vam_db_query("select restrict_to_categories from " . TABLE_COUPONS . " where coupon_id='" . (int) $_GET['cID'] . "'");
$get_result = vam_db_fetch_array($coupon_get);
$cat_ids = preg_split("/[,]/", $get_result['restrict_to_categories']);
for ($i = 0; $i < count($cat_ids); $i++) {
    $result = vam_db_query("SELECT * FROM " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd WHERE c.categories_id = cd.categories_id and cd.language_id = '" . $_SESSION['languages_id'] . "' and c.categories_id='" . $cat_ids[$i] . "'");
    if ($row = vam_db_fetch_array($result)) {
        $cats .= '<br />' . $row["categories_name"];
    }
}
if ($cats == '') {
    $cats = '<br />NONE';
}
$text_coupon_help .= $cats;
Exemplo n.º 13
0
     }
 }
 if (strlen($a_firstname) < ENTRY_FIRST_NAME_MIN_LENGTH) {
     $error = true;
     $entry_firstname_error = true;
 } else {
     $entry_firstname_error = false;
 }
 if (strlen($a_lastname) < ENTRY_LAST_NAME_MIN_LENGTH) {
     $error = true;
     $entry_lastname_error = true;
 } else {
     $entry_lastname_error = false;
 }
 if (ACCOUNT_DOB == 'true') {
     if (checkdate(substr(vam_date_short($a_dob), 4, 2), substr(vam_date_short($a_dob), 6, 2), substr(vam_date_short($a_dob), 0, 4))) {
         $entry_date_of_birth_error = false;
     } else {
         $error = true;
         $entry_date_of_birth_error = true;
     }
 }
 if (strlen($a_email_address) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) {
     $error = true;
     $entry_email_address_error = true;
 } else {
     $entry_email_address_error = false;
 }
 if (!vam_validate_email($a_email_address)) {
     $error = true;
     $entry_email_address_check_error = true;
Exemplo n.º 14
0
require 'includes/application_top.php';
// create template elements
$vamTemplate = new vamTemplate();
// include boxes
require DIR_FS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/source/boxes.php';
// include needed functions
require_once DIR_FS_INC . 'vam_validate_email.inc.php';
if (GROUP_CHECK == 'true') {
    $group_check = "and group_ids LIKE '%c_" . $_SESSION['customers_status']['customers_status_id'] . "_group%'";
}
$shop_content_query = vam_db_query("SELECT\n                     content_id,\n                     content_title,\n                     content_group,\n                     content_heading,\n                     content_text,\n                     content_file\n                     FROM " . TABLE_CONTENT_MANAGER . "\n                     WHERE content_group='" . (int) $_GET['coID'] . "' " . $group_check . "\n                     AND languages_id='" . (int) $_SESSION['languages_id'] . "'");
$shop_content_data = vam_db_fetch_array($shop_content_query);
$shop_content_sub_pages_query = vam_db_query("SELECT\n                     content_id,\n                     content_title,\n                     content_group,\n                     content_heading,\n                     content_text,\n                     content_file\n                     FROM " . TABLE_CONTENT_MANAGER . "\n                     WHERE parent_id='" . $shop_content_data['content_id'] . "' " . $group_check . "\n                     AND languages_id='" . (int) $_SESSION['languages_id'] . "'");
$sub_pages_content = array();
while ($shop_content_sub_pages_data = vam_db_fetch_array($shop_content_sub_pages_query)) {
    $sub_pages_content[] = array('PAGE_ID' => $shop_content_sub_pages_data['content_id'], 'PAGE_TITLE' => $shop_content_sub_pages_data['content_title'], 'PAGE_HEADING' => $shop_content_sub_pages_data['content_heading'], 'PAGE_CONTENT' => vam_date_short($one['content_text']), 'PAGE_LINK' => vam_href_link(FILENAME_CONTENT, 'coID=' . $shop_content_sub_pages_data['content_group']));
}
$vamTemplate->assign('sub_pages_content', $sub_pages_content);
$breadcrumb->add($shop_content_data['content_title'], vam_href_link(FILENAME_CONTENT, 'coID=' . (int) $_GET['coID']));
if ($_GET['coID'] != 7) {
    require DIR_WS_INCLUDES . 'header.php';
}
if ($_GET['coID'] == 7 && $_GET['action'] == 'success') {
    require DIR_WS_INCLUDES . 'header.php';
}
$vamTemplate->assign('CONTENT_HEADING', $shop_content_data['content_heading']);
if ($_GET['coID'] == 7) {
    $error = false;
    if (isset($_GET['action']) && $_GET['action'] == 'send') {
        if (vam_validate_email(trim($_POST['email']))) {
            vam_php_mail($_POST['email'], $_POST['name'], CONTACT_US_EMAIL_ADDRESS, CONTACT_US_NAME, CONTACT_US_FORWARDING_STRING, $_POST['email'], $_POST['name'], '', '', CONTACT_US_EMAIL_SUBJECT, nl2br($_POST['message_body']), $_POST['message_body']);
Exemplo n.º 15
0
    $number_of_sales = '0';
    while ($affiliate_sales = vam_db_fetch_array($affiliate_sales_values)) {
        $number_of_sales++;
        if ($number_of_sales / 2 == floor($number_of_sales / 2)) {
            echo '          <tr class="dataTableRowSelected">';
        } else {
            echo '          <tr class="dataTableRow">';
        }
        $link_to = '<a href="orders.php?action=edit&oID=' . $affiliate_sales['affiliate_orders_id'] . '">' . $affiliate_sales['affiliate_orders_id'] . '</a>';
        ?>
            <td class="dataTableContent"><?php 
        echo $affiliate_sales['affiliate_firstname'] . " " . $affiliate_sales['affiliate_lastname'];
        ?>
</td>
            <td class="dataTableContent" align="center"><?php 
        echo vam_date_short($affiliate_sales['affiliate_date']);
        ?>
</td>
            <td class="dataTableContent" align="right"><?php 
        echo $link_to;
        ?>
</td>
            <td class="dataTableContent" align="right">&nbsp;&nbsp;<?php 
        echo $currencies->display_price($affiliate_sales['affiliate_value'], '');
        ?>
</td>
            <td class="dataTableContent" align="right"><?php 
        echo $affiliate_sales['affiliate_percent'] . "%";
        ?>
</td>
            <td class="dataTableContent" align="right">&nbsp;&nbsp;<?php 
Exemplo n.º 16
0
        $products_history[] = $product->buildDataArray($history_product);
    }
    $i++;
}
$order_content = '';
if (vam_count_customer_orders() > 0) {
    $orders_query = vam_db_query("select\n\t                                  o.orders_id,\n\t                                  o.date_purchased,\n\t                                  o.delivery_name,\n\t                                  o.delivery_country,\n\t                                  o.billing_name,\n\t                                  o.billing_country,\n\t                                  ot.text as order_total,\n\t                                  s.orders_status_name\n\t                                  from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . "\n\t                                  ot, " . TABLE_ORDERS_STATUS . " s\n\t                                  where o.customers_id = '" . (int) $_SESSION['customer_id'] . "'\n\t                                  and o.orders_id = ot.orders_id\n\t                                  and ot.class = 'ot_total'\n\t                                  and o.orders_status = s.orders_status_id\n\t                                  and s.language_id = '" . (int) $_SESSION['languages_id'] . "'\n\t                                  order by orders_id desc limit 3");
    while ($orders = vam_db_fetch_array($orders_query)) {
        if (vam_not_null($orders['delivery_name'])) {
            $order_name = $orders['delivery_name'];
            $order_country = $orders['delivery_country'];
        } else {
            $order_name = $orders['billing_name'];
            $order_country = $orders['billing_country'];
        }
        $order_content[] = array('ORDER_ID' => $orders['orders_id'], 'ORDER_DATE' => vam_date_short($orders['date_purchased']), 'ORDER_STATUS' => $orders['orders_status_name'], 'ORDER_TOTAL' => $orders['order_total'], 'ORDER_LINK' => vam_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $orders['orders_id'], 'SSL'), 'ORDER_BUTTON' => '<a class="button" href="' . vam_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $orders['orders_id'], 'SSL') . '">' . vam_image_button('view.png', SMALL_IMAGE_BUTTON_VIEW) . '</a>');
    }
}
$vamTemplate->assign('LINK_EDIT', vam_href_link(FILENAME_ACCOUNT_EDIT, '', 'SSL'));
$vamTemplate->assign('LINK_ADDRESS', vam_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL'));
$vamTemplate->assign('LINK_PASSWORD', vam_href_link(FILENAME_ACCOUNT_PASSWORD, '', 'SSL'));
if (!isset($_SESSION['customer_id'])) {
    $vamTemplate->assign('LINK_LOGIN', vam_href_link(FILENAME_LOGIN, '', 'SSL'));
}
$vamTemplate->assign('LINK_ORDERS', vam_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL'));
$vamTemplate->assign('LINK_NEWSLETTER', vam_href_link(FILENAME_NEWSLETTER, '', 'SSL'));
$vamTemplate->assign('LINK_ALL', vam_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL'));
$vamTemplate->assign('order_content', $order_content);
$vamTemplate->assign('products_history', $products_history);
$vamTemplate->assign('also_purchased_history', $also_purchased_history);
$vamTemplate->assign('language', $_SESSION['language']);
Exemplo n.º 17
0
$affiliate_clickthroughs_raw = "select a.*, pd.products_name from " . TABLE_AFFILIATE_CLICKTHROUGHS . " a\n                                    left join " . TABLE_PRODUCTS . " p on (p.products_id = a.affiliate_products_id)\n                                    left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on (pd.products_id = p.products_id and pd.language_id = '" . $_SESSION['languages_id'] . "')\n                                    where a.affiliate_id = '" . $_SESSION['affiliate_id'] . "'  ORDER BY a.affiliate_clientdate desc";
$affiliate_clickthroughs_split = new splitPageResults($affiliate_clickthroughs_raw, $_GET['page'], MAX_DISPLAY_SEARCH_RESULTS);
require DIR_WS_INCLUDES . 'header.php';
$vamTemplate->assign('affiliate_clickthroughs_split_number', $affiliate_clickthroughs_split->number_of_rows);
$affiliate_clickthrough_table = '';
if ($affiliate_clickthroughs_split->number_of_rows > 0) {
    $affiliate_clickthroughs_values = vam_db_query($affiliate_clickthroughs_split->sql_query);
    $number_of_clickthroughs = '0';
    while ($affiliate_clickthroughs = vam_db_fetch_array($affiliate_clickthroughs_values)) {
        $number_of_clickthroughs++;
        if ($number_of_clickthroughs / 2 == floor($number_of_clickthroughs / 2)) {
            $affiliate_clickthrough_table .= '<tr class="productListing-even">';
        } else {
            $affiliate_clickthrough_table .= '<tr class="productListing-odd">';
        }
        $affiliate_clickthrough_table .= '<td class="smallText">' . vam_date_short($affiliate_clickthroughs['affiliate_clientdate']) . '</td>';
        if ($affiliate_clickthroughs['affiliate_products_id'] > 0) {
            $link_to = '<a href="' . vam_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $affiliate_clickthroughs['affiliate_products_id']) . '" target="_blank">' . $affiliate_clickthroughs['products_name'] . '</a>';
        } else {
            $link_to = "Startpage";
        }
        $affiliate_clickthrough_table .= '<td class="smallText">' . $link_to . '</td>';
        $affiliate_clickthrough_table .= '<td class="smallText">' . $affiliate_clickthroughs['affiliate_clientreferer'] . '</td></tr>';
    }
    $vamTemplate->assign('affiliate_clickthrough_table', $affiliate_clickthrough_table);
}
if ($affiliate_clickthroughs_split->number_of_rows > 0) {
    $vamTemplate->assign('affiliate_clickthroughs_split_count', $affiliate_clickthroughs_split->display_count(TEXT_DISPLAY_NUMBER_OF_CLICKS));
    $vamTemplate->assign('affiliate_clickthroughs_split_links', $affiliate_clickthroughs_split->display_links(MAX_DISPLAY_PAGE_LINKS, vam_get_all_get_params(array('page', 'info', 'x', 'y'))));
}
$vamTemplate->assign('language', $_SESSION['language']);
Exemplo n.º 18
0
        $contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
        $contents[] = array('text' => '<br /><b>' . $cInfo->title . '</b>');
        $contents[] = array('align' => 'center', 'text' => '<br />' . ($remove_currency ? '<a class="button" href="' . vam_href_link(FILENAME_CURRENCIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->currencies_id . '&action=deleteconfirm') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/delete.png', '', '12', '12') . '&nbsp;' . BUTTON_DELETE . '</span></a>' : '') . ' <a class="button" href="' . vam_href_link(FILENAME_CURRENCIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->currencies_id) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/cancel.png', '', '12', '12') . '&nbsp;' . BUTTON_CANCEL . '</span></a>');
        break;
    default:
        if (is_object($cInfo)) {
            $heading[] = array('text' => '<b>' . $cInfo->title . '</b>');
            $contents[] = array('align' => 'center', 'text' => '<a class="button" href="' . vam_href_link(FILENAME_CURRENCIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->currencies_id . '&action=edit') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/edit.png', '', '12', '12') . '&nbsp;' . BUTTON_EDIT . '</span></a> <a class="button" href="' . vam_href_link(FILENAME_CURRENCIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->currencies_id . '&action=delete') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/delete.png', '', '12', '12') . '&nbsp;' . BUTTON_DELETE . '</span></a>');
            $contents[] = array('text' => '<br />' . TEXT_INFO_CURRENCY_TITLE . ' ' . $cInfo->title);
            $contents[] = array('text' => TEXT_INFO_CURRENCY_CODE . ' ' . $cInfo->code);
            $contents[] = array('text' => '<br />' . TEXT_INFO_CURRENCY_SYMBOL_LEFT . ' ' . $cInfo->symbol_left);
            $contents[] = array('text' => TEXT_INFO_CURRENCY_SYMBOL_RIGHT . ' ' . $cInfo->symbol_right);
            $contents[] = array('text' => '<br />' . TEXT_INFO_CURRENCY_DECIMAL_POINT . ' ' . $cInfo->decimal_point);
            $contents[] = array('text' => TEXT_INFO_CURRENCY_THOUSANDS_POINT . ' ' . $cInfo->thousands_point);
            $contents[] = array('text' => TEXT_INFO_CURRENCY_DECIMAL_PLACES . ' ' . $cInfo->decimal_places);
            $contents[] = array('text' => '<br />' . TEXT_INFO_CURRENCY_LAST_UPDATED . ' ' . vam_date_short($cInfo->last_updated));
            $contents[] = array('text' => TEXT_INFO_CURRENCY_VALUE . ' ' . number_format($cInfo->value, 8));
            $contents[] = array('text' => '<br />' . TEXT_INFO_CURRENCY_EXAMPLE . '<br />' . $currencies->format('30', false, DEFAULT_CURRENCY) . ' = ' . $currencies->format('30', true, $cInfo->code));
        }
        break;
}
if (vam_not_null($heading) && vam_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>
Exemplo n.º 19
0
$vamTemplate->assign('FORM_ACTION', vam_draw_form('params', vam_href_link(FILENAME_AFFILIATE_SALES), 'get'));
$affiliate_sales_table = '';
if ($affiliate_sales_split->number_of_rows > 0) {
    $number_of_sales = 0;
    $sum_of_earnings = 0;
    do {
        $number_of_sales++;
        if ($affiliate_sales['orders_status_id'] >= AFFILIATE_PAYMENT_ORDER_MIN_STATUS) {
            $sum_of_earnings += $affiliate_sales['affiliate_payment'];
        }
        if ($number_of_sales / 2 == floor($number_of_sales / 2)) {
            $affiliate_sales_table .= '<tr class="productListing-even">';
        } else {
            $affiliate_sales_table .= '<tr class="productListing-odd">';
        }
        $affiliate_sales_table .= '<td class="smallText" align="center">' . vam_date_short($affiliate_sales['affiliate_date']) . '</td>';
        $affiliate_sales_table .= '<td class="smallText" align="right">' . $vamPrice->Format($affiliate_sales['affiliate_value'], true) . '</td>';
        $affiliate_sales_table .= '<td class="smallText" align="right">' . $affiliate_sales['affiliate_percent'] . " %" . '</td>';
        $affiliate_sales_table .= '<td class="smallText" align="right">' . ($affiliate_sales['level'] > 0 ? $affiliate_sales['level'] : TEXT_AFFILIATE_PERSONAL_LEVEL_SHORT) . '</td>';
        $affiliate_sales_table .= '<td class="smallText" align="right">' . $vamPrice->Format($affiliate_sales['affiliate_payment'], true) . '</td>';
        $affiliate_sales_table .= '<td class="smallText" align="right">' . ($affiliate_sales['orders_status'] != '' ? $affiliate_sales['orders_status'] : TEXT_DELETED_ORDER_BY_ADMIN) . '</td>';
        $affiliate_sales_table .= '</tr>';
    } while ($affiliate_sales = vam_db_fetch_array($affiliate_sales_values));
    $vamTemplate->assign('affiliate_sales_table', $affiliate_sales_table);
}
if ($affiliate_sales_split->number_of_rows > 0) {
    $vamTemplate->assign('affiliate_sales_count', $affiliate_sales_split->display_count(TEXT_DISPLAY_NUMBER_OF_SALES));
    $vamTemplate->assign('affiliate_sales_links', $affiliate_sales_split->display_links(MAX_DISPLAY_PAGE_LINKS, vam_get_all_get_params(array('page', 'info', 'x', 'y'))));
}
$vamTemplate->assign('affiliate_sales_total', $vamPrice->Format($sum_of_earnings, true));
$vamTemplate->assign('language', $_SESSION['language']);
Exemplo n.º 20
0
        $contents[] = array('text' => '<br />' . TEXT_INFO_TAX_RATE_PRIORITY . '<br />' . vam_draw_input_field('tax_priority', $trInfo->tax_priority));
        $contents[] = array('align' => 'center', 'text' => '<br /><span class="button"><button type="submit" value="' . BUTTON_UPDATE . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/submit.png', '', '12', '12') . '&nbsp;' . BUTTON_INSERT . '</button></span>&nbsp;<a class="button" href="' . vam_href_link(FILENAME_TAX_RATES, 'page=' . $_GET['page'] . '&tID=' . $trInfo->tax_rates_id) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/cancel.png', '', '12', '12') . '&nbsp;' . BUTTON_CANCEL . '</span></a>');
        break;
    case 'delete':
        $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_TAX_RATE . '</b>');
        $contents = array('form' => vam_draw_form('rates', FILENAME_TAX_RATES, 'page=' . $_GET['page'] . '&tID=' . $trInfo->tax_rates_id . '&action=deleteconfirm'));
        $contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
        $contents[] = array('text' => '<br /><b>' . $trInfo->tax_class_title . ' ' . number_format($trInfo->tax_rate, TAX_DECIMAL_PLACES) . '%</b>');
        $contents[] = array('align' => 'center', 'text' => '<br /><span class="button"><button type="submit" value="' . BUTTON_DELETE . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/delete.png', '', '12', '12') . '&nbsp;' . BUTTON_DELETE . '</button></span>&nbsp;<a class="button" href="' . vam_href_link(FILENAME_TAX_RATES, 'page=' . $_GET['page'] . '&tID=' . $trInfo->tax_rates_id) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/cancel.png', '', '12', '12') . '&nbsp;' . BUTTON_CANCEL . '</span></a>');
        break;
    default:
        if (is_object($trInfo)) {
            $heading[] = array('text' => '<b>' . $trInfo->tax_class_title . '</b>');
            $contents[] = array('align' => 'center', 'text' => '<a class="button" href="' . vam_href_link(FILENAME_TAX_RATES, 'page=' . $_GET['page'] . '&tID=' . $trInfo->tax_rates_id . '&action=edit') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/edit.png', '', '12', '12') . '&nbsp;' . BUTTON_EDIT . '</span></a> <a class="button" href="' . vam_href_link(FILENAME_TAX_RATES, 'page=' . $_GET['page'] . '&tID=' . $trInfo->tax_rates_id . '&action=delete') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/delete.png', '', '12', '12') . '&nbsp;' . BUTTON_DELETE . '</span></a>');
            $contents[] = array('text' => '<br />' . TEXT_INFO_DATE_ADDED . ' ' . vam_date_short($trInfo->date_added));
            $contents[] = array('text' => '' . TEXT_INFO_LAST_MODIFIED . ' ' . vam_date_short($trInfo->last_modified));
            $contents[] = array('text' => '<br />' . TEXT_INFO_RATE_DESCRIPTION . '<br />' . $trInfo->tax_description);
        }
        break;
}
if (vam_not_null($heading) && vam_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>
    </table></td>
Exemplo n.º 21
0
}
$product_info_query = vam_db_query("select pd.products_name from " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_PRODUCTS . " p on pd.products_id = p.products_id where pd.language_id = '" . (int) $_SESSION['languages_id'] . "' and p.products_status = '1' and pd.products_id = '" . (int) $_GET['products_id'] . "'");
if (!vam_db_num_rows($product_info_query)) {
    vam_redirect(vam_href_link(FILENAME_REVIEWS));
}
$product_info = vam_db_fetch_array($product_info_query);
$breadcrumb->add(NAVBAR_TITLE_PRODUCT_REVIEWS, vam_href_link(FILENAME_PRODUCT_REVIEWS, $get_params));
require DIR_WS_INCLUDES . 'header.php';
$vamTemplate->assign('PRODUCTS_NAME', $product_info['products_name']);
$data_reviews = array();
$reviews_query = vam_db_query("select reviews_rating, reviews_id, customers_name, date_added, last_modified, reviews_read from " . TABLE_REVIEWS . " where products_id = '" . (int) $_GET['products_id'] . "' order by reviews_id DESC");
if (vam_db_num_rows($reviews_query)) {
    $row = 0;
    while ($reviews = vam_db_fetch_array($reviews_query)) {
        $row++;
        $data_reviews[] = array('ID' => $reviews['reviews_id'], 'AUTHOR' => '<a href="' . vam_href_link(FILENAME_PRODUCT_REVIEWS_INFO, $get_params . '&reviews_id=' . $reviews['reviews_id']) . '">' . $reviews['customers_name'] . '</a>', 'DATE' => vam_date_short($reviews['date_added']), 'RATING' => vam_image('templates/' . CURRENT_TEMPLATE . '/img/stars_' . $reviews['reviews_rating'] . '.gif', sprintf(BOX_REVIEWS_TEXT_OF_5_STARS, $reviews['reviews_rating'])), 'TEXT' => vam_break_string(htmlspecialchars($reviews['reviews_text']), 60, '-<br />'));
    }
}
$vamTemplate->assign('module_content', $data_reviews);
$vamTemplate->assign('BUTTON_BACK', '<a class="button" href="' . vam_href_link(FILENAME_PRODUCT_INFO, $get_params_back) . '">' . vam_image_button('back.png', IMAGE_BUTTON_BACK) . '</a>');
$vamTemplate->assign('BUTTON_WRITE', '<a class="button" href="' . vam_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, $get_params) . '">' . vam_image_button('add.png', IMAGE_BUTTON_WRITE_REVIEW) . '</a>');
$vamTemplate->assign('language', $_SESSION['language']);
// set cache ID
if (!CacheCheck()) {
    $vamTemplate->caching = 0;
    $main_content = $vamTemplate->fetch(CURRENT_TEMPLATE . '/module/product_reviews.html');
} else {
    $vamTemplate->caching = 1;
    $vamTemplate->cache_lifetime = CACHE_LIFETIME;
    $vamTemplate->cache_modified_check = CACHE_CHECK;
    $cache_id = $_SESSION['language'] . $_GET['products_id'];
Exemplo n.º 22
0
                    $contents[] = array('align' => 'center', 'text' => '<br />' . vam_image(DIR_WS_IMAGES . 'graphs/banner_infobox-' . $banner_id . '.' . $banner_extension));
                } else {
                    include DIR_WS_FUNCTIONS . 'html_graphs.php';
                    $contents[] = array('align' => 'center', 'text' => '<br />' . vam_banner_graph_infoBox($bInfo->banners_id, '3'));
                }
                $contents[] = array('text' => vam_image(DIR_WS_IMAGES . 'graph_hbar_blue.gif', 'Blue', '5', '5') . ' ' . TEXT_BANNERS_BANNER_VIEWS . '<br />' . vam_image(DIR_WS_IMAGES . 'graph_hbar_red.gif', 'Red', '5', '5') . ' ' . TEXT_BANNERS_BANNER_CLICKS);
                if ($bInfo->date_scheduled) {
                    $contents[] = array('text' => '<br />' . sprintf(TEXT_BANNERS_SCHEDULED_AT_DATE, vam_date_short($bInfo->date_scheduled)));
                }
                if ($bInfo->expires_date) {
                    $contents[] = array('text' => '<br />' . sprintf(TEXT_BANNERS_EXPIRES_AT_DATE, vam_date_short($bInfo->expires_date)));
                } elseif ($bInfo->expires_impressions) {
                    $contents[] = array('text' => '<br />' . sprintf(TEXT_BANNERS_EXPIRES_AT_IMPRESSIONS, $bInfo->expires_impressions));
                }
                if ($bInfo->date_status_change) {
                    $contents[] = array('text' => '<br />' . sprintf(TEXT_BANNERS_STATUS_CHANGE, vam_date_short($bInfo->date_status_change)));
                }
            }
            break;
    }
    if (vam_not_null($heading) && vam_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 
Exemplo n.º 23
0
 /**
  * 
  * select reviews
  * 
  */
 function getReviews()
 {
     $data_reviews = array();
     $reviews_query = vamDBquery("select\n\t\t\t                                 r.reviews_rating,\n\t\t\t                                 r.reviews_id,\n\t\t\t                                 r.customers_name,\n\t\t\t                                 r.date_added,\n\t\t\t                                 r.last_modified,\n\t\t\t                                 r.reviews_read,\n\t\t\t                                 rd.reviews_text\n\t\t\t                                 from " . TABLE_REVIEWS . " r,\n\t\t\t                                 " . TABLE_REVIEWS_DESCRIPTION . " rd\n\t\t\t                                 where r.products_id = '" . $this->pID . "'\n\t\t\t                                 and  r.reviews_id=rd.reviews_id\n\t\t\t                                 and rd.languages_id = '" . $_SESSION['languages_id'] . "'\n\t\t\t                                 order by reviews_id DESC");
     if (vam_db_num_rows($reviews_query, true)) {
         $row = 0;
         $data_reviews = array();
         while ($reviews = vam_db_fetch_array($reviews_query, true)) {
             $row++;
             $data_reviews[] = array('AUTHOR' => $reviews['customers_name'], 'DATE' => vam_date_short($reviews['date_added']), 'RATING' => vam_image('templates/' . CURRENT_TEMPLATE . '/img/stars_' . $reviews['reviews_rating'] . '.gif', sprintf(TEXT_OF_5_STARS, $reviews['reviews_rating'])), 'TEXT' => vam_break_string(nl2br(htmlspecialchars($reviews['reviews_text'])), 60, '-<br />'));
             if ($row == PRODUCT_REVIEWS_VIEW) {
                 break;
             }
         }
     }
     return $data_reviews;
 }
Exemplo n.º 24
0
if (ACCOUNT_DOB == 'true') {
    ?>
          <tr>
            <td class="main"><?php 
    echo ENTRY_DATE_OF_BIRTH;
    ?>
</td>
            <td class="main"><?php 
    if ($error == true) {
        if ($entry_date_of_birth_error == true) {
            echo vam_draw_input_field('customers_dob', vam_date_short($customers_dob), 'maxlength="10"') . '&nbsp;' . ENTRY_DATE_OF_BIRTH_ERROR;
        } else {
            echo vam_draw_input_field('customers_dob', vam_date_short($customers_dob), 'maxlength="10"');
        }
    } else {
        echo vam_draw_input_field('customers_dob', vam_date_short($customers_dob), 'maxlength="10"');
    }
    ?>
</td>
          </tr>
<?php 
}
?>
          <tr>
            <td class="main"><?php 
echo ENTRY_EMAIL_ADDRESS;
?>
</td>
            <td class="main"><?php 
if ($error == true) {
    if ($entry_email_address_error == true) {
Exemplo n.º 25
0
         $contents = array('form' => vam_draw_form('authors', FILENAME_AUTHORS, 'page=' . $_GET['page'] . '&auID=' . $auInfo->authors_id . '&action=deleteconfirm'));
         $contents[] = array('text' => TEXT_DELETE_INTRO);
         $contents[] = array('text' => '<br><b>' . $auInfo->authors_name . '</b>');
         if ($auInfo->articles_count > 0) {
             $contents[] = array('text' => '<br>' . vam_draw_checkbox_field('delete_articles') . ' ' . TEXT_DELETE_ARTICLES);
             $contents[] = array('text' => '<br>' . sprintf(TEXT_DELETE_WARNING_ARTICLES, $auInfo->articles_count));
         }
         $contents[] = array('align' => 'center', 'text' => '<br>' . '<span class="button"><button type="submit" value="' . BUTTON_DELETE . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/delete.png', '', '12', '12') . '&nbsp;' . BUTTON_DELETE . '</button></span>' . ' <a class="button" href="' . vam_href_link(FILENAME_AUTHORS, 'page=' . $_GET['page'] . '&auID=' . $auInfo->authors_id) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/cancel.png', '', '12', '12') . '&nbsp;' . BUTTON_CANCEL . '</span></a>');
         break;
     default:
         if (isset($auInfo) && is_object($auInfo)) {
             $heading[] = array('text' => '<b>' . $auInfo->authors_name . '</b>');
             $contents[] = array('align' => 'center', 'text' => '<a class="button" href="' . vam_href_link(FILENAME_AUTHORS, 'page=' . $_GET['page'] . '&auID=' . $auInfo->authors_id . '&action=edit') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/edit.png', '', '12', '12') . '&nbsp;' . BUTTON_EDIT . '</span></a> <a class="button" href="' . vam_href_link(FILENAME_AUTHORS, 'page=' . $_GET['page'] . '&auID=' . $auInfo->authors_id . '&action=delete') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/delete.png', '', '12', '12') . '&nbsp;' . BUTTON_DELETE . '</span></a>');
             $contents[] = array('text' => '<br>' . TEXT_DATE_ADDED . ' ' . vam_date_short($auInfo->date_added));
             if (vam_not_null($auInfo->last_modified)) {
                 $contents[] = array('text' => TEXT_LAST_MODIFIED . ' ' . vam_date_short($auInfo->last_modified));
             }
             $contents[] = array('text' => '<br>' . TEXT_ARTICLES . ' ' . $auInfo->articles_count);
         }
         break;
 }
 if (vam_not_null($heading) && vam_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>
Exemplo n.º 26
0
        case 'delete':
            $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_FEATURED . '</b>');
            $contents = array('form' => vam_draw_form('featured', FILENAME_FEATURED, 'page=' . $_GET['page'] . '&fID=' . $fInfo->featured_id . '&action=deleteconfirm'));
            $contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
            $contents[] = array('text' => '<br /><b>' . $fInfo->products_name . '</b>');
            $contents[] = array('align' => 'center', 'text' => '<br /><span class="button"><button type="submit" value="' . BUTTON_DELETE . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/delete.png', '', '12', '12') . '&nbsp;' . BUTTON_DELETE . '</button></span>&nbsp;<a class="button" href="' . vam_href_link(FILENAME_FEATURED, 'page=' . $_GET['page'] . '&fID=' . $fInfo->featured_id) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/cancel.png', '', '12', '12') . '&nbsp;' . BUTTON_CANCEL . '</span></a>');
            break;
        default:
            if (is_object($fInfo)) {
                $heading[] = array('text' => '<b>' . $fInfo->products_name . '</b>');
                $contents[] = array('align' => 'center', 'text' => '<a class="button" href="' . vam_href_link(FILENAME_FEATURED, 'page=' . $_GET['page'] . '&fID=' . $fInfo->featured_id . '&action=edit') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/edit.png', '', '12', '12') . '&nbsp;' . BUTTON_EDIT . '</span></a> <a class="button" href="' . vam_href_link(FILENAME_FEATURED, 'page=' . $_GET['page'] . '&fID=' . $fInfo->featured_id . '&action=delete') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/delete.png', '', '12', '12') . '&nbsp;' . BUTTON_DELETE . '</span></a>');
                $contents[] = array('text' => '<br />' . TEXT_INFO_DATE_ADDED . ' ' . vam_date_short($fInfo->featured_date_added));
                $contents[] = array('text' => '' . TEXT_INFO_LAST_MODIFIED . ' ' . vam_date_short($fInfo->featured_last_modified));
                $contents[] = array('align' => 'center', 'text' => '<br />' . vam_product_thumb_image($fInfo->products_image, $fInfo->products_name, PRODUCT_IMAGE_THUMBNAIL_WIDTH, PRODUCT_IMAGE_THUMBNAIL_HEIGHT));
                $contents[] = array('text' => '<br />' . TEXT_INFO_EXPIRES_DATE . ' <b>' . vam_date_short($fInfo->expires_date) . '</b>');
                $contents[] = array('text' => '' . TEXT_INFO_STATUS_CHANGE . ' ' . vam_date_short($fInfo->date_status_change));
            }
            break;
    }
    if (vam_not_null($heading) && vam_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>
    </table></td>
Exemplo n.º 27
0
</td>
                    <td class="smallText" align="right"><?php 
echo $products_split->display_links($products_query_numrows, MAX_DISPLAY_ADMIN_PAGE, MAX_DISPLAY_PAGE_LINKS, $_GET['page']);
?>
</td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
<?php 
$heading = array();
$contents = array();
if (is_object($pInfo)) {
    $heading[] = array('text' => '<b>' . $pInfo->products_name . '</b>');
    $contents[] = array('align' => 'center', 'text' => '<a class="button" href="' . vam_href_link(FILENAME_CATEGORIES, 'pID=' . $pInfo->products_id . '&action=new_product') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/edit.png', '', '12', '12') . '&nbsp;' . BUTTON_EDIT . '</span></a>');
    $contents[] = array('text' => '<br />' . TEXT_INFO_DATE_EXPECTED . ' ' . vam_date_short($pInfo->products_date_available));
}
if (vam_not_null($heading) && vam_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>
    </table></td>
<!-- body_text_eof //-->
  </tr>
</table>
Exemplo n.º 28
0
    $affiliate_clickthroughs_values = vam_db_query($affiliate_clickthroughs_raw);
    $number_of_clickthroughs = '0';
    while ($affiliate_clickthroughs = vam_db_fetch_array($affiliate_clickthroughs_values)) {
        $number_of_clickthroughs++;
        if ($number_of_clickthroughs / 2 == floor($number_of_clickthroughs / 2)) {
            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'];
              <center>
                <tr>
                  <td width="35%" align="right" class="dataTableContent"><b><?php 
echo TEXT_AFFILIATE_NAME;
?>
</b>&nbsp;&nbsp;&nbsp;&nbsp;</td>
                  <td width="15%" class="dataTableContent"><?php 
echo $affiliate['affiliate_firstname'] . ' ' . $affiliate['affiliate_lastname'];
?>
</td>
                  <td width="35%" align="right" class="dataTableContent"><?php 
echo TEXT_AFFILIATE_JOINDATE;
?>
&nbsp;&nbsp;&nbsp;&nbsp;</td>
                  <td width="15%" class="dataTableContent"><?php 
echo vam_date_short($affiliate['affiliate_date_account_created']);
?>
</td>
                </tr>
                <tr>
                  <td width="35%" align="right" class="dataTableContent"><?php 
echo TEXT_IMPRESSIONS;
echo '<a href="javascript:popupWindow(\'' . (HTTP_SERVER . DIR_WS_CATALOG . FILENAME_AFFILIATE_HELP_1) . '\')">' . TEXT_SUMMARY_HELP . '</a>';
?>
</td>
                  <td width="15%" class="dataTableContent"><?php 
echo $affiliate_impressions;
?>
</td>
                  <td width="35%" align="right" class="dataTableContent"><?php 
echo TEXT_VISITS;
} else {
    $lastname_content = vam_draw_input_fieldNote(array('name' => 'a_lastname', 'text' => '&nbsp;' . ENTRY_FIRST_NAME_TEXT), $affiliate['affiliate_lastname']);
}
$module->assign('lastname_content', $lastname_content);
if (ACCOUNT_DOB == 'true') {
    $module->assign('ACCOUNT_DOB', 'true');
    if ($is_read_only == true) {
        $dob_content = vam_date_short($affiliate['affiliate_dob']);
    } elseif ($error == true) {
        if ($entry_date_of_birth_error == true) {
            $dob_content = vam_draw_input_fieldNote(array('name' => 'a_dob', 'text' => '&nbsp;' . ENTRY_DATE_OF_BIRTH_ERROR));
        } else {
            $dob_content = $a_dob . vam_draw_hidden_field('a_dob');
        }
    } else {
        $dob_content = vam_draw_input_fieldNote(array('name' => 'a_dob', 'text' => '&nbsp;' . ENTRY_DATE_OF_BIRTH_TEXT), vam_date_short($affiliate['affiliate_dob']));
    }
    $module->assign('dob_content', $dob_content);
}
if ($is_read_only == true) {
    $email_content = $affiliate['affiliate_email_address'];
} elseif ($error == true) {
    if ($entry_email_address_error == true) {
        $email_content = vam_draw_input_fieldNote(array('name' => 'a_email_address', 'text' => '&nbsp;' . ENTRY_EMAIL_ADDRESS_ERROR));
    } elseif ($entry_email_address_check_error == true) {
        $email_content = vam_draw_input_fieldNote(array('name' => 'a_email_address', 'text' => '&nbsp;' . ENTRY_EMAIL_ADDRESS_CHECK_ERROR));
    } elseif ($entry_email_address_exists == true) {
        $email_content = vam_draw_input_fieldNote(array('name' => 'a_email_address', 'text' => '&nbsp;' . ENTRY_EMAIL_ADDRESS_ERROR_EXISTS));
    } else {
        $email_content = $a_email_address . vam_draw_hidden_field('a_email_address');
    }