  <?php
  ################################################### Display All User In Data Table #########################################
include_once('dashboard_bdo.php');
require_once('convert_marathi.php');
?>
<!DOCTYPE html>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tapal Admin System</title>
</head>
    <div class="rightpanel">
        <ul class="breadcrumbs">
            <li><a href="dashboard_bdo.php"><i class="iconfa-home"></i></a> <span class="separator"></span></li>
            <li><a href="dashboard_bdo.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>टेबल</h5>
                <h1> युजर अद्यावत करा </h1>
            </div>
        </div><!--pageheader-->
        <div class="maincontent">
            <div class="maincontentinner">
				<h4 class="widgettitle">युजर अद्यावत करा</h4>
				<?php 
				$dtfrm=$_POST['datefrom'];
				$dtf=date("Y-m-d", strtotime($dtfrm));
				//echo "".$dtf;
				$datto=$_POST['dateto'];
				$dtto=date("Y-m-d", strtotime($datto));
				mysql_query('SET character_set_results=utf8');
				?>			             					 
                <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="head1 center">मोबाईल क्रं. </th>                          
                            <th class="head0 center">ईमेल आय. डी.</th>		
  							<th class="head0 center">अद्यावत करा</th>
                        </tr>
					</thead>
					<tbody>	
						<?php	
						convert_marathi();
						$qry=("SELECT * FROM login") or die("".mysql_error());
						$rs=mysql_query($qry) or die("".mysql_error());
						while($rws=mysql_fetch_array($rs))
						{
							$i=$rws['dept_id'];
							$i2=$rws['desk_id'];
							?>
							<tr class="gradeX">
								<?php 
								$vr=$rws['id'];
								echo "<td>".$rws['id']." </td>
								<td class=center >". $rws['user_name']." </td>
								<td class=center >". $rws['user_type']." </td>";
								$q=mysql_query("select dept_nm from department_master where dept_id='$i'") or die("".mysql_error());
								$r=mysql_fetch_array($q);
								$q1=mysql_query("select desk_nm from desk_master where desk_id='$i2'") or die("".mysql_error());
								$r1=mysql_fetch_array($q1);
								if($r['dept_nm']=='')
									{
										echo "<td class=center >"."--"."</td>";
									}
								else
									{
										echo "<td class=center >".$r['dept_nm']."</td>";
									}
								if($r1['desk_nm']=='')
									{
										echo "<td class=center >"."--"."</td>";
									}
								else
									{
										echo "<td class=center >".$r1['desk_nm']."</td>";
									}
								echo "<td class=center >".$rws['mob_no']."</td>
								<td class=center >".$rws['email_id']."</td>
								<td class=center ><a href=updateuser.php?no=$vr>". "अद्यावत करा"."</a></td></tr>"; 
									?>
				<?php 	}?>
                    </tbody>
                </table>
				<br /><br/>
           
            <?php include_once('footer.php');?>
        </div><!--maincontentinner-->
    </div><!--maincontent--> 
</div><!--rightpanel-->
</div><!--mainwrapper-->
</body>
</html>
