<?
session_start();
ob_start(); 
require('../include/startup.php');

$other_fields = $config->currentSiteData['other_fields'];
if($other_fields){
	$other_fields = json_decode($other_fields,true);	
}


//session_start();
// **********  Setting up Session variables for reuse on pages Dropdowns By Shailesh on 24-09-2021 **********//
if(!isset($_SESSION['lead_consultant_session_array'])){
	$_SESSION['lead_consultant_session_array'] = Admin::getAdminList("lead_consultant",$lead_consultant,"100%",false,"form-control","","","1","");					

}
// **********   END Setting up Session variables for reuse on pages Dropdowns By Shailesh on 24-09-2021  **********//
if($page->topCategory == "forgot_password"){
	header("Location:".$config->siteURL."/forgot_password.php");
	exit;
}
if(isset($_REQUEST['page']) && $_REQUEST['create_pdf'] == "1" ){	
$_SESSION['user_id'] = 1;    $_SESSION['uname'] = '';    $_SESSION['admin_user_id'] = 1;    $_SESSION['login'] = '';    $_SESSION['email_admin'] = '';    $_SESSION['email_info'] = '';    $_SESSION['email_sales'] ='';     $_SESSION['email_enquiry'] = '';	$_SESSION['admin_color'] = '332E7B';    $_SESSION['access_control'] = 0;    $_SESSION['is_super_admin'] ='';     $_SESSION['timer_running'] = 1;	    $_SESSION['from'] = '';
}else{

if(!isset($_SESSION['login'])){
	$loginPage = "$siteURL"."/index.php?l=2";
	$_SESSION['redirect_to'] = 'http://'.$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
	header("Location: $loginPage");
	exit;
}

if(isset($_SESSION['job_user_id'])){
	$moduleName = explode("*******", $page->topCategory);	
	if($moduleName[0] !="adminuser" && $moduleName[0] !="home"){
		if(!(Admin::userHasPermission(strtolower($moduleName[0])))){
			$url = $siteURL."/adminuser/index?page=message&action=unauthorized";
			header("Location: $url");
			exit;
		}
	}
}else{
	$moduleName = explode("*******", $page->topCategory);	
	if($moduleName[0] !="adminuser" && $moduleName[0] !="home"){
		if(!(Admin::hasPermission(strtolower($moduleName[0])))){
			$url = $siteURL."/adminuser/index?page=message&action=unauthorized";
			header("Location: $url");
			exit;
		}
	}
}


/* $sql_session=mysqli_query($conn,"SELECT session_history,id FROM admin WHERE `id` ='".$_SESSION['user_id']."' ");	
$num=mysqli_num_rows($sql_session);	
if($num >0){
	$rows_session = mysqli_fetch_array($sql_session);
	
	if($_SESSION['session_history'] != $rows_session['session_history']){		
		ob_clean();
		$url = $siteURL."/adminuser/index?page=logout";
		header("Location: $url");
	}
} */
}
?>
<!DOCTYPE html>
<html>
  <head>
    <meta name="robots" content="noindex, nofollow">
	<meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Thermotec<?//=$other_fields['site_name'];?></title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
	<link rel="shortcut icon" href="<?php echo $siteURL ?>/favicon.png"/>
	<script type="text/javascript">
    var site_url = "<?php echo $siteURL; ?>";
	var frontend_url = "<?php echo $config->frontEndURL; ?>";
    </script>
	<!-- jQuery -->
	<script src="<?php echo $siteURL ?>/plugins/jquery/jquery.min.js"></script>
	<!-- Font Awesome -->
	<link rel="stylesheet" href="<?php echo $siteURL ?>/plugins/fontawesome-free/css/all.min.css">
	<!-- DataTables -->
	<link rel="stylesheet" href="<?php echo $siteURL ?>/plugins/datatables-bs4/css/dataTables.bootstrap4.min.css">
	<link rel="stylesheet" href="<?php echo $siteURL ?>/plugins/datatables-responsive/css/responsive.bootstrap4.min.css">
	<link rel="stylesheet" href="<?php echo $siteURL ?>/plugins/datatables-buttons/css/buttons.bootstrap4.min.css">
	<!-- daterange picker -->
	<link rel="stylesheet" href="<?php echo $siteURL ?>/plugins/daterangepicker/daterangepicker.css">
	<!-- iCheck for checkboxes and radio inputs -->
	<link rel="stylesheet" href="<?php echo $siteURL ?>/plugins/icheck-bootstrap/icheck-bootstrap.min.css">
	<!-- Bootstrap Color Picker -->
	<link rel="stylesheet" href="<?php echo $siteURL ?>/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css">
	<!-- Tempusdominus Bootstrap 4 -->
	<link rel="stylesheet" href="<?php echo $siteURL ?>/plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css">
	<!-- Select2 -->

	<link rel="stylesheet" href="<?php echo $siteURL ?>/plugins/select2/css/select2.min.css">
	<link rel="stylesheet" href="<?php echo $siteURL ?>/plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css">
	<!-- Bootstrap4 Duallistbox -->
	<link rel="stylesheet" href="<?php echo $siteURL ?>/plugins/bootstrap4-duallistbox/bootstrap-duallistbox.min.css">
	<!-- BS Stepper -->
	<link rel="stylesheet" href="<?php echo $siteURL ?>/plugins/bs-stepper/css/bs-stepper.min.css">
	<!-- dropzonejs -->
	<link rel="stylesheet" href="<?php echo $siteURL ?>/plugins/dropzone/min/dropzone.min.css">
	<!-- Theme style -->
	<link rel="stylesheet" href="<?php echo $siteURL ?>/dist/css/adminlte.min.css">
  
