<?php
$ChkNewFroms = mysql_query("SELECT * FROM `student_registration` WHERE `step` ='8' AND sesion='$ses'");

?>

<div class="page-content">
                            <ol class="breadcrumb">
                                
<li class=""><a href="index.html">Home</a></li>
<li class="active"><a href="index.html">Dashboard</a></li>
                            </ol>
                            <div class="container-fluid">
                                

<div class="row">
	<div class="col-md-3">
		<div class="info-tile tile-orange">
			<div class="tile-icon"><i class="ti ti-user"></i></div>
			<div class="tile-heading"><span>Total Forms on Desk</span></div>
			<div class="tile-body"><span><?php echo mysql_num_rows($ChkNewFroms); ?></span></div>
			<div class="tile-footer"></div>
		</div>
	</div>
	<div class="col-md-3">
		<div class="info-tile tile-success">
			<div class="tile-icon"><i class="ti ti-user"></i></div>
			<div class="tile-heading"><span>Forms on Senior Desk</span></div>
			<div class="tile-body"><span>
			<?php
			$GetDDDeskCount=mysql_query("SELECT * FROM `student_registration` WHERE `step` = '7' AND sesion='$ses'");
			echo mysql_num_rows($GetDDDeskCount);
			
			?>
			
			</span></div>
			<div class="tile-footer"></div>
		</div>
	</div>
	<div class="col-md-3">
		<div class="info-tile tile-info">
			<div class="tile-icon"><i class="ti ti-user"></i></div>
			<div class="tile-heading"><span>Forms on Verifier Desk</span></div>
			<div class="tile-body"><span>
			<?php
			$GetSeniorDeskCount=mysql_query("SELECT * FROM `student_registration` WHERE `step` = '9'  AND sesion='$ses'");
			echo mysql_num_rows($GetSeniorDeskCount);
			
			?>
			</span></div>
			<div class="tile-footer"></div>
		</div>
	</div>
	<div class="col-md-3">
		<div class="info-tile tile-danger">
			<div class="tile-icon"><i class="ti ti-user"></i></div>
			<div class="tile-heading"><span>Total SID</span></div>
			<div class="tile-body"><span>
			<?php
			$GetTotReg=mysql_query("SELECT * FROM `student_registration` WHERE sesion='$ses'");
			echo mysql_num_rows($GetTotReg);
			?>
			</span></div>
			<div class="tile-footer"></div>
		</div>
	</div>
</div>

