<?php 
session_start(); 
if(!isset($_SESSION['linkarisecrm']))
	{
		header('Location: index.php');
		return;
	}
	$cmpmid=$_SESSION['linkarisecmpmid'];
include("connect.php");
$_SESSION['frompage']='inquirystatus';
?>
<!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>Inquiry Detail</title>
		<meta charset="utf-8" />
		
		<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" />
		<style>
		    body{
		        background-image: none !important;
    background-color: #F3F6F9;
		    }
		</style>
		<!--end::Global Stylesheets Bundle-->
	</head>
	<!--end::Head-->
	<!--begin::Body-->
<body id="kt_body" data-kt-app-layout="dark-sidebar" data-kt-app-header-fixed="true" data-kt-app-sidebar-enabled="true"  data-kt-app-sidebar-hoverable="true" data-kt-app-sidebar-push-header="true" data-kt-app-sidebar-push-toolbar="true" data-kt-app-sidebar-push-footer="true" data-kt-app-toolbar-enabled="true"  class="app-default">
		<!--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="dashboard.php" 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">Inquiry Details</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">Inquiry Managemnet</li>
										
										<li class="breadcrumb-item text-muted">Inquiry Details</li>
									</ul>
									<!--end::Breadcrumb-->
								</div>
								<!--end::Page title=-->
							</div>
							<!--begin::Wrapper-->
							<?php include('header.php'); ?>
							<!--end::Wrapper-->
						</div>
						<!--end::Container-->
					</div>
					<!--end::Header-->
					<?php
					
	
	
	
	date_default_timezone_set("Asia/Singapore");
		$mdate1= date('Y-m-d H:i:s');
		$mdate= date('d-m-Y');
		if(isset($_POST['partymid'])){
			$partymid=$_POST['partymid'];
			
		}
		else if(isset($_GET['id'])){
	$partymid=$_GET['id'];

		}
	$eve = "select * from res_party_master where partymid=".$partymid;
			$re = mysqli_query($conn, $eve);
			while($rt = mysqli_fetch_assoc($re))
			{
				
				$bumid=$rt['partymid'];
						$partyno=$rt['partyno'];
						$cmpname=$rt['partyname'];
						$cname=$rt['partycpname'];
						$mobile=$rt['partymobile'];
						$email=$rt['partyemail'];
						$address=$rt['partyaddress'];
						$isname=$rt['partyinqsource'];
						$idate=$rt['partyinqdate'];
						$idate=date("d-m-y",strtotime($idate));
						$itype=$rt['partytype'];
						$idetails=$rt['partyrequirement'];
						$istatus=$rt['partyinqstatus'];
						$status=$rt['partyinqstatus'];
						$istage=$rt['partystage'];
						$stage=$rt['partystage'];
						$stageremark=$rt['stageremark'];
						$followupremark=$rt['followupremark'];
						$followupdate=$rt['followupdate'];
						$partyinqbudget=$rt['partyinqbudget'];
						$function=$rt['function'];
						$spotmid=$rt['spotmid'];
						$pax=$rt['pax'];
						
						$fstartdate=date("d-m-y",strtotime($rt['fstartdate']));
						$fenddate=date("d-m-y",strtotime($rt['fenddate']));
						$statusedit=' <a href="#" data-bs-toggle="modal" data-bs-target="#status_update" "><i class="fa fa-pencil"></i></a>';
												$spotname="";
				$eve71="select * from res_spot_master where spotmid=$spotmid";
					$re71 = mysqli_query($conn, $eve71);
					while($rt71 = mysqli_fetch_assoc($re71))
					{
						$spotname=$rt71['spotname'];
						
					}
												
				if($istatus=="Open")
				{
					
					$istatus="<span class='label label-sm label-success'>Open </span>";
				}
				else if($istatus=="Closed")
				{
					
					$istatus="<span class='label label-sm label-danger'>Closed</span>";
				}
				else if($istatus=="Cancelled")
				{
					
					$istatus="<span class='label label-sm label-danger'>Cancelled</span>";
				}
				if($istage=="New")
				{
					
					$istage="<span class='label label-sm label-success'>New </span>";
				}
				else if($istage=="Completed")
				{
					
					$istage="<span class='label label-sm label-success'>Completed</span>";
				}
				else if($istage=="Hold")
				{
					
					$istage="<span class='label label-sm label-danger'>Hold</span>";
				}
				else if($istage=="In Progress")
				{
					
					$istage="<span class='label label-sm label-warning'>In Progress</span>";
				}
				

			}
			 $full_url = $_SERVER['REQUEST_URI'];

$hash_position = strpos($full_url, "#");

if (isset($_GET['tab'])) {
    $hash_value = $_GET['tab'];
   
} else {
   $hash_value = 'student_detail';
}
	
