This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static function generateInvoicePDF($row) | |
{ | |
self::loadLanguage(); | |
require_once JPATH_ROOT . '/components/com_osmembership/tcpdf/tcpdf.php'; | |
require_once JPATH_ROOT . '/components/com_osmembership/tcpdf/config/lang/eng.php'; | |
$db = JFactory::getDbo(); | |
$query = $db->getQuery(true); | |
$config = self::getConfig(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function getUserInput($userId) | |
{ | |
$form = JForm::getInstance('user-field', '<form> </form>'); | |
$element = new SimpleXMLElement('<field />'); | |
$element->addAttribute('type', 'User'); | |
$element->addAttribute('name', 'user_id'); | |
$element->addAttribute('class', 'readonly'); | |
$form->setField($element); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @package Joomla.Site | |
* @subpackage com_contact | |
* | |
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved. | |
* @license GNU General Public License version 2 or later; see LICENSE.txt | |
*/ | |
defined('_JEXEC') or die; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public static function generateInvoicePDF($row) | |
{ | |
self::loadLanguage(); | |
$db = JFactory::getDbo(); | |
$query = $db->getQuery(true); | |
$config = self::getConfig(); | |
$sitename = JFactory::getConfig()->get("sitename"); | |
$query->select('*') | |
->from('#__eb_events') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function change_default_language() | |
{ | |
$db = JFactory::getDbo(); | |
$query = $db->getQuery(true); | |
$query->select('*') | |
->from('#__osmembership_plans'); | |
$db->setQuery($query); | |
$rowFields = $db->loadObjectList(); | |
$newDefaultLanguagePrefix = 'zh'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @package Joomla.Administrator | |
* @subpackage com_content | |
* | |
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved. | |
* @license GNU General Public License version 2 or later; see LICENSE.txt | |
*/ | |
defined('_JEXEC') or die; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @package Joomla.Plugin | |
* @subpackage System.languagefilter | |
* | |
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved. | |
* @license GNU General Public License version 2 or later; see LICENSE.txt | |
*/ | |
defined('_JEXEC') or die; | |
use Joomla\Registry\Registry; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Set CanonicalUrl url for a page, replace the one set by Joomla core | |
* | |
* @param $url | |
*/ | |
public static function setCanonicalUrl($url) | |
{ | |
$document = JFactory::getDocument(); | |
foreach ($document->_links as $k => $array) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<table border="0" width="100%" cellspacing="0" cellpadding="2"> | |
<tbody> | |
<tr> | |
<td align="left" width="100%"> | |
<table border="0" width="100%" cellspacing="0" cellpadding="2"> | |
<tbody> | |
<tr> | |
<td width="100%"> | |
<table style="width: 100%;" border="0" cellspacing="0" cellpadding="2"> | |
<tbody> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function reset_invoice_number() | |
{ | |
$config = OSMembershipHelper::getConfig(); | |
$db = JFactory::getDbo(); | |
$sql = 'UPDATE #__osmembership_subscribers SET invoice_number = 0'; | |
$db->setQuery($sql); | |
$db->execute(); | |
$sql = 'SELECT * FROM #__osmembership_subscribers WHERE (amount > 0 OR gross_amount > 0) AND (published=1 OR published=2 OR (published=0 AND payment_method="os_offline")) ORDER BY id'; | |
$db->setQuery($sql); |