<?php

/******************************************************************************
 *
 *	PROJECT: Flynax Classifieds Software
 *	VERSION: 4.X
 *	LICENSE: FL0M2SG681CQ - http://www.flynax.com/license-agreement.html
 *	PRODUCT: Pets Classifieds
 *	DOMAIN: pupsnshop.com
 *	FILE: HOME.INC.PHP
 *
 *	The software is a commercial product delivered under single, non-exclusive, 
 *	non-transferable license for one domain or IP address. Therefore distribution, 
 *	sale or transfer of the file in whole or in part without permission of Flynax 
 *	respective owners is considered to be illegal and breach of Flynax License End 
 *	User Agreement. 
 *
 *	You are not allowed to remove this information from the file without permission
 *	of Flynax respective owners.
 *
 *	Flynax Classifieds Software 2014 |  All copyrights reserved. 
 *
 *	http://www.flynax.com/
 *
 ******************************************************************************/

$getFeatured = (int)$_POST['featured'];
$data = array();

if ( $getFeatured )
{
	$reefless -> loadClass('Listings');
	$reefless -> loadClass('IFlynaxConnect', false, 'iFlynaxConnect');

	if ( false !== $featured = $rlIFlynaxConnect -> getFeatured() )
	{
		$data = $iPhone -> buildListingsShortForm($featured, APP_FEATUREDS_FIELDS_LIMIT);
	}
}
elseif ( isset($_POST['feedback']) && !empty($_POST['feedback']) )
{
	$reefless -> loadClass('Mail');

	$data['done'] = false;
	$mail_tpl['subject'] = 'App Feedback';
	$mail_tpl['body'] = "<br />Query params:<br />". implode('&', $params) ."<br /><br />Feedback:<br /><b>{$_GET['feedback']}</b><br />";

	if ( $rlMail -> send($mail_tpl, $config['site_main_email'], false, false, 'App feedback') )
	{
		$data['done'] = true;
	}
}
$iPhone -> printAsXml($data);