当前位置: 首页>>代码示例>>PHP>>正文


PHP lc_output_string_protected函数代码示例

本文整理汇总了PHP中lc_output_string_protected函数的典型用法代码示例。如果您正苦于以下问题:PHP lc_output_string_protected函数的具体用法?PHP lc_output_string_protected怎么用?PHP lc_output_string_protected使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了lc_output_string_protected函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _process

 protected function _process()
 {
     global $lC_Language, $lC_MessageStack, $lC_Product;
     if (empty($_POST['from_name'])) {
         $lC_MessageStack->add('tell_a_friend', $lC_Language->get('error_tell_a_friend_customers_name_empty'));
     }
     if (!lc_validate_email_address($_POST['from_email_address'])) {
         $lC_MessageStack->add('tell_a_friend', $lC_Language->get('error_tell_a_friend_invalid_customers_email_address'));
     }
     if (empty($_POST['to_name'])) {
         $lC_MessageStack->add('tell_a_friend', $lC_Language->get('error_tell_a_friend_friends_name_empty'));
     }
     if (!lc_validate_email_address($_POST['to_email_address'])) {
         $lC_MessageStack->add('tell_a_friend', $lC_Language->get('error_tell_a_friend_invalid_friends_email_address'));
     }
     if ($lC_MessageStack->size('tell_a_friend') < 1) {
         $email_subject = sprintf($lC_Language->get('email_tell_a_friend_subject'), lc_sanitize_string($_POST['from_name']), STORE_NAME);
         $email_body = sprintf($lC_Language->get('email_tell_a_friend_intro'), lc_sanitize_string($_POST['to_name']), lc_sanitize_string($_POST['from_name']), $lC_Product->getTitle(), STORE_NAME) . "\n\n";
         if (!empty($_POST['message'])) {
             $email_body .= lc_sanitize_string($_POST['message']) . "\n\n";
         }
         $email_body .= sprintf($lC_Language->get('email_tell_a_friend_link'), lc_href_link(HTTP_SERVER . DIR_WS_CATALOG . FILENAME_PRODUCTS, $lC_Product->getKeyword(), 'NONSSL', false)) . "\n\n" . sprintf($lC_Language->get('email_tell_a_friend_signature'), STORE_NAME . "\n" . HTTP_SERVER . DIR_WS_CATALOG . "\n");
         lc_email(lc_sanitize_string($_POST['to_name']), lc_sanitize_string($_POST['to_email_address']), $email_subject, $email_body, lc_sanitize_string($_POST['from_name']), lc_sanitize_string($_POST['from_email_address']));
         lc_redirect(lc_href_link(FILENAME_PRODUCTS, 'tell_a_friend&' . $lC_Product->getID() . '&success=' . urlencode(sprintf($lC_Language->get('success_tell_a_friend_email_sent'), $lC_Product->getTitle(), lc_output_string_protected($_POST['to_name'])))));
     }
 }
开发者ID:abhiesa-tolexo,项目名称:loaded7,代码行数:26,代码来源:tell_a_friend.php

