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


PHP RSMembershipHelper::showDate方法代码示例

本文整理汇总了PHP中RSMembershipHelper::showDate方法的典型用法代码示例。如果您正苦于以下问题:PHP RSMembershipHelper::showDate方法的具体用法?PHP RSMembershipHelper::showDate怎么用?PHP RSMembershipHelper::showDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RSMembershipHelper的用法示例。


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

示例1: onMembershipPayment

 public function onMembershipPayment($plugin, $data, $extra, $membership, $transaction, $html)
 {
     if (!$this->canRun()) {
         return;
     }
     if ($plugin != 'rsmembership2co') {
         return false;
     }
     // Set tax.
     $transaction->price += $this->_getTax($transaction->price);
     // Set the custom hash.
     $transaction->custom = md5($transaction->params . ' ' . uniqid('2checkout'));
     // Is it a demo purchase?
     $demo = !$this->params->get('mode');
     // Set the URL for the form
     $url = sprintf('https://%s.2checkout.com/checkout/purchase', $demo ? 'sandbox' : 'www');
     // Set our vars
     $vars = array('sid' => $this->params->get('id'), 'mode' => '2CO', 'li_0_name' => $this->params->get('message_type') ? $membership->name : JText::sprintf('PLG_SYSTEM_RSMEMBERSHIP2CO_MEMBERSHIP_PURCHASE_ON', RSMembershipHelper::showDate($transaction->date)), 'li_0_price' => $this->_convertNumber($transaction->price), 'x_receipt_link_url' => JUri::root() . 'index.php?option=com_rsmembership&oldtwocopayment=1', 'currency_code' => RSMembershipHelper::getConfig('currency'), 'custom' => $transaction->custom, 'vendor_order_id' => $transaction->custom);
     if ($membership->recurring && $membership->period > 0) {
         $vars['li_0_recurrence'] = $this->getRecurrence($membership->period, $membership->period_type);
         // Get duration.
         if ($membership->recurring_times) {
             if (preg_match('#[0-9]+#', $vars['li_0_recurrence'], $match)) {
                 $vars['li_0_duration'] = str_replace($match[0], $match[0] * $membership->recurring_times, $vars['li_0_recurrence']);
             }
         } else {
             $vars['li_0_duration'] = 'Forever';
         }
     }
     // Add demo mode.
     if ($demo) {
         $vars['demo'] = 'Y';
     }
     // Mark the transaction as complete.
     if ($membership->activation == 2) {
         $transaction->status = 'completed';
     }
     $html = '';
     $html .= '<p>' . JText::_('PLG_SYSTEM_RSMEMBERSHIP2CO_PLEASE_WAIT_REDIRECT') . '</p>';
     $html .= '<form method="post" action="' . $url . '" id="twocoForm">';
     foreach ($vars as $key => $value) {
         $html .= '<input type="hidden" name="' . $key . '" value="' . htmlentities($value, ENT_COMPAT, 'utf-8') . '" />' . "\n";
     }
     $html .= '</form>';
     $html .= '<script type="text/javascript">';
     $html .= 'function twocoFormSubmit() { document.getElementById(\'twocoForm\').submit() }';
     $html .= 'try { window.addEventListener ? window.addEventListener("load",twocoFormSubmit,false) : window.attachEvent("onload",twocoFormSubmit); }';
     $html .= 'catch (err) { twocoFormSubmit(); }';
     $html .= '</script>';
     return $html;
 }
开发者ID:JozefAB,项目名称:qk,代码行数:51,代码来源:rsmembership2co.php

示例2: getYears

 function getYears()
 {
     $return = array();
     $tmp = new stdClass();
     $tmp->value = 0;
     $tmp->text = JText::_('COM_RSMEMBERSHIP_EVERY_YEAR');
     $return[] = $tmp;
     // $max = date('Y', RSMembershipHelper::getCurrentDate());
     $max = RSMembershipHelper::showDate(time(), 'Y');
     for ($i = $max; $i <= $max + 50; $i++) {
         $tmp = new stdClass();
         $tmp->value = $i;
         $tmp->text = $i;
         $return[] = $tmp;
     }
     return $return;
 }
开发者ID:JozefAB,项目名称:qk,代码行数:17,代码来源:fixedexpiry.php

