Example #1
0
 public function getItems()
 {
     $items = parent::getItems();
     // If current realm list is empty populate from TC database
     if ($this->getTotal() <= 0) {
         $authdb = JTrinityCoreDBHelper::getAuthDBName();
         $sql = "SELECT id, name, address, port, population FROM " . $authdb . ".realmlist";
         $dbo = JTrinityCoreDBHelper::getDB();
         $dbo->setQuery($sql);
         $results = $dbo->loadObjectList();
         if (count($results)) {
             foreach ($results as $row) {
                 $data = new stdClass();
                 $data->id = NULL;
                 $data->realmid = $row->id;
                 $data->realmname = $row->name;
                 $data->ip = $row->address;
                 $data->port = $row->port;
                 $data->population = $row->population;
                 $this->_db->insertObject('#__jtc_realms', $data, 'id');
             }
             $items = parent::getItems();
         }
     }
     return $items;
 }
Example #2
0
 public function getCharacters($realmid)
 {
     $chardb = JTrinityCoreUtilities::getCharacterDBName($realmid);
     $accid = JTrinityCoreDBHelper::getAccId();
     $sql = "SELECT * FROM " . $chardb . ".characters  WHERE account=" . $accid;
     $db = JTrinityCoreDBHelper::getDB();
     $db->setQuery($sql);
     return $db->loadObjectList();
 }
Example #3
0
 public function teleport($realmid, $guid, $x, $y, $z, $map, $newGold)
 {
     $chardb = JTrinityCoreUtilities::getCharacterDBName($realmid);
     $db = JTrinityCoreDBHelper::getDB();
     $query = 'UPDATE ' . $chardb . '.characters SET position_x="' . $x . '", position_y="' . $y . '", position_z="' . $z . '", map="' . $map . '", money="' . $newGold . '" WHERE guid="' . $guid . '"';
     $db->setQuery($query);
     if (!$db->query()) {
         JLog::add("Error teleporting. SQL=" . $query, JLog::ERROR);
         return false;
     }
     return true;
 }
Example #4
0
 protected function getOptions()
 {
     $messages = JTrinityCoreDBHelper::getRealms();
     $options = array();
     if ($messages) {
         $options[] = JHtml::_('select.option', '0', JText::_('JSELECT'));
         foreach ($messages as $message) {
             $options[] = JHtml::_('select.option', $message->id, $message->name);
         }
     }
     $options = array_merge(parent::getOptions(), $options);
     return $options;
 }
Example #5
0
 protected function unstuck($realmid, $guid)
 {
     // Homebind
     $db = JTrinityCoreDBHelper::getDB();
     $database = JTrinityCoreUtilities::getCharacterDBName($realmid);
     $query = 'SELECT * FROM ' . $database . '.character_homebind WHERE guid = ' . $guid . ' LIMIT 1';
     $db->setQuery($query);
     if (!($obj = $db->loadObject())) {
         JLog::add("Unstuck: error. sql=" . $query, JLog::ERROR);
         return false;
     }
     $query = 'UPDATE ' . $database . '.characters SET position_x="' . $obj->position_x . '", position_y="' . $obj->position_y . '", position_z="' . $obj->position_z . '", map="' . $obj->map . '", zone="' . $obj->zone . '" WHERE guid=' . $guid . ' LIMIT 1';
     $db->setQuery($query);
     if (!$db->query()) {
         JLog::add("Unstuck: error. sql=" . $query, JLog::ERROR);
         return false;
     }
     return true;
 }
