$mainframe = JFactory::getApplication();
$option = JRequest::getVar('option','com_jewebservices','','string');
$post = JRequest::get ('post');  
$uri =& JURI::getInstance();
$url= $uri->root();
$this->_table_prefix = "#__jetour_";




$sql="SELECT * FROM ".$this->_table_prefix."theme WHERE published=1"; 
$db->setQuery($sql);
$themedata = $db->loadObjectList();


if($themedata ){
 $themelist = array();
 for($d=0; $d<count($themedata ); $d++){
  $themelistdata = array();
  
  $themelistdata['themeid'] = $themedata [$d]->id;
  $themelistdata['themename'] = $themedata [$d]->thname;
 
   
  
  $themelist[] =$themelistdata; 
 }
 $arr = array('success' => 1, 'themelist' => $themelist);
 echo json_encode($arr);exit;
}else{
 $arr = array('success' => 0, 'message' => "No Records Found" ); 
 echo json_encode($arr);exit;
}