示例3: buildCSV

 public static function buildCSV($type, $data, $fileHash = '', $customFields = null)
 {
     require_once JPATH_COMPONENT . '/helpers/helper.php';
     $rows = '';
     if ($fileHash == '') {
         // Build header
         switch ($type) {
             case 'subscribers':
                 $headers = array(JText::_('COM_RSMEMBERSHIP_SUBSCRIBER_ID'), JText::_('COM_RSMEMBERSHIP_ENABLED'), JText::_('COM_RSMEMBERSHIP_NAME'), JText::_('COM_RSMEMBERSHIP_USERNAME'), JText::_('COM_RSMEMBERSHIP_EMAIL'));
                 if ($customFields) {
                     foreach ($customFields as $id => $properties) {
                         $headers[] = JText::_($properties->label);
                     }
                 }
                 break;
             case 'subscriptions':
                 $headers = array(JText::_('COM_RSMEMBERSHIP_MEMBERSHIP'), JText::_('COM_RSMEMBERSHIP_USERNAME'), JText::_('COM_RSMEMBERSHIP_EMAIL'), JText::_('COM_RSMEMBERSHIP_STATUS'), JText::_('COM_RSMEMBERSHIP_NOTIFIED'), JText::_('COM_RSMEMBERSHIP_START_DATE'), JText::_('COM_RSMEMBERSHIP_START_END'), JText::_('JPUBLISHED'));
                 break;
         }
         // Add header to rows
         $rows .= '"' . implode('","', $headers) . '"' . "\n";
     }
     // Add the data to rows
     foreach ($data as $i => $entry) {
         $row = (array) $entry;
         switch ($type) {
             case 'subscribers':
                 $row['block'] = $row['block'] ? JText::_('JNO') : JText::_('JYES');
                 break;
             case 'subscriptions':
                 unset($row['membership_id']);
                 unset($row['id']);
                 unset($row['user_id']);
                 $row['membership_start'] = RSMembershipHelper::showDate($row['membership_start']);
                 $row['membership_end'] = $row['membership_end'] != '0000-00-00 00:00:00' ? RSMembershipHelper::showDate($row['membership_end']) : ' - ';
                 $row['notified'] = $row['notified'] != '0000-00-00 00:00:00' ? RSMembershipHelper::showDate($row['notified']) : ' - ';
                 $row['status'] = JText::_('COM_RSMEMBERSHIP_STATUS_' . $row['status']);
                 $row['published'] = $row['published'] ? JText::_('JYES') : JText::_('JNO');
                 break;
         }
         $rows .= '"' . implode('","', $row) . '"';
         $rows .= "\n";
     }
     return $rows;
 }
开发者ID:JozefAB,项目名称:qk,代码行数:45,代码来源:export.php

示例4: _getDefaultFilters

 public function _getDefaultFilters()
 {
     $db = JFactory::getDBO();
     $query = $db->getQuery(true);
     $filters = array();
     // set the default values for fields in xml
     $filters['report'] = 'report_2';
     $filters['from_date'] = '';
     $filters['to_date'] = RSMembershipHelper::showDate(JFactory::getDate()->toUnix(), 'Y-m-d');
     $filters['unit'] = 'day';
     $filters['user_id'] = '';
     $filters['memberships'] = array_keys(RSMembershipHelper::getMembershipsList(false));
     $filters['status_memberships'] = array(0, 1, 2, 3);
     $filters['status_transactions'] = array('pending', 'completed', 'denied');
     $filters['price_from'] = 0;
     $filters['price_to'] = '';
     $filters['transaction_types'] = array('new', 'upgrade', 'addextra', 'renew');
     $query->select('DISTINCT(gateway)')->from($db->qn('#__rsmembership_transactions'))->order($db->qn('gateway') . ' ASC');
     $db->setQuery($query);
     $filters['gateways'] = $db->loadColumn();
     return $filters;
 }
开发者ID:JozefAB,项目名称:qk,代码行数:22,代码来源:rsmembership.php