Example #6
0
 /**
  * Buy gold to a character
  * @param unknown_type $gold Gold object
  * @param unknown_type $realmid Realmid
  * @param unknown_type $char  Character object
  */
 public function buyGold($gold, $realmid, $char)
 {
     // Start transaction
     $this->_db->transactionStart();
     try {
         // Update user points
         $user = JFactory::getUser();
         $userid = $user->id;
         if (!JTrinityCoreUtilities::substractUserPoints($userid, $gold->cost, $this->_db)) {
             $this->_db->transactionRollback();
             return false;
         }
         $description = "Gold " . $gold->quantity;
         $donationtype = DONATIONTYPE_GOLD;
         // Update order table
         if (!JTrinityCoreUtilities::insertOrderTable($userid, $gold->id, $description, $gold->cost, $donationtype, $char->guid, $realmid, $this->_db)) {
             $this->_db->transactionRollback();
             return false;
         }
         // Update Gold to character
         // Add gold to character
         // Get character DB
         $chardbname = JTrinityCoreUtilities::getCharacterDBName($realmid);
         $dbtc = JTrinityCoreDBHelper::getDB();
         $addmoney = $gold->quantity * 10000;
         $sql = "UPDATE " . $chardbname . ".characters SET money=money+" . $addmoney . " WHERE guid=" . $char->guid;
         $dbtc->setQuery($sql);
         if (!$dbtc->query()) {
             $this->_db->transactionRollback();
             return false;
         }
         $this->_db->transactionCommit();
         return true;
     } catch (Exception $e) {
         JLog::add("Error buygold(): " . $e->getMessage(), JLog::ERROR);
         $this->_db->transactionRollback();
         return false;
     }
 }
Example #7
0
 /**
  * method to run after an install/update/uninstall method
  *
  * @return void
  */
 function postflight($type, $parent)
 {
     // $parent is the class calling this method
     // $type is the type of change (install, update or discover_install)
     //echo '<p>' . JText::_('POSTFLIGHT_' . $type . '_TEXT') . '</p>';
     if ($type == 'install') {
         $db = JFactory::getDbo();
         // Check if already exist group
         $sql = "SELECT * FROM #__usergroups WHERE title LIKE 'Wow%' ";
         $db->setQuery($sql);
         if (!$db->loadObject()) {
             //JLoader::register('JTrinityCoreDBHelper', dirname(__FILE__) . DS . 'helpers' . DS . 'jtrinitycoredb.php');
             require_once JPATH_SITE . DS . 'administrator' . DS . 'components' . DS . 'com_jtrinitycore' . DS . 'helpers' . DS . 'jtrinitycoredb.php';
             // Install the groups
             $groups = JTrinityCoreDBHelper::getWowGroups();
             // Add groups
             foreach ($groups as $v) {
                 $obj = new stdClass();
                 $obj->id = NULL;
                 $obj->parent_id = 2;
                 // Registered Users Id
                 //Jerror::raiseWarning(null, 'name='.$v['name']);
                 $obj->title = $v['name'];
                 if (!$db->insertObject('#__usergroups', $obj, 'id')) {
                     throw new Exception('Error inserting in usergroups. name=' . $v['name']);
                 }
                 $this->rebuild();
             }
         }
     }
 }
Example #8
0
 public function delete(&$pks)
 {
     try {
         // delete from tc db
         $dbo = JTrinityCoreDBHelper::getDB();
         $accdb = JTrinityCoreDBHelper::getAuthDBName();
         // Iterate the items to delete each one.
         $res = true;
         $pks = (array) $pks;
         $table = $this->getTable();
         foreach ($pks as $i => $pk) {
             $realmid = 0;
             // Get realmid
             if ($table->load($pk)) {
                 $realmid = $table->realmid;
             }
             $query = "DELETE FROM " . $accdb . ".realmlist WHERE id=" . $realmid;
             $dbo->setQuery($query);
             $res = $res && $dbo->query();
         }
         if ($res) {
             $res = parent::delete($pks);
         }
         return $res;
     } catch (Exception $e) {
         $this->setError($e->getMessage());
         return false;
     }
 }
Example #9
0
 public function getUptimeServer($realmid)
 {
     $db = JTrinityCoreDBHelper::getDB();
     $accdb = JTrinityCoreDBHelper::getAuthDBName();
     $query = "SELECT uptime FROM " . $accdb . ".uptime WHERE realmid=" . $realmid . " ORDER BY starttime DESC LIMIT 1";
     $db->setQuery($query);
     if (!($uptime_res = $db->loadResult())) {
         $uptime = '0';
     } else {
         $obj = $this->secondsToTime($uptime_res);
         $uptime = '';
         if ($obj['d'] > 0) {
             $uptime = $obj['d'] . JText::_('COM_JTRINITYCORE_DAYS');
         }
         if ($obj['h'] > 0) {
             $uptime .= ' ' . $obj['h'] . JText::_('COM_JTRINITYCORE_HOURS');
         }
         if ($obj['m'] > 0) {
             $uptime .= ' ' . $obj['m'] . JText::_('COM_JTRINITYCORE_MINS');
         }
     }
     return $uptime;
 }
