<?php  
session_start(); 
	include("connect.php");
	if(!isset($_SESSION['tulsilogin']))
	{
		header('Location: index.php');
		return;
	}
	
	if(isset($_POST['cnmid']))
	{
		  $_SESSION['cnmid']=$_POST['cnmid'];
		   $cnmid3=$_POST['cnmid'];
		 // echo "Hii";
	}
	
	if(isset($_POST['countrymid']))
	{
		  $_SESSION['ccountrymid']=$_POST['countrymid'];
		  $countrymid5 =$_POST['countrymid'];
	}
	if(isset($_POST['collegetypemid']))
	{
		  $_SESSION['collegetypemid']=$_POST['collegetypemid'];
		  $collegetypemid =$_POST['collegetypemid'];
	}
	if(isset($_POST['cintakestart']))
	{
		  $_SESSION['cintakestart']=$_POST['cintakestart'];
		  $cintakestart =$_POST['cintakestart'];
	}
	if(isset($_POST['cprogramavailibilty']))
	{
		  $_SESSION['cprogramavailibilty']=$_POST['cprogramavailibilty'];
		  $cprogramavailibilty =$_POST['cprogramavailibilty'];
	}
	if(isset($_POST['cbacklogaccepted']))
	{
		  $_SESSION['cbacklogaccepted']=$_POST['cbacklogaccepted'];
		  $cbacklogaccepted =$_POST['cbacklogaccepted'];
	}
	if(isset($_POST['cprogramlength']))
	{
		  $_SESSION['cprogramlength']=$_POST['cprogramlength'];
		  $cprogramlength =$_POST['cprogramlength'];
	}
	if(isset($_POST['collegemid']))
	{
		  $_SESSION['collegemid']=$_POST['collegemid'];
		  $collegemid =$_POST['collegemid'];
	}
	if(isset($_POST['campusmid']))
	{
		  $_SESSION['campusmid']=$_POST['campusmid'];
		  $campusmid =$_POST['campusmid'];
	}
	if(isset($_POST['ctutionfees']))
	{
		  $_SESSION['ctutionfees']=$_POST['ctutionfees'];
		  $ctutionfees =$_POST['ctutionfees'];
	}if(isset($_POST['ctermyear']))
	{
		  $_SESSION['ctermyear']=$_POST['ctermyear'];
		  $ctermyear =$_POST['ctermyear'];
	}
	if(isset($_POST['capplicationfee']))
	{
		  $_SESSION['capplicationfee']=$_POST['capplicationfee'];
		  $capplicationfee =$_POST['capplicationfee'];
	}
	
	if(isset($_POST['clangeligibility']))
	{
		  $_SESSION['clangeligibility']=$_POST['clangeligibility'];
		  $clangeligibility =$_POST['clangeligibility'];
	}
	
	if(isset($_POST['clangscore']))
	{
		  $_SESSION['clangscore']=$_POST['clangscore'];
		  $clangscore =$_POST['clangscore'];
	}
	if(isset($_POST['clangeligibility1']))
	{
		  $_SESSION['clangeligibility1']=$_POST['clangeligibility1'];
		  $clangeligibility1 =$_POST['clangeligibility1'];
	}
	
	if(isset($_POST['clangscore1']))
	{
		  $_SESSION['clangscore1']=$_POST['clangscore1'];
		  $clangscore1 =$_POST['clangscore1'];
	}
	
	if(isset($_POST['export']))
	{
	
	echo $selected_ids = $_POST['coursemid'];

// Connect to database and retrieve selected data
// ...

// Generate HTML table with only selected data
$html = '<table id="export1">';
$html .= '<thead>';
$html .= '<tr>';
$html .= '<th>Course Name</th>';
$html .= '<th>Credentials</th>';
$html .= '<th>College</th>';
$html .= '<th>Country</th>';
$html .= '<th>Duration</th>';
$html .= '<th>Fees</th>';
$html .= '<th>Eligibility</th>';
$html .= '<th>Facility</th>';
$html .= '<th>Documents</th>';
$html .= '<th>Remarks</th>';
$html .= '<th>Other</th>';

$html .= '</tr>';
$html .= '</thead>';
$html .= '<tbody>';


foreach ($selected_ids as $coursemids) {
	
	
	$empQuery = "select * from res_course_master,res_college_master where res_course_master.collegemid = res_college_master.collegemid and res_course_master.collegemid = res_college_master.collegemid and res_course_master.coursemid = $coursemids";
//$empQuery = "select * from res_inquiry_master WHERE 1 ";
$empRecords = mysqli_query($conn, $empQuery);
while ($rt = mysqli_fetch_assoc($empRecords)) {
	
	
	$coursemid=$rt['coursemid'];
				
				
				$collegemid=$rt['collegemid'];
				$losmid=$rt['levelofstudy'];
				$countrymid=$rt['countrymid'];
				$cnmid=$rt['cnmid'];
				
				$cmpbroucher=$rt['cmpbroucher'];
				$cmcoursebroucher=$rt['cmcoursebroucher'];
				$cmdesc=str_replace ("'","'",$rt['cmdesc']);
				$cmdesc=str_replace ('"','\"',$cmdesc);
				
				$cmduration=str_replace ("'","\'",$rt['cmduration']);
				$cmduration=str_replace ('"','\"',$cmduration);
				
				$cmfees=str_replace ("'","\'",$rt['cmfees']);
				$cmfees=str_replace ('"','\"',$cmfees);
				
				$cmdocument=str_replace ("'","\'",$rt['cmdocument']);
				$cmdocument=str_replace ('"','\"',$cmdocument);
				
				$cmeligibility=str_replace ("'","\'",$rt['cmeligibility']);
				$cmeligibility=str_replace ('"','\"',$cmeligibility);
				
				$cmfacility=str_replace ("'","\'",$rt['cmfacility']);
				$cmfacility=str_replace ('"','\"',$cmfacility);
				
				$cmremarks=str_replace ("'","\'",$rt['cmremarks']);
				$cmremarks=str_replace ('"','\"',$cmremarks);
				
				$cmother=str_replace ("'","\'",$rt['cmother']);
				$cmother=str_replace ('"','\"',$cmother);
				
				
					
						$cmname=$rt['cmname'];
						$cmpbroucher=$rt['cmpbroucher'];
						if($cmpbroucher==""){
							$cmpbroucher1="";
							}
						else{
						$cmpbroucher1="<a target='_blank' href='./docs/$cmpbroucher'>download</a>";
						}
						$cmcoursebroucher=$rt['cmcoursebroucher'];
						if($cmcoursebroucher==""){
							$cmcoursebroucher1="";
							}
						else{
						$cmcoursebroucher1="<a target='_blank' href='./docs/$cmcoursebroucher'>download</a>";
						}
						
						
					
					
					$countryname="";
					$eve5= "select * from   res_country_master where countrymid=$countrymid";
					$re5 = mysqli_query($conn, $eve5);
					 while($rt5 = mysqli_fetch_assoc($re5))
					{
			
						//$losmid=$rt4['losmid'];
						$countryname=$rt5['countryname'];
						
					}
					$coursename="";
					$eve55= "select * from   res_coursename_master where cnmid=$cnmid";
					$re55 = mysqli_query($conn, $eve55);
					 while($rt55 = mysqli_fetch_assoc($re55))
					{
			
						
						$coursename=$rt55['coursename'];
						
					}
					$levelofstudy="";
					$eve55= "select * from   res_levelofstudy_master where losmid=$losmid";
					$re55 = mysqli_query($conn, $eve55);
					 while($rt55 = mysqli_fetch_assoc($re55))
					{
			
						$losmid=$rt55['losmid'];
						$levelofstudy=$rt55['levelofstudy'];
						
					}
}
					
				
  $html .= '<tr>';
  $html .= '<td>' . $coursename . '</td>';
  $html .= '<td>' . $levelofstudy . '</td>';
  $html .= '<td>' . $cmname . '</td>';
  $html .= '<td>' . $countryname . '</td>';
  $html .= '<td>' . $cmduration . '</td>';
  $html .= '<td>' . $cmfees . '</td>';
  $html .= '<td>' . $cmeligibility . '</td>';
  $html .= '<td>' . $cmfacility . '</td>';
  $html .= '<td>' . $cmdocument . '</td>';
  $html .= '<td>' . $cmremarks . '</td>';
  $html .= '<td>' . $cmother . '</td>';
  $html .= '</tr>';
}

$html .= '</tbody>';
$html .= '</table>';

echo $html;
}
	?>
