<?php 
session_start(); 
if(!isset($_SESSION['tulsilogin']))
	{
		header('Location: index.php');
		return;
	}
	include("connect.php");
	date_default_timezone_set("Asia/Kolkata");
				$mdate1= date('Y-m-d H:i:s');
				$mdate2= date('Y-m-d');
				$mdate= date('d-m-Y');
	$eve = "update  res_agentcomission_master set acstatus='Active' where acstartdate <= '$mdate2' and acenddate >= '$mdate2'";
	$re = mysqli_query($conn,$eve);
	
$eve1 = "update  res_agentcomission_master set acstatus='Inactive' where acstartdate > '$mdate2' and acenddate < '$mdate2'";
	$re1 = mysqli_query($conn,$eve1);
$_SESSION['frompage']='Agentdetail';
?>
<!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>Agent 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" 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="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">Agent 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">Agent Managemnet</li>
										
										<li class="breadcrumb-item text-muted">Agent 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
					
	
	
	
	$eve = "select * from res_user_master,res_contact_master where res_user_master.umid=".$_GET['id']." and res_user_master.umid=res_contact_master.clinkid and res_contact_master.clinktype = 'Agent'";
			$re = mysqli_query($conn, $eve);
			while($rt = mysqli_fetch_assoc($re))
			{
				$umid=$rt['umid'];
				$utype='agent';
				$ustatus="Approved";
				$ufullname=$rt['contactname'].' '.$rt['cmiddlename'].' '.$rt['csurname'];
				$ucode=$rt['ucode'];
				$uaddress=$rt['caddress1'].' '.$rt['caddress2'];
				$ucontact=$rt['contactnumber'];
				$umobile2=$rt['cmobilenumber'];
				$umobile=$rt['umobile'];
				$uwhatsapp=$rt['uwhatsapp'];
				$uskype=$rt['uskype'];
				$uemail=$rt['contactemail'];
				$uwebsite=$rt['uwebsite'];
				$ubusinessname=$rt['ccompanyname'];
				
				$ubussinessyear=$rt['ubussinessyear'];
				$ubussinessregistrationnum=$rt['ubussinessregistrationnum'];
				$upannumber=$rt['upannumber'];
				$uagreementnumber=$rt['uagreementnumber'];
				$ucommissiontype=$rt['ucommissiontype'];
				$ucommissionamount=$rt['ucommissionamount'];
				$utotalcommission=$rt['utotalcommission'];
				$upaidamount=$rt['upaidamount'];
				$uoutstandingamount=$rt['uoutstandingamount'];
				$ubank=$rt['ubank'];
				$ubranch=$rt['ubranch'];
				$customermid=$rt['customermid'];
				$uaccountnumber=$rt['uaccountnumber'];
				$uifsccode=$rt['uifsccode'];
				$umicrcode=$rt['umicrcode'];
				$uaccountdetails=$rt['uaccountdetails'];
				$countrymid=$rt['ccountry'];
				$uimage=$rt['uimage'];
				if(strlen($uimage)>3)
				{
					$uimage="<img src='docs/$uimage' width='80px' height='80px'>";
				}
				
				$cname='';
				
				$eve2 = "select * from res_country_master where countrymid ='$countrymid'";
				
				$re2 = mysqli_query($conn, $eve2);
				
				if(mysqli_num_rows($re2) > 0)
				{
					
					while($rt2 = mysqli_fetch_assoc($re2))
					{
							$cname=$rt2['countryname'];
					}
				}
				$statemid=$rt['cstate'];
				
				$sname='';
				
				$eve2 = "select * from res_state_master where statemid ='$statemid'";
				
				$re2 = mysqli_query($conn, $eve2);
				
				if(mysqli_num_rows($re2) > 0)
				{
					
					while($rt2 = mysqli_fetch_assoc($re2))
					{
							$sname=$rt2['statename'];
					}
				}
				$citymid=$rt['ccity'];
				
				$ciname='';
				
				$eve2 = "select * from res_city_master where citymid ='$citymid'";
				
				$re2 = mysqli_query($conn, $eve2);
				
				if(mysqli_num_rows($re2) > 0)
				{
					
					while($rt2 = mysqli_fetch_assoc($re2))
					{
							$ciname=$rt2['cityname'];
					}
				}
				
				$areamid=$rt['carea'];
				
				$areaname='';
				
				$eve2 = "select * from res_area_master where areamid ='$areamid'";
				
				$re2 = mysqli_query($conn, $eve2);
				
				if(mysqli_num_rows($re2) > 0)
				{
					
					while($rt2 = mysqli_fetch_assoc($re2))
					{
							$areaname=$rt2['areaname'];
					}
				}
			    $upostalcode=$rt['cpostalcode'];
				
				$uagreementstartdate=$accountopendate=date("Y-m-d", strtotime($rt['uagreementstartdate']));
				$uagreementenddate=$accountopendate=date("Y-m-d", strtotime($rt['uagreementenddate']));
			
				
				
				
				$umessageapp=$rt['cmsgappname'];
				$umessageid=$rt['cmsgappid'];
				$uvideocallapp=$rt['cvideoappname'];
				$uvideocallid=$rt['cvideoappid'];
				
				$uoqneraadharnumber=$rt['uoqneraadharnumber'];
				$ugst=$rt['ugst'];
				
				
				

				//$inquirypurpose=$rt['inquirypurpose'];
				//$inquiryprefercountry=$rt['inquiryprefercountry'];
				
				//$inquirypurpose1="<button data-toggle='modal' data-target='#view-modal' data-id='$imid' id='getUser' class='btn btn-xs btn-warning'>$inquirypurpose</button>";
				
				
				
			/*$ivisaticket=$rt['ivisaticket'];
				$ivisacontactfrom=urldecode($rt['ivisacontactfrom']);
				$ivisaaddress=urldecode($rt['ivisaaddress']);
				$ivisaremarks=urldecode($rt['ivisaremarks']);
				$ivisadetail=urldecode($rt['ivisadetail']);
				$visaedit="<a data-toggle='modal' href='#responsive11' title='Edit' class='fa fa-edit fa-lg' >  </a>";
				
				$eveag = "select * from res_user_master where umid=$entrybyuserid";
				$reag = mysqli_query($conn, $eveag);
				if(mysqli_num_rows($reag) > 0)
				{
					while($rtag = mysqli_fetch_assoc($reag))
					{
						$entrybyuserid=$rtag['ufullname'];
					}
				}
				else
				{
					$entrybyuserid="";
				}
				
				$eveag1 = "select * from res_country_master where countrymid=$inquiryprefercountry";
				$reag1 = mysqli_query($conn, $eveag1);
				if(mysqli_num_rows($reag1) > 0)
				{
					while($rtag1 = mysqli_fetch_assoc($reag1))
					{
						$countryname=$rtag1['countryname'];
					}
				}
				else
				{
					$countryname="";
				} 
			
				$eve2 = "select * from res_visatype_master where visatmid='$visatmid'";
				$re2 = mysqli_query($conn, $eve2);
				$visatype="";
				while($rt2 = mysqli_fetch_assoc($re2))
				{
					$visatype=$rt2['visatype'];
				}*/
			}
			/*$eve3 = "select * from  res_payment_master where imid='$imid'";
			$re3 = mysqli_query($conn, $eve3);
			$receivedamount=0;
			while($rt3 = mysqli_fetch_assoc($re3))
			{
				$receivedamount=$rt3['receivedamount'];
			}
			$receivedamount1=$registeredamount - $receivedamount;
			
			$eve31 = "select sum(paytotalamount) as cc,sum(payrecivedamt) as cc1,sum(paypendingamt) as cc2 from  res_payments_master where imid='$imid'";
			$re31 = mysqli_query($conn, $eve31);
			$totalamt=0;
			$totalreceivedamt=0;
			$totalpendingamt=0;
			while($rt31 = mysqli_fetch_assoc($re31))
			{
				$totalamt=$rt31['cc'];
				$totalreceivedamt=$rt31['cc1'];
				$totalpendingamt=$rt31['cc2'];
			}*/
	
?>
					<!--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">
								<!--<div class="d-flex flex-wrap flex-stack gap-5 gap-lg-10">
									
									<!--begin::Button-->
									<?php /*if($_SESSION['frompage'] == 'Inquirylistpage') {?>
									<a href="inquiry.php" class="btn btn-icon btn-light btn-sm ms-auto me-lg-n7">
									<?php } else if ($_SESSION['frompage'] == 'planStudiesInquirylistpage') { ?>
									<a href="planstudiesinquiry.php" class="btn btn-icon btn-light btn-sm ms-auto me-lg-n7">
									<?php } else if ($_SESSION['frompage'] == 'AgentDetail') {  ?>
									<!--<a href="agentinquiry.php?id=<?php echo $_SESSION['agentid']; ?>" class="btn btn-icon btn-light btn-sm ms-auto me-lg-n7">
									<?php }else{ ?>
									<a href="inquiry.php" class="btn btn-icon btn-light btn-sm ms-auto me-lg-n7">
									<?php }  */?>
										<!--begin::Svg Icon | path: icons/duotune/arrows/arr074.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="M11.2657 11.4343L15.45 7.25C15.8642 6.83579 15.8642 6.16421 15.45 5.75C15.0358 5.33579 14.3642 5.33579 13.95 5.75L8.40712 11.2929C8.01659 11.6834 8.01659 12.3166 8.40712 12.7071L13.95 18.25C14.3642 18.6642 15.0358 18.6642 15.45 18.25C15.8642 17.8358 15.8642 17.1642 15.45 16.75L11.2657 12.5657C10.9533 12.2533 10.9533 11.7467 11.2657 11.4343Z" fill="currentColor" />
											</svg>
										</span>
										<!--end::Svg Icon-->
									</a>
									<!--end::Button-->
									
								
								
								<!--begin::Tab content-->
								<div class="tab-content">
									<!--begin::Tab pane-->
									<div class="tab-pane fade show active" id="User_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="d-flex justify-content-end" data-kt-user-table-toolbar="base">
													
													<!--begin::Add user-->
											<!--<a href="inquiryedit.php?id=&from=detail" class="btn 
