本文整理汇总了PHP中OSC\OM\HTML::outputProtected方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML::outputProtected方法的具体用法?PHP HTML::outputProtected怎么用?PHP HTML::outputProtected使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OSC\OM\HTML
的用法示例。
在下文中一共展示了HTML::outputProtected方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: confirm
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;
}
示例2: getOutput
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;
}
示例3: execute
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);
}
}
}
示例4: execute
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);
}
示例5: getOutput
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;
}
示例6: getOutput
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>';
}
示例7: get
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;
}
示例8: getOutput
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;
}
示例9: getOutput
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;
}
示例10: execute
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);
}
}
}
}
示例11: execute
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);
}
}
}
示例12: execute
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);
}
}
}
示例13: array
<?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');
?>
示例14: confirm
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;
}
示例15: confirmation
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;
}