<?php
session_start();
include 'actions/dbconnection.php';

$sql = "SELECT * FROM leads where sno=".$_GET['sno']." ";
$result = $conn->query($sql);
$arows = mysqli_num_rows($result);

$uno=time().rand(1,9);

$sql1 = "SELECT * FROM lead_comments where id=".$_GET['sno']." ORDER BY time DESC ";
$result1 = $conn->query($sql1);

?>

<!DOCTYPE html>
<html lang="en">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="" />
    <meta name="keywords" content="" />
	<title>Wisibles</title>
<!--    <link rel="icon" href="images/fav.html" type="image/png" sizes="16x16"> -->
    
    <link rel="stylesheet" href="css/main.min.css">
    <link rel="stylesheet" href="css/style.css">
    <link rel="stylesheet" href="css/color.css">
    <link rel="stylesheet" href="css/responsive.css">
	<link href="plugins/apex/apexcharts.css" rel="stylesheet" type="text/css">

</head>
<body>
<div class="page-loader" id="page-loader">
	 <div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div>
	 <span>Loading...</span>
</div><!-- page loader -->
<div class="theme-layout">
	
	<?php include 'header.php'; ?>
	<div class="top-sub-bar">
		<div class="container-fluid">
			<div class="row">
				<div class="col-lg-6 col-md-6 col-sm-6">
					<div class="menu-btn">
						<i class="">
<svg id="menu-btn" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu"><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line></svg></i>
					</div>
					<div class="page-title">
						<h4>Lead Management</h4>
					</div>
				</div>
				<div class="col-lg-6 col-md-6 col-sm-6">
					<ul class="breadcrumb">
						<li><a href="#" title="">Home</a></li>
						<li><a href="#" title="">Lead Management</a></li>
					</ul>
				</div>
			</div>
		</div>	
	</div><!-- top sub bar -->
	<?php include 'left_menu.php'; ?>
	

	<div class="container-fluid">
		<div class="row">
			<div class="col-lg-12">
				<div class="panel-content">
					<h4 class="main-title"></h4>
					<?php
		   
						$count=0;
							while($row = $result->fetch_assoc())
							{   
						$time = $row['time']; 
							$time = strtotime($time);
                    ?>	
						
						<div class="row merged20 mb-4">
						
                            
							
							
								
										<div class="streamline ">
											
											
												<div class="panel-content1 ">
												
													
														
														<div class="main-wraper1 ">
															<div class="tab-content" id="components-nav">
																<!-- settings -->
																<div class="tab-pane active fade show" id="account">
																	<div class="uk-width">
																		<div class="setting-card">
																			
																			<h4>Lead information</h4>
																			
																			<form style="padding-top:20px;">
																					<fieldset class="row merged-10">
																					<div class="mb-4 col-lg-5">

																						<p><span><b>Date </b>: <?php echo $row['date']?></span></p>
																						<p><span><b>School Name</b>: <?php echo $row['school_name']?></span></p>
																						<p><span><b>Name</b>: <?php echo $row['name']?></span></p>
																						<p><span><b>Mobile</b> : <?php echo $row['mobile']?></span></p>
																						<p><span><b>Email </b>: <?php echo $row['email']?></span></p>
																						<p><span><b>Sales Person Name</b>: <?php echo $row['s_person']?></span></p>

																						<p><span><b>Lead Source</b>: <?php echo $row['lead_source']?></span></p>
																						<p><span><b>State</b> : <?php echo $row['state']?></span></p>
																						<p><span><b>District </b>: <?php echo $row['district']?></span></p>
																						<p><span><b>School Type</b>: <?php echo $row['school_type']?></span></p>
																						<p><span><b>Establishment Year </b>: <?php echo $row['establishment_year']?></span></p>
																						<p><span><b>School Address</b> : <?php echo $row['school_address']?></span></p>

																						<p><span><b>Board of Affiliation</b>: <?php echo $row['affiliation']?></span></p>
																						<p><span><b>UDISE Code</b>: <?php echo $row['udise']?></span></p>
																						<p><span><b>No of Students</b>: <?php echo $row['students']?></span></p>
																						<p><span><b>Potential WSU</b> : <?php echo $row['potential']?></span></p>

																					</div>
																					
																					<div class="mb-4 col-lg-5">
																						<p><span><b>Lead Status</b>: <?php echo $row['lead_status']?></span></p>
																						<p><span><b>Products Signed</b>: <?php echo $row['products_signed']?></span></p>

																						<p><span><b>Total Signed WSU</b>: <?php echo $row['total_signed']?></span></p>
																						<p><span><b>Remark</b> : <?php echo $row['remark']?></span></p>
																						<p><span><b>Sign-Up Payment Date</b>: <?php echo $row['payment_date']?></span></p>
																						<p><span><b>Sign-Up Amount</b>: <?php echo $row['signup_amount']?></span></p>
																						<p><span><b>Mode of Payment</b>: <?php echo $row['payment_mode']?></span></p>
																						<p><span><b>Payment ID</b> : <?php echo $row['payment_id']?></span></p>

																						<p><span><b>Payment Remark</b>: <?php echo $row['payment_remark']?></span></p>
																						<p><span><b>Drop School WSU</b>: <?php echo $row['school_wsu']?></span></p>
																						<p><span><b>One Time Implementation Fees</b>: <?php echo $row['implementation_fees']?></span></p>
																						<p><span><b>One Time Customisation Fees</b> : <?php echo $row['customisation_fees']?></span></p>
																						<p><span><b>Subscription Fees (PSPY)</b>: <?php echo $row['subscription_fees']?></span></p>
																						<p><span><b>GST (included/excluded)</b>: <?php echo $row['gst']?></span></p>
																						<p><span><b>Training Fees (Per session)</b>: <?php echo $row['training_fees']?></span></p>
																						<?php
					
																						    $count=0;
																								if($row1 = $result1->fetch_assoc())
																							{   
																						?>	
																						<p><span><b>Comments</b>: <?php echo $row1['comment']?></span></p>
																						<?php } else{ ?>
																							<p><span><b>Comments</b>:</span></p>

																					    <?php } ?>	
																					</div>
																					</fieldset>
																			</form>
																		</div>
																	</div>
																</div>
																
															</div>
														</div>
														
												</div>
											

										
										</div>	
									
								
							
					    </div>
                    <?php } ?>	
				</div>
			</div>
		</div>
	</div>
	
	<!-- side slide message & popup -->
</div>
	
	<script src="js/main.min.js"></script>
	<script src="js/vivus.min.js"></script>
	<script src="js/script.js"></script>
	
	<script src="plugins/apex/apexcharts.min.js"></script>
	<script src="js/graphs-scripts.js"></script>

	

</body>	

</html>