?>
					<!--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::Order details page-->
							
								<div class="d-flex flex-column gap-7 gap-lg-10">
								<!--begin::Tab content-->
								<div class="tab-content">
									<!--begin::Tab pane-->
									<div class="tab-pane fade <?php if($hash_value == 'student_detail'){ echo 'show active'; }?>" id="student_detail" role="tab-panel">
										<!--begin::Orders-->
										<div class="d-flex flex-column gap-7 gap-lg-10">
											<div class="d-flex flex-column flex-xl-row gap-7 gap-lg-10">
												<!--begin::Payment address-->
												<div class="card card-flush py-4 flex-row-fluid overflow-hidden">
													<!--begin::Background-->
													
													<!--end::Background-->
													<div class="card-toolbar">
										<!--begin::Toolbar-->
										<div class="d-flex justify-content-end" data-kt-user-table-toolbar="base">
											<!--begin::Export-->
											
											<a href="inquiry.php" class="btn btn-light-primary me-3" >
													 Back 
												</a>
											<!--end::Export-->
											<!--begin::Add user-->
											
											
											<!--end::Add user-->
										</div>
										</div>
													<!--begin::Card header-->
													<div class="card-body pt-0">
													<div class="table-responsive">
													<table class="table align-middle table-row-dashed fs-6 gy-5 mb-0">
                
                <tr>
                  <th class="fw-bold"> Inquiry No
                  </th>
                  <td>
                    <?php echo $partymid;?>
                  </td>
                 
				 <th class="fw-bold">Inquiry Status
                  </th>
                  <td >
                    <?php echo $status."".$statusedit;?>
                  </td>
				  </tr>
				  <tr>
                  <th class="fw-bold">Inquiry Date
                  </th>
                  <td >
                    <?php echo $idate;?>
                  </td>								
                 <th class="fw-bold">Customer Name
                  </th>
                  <td>
                    <?php echo $cmpname;?>
                  </td>
                </tr>
				 <tr >
                   <th class="fw-bold">Mobile Number
                  </th>
                  <td >
                    <?php echo $mobile;?>
                  </td>
				  <th class="fw-bold">Email Id
                  </th>
                  <td >
                    <?php echo $email;?>
                  </td>
                </tr>
                <tr >
                  <th class="fw-bold">Address
                  </th>
                  <td>
                    <?php echo $address;?>
                  </td>
                
                </tr> 
				 <tr >
                   <th class="fw-bold">Function
                  </th>
                  <td >
                    <?php echo $function;?>
                  </td>
				  <th class="fw-bold">Hall
                  </th>
                  <td >
                    <?php echo $spotname;?>
                  </td>
                </tr>
				 <tr >
                   <th class="fw-bold">PAX
                  </th>
                  <td >
                    <?php echo $pax;?>
                  </td>
				  <th class="fw-bold">Budget
                  </th>
                  <td >
                    <?php echo $partyinqbudget;?>
                  </td>
                </tr>
				 <tr >
                   <th class="fw-bold">Function Start Date
                  </th>
                  <td >
                    <?php echo $fstartdate;?>
                  </td>
				  <th class="fw-bold">Function End Date
                  </th>
                  <td >
                    <?php echo $fenddate;?>
                  </td>
                </tr>
			
                <tr >
				 <th class="fw-bold">Inquiry Stage
                  </th>
                  <td >
                    <?php echo $stage;?>
                  </td>
                 <th class="fw-bold">Last Remarks
                  </th>
                  <td >
                    <?php echo $followupremark;?>
                  </td>
                 
                </tr>
				
				<?php 
							if($followupdate!="0000-00-00"){
							?>
			<tr>
					<th class="fw-bold">Next Follow-Up Date</th>
					<td><?php echo $followupdate;?></td>
				
					
				</tr> 
				<?php } ?>
               
				
               
              </table>
			  </div>
			  </div>
           
													<!--end::Card header-->
													<!--begin::Card body-->
													
													<!--end::Card body-->
												</div>
												<!--end::Payment address-->
												</div>
						
											<div class="card card-flush py-4 flex-row-fluid">
												<!--begin::Card header-->
												<div class="card-header">
													<div class="card-title text-uppercase">
														<h2>Follow-Up</h2>
													</div>
													<!--begin::Add user-->
											
												<a href="#" data-bs-toggle="modal" data-bs-target="#student_add_bookset" class="btn btn-sm btn-primary align-self-center"><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">
													<rect opacity="0.5" x="11.364" y="20.364" width="16" height="2" rx="1" transform="rotate(-90 11.364 20.364)" fill="currentColor" />
													<rect x="4.36396" y="11.364" width="16" height="2" rx="1" fill="currentColor" />
												</svg>
											</span>Add </a>
													
										
											<!--end::Add user-->
												</div>
												
												<!--end::Card header-->
												<!--begin::Card body-->
												<div class="card-body pt-0">
													<div class="table-responsive">
														<!--begin::Table-->
														<table class="table align-middle table-row-dashed fs-6 gy-5 mb-0">
															<!--begin::Table head-->
															<thead>
																<tr class="text-start text-gray-400 fw-bold fs-7 text-uppercase gs-0">
																	 <th>Sr No.
                          
                            </th>
							<th>Date
                            </th>
							<th>Stage
                            </th>
							
							<th>Remarks
                            </th>
															
																	
																</tr>
															</thead>
															<!--end::Table head-->
															<!--begin::Table body-->
															<tbody class="fw-semibold text-gray-600">
															<?php
															$i=1;
															$tt1=0;
															$evepay = "select * from res_followup_detail where partymid=$partymid ORDER BY fdid DESC";
															$repay = mysqli_query($conn, $evepay);
															$i=1;
															while($rtpay = mysqli_fetch_assoc($repay))
															{
														$inqfdate=date("d-m-Y",strtotime($rtpay['fdate']));
									$inqfremarks=$rtpay['fremarks'];
									$inquirystage=$rtpay['inquirystage'];
									
									if(($inqfdate=="0000-00-00") || ($inqfdate=="30-11--0001"))
									{
										$inqfdate="";
									}
															?>
																<tr>
																	
																	 <td>
                              <?php echo $i++;?>
                            </td>
							
                            
							<td>
                              <?php echo $inqfdate;?>
                            </td><td>
                              <?php echo $inquirystage;?>
                            </td> <td>
                              <?php echo $inqfremarks;?>
                            </td> 
							
					
																	
																</tr>
															<?php } ?>
																</tbody>
															<!--end::Table head-->
														</table>
														<!--end::Table-->
													</div>
												</div>
												<!--end::Card body-->
											</div>
					
				
											
											
											</div>
										<!--end::Orders-->
									</div>
									<!--end::Tab pane-->
									
								</div>
								<!--end::Tab content-->
								
							</div>
							<!--end::Order details page-->
						</div>
						<!--end::Container-->
					</div>
					<!--end::Content-->
					<!--begin::Footer-->
					<?php include('footer.php'); ?>
					<!--end::Footer-->
				</div>
				<!--end::Wrapper-->
			</div>
			<!--end::Page-->
		</div>
		<!--end::Root-->
		<!--begin::Drawers-->
			<!--begin::Modal - Common Document-->
							<div class="modal fade" id="student_add_bookset" tabindex="-1" aria-hidden="true">
								<!--begin::Modal dialog-->
								<div class="modal-dialog modal-dialog-centered mw-500px">
									<!--begin::Modal content-->
									<div class="modal-content rounded">
										<!--begin::Modal header-->
										<div class="modal-header pb-10 border-0 ">
										<div class="card-title text-uppercase ">
														<h2>Inquiry Follow-Up</h2>
													</div>
											<!--begin::Close-->
											<div class="btn btn-sm btn-icon btn-active-color-primary justify-content-end" data-bs-dismiss="modal">
												<!--begin::Svg Icon | path: icons/duotune/arrows/arr061.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">
														<rect opacity="0.5" x="6" y="17.3137" width="16" height="2" rx="1" transform="rotate(-45 6 17.3137)" fill="currentColor" />
														<rect x="7.41422" y="6" width="16" height="2" rx="1" transform="rotate(45 7.41422 6)" fill="currentColor" />
													</svg>
												</span>
												<!--end::Svg Icon-->
											</div>
											<!--end::Close-->
										</div>
										<!--begin::Modal header-->
										<!--begin::Modal body-->
										<div class="modal-body scroll-y px-10 px-lg-15 pt-0 pb-15">
											<!--begin::Form-->
														<form id="kt_modal_add_user_form132" class="form" action="inquiryfollowupadd21.php" method="POST"  enctype="multipart/form-data">
														<input type="hidden" name="partymid" value="<?php echo $partymid; ?>">
															<!--begin::Scroll-->
																
																<!--begin::Row-->
												<div class="row row-cols-1 row-cols-sm-1 rol-cols-md-1 row-cols-lg-1">
													<!--begin::Col-->
													<div class="col-md-6 fv-row">
																<!--begin::Input group-->
																<div class="fv-row mb-7">
																	<!--begin::Label-->
																	<label class="required fw-semibold fs-6 mb-2">Inquiry Stage:</label>
																	<!--end::Label-->
																	<!--begin::Input-->
																	<?php
							include("connect.php");
							$eve_category2 = "select * from res_inquirystage_master where cmpmid=$cmpmid";
							$re_category2 = mysqli_query($conn, $eve_category2);
							?>
													<select class="form-select form-select-solid" data-control="select2"  data-dropdown-parent="#kt_modal_add_user_form132" name="inquirystagename" >
													  <option value="0">Select
													  </option>
													  <?php
											$eve_category1 = "select * from res_inquirystage_master where cmpmid=$cmpmid";
										$re_category1 = mysqli_query($conn, $eve_category1);
												while($rt_category1 = mysqli_fetch_assoc($re_category1))
												{
													if($rt_category1['inquirystagename']==$stage){
													echo "<option value='$rt_category1[inquirystagename]' selected>$rt_category1[inquirystagename]</option>";
													}
													else{
														echo "<option value='$rt_category1[inquirystagename]'>$rt_category1[inquirystagename]</option>";
													}
												}
											?>
                        </select>
																	<!--end::Input-->
																</div>
																<!--end::Input group-->
																		<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="">Remarks</span>
																
															</label>
															<!--end::Label-->
															<!--begin::Input-->
															<textarea type="text" class="form-control form-control-solid" name="followremarks" value="" ></textarea>
															<!--end::Input-->
														</div>
															<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="">Next Follow-up Date</span>
																
															</label>
															<!--end::Label-->
															<!--begin::Datepicker-->
															<input class="form-control form-control-solid fw-bold pe-5" placeholder="Select date" name="fdate" id="kt_daterangepicker_1" value="<?php echo $mdate;?>" >
															<!--end::Datepicker-->
														</div>
																</div>
													<!--end::Col-->
													
													</div>
												<!--end::Row-->	
															<!--begin::Actions-->
															<div class="text-center pt-15">
																<button type="reset" class="btn btn-light me-3" data-kt-users-modal-action="cancel" data-bs-dismiss="modal" data-bs-dismiss="modal">Discard</button>
																<button type="submit" class="btn btn-primary" data-kt-users-modal-action="submit">
																	<span class="indicator-label">Submit</span>
																	<span class="indicator-progress">Please wait...
																	<span class="spinner-border spinner-border-sm align-middle ms-2"></span></span>
																</button>
															</div>
															</div>
															<!--end::Actions-->
														</form>
														<!--end::Form-->
													</div>
										<!--end::Modal body-->
									</div>
									<!--end::Modal content-->
								</div>
								
								<div class="modal fade" id="status_update" tabindex="-1" aria-hidden="true">
								<!--begin::Modal dialog-->
								<div class="modal-dialog modal-dialog-centered mw-500px">
									<!--begin::Modal content-->
									<div class="modal-content rounded">
										<!--begin::Modal header-->
										<div class="modal-header pb-10 border-0 ">
										<div class="card-title text-uppercase ">
														<h2>Status Update</h2>
													</div>
											<!--begin::Close-->
											<div class="btn btn-sm btn-icon btn-active-color-primary justify-content-end" data-bs-dismiss="modal">
												<!--begin::Svg Icon | path: icons/duotune/arrows/arr061.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">
														<rect opacity="0.5" x="6" y="17.3137" width="16" height="2" rx="1" transform="rotate(-45 6 17.3137)" fill="currentColor" />
														<rect x="7.41422" y="6" width="16" height="2" rx="1" transform="rotate(45 7.41422 6)" fill="currentColor" />
													</svg>
												</span>
												<!--end::Svg Icon-->
											</div>
											<!--end::Close-->
										</div>
										<!--begin::Modal header-->
										<!--begin::Modal body-->
										<div class="modal-body scroll-y px-10 px-lg-15 pt-0 pb-15">
											<!--begin::Form-->
														<form id="kt_modal_add_user_form132" class="form" action="inquirystatusedit.php" method="POST"  enctype="multipart/form-data">
														<input type="hidden" name="partymid" value="<?php echo $partymid; ?>">
															<!--begin::Scroll-->
																
																<!--begin::Row-->
												<div class="row row-cols-1 row-cols-sm-1 rol-cols-md-1 row-cols-lg-1">
													<!--begin::Col-->
													<div class="col-md-6 fv-row">
																<!--begin::Input group-->
																<div class="fv-row mb-7">
																	<!--begin::Label-->
																	<label class="required fw-semibold fs-6 mb-2">Inquiry Status:</label>
																	<!--end::Label-->
																	<!--begin::Input-->
																	
													<select class="form-select form-select-solid"   data-dropdown-parent="#kt_modal_add_user_form132" name="istatus" >
													
														<option value="0">Select</option>
										<option <?php if($status=='Open') { echo 'selected'; } ?> value="Open">Open</option>
										<option <?php if($status=='Closed') { echo 'selected'; } ?> value="Closed">Closed</option>
										<option <?php if($status=='Cancelled') { echo 'selected'; } ?> value="Cancelled">Cancelled</option>
                        </select>
																	<!--end::Input-->
																</div>
																<!--end::Input group-->
																
															
																</div>
													<!--end::Col-->
													
													</div>
												<!--end::Row-->	
															<!--begin::Actions-->
															<div class="text-center pt-15">
																<button type="reset" class="btn btn-light me-3" data-kt-users-modal-action="cancel" data-bs-dismiss="modal" data-bs-dismiss="modal">Discard</button>
																<button type="submit" class="btn btn-primary" data-kt-users-modal-action="submit">
																	<span class="indicator-label">Submit</span>
																	<span class="indicator-progress">Please wait...
																	<span class="spinner-border spinner-border-sm align-middle ms-2"></span></span>
																</button>
															</div>
															</div>
															<!--end::Actions-->
														</form>
														<!--end::Form-->
													</div>
										<!--end::Modal body-->
									</div>
									<!--end::Modal content-->
								</div>
		<!--begin::Engage modals-->
		<!--end::Engage modals-->
		<!--begin::Modal - Add task-->
					<!--end::Modal - Student Course-->
						<!--begin::Modal - Student College Application-->
						
							<!--end::Modal - Student College Application-->
						
						
					
							
				
					
						
		<!--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/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>
		<!--end::Custom Javascript-->
		<script type="text/javascript">
		$(document).ready(function(){
			
			
 $("#kt_daterangepicker_1").flatpickr({
        enableTime:!1,dateFormat:"d-m-Y"
    }
   
);
		});
		</script>
		
		<script type="text/javascript">
		$(document).ready(function(){
			$("#kt_daterangepicker_2").flatpickr({
        enableTime:!1,dateFormat:"d-m-Y"
    });
		});
		</script>
		<script type="text/javascript">
		$(document).ready(function(){
			$("#kt_daterangepicker_3").flatpickr({
       dateFormat:"d-m-Y"
    });
		});
		</script>
		<script type="text/javascript">
		$(document).ready(function(){
			$("#kt_daterangepicker_4").flatpickr({
        enableTime:!1,dateFormat:"d-m-Y"
    });
		});
		</script>
		<script type="text/javascript">
		$(document).ready(function(){
			$("#kt_daterangepicker_5").flatpickr({
        enableTime:!1,dateFormat:"d-m-Y"
    });
		});
		</script>
		<script type="text/javascript">
		$(document).ready(function(){
			$("#kt_daterangepicker_6").flatpickr({
        enableTime:!1,dateFormat:"d-m-Y"
    });
		});
		</script>
		<script type="text/javascript">
		$(document).ready(function(){
			$("#kt_daterangepicker_7").flatpickr({
        enableTime:!1,dateFormat:"d-m-Y"
    });
		});
		</script>
		<script type="text/javascript">
		$(document).ready(function(){
			$("#kt_daterangepicker_8").flatpickr({
        enableTime:!1,dateFormat:"d-m-Y"
    });
		});
		</script>
		<script type="text/javascript">
		$(document).ready(function(){
			$("#kt_daterangepicker_9").flatpickr({
        enableTime:!1,dateFormat:"d-m-Y"
    });
		});
		</script>
		<script type="text/javascript">
		$(document).ready(function(){
			$("#kt_daterangepicker_10").flatpickr({
        enableTime:!1,dateFormat:"d-m-Y"
    });
		});
		</script>
		<script type="text/javascript">
		$(document).ready(function(){
			$("#kt_daterangepicker_11").flatpickr({
        enableTime:!1,dateFormat:"d-m-Y"
    });
		});
		</script>
		<script type="text/javascript">
		$(document).ready(function(){
			$("#kt_daterangepicker_12").flatpickr({
        enableTime:!1,dateFormat:"d-m-Y"
    });
		});
		</script>
		<script type="text/javascript">
		$(document).ready(function(){
			$("#kt_daterangepicker_13").flatpickr({
        enableTime:!1,dateFormat:"d-m-Y"
    });
		});
		</script><script type="text/javascript">
		$(document).ready(function(){
			$("#kt_daterangepicker_14").flatpickr({
        enableTime:!1,dateFormat:"d-m-Y"
    });
		});
		</script><script type="text/javascript">
		$(document).ready(function(){
			$("#kt_daterangepicker_15").flatpickr({
        enableTime:!1,dateFormat:"d-m-Y"
    });
		});
		</script><script type="text/javascript">
		$(document).ready(function(){
			$("#kt_daterangepicker_16").flatpickr({
        enableTime:!1,dateFormat:"d-m-Y"
    });
		});
		</script><script type="text/javascript">
		$(document).ready(function(){
			$("#kt_daterangepicker_17").flatpickr({
        enableTime:!1,dateFormat:"d-m-Y"
    });
		});
		</script><script type="text/javascript">
		$(document).ready(function(){
			$("#kt_daterangepicker_18").flatpickr({
        enableTime:!1,dateFormat:"d-m-Y"
    });
		});
		</script><script type="text/javascript">
		$(document).ready(function(){
			$("#kt_daterangepicker_19").flatpickr({
        enableTime:!1,dateFormat:"d-m-Y"
    });
		});
		</script>
		
	
		
		
	
	<script type="text/javascript">
      $(document).ready(function(){
        $("#offer").hide();
        
        $("#capstatus").change(function () {
          if ($(this).val() == "Conditional Offer Received" || $(this).val() == "Unconditional Offer Received") {
            $("#offer").show();
            }
          else {
            $("#offer").hide();
            }
        }
                             );
      }
                       );
    </script> 



		
		
		<script>
		$('#isdid').on('change',function()
		{
			$.get("paymenttotalamt.php", { isdid : $(this).val() }, function(response) 
			{
				$('#paytotalamount1').val( $.trim(response) );

			});
			$.get("paymentreceivedamt.php", { isdid : $(this).val() }, function(response) 
			{
				$('#payrecivedamt1').val( $.trim(response) );

			});
			$.get("paymentpendingamt.php", { isdid : $(this).val() }, function(response) 
			{
				$('#paypendingamt1').val( $.trim(response) );

			});
		});
		</script>
		<script>
		
			$.get("paymenttotalamt.php", { isdid : $('#isdid').val() }, function(response) 
			{
				$('#paytotalamount1').val( $.trim(response) );

			});
			$.get("paymentreceivedamt.php", { isdid : $('#isdid').val() }, function(response) 
			{
				$('#payrecivedamt1').val( $.trim(response) );

			});
			$.get("paymentpendingamt.php", { isdid : $('#isdid').val() }, function(response) 
			{
				$('#paypendingamt1').val( $.trim(response) );

			});
		
		</script>
		
		
		
		
		
		
		<?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>
		$(document).ready(function(){

		$(document).on('click', '#getUser6', function(e){

			e.preventDefault();

			var uid = $(this).data('id');   // it will get id of clicked row
			
			

			$('#dynamic-content6').html(''); // leave it blank before ajax call
			      // load ajax loader

			$.ajax({
				url: 'collegeappstatus.php',
				type: 'POST',
				data: 'id='+uid,
				dataType: 'html'
			})
			.done(function(data){
				console.log(data);
				$('#dynamic-content6').html('');
				$('#dynamic-content6').html(data); // load response
						  // hide ajax loader
			})
			.fail(function(){
				$('#dynamic-content6').html('<i class="glyphicon glyphicon-info-sign"></i> Something went wrong, Please try again...');
				
			});

		});
	});

	