btn-primary ">
											<!--begin::Svg Icon | path: icons/duotune/arrows/arr075.svg-->
											
											<!--end::Svg Icon--><!--Edit <i class="fa fa-edit"> </i></a>
											<!--end::Add user-->
											<!--	</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">Agent Name
                  </th>
                  <td>
                    <?php echo $ufullname;?>
                  </td>
                  <th class="fw-bold">User Type
                  </th>
                  <td>
                    <?php echo $utype;?>
                  </td>
                </tr>
				
				<tr>
                  <th class="fw-bold">Status
                  </th>
                  <td>
                    <?php echo $ustatus;?>
                  </td>
				  <th class="fw-bold">Agent Code
                  </th>
                  <td>
                    <?php echo $ucode;?>
                  </td>
                </tr>	
				
                <tr>
                  <th class="fw-bold">Address
                  </th>
                  <td >
                    <?php echo $uaddress;?>
                  </td>								
                  <th class="fw-bold">Mobile Number
                  </th>
                  <td >
                    <?php echo $umobile2;?>
                  </td>
                </tr>
				
                <tr>
                  <th class="fw-bold">Phone Number
                  </th>
                  <td >
                    <?php echo $ucontact;?>
                  </td>
				    <th class="fw-bold">Owner Aadhar Number
                  </th>
                  <td>
                    <?php echo $uoqneraadharnumber;?>
                  </td>
                </tr>
                <tr>
                  <th class="fw-bold">Skype ID
                  <td >
                    <?php echo $uskype;?>
                  </td>
                  <th class="fw-bold">Email ID
                  </th>
                  <td >
                    <?php echo $uemail;?>
                  </td>
                </tr>
                <tr>
                  <th class="fw-bold">Website
                  </th>
                  <td>
                    <?php echo $uwebsite;?>
                  </td>
                  <th class="fw-bold">User Name 
                  </th>
                  <td>
                    <?php echo $umobile;?>
                  </td>
                </tr>
				
				  
				
				
				 <tr>
                  <th class="fw-bold">Messaging App
                  </th>
                  <td>
                    <?php echo $umessageapp;?>
                  </td>
                  <th class="fw-bold">Messaging ID
                  </th>
                  <td>
                    <?php echo $umessageid;?>
                  </td>
                </tr>
				
				 <tr>
                  <th class="fw-bold">Videocall App
                  </th>
                  <td>
                    <?php echo $uvideocallapp;?>
                  </td>
                  <th class="fw-bold">Videocall ID
                  </th>
                  <td>
                    <?php echo $uvideocallid;?>
                  </td>
                </tr>
				
				 
				
				 
			   <tr>
                  <th class="fw-bold">Company Name
                  </th>
                  <td >
                    <?php echo $ubusinessname;?>
                  </td>
                
                 
				</tr>
				<tr>
                  <th class="fw-bold">Company Establish Year
                  </th>
                  <td>
                    <?php echo $ubussinessyear;?>
                  </td>
                
                  <th class="fw-bold">Company Registration Number
                  </th>
                  <td >
                    <?php echo $ubussinessregistrationnum;?>
                  </td>
				  </tr>
				  
				  <tr>
                  <th class="fw-bold">Company Country
                  </th>
                  <td>
                    <?php echo $cname;?>
                  </td>
                
                  <th class="fw-bold">Company State
                  </th>
                  <td >
                    <?php echo $sname;?>
                  </td>
				  </tr>
				  
				  <tr>
                  <th class="fw-bold">Company City
                  </th>
                  <td>
                    <?php echo $ciname;?>
                  </td>
					
					<th class="fw-bold">Company Area
                  </th>
                  <td>
                    <?php echo $areaname;?>
                  </td>
				  </tr>
				  
				  <tr>
                  <th class="fw-bold">Company Postal Code
                  </th>
                  <td >
                    <?php echo $upostalcode;?>
                  </td>
				   <th class="fw-bold">GST
                  </th>
                  <td >
                    <?php echo $ugst;?>
                  </td>
				   </tr>
				 
				  <tr>
				  <th class="fw-bold">PAN Number
                  </th>
                  <td >
                    <?php echo $upannumber;?>
                  </td>
                
                  <th class="fw-bold">Agreement Number
                  </th>
                  <td >
                    <?php echo $uagreementnumber;?>
                  </td>
				  </tr>
				  
				   <tr>
				  <th class="fw-bold">Date of Start Agreement
                  </th>
                  <td >
                    <?php echo $uagreementstartdate;?>
                  </td>
                
                  <th class="fw-bold">Date of End Agreement
                  </th>
                  <td >
                    <?php echo $uagreementenddate;?>
                  </td>
				  </tr>
				  
				  
				  
				<tr>
				  <th class="fw-bold">Account Type
                  </th>
                  <td >
                    <?php echo $ucommissiontype;?>
                  </td>
				 
                  <th class="fw-bold">Commission Amount
                  </th>
                  <td>
                    <?php echo $ucommissionamount;?>
                  </td>
                </tr>
				 <tr>
                  <th class="fw-bold">Total Commission Amount
                  </th>
                  <td >
                    <?php echo $utotalcommission;?>
                  </td>
				 
				  <th class="fw-bold">Paid Amount
                  </th>
                  <td >
                    <?php echo $upaidamount;?>
                  </td>
                </tr>
				
				<tr>
                  <th class="fw-bold">Outstanding Amount
                  </th>
                  <td >
                    <?php echo $uoutstandingamount;?>
                  </td>
				  <th class="fw-bold">Bank Name
                  </th>
                  <td >
                    <?php echo $ubank;?>
                  </td>
				 </tr>
				 
				 <tr>
                  <th class="fw-bold">Branch Name
                  </th>
                  <td >
                    <?php echo $ubranch;?>
                  </td>
				  <th class="fw-bold">Customer ID
                  </th>
                  <td >
                    <?php echo $customermid;?>
                  </td>
				 </tr>
				 
				 <tr>
                  <th class="fw-bold">Account Number
                  </th>
                  <td >
                    <?php echo $uaccountnumber;?>
                  </td>
				  <th class="fw-bold">IFSC Code
                  </th>
                  <td >
                    <?php echo $uifsccode;?>
                  </td>
				 </tr>
				 
				<tr>
				
				<th class="fw-bold">MICR Code
                  </th>
                  <td >
                    <?php echo $umicrcode;?>
                  </td>
				
				  <th class="fw-bold">Account Details
                  </th>
                  <td >
                    <?php echo $uaccountdetails;?>
                  </td>
				  
                </tr>
				<tr>
                  <th class="fw-bold">Profile Pic
                  </th>
                  <td >
                    <?php echo $uimage;?>
                  </td>
            
                  
                </tr>
				
              </table>
			  </div>
			  </div>
           
													<!--end::Card header-->
													<!--begin::Card body-->
													
													<!--end::Card body-->
												</div>
												<!--end::Payment address-->
												</div>
											
											</div>
										<!--end::Orders-->
									</div>
									<!--end::Tab pane-->
									
								</div>
							<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-->
													<div class="card-header cursor-pointer">
													<!--end::Background-->
												<!--	<div class="d-flex justify-content-end" data-kt-user-table-toolbar="base">
													
													<!--begin::Add user-->
													<div class="card-title m-0">
															<h3 class="fw-bold m-0 text-uppercase">Staff</h3>
														</div>
											<a href="#" data-bs-toggle="modal" data-bs-target="#kt_modal_add_user" class="btn btn-sm btn-primary align-self-end"><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 Staff</a>
											<!--end::Add user-->
												</div>
													<!--begin::Card header-->
													<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 class="min-w-100px">Staff Name</th>

																	<th class="min-w-70px">Contact Number</th>
																	<th class="min-w-100px">Email</th>
																		
																	<th class="min-w-100px">City</th>
																	<th class="min-w-100px">Operation</th>
																	
																</tr>
															</thead>
															<!--end::Table head-->
															<!--begin::Table body-->
															<tbody class="fw-semibold text-gray-600">
															<?php 
															//$_SESSION['frompage']='Inquirydetail';
															$eve11 = "select * from res_contact_master where clinkid=".$_GET['id']." and clinktype='AgentStaff'";
															$re11 = mysqli_query($conn, $eve11);
															while($rt11 = mysqli_fetch_assoc($re11))
															{
																
																$contactmid=$rt11['contactmid'];
																$contactname=$rt11['contactname'];
																$contactemail=$rt11['contactemail'];
																$contactnumber=$rt11['contactnumber'];
												$carea=$rt11['carea'];
												$ccity=$rt11['ccity'];
												
												$eve2 = "select * from res_city_master where citymid ='$ccity'";
				
				$re2 = mysqli_query($conn, $eve2);
				$agentcity='';
				if(mysqli_num_rows($re2) > 0)
				{
					
					while($rt2 = mysqli_fetch_assoc($re2))
					{
							$agentcity=$rt2['cityname'];
					}
				}
				
				
				
				
				
				$eve2 = "select * from res_area_master where areamid ='$carea'";
				
				$re2 = mysqli_query($conn, $eve2);
				$agentarea='';
				if(mysqli_num_rows($re2) > 0)
				{
					
					while($rt2 = mysqli_fetch_assoc($re2))
					{
							$agentarea=$rt2['areaname'];
					}
				}
				
				$adelete = "<a href='agentstaffdelete.php?id=$contactmid&umid=$umid'  class='far fa-trash-alt fa-lg'>  </a>";
																
							$status2 = ' <a href="#" data-bs-toggle="modal" data-bs-target="#view-modal4" class="fa fa-edit fa-lg"  data-id="'.$contactmid.'" id="getUser4">';
																
																$op = $status2."&nbsp;&nbsp;&nbsp;  ".$adelete;						
															
															?>
																<tr>
																	
																	<td><?php echo $contactname; ?></td>
																	
																	
																	
																	<td><?php echo $contactnumber; ?></td>
																	<!--begin::Status--
																	<td>
																		
																		<div class="badge badge-light-success">Completed</div>
																		
																	</td>
																	-end::Status-->
																	
																	<td><?php echo $contactemail; ?></td>
																	
																	<td><?php echo $agentcity; ?></td>
																	<td><?php echo $op; ?></td>
																	
																	
																</tr>
															<?php } ?>
																</tbody>
															<!--end::Table head-->
														</table>
														<!--end::Table-->
													</div>
												</div>
												
											</div>
										<!--end::Orders-->
									</div>
									<!--end::Tab pane-->
									
								</div>
								<!--end::Tab content-->
							<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-->
													<div class="card-header cursor-pointer">
													<!--end::Background-->
													
													
													<!--begin::Add user-->
													<div class="card-title m-0">
															<h3 class="fw-bold m-0 text-uppercase">Agent Branch</h3>
														</div>
														<div class="d-flex justify-content-end" data-kt-user-table-toolbar="base">
											<a href="#" data-bs-toggle="modal" data-bs-target="#kt_modal_add_user1" class="btn btn-sm btn-primary align-self-end"><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 Agent Branch</a>
											<!--end::Add user-->
											</div>
											</div>
													<!--begin::Card header-->
													<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 class="min-w-100px">Branch Name</th><th class="min-w-100px">Contact Name</th>

																	<th class="min-w-70px">Contact Number</th>
																	<th class="min-w-100px">Email</th>
																	<th class="min-w-100px">Department</th>	
																	<th class="min-w-100px">Position</th>
																	<th class="min-w-100px">Delete</th>
																	
																</tr>
															</thead>
															<!--end::Table head-->
															<!--begin::Table body-->
															<tbody class="fw-semibold text-gray-600">
															<?php 
															//$_SESSION['frompage']='Inquirydetail';
															$eve11 = "select * from res_agentbranch_master where agentmid=".$_GET['id'];
															$re11 = mysqli_query($conn, $eve11);
															while($rt11 = mysqli_fetch_assoc($re11))
															{
																
																$abmid=$rt11['abmid'];
																$abname=$rt11['abname'];
																$contactname=$rt11['abcontactname'];
																$contactemail=$rt11['abemailid'];
																$contactnumber=$rt11['abmobilenumber'];
												$abdepartment=$rt11['abdepartment'];
												$abposition=$rt11['abposition'];
												
																$adelete = "<a href='agentbranchdelete.php?id=$abmid&umid=$umid'  class='far fa-trash-alt fa-lg'>  </a>";
					$status2 = ' <a href="#" data-bs-toggle="modal" data-bs-target="#view-modal5" class="fa fa-edit fa-lg"  data-id="'.$abmid.'" id="getUser5">';
																
																$op = $status2."&nbsp;&nbsp;&nbsp;  ".$adelete;
																
																
															?>
																<tr>
																	
																	<td><?php echo $abname; ?></td>
																	<td><?php echo $contactname; ?></td>
																	
																	
																	
																	<td><?php echo $contactnumber; ?></td>
																	<!--begin::Status--
																	<td>
																		
																		<div class="badge badge-light-success">Completed</div>
																		
																	</td>
																	-end::Status-->
																	
																	<td><?php echo $contactemail; ?></td>
																	<td><?php echo $abdepartment; ?></td>
																	<td><?php echo $abposition; ?></td>
																	<td><?php echo $op; ?></td>
																	
																	
																</tr>
															<?php } ?>
																</tbody>
															<!--end::Table head-->
														</table>
														<!--end::Table-->
													</div>
												</div>
												
											</div>
										<!--end::Orders-->
									</div>
									<!--end::Tab pane-->
									
								</div>
								<!--end::Tab content-->
								<!--begin::Order history-->
											<div class="card card-flush py-4 flex-row-fluid">
												<!--begin::Card header-->
													<div class="card-header cursor-pointer">
														<!--begin::Card title-->
														<div class="card-title m-0">
															<h3 class="fw-bold m-0 text-uppercase">Country Wise Commission</h3>
														</div>
														<!--end::Card title-->
														<!--begin::Action-->
														<a href="#" data-bs-toggle="modal" data-bs-target="#user_country" 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::Action-->
													</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 class="min-w-100px">Country </th>
																	
																	<th class="min-w-100px">Structure </th>
																	<th class="min-w-100px">Value </th>
																	<th class="min-w-100px">Currency </th>
																	<th class="min-w-100px">Start Date </th>
																	<th class="min-w-100px">End Date </th>
																	<th class="min-w-100px">Status </th>
																	<th class="min-w-100px">Delete </th>

																	
																	
																</tr>
															</thead>
															<!--end::Table head-->
															<!--begin::Table body-->
															<tbody class="fw-semibold text-gray-600">
															<?php 
															
															$eve11 = "select * from res_agentcomission_master where umid=$umid  and actype='Country'";
															$re11 = mysqli_query($conn, $eve11);
															while($rt11 = mysqli_fetch_assoc($re11))
															{
																
																
																$acsdid=$rt11['acsdid'];
																$commissionstrucher=$rt11['commissionstrucher'];
																$cmcurrency=$rt11['cmcurrency'];
																$commissionstruchervalue=$rt11['commissionstruchervalue'];
																$acstatus=$rt11['acstatus'];
																$acstartdate=date("d-m-Y",strtotime($rt11['acstartdate']));
																$acenddate=date("d-m-Y",strtotime($rt11['acenddate']));
																
																		
																			
																			$countrymid=$rt11['countrymid'];
																		
																			 $eveag1 = "select * from res_country_master where countrymid=$countrymid";
																		$reag1 = mysqli_query($conn, $eveag1);
																		if(mysqli_num_rows($reag1) > 0)
																		{
																			while($rtag1 = mysqli_fetch_assoc($reag1))
																			{
																				$countryname=$rtag1['countryname'];
																			}
																		}
																		else
																		{
																			$countryname="";
																		} 
																
																$adelete = "<a href='agentcommissiondelete.php?id=$acsdid&umid=$umid'  class='far fa-trash-alt fa-lg'>  </a>";
																
																$status2 = ' <a href="#" data-bs-toggle="modal" data-bs-target="#view-modal1" class="fa fa-edit fa-lg"  data-id="'.$acsdid.'" id="getUser1">';
																
																$op = $status2."&nbsp;&nbsp;&nbsp;  ".$adelete;
																
															
															?>
																<tr>
																	
																	<td><?php echo $countryname; ?></td>
																	
																	<td><?php echo $commissionstrucher; ?></td>
																	<td><?php echo $commissionstruchervalue; ?></td>
																	<td><?php echo $cmcurrency; ?></td>
																	<td><?php echo $acstartdate; ?></td>
																	<td><?php echo $acenddate; ?></td>
																	<td><?php echo $acstatus; ?></td>
																	<td><?php echo $op; ?></td>
																	
																</tr>
															<?php } ?>
																</tbody>
															<!--end::Table head-->
														</table>
														<!--end::Table-->
													</div>
												</div>
												<!--end::Card body-->
											</div>
											<!--end::Order history-->
								<!--begin::Order history-->
											<div class="card card-flush py-4 flex-row-fluid">
												<!--begin::Card header-->
													<div class="card-header cursor-pointer">
														<!--begin::Card title-->
														<div class="card-title m-0">
															<h3 class="fw-bold m-0 text-uppercase">Sub Service Wise Commission</h3>
														</div>
														<!--end::Card title-->
														<!--begin::Action-->
														<a href="#" data-bs-toggle="modal" data-bs-target="#user_subservice" 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::Action-->
													</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 class="min-w-100px">Country </th>
																	<th class="min-w-100px">Service </th>
																	<th class="min-w-100px">Sub Service </th>
																	<th class="min-w-100px">Structure </th>
																	<th class="min-w-100px">Value </th>
																	<th class="min-w-100px">Currency </th>