示例2: initialize

 public function initialize()
 {
     global $lC_Database, $lC_Services, $lC_Cache, $lC_Language, $lC_Product, $lC_Image;
     $this->_title_link = lc_href_link(FILENAME_PRODUCTS, 'reviews');
     if ($lC_Services->isStarted('reviews')) {
         if ($lC_Cache->isEnabled() && BOX_REVIEWS_CACHE > 0 && $lC_Cache->read('box-reviews' . (isset($lC_Product) && is_a($lC_Product, 'lC_Product') && $lC_Product->isValid() ? '-' . $lC_Product->getID() : '') . '-' . $lC_Language->getCode(), BOX_REVIEWS_CACHE)) {
             $data = $lC_Cache->getCache();
         } else {
             $data = array();
             $Qreview = $lC_Database->query('select r.reviews_id, r.reviews_rating, p.products_id, pd.products_name, pd.products_keyword, i.image from :table_reviews r, :table_products p left join :table_products_images i on (p.products_id = i.products_id and i.default_flag = :default_flag), :table_products_description pd where r.products_id = p.products_id and p.products_status = 1 and r.languages_id = :language_id and p.products_id = pd.products_id and pd.language_id = :language_id and r.reviews_status = 1');
             $Qreview->bindTable(':table_reviews', TABLE_REVIEWS);
             $Qreview->bindTable(':table_products_images', TABLE_PRODUCTS_IMAGES);
             $Qreview->bindTable(':table_products', TABLE_PRODUCTS);
             $Qreview->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);
             $Qreview->bindInt(':default_flag', 1);
             $Qreview->bindInt(':language_id', $lC_Language->getID());
             $Qreview->bindInt(':language_id', $lC_Language->getID());
             if (isset($lC_Product) && is_a($lC_Product, 'lC_Product') && $lC_Product->isValid()) {
                 $Qreview->appendQuery('and p.products_id = :products_id');
                 $Qreview->bindInt(':products_id', $lC_Product->getID());
             }
             $Qreview->appendQuery('order by r.reviews_id desc limit :max_random_select_reviews');
             $Qreview->bindInt(':max_random_select_reviews', BOX_REVIEWS_RANDOM_SELECT);
             $Qreview->executeRandomMulti();
             if ($Qreview->numberOfRows()) {
                 $Qtext = $lC_Database->query('select substring(reviews_text, 1, 60) as reviews_text from :table_reviews where reviews_id = :reviews_id and languages_id = :languages_id');
                 $Qtext->bindTable(':table_reviews', TABLE_REVIEWS);
                 $Qtext->bindInt(':reviews_id', $Qreview->valueInt('reviews_id'));
                 $Qtext->bindInt(':languages_id', $lC_Language->getID());
                 $Qtext->execute();
                 $data = array_merge($Qreview->toArray(), $Qtext->toArray());
                 $Qtext->freeResult();
                 $Qreview->freeResult();
             }
             if ($lC_Cache->isEnabled()) {
                 $lC_Cache->write($data);
             }
         }
         $this->_content = '';
         if (empty($data)) {
             if (isset($lC_Product) && is_a($lC_Product, 'lC_Product') && $lC_Product->isValid()) {
                 $this->_content = '<li class="box-reviews-write">' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, 'reviews=new&' . $lC_Product->getKeyword()), $lC_Language->get('box_reviews_write')) . '</li>' . "\n";
             }
         } else {
             if (!empty($data['image'])) {
                 $this->_content = '<li class="box-reviews-image">' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, 'reviews=' . $data['reviews_id'] . '&' . $data['products_keyword']), $lC_Image->show($data['image'], $data['products_name'], 'class="box-reviews-image-src"')) . '</li>';
             }
             $this->_content .= '<li class="box-reviews-text">' . lc_link_object(lc_href_link(FILENAME_PRODUCTS, 'reviews=' . $data['reviews_id'] . '&' . $data['products_keyword']), wordwrap(lc_output_string_protected($data['reviews_text']), 15, "\n") . '...') . "\n" . '<li class="box-reviews-rating">' . $lC_Language->get('box_reviews_average_rating') . ' ' . lc_image(DIR_WS_TEMPLATE_IMAGES . 'stars_' . $data['reviews_rating'] . '.png', sprintf($lC_Language->get('box_reviews_stars_rating'), $data['reviews_rating'])) . '</li>';
         }
     }
 }
开发者ID:abhiesa-tolexo,项目名称:loaded7,代码行数:51,代码来源:reviews.php

