<div class="page-content">

<style>


.outer {position:relative}
.inner {
  overflow-x:scroll;
  overflow-y:visible;
}
</style>



<?php
						
						
?>                            <div class="container-fluid">
                                

<div data-widget-group="group1">
<h3>Total Leads</h3>
	<div class="row">
		<div class="col-md-12">
			<div class="panel panel-default outer">
				<div class="panel-heading">
					<h2>Total Leads</h2>
					<div class="panel-ctrls"></div>
				</div>
                <form action="action-pages/call/allocate-lead.php" method="post">
                <script language="JavaScript">
function toggle(source) {
    var checkboxes = document.querySelectorAll('input[type="checkbox"]');
    for (var i = 0; i < checkboxes.length; i++) {
        if (checkboxes[i] != source)
            checkboxes[i].checked = source.checked;
    }
}
</script>
                
				<div class="panel-body no-padding inner">
					<table id="example" class="table table-striped table-bordered" cellspacing="0" width="1412">
						<thead>
							<tr>
								<td width="50" align="center"><input type="checkbox" onclick="toggle(this);" /></td>
							  <th width="233"> Name</th>
							  <th width="295">Course</th>
								<th width="286">Email Id</th>
								<th width="168">Contact No</th>
							  <th width="229" align="center">Time</th>
							  <th width="135">Source</th>
						  </tr>
						</thead>
						<tbody>
							<?php
							$GetList = mysql_query("SELECT * FROM  `lead2017` ORDER BY  `lead2017`.`id` DESC ");
							while($GetList1 = mysql_fetch_assoc($GetList))
							{
							 $s =$_REQUEST['v'];
							$u = $s+0;
							
							$GetCheck= mysql_query("SELECT * FROM  `lead_allocation` WHERE  `lead_id` ='$GetList1[id]'");
							$GetCheck1=mysql_num_rows($GetCheck);
							if($GetCheck1 !='0')
							{
							}
							else
							{
							
							?>
							
							<tr class="odd">
								<td align="center"><input type="checkbox" name="chk[]" value="<?php echo $GetList1['id']; ?>" /></td>
								<td><?php echo $GetList1['name']; ?></td>
								   <td class="center"><?php  
								   $GetProgName= mysql_query("SELECT * FROM  `sgvu_courses` WHERE  `course_id` ='$GetList1[course]'");
								   $GetProgName1=mysql_fetch_assoc($GetProgName);
								   echo $GetProgName1['coursename'];
								   ?></td>
								<td><?php echo $GetList1['email']; ?></td>
								<td><?php echo $GetList1['mobile']; ?></td>
								   <td class="center" align="center"><?php $ttk=$GetList1['time']; 
								   echo date('d-m-Y H:i', $ttk);
								    ?> 
								   </td>
								   <td class="center">
                                   
                                   <?php
								   if($GetList1['type'] =='1')
								   {
										echo 'Online Chat';  
								   }
								   if($GetList1['type'] =='2')
								   {
									   echo 'Walk-In';  
								   }
								   
									if($GetList1['type'] =='3')
								   {
									   echo 'Facebook Chat';  
								   }
								   if($GetList1['type'] =='4')
								   {
									   echo 'Telephonic';  
								   }
								   if($GetList1['type'] =='5')
								   {
									   echo 'Others';  
								   }
								   if($GetList1['type'] =='201')
								   {
									   echo 'Landing Page';  
								   }
								    if($GetList1['type'] =='202')
								   {
									   echo 'TARS';  
								   }
								    if($GetList1['type'] =='203')
								   {
									   echo 'Website';  
								   }
								   
							   
								   
								   ?>
                                   
                                   
                                   </td>
							   </tr>
							   <?php
							}
							   }
							   ?>
							   
							   
						
							
						</tbody>
					</table>
				</div>
				<div class="panel-footer"></div>
                <div style="padding:10px">
                
                <select name="user">
                <option value="">SELECT USER</option>
                <option value="28">Priyanka Banerji</option>
                <?php
				$GetUser=mysql_query("SELECT * FROM  `admin` WHERE  `role` ='203' ORDER BY  `admin`.`name` ASC");
				while($GetUser1=mysql_fetch_assoc($GetUser))
				{
				?>
                <option value="<?php echo $GetUser1['admin_id']; ?>"><?php echo $GetUser1['name']; ?></option>
                <?php
				}
				?>
                
                </select>&nbsp;&nbsp;<button class="btn-primary btn" type="submit">Allocate</button>
                
                
                </div>
                </form>
                
			</div>
		</div>
	</div>

</div>
                            </div> <!-- .container-fluid -->
                        </div>
						
						<script type="text/javascript" src="assets/js/jquery-1.10.2.min.js"></script> 							<!-- Load jQuery -->
<script type="text/javascript" src="assets/js/jqueryui-1.10.3.min.js"></script> 							<!-- Load jQueryUI -->
<script type="text/javascript" src="assets/js/bootstrap.min.js"></script> 								<!-- Load Bootstrap -->
<script type="text/javascript" src="assets/js/enquire.min.js"></script> 									<!-- Load Enquire -->

<script type="text/javascript" src="assets/plugins/velocityjs/velocity.min.js"></script>					<!-- Load Velocity for Animated Content -->
<script type="text/javascript" src="assets/plugins/velocityjs/velocity.ui.min.js"></script>

<script type="text/javascript" src="assets/plugins/wijets/wijets.js"></script>     						<!-- Wijet -->

<script type="text/javascript" src="assets/plugins/codeprettifier/prettify.js"></script> 				<!-- Code Prettifier  -->
<script type="text/javascript" src="assets/plugins/bootstrap-switch/bootstrap-switch.js"></script> 		<!-- Swith/Toggle Button -->

<script type="text/javascript" src="assets/plugins/bootstrap-tabdrop/js/bootstrap-tabdrop.js"></script>  <!-- Bootstrap Tabdrop -->

<script type="text/javascript" src="assets/plugins/iCheck/icheck.min.js"></script>     					<!-- iCheck -->

<script type="text/javascript" src="assets/plugins/nanoScroller/js/jquery.nanoscroller.min.js"></script> <!-- nano scroller -->

<script type="text/javascript" src="assets/js/application.js"></script>
<script type="text/javascript" src="assets/demo/demo.js"></script>
<script type="text/javascript" src="assets/demo/demo-switcher.js"></script>

<script type="text/javascript" src="assets/plugins/datatables/jquery.dataTables.js"></script>
<script type="text/javascript" src="assets/plugins/datatables/dataTables.bootstrap.js"></script>
<script type="text/javascript" src="assets/demo/demo-datatables.js"></script>