<th class="min-w-100px">Start Date </th>
																	<th class="min-w-100px">End Date </th>
																	<th class="min-w-100px">Status </th>
																	<th class="min-w-100px">Delete </th>

																	
																	
																</tr>
															</thead>
															<!--end::Table head-->
															<!--begin::Table body-->
															<tbody class="fw-semibold text-gray-600">
															<?php 
															
															$eve11 = "select * from res_agentcomission_master where umid=$umid and actype = 'Service'";
															$re11 = mysqli_query($conn, $eve11);
															while($rt11 = mysqli_fetch_assoc($re11))
															{
																
																$acsdid=$rt11['acsdid'];
																$visatmid=$rt11['visatmid'];
																$subservicemid=$rt11['subservicemid'];
																$commissionstrucher=$rt11['commissionstrucher'];
																$cmcurrency=$rt11['cmcurrency'];
																	$commissionstruchervalue=$rt11['commissionstruchervalue'];
																$acstatus=$rt11['acstatus'];
																$acstartdate=date("d-m-Y",strtotime($rt11['acstartdate']));
																$acenddate=date("d-m-Y",strtotime($rt11['acenddate']));
																	
																			$eve1 = "select * from res_visatype_master where visatmid=$visatmid";

																			$re1 = mysqli_query($conn, $eve1);
																			if(mysqli_num_rows($re1) > 0)
																		{
																			while($rt1 = mysqli_fetch_assoc($re1))

																			{
																				$visatype=$rt1['visatype'];
																			}
																		}
																		else
																		{
																			$visatype="";
																		} 
																$subservicename ="";
																			 $eves = "select * from res_subservice_master where subservicemid = $subservicemid ";
																			$res = mysqli_query($conn, $eves);
																			
																			while($rts = mysqli_fetch_assoc($res))

																			{
																				$subservicename = $rts['subservicename'];
																			}
																			
																			$countrymid=$rt11['countrymid'];
																		
																			 $eveag1 = "select * from res_country_master where countrymid=$countrymid";
																		$reag1 = mysqli_query($conn, $eveag1);
																		if(mysqli_num_rows($reag1) > 0)
																		{
																			while($rtag1 = mysqli_fetch_assoc($reag1))
																			{
																				$countryname=$rtag1['countryname'];
																			}
																		}
																		else
																		{
																			$countryname="";
																		} 
																
																
																$adelete = "<a href='agentcommissiondelete.php?id=$acsdid&umid=$umid'  class='far fa-trash-alt fa-lg'>  </a>";
																$status2 = ' <a href="#" data-bs-toggle="modal" data-bs-target="#view-modal2" class="fa fa-edit fa-lg"  data-id="'.$acsdid.'" id="getUser2">';
																
																$op = $status2."&nbsp;&nbsp;&nbsp;  ".$adelete;
																
															
															?>
																<tr>
																	
																	<td><?php echo $countryname; ?></td>
																	<td><?php echo $visatype; ?></td>
																	<td><?php echo $subservicename; ?></td>
																	<td><?php echo $commissionstrucher; ?></td>
																	<td><?php echo $commissionstruchervalue; ?></td>
																	<td><?php echo $cmcurrency; ?></td>
																	<td><?php echo $acstartdate; ?></td>
																	<td><?php echo $acenddate; ?></td>
																	<td><?php echo $acstatus; ?></td>
																	<td><?php echo $op; ?></td>
																	
																</tr>
															<?php } ?>
																</tbody>
															<!--end::Table head-->
														</table>
														<!--end::Table-->
													</div>
												</div>
												<!--end::Card body-->
											</div>
											<!--end::Order history-->
											<!--begin::Order history-->
											<div class="card card-flush py-4 flex-row-fluid">
												<!--begin::Card header-->
													<div class="card-header cursor-pointer">
														<!--begin::Card title-->
														<div class="card-title m-0">
															<h3 class="fw-bold m-0 text-uppercase">Institute Wise Commission</h3>
														</div>
														<!--end::Card title-->
														<!--begin::Action-->
														<a href="#" data-bs-toggle="modal" data-bs-target="#user_college" 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::Action-->
													</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 class="min-w-100px">Institute </th>
																	<th class="min-w-100px">Country </th>
																	<th class="min-w-100px">Commission Structure </th>
																	<th class="min-w-100px">Value </th>
																	<th class="min-w-100px">Currency </th>
