$mainframe = JFactory::getApplication();
$option = JRequest::getVar('option','com_jewebservices','','string');
$post = JRequest::get ('post');  
$uri =& JURI::getInstance();
$url= $uri->root();
$image_path=$url.'components/com_naderapp/assets/slide_image/';

$sql="SELECT * FROM #__naderapp_slide WHERE published=1"; 
$db->setQuery($sql);
$slidedata = $db->loadObjectList();
if($slidedata){
	$slidelist = array();
	for($d=0; $d<count($slidedata); $d++){
		$slidelistdata = array();
		$slidelistdata['slidename'] = $slidedata[$d]->imgname;
		$slidelistdata['slideimages'] = $image_path.$slidedata[$d]->simage;
		$slidelistdata['slideimagesipad'] = $image_path.$slidedata[$d]->simage_ipad;
		$slidelist[] =$slidelistdata; 
	}
	$arr = array('success' => 1, 'slidelist' => $slidelist);
	echo json_encode($arr);exit;
}else{
	$arr = array('success' => 0, 'message' => "No Records Found" );	
	echo json_encode($arr);exit;
}