Example #10
0
    case 9:
        $map = "530";
        $x = "-1863.03";
        $y = "4998.05";
        $z = "-21.1847";
        $place = "Shattrath";
        break;
        //for unknowness -> shattrath
    //for unknowness -> shattrath
    default:
        JLog::add('teleport.php: Invalid location. Location=' . $location, JLog::ERROR);
        echo "<strong>Invalid location.</strong>";
        return;
        break;
}
if (!($char = JTrinityCoreDBHelper::getCharacterInfo($realmid, $guid))) {
    JLog::add('Error getting char info. Realmid=' . $realmid . '  guid=' . $guid, JLog::ERROR);
    die("Error getting char info. Contact administrator or GM.");
}
// Disallows factions to use enemy portals
switch ($char->race) {
    //alliance race
    case 1:
    case 3:
    case 4:
    case 7:
    case 11:
        if ($location >= 5 && $location <= 8 && $location != 9) {
            echo JText::_('COM_JTRINITYCORE_NOTELEPORT_ALLIANCE_HORDE');
            return;
        }
Example #11
0
 /**
  * Send the item purchased to the mailbox character
  * @param unknown_type $item  item object from joomla database
  * @param unknown_type $realmid the realm of the character
  * @param unknown_type $character character object
  */
 public function sendItem($item, $realmid, $character)
 {
     // Get character DB
     $chardbname = JTrinityCoreUtilities::getCharacterDBName($realmid);
     $dbo = JTrinityCoreDBHelper::getDB();
     $characterid = $character->guid;
     $itemid = $item->itemid;
     //JLog::add("characterid=".$characterid."   productid=".$productid."   realmid=".$realmid." item name=".$item->name);
     // Get the mail id to insert
     // Start transaction
     $dbo->transactionStart();
     try {
         $ok = true;
         $sql = "SELECT MAX(id) FROM " . $chardbname . ".mail";
         $dbo->setQuery($sql);
         $id = $dbo->loadResult();
         if (!$id) {
             $id = 0;
         }
         $id = $id + 1;
         $mail = new stdClass();
         $mail->id = $id;
         $mail->messageType = 5;
         $mail->stationery = 41;
         $mail->sender = 0;
         // Should  be the admin GM
         $mail->receiver = $characterid;
         $mail->has_items = 1;
         $mail->subject = JText::_('COM_JTRINITYCORE_MAIL_ITEM_SUBJECT');
         $mail->body = JText::sprintf('COM_JTRINITYCORE_MAIL_ITEM_BODY', $character->name, $item->name);
         // Insert into mail table
         if ($dbo->insertObject($chardbname . '.mail', $mail, 'id')) {
             // Insert into item instance table
             $sql = "SELECT MAX(guid) FROM " . $chardbname . ".item_instance";
             $dbo->setQuery($sql);
             $iteminstanceid = $dbo->loadResult();
             if (!$iteminstanceid) {
                 $iteminstanceid = 0;
             }
             $iteminstanceid = $iteminstanceid + 1;
             $item_instance = new stdClass();
             $item_instance->guid = $iteminstanceid;
             $item_instance->itemEntry = $item->itemid;
             $item_instance->owner_guid = $characterid;
             $item_instance->durability = $this->getMaxDurability($item->itemid, $relmid);
             // $item->maxdurability;
             if ($dbo->insertObject($chardbname . '.item_instance', $item_instance, 'guid')) {
                 // Insert into mail_items table
                 $mail_item = new stdClass();
                 $mail_item->mail_id = $id;
                 $mail_item->item_guid = $iteminstanceid;
                 $mail_item->receiver = $characterid;
                 if (!$dbo->insertObject($chardbname . '.mail_items', $mail_item)) {
                     $ok = false;
                     JLog::add("sendItem(): Error inserting item_instance. ", JLog::ERROR, 'donationshop');
                 }
             } else {
                 $ok = false;
             }
         } else {
             $ok = false;
             JLog::add("sendItem(): Error inserting table mail. ", JLog::ERROR, 'donationshop');
         }
         if (!$ok) {
             $dbo->transactionRollback();
             return false;
         }
         $dbo->transactionCommit();
         $user = JFactory::getUser();
         $cost = $item->cost;
         // Update the new points to the user
         if (!JTrinityCoreUtilities::substractUserPoints($user->id, $cost)) {
             return false;
         }
         // Insert into the order table
         $description = $item->name . " (Level=" . $item->itemlevel . ")";
         $donationtype = DONATIONTYPE_ITEM;
         $userid = $user->id;
         if (!JTrinityCoreUtilities::insertOrderTable($userid, $item->id, $description, $cost, $donationtype, $characterid, $realmid)) {
             return false;
         }
         return true;
     } catch (Exception $e) {
         JLog::add("Error: " . $e->getMessage(), JLog::ERROR, "donationhop->sendItem");
         $dbo->transactionRollback();
         return false;
     }
 }
Example #12
0
    ?>
		</td>
		<td>
		<a href="<?php 
    echo JTrinityCoreDBHelper::getWowHeadLink() . 'item=' . $item->itemid;
    ?>
" >
			<img src="<?php 
    echo "../media/com_jtrinitycore/items/small/" . $item->icon;
    ?>
 " alt="<?php 
    echo $item->name;
    ?>
">
			<span class="<?php 
    echo JTrinityCoreDBHelper::getColourClassCode($item->color);
    ?>
">
			<?php 
    echo $item->name;
    ?>
			</span>
			</a>
		</td>
		<td>
			<?php 
    echo $item->description;
    ?>
		</td>
		<td>
			<?php 
Example #13
0
 protected function deleteUser($user)
 {
     // deletion method
     $cparams = JComponentHelper::getParams('com_jtrinitycore');
     $db = JTrinityCoreDBHelper::getDB();
     $accid = $this->getAccId($user['username']);
     if ($accid == -1) {
         JLog::add('Error deleting user account. AccId=-1. User='******'username'], JLog::ERROR, $this->logcat);
         return false;
     }
     if ((int) $cparams->get('delete_method') == 0) {
         //---- Lock User
         // Do not delete the user, just locks it
         $query = "UPDATE " . $this->dbaccount . ".account SET  locked = 1 WHERE id=" . $accid;
         $db->setQuery($query);
         if (!$db->query()) {
             JLog::add('Error locking user account in trinity db. SQL= ' . $query, JLog::ERROR, $this->logcat);
             return false;
         } else {
             JLog::add('Locking user account in trinity db OK. SQL= ' . $query, JLog::INFO, $this->logcat);
             return true;
         }
     } else {
         // TODO: ---- Delete user in Trinity Core
         $query = "DELETE FROM " . $this->dbaccount . ".account WHERE id=" . $accid;
         $db->setQuery($query);
         if (!$db->query()) {
             JLog::add('Error deleting from table account. SQL= ' . $query, JLog::ERROR, $this->logcat);
             return false;
         }
         $query = "DELETE FROM " . $this->dbaccount . ".account_access WHERE id=" . $accid;
         $db->setQuery($query);
         if (!$db->query()) {
             JLog::add('Error deleting from table account_access. SQL= ' . $query, JLog::ERROR, $this->logcat);
             return false;
         }
         $query = "DELETE FROM " . $this->dbaccount . ".realmcharacters WHERE acctid  = " . $accid;
         $db->setQuery($query);
         if (!$db->query()) {
             JLog::add('Error deleting from table realmcharacters. SQL= ' . $query, JLog::ERROR, $this->logcat);
             return false;
         }
         // Delete from all DB characters
         $sql = "SELECT charactersdb FROM #__jtc_realms ";
         $dbo = JFactory::getDbo();
         $dbo->setQuery($sql);
         if ($obj = $dbo->loadObjectList()) {
             foreach ($obj as $i => $item) {
                 $query = 'DELETE FROM ' . $item->charactersdb . '.account_data WHERE accountId  = ' . $accid;
                 $db->setQuery($query);
                 if (!$db->query()) {
                     JLog::add('Error deleting from table account_data. SQL= ' . $query, JLog::ERROR, $this->logcat);
                     return false;
                 }
                 $query = 'UPDATE  ' . $item->charactersdb . '.characters SET deleteDate=(SELECT UNIX_TIMESTAMP(\'' . date("Y-m-d H:i:s") . '\')) WHERE account  = ' . $accid;
                 //$query = 'DELETE FROM  #__characters WHERE account  = ' . (int)$userinfo->userid;
                 $db->setQuery($query);
                 if (!$db->query()) {
                     JLog::add('Error deleting from table characters. SQL= ' . $query, JLog::ERROR, $this->logcat);
                     return false;
                 }
             }
         } else {
             JLog::add('Error loading characters db from jtc_realms . SQL= ' . $sql, JLog::ERROR, $this->logcat);
         }
     }
     JLog::add('Deleted user from table characters OK.', JLog::INFO, $this->logcat);
     return true;
 }