<th class="min-w-100px">Start Date </th>
																	<th class="min-w-100px">End Date </th>
																	<th class="min-w-100px">Status </th>
																	<th class="min-w-100px">Delete </th>


																	
																	
																</tr>
															</thead>
															<!--end::Table head-->
															<!--begin::Table body-->
															<tbody class="fw-semibold text-gray-600">
															<?php 
															
															$eve11 = "select * from res_agentcomission_master where umid=$umid and actype='Institute'";
															$re11 = mysqli_query($conn, $eve11);
															while($rt11 = mysqli_fetch_assoc($re11))
															{
																
																$acsdid=$rt11['acsdid'];
																$collegemid=$rt11['collegemid'];
																	$commissionstrucher=$rt11['commissionstrucher'];
																$cmcurrency=$rt11['cmcurrency'];
																	$commissionstruchervalue=$rt11['commissionstruchervalue'];
																$acstatus=$rt11['acstatus'];
																$acstartdate=date("d-m-Y",strtotime($rt11['acstartdate']));
																$acenddate=date("d-m-Y",strtotime($rt11['acenddate']));
																	
																			 $eveag1 = "select * from res_college_master where collegemid=$collegemid";
																		$reag1 = mysqli_query($conn, $eveag1);
																		if(mysqli_num_rows($reag1) > 0)
																		{
																			while($rtag1 = mysqli_fetch_assoc($reag1))
																			{
																				$cmname=$rtag1['cmname'];
																			}
																		}
																		else
																		{
																			$cmname="";
																		} 
																		
																		$countrymid=$rt11['countrymid'];
																		
																			 $eveag1 = "select * from res_country_master where countrymid=$countrymid";
																		$reag1 = mysqli_query($conn, $eveag1);
																		if(mysqli_num_rows($reag1) > 0)
																		{
																			while($rtag1 = mysqli_fetch_assoc($reag1))
																			{
																				$countryname=$rtag1['countryname'];
																			}
																		}
																		else
																		{
																			$countryname="";
																		} 
																
																$adelete = "<a href='agentcommissiondelete.php?id=$acsdid&umid=$umid'  class='far fa-trash-alt fa-lg'>  </a>";
																
																$status2 = ' <a href="#" data-bs-toggle="modal" data-bs-target="#view-modal3" class="fa fa-edit fa-lg"  data-id="'.$acsdid.'" id="getUser3">';
																
																$op = $status2."&nbsp;&nbsp;&nbsp;  ".$adelete;
																
																
															
															?>
																<tr>
																	
																	<td><?php echo $cmname; ?></td>
																	<td><?php echo $countryname; ?></td>
																	<td><?php echo $commissionstrucher; ?></td>
																	<td><?php echo $commissionstruchervalue; ?></td>
																	<td><?php echo $cmcurrency; ?></td>
																	<td><?php echo $acstartdate; ?></td>
																	<td><?php echo $acenddate; ?></td>
																	<td><?php echo $acstatus; ?></td>
																	<td><?php echo $op; ?></td>
																	
																</tr>
															<?php } ?>
																</tbody>
															<!--end::Table head-->
														</table>
														<!--end::Table-->
													</div>
												</div>
												<!--end::Card body-->
											</div>
											<!--end::Order history-->
											
							</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::Engage modals-->
		<!--end::Engage modals-->
		<!--begin::Modal - Add task-->
							<!--begin::Modal - Inquiry-->
							<div class="modal fade" id="kt_modal_add_user" tabindex="-1" aria-hidden="true">
								<!--begin::Modal dialog-->
								<div class="modal-dialog modal-dialog-centered mw-750px">
									<!--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>Add Staff</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_form4" class="form" action="agentstaffadd2.php" method="POST">
														<input type="hidden" name="umid" value="<?php echo $umid; ?>">
															<!--begin::Scroll-->
														<div class="row row-cols-1 row-cols-sm-3 rol-cols-md-1 row-cols-lg-3">
													<!--begin::Col-->
													<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="required">First Name</span>
																
															</label>
															<!--end::Label-->
															<!--begin::Input-->
															<div class="w-100">
																<div class="form-floating border rounded">
															<input type="text" class="form-control form-control-solid" name="scontactname" value="" required>
													</div>
													</div>
															<!--end::Input-->
														</div>
														<!--end::Input group-->
													</div>
													<!--end::Col-->
													<!--begin::Col-->
													<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="required">Middle Name</span>
																
															</label>
															<!--end::Label-->
															<!--begin::Input-->
															<div class="w-100">
																<div class="form-floating border rounded">
													<input type="text" class="form-control form-control-solid" name="scmiddlename" value="" required>
													</div>
													</div>
															<!--end::Input-->
														</div>
														<!--end::Input group-->
													</div>
													<!--end::Col-->
													<!--begin::Col-->
													<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="required">Surname</span>
																
															</label>
															<!--end::Label-->
															<!--begin::Input-->
															<div class="w-100">
																<div class="form-floating border rounded">
													<input type="text" class="form-control form-control-solid" name="scsurname" value="" required>
													</div>
													</div>
															<!--end::Input-->
														</div>
														<!--end::Input group-->
													</div>
													<!--end::Col-->
												</div>
												<!--end::Row-->
												<!--begin::Row-->
												<div class="row row-cols-1 row-cols-sm-2 rol-cols-md-1 row-cols-lg-2">
												
												<!--begin::Col-->
													<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="required">Contact Number</span>
																<i class="fas fa-exclamation-circle ms-1 fs-7" data-bs-toggle="tooltip" title="Enter contact Code"></i>
															</label>
															<!--end::Label-->
															<!--begin::Input-->
															<div class="row row-cols-lg-2 row-cols-2 row-cols-sm-2 rol-cols-md-2">
															<div class="col">
															<select class="form-select form-select-solid" data-control="select2" data-dropdown-parent="#kt_modal_add_user_form4"   name="smobilecode" >
													<?php 
																			$eve = "select * from res_country_master";

																			$re = mysqli_query($conn, $eve);
																			
																			while($rt = mysqli_fetch_assoc($re))

																			{											
																				
																				$countrycode=$rt['countrycode'];
																				$countrysortname=$rt['countrysortname'];
																				
																				echo "<option value='$countrycode'>$countrycode ($countrysortname)</option>";
																				 
																			}
																			
																	?>
													</select>
															</div>
															<div class="col-md-9">
															<input type="text" class="form-control form-control-solid" name="scontactnumber" value="" required>
															</div>
															</div></div>
														
															<!--end::Input-->

														<!--end::Input group-->
													</div>
													<!--end::Col-->
													
												<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="required">Mobile Number</span>
																<i class="fas fa-exclamation-circle ms-1 fs-7" data-bs-toggle="tooltip" ></i>
															</label>
															<!--end::Label-->
															<!--begin::Input-->
															
												<div class="row row-cols-lg-2 row-cols-2 row-cols-sm-2 rol-cols-md-2">
															<div class="col">
															<select class="form-select form-select-solid" data-control="select2"  data-dropdown-parent="#kt_modal_add_user_form4"  name="shomemobilecode" >
													<?php 
																			$eve = "select * from res_country_master";

																			$re = mysqli_query($conn, $eve);
																			
																			while($rt = mysqli_fetch_assoc($re))

																			{											
																				
																				$countrycode=$rt['countrycode'];
																				$countrysortname=$rt['countrysortname'];
																				
																				echo "<option value='$countrycode'>$countrycode ($countrysortname)</option>";
																				 
																			}
																			
																	?>
													</select>
															</div>
															<div class="col-md-9">
															<input type="text" class="form-control form-control-solid" name="scmobilenumber" value="" required>
															</div>
															</div>
															<!--end::Input-->
														</div>
														<!--end::Input group-->
													</div>
													
													</div>
												<!--end::Row-->
												<!--begin::Row-->
												<div class="row row-cols-1 row-cols-sm-2 rol-cols-md-1 row-cols-lg-2">
												
												<!--begin::Col-->
													<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="required">Email</span>
																<i class="fas fa-exclamation-circle ms-1 fs-7" data-bs-toggle="tooltip" title="Enter contact Code"></i>
															</label>
															<!--end::Label-->
															<!--begin::Input-->
															<input type="text" class="form-control form-control-solid" name="scontactemail" value="" required>
															<!--end::Input-->
														</div>
														<!--end::Input group-->
													</div>
													<!--end::Col-->
													
												<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="required">Alternate Email</span>
																
															</label>
															<!--end::Label-->
															<!--begin::Input-->
															
												<input type="text" class="form-control form-control-solid" name="scaltenateemail" value="" required>
															<!--end::Input-->
														</div>
														<!--end::Input group-->
													</div>
													
													</div>
												<!--end::Row-->
												
													<!--begin::Row-->
												<div class="row row-cols-1 row-cols-sm-2 rol-cols-md-1 row-cols-lg-2">
												<!--end::Col-->
													<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span>Messaging app</span>
																
															</label>
															<!--end::Label-->
															<!--begin::Input-->
													<select class="form-select form-select-solid" data-control="select2" data-dropdown-parent="#kt_modal_add_user_form4" name="scmsgappname" >
													<option value="0">select</option>
													<?php 
																			$eve = "select * from res_messagingapp_master";

																			$re = mysqli_query($conn, $eve);
																			
																			while($rt = mysqli_fetch_assoc($re))

																			{											
																				
																				$messagingappmid =$rt['messagingappmid'];
																				$messagingappname=$rt['messagingappname'];
																				
																				echo "<option value='$messagingappname '>$messagingappname</option>";
																				 
																			}
																			
																			
																			
																			
																	?>
													</select>
													<!--end::Input-->
														</div>
														<!--end::Input group-->
													</div>
													  <!--end::Col-->
													<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span>Messaging App ID</span>
																
															</label>
															<!--end::Label-->
															<!--begin::Input-->
															<input type="text" class="form-control form-control-solid" name="scmsgappid" value="" />
													<!--end::Input-->
														</div>
														<!--end::Input group-->
													</div>
													</div>
													<!--end::Col-->
													<!--begin::Row-->
												<div class="row row-cols-1 row-cols-sm-2 rol-cols-md-1 row-cols-lg-2">
												<!--end::Col-->
													<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span>Video Calling app</span>
																
															</label>
															<!--end::Label-->
															<!--begin::Input-->
													<select class="form-select form-select-solid" data-control="select2" data-dropdown-parent="#kt_modal_add_user_form4" name="scvideoappname" >
													<option value="0">select</option>
													<?php 
																			$eve = "select * from res_videocallingapp_master";

																			$re = mysqli_query($conn, $eve);
																			
																			while($rt = mysqli_fetch_assoc($re))

																			{											
																				
																				$videocallingappmid =$rt['videocallingappmid'];
																				$videocallingappname=$rt['videocallingappname'];
																				
																				echo "<option value='$videocallingappname'>$videocallingappname</option>";
																				 
																			}
																			
																			
																			
																			
																	?>
													</select>
													<!--end::Input-->
														</div>
														<!--end::Input group-->
													</div>
													  <!--end::Col-->
													<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span>Video Calling App ID</span>
																
															</label>
															<!--end::Label-->
															<!--begin::Input-->
															<input type="text" class="form-control form-control-solid" name="scvideoappid" value="" />
													<!--end::Input-->
														</div>
														<!--end::Input group-->
													</div>
													</div>
													<!--end::Col-->
												
												<!--begin::Row-->
												<div class="row row-cols-1 row-cols-sm-2 rol-cols-md-1 row-cols-lg-2">
												 <!--end::Col-->
													<!--begin::Col-->
													<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="required">Department</span>
																<i class="fas fa-exclamation-circle ms-1 fs-7" data-bs-toggle="tooltip" title="Enter contact Code"></i>
															</label>
															<!--end::Label-->
															<!--begin::Input-->
															<select class="form-select form-select-solid" data-control="select2"  name="scontactdepartmnet" id="departmentmid">
													<option value="0">select</option>
													<?php 
																			$eve = "select * from res_department_master";

																			$re = mysqli_query($conn, $eve);
																			
																			while($rt = mysqli_fetch_assoc($re))

																			{											
																				
																				$departmentmid=$rt['departmentmid'];
																				$dname=$rt['departmentname'];
																				
																				echo "<option value='$departmentmid'>$dname</option>";
																				 
																			}
																			
																			
																			
																			
																	?>
													</select>
															<!--end::Input-->
														</div>
														<!--end::Input group-->
													</div>
													<!--end::Col-->
													
												<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="required">Position</span>
																<i class="fas fa-exclamation-circle ms-1 fs-7" data-bs-toggle="tooltip" ></i>
															</label>
															<!--end::Label-->
															<!--begin::Input-->
															
												<select class="form-select form-select-solid" data-control="select2"  name="scposition" data-dropdown-parent="#kt_modal_add_user_form4" id="sdepartmentmid">
													<option value="0">select</option>
													<?php 
																			$eve = "select * from res_role_master";

																			$re = mysqli_query($conn, $eve);
																			
																			while($rt = mysqli_fetch_assoc($re))

																			{											
																				
																				$rolemid=$rt['rolemid'];
																				$rolename=$rt['rolename'];
																				
																				echo "<option value='$rolemid'>$rolename</option>";
																				 
																			}
																			
																			
																			
																			
																	?>
													</select>
																		<!--end::Input-->
														</div>
														<!--end::Input group-->
													</div>
													
													</div>
												<!--end::Row-->
												
												<!--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">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="required">Remarks</span>
																
															</label>
															<!--end::Label-->
															<!--begin::Input-->
															<textarea type="text" class="form-control form-control-solid" name="scremarks" value="" required></textarea>
															<!--end::Input-->
														</div>
														<!--end::Input group-->
													</div>
													<!--end::Col-->
												</div>
												<!--end::Row-->
																										
															<!--end::Scroll-->
															<!--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>
															
															<!--end::Actions-->
														</form>
														<!--end::Form-->
													</div>
										<!--end::Modal body-->
									</div>
									<!--end::Modal content-->
								</div>
								<!--end::Modal dialog-->
							</div>
							<!--begin::Modal - Status Update-->
							<div class="modal fade" id="view-modal4" role="dialog" aria-labelledby="myModalLabel" tabindex="-1" aria-hidden="true">
								<!--begin::Modal dialog-->
								<div class="modal-dialog modal-dialog-centered mw-750px">
									<!--begin::Modal content-->
									<div class="modal-content rounded">
										<!--begin::Modal header-->
										<div class="modal-header pb-0 border-0 justify-content-end">
											<!--begin::Close-->
											<div class="btn btn-sm btn-icon btn-active-color-primary" 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_form11" class="form" action="agentstaffedit2.php" method="POST">
														<input type="hidden" name="umid" value="<?php echo $umid; ?>">
															<!--begin::Scroll-->
															<!-- content will be load here -->
															<div id="dynamic-content4"></div>
														<!--end::Scroll-->
															<!--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>
															
															<!--end::Actions-->
														</form>
														<!--end::Form-->
													</div>
										<!--end::Modal body-->
									</div>
									<!--end::Modal content-->
								</div>
								<!--end::Modal dialog-->
							</div>
							<!--end::Modal - Status Update-->
							
			
							
							<!--begin::Modal - Inquiry-->
							<div class="modal fade" id="kt_modal_add_user1" tabindex="-1" aria-hidden="true">
								<!--begin::Modal dialog-->
								<div class="modal-dialog modal-dialog-centered mw-850px">
									<!--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>Add Branch</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_form5" class="form" action="agentbranchadd2.php" method="POST">
														<input type="hidden" name="umid" value="<?php echo $umid; ?>">
															<!--begin::Scroll-->
														<div class="row row-cols-1 row-cols-sm-2 rol-cols-md-1 row-cols-lg-2">
													<!--begin::Col-->
													<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="required">Company Name</span>
																
															</label>
															<!--end::Label-->
															<!--begin::Input-->
															<div class="w-100">
																<div class="form-floating border rounded">
															<input type="text" class="form-control form-control-solid" name="ubusinessname" value="<?php echo $ubusinessname; ?>" disabled>
													</div>
													</div>
															<!--end::Input-->
														</div>
														<!--end::Input group-->
													</div>
													<!--end::Col-->
													<!--begin::Col-->
													<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="required">Branch Name</span>
																
															</label>
															<!--end::Label-->
															<!--begin::Input-->
															<div class="w-100">
																<div class="form-floating border rounded">
													<input type="text" class="form-control form-control-solid" name="abname" value="" required>
													</div>
													</div>
															<!--end::Input-->
														</div>
														<!--end::Input group-->
													</div>
													<!--end::Col-->
													</div>
												<!--begin::Scroll-->
														<div class="row row-cols-1 row-cols-sm-3 rol-cols-md-1 row-cols-lg-3">
													<!--begin::Col-->
													<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="required">Contact Name</span>
																
															</label>
															<!--end::Label-->
															<!--begin::Input-->
															<div class="w-100">
																<div class="form-floating border rounded">
															<input type="text" class="form-control form-control-solid" name="abcontactname" value="" required>
													</div>
													</div>
															<!--end::Input-->
														</div>
														<!--end::Input group-->
													</div>
													<!--end::Col-->
													<!--begin::Col-->
													<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="required">Mobile Number</span>
																
															</label>
															<!--end::Label-->
															<!--begin::Input-->
															<div class="w-100">
																<div class="form-floating border rounded">
													<input type="text" class="form-control form-control-solid" name="abmobilenumber" value="" required>
													</div>
													</div>
															<!--end::Input-->
														</div>
														<!--end::Input group-->
													</div>
													<!--end::Col-->
													<!--begin::Col-->
													<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="required">Email Id</span>
																
															</label>
															<!--end::Label-->
															<!--begin::Input-->
															<div class="w-100">
																<div class="form-floating border rounded">
													<input type="text" class="form-control form-control-solid" name="abemailid" value="" required>
													</div>
													</div>
															<!--end::Input-->
														</div>
														<!--end::Input group-->
													</div>
													<!--end::Col-->
												</div>
												<!--end::Row-->
												
												<!--begin::Row-->
												<div class="row row-cols-1 row-cols-sm-2 rol-cols-md-1 row-cols-lg-2">
												 <!--end::Col-->
													<!--begin::Col-->
													<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="required">Department</span>
																<i class="fas fa-exclamation-circle ms-1 fs-7" data-bs-toggle="tooltip" title="Enter contact Code"></i>
															</label>
															<!--end::Label-->
															<!--begin::Input-->
															<select class="form-select form-select-solid" data-control="select2" data-dropdown-parent="#kt_modal_add_user_form5" name="bcontactdepartmnet" id="departmentmid">
													<option value="0">select</option>
													<?php 
																			$eve = "select * from res_department_master";

																			$re = mysqli_query($conn, $eve);
																			
																			while($rt = mysqli_fetch_assoc($re))

																			{											
																				
																				$departmentmid=$rt['departmentmid'];
																				$dname=$rt['departmentname'];
																				
																				echo "<option value='$dname'>$dname</option>";
																				 
																			}
																			
																			
																			
																			
																	?>
													</select>
															<!--end::Input-->
														</div>
														<!--end::Input group-->
													</div>
													<!--end::Col-->
													
												<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="required">Position</span>
																<i class="fas fa-exclamation-circle ms-1 fs-7" data-bs-toggle="tooltip" ></i>
															</label>
															<!--end::Label-->
															<!--begin::Input-->
															
												<select class="form-select form-select-solid" data-control="select2"  name="bcposition" data-dropdown-parent="#kt_modal_add_user_form5" id="bdepartmentmid">
													<option value="0">select</option>
													<?php 
																			$eve = "select * from res_role_master";

																			$re = mysqli_query($conn, $eve);
																			
																			while($rt = mysqli_fetch_assoc($re))

																			{											
																				
																				$rolemid=$rt['rolemid'];
																				$rolename=$rt['rolename'];
																				
																				echo "<option value='$rolename'>$rolename</option>";
																				 
																			}
																			
																			
																			
																			
																	?>
													</select>
																		<!--end::Input-->
														</div>
														<!--end::Input group-->
													</div>
													
													</div>
												<!--end::Row-->
												
												<!--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">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="required">Note</span>
																
															</label>
															<!--end::Label-->
															<!--begin::Input-->
															<textarea type="text" class="form-control form-control-solid" name="bcremarks" value="" required></textarea>
															<!--end::Input-->
														</div>
														<!--end::Input group-->
													</div>
													<!--end::Col-->
												</div>
												<!--end::Row-->
																										
															<!--end::Scroll-->
															<!--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>
															
															<!--end::Actions-->
														</form>
														<!--end::Form-->
													</div>
										<!--end::Modal body-->
									</div>
									<!--end::Modal content-->
								</div>
								<!--end::Modal dialog-->
							</div>
								<!--begin::Modal - Status Update-->
							<div class="modal fade" id="view-modal5" role="dialog" aria-labelledby="myModalLabel" tabindex="-1" aria-hidden="true">
								<!--begin::Modal dialog-->
								<div class="modal-dialog modal-dialog-centered mw-750px">
									<!--begin::Modal content-->
									<div class="modal-content rounded">
										<!--begin::Modal header-->
										<div class="modal-header pb-0 border-0 justify-content-end">
											<!--begin::Close-->
											<div class="btn btn-sm btn-icon btn-active-color-primary" 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_form11" class="form" action="agentbranchedit2.php" method="POST">
														<input type="hidden" name="umid" value="<?php echo $umid; ?>">
															<!--begin::Scroll-->
															<!-- content will be load here -->
															<div id="dynamic-content5"></div>
														<!--end::Scroll-->
															<!--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>
															
															<!--end::Actions-->
														</form>
														<!--end::Form-->
													</div>
										<!--end::Modal body-->
									</div>
									<!--end::Modal content-->
								</div>
								<!--end::Modal dialog-->
							</div>
							<!--end::Modal - Status Update-->
												
						<!--begin::Modal - Student follow up-->
							<div class="modal fade" id="user_country" tabindex="-1" aria-hidden="true">
								<!--begin::Modal dialog-->
								<div class="modal-dialog modal-dialog-centered mw-950px">
									<!--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>Add Country Wise Commission</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_form1" class="form" action="agentcountry2.php" method="POST">
														<input type="hidden" name="umid" value="<?php echo $umid; ?>">
															<!--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=" fw-semibold fs-6 mb-2"> Country</label>
																	<!--end::Label-->
																	<!--begin::Input-->
																	<select class="form-select form-select-solid" data-control="select2"  data-dropdown-parent="#kt_modal_add_user_form1"  name="countrymid" id="countrymidd">
													<option value="0">Select</option>
													
													<?php 
																			$eve = "select * from res_country_master";

																			$re = mysqli_query($conn, $eve);
																			
																			while($rt = mysqli_fetch_assoc($re))

																			{											
																				
																				$countrymid=$rt['countrymid'];
																				$countryname=$rt['countryname'];
																				
																				echo "<option value='$countrymid'>$countryname</option>";
																				 
																			}
																			
																	?>
													</select>
																	<!--end::Input-->
																</div>
																<!--end::Input group-->
																</div>
													<!--end::Col-->
													</div>
												<!--end::Row-->
												
												<!--begin::Row-->
												<div class="row row-cols-1 row-cols-sm-2 rol-cols-md-1 row-cols-lg-2">
												<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="required">Start Date</span>
																
															</label>
															<!--end::Label-->
															<!--begin::Input-->
															
													
													<input class="form-control form-control-solid fw-bold pe-5" placeholder="Select date" name="acstartdate" id="kt_daterangepicker_1"/>
															<!--end::Input-->
														</div>
														<!--end::Input group-->
													</div>
													
													<!--begin::Col-->
													<div class="col" >
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="required">End Date</span>
																
															</label>
															<!--end::Label-->
															<!--begin::Input-->
															<input class="form-control form-control-solid fw-bold pe-5" placeholder="Select date" name="acenddate" id="kt_daterangepicker_2"/>
															<!--end::Input-->
														</div>
														<!--end::Input group-->
													</div>
													<!--end::Col-->
													
													</div>
												<!--end::Row-->
												<!--begin::Row-->
												<div class="row row-cols-1 row-cols-sm-2 rol-cols-md-1 row-cols-lg-2">
												<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="required">Commission Structure</span>
																
															</label>
															<!--end::Label-->
															<!--begin::Input-->
															
													
													<select class="form-select form-select-solid" data-control="select2"  name="commissionstrucher" data-dropdown-parent="#kt_modal_add_user_form1"  id="commissionstrucher23">
													
													<option value="Percentage">Percentage</option>
													<option value="Fixed Amount">Fixed Amount</option>
													<option value="Slab">Slab</option>
													</select>
															<!--end::Input-->
														</div>
														<!--end::Input group-->
													</div>
													
													<!--begin::Col-->
													<div class="col" id="value23">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="required">Value</span>
																
															</label>
															<!--end::Label-->
															<!--begin::Input-->
															<input type="text" class="form-control form-control-solid" name="commissionstruchervalue" value="" >
															<!--end::Input-->
														</div>
														<!--end::Input group-->
													</div>
													<!--end::Col-->
													<!--begin::Col-->
													<div class="col" id="slab23">
														<!--begin::Input group-->
														<div class="fv-row mb-7" >
													<table id="items23" border="0" >
											<tr>
												<th>Slab </th>
												<th>Value </th>
												</tr>
										</table>
										<input type="button"  id="add_item23" value="Add" class="btn btn-primary btn-sm"/>
										
												</div>
														<!--end::Input group-->
													</div>
													<!--end::Col-->
													</div>
												<!--end::Row-->
												<!--begin::Row-->
												<div class="row row-cols-1 row-cols-sm-2 rol-cols-md-1 row-cols-lg-2">
													
													<!--begin::Col-->
													<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="">Tax</span>
															</label>
															<!--end::Label-->
																
																<select class="form-select form-select-solid" data-control="select2"  data-dropdown-parent="#kt_modal_add_user_form1"   name="ctaxname" >
													<option value="GST">GST</option>
																	<option value="HST">HST</option>
																	<option value="PST">PST</option>
																	<option value="QST">QST</option>
																	</select>
																</div>
														<!--end::Input group-->
													</div>
													<!--end::Col-->
													<!--begin::Col-->
													<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																Tax Percentage
															</label>
															<!--end::Label-->
															<input type="number" class="form-control form-control-solid" name="ctaxpercent" value="" >
															
															</div>
														<!--end::Input group-->
													</div>
													<!--end::Col-->
													
												</div>
												
												<!--end::Row-->
												<!--begin::Row-->
												<div class="row row-cols-1 row-cols-sm-2 rol-cols-md-1 row-cols-lg-2">
													<!--begin::Col-->
													<!--begin::Col-->
													<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="">Tax Included/Excluded</span>
															</label>
															<!--end::Label-->
																
																<select class="form-select form-select-solid" data-control="select2" data-dropdown-parent="#kt_modal_add_user_form1"   name="cmgstincexc" >
													<option value="Included">Included</option>
																	<option value="Excluded">Excluded</option>
																	<option value="Not Applicable">Not Applicable</option>
																	
																	</select>
																</div>
														<!--end::Input group-->
													</div>
													<!--end::Col-->
												<!--begin::Col-->
													<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="">Currency </span>
															</label>
															<!--end::Label-->
															<select class="form-select form-select-solid" data-control="select2" data-dropdown-parent="#kt_modal_add_user_form1"   name="cmcurrency">
													<?php 
																			$eve1 = "select * from res_country_master ";

																			$re1 = mysqli_query($conn, $eve1);
																			
																			while($rt1 = mysqli_fetch_assoc($re1))

																			{											
																				
																				
																				$countrycurrency=$rt1['countrycurrency'];
																				
																				echo "<option value='$countrycurrency'>$countrycurrency</option>";
																				 
																			}
																			
																	?>
													</select></div>
														<!--end::Input group-->
													</div>
													<!--end::Col-->
													
												</div>
												
												<!--end::Row-->
												<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																Remarks
															</label>
															<!--end::Label-->
															<textarea type="number" class="form-control form-control-solid" name="acmremark" value="" ></textarea>
															
															</div>
														<!--end::Input group-->
																
															<!--end::Scroll-->
															<!--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>
															
															<!--end::Actions-->
														</form>
														<!--end::Form-->
													</div>
										<!--end::Modal body-->
									</div>
									<!--end::Modal content-->
								</div>
								<!--end::Modal dialog-->
							</div>
							<!--end::Modal - Student follow up-->
							<!--begin::Modal - Status Update-->
							<div class="modal fade" id="view-modal1" role="dialog" aria-labelledby="myModalLabel" tabindex="-1" aria-hidden="true">
								<!--begin::Modal dialog-->
								<div class="modal-dialog modal-dialog-centered mw-750px">
									<!--begin::Modal content-->
									<div class="modal-content rounded">
										<!--begin::Modal header-->
										<div class="modal-header pb-0 border-0 justify-content-end">
											<!--begin::Close-->
											<div class="btn btn-sm btn-icon btn-active-color-primary" 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_form11" class="form" action="editagentcountry2.php" method="POST">
														<input type="hidden" name="umid" value="<?php echo $umid; ?>">
															<!--begin::Scroll-->
															<!-- content will be load here -->
															<div id="dynamic-content1"></div>
														<!--end::Scroll-->
															<!--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>
															
															<!--end::Actions-->
														</form>
														<!--end::Form-->
													</div>
										<!--end::Modal body-->
									</div>
									<!--end::Modal content-->
								</div>
								<!--end::Modal dialog-->
							</div>
							<!--end::Modal - Status Update-->
							
			<!--begin::Modal - Student follow up-->
							<div class="modal fade" id="user_subservice" tabindex="-1" aria-hidden="true">
								<!--begin::Modal dialog-->
								<div class="modal-dialog modal-dialog-centered mw-950px">
									<!--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>Add Sub Service Wise Commission</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_form2" class="form" action="agentsubservice2.php" method="POST">
														<input type="hidden" name="umid" value="<?php echo $umid; ?>">
															<!--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=" fw-semibold fs-6 mb-2"> Country</label>
																	<!--end::Label-->
																	<!--begin::Input-->
																	<select class="form-select form-select-solid" data-control="select2" data-dropdown-parent="#kt_modal_add_user_form2"   name="countrymid" id="countrymid">
													<option value="0">Select</option>
													
													<?php 
																			$eve = "select * from res_country_master";

																			$re = mysqli_query($conn, $eve);
																			
																			while($rt = mysqli_fetch_assoc($re))

																			{											
																				
																				$countrymid=$rt['countrymid'];
																				$countryname=$rt['countryname'];
																				
																				echo "<option value='$countrymid'>$countryname</option>";
																				 
																			}
																			
																	?>
													</select>
																	<!--end::Input-->
																</div>
																<!--end::Input group-->
																</div>
													<!--end::Col-->
													</div>
												<!--end::Row-->
												
															<!--begin::Row-->
												<div class="row row-cols-1 row-cols-sm-2 rol-cols-md-1 row-cols-lg-2">
													
													<!--begin::Col-->
													<div class="col fv-row">
																<!--begin::Input group-->
																<div class="fv-row mb-7">
																	<!--begin::Label-->
																	<label class=" fw-semibold fs-6 mb-2"> Service</label>
																	<!--end::Label-->
																	<!--begin::Input-->
																	<select class="form-select form-select-solid" data-control="select2" data-dropdown-parent="#kt_modal_add_user_form2"  name="visatmid" id="visatmid">
													<option value="0">Select</option>
													
													
													<?php 
																			$eve1 = "select * from res_visatype_master";

																			$re1 = mysqli_query($conn, $eve1);
																			
																			while($rt1 = mysqli_fetch_assoc($re1))

																			{											
																				
																				
																				
																				
																				$visatype=$rt1['visatype'];
																				$visatmid=$rt1['visatmid'];
																				
																				echo "<option value='$visatmid'>$visatype</option>";
																				 
																			}
																			
																	?>
													</select>
																	<!--end::Input-->
																</div>
																<!--end::Input group-->
																</div>
													<!--end::Col-->
													
													<!--begin::Col-->
													<div class="col fv-row" id="subservice1">
																<!--begin::Input group-->
																<div class="fv-row mb-7">
																	<!--begin::Label-->
																	<label class="required fw-semibold fs-6 mb-2">Preffered Sub Service</label>
																	<!--end::Label-->
																	<!--begin::Input-->
																	<select class="form-select form-select-solid" data-control="select2" data-dropdown-parent="#kt_modal_add_user_form2"  name="subservicemid" id="subservice">
												<option value="0">Select</option>
													</select>
																	<!--end::Input-->
																</div>
																<!--end::Input group-->
																</div>
													<!--end::Col-->
													</div>
												<!--end::Row-->
												<!--begin::Row-->
												<div class="row row-cols-1 row-cols-sm-2 rol-cols-md-1 row-cols-lg-2">
												<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="required">Start Date</span>
																
															</label>
															<!--end::Label-->
															<!--begin::Input-->
															
													
													<input class="form-control form-control-solid fw-bold pe-5" placeholder="Select date" name="acstartdate" id="kt_daterangepicker_3"/>
															<!--end::Input-->
														</div>
														<!--end::Input group-->
													</div>
													
													<!--begin::Col-->
													<div class="col" >
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="required">End Date</span>
																
															</label>
															<!--end::Label-->
															<!--begin::Input-->
															<input class="form-control form-control-solid fw-bold pe-5" placeholder="Select date" name="acenddate" id="kt_daterangepicker_4"/>
															<!--end::Input-->
														</div>
														<!--end::Input group-->
													</div>
													<!--end::Col-->
													
													</div>
												<!--end::Row-->
												
												<!--begin::Row-->
												<div class="row row-cols-1 row-cols-sm-2 rol-cols-md-1 row-cols-lg-2">
												<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="required">Commission Structure</span>
																
															</label>
															<!--end::Label-->
															<!--begin::Input-->
															
													
													<select class="form-select form-select-solid" data-control="select2"  name="commissionstrucher" data-dropdown-parent="#kt_modal_add_user_form2" id="commissionstrucher">
													
													<option value="Percentage">Percentage</option>
													<option value="Fixed Amount">Fixed Amount</option>
													<option value="Slab">Slab</option>
													</select>
															<!--end::Input-->
														</div>
														<!--end::Input group-->
													</div>
													
													<!--begin::Col-->
													<div class="col" id="value">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="required">Value</span>
																
															</label>
															<!--end::Label-->
															<!--begin::Input-->
															<input type="text" class="form-control form-control-solid" name="commissionstruchervalue" value="" >
															<!--end::Input-->
														</div>
														<!--end::Input group-->
													</div>
													<!--end::Col-->
													<!--begin::Col-->
													<div class="col" id="slab">
														<!--begin::Input group-->
														<div class="fv-row mb-7" >
													<table id="items" border="0" >
											<tr>
												<th>Slab </th>
												<th>Value </th>
												</tr>
										</table>
										<input type="button"  id="add_item" value="Add" class="btn btn-primary btn-sm"/>
										
												</div>
														<!--end::Input group-->
													</div>
													<!--end::Col-->
													</div>
												<!--end::Row-->
												<!--begin::Row-->
												<div class="row row-cols-1 row-cols-sm-2 rol-cols-md-1 row-cols-lg-2">
													
													<!--begin::Col-->
													<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="">Tax</span>
															</label>
															<!--end::Label-->
																
																<select class="form-select form-select-solid" data-control="select2"  data-dropdown-parent="#kt_modal_add_user_form2" name="ctaxname" >
													<option value="GST">GST</option>
																	<option value="HST">HST</option>
																	<option value="PST">PST</option>
																	<option value="QST">QST</option>
																	</select>
																</div>
														<!--end::Input group-->
													</div>
													<!--end::Col-->
													<!--begin::Col-->
													<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																Tax Percentage
															</label>
															<!--end::Label-->
															<input type="number" class="form-control form-control-solid" name="ctaxpercent" value="" >
															
															</div>
														<!--end::Input group-->
													</div>
													<!--end::Col-->
													
												</div>
												
												<!--end::Row-->
												<!--begin::Row-->
												<div class="row row-cols-1 row-cols-sm-2 rol-cols-md-1 row-cols-lg-2">
													<!--begin::Col-->
													<!--begin::Col-->
													<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="">Tax Included/Excluded</span>
															</label>
															<!--end::Label-->
																
																<select class="form-select form-select-solid" data-control="select2" data-dropdown-parent="#kt_modal_add_user_form2"  name="cmgstincexc" >
													<option value="Included">Included</option>
																	<option value="Excluded">Excluded</option>
																	<option value="Not Applicable">Not Applicable</option>
																	
																	</select>
																</div>
														<!--end::Input group-->
													</div>
													<!--end::Col-->
												<!--begin::Col-->
													<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="">Currency </span>
															</label>
															<!--end::Label-->
															<select class="form-select form-select-solid" data-control="select2" data-dropdown-parent="#kt_modal_add_user_form2"  name="cmcurrency">
													<?php 
																			$eve1 = "select * from res_country_master ";

																			$re1 = mysqli_query($conn, $eve1);
																			
																			while($rt1 = mysqli_fetch_assoc($re1))

																			{											
																				
																				
																				$countrycurrency=$rt1['countrycurrency'];
																				
																				echo "<option value='$countrycurrency'>$countrycurrency</option>";
																				 
																			}
																			
																	?>
													</select></div>
														<!--end::Input group-->
													</div>
													<!--end::Col-->
													
												</div>
												
												<!--end::Row-->
												<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																Remarks
															</label>
															<!--end::Label-->
															<textarea type="number" class="form-control form-control-solid" name="acmremark" value="" ></textarea>
															
															</div>
														<!--end::Input group-->
																
															<!--end::Scroll-->
															<!--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>
															
															<!--end::Actions-->
														</form>
														<!--end::Form-->
													</div>
										<!--end::Modal body-->
									</div>
									<!--end::Modal content-->
								</div>
								<!--end::Modal dialog-->
							</div>
							<!--end::Modal - Student follow up-->
							<!--begin::Modal - Status Update-->
							<div class="modal fade" id="view-modal2" role="dialog" aria-labelledby="myModalLabel" tabindex="-1" aria-hidden="true">
								<!--begin::Modal dialog-->
								<div class="modal-dialog modal-dialog-centered mw-750px">
									<!--begin::Modal content-->
									<div class="modal-content rounded">
										<!--begin::Modal header-->
										<div class="modal-header pb-0 border-0 justify-content-end">
											<!--begin::Close-->
											<div class="btn btn-sm btn-icon btn-active-color-primary" 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_form11" class="form" action="editagentservice2.php" method="POST">
														<input type="hidden" name="umid" value="<?php echo $umid; ?>">
															<!--begin::Scroll-->
															<!-- content will be load here -->
															<div id="dynamic-content2"></div>
														<!--end::Scroll-->
															<!--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>
															
															<!--end::Actions-->
														</form>
														<!--end::Form-->
													</div>
										<!--end::Modal body-->
									</div>
									<!--end::Modal content-->
								</div>
								<!--end::Modal dialog-->
							</div>
							<!--end::Modal - Status Update-->
							
			<!--begin::Modal - Student follow up-->
							<div class="modal fade" id="user_college" tabindex="-1" aria-hidden="true">
								<!--begin::Modal dialog-->
								<div class="modal-dialog modal-dialog-centered mw-950px">
									<!--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>Add Institute Wise Commission</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_form3" class="form" action="agentcollege2.php"  method="POST">
														<input type="hidden" name="umid" value="<?php echo $umid; ?>">
															<!--begin::Scroll-->
																		<!--begin::Row-->
												<div class="row row-cols-1 row-cols-sm-2 rol-cols-md-1 row-cols-lg-2">
													
													<!--begin::Col-->
													<div class="col-md-6 fv-row">
																<!--begin::Input group-->
																<div class="fv-row mb-7">
																	<!--begin::Label-->
																	<label class=" fw-semibold fs-6 mb-2"> Country</label>
																	<!--end::Label-->
																	<!--begin::Input-->
																	<select class="form-select form-select-solid" data-control="select2"  data-dropdown-parent="#kt_modal_add_user_form3" name="countrymid" id="countrymid1">
													<option value="0">Select</option>
													
													<?php 
																			$eve = "select * from res_country_master";

																			$re = mysqli_query($conn, $eve);
																			
																			while($rt = mysqli_fetch_assoc($re))

																			{											
																				
																				$countrymid=$rt['countrymid'];
																				$countryname=$rt['countryname'];
																				
																				echo "<option value='$countrymid'>$countryname</option>";
																				 
																			}
																			
																	?>
													</select>
																	<!--end::Input-->
																</div>
																<!--end::Input group-->
																</div>
													<!--end::Col-->
													
													<!--begin::Col-->
													<div class="col-md-6 fv-row">
																<!--begin::Input group-->
																<div class="fv-row mb-7">
																	<!--begin::Label-->
																	<label class=" fw-semibold fs-6 mb-2"> Institute</label>
																	<!--end::Label-->
																	<!--begin::Input-->
																	<!--begin::Input-->
													<select class="form-select form-select-solid" data-control="select2"   name="collegemid[]" id="collegemid1" data-dropdown-parent="#kt_modal_add_user_form3" multiple>
														<option value="0">Select</option>
													<?php 
																			$eve = "select * from res_college_master,res_contact_master where res_contact_master.clinkid = res_college_master.collegemid and res_contact_master.clinktype = 'College' ";

																			$re = mysqli_query($conn, $eve);
																			
																			while($rt = mysqli_fetch_assoc($re))

																			{											
																				
																				$collegemid=$rt['collegemid'];
																				$cmname=$rt['cmname'];
																				
																				echo "<option value='$collegemid'>$cmname</option>";
																				 
																			}
																			
																	?>
													
													</select>
													<!--end::Input-->
												
																	<!--end::Input-->
																</div>
																<!--end::Input group-->
																</div>
													<!--end::Col-->
													</div>
												<!--end::Row-->
												<!--begin::Row-->
												<div class="row row-cols-1 row-cols-sm-2 rol-cols-md-1 row-cols-lg-2">
												<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="required">Start Date</span>
																
															</label>
															<!--end::Label-->
															<!--begin::Input-->
															
													
													<input class="form-control form-control-solid fw-bold pe-5" placeholder="Select date" name="acstartdate" id="kt_daterangepicker_5"/>
															<!--end::Input-->
														</div>
														<!--end::Input group-->
													</div>
													
													<!--begin::Col-->
													<div class="col" >
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="required">End Date</span>
																
															</label>
															<!--end::Label-->
															<!--begin::Input-->
															<input class="form-control form-control-solid fw-bold pe-5" placeholder="Select date" name="acenddate" id="kt_daterangepicker_6"/>
															<!--end::Input-->
														</div>
														<!--end::Input group-->
													</div>
													<!--end::Col-->
													
													</div>
												<!--end::Row-->
												
												<!--begin::Row-->
												<div class="row row-cols-1 row-cols-sm-2 rol-cols-md-1 row-cols-lg-2">
												<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="required">Commission Structure</span>
																
															</label>
															<!--end::Label-->
															<!--begin::Input-->
															
													
													<select class="form-select form-select-solid" data-control="select2"  name="commissionstrucher" data-dropdown-parent="#kt_modal_add_user_form3" id="commissionstrucher1">
													
													<option value="Percentage">Percentage</option>
													<option value="Fixed Amount">Fixed Amount</option>
													<option value="Slab">Slab</option>
													</select>
															<!--end::Input-->
														</div>
														<!--end::Input group-->
													</div>
													
													<!--begin::Col-->
													<div class="col" id="value1">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="required">Value</span>
																
															</label>
															<!--end::Label-->
															<!--begin::Input-->
															<input type="text" class="form-control form-control-solid" name="commissionstruchervalue" value="" >
															<!--end::Input-->
														</div>
														<!--end::Input group-->
													</div>
													<!--end::Col-->
													<!--begin::Col-->
													<div class="col" id="slab1">
														<!--begin::Input group-->
														<div class="fv-row mb-7" >
													<table id="items1" border="0" >
											<tr>
												<th>Slab </th>
												<th>Value </th>
												</tr>
										</table>
										<input type="button"  id="add_item1" value="Add" class="btn btn-primary btn-sm"/>
										
												</div>
														<!--end::Input group-->
													</div>
													<!--end::Col-->
													</div>
												<!--end::Row-->
												<!--begin::Row-->
												<div class="row row-cols-1 row-cols-sm-2 rol-cols-md-1 row-cols-lg-2">
													
													<!--begin::Col-->
													<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="">Tax</span>
															</label>
															<!--end::Label-->
																
																<select class="form-select form-select-solid" data-control="select2"  data-dropdown-parent="#kt_modal_add_user_form3" name="ctaxname" >
													<option value="GST">GST</option>
																	<option value="HST">HST</option>
																	<option value="PST">PST</option>
																	<option value="QST">QST</option>
																	</select>
																</div>
														<!--end::Input group-->
													</div>
													<!--end::Col-->
													<!--begin::Col-->
													<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																Tax Percentage
															</label>
															<!--end::Label-->
															<input type="number" class="form-control form-control-solid" name="ctaxpercent" value="" >
															
															</div>
														<!--end::Input group-->
													</div>
													<!--end::Col-->
													
												</div>
												
												<!--end::Row-->
												<!--begin::Row-->
												<div class="row row-cols-1 row-cols-sm-2 rol-cols-md-1 row-cols-lg-2">
													<!--begin::Col-->
													<!--begin::Col-->
													<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="">Tax Included/Excluded</span>
															</label>
															<!--end::Label-->
																
																<select class="form-select form-select-solid" data-control="select2"  data-dropdown-parent="#kt_modal_add_user_form3" name="cmgstincexc" >
													<option value="Included">Included</option>
																	<option value="Excluded">Excluded</option>
																	<option value="Not Applicable">Not Applicable</option>
																	
																	</select>
																</div>
														<!--end::Input group-->
													</div>
													<!--end::Col-->
												<!--begin::Col-->
													<div class="col">
														<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																<span class="">Currency </span>
															</label>
															<!--end::Label-->
															<select class="form-select form-select-solid" data-control="select2" data-dropdown-parent="#kt_modal_add_user_form3"  name="cmcurrency">
													<?php 
																			$eve1 = "select * from res_country_master ";

																			$re1 = mysqli_query($conn, $eve1);
																			
																			while($rt1 = mysqli_fetch_assoc($re1))

																			{											
																				
																				
																				$countrycurrency=$rt1['countrycurrency'];
																				
																				echo "<option value='$countrycurrency'>$countrycurrency</option>";
																				 
																			}
																			
																	?>
													</select></div>
														<!--end::Input group-->
													</div>
													<!--end::Col-->
													
												</div>
												
												<!--end::Row-->
												
															<!--begin::Input group-->
														<div class="fv-row mb-7">
															<!--begin::Label-->
															<label class="fs-6 fw-semibold form-label mt-3">
																Remarks
															</label>
															<!--end::Label-->
															<textarea type="number" class="form-control form-control-solid" name="acmremark" value="" ></textarea>
															
															</div>
														<!--end::Input group-->	
															<!--end::Scroll-->
															<!--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>
															
															<!--end::Actions-->
														</form>
														<!--end::Form-->
													</div>
										<!--end::Modal body-->
									</div>
									<!--end::Modal content-->
								</div>
								<!--end::Modal dialog-->
							</div>
							<!--end::Modal - Student follow up-->
			<!--begin::Modal - Status Update-->
							<div class="modal fade" id="view-modal3" role="dialog" aria-labelledby="myModalLabel" tabindex="-1" aria-hidden="true">
								<!--begin::Modal dialog-->
								<div class="modal-dialog modal-dialog-centered mw-750px">
									<!--begin::Modal content-->
									<div class="modal-content rounded">
										<!--begin::Modal header-->
										<div class="modal-header pb-0 border-0 justify-content-end">
											<!--begin::Close-->
											<div class="btn btn-sm btn-icon btn-active-color-primary" 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_form11" class="form" action="editagentcollege2.php" method="POST">
														<input type="hidden" name="umid" value="<?php echo $umid; ?>">
															<!--begin::Scroll-->
															<!-- content will be load here -->
															<div id="dynamic-content3"></div>
														<!--end::Scroll-->
															<!--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>
															
															<!--end::Actions-->
														</form>
														<!--end::Form-->
													</div>
										<!--end::Modal body-->
									</div>
									<!--end::Modal content-->
								</div>
								<!--end::Modal dialog-->
							</div>
							<!--end::Modal - Status Update-->
							
									
		<!--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/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({
        enableTime:!1,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">

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

if(agentcountry){
$.ajax({
	
type:'POST',
url:'getstatedata1.php',
data:'countrymid='+agentcountry,
success:function(html){
$('#agentstate').html(html);
}
});
}else{
$('#agentstate').html('<option value="0">No Data Found</option>');
}
});

