<?php
include_once('dashboard_department.php');
require_once('convert_marathi.php');
$username = $_SESSION['User_Name'];
?>
<!DOCTYPE html>
<html>
<head> 
</head>
    <div class="rightpanel">
        <ul class="breadcrumbs">
            <li><a href="dashboard_department.php"><i class="iconfa-home"></i></a> <span class="separator"></span></li>
            <li><a href="dashboard_department.php">Tables</a> <span class="separator"></span></li>
            <li>रिटर्नची माहिती भरा</li>
        </ul>
        <div class="pageheader">
            <div class="pageicon"><span class="iconfa-table"></span></div>
            <div class="pagetitle">
                <h5>Tables</h5>
                <h1>रिटर्नची माहिती भरा</h1>
            </div>
        </div><!--pageheader-->
        <div class="maincontent">
            <div class="maincontentinner">
                <h4 class="widgettitle">रिटर्नची माहिती भरा</h4>
                <form action="dptreturndetail.php" method="post">
					<table id="dyntable" class="table table-bordered">
						<thead>
							<tr>
								<th class="head0 center">आवक क्र. </th>
								<th class="head1 center">संदर्भ क्र. /संदर्भ दिं.</th>
								<th class="head0 center">विभागीय प्राप्त दिं.</th>
								<th class="head1 center">कोणाकडून प्राप्त झाले  </th>
								<th class="head0 center">थोडक्यात विषय</th>
								<th class="head0 center">संदर्भाचा प्रकार</th>  
								<th class="head0 center">रिटर्नची माहिती भरा</th>
							</tr>
						</thead>
						<tbody>
							<?php 
							convert_marathi();
							$qry1=("SELECT * FROM incoming_letters_transaction WHERE status='returned'");
							$rs1=mysql_query($qry1)or die ("aaa".mysql_error());
							while($row1=mysql_fetch_array($rs1))
							{	
								$num=$row1['ltr_id'];
								$refdate = strtotime($row1['ref_dt']);
								$ref= date('d-m-Y', $refdate);
								//sent_dt
								$sentdate = strtotime($row1['sent_dt']);
								$sdt= date('d-m-Y', $sentdate);
								?>
								<tr class="gradeX unicode" lang="mr">
									<td class="aligncenter"><span class="center">
									<input type="checkbox" />
									</span></td>
									<td class="center"><?php echo $row1['ltr_inword_no'];
									$id=$row1['ltr_inword_no'];?></td>
									<td class="center"><?php echo $row1['ref_no']."<br>".$ref;?></td>
									<td class="center"><?php echo $sdt;?></td>
									<td class="center" id="wrapping"><?php echo $row1['sender_name'];?></td>
									<td class="center" id="wrapping"><?php echo $row1['subject'];?></td>
									<?php
									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_inword_no='$id'");
									$rs5=mysql_query($qry5) or die ("mmmm". mysql_error());
									while($rw5=mysql_fetch_array($rs5))
									{
										$ltr=$rw5['sandharbh_nm'];
									}
									?>
									<td class="center"><?php echo $ltr; ?></td>		
									<td class="center">
									<?php
									echo "<a href=dptreturndetail.php?no=$num>"."माहिती भरा"."</a>";
									?></td>
								</tr>
					<?php 	} ?>
						</tbody>
					</table>
					<p class="stdformbutton">
                        <center>  <button class="btn btn-primary">बदल करा </button>
                        <button type="reset" class="btn">रद्द करा  </button></center>
                    </p></div>
					<br /><br />
				</form> 
             <?php   
             include_once('footer.php');
            ?>
            </div><!--maincontentinner-->
        </div><!--maincontent-->
    </div><!--rightpanel-->
</div><!--mainwrapper-->
</body>
</html>