</script>	

	<script type="text/javascript">
			$(document).ready(function(){
				$('#countrymid2').on('change',function(){
					var countrymid = $(this).val();
					//alert(countrymid);
					if(countrymid){
						$.ajax({
							type:'POST',
							url:'countrytocollegedata.php',
							data:'countrymid='+countrymid,
							success:function(html){
								$('#collegemid2').html(html);
							}
						});
					}else{
						$('#collegemid2').html('<option value=""></option>');
					}
				});
			});
	</script>
	
	 <script type="text/javascript">
	$(function()
	{
		$('#myForm').submit(function(e)
		{
			if($('#coursemid1').val() == '0')
			{
				alert('Select Course!');
				e.preventDefault();
			}

		});
	});
	</script>
    


		
	<script type="text/javascript">
			$(document).ready(function(){
				$('#collegemid2').on('change',function(){
					var collegemid = $(this).val();
					if(collegemid){
						$.ajax({
							type:'POST',
							url:'collegecampus.php',
							data:'collegemid='+collegemid,
							success:function(html){
								$('#ccampusmid').html(html);
							}
						});
					}else{
						$('#ccampusmid').html('<option value=""></option>');
					}
				});
			});
	</script>
	
	

	
<script>
$('#coursemid1').on('change',function()
{
	
	
	
	$.get("coursefees.php", { coursemid : $(this).val() }, function(response) 
	{
		$('#cgrosstutionfess2').val( $.trim(response) );

	});
});
</script>
<script type="text/javascript">
			$(document).ready(function(){
				
					
					var coursemid = $('#coursemid3').val();
					//alert(collegemid);
					if(coursemid){
						$.ajax({
							type:'POST',
							url:'courseintake.php',
							data:'coursemid='+coursemid,
							success:function(html){
								$('#citdid1').html(html);
							}
						});
					}else{
						$('#citdid1').html('<option value=""></option>');
					}
				
			});
	</script><script type="text/javascript">
			$(document).ready(function(){
				$('#coursemid3').on('change',function(){
					
					var coursemid = $(this).val();
					
					if(coursemid){
						//alert(coursemid);
						$.ajax({
							type:'POST',
							url:'courseintake.php',
							data:'coursemid='+coursemid,
							success:function(html){
								$('#citdid1').html(html);
							}
						});
					}else{
						$('#citdid1').html('<option value=""></option>');
					}
				});
			});
	</script><script>