示例3: format

 /**
  * Correctly format an address to the address format rule assigned to its country
  *
  * @param array $address An array (or address_book ID) containing the address information
  * @param string $new_line The string to break new lines with
  * @access public
  * @return string
  */
 public static function format($address, $new_line = null)
 {
     global $lC_Database;
     $address_format = '';
     if (is_numeric($address)) {
         $Qaddress = $lC_Database->query('select ab.entry_firstname as firstname, ab.entry_lastname as lastname, ab.entry_company as company, ab.entry_street_address as street_address, ab.entry_suburb as suburb, ab.entry_city as city, ab.entry_postcode as postcode, ab.entry_state as state, ab.entry_zone_id as zone_id, ab.entry_country_id as country_id, z.zone_code as zone_code, c.countries_name as country_title from :table_address_book ab left join :table_zones z on (ab.entry_zone_id = z.zone_id), :table_countries c where ab.address_book_id = :address_book_id and ab.entry_country_id = c.countries_id');
         $Qaddress->bindTable(':table_address_book', TABLE_ADDRESS_BOOK);
         $Qaddress->bindTable(':table_zones', TABLE_ZONES);
         $Qaddress->bindTable(':table_countries', TABLE_COUNTRIES);
         $Qaddress->bindInt(':address_book_id', $address);
         $Qaddress->execute();
         $address = $Qaddress->toArray();
     }
     $firstname = $lastname = '';
     if (isset($address['firstname']) && !empty($address['firstname'])) {
         $firstname = $address['firstname'];
         $lastname = $address['lastname'];
     } elseif (isset($address['name']) && !empty($address['name'])) {
         $firstname = $address['name'];
     }
     $state = $address['state'];
     $state_code = $address['zone_code'];
     if (isset($address['zone_id']) && is_numeric($address['zone_id']) && $address['zone_id'] > 0) {
         $state = lC_Address::getZoneName($address['zone_id']);
         $state_code = lC_Address::getZoneCode($address['zone_id']);
     }
     $country = $address['country_title'];
     if (empty($country) && isset($address['country_id']) && is_numeric($address['country_id']) && $address['country_id'] > 0) {
         $country = lC_Address::getCountryName($address['country_id']);
     }
     if (isset($address['format']) && strlen($address['format']) > 4) {
         $address_format = $address['format'];
     } elseif (isset($address['country_id']) && is_numeric($address['country_id']) && $address['country_id'] > 0) {
         $address_format = lC_Address::getFormat($address['country_id']);
     }
     if (empty($address_format)) {
         $address_format = ":name\n:street_address\n:postcode :city\n:country";
     }
     $find_array = array('/\\:name\\b/', '/\\:street_address\\b/', '/\\:suburb\\b/', '/\\:city\\b/', '/\\:postcode\\b/', '/\\:state\\b/', '/\\:state_code\\b/', '/\\:country\\b/');
     $replace_array = array(lc_output_string_protected($firstname . ' ' . $lastname), lc_output_string_protected($address['street_address']), lc_output_string_protected($address['suburb']), lc_output_string_protected($address['city']), lc_output_string_protected($address['postcode']), lc_output_string_protected($state), lc_output_string_protected($state_code), lc_output_string_protected($country));
     $formated = preg_replace($find_array, $replace_array, $address_format);
     if (ACCOUNT_COMPANY > -1 && !empty($address['company'])) {
         $formated = lc_output_string_protected($address['company']) . "\n" . $formated;
     }
     if (!empty($new_line)) {
         $formated = str_replace("\n", $new_line, $formated);
     }
     return $formated;
 }
开发者ID:abhiesa-tolexo,项目名称:loaded7,代码行数:57,代码来源:address.php

示例4: showConfirmation

 public function showConfirmation()
 {
     global $lC_Database, $lC_Language, $lC_Template;
     if (isset($_GET['customer']) && !empty($_GET['customer'])) {
         $Qcustomers = $lC_Database->query('select count(customers_id) as total from :table_customers c left join :table_newsletters_log nl on (c.customers_email_address = nl.email_address and nl.newsletters_id = :newsletters_id) where nl.email_address is null');
         $Qcustomers->bindTable(':table_customers', TABLE_CUSTOMERS);
         $Qcustomers->bindTable(':table_newsletters_log', TABLE_NEWSLETTERS_LOG);
         $Qcustomers->bindInt(':newsletters_id', $this->_newsletter_id);
         if (is_numeric($_GET['customer'])) {
             $Qcustomers->appendQuery('and c.customers_id = :customers_id');
             $Qcustomers->bindInt(':customers_id', $_GET['customer']);
         }
         $Qcustomers->execute();
         $this->_audience_size += $Qcustomers->valueInt('total');
     }
     $confirmation_string = '<p><font color="#ff0000"><b>' . sprintf($lC_Language->get('newsletter_email_total_recipients'), $this->_audience_size) . '</b></font></p>' . '<p><b>' . $this->_newsletter_title . '</b></p>' . '<p>' . nl2br(lc_output_string_protected($this->_newsletter_content)) . '</p>' . '<form name="confirm" action="' . lc_href_link_admin(FILENAME_DEFAULT, $lC_Template->getModule() . '&page=' . $_GET['page'] . '&nID=' . $this->_newsletter_id . '&action=send') . '" method="post">' . '<input type="hidden" name="audienceSize" id="audienceSize" value="' . $this->_audience_size . '"></form>';
     return $confirmation_string;
 }
