<?phpheader('Content-Type: text/xml');require_once('db.php');require_once('convert_marathi.php');$username = $_REQUEST['login_id'];$password = $_REQUEST['password'];//echo $username."--".$password;convert_marathi();$sql = mysql_query("SELECT login_id, password, user_type, desk_id from login where login_id='$username' AND password='$password' ");$nm=mysql_num_rows($sql);//echo $nm."aaaaaaaaa";if($nm!=0){				$rs=mysql_fetch_array($sql);				$user_type=$rs['user_type'];				if($user_type=='Desk')		{									$desk_id=$rs['desk_id'];							$qry1=("SELECT * FROM tapal_to_dpt_transaction t, incoming_letters_transaction i					WHERE t.desk_id=(SELECT desk_id FROM login WHERE login_id='$username') 					AND ( t.desk_approval='pending'  )					AND  t.ltr_id=i.ltr_id 					ORDER BY i.ltr_id DESC");						$rs1=mysql_query($qry1);			print('<?xml version="1.0" encoding="UTF-8"?>			<menu>');						while($row1=mysql_fetch_array($rs1))			{								$recdate = strtotime($row1['receive_dt']);				$rec= date('d-m-Y', $recdate);				$refdate = strtotime($row1['ref_dt']);				$ref= date('d-m-Y', $refdate);				//sent_to_desk_dt				$sentdate = strtotime($row1['sent_to_desk_dt']);				$sdt= date('d-m-Y', $sentdate);				//sent_dt				$sentdt = strtotime($row1['sent_dt']);				$sndt= date('d-m-Y', $sentdt);				$id=$row1['ltr_id'];				$deptid=$row1['dept_id'];								convert_marathi();				$qry5=("Select * from sandharbh_master,incoming_letters_transaction WHERE sandharbh_master.sandhrbh_id=incoming_letters_transaction.ltr_type AND incoming_letters_transaction.ltr_id='$id'");				$rs5=mysql_query($qry5);				while($rw5=mysql_fetch_array($rs5))				{					$ltr=$rw5['sandharbh_nm'];				}								print("<item>				<ltr_inword_no>".$row1['ltr_inword_no']."</ltr_inword_no>				<receive_dt>".$rec."</receive_dt>				<ref_no>".$row1['ref_no']."</ref_no>				<ref_dt>".$ref."</ref_dt>				<dpt_inword_no>".$row1['dpt_inword_no']."</dpt_inword_no>				<sent_dt>".$sndt."</sent_dt>				<sent_to_desk_dt>".$sdt."</sent_to_desk_dt>				<sender_name>".$row1['sender_name']."</sender_name>				<subject>".$row1['subject']."</subject>				<sandharbh_nm>".$ltr."</sandharbh_nm>				</item>");															}			print('</menu>');								}		else		{			//echo "3001";		}						}else{	//echo "300";}	?>