<?php
header('Content-Type: application/xml');
		//////////////////////////////////////////////////////////////////////
		//////////////////////////////////////////////////////////////////////
 $row=array();
$dom = new DOMDocument("1.0");

$node = $dom->createElement("markers");

$parnode = $dom->appendChild($node);

	$id = 1;
	$mal_status = array();
	$rimg="";

	if(1==5){
		$mal_status = "Excellent";
		$rimg='images/5.png';
	}
	 
	else
	{

	$rimg='images/1.png';
	} 
		$mal_status = array("unnati","uddyam","prosper","prosper","uddyam");
	$status=rand(0,3);
	$latarr=array("16.166700","26.850000","19.076090","26.182245");
	$longarr=array("74.833298","80.949997","72.877426","91.754723");
	$statearr=array("Karnataka","Uttar Pradesh","Maharashtra","Assam");
	$project_namearr=array("Code Unnati","Disha","Uddyam","Prosper");
	$targttraindarr = array('Youth trained','Student Trained','Farmer registered','Social Entrepreneurs');
	$targtplacdarr  = array('Adolescent and children trained','Student Placed','no. of farmer in Agri-Extension','Primary producers');
	$targtcouncldarr = array('','Student Counselled','','Student Counselled');
	$targttraind_valuearr = array('5125','5000','2928','925');
	$targtplacd_valuearr = array('410930','4000','9611','450');
	$targtcouncld_valuearr = array('','1100','','1100');


	for($i=0;$i<4;$i++){
	$id=1;
	$project="Frankfinn Aviation Services Private Limited-Frankfinn Aviation services private limited - South Extension-77865";
	$outlay="Frankfinn Aviation Services Private Limited"; 
	$lat=$latarr[$i]; 
	$lng=$longarr[$i]; 
	$area="77865"; 
	$pia="Fixed"; 
	$state=$statearr[$i]; 
	$project_name=$project_namearr[$i]; 
    $targttraind=$targttraindarr[$i]; 
	$targtplacd=$targtplacdarr[$i]; 
	$targtcouncld=$targtcouncldarr[$i]; 
	$targttraind_value=$targttraind_valuearr[$i]; 
	$targtplacd_value=$targtplacd_valuearr[$i]; 
	$targtcouncld_value=$targtcouncld_valuearr[$i]; 

	$district="South Delhi"; 
	$batch="Suhail Mir";
	$image="http://indev.guru/skill-verification/img/batches/2.jpg"; 
	$links="centre_profile.php?id=77865&survey_id=2&visitor_response_id=38";
	$type=$mal_status[$i]; 
	$stdate="30-01-2018"; 
	$projectarea="Above Kotak Mahindra Bank South Ex - 2 110049, South Delhi, Delhi"; 
	$totalcost="9599193697"; 
	$centralshare="Indika Singh";
	$rating="5"; 
	$rimg="https://tcvapp.nsdcindia.org/images/averege.png";
	$name="abc";
		 $node = $dom->createElement("marker");
		  $newnode = $parnode->appendChild($node);
		  $newnode->setAttribute("id",$id);
		  $newnode->setAttribute("project", $name);
		  $newnode->setAttribute("outlay", $outlay);
		  $newnode->setAttribute("lat", $lat);
		  $newnode->setAttribute("lng", $lng);
		  $newnode->setAttribute("area", $area);
		  $newnode->setAttribute("pia", $pia);
		  $newnode->setAttribute("state", $state);
		  $newnode->setAttribute("project_name", $project_name);
		  $newnode->setAttribute("targttraind", $targttraind);
		  $newnode->setAttribute("targtplacd", $targtplacd);
		  $newnode->setAttribute("targtcouncld", $targtcouncld);
		  $newnode->setAttribute("targttraind_value", $targttraind_value);
		  $newnode->setAttribute("targtplacd_value", $targtplacd_value);
		  $newnode->setAttribute("targtcouncld_value", $targtcouncld_value);
		  $newnode->setAttribute("district", $district);
		  $newnode->setAttribute("batch", $batch);
		  $newnode->setAttribute("image", $image);
		  $newnode->setAttribute("links", $links);
		  $newnode->setAttribute("type", $type);
		  $newnode->setAttribute("stdate", $stdate);
		  $newnode->setAttribute("projectarea", $projectarea);
		  $newnode->setAttribute("totalcost", $totalcost);
		  $newnode->setAttribute("centralshare", $centralshare); 
		  $newnode->setAttribute("rating", $rating); 
		  $newnode->setAttribute("rimg", $rimg);
		  
	
		  }
		
 echo $dom->saveXML(); 
		//////////////////////////////////////////////////////////////////////
		//////////////////////////////////////////////////////////////////////


?>