Exemplo n.º 1
0
 static function checkUserContent($params)
 {
     $db = JFactory::getDbo();
     $query = modBusinessContentHelper::getQuery($params, true, true);
     $db->setQuery($query);
     $obj = $db->loadObject();
     if ($db->getErrorMsg()) {
         die($db->getErrorMsg());
     }
     if (!empty($obj->count_id)) {
         return true;
     }
     return false;
 }
Exemplo n.º 2
0
 static function getList(&$params)
 {
     $limit = $params->get('limit', 5);
     $db = JFactory::getDbo();
     $query = modBusinessContentHelper::getQuery();
     $db->setQuery($query, 0, LIMIT_HOMEPAGE_SERVICES);
     $rows = $db->loadObjectList('id');
     foreach ($rows as &$row) {
         $img = json_decode($row->image);
         $row->img = '';
         if (!empty($img[0])) {
             $row->img = $img[0];
         }
     }
     return $rows;
 }
Exemplo n.º 3
0
<?php

/**
 * @package		Joomla.Site
 * @subpackage	mod_business_services
 * @copyright	Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */
// no direct access
defined('_JEXEC') or die;
// Include the syndicate functions only once
require_once dirname(__FILE__) . '/helper.php';
$list = modBusinessContentHelper::getList($params);
$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx'));
require JModuleHelper::getLayoutPath('mod_business_services', $params->get('layout', 'default'));