Example #14
0
<?php

// No direct access to this file
defined('_JEXEC') or die('Restricted Access');
JRequest::checkToken() or die('Invalid Token');
// Get gold info
$model = $this->getModel();
$gold = $model->getGoldInfo(JRequest::getVar('gold'));
$characterid = JRequest::getVar('characterid');
$realmid = JRequest::getVar('realmid');
// Check if user has enough points
$userpoints = JTrinityCoreUtilities::getPoints();
if ($userpoints < $gold->cost) {
    echo JText::_('COM_JTRINITYCORE_NOT_ENOUGH_POINTS');
    return;
}
$char = JTrinityCoreDBHelper::getCharacterInfo($realmid, $characterid);
if ($model->buyGold($gold, $realmid, $char)) {
    echo JText::sprintf('COM_JTRINITYCORE_BUYGOLD_OK', $char->name, (int) floor($char->money / 10000) + $gold->quantity);
} else {
    echo JText::_('COM_JTRINITYCORE_BUYGOLD_ERROR');
}
Example #15
0
				<td style="background-color:black; color:cyan">
						<?php 
    echo $item->itemid;
    ?>
						
						
				</td>
				<td align="center"  style="background-color:black">
				    
					<a href="<?php 
    echo JTrinityCoreDBHelper::getWowHeadLink() . 'item=' . $item->itemid;
    ?>