开发者ID:rajeshb001,项目名称:itpl_loaded7,代码行数:18,代码来源:email.php

示例5: _setData

 protected function _setData()
 {
     global $lC_Database, $lC_Language;
     if (!$this->enabled) {
         $this->_data = '';
     } else {
         $this->_data = '<div class="four-columns six-columns-tablet twelve-columns-mobile clear-both">' . '  <h2 class="relative thin">' . $this->_title . '</h2>' . '  <ul class="list spaced">';
         $counter = 0;
         foreach (lc_toObjectInfo(lC_ErrorLog_Admin::getAll())->get('entries') as $log) {
             $counter++;
             $this->_data .= '    <li>' . '      <span class="list-link icon-warning icon-red" title="' . $lC_Language->get('orders') . '">' . '        <strong>' . lc_output_string_protected($log['date']) . '</strong> ' . lc_output_string_protected(substr($log['message'], 0, 20)) . '      </span>' . '    </li>';
             if ($counter == 6) {
                 break;
             }
         }
         $this->_data .= '  </ul>' . '</div>';
     }
 }
开发者ID:abhiesa-tolexo,项目名称:loaded7,代码行数:18,代码来源:error_log.php

示例6: _setData

 protected function _setData()
 {
     global $lC_Database, $lC_Language, $lC_Currencies, $lC_Vqmod;
     if (!$this->enabled) {
         $this->_data = '';
     } else {
         $this->_data = '<div class="four-columns six-columns-tablet twelve-columns-mobile clear-both">' . '  <h2 class="relative thin">' . $this->_title . '</h2>' . '  <ul class="list spaced">';
         if (!isset($lC_Currencies)) {
             if (!class_exists('lC_Currencies')) {
                 include $lC_Vqmod->modCheck('../includes/classes/currencies.php');
             }
             $lC_Currencies = new lC_Currencies();
         }
         $Qproducts = $lC_Database->query('select p.products_id, greatest(p.products_date_added, p.products_last_modified) as date_last_modified, pd.products_name from :table_products p, :table_products_description pd where parent_id = 0 and p.products_id = pd.products_id and pd.language_id = :language_id order by date_last_modified desc limit 6');
         $Qproducts->bindTable(':table_products', TABLE_PRODUCTS);
         $Qproducts->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);
         $Qproducts->bindInt(':language_id', $lC_Language->getID());
         $Qproducts->execute();
         while ($Qproducts->next()) {
             $data = lC_Products_Admin::get($Qproducts->valueInt('products_id'));
             $products_icon = lc_icon_admin('products.png');
             $products_price = $data['products_price'];
             if (!empty($data['variants'])) {
                 $products_icon = lc_icon_admin('attach.png');
                 $products_price = null;
                 foreach ($data['variants'] as $variant) {
                     if ($products_price === null || $variant['data']['price'] < $products_price) {
                         $products_price = $variant['data']['price'];
                     }
                 }
                 if ($products_price === null) {
                     $products_price = 0;
                 }
             }
             $this->_data .= '    <li>' . '      <span class="list-link icon-bag icon-blue" title="' . $lC_Language->get('edit') . '">' . '        <strong>' . (!empty($data['variants']) ? $lC_Language->get('text_from') . ' ' : '') . $lC_Currencies->format($products_price) . '</strong> <span class="anthracite">' . lc_output_string_protected($data['products_name']) . '</span>' . '      </span>' . '      <div class="absolute-right compact show-on-parent-hover">' . '        <a href="' . ((int) ($_SESSION['admin']['access']['products'] < 3) ? '#' : lc_href_link_admin(FILENAME_DEFAULT, 'products=' . $Qproducts->valueInt('products_id') . '&cID=' . $category_id . '&action=save')) . '" class="button icon-pencil' . ((int) ($_SESSION['admin']['access']['products'] < 3) ? ' disabled' : NULL) . '">' . $lC_Language->get('icon_edit') . '</a>' . '        <a href="' . ((int) ($_SESSION['admin']['access']['products'] < 3) ? '#' : 'javascript://" onclick="copyProduct(\'' . $Qproducts->valueInt('products_id') . '\', \'' . urlencode($Qproducts->value('products_name')) . '\')') . '" class="button icon-pages with-tooltip' . ((int) ($_SESSION['admin']['access']['products'] < 3) ? ' disabled' : NULL) . '" title="' . $lC_Language->get('icon_copy') . '"></a>' . '        <a href="' . ((int) ($_SESSION['admin']['access']['products'] < 4) ? '#' : 'javascript://" onclick="deleteProduct(\'' . $Qproducts->valueInt('products_id') . '\', \'' . urlencode($Qproducts->value('products_name')) . '\')') . '" class="button icon-trash with-tooltip' . ((int) ($_SESSION['admin']['access']['products'] < 4) ? ' disabled' : NULL) . '" title="' . $lC_Language->get('icon_delete') . '"></a>' . '      </div>' . '    </li>';
         }
         $this->_data .= '  </ul>' . '</div>';
         $Qproducts->freeResult();
         $this->_data .= $this->loadModal();
     }
 }