$('#coursemid3').on('change',function()
{
	
	
	
	$.get("coursefees.php", { coursemid : $(this).val() }, function(response) 
	{
		$('#cgrosstutionfess1').val( $.trim(response) );

	});
	
	$.get("coursecurrency1.php", { coursemid : $(this).val() }, function(response) {

//alert(response);

$('#pcurrency').val( $.trim(response) );

});

$.get("coursefeesinr1.php", { coursemid : $(this).val() }, function(response) {

//alert(response);

$('#cgrosstutionfess1inr').val( $.trim(response) );

});
});
</script>

	

	
	
		<script>

 $('#clgappmid').on('change',function(){



$.get("coursetofees.php", { clgappmid : $(this).val() }, function(response) {

//alert(response);

$('#pcurrencyrate').val( $.trim(response) );


});

$.get("coursecurrency.php", { clgappmid : $(this).val() }, function(response) {

//alert(response);

$('#pcurrency22').val( $.trim(response) );

});
$.get("coursefeesinr.php", { clgappmid : $(this).val() }, function(response) {

//alert(response);

$('#pcurrencyinr').val( $.trim(response) );

});
});

</script>
		

<script>
		$(document).ready(function(){

		$(document).on('click', '#getUser5', function(e){

			e.preventDefault();

			var uid = $(this).data('id');   // it will get id of clicked row
			
			//alert(uid);

			$('#dynamic-content5').html(''); // leave it blank before ajax call
			      // load ajax loader

			$.ajax({
				url: 'paymenttranscation.php',
				type: 'POST',
				data: 'id='+uid,
				dataType: 'html'
			})
			.done(function(data){
				console.log(data);
				$('#dynamic-content5').html('');
				$('#dynamic-content5').html(data); // load response
						  // hide ajax loader
			})
			.fail(function(){
				$('#dynamic-content5').html('<i class="glyphicon glyphicon-info-sign"></i> Something went wrong, Please try again...');
				
			});

		});
	});

	