</script>

<script type="text/javascript">
$(document).ready(function(){
$('#agentstate').on('change',function(){
var agentstate = $(this).val();
//alert(agentstate);
if(agentstate){
$.ajax({
type:'POST',
url:'getcitydata1.php',
data:'statemid='+agentstate,
success:function(html){
$('#agentcity').html(html);
}
});
}else{
$('#agentcity').html('<option value="0">No Data Found</option>');
}
});
});
</script>

<script type="text/javascript">
$(document).ready(function(){
$('#agentcity').on('change',function(){
var agentcity = $(this).val();
//alert(agentcity);
if(agentcity){
$.ajax({
type:'POST',
url:'getareadata1.php',
data:'citymid='+agentcity,
success:function(html){
$('#agentarea').html(html);
}
});
}else{
$('#agentarea').html('<option value="0">No Data Found</option>');
}
});
});
</script>
<script type="text/javascript">
		$(document).ready(function(){
			$('#visatmid').on('change',function(){
				var siprefferservice = $(this).val();
				//alert(ibirthstate);
				if(siprefferservice){
					$.ajax({
						type:'POST',
						url:'getsubservicedata2.php',
						data:'siprefferservice='+siprefferservice,
						success:function(html){
							$('#subservice').html(html);
						}
					}); 
				}else{
					$('#subservice').html('<option value="0">No Data Found</option>'); 
				}
			});
		});
		</script>
		<script type="text/javascript">