开发者ID:abhiesa-tolexo,项目名称:loaded7,代码行数:41,代码来源:products.php

示例7: showConfirmation

 public function showConfirmation()
 {
     global $lC_Database, $lC_Language, $lC_Template;
     $Qrecipients = $lC_Database->query('select count(*) as total from :table_customers c left join :table_newsletters_log nl on (c.customers_email_address = nl.email_address and nl.newsletters_id = :newsletters_id) where c.customers_newsletter = 1 and nl.email_address is null');
     $Qrecipients->bindTable(':table_customers', TABLE_CUSTOMERS);
     $Qrecipients->bindTable(':table_newsletters_log', TABLE_NEWSLETTERS_LOG);
     $Qrecipients->bindInt(':newsletters_id', $this->_newsletter_id);
     $Qrecipients->execute();
     $this->_audience_size = $Qrecipients->valueInt('total');
     $confirmation_string = '<p><font color="#ff0000"><b>' . sprintf($lC_Language->get('newsletter_newsletter_total_recipients'), $this->_audience_size) . '</b></font></p>' . '<p><b>' . $this->_newsletter_title . '</b></p>' . '<p>' . nl2br(lc_output_string_protected($this->_newsletter_content)) . '</p>' . '<form name="executeNewsletter" id="executeNewsletter" action="#" method="post"><input type="hidden" name="audienceSize" id="audienceSize" value="' . $this->_audience_size . '">';
     //                             '<p align="right">';
     /*
     if ($this->_audience_size > 0) {
       $confirmation_string .= lc_draw_hidden_field('subaction', 'execute') .
                               '<input type="submit" value="' . $lC_Language->get('button_send') . '" class="operationButton" />&nbsp;' .
                               '<input type="button" value="' . $lC_Language->get('button_cancel') . '" onclick="document.location.href=\'' . lc_href_link_admin(FILENAME_DEFAULT, $lC_Template->getModule() . '&page=' . $_GET['page']) . '\'" class="operationButton" />';
     } else {
       $confirmation_string .= '<input type="button" value="' . $lC_Language->get('button_back') . '" onclick="document.location.href=\'' . lc_href_link_admin(FILENAME_DEFAULT, $lC_Template->getModule() . '&page=' . $_GET['page']) . '\'" class="operationButton" />';
     }
     */
     $confirmation_string .= '</form>';
     return $confirmation_string;
 }
