<?php
	include "db_connection/db_connection.php";
	include "config/config.php";

	if($_SESSION['admin_login_id'] == '')
	{
		echo "<script>window.location='index.php';</script>";
	}
	if(isset($_GET['log_det']) && $_GET['log_det']!='')
	{
		$log_det = base64_decode(base64_decode(base64_decode(base64_decode($_GET['log_det']))));
	}
	else
	{
		$log_det = '';
	}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="https://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<title><?php echo $PROJECT_TITLE ?></title>

<script type="text/javascript" src="js/master_cat_JS.js"></script>
<link href="css/styles.css" rel="stylesheet" type="text/css" />
<!--[if IE]> <link href="css/ie.css" rel="stylesheet" type="text/css"> <![endif]-->

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>

<script type="text/javascript" src="js/plugins/forms/ui.spinner.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.mousewheel.js"></script>
 
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>

<script type="text/javascript" src="js/plugins/charts/excanvas.min.js"></script>
<script type="text/javascript" src="js/plugins/charts/jquery.flot.js"></script>
<script type="text/javascript" src="js/plugins/charts/jquery.flot.orderBars.js"></script>
<script type="text/javascript" src="js/plugins/charts/jquery.flot.pie.js"></script>
<script type="text/javascript" src="js/plugins/charts/jquery.flot.resize.js"></script>
<script type="text/javascript" src="js/plugins/charts/jquery.sparkline.min.js"></script>

<script type="text/javascript" src="js/plugins/tables/jquery.dataTables.js"></script>
<script type="text/javascript" src="js/plugins/tables/jquery.sortable.js"></script>
<script type="text/javascript" src="js/plugins/tables/jquery.resizable.js"></script>

<script type="text/javascript" src="js/plugins/forms/autogrowtextarea.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.uniform.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.inputlimiter.min.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.tagsinput.min.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.maskedinput.min.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.autotab.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.chosen.min.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.dualListBox.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.cleditor.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.ibutton.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.validationEngine-en.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.validationEngine.js"></script>

<script type="text/javascript" src="js/plugins/uploader/plupload.js"></script>
<script type="text/javascript" src="js/plugins/uploader/plupload.html4.js"></script>
<script type="text/javascript" src="js/plugins/uploader/plupload.html5.js"></script>
<script type="text/javascript" src="js/plugins/uploader/jquery.plupload.queue.js"></script>

<script type="text/javascript" src="js/plugins/wizards/jquery.form.wizard.js"></script>
<script type="text/javascript" src="js/plugins/wizards/jquery.validate.js"></script>
<script type="text/javascript" src="js/plugins/wizards/jquery.form.js"></script>

<script type="text/javascript" src="js/plugins/ui/jquery.collapsible.min.js"></script>
<script type="text/javascript" src="js/plugins/ui/jquery.breadcrumbs.js"></script>
<script type="text/javascript" src="js/plugins/ui/jquery.tipsy.js"></script>
<script type="text/javascript" src="js/plugins/ui/jquery.progress.js"></script>
<script type="text/javascript" src="js/plugins/ui/jquery.timeentry.min.js"></script>
<script type="text/javascript" src="js/plugins/ui/jquery.colorpicker.js"></script>
<script type="text/javascript" src="js/plugins/ui/jquery.jgrowl.js"></script>
<script type="text/javascript" src="js/plugins/ui/jquery.fancybox.js"></script>
<script type="text/javascript" src="js/plugins/ui/jquery.fileTree.js"></script>
<script type="text/javascript" src="js/plugins/ui/jquery.sourcerer.js"></script>

<script type="text/javascript" src="js/plugins/others/jquery.fullcalendar.js"></script>
<script type="text/javascript" src="js/plugins/others/jquery.elfinder.js"></script>

<script type="text/javascript" src="js/plugins/ui/jquery.easytabs.min.js"></script>
<script type="text/javascript" src="js/files/bootstrap.js"></script>
<script type="text/javascript" src="js/files/functions.js"></script>

<script type="text/javascript" src="js/charts/chart.js"></script>
<script type="text/javascript" src="js/charts/hBar_side.js"></script>
<style>
table.dataTable td {
	padding:5px 6px;
}
</style>
<!-- Shared on MafiaShare.net  --><!-- Shared on MafiaShare.net  --></head>

<body <?php if($log_det!='') { ?> onload="document.getElementById('addpage').focus(); document.getElementById('tabb_div<?php echo $log_det; ?>').click();" <?php } else { ?> onload="document.getElementById('addpage').focus();" <?php } ?>>