$('#slab').hide();
$('#commissionstrucher').on('change',function(){
if($('#commissionstrucher').val() == 'Slab')
{
$('#slab').show();
$('#value').hide();

}else{
	$('#slab').hide();
	$('#value').show();
}

});



</script>

<script type="text/javascript">
$('#slab').hide();

if($('#commissionstrucher').val() == 'Slab')
{
$('#slab').show();
$('#value').hide();

}else{
	$('#slab').hide();
	$('#value').show();
}




</script>
<?php
					
				$eve_category11 = "select * from res_slab_master";
				$re_category11 = mysqli_query($conn, $eve_category11);
				

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

		$("#items").append(" <tr><td valign=\"top\">  <div style=\"margin-top:10px; margin-left:10px;\"><select style=\"width:280px; margin-top:10px; margin-left:10px;\" class=\"form-select form-select-solid\" data-control=\"select2\" id=\"pname" + $('#mycounter').val()  + "\" name=\"slabmid[]\"><option>Select</option><?php	while($rt_category11 = mysqli_fetch_assoc($re_category11)){	echo"<option value=\'$rt_category11[slabmid]\'>$rt_category11[slabstartnumber] - $rt_category11[slabendnumber]</option>";}		?>	</select> </div> </td><td> <input type=\"text\" class=\"form-control form-control-solid\" id=\"svalue" + $('#mycounter').val()  + "\" name=\"svalue[]\"></td></tr>.");

		$('#mycounter').val( parseInt($('#mycounter').val()) + 1);
});
</script>
<?php
					
				$eve_category11 = "select * from res_slab_master";
				$re_category11 = mysqli_query($conn, $eve_category11);
				