<!-- Date Picker -->
	<link rel="stylesheet" href="<?php echo $siteURL ?>/plugins/datepicker/datepicker3.css">  

		
		
	<link rel="stylesheet" href="https://cdn.datatables.net/1.10.23/css/jquery.dataTables.min.css"/> 
	<script src="https://cdn.datatables.net/1.10.23/js/jquery.dataTables.min.js"></script> 
	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"/>
    <!-- bootstrap wysihtml5 - text editor -->
    <!--<link rel="stylesheet" href="<?php echo $siteURL ?>/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">-->
	<!---------------------------------- Start ckeditor files -------------------------------------------->
	<script type="text/javascript">CKEDITOR_BASEPATH = '<?=$config->siteURL?>/includes/ckeditor/';</script>
	<script type="text/javascript" src="<?=$config->siteURL?>/includes/ckeditor/ckeditor.js"></script>
<!--	new alert code -->
	<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/toastify-js/src/toastify.min.css">
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
	<script src="https://cdn.jsdelivr.net/npm/toastify-js"></script>
	<!---------------------------------- End ckeditor files ---------------------------------------------->
	
	<script type="text/javascript" charset="utf8" src="<?php echo $siteURL ?>/dist/tree/js/bootstrap-treeview.min.js"></script>
	<script type="text/javascript" charset="utf8" src="<?php echo $siteURL ?>/dist/tree/js/bootstrap-treeview.js"></script>
	<link rel="stylesheet" href="<?php echo $siteURL ?>/dist/tree/css/bootstrap-treeview.min.css" />
	
</head>

<style>
.card-success:not(.card-outline)>.card-header {
    background-color: #9c5593;
	color:white;
}
.hide {
    display: none !important;
}

[class*=sidebar-dark-] {
    background-color:  #9c4893;
}
[class*=sidebar-dark-] .sidebar a {
    color: #fff;
}
[class*=sidebar-dark-] .nav-sidebar>.nav-item.menu-open>.nav-link, [class*=sidebar-dark-] .nav-sidebar>.nav-item:hover>.nav-link, [class*=sidebar-dark-] .nav-sidebar>.nav-item>.nav-link:focus {
    background-color: rgba(255,255,255,.1);
    color: #000;
}
[class*=sidebar-dark] .brand-link {
    border-bottom: 1px solid #d0d0d0;
}
[class*=sidebar-dark] .user-panel {
    border-bottom: 1px solid #d0d0d0;
}

