Ejemplo n.º 1
0
	public function onAfterPaymentSuccess($row) {
		require_once JPATH_ROOT.DS.'components'.DS.'com_eventbooking'.DS.'helper'.DS.'helper.php';
		require_once JPATH_ROOT.DS.'components'.DS.'com_awdwall'.DS.'models'.DS.'wall.php';
		$itemId = EventBookingHelper::getItemid();
		EventBookingHelper::loadLanguage();
		$db = & JFactory::getDBO();
		$user = & JFactory::getUser();
		jimport('joomla.utilities.date');		
		$db	 = & JFactory::getDBO() ;
		$today =& JFactory::getDate();		
		$sql = 'SELECT title FROM #__eb_events WHERE id='.$row->event_id ;
		$db->setQuery($sql);
		$eventTitle = $db->loadResult();
		$url = JRoute::_('index.php?option=com_eventbooking&view=event&id='.$row->event_id.'&Itemid='.$itemId);
		$eventTitle = '<a href="'.$url.'"><strong>'.$eventTitle.'<strong></a>' ;		
		
		$lang = JFactory::getLanguage();
		$tag = $lang->getTag();
		if (!$tag)
			$tag = 'en-GB';
		$lang->load('plg_jomwallpost', JPATH_ROOT, $tag);
		
		if($user->id)
		{
			$wall 				=& JTable::getInstance('Wall', 'Table');						
			$wall->user_id		= $user->id;
			$wall->group_id		= NULL;
			$wall->type			= 'text';
			$wall->commenter_id	=$user->id;
			$wall->message		= JText::sprintf('PLG_REGISTER_FOR_EVENT', 	$eventTitle);
			$wall->reply		= 0;
			$wall->is_read		= 0;
			$wall->is_pm		= 0;
			$wall->is_reply		= 0;
			$wall->posted_id	= NULL;
			$wall->wall_date	= time();
			
			if (!$wall->store()){				
			
			}
				
			$query = 'INSERT INTO #__awd_wall_privacy(wall_id, privacy) VALUES(' . $wall->id . ', 0)';
			$db->setQuery($query);
			$db->query();
		}
		
	} 	
Ejemplo n.º 2
0
$controlsClass = $bootstrapHelper->getClassMapping('controls');
?>
<div id="eb-cart-registration-page" class="eb-container row-fluid">
<h1 class="eb-page-heading"><?php 
echo JText::_('EB_CHECKOUT');
?>
</h1>
<?php 
if (strlen(strip_tags($this->message->{'registration_form_message' . $this->fieldSuffix}))) {
    $msg = $this->message->{'registration_form_message' . $this->fieldSuffix};
} else {
    $msg = $this->message->registration_form_message;
}
if (strlen($msg)) {
    $msg = str_replace('[EVENT_TITLE]', $this->eventTitle, $msg);
    $msg = str_replace('[AMOUNT]', EventBookingHelper::formatCurrency($this->amount, $this->config), $msg);
    ?>
								
		<div class="eb-message"><?php 
    echo $msg;
    ?>
</div>							 															
	<?php 
}
?>
<div class="eb-cart-content">		
	<table class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>			
				<th class="col_event">
					<?php