function confirm() { $OSCOM_Db = Registry::get('Db'); $Qmail = $OSCOM_Db->get('customers', 'count(*) as count', ['customers_newsletter' => '1']); $confirm_string = '<table border="0" cellspacing="0" cellpadding="2">' . "\n" . ' <tr>' . "\n" . ' <td class="main"><font color="#ff0000"><strong>' . OSCOM::getDef('text_count_customers', ['count' => $Qmail->valueInt('count')]) . '</strong></font></td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td> </td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td class="main"><strong>' . $this->title . '</strong></td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td> </td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td class="main">' . "\n" . ' <ul class="nav nav-tabs" role="tablist">' . "\n" . ' <li role="presentation" class="active"><a href="#html_preview" aria-controls="html_preview" role="tab" data-toggle="tab">' . OSCOM::getDef('email_type_html') . '</a></li>' . "\n" . ' <li role="presentation"><a href="#plain_preview" aria-controls="plain_preview" role="tab" data-toggle="tab">' . OSCOM::getDef('email_type_plain') . '</a></li>' . "\n" . ' </ul>' . "\n" . ' <div class="tab-content">' . "\n" . ' <div role="tabpanel" class="tab-pane active" id="html_preview">' . "\n" . ' <iframe id="emailHtmlPreviewContent" style="width: 100%; height: 400px; border: 0;"></iframe>' . "\n" . ' <script id="emailHtmlPreview" type="x-tmpl-mustache">' . "\n" . ' ' . HTML::outputProtected($this->content_html) . "\n" . ' </script>' . "\n" . ' <script>' . "\n" . ' $(function() {' . "\n" . ' var content = $(\'<div />\').html($(\'#emailHtmlPreview\').html()).text();' . "\n" . ' $(\'#emailHtmlPreviewContent\').contents().find(\'html\').html(content);' . "\n" . ' });' . "\n" . ' </script>' . "\n" . ' </div>' . "\n" . ' <div role="tabpanel" class="tab-pane" id="plain_preview">' . "\n" . ' ' . nl2br(HTML::outputProtected($this->content)) . "\n" . ' </div>' . "\n" . ' </div>' . "\n" . ' </td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td> </td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td class="smallText" align="right">' . HTML::button(OSCOM::getDef('image_send'), 'fa fa-envelope', OSCOM::link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'] . '&action=confirm_send')) . HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'])) . '</td>' . "\n" . ' </tr>' . "\n" . '</table>'; return $confirm_string; }
function getOutput() { $button_height = (int) MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_SHARE_HEIGHT; if (MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_SHARE_ANNOTATION == 'Vertical-Bubble') { $button_height = 60; } $output = '<div class="g-plus" data-action="share" data-href="' . OSCOM::link('product_info.php', 'products_id=' . $_GET['products_id'], false) . '" data-annotation="' . strtolower(MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_SHARE_ANNOTATION) . '"'; if ((int) MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_SHARE_WIDTH > 0) { $output .= ' data-width="' . (int) MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_SHARE_WIDTH . '"'; } $output .= ' data-height="' . $button_height . '" data-align="' . strtolower(MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_SHARE_ALIGN) . '"></div>'; $output .= '<script> if ( typeof window.___gcfg == "undefined" ) { window.___gcfg = { }; } if ( typeof window.___gcfg.lang == "undefined" ) { window.___gcfg.lang = "' . HTML::outputProtected($this->lang->get('code')) . '"; } (function() { var po = document.createElement(\'script\'); po.type = \'text/javascript\'; po.async = true; po.src = \'https://apis.google.com/js/plusone.js\'; var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(po, s); })(); </script>'; return $output; }
function execute() { global $PHP_SELF, $oscTemplate; $OSCOM_Db = Registry::get('Db'); $OSCOM_Language = Registry::get('Language'); if (basename($PHP_SELF) == 'product_info.php') { $Qproduct = $OSCOM_Db->prepare('select p.products_id, pd.products_name, pd.products_description, p.products_image, p.products_price, p.products_quantity, p.products_tax_class_id, p.products_date_available from :table_products p, :table_products_description pd where p.products_id = :products_id and p.products_status = 1 and p.products_id = pd.products_id and pd.language_id = :language_id'); $Qproduct->bindInt(':products_id', $_GET['products_id']); $Qproduct->bindInt(':language_id', $OSCOM_Language->getId()); $Qproduct->execute(); if ($Qproduct->fetch() !== false) { $data = array('og:type' => 'product', 'og:title' => $Qproduct->value('products_name'), 'og:site_name' => STORE_NAME); $product_description = substr(trim(preg_replace('/\\s\\s+/', ' ', strip_tags($Qproduct->value('products_description')))), 0, 197) . '...'; $data['og:description'] = $product_description; $products_image = $Qproduct->value('products_image'); $Qimage = $OSCOM_Db->get('products_images', 'image', ['products_id' => $Qproduct->valueInt('products_id')], 'sort_order', 1); if ($Qimage->fetch() !== false) { $products_image = $Qimage->value('image'); } $data['og:image'] = OSCOM::linkImage($products_image); if ($new_price = tep_get_products_special_price($Qproduct->valueInt('products_id'))) { $products_price = $this->format_raw($new_price); } else { $products_price = $this->format_raw($Qproduct->value('products_price')); } $data['product:price:amount'] = $products_price; $data['product:price:currency'] = $_SESSION['currency']; $data['og:url'] = OSCOM::link('product_info.php', 'products_id=' . $Qproduct->valueInt('products_id'), false); $data['product:availability'] = $Qproduct->valueInt('products_quantity') > 0 ? OSCOM::getDef('module_header_tags_product_opengraph_text_in_stock') : OSCOM::getDef('module_header_tags_product_opengraph_text_out_of_stock'); $result = ''; foreach ($data as $key => $value) { $result .= '<meta property="' . HTML::outputProtected($key) . '" content="' . HTML::outputProtected($value) . '" />' . PHP_EOL; } $oscTemplate->addBlock($result, $this->group); } } }
function execute() { global $oscTemplate; $content_width = MODULE_CONTENT_CUSTOMER_GREETING_CONTENT_WIDTH; if (isset($_SESSION['customer_id'])) { $customer_greeting = OSCOM::getDef('module_content_customer_greeting_personal', ['customer_first_name' => HTML::outputProtected($_SESSION['customer_first_name']), 'products_new_link' => OSCOM::link('products_new.php')]); } else { $customer_greeting = OSCOM::getDef('module_content_customer_greeting_guest', ['guest_login_link' => OSCOM::link('login.php'), 'guest_create_account_link' => OSCOM::link('create_account.php')]); } ob_start(); include 'includes/modules/content/' . $this->group . '/templates/customer_greeting.php'; $template = ob_get_clean(); $oscTemplate->addContent($template, $this->group); }
function getOutput() { $entries = []; $newsCache = new Cache('oscommerce_website-news-latest5'); if ($newsCache->exists(360)) { $entries = $newsCache->get(); } else { $response = HTTP::getResponse(['url' => 'https://www.oscommerce.com/index.php?RPC&GetLatestNews']); if (!empty($response)) { $response = json_decode($response, true); if (is_array($response) && count($response) === 5) { $entries = $response; } } $newsCache->save($entries); } $output = '<table class="table table-hover"> <thead> <tr class="info"> <th>' . OSCOM::getDef('module_admin_dashboard_latest_news_title') . '</th> <th class="text-right">' . OSCOM::getDef('module_admin_dashboard_latest_news_date') . '</th> </tr> </thead> <tbody>'; if (is_array($entries) && count($entries) === 5) { foreach ($entries as $item) { $output .= ' <tr> <td><a href="' . HTML::outputProtected($item['link']) . '" target="_blank">' . HTML::outputProtected($item['title']) . '</a></td> <td class="text-right" style="white-space: nowrap;">' . HTML::outputProtected(DateTime::toShort($item['date'])) . '</td> </tr>'; } } else { $output .= ' <tr> <td colspan="2">' . OSCOM::getDef('module_admin_dashboard_latest_news_feed_error') . '</td> </tr>'; } $output .= ' <tr> <td class="text-right" colspan="2"> <a href="https://www.oscommerce.com/Us&News" target="_blank" title="' . HTML::outputProtected(OSCOM::getDef('module_admin_dashboard_latest_news_icon_news')) . '"><span class="fa fa-fw fa-home"></span></a> <a href="https://www.oscommerce.com/newsletter/subscribe" target="_blank" title="' . HTML::outputProtected(OSCOM::getDef('module_admin_dashboard_latest_news_icon_newsletter')) . '"><span class="fa fa-fw fa-newspaper-o"></span></a> <a href="https://plus.google.com/+osCommerce" target="_blank" title="' . HTML::outputProtected(OSCOM::getDef('module_admin_dashboard_latest_news_icon_google_plus')) . '"><span class="fa fa-fw fa-google-plus"></span></a> <a href="https://www.facebook.com/pages/osCommerce/33387373079" target="_blank" title="' . HTML::outputProtected(OSCOM::getDef('module_admin_dashboard_latest_news_icon_facebook')) . '"><span class="fa fa-fw fa-facebook"></span></a> <a href="https://twitter.com/osCommerce" target="_blank" title="' . HTML::outputProtected(OSCOM::getDef('module_admin_dashboard_latest_news_icon_twitter')) . '"><span class="fa fa-fw fa-twitter"></span></a> </td> </tr> </tbody> </table>'; return $output; }
function getOutput() { $params = array('url=' . urlencode(OSCOM::link('product_info.php', 'products_id=' . $_GET['products_id'], false))); if (strlen(MODULE_SOCIAL_BOOKMARKS_TWITTER_BUTTON_ACCOUNT) > 0) { $params[] = 'via=' . urlencode(MODULE_SOCIAL_BOOKMARKS_TWITTER_BUTTON_ACCOUNT); } if (strlen(MODULE_SOCIAL_BOOKMARKS_TWITTER_BUTTON_RELATED_ACCOUNT) > 0) { $params[] = 'related=' . urlencode(MODULE_SOCIAL_BOOKMARKS_TWITTER_BUTTON_RELATED_ACCOUNT) . (strlen(MODULE_SOCIAL_BOOKMARKS_TWITTER_BUTTON_RELATED_ACCOUNT_DESC) > 0 ? ':' . urlencode(MODULE_SOCIAL_BOOKMARKS_TWITTER_BUTTON_RELATED_ACCOUNT_DESC) : ''); } if (MODULE_SOCIAL_BOOKMARKS_TWITTER_BUTTON_COUNT_POSITION == 'Vertical') { $params[] = 'count=vertical'; } elseif (MODULE_SOCIAL_BOOKMARKS_TWITTER_BUTTON_COUNT_POSITION == 'None') { $params[] = 'count=none'; } $params = implode('&', $params); return '<script src="http://platform.twitter.com/widgets.js" type="text/javascript"></script><a href="http://twitter.com/share?' . $params . '" target="_blank" class="twitter-share-button">' . HTML::outputProtected($this->public_title) . '</a>'; }
public function get($group) { $result = ''; if ($this->exists($group)) { $data = []; foreach ($this->data[$group] as $message) { $data['alert-' . $message['type']][] = $message['text']; } foreach ($data as $type => $messages) { $result .= '<div class="alert ' . HTML::outputProtected($type) . '" role="alert">'; foreach ($messages as $message) { $result .= '<p>' . $message . '</p>'; } $result .= '</div>'; } unset($this->data[$group]); } return $result; }
function getOutput() { $entries = []; $addonsCache = new Cache('oscommerce_website-addons-latest5'); if ($addonsCache->exists(360)) { $entries = $addonsCache->get(); } else { $response = HTTP::getResponse(['url' => 'https://www.oscommerce.com/index.php?RPC&GetLatestAddons']); if (!empty($response)) { $response = json_decode($response, true); if (is_array($response) && count($response) === 5) { $entries = $response; } } $addonsCache->save($entries); } $output = '<table class="table table-hover"> <thead> <tr class="info"> <th>' . OSCOM::getDef('module_admin_dashboard_latest_addons_title') . '</th> <th class="text-right">' . OSCOM::getDef('module_admin_dashboard_latest_addons_date') . '</th> </tr> </thead> <tbody>'; if (is_array($entries) && count($entries) === 5) { foreach ($entries as $item) { $output .= ' <tr> <td><a href="' . HTML::outputProtected($item['link']) . '" target="_blank">' . HTML::outputProtected($item['title']) . '</a></td> <td class="text-right" style="white-space: nowrap;">' . HTML::outputProtected(DateTime::toShort($item['date'])) . '</td> </tr>'; } } else { $output .= ' <tr> <td colspan="2">' . OSCOM::getDef('module_admin_dashboard_latest_addons_feed_error') . '</td> </tr>'; } $output .= ' <tr> <td class="text-right" colspan="2"><a href="http://addons.oscommerce.com" target="_blank" title="' . HTML::outputProtected(OSCOM::getDef('module_admin_dashboard_latest_addons_icon_site')) . '"><span class="fa fa-fw fa-home"></span></a></td> </tr> </tbody> </table>'; return $output; }
function getOutput() { $OSCOM_Db = Registry::get('Db'); $output = '<table class="table table-hover"> <thead> <tr class="info"> <th>' . OSCOM::getDef('module_admin_dashboard_customers_title') . '</th> <th class="text-right">' . OSCOM::getDef('module_admin_dashboard_customers_date') . '</th> </tr> </thead> <tbody>'; $Qcustomers = $OSCOM_Db->get(['customers c', 'customers_info ci'], ['c.customers_id', 'c.customers_lastname', 'c.customers_firstname', 'ci.customers_info_date_account_created'], ['c.customers_id' => ['rel' => 'ci.customers_info_id']], 'ci.customers_info_date_account_created desc', 6); while ($Qcustomers->fetch()) { $output .= ' <tr> <td><a href="' . OSCOM::link(FILENAME_CUSTOMERS, 'cID=' . $Qcustomers->valueInt('customers_id') . '&action=edit') . '">' . HTML::outputProtected($Qcustomers->value('customers_firstname') . ' ' . $Qcustomers->value('customers_lastname')) . '</a></td> <td class="text-right">' . DateTime::toShort($Qcustomers->value('customers_info_date_account_created')) . '</td> </tr>'; } $output .= ' </tbody> </table>'; return $output; }
function execute() { global $oscTemplate; $content_width = (int) MODULE_CONTENT_PRODUCT_INFO_GTIN_CONTENT_WIDTH; $OSCOM_Db = Registry::get('Db'); $Qgtin = $OSCOM_Db->prepare('select products_gtin from :table_products where products_id = :products_id'); $Qgtin->bindInt(':products_id', $_GET['products_id']); $Qgtin->execute(); if ($Qgtin->fetch() !== false) { $gtin = $Qgtin->value('products_gtin'); if (!empty($gtin)) { $gtin = substr($gtin, 0 - MODULE_CONTENT_PRODUCT_INFO_GTIN_LENGTH); if (!empty($gtin)) { $gtin = HTML::outputProtected($gtin); ob_start(); include 'includes/modules/content/' . $this->group . '/templates/gtin.php'; $template = ob_get_clean(); $oscTemplate->addContent($template, $this->group); } } } }
function execute() { global $PHP_SELF, $oscTemplate; $OSCOM_Db = Registry::get('Db'); if (MODULE_HEADER_TAGS_GOOGLE_ADWORDS_CONVERSION_JS_PLACEMENT != 'Footer') { $this->group = 'header_tags'; } if ($PHP_SELF == 'checkout_success.php' && isset($_SESSION['customer_id'])) { $Qorder = $OSCOM_Db->get('orders', ['orders_id', 'currency', 'currency_value'], ['customers_id' => $_SESSION['customer_id']], 'date_purchased desc', 1); if ($Qorder->fetch() !== false) { $Qsubtotal = $OSCOM_Db->get('orders_total', 'value', ['orders_id' => $Qorder->valueInt('orders_id'), 'class' => 'ot_subtotal']); $conversion_id = (int) MODULE_HEADER_TAGS_GOOGLE_ADWORDS_CONVERSION_ID; $conversion_language = HTML::outputProtected($this->lang->get('code')); $conversion_format = (int) MODULE_HEADER_TAGS_GOOGLE_ADWORDS_CONVERSION_FORMAT; $conversion_color = HTML::outputProtected(MODULE_HEADER_TAGS_GOOGLE_ADWORDS_CONVERSION_COLOR); $conversion_label = HTML::outputProtected(MODULE_HEADER_TAGS_GOOGLE_ADWORDS_CONVERSION_LABEL); $conversion_value = $this->format_raw($Qsubtotal->value('value'), $Qorder->value('currency'), $Qorder->value('currency_value')); $output = <<<EOD <script> /* <![CDATA[ */ var google_conversion_id = {$conversion_id}; var google_conversion_language = "{$conversion_language}"; var google_conversion_format = "{$conversion_format}"; var google_conversion_color = "{$conversion_color}"; var google_conversion_label = "{$conversion_label}"; var google_conversion_value = {$conversion_value}; /* ]]> */ </script> <script src="//www.googleadservices.com/pagead/conversion.js"></script> <noscript> <div style="display:inline;"> <img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/{$conversion_id}/?value={$conversion_value}&label={$conversion_label}&guid=ON&script=0"/> </div> </noscript> EOD; $oscTemplate->addBlock($output, $this->group); } } }
function execute() { global $PHP_SELF, $oscTemplate; $OSCOM_Db = Registry::get('Db'); $OSCOM_Language = Registry::get('Language'); if ($PHP_SELF == 'product_info.php' && isset($_GET['products_id'])) { $Qproduct = $OSCOM_Db->prepare('select p.products_id, pd.products_name, pd.products_description, p.products_image from :table_products p, :table_products_description pd where p.products_id = :products_id and p.products_status = 1 and p.products_id = pd.products_id and pd.language_id = :language_id'); $Qproduct->bindInt(':products_id', $_GET['products_id']); $Qproduct->bindInt(':language_id', $OSCOM_Language->getId()); $Qproduct->execute(); if ($Qproduct->fetch() !== false) { $data = array('card' => MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_TYPE, 'title' => $Qproduct->value('products_name')); if (tep_not_null(MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_SITE_ID)) { $data['site'] = MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_SITE_ID; } if (tep_not_null(MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_USER_ID)) { $data['creator'] = MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_USER_ID; } $product_description = substr(trim(preg_replace('/\\s\\s+/', ' ', strip_tags($Qproduct->value('products_description')))), 0, 197); if (strlen($product_description) == 197) { $product_description .= ' ..'; } $data['description'] = $product_description; $products_image = $Qproduct->value('products_image'); $Qimage = $OSCOM_Db->get('products_images', 'image', ['products_id' => $Qproduct->valueInt('products_id')], 'sort_order', 1); if ($Qimage->fetch() !== false) { $products_image = $Qimage->value('image'); } $data['image'] = OSCOM::linkImage($products_image); $result = ''; foreach ($data as $key => $value) { $result .= '<meta name="twitter:' . HTML::outputProtected($key) . '" content="' . HTML::outputProtected($value) . '" />' . "\n"; } $oscTemplate->addBlock($result, $this->group); } } }
<?php } } if (tep_not_null($order->info['comments'])) { ?> <hr> <h2><?php echo '<strong>' . OSCOM::getDef('heading_order_comments') . '</strong> ' . HTML::button(OSCOM::getDef('text_edit'), 'fa fa-edit', OSCOM::link('checkout_payment.php'), null, 'pull-right btn-info btn-xs'); ?> </h2> <blockquote> <?php echo nl2br(HTML::outputProtected($order->info['comments'])) . HTML::hiddenField('comments', $order->info['comments']); ?> </blockquote> <?php } ?> <div class="buttonSet"> <div class="text-right"> <?php if (is_array($payment_modules->modules)) { echo $payment_modules->process_button(); } echo HTML::button(OSCOM::getDef('image_button_pay_total_now', ['total' => $currencies->format($order->info['total'], true, $order->info['currency'], $order->info['currency_value'])]), 'fa fa-ok', null, array('params' => 'data-button="payNow"'), 'btn-success'); ?>
function confirm() { $OSCOM_Db = Registry::get('Db'); $audience = array(); if (isset($_GET['global']) && $_GET['global'] == 'true') { $Qproducts = $OSCOM_Db->get('products_notifications', 'distinct customers_id'); while ($Qproducts->fetch()) { $audience[$Qproducts->valueInt('customers_id')] = '1'; } $Qcustomers = $OSCOM_Db->get('customers_info', 'customers_info_id', ['global_product_notifications' => '1']); while ($Qcustomers->fetch()) { $audience[$Qcustomers->valueInt('customers_info_id')] = '1'; } } else { $chosen = []; foreach ($_POST['chosen'] as $id) { if (is_numeric($id) && !in_array($id, $chosen)) { $chosen[] = $id; } } $ids = array_map(function ($k) { return ':products_id_' . $k; }, array_keys($chosen)); $Qproducts = $OSCOM_Db->prepare('select distinct customers_id from :table_products_notifications where products_id in (' . implode(', ', $ids) . ')'); foreach ($chosen as $k => $v) { $Qproducts->bindInt(':products_id_' . $k, $v); } $Qproducts->execute(); while ($Qproducts->fetch()) { $audience[$Qproducts->valueInt('customers_id')] = '1'; } $Qcustomers = $OSCOM_Db->get('customers_info', 'customers_info_id', ['global_product_notifications' => '1']); while ($Qcustomers->fetch()) { $audience[$Qcustomers->valueInt('customers_info_id')] = '1'; } } $confirm_string = HTML::form('confirm', OSCOM::link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'] . '&action=confirm_send')) . "\n" . '<table border="0" cellspacing="0" cellpadding="2">' . "\n" . ' <tr>' . "\n" . ' <td class="main"><font color="#ff0000"><strong>' . OSCOM::getDef('text_count_customers', ['audience' => sizeof($audience)]) . '</strong></font></td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td> </td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td class="main"><strong>' . $this->title . '</strong></td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td> </td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td class="main">' . "\n" . ' <ul class="nav nav-tabs" role="tablist">' . "\n" . ' <li role="presentation" class="active"><a href="#html_preview" aria-controls="html_preview" role="tab" data-toggle="tab">' . OSCOM::getDef('email_type_html') . '</a></li>' . "\n" . ' <li role="presentation"><a href="#plain_preview" aria-controls="plain_preview" role="tab" data-toggle="tab">' . OSCOM::getDef('email_type_plain') . '</a></li>' . "\n" . ' </ul>' . "\n" . ' <div class="tab-content">' . "\n" . ' <div role="tabpanel" class="tab-pane active" id="html_preview">' . "\n" . ' <iframe id="emailHtmlPreviewContent" style="width: 100%; height: 400px; border: 0;"></iframe>' . "\n" . ' <script id="emailHtmlPreview" type="x-tmpl-mustache">' . "\n" . ' ' . HTML::outputProtected($this->content_html) . "\n" . ' </script>' . "\n" . ' <script>' . "\n" . ' $(function() {' . "\n" . ' var content = $(\'<div />\').html($(\'#emailHtmlPreview\').html()).text();' . "\n" . ' $(\'#emailHtmlPreviewContent\').contents().find(\'html\').html(content);' . "\n" . ' });' . "\n" . ' </script>' . "\n" . ' </div>' . "\n" . ' <div role="tabpanel" class="tab-pane" id="plain_preview">' . "\n" . ' ' . nl2br(HTML::outputProtected($this->content)) . "\n" . ' </div>' . "\n" . ' </div>' . "\n" . ' </td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td> </td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td class="smallText" align="right">'; if (sizeof($audience) > 0) { if (isset($_GET['global']) && $_GET['global'] == 'true') { $confirm_string .= HTML::hiddenField('global', 'true'); } else { for ($i = 0, $n = sizeof($chosen); $i < $n; $i++) { $confirm_string .= HTML::hiddenField('chosen[]', $chosen[$i]); } } $confirm_string .= HTML::button(OSCOM::getDef('image_send'), 'fa fa-envelope'); } $confirm_string .= HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'] . '&action=send')) . '</td>' . "\n" . ' </tr>' . "\n" . '</table>' . "\n" . '</form>'; return $confirm_string; }
function confirmation() { global $order; $OSCOM_Db = Registry::get('Db'); $card_types = array(); foreach ($this->getCardTypes() as $key => $value) { $card_types[] = array('id' => $key, 'text' => $value); } $today = getdate(); $months_array = array(); for ($i = 1; $i < 13; $i++) { $months_array[] = array('id' => sprintf('%02d', $i), 'text' => sprintf('%02d', $i)); } $year_valid_to_array = array(); for ($i = $today['year']; $i < $today['year'] + 10; $i++) { $year_valid_to_array[] = array('id' => strftime('%y', mktime(0, 0, 0, 1, 1, $i)), 'text' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i))); } $year_valid_from_array = array(); for ($i = $today['year'] - 4; $i < $today['year'] + 1; $i++) { $year_valid_from_array[] = array('id' => strftime('%y', mktime(0, 0, 0, 1, 1, $i)), 'text' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i))); } $content = ''; if (MODULE_PAYMENT_SAGE_PAY_DIRECT_TOKENS == 'True') { $Qtokens = $OSCOM_Db->get('customers_sagepay_tokens', ['id', 'card_type', 'number_filtered', 'expiry_date'], ['customers_id' => $_SESSION['customer_id']], 'date_added'); if ($Qtokens->fetch() !== false) { $content .= '<table id="sagepay_table" border="0" width="100%" cellspacing="0" cellpadding="2">'; do { $content .= '<tr class="moduleRow" id="sagepay_card_' . $Qtokens->valueInt('id') . '">' . ' <td width="40" valign="top"><input type="radio" name="sagepay_card" value="' . $Qtokens->valueInt('id') . '" /></td>' . ' <td valign="top">' . $Qtokens->valueProtected('number_filtered') . ' ' . HTML::outputProtected(substr($Qtokens->value('expiry_date'), 0, 2)) . '/' . strftime('%Y', mktime(0, 0, 0, 1, 1, 2000 + substr($Qtokens->value('expiry_date'), 2))) . ' ' . $Qtokens->valueProtected('card_type') . '</td>' . '</tr>'; if (MODULE_PAYMENT_SAGE_PAY_DIRECT_VERIFY_WITH_CVC == 'True') { $content .= '<tr class="moduleRowExtra" id="sagepay_card_cvc_' . $Qtokens->valueInt('id') . '">' . ' <td width="40" valign="top"> </td>' . ' <td valign="top">' . OSCOM::getDef('module_payment_sage_pay_direct_credit_card_cvc') . ' ' . HTML::inputField('cc_cvc_tokens_nh-dns[' . $Qtokens->valueInt('id') . ']', '', 'size="5" maxlength="4"') . '</td>' . '</tr>'; } } while ($Qtokens->fetch()); $content .= '<tr class="moduleRow" id="sagepay_card_0">' . ' <td width="40" valign="top"><input type="radio" name="sagepay_card" value="0" /></td>' . ' <td valign="top">' . OSCOM::getDef('module_payment_sage_pay_direct_credit_card_new') . '</td>' . '</tr>' . '</table>'; } } $content .= '<table id="sagepay_table_new_card" border="0" width="100%" cellspacing="0" cellpadding="2">' . '<tr>' . ' <td width="30%">' . OSCOM::getDef('module_payment_sage_pay_direct_credit_card_type') . '</td>' . ' <td>' . HTML::selectField('cc_type', $card_types, '', 'id="sagepay_card_type"') . '</td>' . '</tr>' . '<tr>' . ' <td width="30%">' . OSCOM::getDef('module_payment_sage_pay_direct_credit_card_owner') . '</td>' . ' <td>' . HTML::inputField('cc_owner', $order->billing['firstname'] . ' ' . $order->billing['lastname'], 'maxlength="50"') . '</td>' . '</tr>' . '<tr>' . ' <td width="30%">' . OSCOM::getDef('module_payment_sage_pay_direct_credit_card_number') . '</td>' . ' <td>' . HTML::inputField('cc_number_nh-dns', '', 'maxlength="20"') . '</td>' . '</tr>'; if (MODULE_PAYMENT_SAGE_PAY_DIRECT_ALLOW_MAESTRO == 'True' || MODULE_PAYMENT_SAGE_PAY_DIRECT_ALLOW_AMEX == 'True') { $content .= '<tr>' . ' <td width="30%">' . OSCOM::getDef('module_payment_sage_pay_direct_credit_card_starts') . '</td>' . ' <td>' . HTML::selectField('cc_starts_month', $months_array, '', 'id="sagepay_card_date_start"') . ' ' . HTML::selectField('cc_starts_year', $year_valid_from_array) . ' ' . OSCOM::getDef('module_payment_sage_pay_direct_credit_card_starts_info') . '</td>' . '</tr>'; } $content .= '<tr>' . ' <td width="30%">' . OSCOM::getDef('module_payment_sage_pay_direct_credit_card_expires') . '</td>' . ' <td>' . HTML::selectField('cc_expires_month', $months_array) . ' ' . HTML::selectField('cc_expires_year', $year_valid_to_array) . '</td>' . '</tr>'; if (MODULE_PAYMENT_SAGE_PAY_DIRECT_ALLOW_MAESTRO == 'True') { $content .= '<tr>' . ' <td width="30%">' . OSCOM::getDef('module_payment_sage_pay_direct_credit_card_issue_number') . '</td>' . ' <td>' . HTML::inputField('cc_issue_nh-dns', '', 'id="sagepay_card_issue" size="3" maxlength="2"') . ' ' . OSCOM::getDef('module_payment_sage_pay_direct_credit_card_issue_number_info') . '</td>' . '</tr>'; } if (MODULE_PAYMENT_SAGE_PAY_DIRECT_VERIFY_WITH_CVC == 'True') { $content .= '<tr>' . ' <td width="30%">' . OSCOM::getDef('module_payment_sage_pay_direct_credit_card_cvc') . '</td>' . ' <td>' . HTML::inputField('cc_cvc_nh-dns', '', 'size="5" maxlength="4"') . '</td>' . '</tr>'; } if (MODULE_PAYMENT_SAGE_PAY_DIRECT_TOKENS == 'True') { $content .= '<tr>' . ' <td width="30%"> </td>' . ' <td>' . HTML::checkboxField('cc_save', 'true') . ' ' . OSCOM::getDef('module_payment_sage_pay_direct_credit_card_save') . '</td>' . '</tr>'; } $content .= '</table>'; $content .= !$this->templateClassExists() ? $this->getSubmitCardDetailsJavascript() : ''; $confirmation = array('title' => $content); return $confirmation; }
<?php echo HTML::outputProtected($_POST['message_html']); ?> </script> <script> $(function() { var content = $('<div />').html($('#emailHtmlPreview').html()).text(); $('#emailHtmlPreviewContent').contents().find('html').html(content); }); </script> </div> <div role="tabpanel" class="tab-pane" id="plain_preview"> <?php echo nl2br(HTML::outputProtected($_POST['message'])); ?> </div> </div> </td> </tr> <tr> <td> </td> </tr> <tr> <td class="smallText" align="right"> <?php /* Re-Post all POST'ed variables */ foreach ($_POST as $key => $value) { if (!is_array($_POST[$key])) { echo HTML::hiddenField($key, $value);
} else { $order_type = OSCOM::getDef('text_order_billed_to'); $order_name = $order['billing_name']; } ?> <div class="contentText"> <div class="panel panel-info"> <div class="panel-heading"><strong><?php echo OSCOM::getDef('text_order_number') . ' ' . (int) $order['orders_id'] . ' <span class="contentText">(' . HTML::outputProtected($order['orders_status_name']) . ')</span>'; ?> </strong></div> <div class="panel-body"> <div class="row"> <div class="col-sm-6"><?php echo '<strong>' . OSCOM::getDef('text_order_date') . '</strong> ' . DateTime::toLong($order['date_purchased']) . '<br /><strong>' . $order_type . '</strong> ' . HTML::outputProtected($order_name); ?> </div> <br class="visible-xs" /> <div class="col-sm-6"><?php echo '<strong>' . OSCOM::getDef('text_order_products') . '</strong> ' . $Qproducts->valueInt('count') . '<br /><strong>' . OSCOM::getDef('text_order_cost') . '</strong> ' . strip_tags($order['order_total']); ?> </div> </div> </div> <div class="panel-footer"><?php echo HTML::button(OSCOM::getDef('small_image_button_view'), 'fa fa-file', OSCOM::link('account_history_info.php', (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'order_id=' . $order['orders_id']), null, 'btn-primary btn-xs'); ?> </div> </div> </div>
protected function valueMixed($column, $type = 'string') { if (!isset($this->result)) { $this->fetch(); } switch ($type) { case 'protected': return HTML::outputProtected($this->result[$column]); break; case 'int': return (int) $this->result[$column]; break; case 'decimal': return (double) $this->result[$column]; break; case 'string': default: return $this->result[$column]; } }
$sql_data_array = array('orders_id' => $insert_id, 'orders_products_id' => $order_products_id, 'products_options' => $Qattributes->value('products_options_name'), 'products_options_values' => $Qattributes->value('products_options_values_name'), 'options_values_price' => $Qattributes->value('options_values_price'), 'price_prefix' => $Qattributes->value('price_prefix')); $OSCOM_Db->save('orders_products_attributes', $sql_data_array); if (DOWNLOAD_ENABLED == 'true' && $Qattributes->hasValue('products_attributes_filename') && tep_not_null($Qattributes->value('products_attributes_filename'))) { $sql_data_array = array('orders_id' => $insert_id, 'orders_products_id' => $order_products_id, 'orders_products_filename' => $Qattributes->value('products_attributes_filename'), 'download_maxdays' => $Qattributes->value('products_attributes_maxdays'), 'download_count' => $Qattributes->value('products_attributes_maxcount')); $OSCOM_Db->save('orders_products_download', $sql_data_array); } $products_ordered_attributes .= "\n\t" . $Qattributes->value('products_options_name') . ' ' . $Qattributes->value('products_options_values_name'); } } //------insert customer choosen option eof ---- $products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n"; } // lets start with the email confirmation $email_order = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . OSCOM::link('account_history_info.php', 'order_id=' . $insert_id, 'SSL', false) . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n"; if ($order->info['comments']) { $email_order .= HTML::outputProtected($order->info['comments']) . "\n\n"; } $email_order .= EMAIL_TEXT_PRODUCTS . "\n" . EMAIL_SEPARATOR . "\n" . $products_ordered . EMAIL_SEPARATOR . "\n"; for ($i = 0, $n = sizeof($order_totals); $i < $n; $i++) { $email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n"; } if ($order->content_type != 'virtual') { $email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . tep_address_label($_SESSION['customer_id'], $_SESSION['sendto'], 0, '', "\n") . "\n"; } $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . tep_address_label($_SESSION['customer_id'], $_SESSION['billto'], 0, '', "\n") . "\n\n"; if (is_object(${$_SESSION}['payment'])) { $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . EMAIL_SEPARATOR . "\n"; $payment_class = ${$_SESSION}['payment']; $email_order .= $order->info['payment_method'] . "\n\n"; if (isset($payment_class->email_footer)) { $email_order .= $payment_class->email_footer . "\n\n";
$error = true; $actionRecorder->record(false); $messageStack->add('friend', OSCOM::getDef('error_action_recorder', ['module_action_recorder_tell_a_friend_email_minutes' => defined('MODULE_ACTION_RECORDER_TELL_A_FRIEND_EMAIL_MINUTES') ? (int) MODULE_ACTION_RECORDER_TELL_A_FRIEND_EMAIL_MINUTES : 15])); } if ($error == false) { $email_subject = OSCOM::getDef('text_email_subject', ['from_name' => $from_name, 'store_name' => STORE_NAME]); $email_body = OSCOM::getDef('text_email_intro', ['to_name' => $to_name, 'from_name' => $from_name, 'products_name' => $Qproduct->value('products_name'), 'store_name' => STORE_NAME]) . "\n\n"; if (tep_not_null($message)) { $email_body .= $message . "\n\n"; } $email_body .= OSCOM::getDef('text_email_link', ['email_product_link' => OSCOM::link('product_info.php', 'products_id=' . $Qproduct->valueInt('products_id'), false)]) . "\n\n" . OSCOM::getDef('text_email_signature', ['email_store_name_link' => STORE_NAME . "\n" . OSCOM::link('index.php', null, false) . "\n"]); $tellfriendEmail = new Mail($to_email_address, $to_name, $from_email_address, $from_name, $email_subject); $tellfriendEmail->setBody($email_body); $tellfriendEmail->send(); $actionRecorder->record(); $messageStack->add_session('header', OSCOM::getDef('text_email_successful_sent', ['email_products_name' => $Qproduct->value('products_name'), 'to_name' => HTML::outputProtected($to_name)]), 'success'); OSCOM::redirect('product_info.php', 'products_id=' . $Qproduct->valueInt('products_id')); } } elseif (isset($_SESSION['customer_id'])) { $Qcustomer = $OSCOM_Db->get('customers', ['customers_firstname', 'customers_lastname', 'customers_email_address'], ['customers_id' => $_SESSION['customer_id']]); $from_name = $Qcustomer->value('customers_firstname') . ' ' . $Qcustomer->value('customers_lastname'); $from_email_address = $Qcustomer->value('customers_email_address'); } $breadcrumb->add(OSCOM::getDef('navbar_title'), OSCOM::link('tell_a_friend.php', 'products_id=' . $Qproduct->valueInt('products_id'))); require $oscTemplate->getFile('template_top.php'); ?> <div class="page-header"> <h1><?php echo OSCOM::getDef('heading_title', ['products_name' => $Qproduct->value('products_name')]); ?>
function getOutput() { return '<a href="' . OSCOM::link('tell_a_friend.php', 'products_id=' . $_GET['products_id']) . '"><img src="' . OSCOM::linkImage('social_bookmarks/' . $this->icon) . '" border="0" title="' . HTML::outputProtected($this->public_title) . '" alt="' . HTML::outputProtected($this->public_title) . '" /></a>'; }
} ?> <div class="contentText"> <div class="panel panel-info"> <div class="panel-heading"><strong><?php echo TEXT_ORDER_NUMBER . ' ' . (int) $order['orders_id'] . ' <span class="contentText">(' . HTML::outputProtected($order['orders_status_name']) . ')</span>'; ?> </strong><?php echo HTML::button(SMALL_IMAGE_BUTTON_VIEW, 'glyphicon glyphicon-file', OSCOM::link('account_history_info.php', (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'order_id=' . (int) $order['orders_id'], 'SSL'), 'primary', NULL, 'btn-primary btn-xs pull-right'); ?> </div> <div class="panel-body"> <div class="row"> <div class="col-sm-6"><?php echo '<strong>' . TEXT_ORDER_DATE . '</strong> ' . tep_date_long($order['date_purchased']) . '<br /><strong>' . $order_type . '</strong> ' . HTML::outputProtected($order_name); ?> </div> <br class="visible-xs" /> <div class="col-sm-6"><?php echo '<strong>' . TEXT_ORDER_PRODUCTS . '</strong> ' . $Qproducts->valueInt('count') . '<br /><strong>' . TEXT_ORDER_COST . '</strong> ' . strip_tags($order['order_total']); ?> </div> </div> </div> </div> </div> <?php } ?>
<?php $Qtokens = $OSCOM_Db->get('customers_sagepay_tokens', ['id', 'card_type', 'number_filtered', 'expiry_date'], ['customers_id' => $_SESSION['customer_id']], 'date_added'); if ($Qtokens->fetch() !== false) { do { ?> <div> <span style="float: right;"><?php echo HTML::button(OSCOM::getDef('small_image_button_delete'), 'glyphicon glyphicon-trash', OSCOM::link('ext/modules/content/account/sage_pay/cards.php', 'action=delete&id=' . $Qtokens->valueInt('id') . '&formid=' . md5($_SESSION['sessiontoken']))); ?> </span> <p><strong><?php echo $Qtokens->valueProtected('card_type'); ?> </strong> ****<?php echo $Qtokens->valueProtected('number_filtered') . ' ' . HTML::outputProtected(substr($Qtokens->value('expiry_date'), 0, 2) . '/' . substr($Qtokens->value('expiry_date'), 2)); ?> </p> </div> <?php } while ($Qtokens->fetch()); } else { ?> <div style="background-color: #FEEFB3; border: 1px solid #9F6000; margin: 10px 0px; padding: 5px 10px; border-radius: 10px;"> <?php echo OSCOM::getDef('module_content_account_sage_pay_cards_text_no_cards'); ?> </div>
</div> </div> <?php echo $OSCOM_Hooks->output('Orders', 'Page', null, 'display'); ?> <?php } else { $heading = $contents = []; switch ($action) { case 'delete': if (isset($order)) { $heading[] = array('text' => OSCOM::getDef('text_info_heading_delete_order')); $contents = array('form' => HTML::form('orders', OSCOM::link('orders.php', tep_get_all_get_params(array('action')) . '&action=deleteconfirm'))); $contents[] = array('text' => OSCOM::getDef('text_info_delete_intro') . '<br /><br /><strong>#' . $order->info['id'] . '</strong> ' . HTML::outputProtected($order->customer['name']) . ' (' . strip_tags($order->info['total']) . ')'); $contents[] = array('text' => HTML::checkboxField('restock') . ' ' . OSCOM::getDef('text_info_restock_product_quantity')); $contents[] = array('text' => HTML::button(OSCOM::getDef('image_delete'), 'fa fa-trash', null, null, 'btn-danger') . HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link('orders.php', tep_get_all_get_params(array('action'))), null, 'btn-link')); } break; } if (tep_not_null($heading) && tep_not_null($contents)) { $show_listing = false; echo HTML::panel($heading, $contents, ['type' => 'info']); } } } if ($show_listing === true) { echo HTML::form('orders', OSCOM::link('orders.php'), 'get', 'class="form-inline"', ['session_id' => true]) . HTML::inputField('oID', null, 'placeholder="' . OSCOM::getDef('heading_title_search') . '"') . HTML::hiddenField('action', 'edit') . '</form>' . HTML::form('status', OSCOM::link('orders.php'), 'get', 'class="form-inline"', ['session_id' => true]) . HTML::selectField('status', array_merge(array(array('id' => '', 'text' => OSCOM::getDef('text_all_orders'))), $orders_statuses), '', 'onchange="this.form.submit();"') . '</form>'; ?>
<?php $Qab = $OSCOM_Db->prepare('select address_book_id, entry_firstname as firstname, entry_lastname as lastname, entry_company as company, entry_street_address as street_address, entry_suburb as suburb, entry_city as city, entry_postcode as postcode, entry_state as state, entry_zone_id as zone_id, entry_country_id as country_id from :table_address_book where customers_id = :customers_id order by firstname, lastname'); $Qab->bindInt(':customers_id', $_SESSION['customer_id']); $Qab->execute(); while ($Qab->fetch()) { $format_id = tep_get_address_format_id($Qab->valueInt('country_id')); if ($Qab->valueInt('address_book_id') == $_SESSION['billto']) { echo ' <tr id="defaultSelected" class="moduleRowSelected">' . "\n"; } else { echo ' <tr class="moduleRow">' . "\n"; } ?> <td> <strong><?php echo HTML::outputProtected($Qab->value('firstname') . ' ' . $Qab->value('lastname')); ?> </strong> <div class="help-block"><?php echo tep_address_format($format_id, $Qab->toArray(), true, ' ', ', '); ?> </div> </td> <td align="right"><?php echo HTML::radioField('address', $Qab->valueInt('address_book_id'), $Qab->valueInt('address_book_id') == $_SESSION['billto']); ?> </td> </tr> <?php }
if ($Qadmin->fetch() !== false) { $aInfo = new objectInfo($Qadmin->toArray()); switch ($action) { case 'edit': $heading[] = array('text' => HTML::outputProtected($aInfo->user_name)); $contents = array('form' => HTML::form('administrator', OSCOM::link(FILENAME_ADMINISTRATORS, 'aID=' . $aInfo->id . '&action=save'), 'post', 'autocomplete="off"')); $contents[] = array('text' => OSCOM::getDef('text_info_edit_intro')); $contents[] = array('text' => OSCOM::getDef('text_info_username') . '<br />' . HTML::inputField('username', $aInfo->user_name)); $contents[] = array('text' => OSCOM::getDef('text_info_new_password') . '<br />' . HTML::passwordField('password')); $contents[] = array('text' => HTML::button(OSCOM::getDef('image_save'), 'fa fa-save', null, null, 'btn-success') . HTML::button(OSCOM::getDef('image_cancel'), null, OSCOM::link(FILENAME_ADMINISTRATORS), null, 'btn-link')); break; case 'delete': $heading[] = array('text' => HTML::outputProtected($aInfo->user_name)); $contents = array('form' => HTML::form('administrator', OSCOM::link(FILENAME_ADMINISTRATORS, 'aID=' . $aInfo->id . '&action=deleteconfirm'))); $contents[] = array('text' => OSCOM::getDef('text_info_delete_intro')); $contents[] = array('text' => '<strong>' . HTML::outputProtected($aInfo->user_name) . '</strong>'); $contents[] = array('text' => HTML::button(OSCOM::getDef('image_delete'), 'fa fa-trash', null, null, 'btn-danger') . HTML::button(OSCOM::getDef('image_cancel'), null, OSCOM::link(FILENAME_ADMINISTRATORS), null, 'btn-link')); break; } } } } else { $heading[] = array('text' => OSCOM::getDef('text_info_heading_new_administrator')); $contents = array('form' => HTML::form('administrator', OSCOM::link(FILENAME_ADMINISTRATORS, 'action=insert'), 'post', 'autocomplete="off"')); $contents[] = array('text' => OSCOM::getDef('text_info_insert_intro')); $contents[] = array('text' => OSCOM::getDef('text_info_username') . '<br />' . HTML::inputField('username')); $contents[] = array('text' => OSCOM::getDef('text_info_password') . '<br />' . HTML::passwordField('password')); $contents[] = array('text' => HTML::button(OSCOM::getDef('image_save'), 'fa fa-save', null, null, 'btn-success') . HTML::button(OSCOM::getDef('image_cancel'), null, OSCOM::link(FILENAME_ADMINISTRATORS), null, 'btn-link')); } if (tep_not_null($heading) && tep_not_null($contents)) { $show_listing = false;
echo OSCOM::getDef('table_heading_module'); ?> </td> <td class="dataTableHeadingContent"><?php echo OSCOM::getDef('table_heading_info'); ?> </td> <td class="dataTableHeadingContent" width="20" align="right"> </td> </tr> <?php foreach ($modules as $module) { $secCheck = $GLOBALS[$module['class']]; if (!in_array($secCheck->type, $types)) { $secCheck->type = 'info'; } $output = ''; if ($secCheck->pass()) { $secCheck->type = 'success'; } else { $output = $secCheck->getMessage(); } echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)">' . "\n" . ' <td class="dataTableContent" align="center" valign="top">' . HTML::image(OSCOM::linkImage('ms_' . $secCheck->type . '.png'), '', 16, 16) . '</td>' . "\n" . ' <td class="dataTableContent" valign="top" style="white-space: nowrap;">' . HTML::outputProtected($module['title']) . '</td>' . "\n" . ' <td class="dataTableContent" valign="top">' . HTML::outputProtected($module['code']) . '</td>' . "\n" . ' <td class="dataTableContent" valign="top">' . $output . '</td>' . "\n" . ' <td class="dataTableContent" align="center" valign="top">' . (isset($secCheck->has_doc) && $secCheck->has_doc ? '<a href="http://library.oscommerce.com/Wiki&oscom_2_3&security_checks&' . $module['code'] . '" target="_blank">' . HTML::image(OSCOM::linkImage('icons/preview.gif')) . '</a>' : '') . '</td>' . "\n" . ' </tr>' . "\n"; } ?> </table> <?php require $oscTemplate->getFile('template_bottom.php'); require 'includes/application_bottom.php';
function tep_address_format($address_format_id, $address, $html, $boln, $eoln) { $OSCOM_Db = Registry::get('Db'); $Qformat = $OSCOM_Db->prepare('select address_format from :table_address_format where address_format_id = :address_format_id'); $Qformat->bindInt(':address_format_id', $address_format_id); $Qformat->execute(); $replace = ['$company' => HTML::outputProtected($address['company']), '$firstname' => '', '$lastname' => '', '$street' => HTML::outputProtected($address['street_address']), '$suburb' => HTML::outputProtected($address['suburb']), '$city' => HTML::outputProtected($address['city']), '$state' => HTML::outputProtected($address['state']), '$postcode' => HTML::outputProtected($address['postcode']), '$country' => '']; if (isset($address['firstname']) && tep_not_null($address['firstname'])) { $replace['$firstname'] = HTML::outputProtected($address['firstname']); $replace['$lastname'] = HTML::outputProtected($address['lastname']); } elseif (isset($address['name']) && tep_not_null($address['name'])) { $replace['$firstname'] = HTML::outputProtected($address['name']); } if (isset($address['country_id']) && tep_not_null($address['country_id'])) { $replace['$country'] = tep_get_country_name($address['country_id']); if (isset($address['zone_id']) && tep_not_null($address['zone_id'])) { $replace['$state'] = tep_get_zone_code($address['country_id'], $address['zone_id'], $replace['$state']); } } elseif (isset($address['country']) && tep_not_null($address['country'])) { $replace['$country'] = HTML::outputProtected($address['country']['title']); } $replace['$zip'] = $replace['$postcode']; if ($html) { // HTML Mode $HR = '<hr />'; $hr = '<hr />'; if ($boln == '' && $eoln == "\n") { // Values not specified, use rational defaults $CR = '<br />'; $cr = '<br />'; $eoln = $cr; } else { // Use values supplied $CR = $eoln . $boln; $cr = $CR; } } else { // Text Mode $CR = $eoln; $cr = $CR; $HR = '----------------------------------------'; $hr = '----------------------------------------'; } $replace['$CR'] = $CR; $replace['$cr'] = $cr; $replace['$HR'] = $HR; $replace['$hr'] = $hr; $replace['$statecomma'] = ''; $replace['$streets'] = $replace['$street']; if ($replace['$suburb'] != '') { $replace['$streets'] = $replace['$street'] . $replace['$cr'] . $replace['$suburb']; } if ($replace['$state'] != '') { $replace['$statecomma'] = $replace['$state'] . ', '; } $address = strtr($Qformat->value('address_format'), $replace); if (ACCOUNT_COMPANY == 'true' && tep_not_null($replace['$company'])) { $address = $replace['$company'] . $replace['$cr'] . $address; } return $address; }
function getOutput() { return '<a href="http://twitter.com/home?status=' . urlencode(OSCOM::link('product_info.php', 'products_id=' . $_GET['products_id'], false)) . '" target="_blank"><img src="' . OSCOM::linkImage('social_bookmarks/' . $this->icon) . '" border="0" title="' . HTML::outputProtected($this->public_title) . '" alt="' . HTML::outputProtected($this->public_title) . '" /></a>'; }
<div class="pull-right"> <?php echo HTML::button(OSCOM::getDef('image_back'), 'fa fa-chevron-left', OSCOM::link('error_log.php'), null, 'btn-info') . HTML::button(OSCOM::getDef('image_delete'), 'fa fa-trash-o', OSCOM::link('error_log.php', 'action=delete&log=' . $log['key']), null, 'btn-danger'); ?> </div> <h2><i class="fa fa-exclamation-circle"></i> <a href="<?php echo OSCOM::link('error_log.php'); ?> "><?php echo OSCOM::getDef('heading_title'); ?> </a></h2> <h3><?php echo HTML::outputProtected($log['date']); ?> </h3> <p> <?php echo HTML::textareaField('log', '100', '30', file_get_contents($log['path']), 'readonly', false); ?> </p> <?php } else { ?> <div class="pull-right"> <?php