?>
				
<script>
$(document).ready(function(){
	$("#add_item").click(function(){

		$("#items").append(" <tr><td valign=\"top\">  <div style=\"margin-top:10px; margin-left:10px;\"><select style=\"width:280px; margin-top:10px; margin-left:10px;\" class=\"form-select form-select-solid\" data-control=\"select2\" id=\"pname" + $('#mycounter').val()  + "\" name=\"slabmid[]\"><option>Select</option><?php	while($rt_category11 = mysqli_fetch_assoc($re_category11)){	echo"<option value=\'$rt_category11[slabmid]\'>$rt_category11[slabstartnumber] - $rt_category11[slabendnumber]</option>";}		?>	</select> </div> </td><td> <input type=\"text\" class=\"form-control form-control-solid\" id=\"svalue" + $('#mycounter').val()  + "\" name=\"svalue[]\"></td></tr>.");

		$('#mycounter').val( parseInt($('#mycounter').val()) + 1);
	});
});
</script><script type="text/javascript">
$('#slab23').hide();
$('#commissionstrucher23').on('change',function(){
if($('#commissionstrucher23').val() == 'Slab')
{
$('#slab23').show();
$('#value23').hide();

}else{
	$('#slab23').hide();
	$('#value23').show();
}

});



</script>


<?php
					
				$eve_category11 = "select * from res_slab_master";
				$re_category11 = mysqli_query($conn, $eve_category11);
				

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

		$("#items23").append(" <tr><td valign=\"top\">  <div style=\"margin-top:10px; margin-left:10px;\"><select style=\"width:280px; margin-top:10px; margin-left:10px;\" class=\"form-select form-select-solid\" data-control=\"select2\" id=\"pname" + $('#mycounter').val()  + "\" name=\"slabmid[]\"><option>Select</option><?php	while($rt_category11 = mysqli_fetch_assoc($re_category11)){	echo"<option value=\'$rt_category11[slabmid]\'>$rt_category11[slabstartnumber] - $rt_category11[slabendnumber]</option>";}		?>	</select> </div> </td><td> <input type=\"text\" class=\"form-control form-control-solid\" id=\"svalue" + $('#mycounter').val()  + "\" name=\"svalue[]\"></td></tr>.");

		$('#mycounter').val( parseInt($('#mycounter').val()) + 1);
});
</script>
<?php
					
				$eve_category11 = "select * from res_slab_master";
				$re_category11 = mysqli_query($conn, $eve_category11);
				