</script>	

<script>
		$(document).ready(function(){

		$(document).on('click', '#getUser8', function(e){

			e.preventDefault();

			var uid = $(this).data('id');   // it will get id of clicked row
			
			//alert(uid);

			$('#dynamic-content8').html(''); // leave it blank before ajax call
			      // load ajax loader

			$.ajax({
				url: 'admissionintake.php',
				type: 'POST',
				data: 'id='+uid,
				dataType: 'html'
			})
			.done(function(data){
				console.log(data);
				$('#dynamic-content8').html('');
				$('#dynamic-content8').html(data); // load response
						  // hide ajax loader
			})
			.fail(function(){
				$('#dynamic-content8').html('<i class="glyphicon glyphicon-info-sign"></i> Something went wrong, Please try again...');
				
			});

		});
	});

	

</script><script>
		$(document).ready(function(){

		$(document).on('click', '#getUser12', function(e){

			e.preventDefault();

			var uid = $(this).data('id');   // it will get id of clicked row
			
			//alert(uid);

			$('#dynamic-content12').html(''); // leave it blank before ajax call
			      // load ajax loader

			$.ajax({
				url: 'defclgapplication1.php',
				type: 'POST',
				data: 'id='+uid,
				dataType: 'html'
			})
			.done(function(data){
				console.log(data);
				$('#dynamic-content12').html('');
				$('#dynamic-content12').html(data); // load response
						  // hide ajax loader
			})
			.fail(function(){
				$('#dynamic-content12').html('<i class="glyphicon glyphicon-info-sign"></i> Something went wrong, Please try again...');
				
			});

		});
	});

	