示例5: save

 public function save($data)
 {
     $db = JFactory::getDBO();
     $query = $db->getQuery(true);
     if (empty($data['id'])) {
         $data['date_added'] = RSMembershipHelper::showDate(time(), 'Y-m-d H:i:s');
     }
     parent::save($data);
     $coupon_id = $this->getState($this->getName() . '.id', 'id');
     // delete
     $query->delete()->from($db->qn('#__rsmembership_coupon_items'))->where($db->qn('coupon_id') . ' = ' . $db->q($coupon_id));
     $db->setQuery($query);
     $db->execute();
     // insert in coupon_items
     if (!empty($data['used_for'])) {
         foreach ($data['used_for'] as $membership_item) {
             $query->clear();
             $query->insert($db->qn('#__rsmembership_coupon_items'))->set($db->qn('coupon_id') . ' = ' . $db->q($coupon_id) . ', ' . $db->qn('membership_id') . ' = ' . $db->q($membership_item));
             $db->setQuery($query);
             $db->execute();
         }
     }
     return true;
 }
开发者ID:JozefAB,项目名称:qk,代码行数:24,代码来源:coupon.php

示例6: foreach

            if (!empty($params['extras'])) {
                foreach ($params['extras'] as $extra) {
                    echo $this->cache->extra_values[$extra] . '<br />';
                }
            }
            break;
        case 'renew':
            if (!empty($params['membership_id'])) {
                echo $this->cache->memberships[$params['membership_id']];
            }
            break;
    }
    ?>
		</td>
		<td><?php 
    echo RSMembershipHelper::showDate($row->date);
    ?>
</td>
		<td><?php 
    echo $this->escape($row->ip);
    ?>
</td>		
		<td><?php 
    echo RSMembershipHelper::getPriceFormat($row->price);
    ?>
</td>
		<td><?php 
    echo JText::_('COM_RSMEMBERSHIP_TRANSACTION_STATUS_' . strtoupper($row->status));
    ?>
</td>
		<td><?php 
开发者ID:JozefAB,项目名称:qk,代码行数:31,代码来源:edit_transactions.php

示例7: foreach

foreach ($this->items as $i => $item) {
    ?>
		<tr class="row<?php 
    echo $i % 2;
    ?>
">
			<td width="1%" nowrap="nowrap"><?php 
    echo $this->pagination->getRowOffset($i);
    ?>
</td>
			<td width="1%" nowrap="nowrap"><?php 
    echo JHtml::_('grid.id', $i, $item->id);
    ?>
</td>
			<td width="1%" nowrap="nowrap"><?php 
    echo RSMembershipHelper::showDate($item->date);
    ?>
</td>
			<td width="1%" nowrap="nowrap"><?php 
    echo $this->escape($item->ip);
    ?>
</td>
			<td><?php 
    echo $this->escape($item->path);
    ?>
</td>
		</tr>
	<?php 
}
?>
	<tfoot>
开发者ID:JozefAB,项目名称:qk,代码行数:31,代码来源:default.php