<div data-widget-group="group1">
	


	


	<div class="row">
		
		<div class="col-md-6">
			<div class="panel panel-info" data-widget='{"draggable": "false"}'>
				<div class="panel-heading">
					<h2>Job Desk</h2>
					<div class="panel-ctrls button-icon-bg" 
						data-actions-container="" 
						data-action-collapse='{"target": ".panel-body"}'
						data-action-colorpicker=''
						data-action-refresh-demo='{"type": "circular"}'
						>					</div>
				</div>
				<div class="panel-body no-padding">
					<table class="table table-striped" style="">
						<tbody>
							<tr>
								<td style="width:20px"><b>S.No.</b></td>
								<td><b>Name</b></td>
								<td><b>Reg. Date</b></td>
								<td>
								<b>Action</b>
								                            </td>
							</tr>
							<?php
							$GetList = mysql_query("SELECT * FROM `student_registration` WHERE `step` = '6' AND `status` = '0' AND sesion='$ses' ORDER BY `student_registration`.`master_id` DESC LIMIT 0, 5");
							while($GetList1 = mysql_fetch_assoc($GetList))
							{
							 $s1 =$_REQUEST['v1'];

$u1 = $s1+0;
							
							?>
							
							<tr>
								<td align="center"><?php echo $_REQUEST['v1'] = $u1+1; ?>.</td>
								<td><?php echo $GetList1['student_name']; ?></td>
								<td width="120"><?php $tk=$GetList1['time']; 
											echo date('d-m-Y', $tk);
								?></td>
								<td width="100">
								<a>View</a>
								                            </td>
							</tr>
							<?php
							}
							?>
						</tbody>
					</table>
					<?php 
					$GetList2=mysql_num_rows($GetList);
					if($GetList2=='0')
					{
					echo '					<div align="center"><h4><b>Data Not Found</b></h4></div>
';					
					}
					?>
				</div>
			</div>
		</div><div class="col-md-6">
			<div class="panel panel-gray" data-widget='{"draggable": "false"}'>
				<div class="panel-heading">
					<h2>Top 5 Course</h2>
					<div class="panel-ctrls button-icon-bg" 
						data-actions-container="" 
						data-action-collapse='{"target": ".panel-body"}'
						data-action-colorpicker=''
						data-action-refresh-demo='{"type": "circular"}'
						>					</div>
				</div>
				<div class="panel-body no-padding">
					<table class="table table-striped" style="">
						<tbody>
							<tr>
								<td style="width:20px"><b>S.No.</b></td>
								<td><b>Course Name</b></td>
								<td>
								<b>Count</b>								                            </td>
							</tr>
							<?php
							$GetTopCourse = mysql_query("SELECT branch, sesion, count(*) as 'Cnt' FROM student_registration WHERE sesion='$ses' GROUP BY branch ORDER BY `Cnt` DESC LIMIT 0, 5");
							while($GetTopCourse1 = mysql_fetch_assoc($GetTopCourse))
							{
							 $s =$_REQUEST['v'];

$u = $s+0;
							
							?>
							
							<tr>
								<td align="center"><?php echo $_REQUEST['v'] = $u+1; ?>.</td>
								<td><?php 
								$GetTopCoName=mysql_query("SELECT * FROM `sgvu_courses` WHERE `course_id` = '$GetTopCourse1[branch]'");
								$GetTopCoName1=mysql_fetch_assoc($GetTopCoName);
								echo $GetTopCoName1['coursename'];
								 ?></td>
								<td width="50" align="center">
								<?php echo $GetTopCourse1['Cnt']; ?>								                            </td>
							</tr>
							<?php
							}
							?>
						</tbody>
					</table>
				</div>
			</div>
		</div>
	</div>
	<div class="row">
		
	<div class="col-md-6">
			<div class="panel panel-teal" data-widget='{"draggable": "false"}'>
				<div class="panel-heading">
					<h2>Forms Report</h2>
					<div class="panel-ctrls button-icon-bg" 
						data-actions-container="" 
						data-action-collapse='{"target": ".panel-body"}'
						data-action-colorpicker=''
						data-action-refresh-demo='{"type": "circular"}'
						>					</div>
				</div>
				<div class="panel-body no-padding">
					<table class="table table-striped" style="">
						<tbody>
							<tr>
								<td><b>Total Cleared</b></td>
								<td>
								<?php
								$GetTotClr=mysql_query("SELECT * FROM `sgvu_form_action` WHERE `status` = 1 AND `admin_id` ='$admin_id' AND `session` ='$ses'");
								
								
								?>
								<b><?php echo mysql_num_rows($GetTotClr); ?></b>								                            </td>
							</tr>
							<tr>
								<td><b>Total Pending</b></td>
								<td>
								<b><?php
								$GetTotPen=mysql_query("SELECT * FROM `sgvu_form_action` WHERE `status` = 2 AND `admin_id` ='$admin_id' AND `session` ='$ses'");
								echo mysql_num_rows($GetTotPen);
								?></b>								                            </td>
							</tr>
							<tr>
								<td><b>Total Rejected</b></td>
								<td>
								<b><?php
								$GetTotPen=mysql_query("SELECT * FROM `sgvu_form_action` WHERE `status` = 3 AND `admin_id` ='$admin_id' AND `session` ='$ses'");
								echo mysql_num_rows($GetTotPen);
								?></b>								                            </td>
							</tr>
							<tr>
								<td><b>Total Spam</b></td>
								<td>
								<b><?php
								$GetTotPen=mysql_query("SELECT * FROM `sgvu_form_action` WHERE `status` = 4 AND `admin_id` ='$admin_id' AND `session` ='$ses'");
								echo mysql_num_rows($GetTotPen);
								?></b>								                            </td>
							</tr>
						
						</tbody>
					</table>
				</div>
			</div>
		</div>
		<div class="col-md-6">
			<div class="panel panel-bluegray" data-widget='{"draggable": "false"}'>
				<div class="panel-heading">
					<h2>Top 5 State</h2>
					<div class="panel-ctrls button-icon-bg" 
						data-actions-container="" 
						data-action-collapse='{"target": ".panel-body"}'
						data-action-colorpicker=''
						data-action-refresh-demo='{"type": "circular"}'
						>					</div>
				</div>
				<div class="panel-body no-padding">
					<table class="table table-striped" style="">
						<tbody>
							<tr>
								<td style="width:20px"><b>S.No.</b></td>
								<td><b>State</b></td>
								<td>
								<b>Count</b>								                            </td>
							</tr>
							<?php
							$GetTopState = mysql_query("SELECT step1_contact.state, step1_contact.sid, student_registration.sid, student_registration.sesion, step1_contact.state, count(*) as 'cnt' FROM step1_contact INNER JOIN student_registration ON step1_contact.sid=student_registration.sid AND student_registration.sesion='$ses' GROUP BY state ORDER BY `cnt` DESC LIMIT 0, 5");
							while($GetTopState1 = mysql_fetch_assoc($GetTopState))
							
							{
							 $s2 =$_REQUEST['v2'];

$u2 = $s2+0;
							
							?>
							
							<tr>
								<td align="center"><?php echo $_REQUEST['v2'] = $u2+1; ?>.</td>
								<td>
								<?php 
								$GetState = mysql_query("SELECT * FROM `state` WHERE `ids` = '$GetTopState1[state]'");
								$GetState1 = mysql_fetch_assoc($GetState);
								echo $GetState1['state'];
								?>
								 </td>
								<td width="100" align="">
								<?php echo $GetTopState1['cnt']; ?>								                            </td>
							</tr>
							<?php
							}
							?>
						</tbody>
					</table>
				</div>
			</div>
		</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>