<!-- Top line begins -->
<?php include "header_footer/header.php"; ?>
<!-- Top line ends -->


<!-- Sidebar begins -->
<?php include "menus/left_menu.php"; ?>
<!-- Sidebar ends -->

<!-- Content begins -->
<div id="content">

<?php include "menus/top_menu.php"; ?>
    <!-- Breadcrumbs line -->
    <div class="breadLine">
        <div class="bc">
            <ul id="breadcrumbs" class="breadcrumbs">
                <li><a href="home.php">Dashboard</a></li>
                <li><a href="javascript:">Login Details</a></li>
            </ul>
        </div>
	<?php include "menus/top_left_menu.php"; ?>
    </div>
    <!-- Main content -->
    <div class="wrapper">
        <ul class="middleNavR">
            <!--<li><a href="#" title="Add an article" class="tipN"><img src="images/icons/middlenav/create.png" alt="" /></a></li>
            <li><a href="#" title="Upload files" class="tipN"><img src="images/icons/middlenav/upload.png" alt="" /></a></li>-->
		<?php $list_add = check_rights('61','add');
			if($list_add==1){
		?>
          <li><a href="login_det_add.php" title="Add Login Deatails" id="addpage" class="tipN"><img src="images/new_login.png" alt="" style="margin-top:-20px" /></a></li>
			<?php } ?>
		  <?php $list_view = check_rights('10','view');
			if($list_view==1){
			?>
          <li><a href="login_det_pwd_change.php" title="Change Password" id="addpage" class="tipN"><img src="images/chng_pwd.png" style="margin-top:-20px" /></a></li>
		  <?php } ?>
		<?php $list_view1 = check_rights('11','view');
			if($list_view1==1){
			?>
		  <li><a href="login_log_list.php" title="Client & Admin Log List" id="addpage" class="tipN"><img src="images/icons/mainnav/log_list.png" /></a></li>
		<?php } ?>
		<?php $list_view1 = check_rights('12','view');
			if($list_view1==1){
			?>
		  <li><a href="guest_login_log_list.php" title="Guest Log List" id="addpage" class="tipN"><img src="images/icons/mainnav/guest_user.png" /></a></li>
		  <?php } ?>