<!DOCTYPE html>
<!--
Author: Keenthemes
Product Name: Metronic - Bootstrap 5 HTML, VueJS, React, Angular. Laravel, Asp.Net Core, Ruby on Rails, Spring Boot, Blazor, Django, Express Node.js & Flask Admin Dashboard Theme
Purchase: https://1.envato.market/EA4JP
Website: http://www.keenthemes.com
Contact: support@keenthemes.com
Follow: www.twitter.com/keenthemes
Dribbble: www.dribbble.com/keenthemes
Like: www.facebook.com/keenthemes
License: For each use you must have a valid license purchased only from above link in order to legally use the theme for your project.
-->
<html lang="en">
	<!--begin::Head-->
	<head>
		<title>Course Finder</title>
		<meta charset="utf-8" />
		<meta name="description" content="The most advanced Bootstrap Admin Theme on Themeforest trusted by 100,000 beginners and professionals. Multi-demo, Dark Mode, RTL support and complete React, Angular, Vue, Asp.Net Core, Rails, Spring, Blazor, Django, Flask & Laravel versions. Grab your copy now and get life-time updates for free." />
		<meta name="keywords" content="metronic, bootstrap, bootstrap 5, angular, VueJs, React, Asp.Net Core, Rails, Spring, Blazor, Django, Flask & Laravel starter kits, admin themes, web design, figma, web development, free templates, free admin themes, bootstrap theme, bootstrap template, bootstrap dashboard, bootstrap dak mode, bootstrap button, bootstrap datepicker, bootstrap timepicker, fullcalendar, datatables, flaticon" />
		<meta name="viewport" content="width=device-width, initial-scale=1" />
		<meta property="og:locale" content="en_US" />
		<meta property="og:type" content="article" />
		<meta property="og:title" content="Metronic - Bootstrap 5 HTML, VueJS, React, Angular. Laravel, Asp.Net Core, Ruby on Rails, Spring Boot, Blazor, Django, Express Node.js & Flask Admin Dashboard Theme" />
		<meta property="og:url" content="https://keenthemes.com/metronic" />
		<meta property="og:site_name" content="Keenthemes | Metronic" />
		<link rel="canonical" href="https://preview.keenthemes.com/metronic8" />
		<link rel="shortcut icon" href="assets/media/logos/favicon.ico" />
		<!--begin::Fonts(mandatory for all pages)-->
		<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Inter:300,400,500,600,700" />
		<!--end::Fonts-->
		<!--begin::Vendor Stylesheets(used for this page only)-->
		<link href="assets/plugins/custom/datatables/datatables.bundle.css" rel="stylesheet" type="text/css" />
		<!--end::Vendor Stylesheets-->
		<!--begin::Global Stylesheets Bundle(mandatory for all pages)-->
		<link href="assets/plugins/global/plugins.bundle.css" rel="stylesheet" type="text/css" />
		<link href="assets/css/style.bundle.css" rel="stylesheet" type="text/css" />
		 <link href='DataTables/datatables.min.css' rel='stylesheet' type='text/css'>
		<!--end::Global Stylesheets Bundle-->
	</head>
	<!--end::Head-->
	<!--begin::Body-->
	<body id="kt_body" class="header-fixed header-tablet-and-mobile-fixed aside-fixed aside-secondary-disabled">
		<!--begin::Theme mode setup on page load-->
		<script>var defaultThemeMode = "light"; var themeMode; if ( document.documentElement ) { if ( document.documentElement.hasAttribute("data-theme-mode")) { themeMode = document.documentElement.getAttribute("data-theme-mode"); } else { if ( localStorage.getItem("data-theme") !== null ) { themeMode = localStorage.getItem("data-theme"); } else { themeMode = defaultThemeMode; } } if (themeMode === "system") { themeMode = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"; } document.documentElement.setAttribute("data-theme", themeMode); }</script>
		<!--end::Theme mode setup on page load-->
		<!--begin::Main-->
		<!--begin::Root-->
		<div class="d-flex flex-column flex-root">
			<!--begin::Page-->
			<div class="page d-flex flex-row flex-column-fluid">
				<!--begin::Aside-->
				<?php include('sidebar.php'); ?>
				<!--end::Aside-->
				<!--begin::Wrapper-->
				<div class="wrapper d-flex flex-column flex-row-fluid" id="kt_wrapper">
					<!--begin::Header-->
					<div id="kt_header" style="" class="header align-items-stretch">
						<!--begin::Container-->
						<div class="container-fluid d-flex align-items-stretch justify-content-between">
							<!--begin::Aside mobile toggle-->
							<div class="d-flex align-items-center d-lg-none ms-n3 me-1" title="Show aside menu">
								<div class="btn btn-icon btn-active-color-primary w-40px h-40px" id="kt_aside_toggle">
									<!--begin::Svg Icon | path: icons/duotune/abstract/abs015.svg-->
									<span class="svg-icon svg-icon-1">
										<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
											<path d="M21 7H3C2.4 7 2 6.6 2 6V4C2 3.4 2.4 3 3 3H21C21.6 3 22 3.4 22 4V6C22 6.6 21.6 7 21 7Z" fill="currentColor" />
											<path opacity="0.3" d="M21 14H3C2.4 14 2 13.6 2 13V11C2 10.4 2.4 10 3 10H21C21.6 10 22 10.4 22 11V13C22 13.6 21.6 14 21 14ZM22 20V18C22 17.4 21.6 17 21 17H3C2.4 17 2 17.4 2 18V20C2 20.6 2.4 21 3 21H21C21.6 21 22 20.6 22 20Z" fill="currentColor" />
										</svg>
									</span>
									<!--end::Svg Icon-->
								</div>
							</div>
							<!--end::Aside mobile toggle-->
							<!--begin::Mobile logo-->
							<div class="d-flex align-items-center flex-grow-1 flex-lg-grow-0">
								<a href="../../demo4/dist/index.html" class="d-lg-none">
									<img alt="Logo" src="assets/media/logos/demo4-mobile.svg" class="h-25px" />
								</a>
							</div>
							<!--end::Mobile logo-->
							<div class="d-flex align-items-center" id="kt_header_wrapper">
								<!--begin::Page title-->
								<div class="page-title d-flex flex-column align-items-start justify-content-center flex-wrap me-lg-20 pb-5 pb-lg-0" data-kt-swapper="true" data-kt-swapper-mode="prepend" data-kt-swapper-parent="{default: '#kt_content_container', lg: '#kt_header_wrapper'}">
									<!--begin::Heading-->
									<h1 class="text-dark fw-bold my-1 fs-3 lh-1">Course Finder</h1>
									<!--end::Heading-->
									<!--begin::Breadcrumb-->
									<ul class="breadcrumb fw-semibold fs-8 my-1">
										<li class="breadcrumb-item text-muted">
											<a href="dashboard.php" class="text-muted">Home</a>
										</li>
										
										<li class="breadcrumb-item text-muted">Course Finder</li>
									</ul>
									<!--end::Breadcrumb-->
								</div>
								<!--end::Page title=-->
							</div>
							<!--begin::Wrapper-->
							<?php include('header.php'); ?>
							<!--end::Wrapper-->
						</div>
						<!--end::Container-->
					</div>
					<!--end::Header-->
					<!--begin::Content-->
					<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
						<!--begin::Container-->
						<div class="container-xxl" id="kt_content_container">
							<!--begin::Card-->
							<div class="card">
								<!--begin::Card header-->
								<div class="card-header border-0 pt-6">
									<!--begin::Card title-->
									<div class="card-title">
										<!--begin::Search-->
										<!--end::Search-->
									</div>
									<!--begin::Card title-->
									<!--begin::Card toolbar-->
									<form method="POST" action="leadcourse.php" >
									<div class="card-toolbar flex-row-fluid  gap-5">
									
									<div class="input-group w-350px ">
										
														<label class="form-label fs-6 fw-semibold">Country:</label>
														<select class="form-select form-select-solid fw-bold" data-kt-select2="true" data-placeholder="Select option" data-allow-clear="true" data-kt-user-table-filter="role"  name="countrymid" id="countrymid">
															
															<?php

													include("connect.php");
													$eve_category = "select * from res_country_master";
													$re_category = mysqli_query($conn, $eve_category);
																									
															while($rt_category = mysqli_fetch_assoc($re_category))
															{
																if(isset($_POST['countrymid']) && $rt_category['countrymid'] == $_POST['countrymid']){
																echo "<option value='$rt_category[countrymid]' selected>$rt_category[countryname]</option>";
																}
																else{
																echo "<option value='$rt_category[countrymid]'>$rt_category[countryname]</option>";
																	}
															}		
														?>	
														</select>
													
										</div>
									<div class="input-group w-350px">
										
														<label class="form-label fs-6 fw-semibold">Program</label>
														<select class="form-select form-select-solid fw-bold" data-kt-select2="true" data-placeholder="Select option" data-allow-clear="true" data-kt-user-table-filter="two-step"  name="cnmid" id="cnmid" >
															<option value="All" <?php if(isset($_POST['cnmid']) && $_POST['cnmid'] == 'All'){ echo 'selected';} ?>>All</option>
														</select>
													
										</div>
									<div class="input-group w-350px">
										
														<label class="form-label fs-6 fw-semibold">Intake Month</label>
														<select class="form-select form-select-solid fw-bold" data-kt-select2="true" data-placeholder="Select option" data-allow-clear="true" data-kt-user-table-filter="two-step" data-hide-search="true" name="cintakestart" >
															<option value="All" <?php if(isset($_POST['cintakestart']) && $_POST['cintakestart'] == 'All'){ echo 'selected';} ?>>All</option>
														<option value="January" <?php if(isset($_POST['cintakestart']) && $_POST['cintakestart'] == 'January'){ echo 'selected';} ?>>January</option>
																	<option value="February" <?php if(isset($_POST['cintakestart']) && $_POST['cintakestart'] == 'February'){ echo 'selected';} ?>>February</option>
																	<option value="March" <?php if(isset($_POST['cintakestart']) && $_POST['cintakestart'] == 'March'){ echo 'selected';} ?>>March</option>
																	<option value="April" <?php if(isset($_POST['cintakestart']) && $_POST['cintakestart'] == 'April'){ echo 'selected';} ?>>April</option>
																	<option value="May" <?php if(isset($_POST['cintakestart']) && $_POST['cintakestart'] == 'May'){ echo 'selected';} ?>>May</option>
																	<option value="June" <?php if(isset($_POST['cintakestart']) && $_POST['cintakestart'] == 'June'){ echo 'selected';} ?>>June</option>
																	<option value="July" <?php if(isset($_POST['cintakestart']) && $_POST['cintakestart'] == 'July'){ echo 'selected';} ?>>July</option>
																	<option value="August" <?php if(isset($_POST['cintakestart']) && $_POST['cintakestart'] == 'August'){ echo 'selected';} ?>>August</option>
																	<option value="September" <?php if(isset($_POST['cintakestart']) && $_POST['cintakestart'] == 'September'){ echo 'selected';} ?>>September</option>
																	<option value="October" <?php if(isset($_POST['cintakestart']) && $_POST['cintakestart'] == 'October'){ echo 'selected';} ?>>October</option>
																	<option value="November" <?php if(isset($_POST['cintakestart']) && $_POST['cintakestart'] == 'November'){ echo 'selected';} ?>>November</option>
																	<option value="December" <?php if(isset($_POST['cintakestart']) && $_POST['cintakestart'] == 'December'){ echo 'selected';} ?>>December</option>
														</select>
													
										</div>
									<div class="input-group w-350px">
										
														<label class="form-label fs-6 fw-semibold">Intake Year</label>
														<select class="form-select form-select-solid fw-bold" data-kt-select2="true" data-placeholder="Select option" data-allow-clear="true" data-kt-user-table-filter="two-step" data-hide-search="true" name="ctermyear" >
															<option value="All" <?php if(isset($_POST['ctermyear']) && $_POST['ctermyear'] == 'All'){ echo 'selected';} ?>>All</option>
															<?php
 $eve_category1 = "select ctermyear from res_courseintaketerm_detail group by ctermyear  ";
													$re_category1 = mysqli_query($conn, $eve_category1);														
															while($rt_category1 = mysqli_fetch_assoc($re_category1))
															{
																if(isset($_POST['ctermyear']) && $rt_category1['ctermyear'] == $_POST['ctermyear']){
																echo "<option value='$rt_category1[ctermyear]' selected>$rt_category1[ctermyear]</option>";
																}
																else{
																echo "<option value='$rt_category1[ctermyear]'>$rt_category1[ctermyear]</option>";
																	}
															}		
														?>
														</select>
													
										</div>
										<div class="input-group w-350px">
										
														<label class="form-label fs-6 fw-semibold">Program Length</label>
														<select class="form-select form-select-solid fw-bold" data-kt-select2="true" data-placeholder="Select option" data-allow-clear="true" data-kt-user-table-filter="two-step" data-hide-search="true" name="cprogramlength" >
															<option value="All" <?php if(isset($_POST['cprogramlength']) && "All" == $_POST['cprogramlength']){ echo 'selected';} ?>>All</option>
														<?php
 $eve_category1 = "select cprogramlength from res_course_master group by cprogramlength  ";
													$re_category1 = mysqli_query($conn, $eve_category1);														
															while($rt_category1 = mysqli_fetch_assoc($re_category1))
															{
																if(isset($_POST['cprogramlength']) && $rt_category1['cprogramlength'] == $_POST['cprogramlength']){
																echo "<option value='$rt_category1[cprogramlength]' selected>$rt_category1[cprogramlength]</option>";
																}
																else{
																echo "<option value='$rt_category1[cprogramlength]'>$rt_category1[cprogramlength]</option>";
																	}
															}		
														?>
														</select>
													
										</div>
										<div class="input-group w-350px">
										
														<label class="form-label fs-6 fw-semibold">Institute Type</label>
														<select class="form-select form-select-solid fw-bold" data-kt-select2="true" data-placeholder="Select option" data-allow-clear="true" data-kt-user-table-filter="two-step" data-hide-search="true" name="collegetypemid" id="collegetypemid">
															<option value="All" <?php if(isset($_POST['collegetypemid']) && "All" == $_POST['collegetypemid']){ echo 'selected';} ?>>All</option>
														<?php
 $eve_category1 = "select * from res_collegetype_master";
													$re_category1 = mysqli_query($conn, $eve_category1);														
															while($rt_category1 = mysqli_fetch_assoc($re_category1))
															{
																if(isset($_POST['collegetypemid']) && $_POST['collegetypemid'] == $rt_category1['collegetypemid']){
																echo "<option value='$rt_category1[collegetypemid]' selected>$rt_category1[collegetypename]</option>";
																}
																else{
																echo "<option value='$rt_category1[collegetypemid]'>$rt_category1[collegetypename]</option>";
																	}
															}		
														?>
														</select>
													
										</div>
										<div class="input-group w-350px">
										
														<label class="form-label fs-6 fw-semibold">Language Eligibility</label>
														<select class="form-select form-select-solid fw-bold" data-kt-select2="true" data-placeholder="Select option" data-allow-clear="true" data-kt-user-table-filter="two-step" data-hide-search="true" name="clangeligibility" id="clangeligibility">
															<option value="All" <?php if(isset($_POST['clangeligibility']) && "All" == $_POST['clangeligibility']){ echo 'selected';} ?>>All</option>
														<?php
 $eve_category1 = "select * from res_language_master";
													$re_category1 = mysqli_query($conn, $eve_category1);														
															while($rt_category1 = mysqli_fetch_assoc($re_category1))
															{
																if(isset($_POST['clangeligibility']) && $_POST['clangeligibility'] == $rt_category1['languagename']){
																echo "<option value='$rt_category1[languagename]' selected>$rt_category1[languagename]</option>";
																}
																else{
																echo "<option value='$rt_category1[languagename]'>$rt_category1[languagename]</option>";
																	}
															}		
														?>
														</select>
													
										</div>
										<div class="input-group w-350px">
										
														<label class="form-label fs-6 fw-semibold">Language Score </label>
														
														<select class="form-select form-select-solid fw-bold" data-kt-select2="true" data-placeholder="Select option" data-allow-clear="true" data-kt-user-table-filter="two-step" data-hide-search="true" name="clangscore" >
														<option value="All" <?php if(isset($_POST['clangscore']) && $_POST['clangscore'] == 'All'){ echo 'selected';} ?>>All</option>
														
																	<option value="9" <?php if(isset($_POST['clangscore']) && $_POST['clangscore'] == '9'){ echo 'selected';} ?>>9 above </option>
																	<option value="8" <?php if(isset($_POST['clangscore']) && $_POST['clangscore'] == '8'){ echo 'selected';} ?>>8 above</option>
																	<option value="7" <?php if(isset($_POST['clangscore']) && $_POST['clangscore'] == '7'){ echo 'selected';} ?>>7 above</option>
																	<option value="6" <?php if(isset($_POST['clangscore']) && $_POST['clangscore'] == '6'){ echo 'selected';} ?>>6 above</option>
																	<option value="5" <?php if(isset($_POST['clangscore']) && $_POST['clangscore'] == '5'){ echo 'selected';} ?>>5 above</option><option value="4" <?php if(isset($_POST['clangscore']) && $_POST['clangscore'] == '4'){ echo 'selected';} ?>>4 above</option>
																	</select>
													
										</div>
									
										<div class="input-group w-350px">
										
														<label class="form-label fs-6 fw-semibold">Aptitude Eligibility</label>
														<select class="form-select form-select-solid fw-bold" data-kt-select2="true" data-placeholder="Select option" data-allow-clear="true" data-kt-user-table-filter="two-step" data-hide-search="true" name="clangeligibility1" id="clangeligibility1">
															<option value="All" <?php if(isset($_POST['clangeligibility1']) && "All" == $_POST['clangeligibility1']){ echo 'selected';} ?>>All</option>
														<?php
 $eve_category1 = "select * from res_aptitude_master";
													$re_category1 = mysqli_query($conn, $eve_category1);														
															while($rt_category1 = mysqli_fetch_assoc($re_category1))
															{
																if(isset($_POST['clangeligibility1']) && $_POST['clangeligibility1'] == $rt_category1['aptitudename']){
																echo "<option value='$rt_category1[aptitudename]' selected>$rt_category1[aptitudename]</option>";
																}
																else{
																echo "<option value='$rt_category1[aptitudename]'>$rt_category1[aptitudename]</option>";
																	}
															}		
														?>
														</select>
													
										</div>
										<div class="input-group w-350px">
										
														<label class="form-label fs-6 fw-semibold">Aptitude Score </label>
														
														<select class="form-select form-select-solid fw-bold" data-kt-select2="true" data-placeholder="Select option" data-allow-clear="true" data-kt-user-table-filter="two-step" data-hide-search="true" name="clangscore1" >
														<option value="All" <?php if(isset($_POST['clangscore1']) && $_POST['clangscore1'] == 'All'){ echo 'selected';} ?>>All</option>
														
																	<option value="9" <?php if(isset($_POST['clangscore1']) && $_POST['clangscore1'] == '9'){ echo 'selected';} ?>>9 above </option>
																	<option value="8" <?php if(isset($_POST['clangscore1']) && $_POST['clangscore1'] == '8'){ echo 'selected';} ?>>8 above</option>
																	<option value="7" <?php if(isset($_POST['clangscore1']) && $_POST['clangscore1'] == '7'){ echo 'selected';} ?>>7 above</option>
																	<option value="6" <?php if(isset($_POST['clangscore1']) && $_POST['clangscore1'] == '6'){ echo 'selected';} ?>>6 above</option>
																	<option value="5" <?php if(isset($_POST['clangscore1']) && $_POST['clangscore1'] == '5'){ echo 'selected';} ?>>5 above</option><option value="4" <?php if(isset($_POST['clangscore1']) && $_POST['clangscore1'] == '4'){ echo 'selected';} ?>>4 above</option>
																	</select>
													
										</div>
									
										<div class="input-group w-350px">
										
														<label class="form-label fs-6 fw-semibold">Program Availability</label>
														<select class="form-select form-select-solid fw-bold" data-kt-select2="true" data-placeholder="Select option" data-allow-clear="true" data-kt-user-table-filter="two-step" data-hide-search="true" name="cprogramavailibilty" >
															<option value="All" <?php if(isset($_POST['cprogramavailibilty']) && $_POST['cprogramavailibilty'] == 'All'){ echo 'selected';} ?>>All</option>
														<option value="January" <?php if(isset($_POST['cprogramavailibilty']) && $_POST['cprogramavailibilty'] == 'Open'){ echo 'selected';} ?>> Open</option>
																	<option value="15000 - 20000" <?php if(isset($_POST['cprogramavailibilty']) && $_POST['cprogramavailibilty'] == 'Close'){ echo 'selected';} ?>>Close</option>
																	<option value="20000 - 25000" <?php if(isset($_POST['cprogramavailibilty']) && $_POST['cprogramavailibilty'] == 'Waitlisted'){ echo 'selected';} ?>>Waitlisted</option>
																	
																	
														</select>
													
										</div>
										<div class="input-group w-350px">
										
														<label class="form-label fs-6 fw-semibold">No of Backlogs</label>
														
														<select class="form-select form-select-solid fw-bold" data-kt-select2="true" data-placeholder="Select option" data-allow-clear="true" data-kt-user-table-filter="two-step" data-hide-search="true" name="cbacklogaccepted" >
														<option value="All" <?php if(isset($_POST['cbacklogaccepted']) && $_POST['cbacklogaccepted'] == 'All'){ echo 'selected';} ?>>All</option>
														
																	<option value="10" <?php if(isset($_POST['cbacklogaccepted']) && $_POST['cbacklogaccepted'] == '10'){ echo 'selected';} ?>>below 10</option>
																	<option value="20" <?php if(isset($_POST['cbacklogaccepted']) && $_POST['cbacklogaccepted'] == '20'){ echo 'selected';} ?>>below 20</option>
																	<option value="30" <?php if(isset($_POST['cbacklogaccepted']) && $_POST['cbacklogaccepted'] == '30'){ echo 'selected';} ?>>below 30</option>
																	<option value="40" <?php if(isset($_POST['cbacklogaccepted']) && $_POST['cbacklogaccepted'] == '40'){ echo 'selected';} ?>>below 40</option>
																	<option value="50" <?php if(isset($_POST['cbacklogaccepted']) && $_POST['cbacklogaccepted'] == '50'){ echo 'selected';} ?>>below 50</option>
																	</select>
													
										</div>
									<div class="input-group w-350px">
										
														<label class="form-label fs-6 fw-semibold">Tuition fees range</label>
														<select class="form-select form-select-solid fw-bold" data-kt-select2="true" data-placeholder="Select option" data-allow-clear="true" data-kt-user-table-filter="two-step" data-hide-search="true" name="ctutionfees" >
															<option value="All" <?php if(isset($_POST['ctutionfees']) && $_POST['ctutionfees'] == 'All'){ echo 'selected';} ?>>All</option>
														<option value="January" <?php if(isset($_POST['ctutionfees']) && $_POST['ctutionfees'] == 'Below 15000'){ echo 'selected';} ?>> Below 15000</option>
																	<option value="15000 - 20000" <?php if(isset($_POST['ctutionfees']) && $_POST['ctutionfees'] == '15000 - 20000'){ echo 'selected';} ?>>15000 - 20000</option>
																	<option value="20000 - 25000" <?php if(isset($_POST['ctutionfees']) && $_POST['ctutionfees'] == '20000 - 25000'){ echo 'selected';} ?>>20000 - 25000</option>
																	<option value="25000 - 30000" <?php if(isset($_POST['ctutionfees']) && $_POST['ctutionfees'] == '25000 - 30000'){ echo 'selected';} ?>>25000 - 30000</option>
																	<option value="Above 30000" <?php if(isset($_POST['ctutionfees']) && $_POST['ctutionfees'] == 'Above 30000'){ echo 'selected';} ?>>Above 30000</option>
																	
														</select>
													
										</div>
									<div class="input-group w-350px">
										
														<label class="form-label fs-6 fw-semibold">Application fees range</label>
														<select class="form-select form-select-solid fw-bold" data-kt-select2="true" data-placeholder="Select option" data-allow-clear="true" data-kt-user-table-filter="two-step" data-hide-search="true" name="capplicationfee" >
															<option value="All" <?php if(isset($_POST['capplicationfee']) && $_POST['capplicationfee'] == 'All'){ echo 'selected';} ?>>All</option>
														<option value="Below 50" <?php if(isset($_POST['capplicationfee']) && $_POST['capplicationfee'] == 'Below 50'){ echo 'selected';} ?>> Below 50</option>
																	<option value="50 - 100" <?php if(isset($_POST['capplicationfee']) && $_POST['capplicationfee'] == '50 - 100'){ echo 'selected';} ?>>50 - 100</option>
																	<option value="100 - 150" <?php if(isset($_POST['capplicationfee']) && $_POST['capplicationfee'] == '100 - 150'){ echo 'selected';} ?>>100 - 150</option>
																	<option value="150 - 200" <?php if(isset($_POST['capplicationfee']) && $_POST['capplicationfee'] == '150 - 200'){ echo 'selected';} ?>>150 - 200</option>
																	<option value="200 - 300" <?php if(isset($_POST['capplicationfee']) && $_POST['capplicationfee'] == '200 - 300'){ echo 'selected';} ?>>200 - 300</option>
																	<option value="Above 300" <?php if(isset($_POST['capplicationfee']) && $_POST['capplicationfee'] == 'Above 300'){ echo 'selected';} ?>>Above 300</option>
																	
														</select>
													
										</div>
									<div class="input-group w-350px">
										
														<label class="form-label fs-6 fw-semibold">Institute Name</label>
														<select class="form-select form-select-solid fw-bold" data-kt-select2="true" data-placeholder="Select option" data-allow-clear="true" data-kt-user-table-filter="two-step"  name="collegemid" id="collegemid">
															<option value="All" <?php if(isset($_POST['collegemid']) && "All" == $_POST['collegemid']){ echo 'selected';} ?>>All</option>
														
														</select>
													
										</div>
										<div class="input-group w-350px">
										
														<label class="form-label fs-6 fw-semibold">Campus</label>
														<select class="form-select form-select-solid fw-bold" data-kt-select2="true" data-placeholder="Select option" data-allow-clear="true" data-kt-user-table-filter="two-step"  name="campusmid" id="campusmid">
															<option value="All" <?php if(isset($_POST['campusmid']) && "All" == $_POST['campusmid']){ echo 'selected';} ?>>All</option>
														
														</select>
													
										</div>
										
									
										<div class="justify-content-end align-items-center ">
										<button type="submit" name="submit" class="btn btn-light-primary me-3">
                                                   Filter
												
												</button>
                                                   
                                                </div>
										
										</div>
										</form>
									<!--end::Card toolbar-->
								</div>
								<!--end::Card header-->
								<!--begin::Card body-->
									<form id="kt_modal_export_users_form1" class="form" method="POST" action="leadcourseallocation.php" >
										<div class=" card-toolbar justify-content-end align-items-center gap-5 pt-10 ps-10">
										<button type="submit" name="export" class="btn btn-light-primary me-5 pe-10">
                                                 Export 
												
												</button>
												
												<!--begin::Filter-->
											<button type="button" name="shortlist" class="btn btn-light-primary me-3" data-kt-menu-trigger="click" data-kt-menu-placement="bottom-end">
											<!--begin::Svg Icon | path: icons/duotune/general/gen031.svg-->
											<span class="svg-icon svg-icon-2">
												<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
													<path d="M19.0759 3H4.72777C3.95892 3 3.47768 3.83148 3.86067 4.49814L8.56967 12.6949C9.17923 13.7559 9.5 14.9582 9.5 16.1819V19.5072C9.5 20.2189 10.2223 20.7028 10.8805 20.432L13.8805 19.1977C14.2553 19.0435 14.5 18.6783 14.5 18.273V13.8372C14.5 12.8089 14.8171 11.8056 15.408 10.964L19.8943 4.57465C20.3596 3.912 19.8856 3 19.0759 3Z" fill="currentColor" />
												</svg>
											</span>
											<!--end::Svg Icon-->Shortlist</button>
											<!--begin::Menu 1-->
											<div class="menu menu-sub menu-sub-dropdown w-300px w-md-325px" data-kt-menu="true">
												<!--begin::Header-->
												<div class="px-7 py-5">
													<div class="fs-5 text-dark fw-bold">Shortlist to Lead</div>
												</div>
												<!--end::Header-->
												<!--begin::Separator-->
												<div class="separator border-gray-200"></div>
												<!--end::Separator-->
												<!--begin::Content-->
												<?php
													include("connect.php");
													$eve_category = "select * from res_branch_master";
													$re_category = mysqli_query($conn, $eve_category);
												?>
												
												<div class="px-7 py-5" data-kt-user-table-filter="form">
												<?php
															if($_SESSION['utype']=="admin")
															{
															?>
													<!--begin::Input group-->
													<div class="mb-10">
														<label class="form-label fs-6 fw-semibold">Branch:</label>
														<select class="form-select form-select-solid fw-bold" data-kt-select2="true" data-placeholder="Select option" data-allow-clear="true" data-kt-user-table-filter="role"  name="branchmid" id="branchmid">
															<option value="0">Select</option>
															<?php		
															while($rt_category = mysqli_fetch_assoc($re_category))
															{
																
																echo "<option value='$rt_category[branchmid]'>$rt_category[branchname]</option>";
																	
															}		
														?>	
														</select>
													</div>
													<!--end::Input group-->
													<?php }else{?>
													<input type="hidden" name="branchmid" id="branchmid" value="<?php echo $_SESSION['branchid']; ?>">
													<?php }?>
													<?php
													
													 $eve_category1 = "select * from res_inquiry_master";
													$re_category1 = mysqli_query($conn, $eve_category1);
												?>
													<!--begin::Input group-->
													<div class="mb-10">
														<label class="form-label fs-6 fw-semibold">Lead</label>
														<select class="form-select form-select-solid fw-bold" data-kt-select2="true" data-placeholder="Select option" data-allow-clear="true" data-kt-user-table-filter="two-step"  name="imid" id="imid">
															<option value="0">Select</option>
														<?php		
															while($rt_category1 = mysqli_fetch_assoc($re_category1))
															{
																
																echo "<option value='$rt_category1[imid]'>$rt_category1[ipname] $rt_category1[ipmiddlename] $rt_category1[ipsurname] </option>";
																	
															}		
														?>
														</select>
													</div>
													<!--end::Input group-->
													<!--begin::Input group-->
													<div class="mb-10">
														<label class="form-label fs-6 fw-semibold">Inquiry</label>
														<select class="form-select form-select-solid fw-bold" data-kt-select2="true" data-placeholder="Select option" data-allow-clear="true" data-kt-user-table-filter="two-step" data-hide-search="true" name="stiqmid" id="stiqmid">
															<option value="0">Select Lead</option>
														<?php		
															while($rt_category1 = mysqli_fetch_assoc($re_category1))
															{
																
																echo "<option value='$rt_category1[imid]'>$rt_category1[ipname] $rt_category1[ipmiddlename] $rt_category1[ipsurname] </option>";
																	
															}		
														?>
														</select>
													</div>
													<!--end::Input group-->
													<!--begin::Actions-->
													<div class="d-flex justify-content-end">
														<button type="reset" class="btn btn-light btn-active-light-primary fw-semibold me-2 px-6" data-kt-menu-dismiss="true" data-kt-user-table-filter="reset">Reset</button>
														<button type="submit" class="btn btn-primary fw-semibold px-6" data-kt-menu-dismiss="true" data-kt-user-table-filter="filter">Apply</button>
													</div>
													<!--end::Actions-->
												</div>
												
												<!--end::Content-->
											</div>
											<!--end::Menu 1-->
											<!--end::Filter-->
											<button type="submit" name="pdf" class="btn btn-light-primary me-5 pe-10" formtarget="_blank">
                                                 View PDF 
												
												</button>
                                                   
                                                </div>
								<div class="card-body py-4">
									<!--begin::Table-->
									
									<table class="table align-middle table-row-dashed fs-6 gy-5" id="empTable">
									<thead>
											<!--begin::Table row-->
											<tr class="text-start text-muted fw-bold fs-7 text-uppercase gs-0">
												 <th class="w-10px pe-2">
													<div class="form-check form-check-sm form-check-custom form-check-solid me-3">
														<input class="form-check-input" type="checkbox" data-kt-check="true" data-kt-check-target="#empTable .form-check-input" value="1" />
													</div>
												</th>
												 <th>SrNo</th>
												  <?php
							if(($_SESSION['utype']=='admin') || ($_SESSION['utype']=='branchmanager'))
							{
			?>
												
												 <?php
							}
							?>
												<th>Course Name</th>
												<th>Credentials</th>
												
												<th>College</th>
												<th>Country</th>
												<th>Length</th>
												<th>Fees</th>
												<th>Discipline</th>
												<th>Language</th>
												<th>Program Type</th>
												<th>Delivery Mode</th>
												<th>Monthly Living Cost</th>
												<th>Broucher</th>
												<th>Course Broucher</th>
												
												
											</tr>
											<!--end::Table row-->
										</thead>
										<!--end::Table head-->
										<!--begin::Table body-->
										
										<tbody class="text-gray-600 fw-semibold">
										
											
											
										</tbody>
										
										</table><!--end::Table-->
										
								</div>
								</form>
								<!--end::Card body-->
							</div>
							<!--end::Card-->
						</div>
						<!--end::Container-->
					</div>
					<!--end::Content-->
					<!--begin::Footer-->
					<?php include('footer.php'); ?>
					<!--end::Footer-->
				</div>
				<!--end::Wrapper-->
			</div>
			<!--end::Page-->
		</div>
		<!--end::Root-->
			<!--begin::Scrolltop-->
		<div id="kt_scrolltop" class="scrolltop" data-kt-scrolltop="true">
			<!--begin::Svg Icon | path: icons/duotune/arrows/arr066.svg-->
			<span class="svg-icon">
				<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
					<rect opacity="0.5" x="13" y="6" width="13" height="2" rx="1" transform="rotate(90 13 6)" fill="currentColor" />
					<path d="M12.5657 8.56569L16.75 12.75C17.1642 13.1642 17.8358 13.1642 18.25 12.75C18.6642 12.3358 18.6642 11.6642 18.25 11.25L12.7071 5.70711C12.3166 5.31658 11.6834 5.31658 11.2929 5.70711L5.75 11.25C5.33579 11.6642 5.33579 12.3358 5.75 12.75C6.16421 13.1642 6.83579 13.1642 7.25 12.75L11.4343 8.56569C11.7467 8.25327 12.2533 8.25327 12.5657 8.56569Z" fill="currentColor" />
				</svg>
			</span>
			<!--end::Svg Icon-->
		</div>
		<!--end::Scrolltop-->
		<!--begin::Modals-->
		<!--end::Modals-->
		<!--begin::Javascript-->
		<script>var hostUrl = "assets/";</script>
		<!--begin::Global Javascript Bundle(mandatory for all pages)-->
		<script src="assets/plugins/global/plugins.bundle.js"></script>
		<script src="assets/js/scripts.bundle.js"></script>
		<!--end::Global Javascript Bundle-->
		<!--begin::Vendors Javascript(used for this page only)-->
		<script src="assets/plugins/custom/datatables/datatables.bundle.js"></script>
		<!--end::Vendors Javascript-->
		<!--begin::Custom Javascript(used for this page only)-->
		<script src="assets/js/custom/apps/user-management/users/list/table.js"></script>
		<script src="assets/js/custom/apps/user-management/users/list/export-users.js"></script>
		<script src="assets/js/custom/apps/user-management/users/list/add.js"></script>
		<script src="assets/js/widgets.bundle.js"></script>
		<script src="assets/js/custom/widgets.js"></script>
		<script src="assets/js/custom/apps/chat/chat.js"></script>
		<script src="assets/js/custom/utilities/modals/upgrade-plan.js"></script>
		<script src="assets/js/custom/utilities/modals/users-search.js"></script>
		<script type="text/javascript" src="myjs/64/jquery.base64.js"/></script>
		<script type="text/javascript" src="myjs/tableexport.js"/></script>
		<script type="text/javascript" src="js/notification.js"/></script>
		<!--end::Custom Javascript-->
		<!-- Datatable JS -->
        <script src="DataTables/datatables.min.js"></script>
		<?php 
									if(isset($_POST['submit']))
									{
									?>
		<script>
$(document).ready(function() {
   $('#empTable').DataTable({
                'processing': true,
                'serverSide': true,
				'searchable': true,
				 'orderable': false,
				
                'serverMethod': 'post',
                'ajax': {
                    'url':'leadcourseajax.php'
                },
                'columns': [
				 { "data": "coursemid" },
    	   { "data": "coursemid1" },
		   <?php
							if(($_SESSION['utype']=='admin') || ($_SESSION['utype']=='branchmanager'))
							{
			?>
		  // { "data": "op"},
							<?php
							}
							?>
		   { "data": "cnmid" },
		    { "data": "levelofstudy" },
		  
		   { "data": "collegemid" },
		  
		   { "data": "countrymid" },
		   { "data": "cprogramlength" },		   
		   { "data": "ctutionfees" },		   
		   { "data": "cprogramcategory" },		   
		   { "data": "cprogramlanguage" },		   
		   { "data": "cprogramtype"},		   
		   { "data": "cprogramdelivery" },		   
		   { "data": "costofliving" },		   
		   //{ "data": "cmpbroucher" },		   
		   //{ "data": "cmcoursebroucher"},		   
		   //{ "data": "cemail","title":"Send Email" }		   
		   
		   
		   
		   
			
        ],
      'columnDefs': [{
         'targets': 0,
         'searchable': false,
         'orderable': false,
         'className': 'dt-body-center',
         'render': function (data, type, full, meta){
             return '<div class="form-check form-check-sm form-check-custom form-check-solid me-3"><input type="checkbox" class="form-check-input" name="coursemid[]" value="' + $('<div/>').text(data).html() + '"></div>';
         }
      }],
     
		
		
		
    } );
} );
</script>
 <?php
							}
							?>
<?php

if(isset($_SESSION['msg']))
{
	$tt = $_SESSION['msg'];
	echo "<input type=\"hidden\" id=\"mymsg\" value=\"$tt\"/>";
	unset($_SESSION['msg']);
	
	
?>	
								
		<script lang="javascript">

var a = [
    function () {
	

		var mymsg = document.getElementById("mymsg").value;
		toastr.success(mymsg, "Operation Completed")
		
    },
    function () {
        $('span').show();
    },
    function () {
        $('p').fadeIn(100);
    }
];		
					

a[0]();
</script>


		
	
<?php
}

if(isset($_SESSION['msg1']))
{
	$tt1 = $_SESSION['msg1'];
	echo "<input type=\"hidden\" id=\"mymsg1\" value=\"$tt1\"/>";
	unset($_SESSION['msg1']);
	
	
	?>	
								
		<script lang="javascript">

var a = [
    function () {
	

		var mymsg = document.getElementById("mymsg1").value;
		toastr.warning(mymsg, "Error")
		
    },
    function () {
        $('span').show();
    },
    function () {
        $('p').fadeIn(100);
    }
];		
					

a[0]();
</script>
<?php

}
?>
<script type="text/javascript">
			$(document).ready(function(){
				$('#branchmid').on('change',function(){
					var branchmid = $(this).val();
					
					if(branchmid){
						//alert(branchmid);
						$.ajax({
							type:'POST',
							url:'branchlead.php',
							data:'branchmid='+branchmid,
							success:function(html){
								$('#imid').html(html);
							}
						});
					}else{
						$('#imid').html('<option value=""></option>');
					}
				});
			});
	</script>
	<script type="text/javascript">
			$(document).ready(function(){
				
					var branchmid = $('#branchmid').val();
					
					if(branchmid){
						//alert(branchmid);
						$.ajax({
							type:'POST',
							url:'branchlead.php',
							data:'branchmid='+branchmid,
							success:function(html){
								$('#imid').html(html);
							}
						});
					}else{
						$('#imid').html('<option value=""></option>');
					}
				
			});
	</script>
	<script type="text/javascript">
			$(document).ready(function(){
				$('#imid').on('change',function(){
					var imid = $(this).val();
					
					if(imid){
						//alert(branchmid);
						$.ajax({
							type:'POST',
							url:'leadinquiry.php',
							data:'imid='+imid,
							success:function(html){
								$('#stiqmid').html(html);
							}
						});
					}else{
						$('#stiqmid').html('<option value=""></option>');
					}
				});
			});
	</script>
	<script type="text/javascript">
			$(document).ready(function(){
				
					var imid = $('#imid').val();
					
					if(imid){
						//alert(branchmid);
						$.ajax({
							type:'POST',
							url:'leadinquiry.php',
							data:'imid='+imid,
							success:function(html){
								$('#stiqmid').html(html);
							}
						});
					}else{
						$('#stiqmid').html('<option value=""></option>');
					}
				
			});
	</script>
	<script type="text/javascript">
	$(document).ready(function(){
		$('#countrymid').on('change',function(){
			
			var cnmid = $('#cnmid').val();
			var collegetypemid = $('#collegetypemid').val();
			//alert(cnmid);
			var countrymid = $(this).val();
			if(countrymid){
				$.ajax({
					type:'POST',
					url:'getcollegedata.php',
					data:'cnmid='+cnmid+'&countrymid='+countrymid+'&collegetypemid='+collegetypemid,
					success:function(html){
						$('#collegemid').html(html);
					}
				});
			}else{
				$('#collegemid').html('<option value=""></option>');
			}
		});
	});
	</script>
	<script type="text/javascript">
	$(document).ready(function(){
		$('#collegetypemid').on('change',function(){
			
			var cnmid = $('#cnmid').val();
			var countrymid = $('#countrymid').val();
			var collegetypemid = $(this).val();
			if(collegetypemid){
				$.ajax({
					type:'POST',
					url:'getcollegedata.php',
					data:'cnmid='+cnmid+'&countrymid='+countrymid+'&collegetypemid='+collegetypemid,
					success:function(html){
						$('#collegemid').html(html);
					}
				});
			}else{
				$('#collegemid').html('<option value=""></option>');
			}
		});
	});
	</script>
	<script type="text/javascript">
	$(document).ready(function(){
		$('#cnmid').on('change',function(){
			
			var countrymid = $('#countrymid').val();
			var collegetypemid = $('#collegetypemid').val();
			
			var cnmid = $(this).val();
			if(cnmid){
				$.ajax({
					type:'POST',
					url:'getcollegedata.php',
					data:'cnmid='+cnmid+'&countrymid='+countrymid+'&collegetypemid='+collegetypemid,
					success:function(html){
						$('#collegemid').html(html);
					}
				});
			}else{
				$('#collegemid').html('<option value=""></option>');
			}
		});
	});
	</script>
	<script type="text/javascript">
	$(document).ready(function(){
		
			
			var countrymid = $('#countrymid').val();
			var collegetypemid = $('#collegetypemid').val();
			var cnmid = $('#cnmid').val();
			//alert(countrymid);
			//alert(collegetypemid);
			//alert(cnmid);
			if(cnmid){
				$.ajax({
					type:'POST',
					url:'getcollegedata.php',
					data:'cnmid='+cnmid+'&countrymid='+countrymid+'&collegetypemid='+collegetypemid,
					success:function(html){
						$('#collegemid').html(html);
					}
				});
			}else{
				$('#collegemid').html('<option value=""></option>');
			}
		
	});
	</script>
		<script type="text/javascript">
	$(document).ready(function(){
		$('#collegemid').on('change',function(){
			
			
			var collegemid = $(this).val();
			if(collegemid){
				$.ajax({
					type:'POST',
					url:'getcollegecampusdata.php',
					data:'collegemid='+collegemid,
					success:function(html){
						$('#campusmid').html(html);
					}
				});
			}else{
				$('#campusmid').html('<option value=""></option>');
			}
		});
	});
	</script>
	<script type="text/javascript">
	$(document).ready(function(){
		
			
			
			var collegemid = $('#collegemid').val();
			//alert(collegemid);
			if(collegemid){
				$.ajax({
					type:'POST',
					url:'getcollegecampusdata.php',
					data:'collegemid='+collegemid,
					success:function(html){
						$('#campusmid').html(html);
					}
				});
			}else{
				$('#campusmid').html('<option value=""></option>');
			}
		
	});
	</script>
		<script type="text/javascript">
	$(document).ready(function(){
		$('#countrymid').on('change',function(){
			
			
			var countrymid = $(this).val();
			if(countrymid){
				$.ajax({
					type:'POST',
					url:'getcoursedata.php',
					data:'countrymid='+countrymid,
					success:function(html){
						$('#cnmid').html(html);
					}
				});
			}else{
				$('#cnmid').html('<option value=""></option>');
			}
		});
	});
	</script>
		<script type="text/javascript">
	$(document).ready(function(){
		
			
			
			var countrymid = $('#countrymid').val();
			if(countrymid){
				$.ajax({
					type:'POST',
					url:'getcoursedata.php',
					data:'countrymid='+countrymid,
					success:function(html){
						$('#cnmid').html(html);
					}
				});
			}else{
				$('#cnmid').html('<option value=""></option>');
			}
		});
	
	</script>
		
		<!--end::Javascript-->
	</body>
	<!--end::Body-->
</html>