</script>	
<script>
		$(document).ready(function(){

		$(document).on('click', '#getUser3', function(e){

			e.preventDefault();

			var uid = $(this).data('id');   // it will get id of clicked row
			
			//alert(uid);

			$('#dynamic-content3').html(''); // leave it blank before ajax call
			      // load ajax loader

			$.ajax({
				url: 'appstepdetail.php',
				type: 'POST',
				data: 'id='+uid,
				dataType: 'html'
			})
			.done(function(data){
				console.log(data);
				$('#dynamic-content3').html('');
				$('#dynamic-content3').html(data); // load response
						  // hide ajax loader
			})
			.fail(function(){
				$('#dynamic-content3').html('<i class="glyphicon glyphicon-info-sign"></i> Something went wrong, Please try again...');
				
			});

		});
	});

	

</script>	

		<script>
		 
		  $('#paycurrency').on('change',function(){

				$.get("paycurrencyvalue.php", { servicefinalrate : $('#pcurrencyinr').val() , paycurrency : $(this).val() }, function(response) {

				//alert(response);
				
				$('#paycurrencyvalue22').val( $.trim(response) );
				});
				
				
				
			});
		</script>
		<script>
		 
		 /*  $('#paycurrency1').on('change',function(){

				$.get("paycurrencyvalue.php", { servicefinalrate : $('#cgrosstutionfess1inr').val() , paycurrency : $(this).val() }, function(response) {

				//alert(response);
				
				$('#paycurrencyvalue1').val( $.trim(response) );
				});
				
				
				
				
			}); */
		</script>
		<script>
		 
		  $('#pcurrencyinr').on('keyup',function(){

				$.get("paycurrencyvalue.php", { servicefinalrate : $('#pcurrencyinr').val() , paycurrency : $('#paycurrency').val() }, function(response) {

				//alert(response);
				
				$('#paycurrencyvalue').val( $.trim(response) );
				});
				
				
				
			});
		</script>
	<script>
		 
		  

				$.get("paycurrencyvalue.php", { servicefinalrate : $('#pcurrencyinr').val() , paycurrency : $('#paycurrency').val() }, function(response) {

				//alert(response);
				
				$('#paycurrencyvalue').val( $.trim(response) );
				
				
				
				
			});
		</script>
		<script type="text/javascript">