?>
				
<script>
$(document).ready(function(){
	$("#add_item23").click(function(){

		$("#items23").append(" <tr><td valign=\"top\">  <div style=\"margin-top:10px; margin-left:10px;\"><select style=\"width:280px; margin-top:10px; margin-left:10px;\" class=\"form-select form-select-solid\" data-control=\"select2\" id=\"pname" + $('#mycounter').val()  + "\" name=\"slabmid[]\"><option>Select</option><?php	while($rt_category11 = mysqli_fetch_assoc($re_category11)){	echo"<option value=\'$rt_category11[slabmid]\'>$rt_category11[slabstartnumber] - $rt_category11[slabendnumber]</option>";}		?>	</select> </div> </td><td> <input type=\"text\" class=\"form-control form-control-solid\" id=\"svalue" + $('#mycounter').val()  + "\" name=\"svalue[]\"></td></tr>.");

		$('#mycounter').val( parseInt($('#mycounter').val()) + 1);
	});
});
</script>
<script type="text/javascript">
$('#slab1').hide();
$('#commissionstrucher1').on('change',function(){
if($('#commissionstrucher1').val() == 'Slab')
{
$('#slab1').show();
$('#value1').hide();

}else{
	$('#slab1').hide();
	$('#value1').show();
}

});



</script>


<?php
					
				$eve_category11 = "select * from res_slab_master";
				$re_category11 = mysqli_query($conn, $eve_category11);
				

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

		$("#items1").append(" <tr><td valign=\"top\">  <div style=\"margin-top:10px; margin-left:10px;\"><select style=\"width:280px; margin-top:10px; margin-left:10px;\" class=\"form-select form-select-solid\" data-control=\"select2\" id=\"pname" + $('#mycounter').val()  + "\" name=\"slabmid[]\"><option>Select</option><?php	while($rt_category11 = mysqli_fetch_assoc($re_category11)){	echo"<option value=\'$rt_category11[slabmid]\'>$rt_category11[slabstartnumber] - $rt_category11[slabendnumber]</option>";}		?>	</select> </div> </td><td> <input type=\"text\" class=\"form-control form-control-solid\" id=\"svalue" + $('#mycounter').val()  + "\" name=\"svalue[]\"></td></tr>.");

		$('#mycounter').val( parseInt($('#mycounter').val()) + 1);
});
</script>
<?php
					
				$eve_category11 = "select * from res_slab_master";
				$re_category11 = mysqli_query($conn, $eve_category11);
				

?>
				
<script>
$(document).ready(function(){
	$("#add_item1").click(function(){

		$("#items1").append(" <tr><td valign=\"top\">  <div style=\"margin-top:10px; margin-left:10px;\"><select style=\"width:280px; margin-top:10px; margin-left:10px;\" class=\"form-select form-select-solid\" data-control=\"select2\" id=\"pname" + $('#mycounter').val()  + "\" name=\"slabmid[]\"><option>Select</option><?php	while($rt_category11 = mysqli_fetch_assoc($re_category11)){	echo"<option value=\'$rt_category11[slabmid]\'>$rt_category11[slabstartnumber] - $rt_category11[slabendnumber]</option>";}		?>	</select> </div> </td><td> <input type=\"text\" class=\"form-control form-control-solid\" id=\"svalue" + $('#mycounter').val()  + "\" name=\"svalue[]\"></td></tr>.");

		$('#mycounter').val( parseInt($('#mycounter').val()) + 1);
	});
});
</script>
<script type="text/javascript">
			$(document).ready(function(){
				$('#countrymid1').on('change',function(){
					var countrymid = $(this).val();
					$('#collegemid1').empty();
					//alert(countrymid);
					if(countrymid){
						$.ajax({
							type:'POST',
							url:'countrytocollegedata.php',
							data:'countrymid='+countrymid,
							success:function(html){
								$('#collegemid1').html(html);
							}
						});
					}else{
						$('#collegemid1').html('<option value=""></option>');
					}
				});
			});
	</script>
	<script>
		$(document).ready(function(){

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

			e.preventDefault();

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

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

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

		});
	});

	

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

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

			e.preventDefault();

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

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

			$.ajax({
				url: 'servicewiseagentcommisionedit.php',
				type: 'POST',
				data: 'id='+uid,
				dataType: 'html'
			})
			.done(function(data){
				console.log(data);
				$('#dynamic-content2').html('');
				$('#dynamic-content2').html(data); // load response
						  // hide ajax loader
			})
			.fail(function(){
				$('#dynamic-content2').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
			
			

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

			$.ajax({
				url: 'collegewiseagentcommisionedit.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>
		$(document).ready(function(){

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

			e.preventDefault();

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

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

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

		});
	});

	

</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
			
			

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

			$.ajax({
				url: 'agentbranchedit.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>	

	<?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

}
?>	
		<!--end::Javascript-->
	</body>
	<!--end::Body-->
</html>