">
					
					<span class="<?php 
    echo JTrinityCoreDBHelper::getColourClassCode($item->quality);
    ?>
">
					<?php 
    echo $item_name;
    ?>
					</span>
					</a>
					
				</td>
				<td align="center" style="background-color:black; color:cyan">
					<?php 
    echo $item->itemlevel;
    ?>
				</td>
				<td align="center" style="background-color:black; color:cyan">
Example #16
0
 /**
  * Build an SQL query to load the list data.
  *	
  *
  * @return	JDatabaseQuery
  * @since	1.6
  */
 protected function getListQuery()
 {
     // Create a new query object.
     $worlddb = JTrinityCoreUtilities::getWorldDBName(JRequest::getVar('realmid'));
     $db = JTrinityCoreDBHelper::getDB();
     $query = $db->getQuery(true);
     // Select the required fields from the table.
     $query->select($this->getState('list.select', 'DISTINCT a.entry as itemid, itemlevel, requiredlevel, a.name as englishname, quality, allowablerace, subclass, class, inventorytype'));
     $query->from($worlddb . '.item_template AS a');
     $query->where('a.flags<>16 AND (a.name IS NOT NULL) AND (a.name not like \'%deprecated%\') AND (a.name not like \'%test%\')');
     $name = "a.name";
     $locale = JTrinityCoreUtilities::getLocale();
     if ($locale > 1) {
         $name = "name_loc" . $locale;
         $query->select($name . " as name");
         $query->where($name . " IS NOT NULL");
         $query->join('INNER', $worlddb . '.locales_item AS li ON li.entry=a.entry ');
         #__users AS uc ON uc.id=a.checked_out
     } else {
         $query->select("a.name as name");
     }
     // Filter by class state
     $class = $this->getState('filter.class_id');
     if (is_numeric($class)) {
         $query->where('a.class = ' . (int) $class);
     }
     // Filter on quality.
     $quality = $this->getState('filter.quality_id');
     if (is_numeric($quality)) {
         $query->where('a.Quality =' . $quality);
     }
     // Filter on Inventory Type.
     $inventory = $this->getState('filter.inventory_id');
     if (is_numeric($inventory)) {
         $query->where('a.InventoryType =' . $inventory);
     }
     // Filter on allowable class
     $allowableclass = $this->getState('filter.allowableclass');
     if (is_numeric($allowableclass)) {
         $query->where('a.AllowableClass =' . $allowableclass);
     }
     // Filter by search in title.
     $search = $this->getState('filter.search');
     if (!empty($search)) {
         if (stripos($search, 'itemid:') === 0) {
             $query->where('a.displayid = ' . (int) substr($search, 7));
         } else {
             if (stripos($search, 'itemlevel:') === 0) {
                 $query->where('itemlevel = ' . (int) substr($search, 10));
             }
         }
         if (stripos($search, 'requiredlevel:') === 0) {
             $query->where('requiredlevel = ' . (int) substr($search, 14));
         } else {
             $search = $db->Quote('%' . $db->escape($search, true) . '%');
             $query->where('(' . $name . ' LIKE ' . $search . ')');
         }
     }
     // Add the list ordering clause.
     $orderCol = $this->state->get('list.ordering', 'i.name');
     $orderDirn = $this->state->get('list.direction', 'asc');
     //echo "Order field=".$orderCol."---<br>";
     if ($orderCol == 'a.name' || $orderCol == 'name') {
         $orderCol = 'name ';
     }
     if ($orderCol == 'a.itemid' || $orderCol == 'itemid') {
         $orderCol = 'itemid ';
     }
     if ($orderCol == 'a.itemlevel' || $orderCol == 'itemlevel') {
         $orderCol = 'itemlevel ';
     }
     //sqlsrv change
     /*if($orderCol == 'access_level')
     		$orderCol = 'ag.title';*/
     $query->order($db->escape($orderCol . ' ' . $orderDirn));
     // echo nl2br(str_replace('#__','jos_',$query));
     //JLog::add('Query='.$query, JLog::WARNING, 'deprecated');
     //JError::raiseError(0, JText::sprintf('DB Name antes='.$db->getDatabase()."  Version=".$db->getVersion()."  connected=".$db->connected(), 'hola'));
     return $query;
 }