<!-- End loading site level scripts -->
    
    <!-- Load page level scripts-->
    
<!-- Charts -->
<script type="text/javascript" src="assets/plugins/charts-flot/jquery.flot.min.js"></script>             	<!-- Flot Main File -->
<script type="text/javascript" src="assets/plugins/charts-flot/jquery.flot.pie.min.js"></script>             <!-- Flot Pie Chart Plugin -->
<script type="text/javascript" src="assets/plugins/charts-flot/jquery.flot.stack.min.js"></script>       	<!-- Flot Stacked Charts Plugin -->
<script type="text/javascript" src="assets/plugins/charts-flot/jquery.flot.orderBars.min.js"></script>   	<!-- Flot Ordered Bars Plugin-->
<script type="text/javascript" src="assets/plugins/charts-flot/jquery.flot.resize.min.js"></script>          <!-- Flot Responsive -->
<script type="text/javascript" src="assets/plugins/charts-flot/jquery.flot.tooltip.min.js"></script> 		<!-- Flot Tooltips -->
<script type="text/javascript" src="assets/plugins/charts-flot/jquery.flot.spline.js"></script> 				<!-- Flot Curved Lines -->

<script type="text/javascript" src="assets/plugins/sparklines/jquery.sparklines.min.js"></script> 			 <!-- Sparkline -->

<script type="text/javascript" src="assets/plugins/jvectormap/jquery-jvectormap-2.0.2.min.js"></script>       <!-- jVectorMap -->
<script type="text/javascript" src="assets/plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script>   <!-- jVectorMap -->

<script type="text/javascript" src="assets/plugins/switchery/switchery.js"></script>     					<!-- Switchery -->
<script type="text/javascript" src="assets/plugins/easypiechart/jquery.easypiechart.js"></script>
<script type="text/javascript" src="assets/plugins/fullcalendar/moment.min.js"></script> 		 			<!-- Moment.js Dependency -->
<script type="text/javascript" src="assets/plugins/fullcalendar/fullcalendar.min.js"></script>   			<!-- Calendar Plugin -->

<script type="text/javascript" src="assets/demo/demo-index.js"></script> 									<!-- Initialize scripts for this page-->

						