开发者ID:rajeshb001,项目名称:itpl_loaded7,代码行数:23,代码来源:newsletter.php

示例8: getPageTitle

 /**
  * Returns the title of the page
  *
  * @access public
  * @return string
  */
 public function getPageTitle()
 {
     return lc_output_string_protected($this->_page_title);
 }
开发者ID:abhiesa-tolexo,项目名称:loaded7,代码行数:10,代码来源:template.php

示例9: lc_href_link

        }
        ?>
          <tr>
            <td><a href="<?php 
        echo lc_href_link(FILENAME_ACCOUNT, 'receipt=' . $Qhistory->valueInt('orders_id'), 'SSL');
        ?>
"><?php 
        echo lc_image(DIR_WS_TEMPLATE_IMAGES . 'icons/16/search.png', $lC_Language->get('text_view'));
        ?>
</a></td>
            <td><?php 
        echo $Qhistory->valueInt('orders_id');
        ?>
</td>                
            <td><?php 
        echo lc_output_string_protected($order_name);
        ?>
</td> 
            <td><?php 
        echo lC_DateTime::getShort($Qhistory->value('date_purchased'));
        ?>
</td>
            <td><?php 
        echo $Qhistory->value('orders_status_name');
        ?>
</td> 
            <td><?php 
        echo lC_Order::numberOfProducts($Qhistory->valueInt('orders_id'));
        ?>
</td>
            <td><?php 
开发者ID:abhiesa-tolexo,项目名称:loaded7,代码行数:31,代码来源:account_history.php

示例10: valueMixed

 public function valueMixed($column, $type = 'string')
 {
     if (!isset($this->result)) {
         $this->next();
     }
     switch ($type) {
         case 'protected':
             return lc_output_string_protected($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];
     }
 }
开发者ID:rajeshb001,项目名称:itpl_loaded7,代码行数:20,代码来源:database.php

示例11: lc_draw_textarea_field

 function lc_draw_textarea_field($name, $value = null, $width = 60, $height = 5, $parameters = null, $override = true)
 {
     if (!is_bool($override)) {
         $override = true;
     }
     if ($override === true) {
         if (isset($_GET[$name])) {
             $value = $_GET[$name];
         } elseif (isset($_POST[$name])) {
             $value = $_POST[$name];
         }
     }
     if (!is_numeric($width)) {
         $width = 60;
     }
     if (!is_numeric($height)) {
         $width = 5;
     }
     $field = '<textarea name="' . lc_output_string($name) . '" cols="' . (int) $width . '" rows="' . (int) $height . '"';
     if (strpos($parameters, 'id=') === false) {
         $field .= ' id="' . lc_output_string($name) . '"';
     }
     if (!empty($parameters)) {
         $field .= ' ' . $parameters;
     }
     $field .= '>' . lc_output_string_protected($value) . '</textarea>';
     return $field;
 }
开发者ID:abhiesa-tolexo,项目名称:loaded7,代码行数:28,代码来源:html_output.php

示例12: lc_href_link_admin

    content: '<div id="uploadConfirm">'+
             '  <form name="fmUpload" id="fmUpload" action="<?php 
echo lc_href_link_admin(FILENAME_DEFAULT, $lC_Template->getModule() . '&action=upload');
?>
" method="post" enctype="multipart/form-data">'+
             '  <p><?php 
echo $lC_Language->get('introduction_upload_file');
?>
</p>'+
             '  <p><?php 
echo lc_draw_file_field('fmFile[]', true, 'id="fmFileUpload" class="file"');
?>
</p>'+
             '  </form>'+
             '  <p class="margin-top"><?php 
echo lc_output_string_protected($_SESSION['fm_directory']) . '/';
?>
</p>'+
             '</div>',
    title: '<?php 