Example #17
0
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
JTrinityCoreUtilities::CheckUserLogged();
// Get user name
$user = JFactory::getUser();
$user_name = $user->name;
$user_username = $user->username;
$acc = JTrinityCoreDBHelper::getAccountData($user_username);
if (!$acc) {
    return false;
}
$remote_IP = JTrinityCoreUtilities::getRemoteIP();
$last_login = $acc->last_login;
$last_ip = $acc->last_ip;
$banned = $acc->locked;
$expansion_string = JTrinityCoreDBHelper::getExpansionString($acc->expansion);
$images = "media/com_jtrinitycore/images/";
//$style="media/com_jtrinitycore/styles/style.css";
// <link href="" rel="stylesheet" type="text/css" />
?>
<h1 class="contentheading"><?php 
echo JText::_('COM_JTRINITYCORE_CUSER_CONTROL_PANEL');
?>
</h1>
<?php 
JTrinityCoreUtilities::ShowUserPoints(false);
// Donation shop banner
/*echo '<div style="float: right;">

<a href="index.php?option=com_jtrinitycore&view=donationshop"><img src="'.$images.'donationshop.png"></a>
</div>
Example #18
0
<?php

/**
 * realm status Module Entry Point
 * 
 * @package    Joomla.Tutorials
 * @subpackage Modules
 * @link http://dev.joomla.org/component/option,com_jd-wiki/Itemid,31/id,tutorials:modules/
 * @license        GNU/GPL, see LICENSE.php
 * mod_helloworld is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 */
// no direct access
defined('_JEXEC') or die('Restricted access');
// Include the syndicate functions only once
require_once dirname(__FILE__) . DS . 'helper.php';
require_once JPATH_SITE . DS . 'administrator' . DS . 'components' . DS . 'com_jtrinitycore' . DS . 'helpers' . DS . 'jtrinitycoreutilities.php';
require_once JPATH_SITE . DS . 'administrator' . DS . 'components' . DS . 'com_jtrinitycore' . DS . 'helpers' . DS . 'jtrinitycoredb.php';
JTrinityCoreDBHelper::createDatabases();
$helper = new modJtcRealmStatusHelper();
$authserverip = $helper->getServerIP();
$auth_port = $helper->getAuthServerPort();
$items = $helper->getRealms();
// Load layout template
require JModuleHelper::getLayoutPath('mod_jtcrealmstatus');