a{
	color: #000;
}
a:hover, a:focus {
    color: #000;
	text-decoration: none;
	color:#dc4d01;
}
.callout.callout-info {
    border-left-color: #dc4d01;
}
.btn-primary {
    background-color: #9c4893;
    border-color: #9c4893;
}
.btn-primary:hover, .btn-primary:focus {
    background-color: #9c4893;
    border-color: #9c4893;
}
.btn-primary:not(:disabled):not(.disabled).active, .btn-primary:not(:disabled):not(.disabled):active, .show>.btn-primary.dropdown-toggle {
    color: #fff;
     background-color: #9c4893;
    border-color: #9c4893;
}

.scrollbar {
margin-left: 0;
float: left;
height: 571px !important;
width: 100% !important;
/* background: #fff; */
overflow-y: scroll;
margin-bottom: 25px;
}
.force-overflow {
min-height: 450px;
}

.scrollbar-primary::-webkit-scrollbar {
width: 6px;
background-color: #F5F5F5; }

.scrollbar-primary::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
background-color: #4285F4; }

.scrollbar-danger::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
background-color: #F5F5F5;
border-radius: 10px; }

.scrollbar-danger::-webkit-scrollbar {
width: 12px;
background-color: #F5F5F5; }

.scrollbar-danger::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
background-color: #ff3547; }

.scrollbar-warning::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
background-color: #F5F5F5;
border-radius: 10px; }

.scrollbar-warning::-webkit-scrollbar {
width: 12px;
background-color: #F5F5F5; }

.scrollbar-warning::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
background-color: #FF8800; }

.scrollbar-success::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
background-color: #F5F5F5;
border-radius: 10px; }

.scrollbar-success::-webkit-scrollbar {
width: 12px;
background-color: #F5F5F5; }

.scrollbar-success::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
background-color: #00C851; }

.scrollbar-info::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
background-color: #F5F5F5;
border-radius: 10px; }

.scrollbar-info::-webkit-scrollbar {
width: 6px;
background-color: #F5F5F5; }

.scrollbar-info::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
background-color: #33b5e5; }

.scrollbar-default::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
background-color: transparent;
border-radius: 10px; }

.scrollbar-default::-webkit-scrollbar {
width: 6px;
background-color: transparent; }

.scrollbar-default::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
background-color: #C1C1C1; }

.scrollbar-secondary::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
background-color: #F5F5F5;
border-radius: 10px; }

