function MobileBrandDisplay()

{

$mobilelogin = JRequest::getVar(‘mobilelogin’, ”, ‘method’, ‘mobilelogin’);

$callback = JRequest::getVar(‘callback’, ”, ‘method’, ‘callback’);

$user =& JFactory::getUser();

$model = & $this->getModel(‘brands’);

$profileObj = $model->getAllBrands();

if($mobilelogin == “1”)

{

if(count($profileObj) > 0)

{

$output = array(‘Success’ => ‘True’,’email’ => $user->email);

}

else

{

$output = array(‘Success’ => ‘False’,’email’ => ”);

}

if ($callback) {

header(‘Content-Type: text/javascript’);

echo $callback . ‘(‘ . json_encode($profileObj) . ‘);’;

}

}

die;

}

http://localhost/cloverleaf20/index.php?option=com_bizzworld&view=brands&task=MobileBrandDisplay&mobilelogin=1&callback=hi

function MobileLocationisplay()
{
$mobilelogin = JRequest::getVar(‘mobilelogin’, ”, ‘method’, ‘mobilelogin’);
$callback = JRequest::getVar(‘callback’, ”, ‘method’, ‘callback’);

$user =& JFactory::getUser();
$model = & $this->getModel(‘locations’);

$locations = $model->getAllLocations();
/*echo”<pre>”;
print_r($locations);
die;*/
if($mobilelogin == “1”)
{
if(count($locations) > 0)
{
$output = array(‘Success’ => ‘True’,’email’ => $user->email);
}
else
{
$output = array(‘Success’ => ‘False’,’email’ => ”);
}

if ($callback) {
header(‘Content-Type: text/javascript’);
$output = array(‘Success’ => ‘True’,’locations’ => $locations);
echo $callback . ‘(‘ . json_encode($output) . ‘);’;
}

}
die;

}