<?php $list_view1 = check_rights('13','view');
			if($list_view1==1){
			?>
          <li><a href="emp_login_log_list.php" title="Employee Log List" id="addpage" class="tipN"><img src="images/icons/mainnav/emp_hk.png" style="margin-top:-20px" /></a></li>
		  
		  <?php } ?>

            <!--<li><a href="#" title="Messages" class="tipN"><img src="images/icons/middlenav/dialogs.png" alt="" /></a><strong>8</strong></li>
            <li><a href="#" title="Check statistics" class="tipN"><img src="images/icons/middlenav/stats.png" alt="" /></a></li>-->
    	</ul>
    	<!-- Chart --><!-- 6 + 6 -->
		<div class="fluid">
            <div class="widget ">
                <ul class="tabs">
                    <li><a href="#tabb1" id="tabb_div1">Client Login</a></li>
                    <li><a href="#tabb2" id="tabb_div2">Employee Login</a></li>
                    <li><a href="#tabb3" id="tabb_div3">Marketing Admin Login</a></li>
                </ul>
                <div class="tab_container">
                    <div id="tabb1" class="tab_content"> 
                            <div id="dyn" class="hiddenpars">
                                <a href="javascript:0" id="searchlink" onfocus="foc(this.id)" onblur="stnon(this.id)" class="tOptions" title="Options"><img src="images/icons/options.png" alt=""/></a>
                                <table border="0" cellpadding="0" cellspacing="0" class="dTable" id="dynamic">
                                <thead>
                                <tr>
                                <th width="61" style="vertical-align:middle;">S.No<span class="sorting" style="display: block;"></span></th>
                                <th width="61" style="vertical-align:middle;">User Status </th>
                                <th width="70" style="text-aign:left; vertical-align:middle;">Company Code</th>
                                <th width="100"  style="text-align:left; vertical-align:middle;" nowrap>Client's Name</th>
                                 <th width="50" style="text-align:left;vertical-align:middle;">User Name</th>
                                <th width="50" style="text-align:left;vertical-align:middle;">Password</th>
                                <th width="80" style="text-align:left;vertical-align:middle;">Email ID</th>
                                <th width="84" style="text-align:left;vertical-align:middle;">Mail</th>
                                <th align="center"  style="text-align:center;vertical-align:middle;" width="105">Status</th>
                                </tr>
                                </thead>
                                <tbody>
                                 <?php
                                  $page_id= base64_encode(base64_encode(base64_encode(2))); //THIS IS FOR PAGE IDENTIFICATION IN BL FILE for active inactive
                                  $loop=1;
                                  $SLCT3 = "SELECT * FROM admin WHERE designation = 'guest_user'";
                                  //echo $SLCT;
                                  $QURY3 = mysqli_query($connect,$SLCT3);
                                  while($FTCH3 = mysqli_fetch_object($QURY3))
                                  {
                                        $login_id	=	base64_encode(base64_encode(base64_encode($FTCH3->admin_id)));
                                        $sts = ($FTCH3->user_sts=='1')?"<b><font color='#00CC00'>Online</font></b>":"Offline"; 
                                        if($loop%2 != "0")
                                            $bg = "gradeX";
                                        else
                                            $bg = "class='gradeC'";
                                ?>
                                         <tr <?php echo $bg ?>>
                                            <!--THIS IS FOR PRINTING THE NAME-->
                                            <td align="center"><?php echo $loop ?></td>  
                                            <td align="center"><?php echo $sts; ?></td>
                                            <td align="center"><?php echo "-----"; ?></td>
                                            <td style="text-align:left; vertical-align:middle;"><?php echo "Guest User"; ?></td>
                                            <td style="text-align:left; vertical-align:middle;"><?php echo $FTCH3->user_name; ?></td>  
                                            <td style="text-align:left; vertical-align:middle;"><?php echo $FTCH3->pass_word; ?></td>
                                            <td style="text-align:left; vertical-align:middle;"><?php echo "-----";  ?></td>  
                                           <td style="text-align:center; vertical-align:middle;">
											<a href="guest_user_mail.php?login_id=<?php echo $login_id; ?>" style="text-decoration:underline;">Mail</a></td>  
                                            <td style="text-align:left; vertical-align:middle;"><?php echo "-----";  ?></td>  
                                        </tr>
                                <?php
                                        $loop++;
                                    }
    $SLCT = "SELECT * FROM login_details WHERE party_det_id!=0 ORDER BY login_details_id DESC";
                                  //echo $SLCT;
    $QURY = mysqli_query($connect,$SLCT);
    if(mysqli_num_rows($QURY)>0){

	while($FTCH = mysqli_fetch_object($QURY))
	{
		$login_id	=	base64_encode(base64_encode(base64_encode($FTCH->login_details_id)));
		$SLCT_adm = "SELECT  * FROM admin WHERE admin_id='$FTCH->admin_id'";
		//echo $SLCT_adm;
		$QURY_adm = mysqli_query($connect,$SLCT_adm);
		$FTCH_adm = mysqli_fetch_object($QURY_adm);

		$sts_1 = ($FTCH_adm->user_sts == '1')?"<b><font color='#00CC00'>Online</font></b>":"Offline"; 

		$SLCT_cli = "SELECT * FROM party_det WHERE party_det_id='$FTCH->party_det_id'";
		//echo $SLCT_cli;
		$QURY_cli = mysqli_query($connect,$SLCT_cli);
		$FTCH_cli = mysqli_fetch_object($QURY_cli);
	 if($loop%2 != "0")
			$bg = "gradeX";
		else
			$bg = "class='gradeC'";
				$order_cnt ='';

				$sql_cnt = mysqli_query($connect,"select * from `des_sel_temp_des` WHERE `party_det_id`='".$FTCH->party_det_id."'");
				$order_cnt = mysqli_num_rows($sql_cnt);
                                ?>
                                <tr <?php echo $bg ?>>
                                        <!--THIS IS FOR PRINTING THE NAME-->
                                        <td align="center" style="vertical-align:middle;"><?php echo $loop?></td>
                                        <td align="center" style="vertical-align:middle;"><?php echo $sts_1; ?><br><span style="color:red; font-weight:bold;"><small><?php if($order_cnt!=''){ echo "(". $order_cnt.")";}?></small></span></td>
                                        <td align="center"  style="vertical-align:middle;">
                                            <?php 
												echo $FTCH_cli->party_code; 
                                            ?>
                                        </td>
                                        <td style="text-align:left; vertical-align:middle;">
                <?php //echo $FTCH_cli->cmp_name; 
			$cmp_count1 = strlen($FTCH_cli->cmp_name);
			$con_pers1 = substr($FTCH_cli->cmp_name,0,11)."...";
				?>
				<?php if($cmp_count1>11){?>
			<div class="tooltip1">
			<?php echo $con_pers1;?>
				<span class="tooltiptext1"><?php echo $FTCH_cli->cmp_name;?></span>
			</div>
			<?php } else { ?>
			<?php echo $FTCH_cli->cmp_name;?><br>
			<?php } ?>
          </td>
			<!--THIS IS FOR PRINTING THE OFFICE MAIL ID-->
			<td style="text-align:left; vertical-align:middle;"><?php echo $FTCH_adm->user_name;?></td>

			<!--THIS IS FOR PRINTING THE ROLL-->
			<td style="text-align:left; vertical-align:middle;"><?php echo $FTCH_adm->pass_word;?></td>

           <td valign="middle" style="vertical-align:middle; text-align:left;width:80px;">
           <?php 
         if($FTCH->emp_det_id!='0' and $FTCH->party_det_id=='0'){
			   if($FTCH_emp->email_id!=''){
						echo $FTCH_emp->email_id;
			   }
         } else if($FTCH->emp_det_id=='0' and $FTCH->party_det_id!='0') {
			if($FTCH_cli->email_id_1!=''){
				$pa_mail_id = $FTCH_cli->email_id_1;
			}else if($FTCH_cli->email_id_2!='') {
                $pa_mail_id = $FTCH_cli->email_id_2;
            }
          else if($FTCH_cli->email_id_3!=''){
                $pa_mail_id = $FTCH_cli->email_id_3;
          }
		  echo $pa_mail_id;
                            }
                            ?>
							</td>
                            <td valign="center" style="text-align:center; vertical-align:middle;">
                            <?php if($FTCH->party_det_id!=0){ ?>
                                        <a href="bl/login_det_BL.php?login_id=<?php echo $login_id; ?>&page_id=<?php echo base64_encode(base64_encode(base64_encode(4))) ?>&statu_s=inactive" style="vertical-align:middle;text-decoration:underline;">Mail</a>
                                        <?php }else{ echo "-----"; } ?></td>
                                        <!--THIS IS FOR VIEWING THE STATUS-->
                                        <td class="center">
                                        <?php if($FTCH->statu_s=="active"){ ?>
											<div>
                                            <a href="bl/login_det_BL.php?login_id=<?php echo $login_id; ?>&page_id=<?php echo $page_id; ?>&statu_s=active" style="text-decoration:none;"><span class="label label-success">Active</span></a></div>
											<div style="margin-top:7%;"><form method="post" action="https://thahaayaa.com/login" target="_blank">
											<input type="hidden" name="uname" value="<?php echo $FTCH_adm->user_name;?>">
											<input type="hidden" name="psw" value="<?php echo $FTCH_adm->pass_word;?>">
											<input type="hidden" name="fsite" value="0">
											<input type="submit" name="submit" value="Login" class="label label-success" style="width:44px;">
											</form>
											</div>
                                        <?php }else{ ?>
                                            <a href="bl/login_det_BL.php?login_id=<?php echo $login_id; ?>&page_id=<?php echo $page_id; ?>&statu_s=inactive" style="text-decoration:none;"><span class="label">Inactive</span></a>
                                         <?php } ?>			  </td>
                                  </tr>
                                    <?php
                                    $loop ++;
                                    }
                                   }
                                     ?>
                                </tbody>
                                </table> 
                            </div>
                        </div>
                        <div id="tabb2" class="tab_content"> 
                            <div id="dyn" class="hiddenpars">
                                <a href="javascript:0" id="searchlink" onfocus="foc(this.id)" onblur="stnon(this.id)" class="tOptions" title="Options"><img src="images/icons/options.png" alt=""/></a>
                                <table border="0" cellpadding="0" cellspacing="0" class="dTable" id="dynamic">
                                <thead>
                                <tr>
                                <th width="61">S.No<span class="sorting" style="display: block;"></span></th>
                                <th width="61">User Status </th>
                                <th width="157" style="text-align:left;">Employee Name</th>
                                <th width="118" style="text-align:left;">Employee Designation</th>
                                 <th width="98">User Name</th>
                                <th width="106">Password</th>
                                <th width="141">Email ID</th>
                                <th align="center" width="105">Status</th>
                                </tr>
                                </thead>
                                <tbody>
                                 <?php
                                  $page_id= base64_encode(base64_encode(base64_encode(2))); //THIS IS FOR PAGE IDENTIFICATION IN BL FILE for active inactive
                                  $loop=1;
                                  $SLCT = "SELECT * FROM login_details WHERE emp_det_id!=0 ORDER BY login_details_id DESC";
                                  //echo $SLCT;
                                 $QURY = mysqli_query($connect,$SLCT);
                                  if(mysqli_num_rows($QURY)>0)
                                  {

                                    while($FTCH = mysqli_fetch_object($QURY))
                                    {
                                        $login_id	=	base64_encode(base64_encode(base64_encode($FTCH->login_details_id)));
                                        $SLCT_adm = "SELECT  * FROM admin WHERE admin_id='$FTCH->admin_id'";
                                        //echo $SLCT_adm;
                                        $QURY_adm = mysqli_query($connect,$SLCT_adm);
                                        $FTCH_adm = mysqli_fetch_object($QURY_adm);

                                        $sts_1 = ($FTCH_adm->user_sts == '1')?"<b><font color='#00CC00'>Online</font></b>":"Offline"; 

                                        $SLCT_emp = "SELECT * FROM emp_det WHERE emp_det_id='$FTCH->emp_det_id'";
                                        //echo $SLCT_emp;				
                                        $QURY_emp = mysqli_query($connect,$SLCT_emp);
                                        $FTCH_emp = mysqli_fetch_object($QURY_emp);

                                     if($loop%2 != "0")
                                            $bg = "gradeX";
                                        else
                                            $bg = "class='gradeC'";
                                ?>
                                <tr <?php echo $bg ?>>
                                        <!--THIS IS FOR PRINTING THE NAME-->
                                        <td align="center"><?php echo $loop?></td>					
                                        <td align="center"><?php echo $sts_1; ?></td>
                                        <td valign="center">
                                            <?php 
												 echo $FTCH_emp->name;
                                            ?>
                                        </td>
                                        <!--THIS IS FOR PRINTING THE MOBILE NO-->
                                        <td class="center">
                                            <?php 
			$SLCT_ofc = "SELECT * FROM emp_det WHERE emp_det_id='$FTCH->emp_det_id'";
			$QURY_ofc = mysqli_query($connect,$SLCT_ofc);
			$FTCH_ofc = mysqli_fetch_object($QURY_ofc);

			$SLCT_des = "SELECT * FROM master_dept WHERE master_dept_id='$FTCH_ofc->master_dept_id'";				
			$QURY_des = mysqli_query($connect,$SLCT_des);
			$FTCH_des = mysqli_fetch_object($QURY_des);

			echo $FTCH_des->master_dept_name; 
                                            ?>
                                       	</td>

                                        <!--THIS IS FOR PRINTING THE OFFICE MAIL ID-->
                                        <td class="center"><?php echo $FTCH_adm->user_name;?></td>

                                        <!--THIS IS FOR PRINTING THE ROLL-->
                                        <td class="center"><?php echo $FTCH_adm->pass_word;?></td>

                                        <td valign="center">
                                            <?php 
					if($FTCH->emp_det_id!='0' and $FTCH->party_det_id=='0')
					{
						if($FTCH_emp->email_id!='')
						{
							echo $FTCH_emp->email_id;
						}

					}
					else if($FTCH->emp_det_id=='0' and $FTCH->party_det_id!='0')
					{
					if($FTCH_cli->email_id_1!='')
					{
						$pa_mail_id = $FTCH_cli->email_id_1;
						}
						else if($FTCH_cli->email_id_2!='')
						{
							$pa_mail_id = $FTCH_cli->email_id_2;
						}
						else if($FTCH_cli->email_id_3!='')
						{
							$pa_mail_id = $FTCH_cli->email_id_3;
						}
                       echo $pa_mail_id;
						}
                      ?></td>
                       <!--THIS IS FOR VIEWING THE STATUS-->
                      <td class="center">
                         <?php if($FTCH->statu_s=="active"){ ?>
                          <a href="bl/login_det_BL.php?login_id=<?php echo $login_id; ?>&page_id=<?php echo $page_id; ?>&statu_s=active&log_det=<?php echo base64_encode(base64_encode(base64_encode(base64_encode(2)))); ?>" style="text-decoration:none;"><span class="label label-success">Active</span></a>
                          <?php }else{ ?>
                          <a href="bl/login_det_BL.php?login_id=<?php echo $login_id; ?>&page_id=<?php echo $page_id; ?>&statu_s=inactive&log_det=<?php echo base64_encode(base64_encode(base64_encode(base64_encode(2)))); ?>" style="text-decoration:none;"><span class="label">Inactive</span></a>
                         <?php } ?></td>
                                  </tr>
                                    <?php
                                    $loop ++;
                                    }
                                     }
                                     ?>
                                </tbody>
                                </table> 
                            </div> 
                        </div>
                        <div id="tabb3" class="tab_content"> 
                            <div id="dyn" class="hiddenpars">
                                <a href="javascript:0" id="searchlink" onfocus="foc(this.id)" onblur="stnon(this.id)" class="tOptions" title="Options"><img src="images/icons/options.png" alt=""/></a>
                                <table border="0" cellpadding="0" cellspacing="0" class="dTable" id="dynamic">
                                <thead>
                                <tr>
                                <th width="61">S.No<span class="sorting" style="display: block;"></span></th>
                                <th width="157">Employee Name</th>
                                <th width="98">User Name</th>
                                <th width="106">Password</th>
                                <th width="141">Email ID</th>
                                <th align="center" width="105">Status</th>
                                </tr>
                                </thead>
                                <tbody>
                                 <?php
                                  $page_id= base64_encode(base64_encode(base64_encode(6))); //THIS IS FOR PAGE IDENTIFICATION IN BL FILE for active inactive
                                  $loop=1;
                                  $SLCT = "SELECT * FROM marketing_admin WHERE emp_det_id!=0 ORDER BY marketing_admin_id ASC";
                                  //echo $SLCT;
                                  $QURY = mysqli_query($connect,$SLCT);
                     if(mysqli_num_rows($QURY)>0){

                     while($FTCH = mysqli_fetch_object($QURY)){
                         $login_id	=	base64_encode(base64_encode(base64_encode($FTCH->marketing_admin_id)));

                       $SLCT_emp = "SELECT * FROM emp_det WHERE emp_det_id='$FTCH->emp_det_id'";
                                        //echo $SLCT_emp;
                      $QURY_emp = mysqli_query($connect,$SLCT_emp);
                      $FTCH_emp = mysqli_fetch_object($QURY_emp);

					 if($loop%2 != "0")
						$bg = "gradeX";
					 else
						$bg = "class='gradeC'";
                                ?>
                                <tr <?php echo $bg ?>>
                                        <!--THIS IS FOR PRINTING THE NAME-->
                                        <td align="center"><?php echo $loop?></td>
                                        <td valign="center">
                                            <?php 
												 echo $FTCH_emp->name; 
                                            ?>
                                        </td>
                                        <!--THIS IS FOR PRINTING THE OFFICE MAIL ID-->
                                        <td class="center"><?php echo $FTCH->user_name;?></td>

                                        <!--THIS IS FOR PRINTING THE ROLL-->
                                        <td class="center"><?php echo $FTCH->pass_word;?></td>

				<td valign="center">
					<?php 
						echo $FTCH_emp->email_id;
					?></td>
				<!--THIS IS FOR VIEWING THE STATUS-->
				<td class="center">
				<?php if($FTCH->statu_s=="1"){ ?>
					<a href="bl/login_det_BL.php?login_id=<?php echo $login_id; ?>&page_id=<?php echo $page_id; ?>&statu_s=active&log_det=<?php echo base64_encode(base64_encode(base64_encode(base64_encode(3)))); ?>" style="text-decoration:none;"><span class="label label-success">Active</span></a>
				<?php }else{ ?>
					<a href="bl/login_det_BL.php?login_id=<?php echo $login_id; ?>&page_id=<?php echo $page_id; ?>&statu_s=inactive&log_det=<?php echo base64_encode(base64_encode(base64_encode(base64_encode(3)))); ?>" style="text-decoration:none;"><span class="label">Inactive</span></a>
				 <?php } ?></td>
                                  </tr>
                                    <?php
                                    $loop ++;
                                    }

                                     }
                                     ?>
                                </tbody>
                                </table> 
                            </div> 
                        </div>
                    </div>
                    <div class="clear"></div>
                </div>
            </div>
    </div>
    <!-- Main content ends -->
</div>
<!-- Content ends -->
<?php /*?><?php include "header_footer/footer.php"; ?><?php */?>
<script>
function login_site(){
	alert("DASDAS");
	
}
</script>
</body>
</html>