示例8: onMembershipPayment

 public function onMembershipPayment($plugin, $data, $extra, $membership, $transaction, $html)
 {
     if (!$this->canRun()) {
         return;
     }
     if ($plugin != 'rsmembershippaypal') {
         return false;
     }
     $db = JFactory::getDBO();
     $query = $db->getQuery(true);
     $transaction->price += $this->_getTax($transaction->price);
     $extra_total = 0;
     foreach ($extra as $row) {
         $extra_total += $row->price;
     }
     $query->select('*')->from($db->qn('#__rsmembership_memberships'))->where($db->qn('id') . ' = ' . $db->q((int) $membership->id));
     $db->setQuery($query);
     $db_membership = $db->loadObject();
     $transaction->custom = md5($transaction->params . ' ' . time());
     $url = $this->params->get('mode') ? 'https://www.paypal.com/cgi-bin/webscr' : 'https://www.sandbox.paypal.com/cgi-bin/webscr';
     $html = '';
     $html .= '<p>' . JText::_('PLG_SYSTEM_RSMEMBERSHIPPAYPAL_PLEASE_WAIT_REDIRECT') . '</p>';
     $html .= '<form method="post" action="' . $url . '" id="paypalForm">';
     $html .= '<input type="hidden" name="business" value="' . $this->escape($this->params->get('email')) . '" />';
     $html .= '<input type="hidden" name="charset" value="utf-8" />';
     if ($this->params->get('message_type')) {
         $html .= '<input type="hidden" name="item_name" value="' . $this->escape($membership->name) . '" />';
     } else {
         $html .= '<input type="hidden" name="item_name" value="' . $this->escape(JText::sprintf('PLG_SYSTEM_RSMEMBERSHIPPAYPAL_MEMBERSHIP_PURCHASE_ON', RSMembershipHelper::showDate($transaction->date))) . '" />';
     }
     $html .= '<input type="hidden" name="currency_code" value="' . $this->escape(RSMembershipHelper::getConfig('currency')) . '" />';
     if ($membership->recurring && $membership->period > 0 && $transaction->type == 'new') {
         $html .= '<input type="hidden" name="cmd" value="_xclick-subscriptions" />';
         $html .= '<input type="hidden" name="no_shipping" value="1" />';
         $html .= '<input type="hidden" name="no_note" value="1" />';
         $html .= '<input type="hidden" name="src" value="1" />';
         $html .= '<input type="hidden" name="sra" value="1" />';
         if ($membership->recurring_times > 0) {
             $html .= '<input type="hidden" name="srt" value="' . ($membership->recurring_times > 52 ? 52 : $membership->recurring_times) . '" />';
         }
         // trial period
         if ($membership->use_trial_period) {
             // initial price
             $price = $this->_convertNumber($transaction->price);
             $html .= '<input type="hidden" name="a1" value="' . $price . '" />';
             list($p, $t) = $this->_convertPeriod($db_membership->trial_period, $db_membership->trial_period_type);
             $html .= '<input type="hidden" name="p1" value="' . $p . '" />';
             $html .= '<input type="hidden" name="t1" value="' . $t . '" />';
             // renewal price (+tax)
             $price = $this->_convertNumber($membership->use_renewal_price ? $db_membership->renewal_price + $this->_getTax($db_membership->renewal_price) : $db_membership->price + $this->_getTax($db_membership->price));
             // add extras
             $price += $extra_total;
             $html .= '<input type="hidden" name="a3" value="' . $price . '" />';
             list($p, $t) = $this->_convertPeriod($db_membership->period, $db_membership->period_type);
             $html .= '<input type="hidden" name="p3" value="' . $p . '" />';
             $html .= '<input type="hidden" name="t3" value="' . $t . '" />';
         } else {
             // different renewal price ?
             if ($membership->use_renewal_price) {
                 // initial price
                 $price = $this->_convertNumber($transaction->price);
                 $html .= '<input type="hidden" name="a1" value="' . $price . '" />';
                 list($p, $t) = $this->_convertPeriod($db_membership->period, $db_membership->period_type);
                 $html .= '<input type="hidden" name="p1" value="' . $p . '" />';
                 $html .= '<input type="hidden" name="t1" value="' . $t . '" />';
                 // renewal price (+tax)
                 $price = $this->_convertNumber($membership->renewal_price + $this->_getTax($membership->renewal_price));
                 // add extras
                 $price += $extra_total;
                 $html .= '<input type="hidden" name="a3" value="' . $price . '" />';
                 list($p, $t) = $this->_convertPeriod($db_membership->period, $db_membership->period_type);
                 $html .= '<input type="hidden" name="p3" value="' . $p . '" />';
                 $html .= '<input type="hidden" name="t3" value="' . $t . '" />';
             } else {
                 // renewal price
                 $price = $this->_convertNumber($transaction->price);
                 $html .= '<input type="hidden" name="a3" value="' . $price . '" />';
                 list($p, $t) = $this->_convertPeriod($membership->period, $membership->period_type);
                 $html .= '<input type="hidden" name="p3" value="' . $p . '" />';
                 $html .= '<input type="hidden" name="t3" value="' . $t . '" />';
             }
         }
     } else {
         $html .= '<input type="hidden" name="cmd" value="_xclick" />';
         $html .= '<input type="hidden" name="amount" value="' . $this->_convertNumber($transaction->price) . '" />';
     }
     if ($db_membership->activation == 2) {
         $transaction->status = 'completed';
     }
     $uri = JUri::getInstance();
     $base = $uri->toString(array('scheme', 'user', 'pass', 'host', 'port'));
     $return = $base . JRoute::_('index.php?option=com_rsmembership&task=thankyou', false);
     $html .= '<input type="hidden" name="notify_url" value="' . JRoute::_(JURI::root() . 'index.php?option=com_rsmembership&paypalpayment=1') . '" />';
     $html .= '<input type="hidden" name="bn" value="RSJoomla_SP" />';
     $html .= '<input type="hidden" name="custom" value="' . $this->escape($transaction->custom) . '" />';
     $html .= '<input type="hidden" name="return" value="' . $this->escape($return) . '" />';
     $html .= '<input type="hidden" name="rm" value="1" />';
     if ($cancel = $this->params->get('cancel_return')) {
         $replace = array('{live_site}', '{membership_id}');
         $with = array(JURI::root(), $membership->id);
//.........这里部分代码省略.........
开发者ID:JozefAB,项目名称:qk,代码行数:101,代码来源:rsmembershippaypal.php

示例9: getReportData


//.........这里部分代码省略.........
     } else {
         if (!empty($memberships)) {
             $query->where($db->qn('membership_id') . ' IN (\'' . implode($db->q(','), $memberships) . '\')');
         }
         $status = $post_filters['status_memberships'];
         if (!empty($status)) {
             $query->where($db->qn('status') . ' IN (\'' . implode($db->q(','), $status) . '\')');
         }
     }
     if ($report == 'report_1' || $report == 'report_2') {
         $price_from = $post_filters['price_from'];
         if (!empty($price_from)) {
             $query->where($db->qn('price') . ' >= (' . $price_from . ') ');
         }
         $price_to = $post_filters['price_to'];
         if (!empty($price_to)) {
             $query->where($db->qn('price') . ' <= (' . $price_to . ') ');
         }
     }
     // ordering
     $query->order($db->qn($date_column) . ' ASC');
     switch ($report) {
         case 'report_1':
             // query
             $query->select($db->qn('membership_id') . ', ' . $db->qn($date_column))->from($db->qn('#__rsmembership_membership_subscribers'));
             $db->setQuery($query);
             $subscribers = $db->loadObjectList();
             $query->clear();
             if (!empty($subscribers)) {
                 foreach ($subscribers as $subscriber) {
                     if ($unit == 'quarter') {
                         $format = $this->getQuarter(JFactory::getDate($subscriber->membership_start)->toUnix());
                     }
                     $date = RSMembershipHelper::showDate($subscriber->membership_start, $format);
                     $membership = $this->getMembershipName($subscriber->membership_id);
                     @($return['units'][$date] = $date);
                     @($return['memberships'][$date][$membership] += 1);
                     @($return['totals'][$date] += 1);
                 }
             }
             if (!empty($return['totals'])) {
                 foreach ($return['units'] as $date) {
                     foreach ($memberships as $membership) {
                         $membership = $this->getMembershipName($membership);
                         if (empty($return['memberships'][$date][$membership])) {
                             $return['memberships'][$date][$membership] = 0;
                         }
                     }
                 }
                 // Building the header data response
                 foreach ($memberships as $mem) {
                     $data[0][] = $this->getMembershipName($mem);
                 }
                 asort($data[0]);
                 array_unshift($data[0], JText::_('COM_RSMEMBERSHIP_REPORTS_PERIOD'));
                 foreach ($return['memberships'] as $return_date => $return_values) {
                     ksort($return['memberships'][$return_date]);
                 }
                 // adding data values
                 foreach ($return['memberships'] as $date => $memberships) {
                     $membership_values = array_values($memberships);
                     array_unshift($membership_values, $date);
                     $data[] = $membership_values;
                 }
             }
             $output['data'] = $data;
开发者ID:JozefAB,项目名称:qk,代码行数:67,代码来源:reports.php

示例10: defined

/**
* @package RSMembership!
* @copyright (C) 2014 www.rsjoomla.com
* @license GPL, http://www.gnu.org/licenses/gpl-2.0.html
*/
defined('_JEXEC') or die('Restricted access');
?>
<table class="rsmem_transaction_info_table">
	<tr>
		<td width="200"><?php 
echo JText::_('COM_RSMEMBERSHIP_DATE');
?>
</td>
		<td><?php 
echo RSMembershipHelper::showDate($this->item->transaction_data->date);
?>
</td>
	</tr>
	<tr>
		<td width="200"><?php 
echo JText::_('COM_RSMEMBERSHIP_TYPE');
?>
</td>
		<td><?php 
echo JText::_('COM_RSMEMBERSHIP_TRANSACTION_' . strtoupper($this->item->transaction_data->type));
?>
</td>
	</tr>
	<tr>
		<td width="200"><?php 
开发者ID:JozefAB,项目名称:qk,代码行数:30,代码来源:edit_transaction_info.php

示例11: sendNotifications

 public static function sendNotifications($memberships, $cid = null, $resend = false)
 {
     // Get custom fields
     $db = JFactory::getDBO();
     $query = $db->getQuery(true);
     $date = JFactory::getDate();
     $fields = RSMembership::getCustomFields();
     $config = RSMembershipConfig::getInstance();
     $update_ids = array();
     foreach ($memberships as $membership) {
         $date = JFactory::getDate();
         $interval = $membership->expire_notify_interval;
         $date->modify("+{$interval} days");
         // Select all the subscriptions that match (about to expire)
         $query->clear();
         $query->select($db->qn('u.id', 'user_id'))->select($db->qn('u.email', 'user_email'))->select($db->qn('u.name', 'user_name'))->select($db->qn('u.username', 'user_username'))->select($db->qn('mu.id', 'muid'))->select($db->qn('mu.extras'))->select($db->qn('mu.membership_end'))->select($db->qn('mu.from_transaction_id'))->from($db->qn('#__rsmembership_membership_subscribers', 'mu'))->join('left', $db->qn('#__users', 'u') . ' ON ' . $db->qn('mu.user_id') . ' = ' . $db->qn('u.id'))->where($db->qn('mu.status') . ' = ' . $db->q(MEMBERSHIP_STATUS_ACTIVE))->where($db->qn('mu.published') . ' = ' . $db->q(1));
         if (!$resend) {
             $query->where($db->qn('mu.notified') . ' = ' . $db->q($db->getNullDate()));
         }
         $query->where($db->qn('mu.membership_end') . ' != ' . $db->q($db->getNulldate()))->where($db->qn('mu.membership_end') . ' < ' . $db->q($date->toSql()))->where($db->qn('mu.membership_id') . ' = ' . $db->q($membership->id));
         if ($cid != null && is_array($cid) && count($cid) > 0) {
             $ids = implode($db->q(','), $cid);
             $query->where($db->qn('mu.id') . ' IN (' . $ids . ')');
         }
         $db->setQuery($query, 0, $config->get('expire_emails'));
         $results = $db->loadObjectList();
         // No results, next membership
         if (empty($results)) {
             continue;
         }
         $now = JFactory::getDate()->toUnix();
         $sentToUser = false;
         $sentToAdmin = false;
         foreach ($results as $result) {
             $extras = '';
             // Performance check
             if ($result->extras && (strpos($membership->user_email_expire_text . $membership->user_email_expire_subject, '{extras}') !== false || strpos($membership->admin_email_expire_text . $membership->admin_email_expire_subject, '{extras}') !== false)) {
                 $extras = RSMembershipHelper::getExtrasNames($result->extras);
             }
             $expireDate = JFactory::getDate($result->membership_end);
             $expireIn = ceil(($expireDate->toUnix() - $now) / 86400);
             $placeholders = array('{membership}' => $membership->name, '{membership_end}' => RSMembershipHelper::showDate($result->membership_end), '{extras}' => $extras, '{email}' => $result->user_email, '{name}' => $result->user_name, '{username}' => $result->user_username, '{interval}' => $expireIn);
             $replace = array_keys($placeholders);
             $with = array_values($placeholders);
             $query->clear();
             $query->select('*')->from($db->qn('#__rsmembership_subscribers'))->where($db->qn('user_id') . ' = ' . $db->q($result->user_id));
             $db->setQuery($query);
             $user_data_tmp = $db->loadObject();
             $user_data = array();
             foreach ($fields as $field) {
                 $field_id = 'f' . $field->id;
                 $user_data[$field->name] = isset($user_data_tmp->{$field_id}) ? $user_data_tmp->{$field_id} : '';
             }
             unset($user_data_tmp);
             foreach ($fields as $field) {
                 $name = $field->name;
                 $replace[] = '{' . $name . '}';
                 if (isset($user_data[$name])) {
                     $with[] = is_array($user_data[$name]) ? implode("\n", $user_data[$name]) : $user_data[$name];
                 } else {
                     $with[] = '';
                 }
             }
             $membership_fields = RSMembership::getCustomMembershipFields($membership->id);
             $transaction_user_data = RSMembership::getUserData($result->from_transaction_id);
             foreach ($membership_fields as $field) {
                 $name = $field->name;
                 $replace[] = '{' . $name . '}';
                 if (isset($transaction_user_data->membership_fields[$name])) {
                     $with[] = is_array($transaction_user_data->membership_fields[$name]) ? implode("\n", $transaction_user_data->membership_fields[$name]) : $transaction_user_data->membership_fields[$name];
                 } else {
                     $with[] = '';
                 }
             }
             $jconfig = JFactory::getConfig();
             if ($membership->user_email_expire_subject) {
                 $message = str_replace($replace, $with, $membership->user_email_expire_text);
                 // from address
                 $from = $membership->user_email_use_global ? $jconfig->get('mailfrom') : $membership->user_email_from_addr;
                 // from name
                 $fromName = $membership->user_email_use_global ? $jconfig->get('fromname') : $membership->user_email_from;
                 // recipient
                 $recipient = $result->user_email;
                 // user email
                 // subject
                 $subject = str_replace($replace, $with, $membership->user_email_expire_subject);
                 // body
                 $body = $message;
                 // mode
                 $mode = $membership->user_email_mode;
                 // cc
                 $cc = null;
                 // bcc
                 $bcc = null;
                 // attachments
                 $query->clear();
                 $query->select($db->qn('path'))->from($db->qn('#__rsmembership_membership_attachments'))->where($db->qn('membership_id') . ' = ' . $db->q($membership->id))->where($db->qn('email_type') . ' = ' . $db->q('user_email_expire'))->where($db->qn('published') . '=' . $db->q('1'))->order($db->qn('ordering') . ' ASC');
                 $db->setQuery($query);
                 $attachment = $db->loadColumn();
                 // reply to
//.........这里部分代码省略.........
开发者ID:JozefAB,项目名称:qk,代码行数:101,代码来源:rsmembership.php

示例12:

					<span class="pull-left rsme_faded"><?php 
    echo JText::_('COM_RSMEMBERSHIP_MEMBERSHIP_START');
    ?>
: </span> 
					<strong><?php 
    echo RSMembershipHelper::showDate($this->membership->membership_start);
    ?>
</strong>
				</div>
				<div class="span6 pull-left">	
					<span class="pull-left rsme_faded"><?php 
    echo JText::_('COM_RSMEMBERSHIP_MEMBERSHIP_END');
    ?>
: </span> 
					<strong><?php 
    echo $this->membership->membership_end != '0000-00-00 00:00:00' ? RSMembershipHelper::showDate($this->membership->membership_end) : JText::_('COM_RSMEMBERSHIP_UNLIMITED');
    ?>
</strong>
				</div>
			</div>
			<?php 
}
?>
			<!-- Membership Renew -->
			<div class="row-fluid">
			<?php 
if (!$this->membership->no_renew) {
    ?>
					<div class="pull-left span6">
						<span class="rsme_faded rsme_vcenter"><?php 
    echo JText::_('COM_RSMEMBERSHIP_RENEW');
开发者ID:JozefAB,项目名称:qk,代码行数:31,代码来源:default.php

示例13:

    echo RSMembershipHelper::showDate($row->date_added);
    ?>
</td>
					<td><a href="<?php 
    echo JRoute::_('index.php?option=com_rsmembership&task=coupon.edit&id=' . $row->id);
    ?>
"><?php 
    echo $row->name != '' ? $this->escape($row->name) : JText::_('COM_RSMEMBERSHIP_NO_TITLE');
    ?>
</a></td>
					<td nowrap="nowrap"><?php 
    echo $row->date_start != '0000-00-00 00:00:00' ? RSMembershipHelper::showDate($row->date_start) : '-';
    ?>
</td>
					<td nowrap="nowrap"><?php 
    echo $row->date_end != '0000-00-00 00:00:00' ? RSMembershipHelper::showDate($row->date_end) : '-';
    ?>
</td>
					<td><?php 
    echo $row->discount_type ? RSMembershipHelper::getPriceFormat($this->escape($row->discount_price)) : $this->escape($row->discount_price) . '%';
    ?>
</td>
					<td width="1%" nowrap="nowrap" align="center"><?php 
    echo JHtml::_('jgrid.published', $row->published, $i, 'coupons.');
    ?>
</td>
				</tr>
			<?php 
    $k = 1 - $k;
}
?>
开发者ID:JozefAB,项目名称:qk,代码行数:31,代码来源:default.php


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