echo $lC_Language->get('modal_heading_upload_file');
?>
',
    width: 350,
    actions: {
      'Close' : {
        color: 'red',
        click: function(win) { win.closeModal(); }
      }
    },
    buttons: {
开发者ID:rajeshb001,项目名称:itpl_loaded7,代码行数:31,代码来源:upload.php

示例13: drawMenu

 public static function drawMenu()
 {
     foreach (lc_toObjectInfo(lC_Configuration_Admin::getAllGroups())->get('entries') as $group) {
         $menu .= '<li class="message-menu" id="cfgGroup' . (int) $group['configuration_group_id'] . '">' . '  <span class="message-status" style="padding-top:14px;">' . '     <a href="javascript:void(0);" onclick="showGroup(\'' . (int) $group['configuration_group_id'] . '\', \'' . lc_output_string_protected($group['configuration_group_title']) . '\');" class="new-message" title=""></a>' . '   </span>' . '   <a id="cfgLink' . (int) $group['configuration_group_id'] . '" href="javascript:void(0);" onclick="showGroup(\'' . (int) $group['configuration_group_id'] . '\', \'' . str_replace("/", "-", lc_output_string_protected($group['configuration_group_title'])) . '\');">' . '     <br><strong>' . lc_output_string_protected($group['configuration_group_title']) . '</strong>' . '   </a>' . ' </li>';
     }
     return $menu;
 }
开发者ID:abhiesa-tolexo,项目名称:loaded7,代码行数:7,代码来源:configuration.php

示例14: showConfirmation

 public function showConfirmation()
 {
     global $lC_Database, $lC_Language, $lC_Template;
     if (isset($_GET['chosen']) && !empty($_GET['chosen']) || isset($_GET['global']) && $_GET['global'] == 'true') {
         $Qcustomers = $lC_Database->query('select count(customers_id) as total from :table_customers where global_product_notifications = 1');
         $Qcustomers->bindTable(':table_customers', TABLE_CUSTOMERS);
         $Qcustomers->execute();
         $this->_audience_size = $Qcustomers->valueInt('total');
         $Qcustomers = $lC_Database->query('select count(distinct pn.customers_id) as total from :table_products_notifications pn, :table_customers c left join :table_newsletters_log nl on (c.customers_email_address = nl.email_address and nl.newsletters_id = :newsletters_id) where pn.customers_id = c.customers_id and nl.email_address is null');
         $Qcustomers->bindTable(':table_products_notifications', TABLE_PRODUCTS_NOTIFICATIONS);
         $Qcustomers->bindTable(':table_customers', TABLE_CUSTOMERS);
         $Qcustomers->bindTable(':table_newsletters_log', TABLE_NEWSLETTERS_LOG);
         $Qcustomers->bindInt(':newsletters_id', $this->_newsletter_id);
         if (isset($_GET['chosen']) && !empty($_GET['chosen'])) {
             $Qcustomers->appendQuery('and pn.products_id in (:products_id)');
             $Qcustomers->bindRaw(':products_id', implode(', ', $_GET['chosen']));
         }
         $Qcustomers->execute();
         $this->_audience_size += $Qcustomers->valueInt('total');
     }
     $confirmation_string = '<p><font color="#ff0000"><b>' . sprintf($lC_Language->get('newsletter_product_notifications_total_recipients'), $this->_audience_size) . '</b></font></p>' . '<p><b>' . $this->_newsletter_title . '</b></p>' . '<p>' . nl2br(lc_output_string_protected($this->_newsletter_content)) . '</p>' . '<form name="execute" id="name="execute"" action="#" method="post"><input type="hidden" name="audienceSize" id="audienceSize" value="' . $this->_audience_size . '">';
     if ($this->_audience_size > 0) {
         if (isset($_GET['global']) && $_GET['global'] == 'true') {
             $confirmation_string .= lc_draw_hidden_field('global', 'true');
         } elseif (isset($_GET['chosen']) && !empty($_GET['chosen'])) {
             for ($i = 0, $n = sizeof($_GET['chosen']); $i < $n; $i++) {
                 $confirmation_string .= lc_draw_hidden_field('chosen[]', $_GET['chosen'][$i]);
             }
         }
         $confirmation_string .= lc_draw_hidden_field('subaction', 'execute');
     }
     $confirmation_string .= '</form>';
     return $confirmation_string;
 }
开发者ID:abhiesa-tolexo,项目名称:loaded7,代码行数:34,代码来源:product_notification.php

示例15: start

 function start()
 {
     global $lC_Customer, $lC_Database;
     if ($lC_Customer->isLoggedOn()) {
         $wo_customer_id = $lC_Customer->getID();
         $wo_full_name = $lC_Customer->getName();
     } else {
         $wo_customer_id = '';
         $wo_full_name = 'Guest';
         if (SERVICE_WHOS_ONLINE_SPIDER_DETECTION == '1') {
             $user_agent = strtolower($_SERVER['HTTP_USER_AGENT']);
             if (!empty($user_agent)) {
                 $spiders = file('includes/spiders.txt');
                 foreach ($spiders as $spider) {
                     if (!empty($spider)) {
                         if (strpos($user_agent, trim($spider)) !== false) {
                             $wo_full_name = $spider;
                             break;
                         }
                     }
                 }
             }
         }
     }
     $wo_session_id = session_id();
     $wo_ip_address = lc_get_ip_address();
     $wo_last_page_url = lc_output_string_protected(substr($_SERVER['REQUEST_URI'], 0, 255));
     $current_time = time();
     $xx_mins_ago = $current_time - 900;
     // remove entries that have expired
     $Qwhosonline = $lC_Database->query('delete from :table_whos_online where time_last_click < :time_last_click');
     $Qwhosonline->bindRaw(':table_whos_online', TABLE_WHOS_ONLINE);
     $Qwhosonline->bindValue(':time_last_click', $xx_mins_ago);
     $Qwhosonline->execute();
     $Qwhosonline = $lC_Database->query('select count(*) as count from :table_whos_online where session_id = :session_id');
     $Qwhosonline->bindRaw(':table_whos_online', TABLE_WHOS_ONLINE);
     $Qwhosonline->bindValue(':session_id', $wo_session_id);
     $Qwhosonline->execute();
     if ($Qwhosonline->valueInt('count') > 0) {
         $Qwhosonline = $lC_Database->query('update :table_whos_online set customer_id = :customer_id, full_name = :full_name, ip_address = :ip_address, time_last_click = :time_last_click, last_page_url = :last_page_url where session_id = :session_id');
         $Qwhosonline->bindRaw(':table_whos_online', TABLE_WHOS_ONLINE);
         $Qwhosonline->bindInt(':customer_id', $wo_customer_id);
         $Qwhosonline->bindValue(':full_name', $wo_full_name);
         $Qwhosonline->bindValue(':ip_address', $wo_ip_address);
         $Qwhosonline->bindValue(':time_last_click', $current_time);
         $Qwhosonline->bindValue(':last_page_url', $wo_last_page_url);
         $Qwhosonline->bindValue(':session_id', $wo_session_id);
         $Qwhosonline->execute();
     } else {
         $Qwhosonline = $lC_Database->query('insert into :table_whos_online (customer_id, full_name, session_id, ip_address, time_entry, time_last_click, last_page_url) values (:customer_id, :full_name, :session_id, :ip_address, :time_entry, :time_last_click, :last_page_url)');
         $Qwhosonline->bindRaw(':table_whos_online', TABLE_WHOS_ONLINE);
         $Qwhosonline->bindInt(':customer_id', $wo_customer_id);
         $Qwhosonline->bindValue(':full_name', $wo_full_name);
         $Qwhosonline->bindValue(':session_id', $wo_session_id);
         $Qwhosonline->bindValue(':ip_address', $wo_ip_address);
         $Qwhosonline->bindValue(':time_entry', $current_time);
         $Qwhosonline->bindValue(':time_last_click', $current_time);
         $Qwhosonline->bindValue(':last_page_url', $wo_last_page_url);
         $Qwhosonline->execute();
     }
     $Qwhosonline->freeResult();
     return true;
 }
开发者ID:abhiesa-tolexo,项目名称:loaded7,代码行数:63,代码来源:whos_online.php


注:本文中的lc_output_string_protected函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。