$('#asemester').on('change',function(){
var asemester = $(this).val();

$('#term').empty();
	for(var j=1;j<=asemester; j++)
{
	

		$("#term").append(" <tr><td valign=\"top\">  <select  class=\"form-select form-select-solid\" data-control=\"select2\" id=\"pname" + $('#mycounter').val()  + "\" name=\"asemstartmonth[]\"><option value=\"January\">January</option><option value=\"February\">February</option><option value=\"March\">March</option><option value=\"April\">April</option><option value=\"May\">May</option><option value=\"June\">June</option><option value=\"July\">July</option><option value=\"August\">August</option><option value=\"September\">September</option><option value=\"October\">October</option><option value=\"November\">November</option><option value=\"December\">December</option></select> </td><td> <select class=\"form-select form-select-solid\" data-control=\"select2\"   name=\"asemstartyear[]\" ><?php for($i=2020;$i<=2040;$i++){echo "<option value=\'$i\'>$i</option>";}?></select></td><td valign=\"top\"> <input type=\"text\" class=\"form-control form-control-solid\" id=\"asemfees" + $('#mycounter').val()  + "\" name=\"asemfees[]\"> </td></tr>.");

		$('#mycounter').val( parseInt($('#mycounter').val()) + 1);

}
	



});



</script>

	<script type="text/javascript">
		$(document).ready(function(){
			$("#kt_daterangepicker_20").flatpickr({
        enableTime:!1,dateFormat:"d-m-Y"
    });
		});
		</script>
		<script type="text/javascript">
		$(document).ready(function(){
			$("#kt_daterangepicker_21").flatpickr({
        enableTime:!1,dateFormat:"d-m-Y"
    });
		});
		</script>
		<script type="text/javascript">
		$(document).ready(function(){
			$("#kt_daterangepicker_22").flatpickr({
        enableTime:!1,dateFormat:"d-m-Y"
    });
		});
		</script>
		<script type="text/javascript">
		$(document).ready(function(){
			$("#kt_daterangepicker_23").flatpickr({
        enableTime:!1,dateFormat:"d-m-Y"
    });
		});
		</script>
		<script type="text/javascript">
			$(document).ready(function(){
				$('#clgappmid1').on('change',function(){
					
					var clgappmid = $(this).val();
					
					if(clgappmid){
						
						$.ajax({
							type:'POST',
							url:'collegeapplicationmanage.php',
							data:'clgappmid='+clgappmid,
							success:function(html){
								$('#camdid').html(html);
							}
						});
					}else{
						$('#camdid').html('<option value=""></option>');
					}
				});
			});
	</script><script type="text/javascript">
			$(document).ready(function(){
				$('#camdid').on('change',function(){
					
					var camdid = $(this).val();
					
					if(camdid){
						
						$.ajax({
							type:'POST',
							url:'applicationsteps.php',
							data:'camdid='+camdid,
							success:function(html){
								$('#steps').html(html);
							}
						});
					}else{
						$('#steps').html('<option value=""></option>');
					}
				});
			});
	</script>
	
<script>
$('#camdid').on('change',function()
{
	
	
	
	$.get("camstartdate.php", { camdid : $(this).val() }, function(response) 
	{
		$('#camstartdate').val( $.trim(response) );

	});
	
	$.get("camdeadline.php", { camdid : $(this).val() }, function(response) 
	{
		$('#camdeadline').val( $.trim(response) );

	});
	
	$.get("camcondition.php", { camdid : $(this).val() }, function(response) 
	{
		$('#camcondition').val( $.trim(response) );

	});
	$.get("camprocessdetail.php", { camdid : $(this).val() }, function(response) 
	{
		$('#camprocessdetail').val( $.trim(response) );

	});
});
</script>
<script type="text/javascript">
		$(document).ready(function(){
			$("#kt_daterangepicker_11").flatpickr({
        enableTime:!1,dateFormat:"d-m-Y"
    });
		});
		</script>
															<script type="text/javascript">
			$(document).ready(function(){
				$('#coursemid22').on('change',function(){
					var coursemid = $(this).val();
					
					if(coursemid){
						
						$.ajax({
							type:'POST',
							url:'courseintake.php',
							data:'coursemid='+coursemid,
							success:function(html){
								$('#citdid').html(html);
							}
						});
					}else{
						$('#citdid').html('<option value="">333</option>');
					}
				});
			});
	</script>
	<script type="text/javascript">
			$(document).ready(function(){
				$('#ccampusmid').on('change',function(){
					var ccampusmid = $(this).val();
					//alert(ccampusmid);
					if(ccampusmid){
						$.ajax({
							type:'POST',
							url:'coursecampusdata.php',
							data:'ccampusmid='+ccampusmid,
							success:function(html){
								$('#coursemid22').html(html);
							}
						});
					}else{
						$('#coursemid22').html('<option value=""></option>');
					}
				});
			});
	</script>
	<script type="text/javascript">
			$(document).ready(function(){
				
					var ccampusmid = $('#ccampusmid').val();
					if(ccampusmid){
						$.ajax({
							type:'POST',
							url:'coursecampusdata.php',
							data:'ccampusmid='+ccampusmid,
							success:function(html){
								$('#coursemid22').html(html);
							}
						});
					}else{
						$('#coursemid22').html('<option value=""></option>');
					}
				});
			
	</script>

<script>
$('#coursemid22').on('change',function()
{
	
	
	
	$.get("coursefees.php", { coursemid : $(this).val() }, function(response) 
	{
		$('#cgrosstutionfess2').val( $.trim(response) );

	});
});
</script>	
		<!--end::Javascript-->
	</body>
	<!--end::Body-->
</html>