.scrollbar-secondary::-webkit-scrollbar {
width: 12px;
background-color: #F5F5F5; }

.scrollbar-secondary::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
background-color: #aa66cc; }


.bgcolorwhite{
	background:#fff;
}


.copyright-admin {
    font-size: 14px;
    margin: 0;
    padding: 0 15px;
    width: 100%;
    color: #869099;
    /* position: absolute; */
    bottom: 5px;
}

.copyright-admin a {
    font-size: 14px;
    color: #869099;
    text-align: center;
    display: block;
}

.red-strip-login {
    border-top: 0 solid #333;
    padding: 0;
    margin-top: 0;
    margin-bottom: 0;
    text-align: center;	
}
.red-strip-login span {
    color: #3f3f3f;
    font-size: 20px;
    font-family: 'SegoeUI-Semilight';
    text-transform: uppercase;
    display: inline-block;
    vertical-align: middle;
    padding-left: 12px;
    margin-right: 22px;
}
.red-strip-login a {
    display: inline-block;
    vertical-align: middle;
    text-align: center;
    transition: all ease .3s;
    -webkit-transition: all ease .3s;
    -moz-transition: all ease .3s;
    -ms-transition: all ease .3s;
    -o-transition: all ease .3s;
    margin: 1px 1px 0 0;
	font-size: 1rem;
    width: 20px;
    height: 20px;
    color: #3f3f3f;
}
.red-strip-login a:hover {
    /*background: #ffffff none repeat scroll 0 0;*/
}
.red-strip-login a:hover .fa {
    color: #869099;
	/*text-shadow:0 0 3px #3f3f3f;*/
}
.red-strip-login a .fa {
    height: 34px;
    width: 34px;
    border: 0px solid #869099;
    font-size: 20px;
    color: #869099;
    display: table-cell;
    vertical-align: middle;
    transition: all ease .3s;
    -webkit-transition: all ease .3s;
    -moz-transition: all ease .3s;
    -ms-transition: all ease .3s;
    -o-transition: all ease .3s;
}
input[type="radio"], input[type="checkbox"] {
  height: 20px;
  width: 20px;
}
</style>

<? if(isset($_REQUEST['hide_top']) && $_REQUEST['hide_top'] == 1){?>
<body class="hold-transition <? echo (isset($_REQUEST['hide_top']) &&  $_REQUEST['hide_top'] == 1) ? "" : "sidebar-collapse";?> sidebar-mini layout-fixed" style="">
<?}else{?>
<body class="hold-transition <? echo (isset($_SESSION['collapse_left']) &&  $_SESSION['collapse_left'] == '1') ? "sidebar-collapse" : "";?> sidebar-mini layout-fixed" style="">
<?}?>
 <div class="wrapper">
	<? 
		if (strpos($_SERVER["QUERY_STRING"], "view_jobs_by_search") !== false) {
			if(isset($_REQUEST['global_search']) && $_REQUEST['global_search'] =="global_search"){
				if(isset($_REQUEST['job_search']) && $_REQUEST['job_search'] !=""){
					$_SESSION['job_search'] = $_REQUEST['job_search'];
					$job_search	= $_SESSION['job_search'];
				}else{
					unset($_SESSION['job_search']);
				}
			}
			
			if(isset($_SESSION['job_search']) && $_SESSION['job_search'] !=""){
				$job_search	= $_SESSION['job_search'];
			}
			
			if(isset($_REQUEST['admin_id_global_search']) && $_REQUEST['admin_id_global_search'] !=""){
				$_SESSION['admin_id_global_search'] = $_REQUEST['admin_id_global_search'];
				$admin_id_global_search	= $_SESSION['admin_id_global_search'];
			}else if(isset($_SESSION['admin_id_global_search']) && $_SESSION['admin_id_global_search'] !=""){
				$admin_id_global_search	= $_SESSION['admin_id_global_search'];
			}
		}else{
			unset($_SESSION['job_search']);
			unset($_SESSION['admin_id_global_search']);
			$job_search	= "";
			$admin_id_global_search	= "";
		}
		
		if(isset($_SESSION['job_user_id'])){
			include('head.php');
			include('left_mnu_for_job_user.php');
		}else{
			include('head.php');
			include('left_mnu.php');
		}
	?>
	<!-- Content Wrapper. Contains page content -->
      <div class="content-wrapper <? echo (isset($_REQUEST['hide_top']) &&  $_REQUEST['hide_top'] == 1) ? "bgcolorwhite" : "";?>">
		<?
			if (file_exists('./modules/'.$page->topCategory.'/index.php')) {
			  include('./modules/'.$page->topCategory.'/index.php');
			} else {
			echo '<div class="hide123" style="margin:0 auto;width:100%;font-size:28px;font-weight:bold;padding:2% 0;text-align:center;">';
					echo '<div class="dashboard_logo_area">';
					  //echo 'Welcome To'."<br>";
						//echo $other_fields['dashboard_name']."<br>";
						
						$logo = utility::getTableFieldById('sites', 'logo_name', 'site_name', $config->siteName);
						$src = "../images/logo/" . $logo;
	
						
						echo '<img src="'.$src.'" style="width:151px;"><br>';					  
					echo '</div>';
			echo '</div>';
			
				if(!(isset($_SESSION['job_user_id']) && $_SESSION['job_user_id'] !="")){
					include('dashboard.inc.php');
				}
			}
		?>
	  </div><!-- /.content-wrapper -->
	  <footer class="main-footer <? echo (isset($_REQUEST['hide_top']) &&  $_REQUEST['hide_top'] == 1) ? "hide" : "";?>">
		<p class="copyright-admin" style="float:left;"><a target="_blank" href="https://www.web-alliance.co.uk" class="webdeclaration">Bespoke CRM system developed by Web Alliance Ltd.</a></p>
		<div class="red-strip-login">
			<a href="https://www.facebook.com/pages/Web-Alliance-Limited/434950883246019" title="facebook" target="_blank"><i class="fab fa-facebook-f"></i></a>	
			<a href="https://www.linkedin.com/in/ashish-kumar-50bb6516" title="LinkedIn" target="_blank"><i class="fab fa-linkedin-in"></i></a>
		</div>
		<!--<div class="float-right d-none d-sm-inline-block">
		  
		</div>-->
	  </footer>
<div class="control-sidebar-bg"></div>
</div>
<!-- Bootstrap 4 -->
<script src="<?php echo $siteURL ?>/plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- DataTables  & Plugins -->
<script src="<?php echo $siteURL ?>/plugins/datatables/jquery.dataTables.min.js"></script>
<script src="<?php echo $siteURL ?>/plugins/datatables-bs4/js/dataTables.bootstrap4.min.js"></script>
<script src="<?php echo $siteURL ?>/plugins/datatables-responsive/js/dataTables.responsive.min.js"></script>
<script src="<?php echo $siteURL ?>/plugins/datatables-responsive/js/responsive.bootstrap4.min.js"></script>
<script src="<?php echo $siteURL ?>/plugins/datatables-buttons/js/dataTables.buttons.min.js"></script>
<script src="<?php echo $siteURL ?>/plugins/datatables-buttons/js/buttons.bootstrap4.min.js"></script>
<script src="<?php echo $siteURL ?>/plugins/jszip/jszip.min.js"></script>
<script src="<?php echo $siteURL ?>/plugins/pdfmake/pdfmake.min.js"></script>
<script src="<?php echo $siteURL ?>/plugins/pdfmake/vfs_fonts.js"></script>
<script src="<?php echo $siteURL ?>/plugins/datatables-buttons/js/buttons.html5.min.js"></script>
<script src="<?php echo $siteURL ?>/plugins/datatables-buttons/js/buttons.print.min.js"></script>
<script src="<?php echo $siteURL ?>/plugins/datatables-buttons/js/buttons.colVis.min.js"></script>
<!-- Select2 -->
<script src="<?php echo $siteURL ?>/plugins/select2/js/select2.full.min.js"></script>
<!-- Bootstrap4 Duallistbox -->
<script src="<?php echo $siteURL ?>/plugins/bootstrap4-duallistbox/jquery.bootstrap-duallistbox.min.js"></script>
<!-- InputMask -->
<script src="<?php echo $siteURL ?>/plugins/moment/moment.min.js"></script>
<script src="<?php echo $siteURL ?>/plugins/inputmask/jquery.inputmask.min.js"></script>
<!-- date-range-picker -->
<script src="<?php echo $siteURL ?>/plugins/daterangepicker/daterangepicker.js"></script>
<!-- bootstrap color picker -->
<script src="<?php echo $siteURL ?>/plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js"></script>
<!-- Tempusdominus Bootstrap 4 -->
<script src="<?php echo $siteURL ?>/plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script>
<!-- Bootstrap Switch -->
<script src="<?php echo $siteURL ?>/plugins/bootstrap-switch/js/bootstrap-switch.min.js"></script>
<!-- BS-Stepper -->
<script src="<?php echo $siteURL ?>/plugins/bs-stepper/js/bs-stepper.min.js"></script>
<!-- dropzonejs -->
<script src="<?php echo $siteURL ?>/plugins/dropzone/min/dropzone.min.js"></script>
<!-- AdminLTE App -->
<script src="<?php echo $siteURL ?>/dist/js/adminlte.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="<?php echo $siteURL ?>/dist/js/demo.js"></script>
<!-- Page specific script -->



<!-- datepicker -->
<script src="<?php echo $siteURL ?>/plugins/datepicker/bootstrap-datepicker.js"></script>

<script>
  $(function () {
    //Initialize Select2 Elements
    $('.select2').select2()

    //Initialize Select2 Elements
    $('.select2bs4').select2({
      theme: 'bootstrap4'
    })

    //Datemask dd/mm/yyyy
    $('#datemask').inputmask('dd/mm/yyyy', { 'placeholder': 'dd/mm/yyyy' })
    //Datemask2 mm/dd/yyyy
    $('#datemask2').inputmask('mm/dd/yyyy', { 'placeholder': 'mm/dd/yyyy' })
    //Money Euro
    $('[data-mask]').inputmask()

    //Date picker
    $('#reservationdate').datetimepicker({
        format: 'DD-MM-YYYY'
    });

    //Date and time picker
    $('#reservationdatetime').datetimepicker({ icons: { time: 'far fa-clock' } });

    //Date range picker
    $('#reservation').daterangepicker()
    //Date range picker with time picker
    $('#reservationtime').daterangepicker({
      timePicker: true,
      timePickerIncrement: 30,
      locale: {
        format: 'MM/DD/YYYY hh:mm A'
      }
    })
    //Date range as a button
    $('#daterange-btn').daterangepicker(
      {
        ranges   : {
          'Today'       : [moment(), moment()],
          'Yesterday'   : [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
          'Last 7 Days' : [moment().subtract(6, 'days'), moment()],
          'Last 30 Days': [moment().subtract(29, 'days'), moment()],
          'This Month'  : [moment().startOf('month'), moment().endOf('month')],
          'Last Month'  : [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
        },
        startDate: moment().subtract(29, 'days'),
        endDate  : moment()
      },
      function (start, end) {
        $('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'))
      }
    )

    //Timepicker
    $('#timepicker').datetimepicker({
      format: 'LT'
    })

    //Bootstrap Duallistbox
    $('.duallistbox').bootstrapDualListbox()

    //Colorpicker
    $('.my-colorpicker1').colorpicker()
    //color picker with addon
    $('.my-colorpicker2').colorpicker()

    $('.my-colorpicker2').on('colorpickerChange', function(event) {
      $('.my-colorpicker2 .fa-square').css('color', event.color.toString());
    })

    $("input[data-bootstrap-switch]").each(function(){
      $(this).bootstrapSwitch('state', $(this).prop('checked'));
    })
	$('.product_search').select2({
		placeholder: 'Search Product',
		minimumInputLength: 3,
		ajax: {
		  url: site_url+"/modules/quotation_items/index.php?page=ajax_actions&action=search_product_code",	
		  delay: 0,
		  minLength:2,
		  dataType: 'json',	
		  processResults: function (data) {
			return {
			  results: data
			};
		  },
		  cache: true
		}
	});
	// common date & time picker 
	$('.datepicker').datepicker({
		changeMonth: true,
		changeYear: true,
		format: "dd-mm-yyyy",
		todayHighlight: true,
		autoclose: true
	});

  })
</script>
</body>
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-lg" style="width:90%">
    <div class="modal-content">
      <div class="modal-header">
        <div class="col-lg-12">
		<div class="row">
			<div class="col-lg-10">
				<h4 class="modal-title" id="myModalLabel">Modal title</h4>
			</div>
			<div class="col-lg-2">
				<button type="button" class="close close_button2" data-dismiss="modal" aria-hidden="true">&times;</button>
			</div>
		</div>
		</div>
      </div>
      <div class="modal-body">
          <iframe class="modal_iframe" src="" width="100%" height="400px" frameborder="2" style="border:0px" allowtransparency="true"></iframe>  
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default close_button" data-dismiss="modal">Close</button>
        <!--<button type="button" class="btn btn-primary">Save changes</button>-->
      </div>
    </div>
    <!-- /.modal-content -->
  </div>
  <!-- /.modal-dialog -->
</div>
<!-- /.modal -->
</html>