<!-- ========== START TEAMPLATE-1 ========== -->
<? 	global $vis_language; 
	$database=new class_database();
	##After change language,user stay on same page
	$uri = explode('?/',$_SERVER['REQUEST_URI']);
	$luri  = explode('/',$uri[1]);
	if(strcmp($luri[0],'language')==0){ header('location:'.$_SERVER['HTTP_REFERER']); }
	###
    include_once(VIS_PATH_CLASS.VIS_CLASS_PREFIX.'setting.php');
    $object=new class_setting($database);
    $setting=$object->get_settings('(title like "vis_head_menu_%" or title="vis_theme_color" or title="vis_portal_logo" or title="vis_favicon" or title="vis_portal_text" or title="vis_portal_text_bold" or title="vis_portal_text_italic" or title="vis_portal_text_colour" or title="vis_manage_logo" or title="vis_date_format" or title="vis_datetime_format" or title="vis_satellite_helpdesk" or title="vis_head_menu_disable_portal") and (domain_id='.VIS_DOMAIN.' or domain_id=0)', VIS_STAFF_ID, VIS_LOCATION_AREA);
	
	$aircall_filter='integration_type=50 AND is_enabled=1 and (domain_id='.VIS_DOMAIN.' or domain_id=0)';		
	list($aircall_count, $aircall_details)=$object->get_integration_setting($aircall_filter, VIS_STAFF_ID, VIS_LOCATION_AREA);		
	$aircall_details=$aircall_details[0];
	
	
	##Asterisk
	$filter='integration_type=51 AND is_enabled=1 AND (domain_id='.VIS_DOMAIN.' or domain_id=0)';		
	list($asterisk_info, $asterisk_details)=$object->get_integration_setting($filter, VIS_STAFF_ID, VIS_LOCATION_AREA);
	###Asterisk	
	//echo '<pre>'; print_r($asterisk_details); echo '</pre>';
 
      if($setting!=-1) for($i=0;$i<count($setting);$i++) {
            if(preg_match('/vis_head_menu_(.*)/', $setting[$i]['title'], $match)) {
                $poral_setting[strtolower($match[1])]=$setting[$i]['content'];
            }
            elseif($setting[$i]['title']=='vis_theme_color') {
                $poral_setting['theme_color']=$setting[$i]['content'];
            }
            elseif($setting[$i]['title']=='vis_portal_logo') {
                $poral_setting['vis_portal_logo']=$setting[$i]['content'];
            }
            elseif($setting[$i]['title']=='vis_portal_text') {
                $poral_setting['vis_portal_text']=$setting[$i]['content'];
            }
			elseif($setting[$i]['title']=='vis_portal_text_bold') {
                $poral_setting['vis_portal_text_bold']=$setting[$i]['content'];
            }
			elseif($setting[$i]['title']=='vis_portal_text_italic') {
                $poral_setting['vis_portal_text_italic']=$setting[$i]['content'];
            }
			elseif($setting[$i]['title']=='vis_portal_text_colour') {
                $poral_setting['vis_portal_text_colour']=$setting[$i]['content'];
            }
            elseif($setting[$i]['title']=='vis_manage_logo') {
                $poral_setting['vis_manage_logo']=$setting[$i]['content'];
            }
			 elseif($setting[$i]['title']=='vis_date_format') {
                $poral_setting['vis_date_format']=$setting[$i]['content'];
            }
			 elseif($setting[$i]['title']=='vis_datetime_format') {
                $poral_setting['vis_datetime_format']=$setting[$i]['content'];
            }
			 elseif($setting[$i]['title']=='vis_satellite_helpdesk') {
                $poral_setting['vis_satellite_helpdesk']=$setting[$i]['content'];
            }
           elseif($setting[$i]['title']=='vis_favicon') {
                $poral_setting['vis_favicon']=$setting[$i]['content'];
            }
			elseif($setting[$i]['title']=='vis_head_menu_disable_portal') {
                $poral_setting['disable_portal']=$setting[$i]['content'];
            }
												
												
        }
								
	$database->database_disconnect();
?>
<!DOCTYPE html>
<html lang="en" class="bg-white bg-light">
   <head>
      <meta charset="utf-8" />
      <title><? echo $header_title.VIS_BRANDING_NAME; ?></title>
    
      <meta name="description" content="" />
      <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
   
      <link rel="shortcut icon" href="<? echo (isset($poral_setting['vis_favicon']) && $poral_setting['vis_favicon']!='image')?(VIS_PATH_PROFILE.$poral_setting['vis_favicon']):(VIS_PATH_IMAGES.'favicon.ico'); ?>" type="image/x-icon">
      <link href="<?php echo VIS_PATH_STYLE; ?>vis_style.css" rel="stylesheet" />
      <style type="text/css">
         <? if(VIS_LOGO_TYPE=='text') { ?>.vh-logo .logo-text {<?= VIS_LOGO_TEXT_STYLE; ?>};<? } else if(file_exists(VIS_PATH_PROFILE.VIS_PORTAL_LOGO) && VIS_PORTAL_LOGO!=''){
            $imageFile = VIS_PATH_PROFILE.VIS_PORTAL_LOGO;				 
            /* Set the height fixed at 80px; */
            $height = 80;
             
            /* Get the image info */
            $info = getimagesize($imageFile);
             
            /* Calculate aspect ratio by dividing width by height*/
            $aspectRatio = $info[0] / $info[1];
             
            /* Keep the height fix at 80px, 
               but change the width according to the aspect ratio */
            $newwidth = (int)($aspectRatio * $height) . "px";				 
            $height .= "px";						   
            ?> .vh-logo .logo-image {background-image: url("<?= VIS_PATH_PROFILE.VIS_PORTAL_LOGO; ?>") !important;}
         .vh-logo.md .logo-image, .vh-logo.md h1 {width: <?= $newwidth; ?> !important; height: <?= $height;?> !important;}
         <? } ?>			
      </style>
      <link rel="stylesheet" href="<?php echo VIS_PATH; ?>design/bootstrap.min.css" type="text/css" />
      <link rel="stylesheet" href="<?php echo VIS_PATH; ?>design/animate.css" type="text/css" />
      <link rel="stylesheet" href="<?php echo VIS_PATH; ?>design/font.css" type="text/css" />
      <link rel="stylesheet" href="<?php echo VIS_PATH; ?>design/css/default.css" type="text/css" />
      <!--<link rel="stylesheet" href="<?php //echo VIS_PATH; ?>design/css/vh-icons.css" type="text/css" /> -->     
      <link rel="stylesheet" href="<?php echo VIS_PATH_SCRIPT; ?>bootstrap-select/bootstrap-select.css" type="text/css" />
      <script src="<?= VIS_PATH_SCRIPT; ?>jquery.js"></script>
      <link rel="stylesheet" href="<?= VIS_PATH_PLUGINS; ?>redactor/redactor.css" />
      <script src="<?= VIS_PATH_PLUGINS; ?>redactor/redactor.min.js"></script>
      <link href="<?= VIS_PATH_SCRIPT; ?>datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet">
      <script src="<?= VIS_PATH_SCRIPT; ?>datetimepicker/js/moment.js"></script>
      <script src="<?= VIS_PATH_SCRIPT; ?>datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
      <script type="text/javascript" src="<?= VIS_PATH_SCRIPT; ?>bootstrap_pagination/jquery.twbsPagination.min.js"></script>
      <script src="<?= VIS_PATH_PLUGINS; ?>redactor/source.js"></script>
      <!--[if lt IE 9]>
      <script src="<?php echo VIS_PATH_SCRIPT; ?>ie/html5shiv.js"></script>
      <script src="<?php echo VIS_PATH_SCRIPT; ?>ie/respond.min.js"></script>
      <script src="<?php echo VIS_PATH_SCRIPT; ?>ie/excanvas.js"></script>
      <![endif]-->
      <style>.navbar-brand img {max-height:80px;} 
	    .pagination > .active > a, .pagination > .active > a:focus, .pagination > .active > a:hover, .pagination > .active > span, .pagination > .active > span:focus, .pagination > .active > span:hover {
		  background-color: <?= VIS_THEME_COLOR; ?>!important;
         border-color: <?= VIS_THEME_COLOR; ?>!important;
		 color: #fff;!important;   }		 
		.pagination > li > a, .pagination > li > span { color: <?= VIS_THEME_COLOR; ?>}
		
         .bg-primary{background-color:<?= VIS_THEME_COLOR; ?>}
         .btn-primary{background-color:<?= VIS_THEME_COLOR; ?> !important; border-color:<?= VIS_THEME_COLOR; ?> !important;}
         .btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active{background-color:<?= VIS_THEME_COLOR_DARK; ?>;border-color:<?= VIS_THEME_COLOR_DARK; ?> !important;}
         .bg-primary .nav > li > a:hover, .bg-primary .nav > li > a:focus, .bg-primary .nav .open > a{background-color:<?= VIS_THEME_COLOR_DARK; ?> !important;}
         @media (max-width:769px){.fourms .thumb-md{ width:50px;}.fourms .chat-item-comment {margin-left: 0px;margin-top: 0px;margin-bottom: 0px;}.thumb-md a > img, .thumb-md > img {width: 50px !important;height: 50px !important;}.chat-item .chat-body {margin-left: 0px; }} @media (max-width:767px){ #clittkpagingt{ clear:left; width:100%; } #clittkpagingb{ clear:left; width:100%; }}
									.fsize12{font-size: 12px;}
									.svg-primary .black {fill:<?= VIS_THEME_COLOR_DARK; ?> !important;}
									.border-primary{ border-color:<?= VIS_THEME_COLOR_DARK; ?> !important;}
									.border-primary:hover{ background-color:<?= VIS_THEME_COLOR_DARK; ?> !important;}
									#submittks a:active,#submittks a:focus{ background-color:<?= VIS_THEME_COLOR_DARK; ?> !important;}
      </style>
      <script> $(document).ready(function() { $(".selectpicker").selectpicker(); });</script>
   </head>
   <!-- ========== START BODY ========== -->
   <? if(IS_LOGIN==1){ $database=new class_database(); include_once(VIS_PATH_CLASS.VIS_CLASS_PREFIX.'client.php'); $filter = VIS_TABLE_PREFIX.'client.client_id='.VIS_CLIENT_ID;
      $client_object=new class_client($database); list($client_count, $client_details)=$client_object->get_client($filter,'',0,'',0,1);
      $client_image=$client_details[0]['image_path']; $client_name=$client_details[0]['first_name'].' '.$client_details[0]['last_name']; }  ?>
   <body class="template1 bg-white" dir="<? echo VIS_LANGUAGE_DIRECTION; ?>">
   
 
   
      <section class="hbox stretch">
      <section class="vbox">
      <section class="scrollable">
      <div data-height=auto data-disable-fade-out=true data-distance=0 data-size=10px data-railOpacity=0.2>
      
        <?php //check if all module disable
								
if(isset($poral_setting['disable_portal']) && $poral_setting['disable_portal']==1 )
{ }else{?>
      
      <!-- ========== START LOGO ========== -->
      <div class="container" id="iframe_hd_container">
         <div class="masthead"> 
		 <?php  if($asterisk_details!=-1 && $asterisk_details[0]['read_timeout']!=''){ ?>
				<button class="btn bg-primary  pull-right m-t m-l" title="<?php echo $vis_language['TXTCALLUS']; ?>" ><i class="vh vh-phone vh-lg m-r-xs"></i><span class="text-sm"><?php echo $asterisk_details[0]['read_timeout']; ?></span></button>
		 <?php
		//$domres = $database->query_exec( "SELECT `domain_url` FROM `avis_domain` WHERE `domain_id` =".VIS_DOMAIN); 
		//$domarr = $database->fetch_result_array($domres);		
		/* ?>
		 <script>
		 function originate(dom_id,asterisk_id) {
			$.ajax({
					url: '<?php echo $domarr[0]['domain_url']; ?>plugins/asterisk/asterisk.php',
					data: {'vis_dom_id':dom_id,'vis_asterisk_id':asterisk_id,'vis_asterisk_operation':'originate'},
					type: "POST",
					success: function(data) { alert(data);
						//$("#ajax_item").html(data);
						//$(".selectpicker").selectpicker();
					}
				});
			}
		 </script>		 
		 <?php */ } ?>
		 <?php if($aircall_details['billing_url']!=''){	 ?>
			<div  class="pull-right m-t" id="aircall">		
				<?php echo ($aircall_details['billing_url']); ?>
				<style> .ctc-link{ display:none; }
						.ac-ctc {
							height: 34px;
							padding-left: 34px;
						}
						.ac-ctc .icos {
							height: 34px;
							width: 34px
						}
						.ac-ctc .icos .ico-call {
							height: 34px;
							width: 34px
						}
						.ac-ctc .infos {
							left: 34px;
							padding: 6px 10px;
						}
				</style>
				<div class="ac-c2c-event ac-c2c-button"></div>				
			</div>
			<?php } ?>
			
            <div class="vh-logo left <?= (VIS_LOGO_TYPE != 'text') ? ' md' : ''; ?>">
               <h1><a class="logo-<?= (VIS_LOGO_TYPE=='text')?'text':'image'; ?>" href="index.php"><?= (VIS_LOGO_TYPE=='text')?VIS_LOGO_TEXT:''; ?></a></h1>
            </div>
			
         </div>
         <!--/ .masthead -->			  
      </div>
      <!-- ==========  END LOGO  ========== -->
      <!-- ========== START HEADER NAV ========== -->
      <header class="bg-primary header header-md navbar" id="iframe_hd_header">
         <nav class="navbar navbar-primary m-b-none" role="navigation">
            <div class="container">
               <div class="navbar-header">
                  <button class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-1">
                  <i class="vh vh-lg vh-bars-4-thin"></i>
                  </button>
               </div>
               <div class="collapse navbar-collapse m-l-n15" id="navbar-collapse-1">
                  <ul class="nav navbar-nav">
                     <? 
                        if((VIS_HEAD_MENU_SELFHELP==1 || (VIS_HEAD_MENU_SELFHELP==2 && IS_LOGIN)) && VIS_MODULE_ACCESS_SELFHELP==1) echo '<li><a href="'.((!defined('VIS_SELFHELP_URL_REWRITE') || VIS_SELFHELP_URL_REWRITE==0)?'index.php?/selfhelp/categories':'/self-help/').'">'.$vis_language['TXTSELFHELP'].'</a></li>';
                        if(VIS_HEAD_MENU_SUBMITTICKET==1 || (VIS_HEAD_MENU_SUBMITTICKET==2 && IS_LOGIN)) echo '<li><a href="index.php?/ticket/submit-ticket" >'.$vis_language['TXTSUBMITTICKET'].'</a></li>';			
                        if((VIS_HEAD_MENU_FORUM==1 || (VIS_HEAD_MENU_FORUM==2 && IS_LOGIN)) && VIS_MODULE_ACCESS_FORUM==1) 
                        	echo '<li><a href="index.php?/forums/forums" >'.$vis_language['TXTFORUMS'].'</a></li>';			
                        if(IS_LOGIN==1){
                        	if(VIS_HEAD_MENU_VIEWTICKET==1) echo '<li><a href="index.php?/ticket/view-ticket" >'.$vis_language['TXTVIEWTICKETS'].'</a></li>  ';
                        	if(VIS_HEAD_MENU_BILLING==1 && VIS_MODULE_ACCESS_BILLING==1 && VIS_ACCESS_BILLING==1) echo '<li><a href="index.php?/billing/products-list" >'.$vis_language['TXTPURCHASE'].'</a></li>';
                        	if(VIS_HEAD_MENU_BILLING==1 && VIS_MODULE_ACCESS_BILLING==1 && VIS_ACCESS_BILLING==1) echo '<li><a href="index.php?/billing/my-products" >'.$vis_language['TXTMYPRODUCTS'].'</a></li>';
                        	if(VIS_HEAD_MENU_BILLING==1 && VIS_MODULE_ACCESS_BILLING==1 && VIS_ACCESS_BILLING==1) echo '<li><a href="index.php?/billing/invoices" >'.$vis_language['TXTMYINVOICES'].'</a></li>';
                        	if(VIS_HEAD_MENU_SERVICE==1 && VIS_MODULE_ACCESS_ITIL==1 && VIS_ITIL==1) echo '<li><a href="index.php?/setting/view_services" >'.$vis_language['TXTITILSERVICECATALOG'].'</a></li>';
							if(VIS_HEAD_MENU_ASSETS==1) echo '<li><a href="index.php?/client/get_ci_list" >'.$vis_language['TXTASSETS'].'</a></li>  ';
                        }
                        else if(VIS_HEAD_MENU_LOGIN==1) echo '<li><a href="index.php?/home/login" >'.$vis_language['TXTLOGIN'].'</a></li>';
                        ?>
                  </ul>
                  <div class="hidden-xs ">
                     <? global $language_list;?>
                     <ul class="nav navbar-nav navbar-right">
                        <? if(IS_LOGIN==1){ ?>
                        <li class="dropdown">
                           <a data-toggle="dropdown" class="dropdown-toggle" href="#"> 
                           <? if($client_image=='' || $client_image=='default.jpg'){?>
<div class="l-avatar pull-left" id="vis_header_profile_img">
<? if($client_details[0]['first_name']!=''){
	$firstname=preg_split('//u', $client_details[0]['first_name'], -1, PREG_SPLIT_NO_EMPTY);
	$lastname	=preg_split('//u', $client_details[0]['last_name'], -1, PREG_SPLIT_NO_EMPTY);
	?>
<div class="sm"><? echo ucfirst($firstname[0]).ucfirst($lastname[0]);?></div>
    <? }else{ ?>
    <img class="sm" src="<?= VIS_PATH_PROFILE.'default.jpg';?>">
    <? }?>

</div>
<? }else{ ?>
<div class="l-avatar pull-left" id="vis_header_profile_img">
<img src="<? echo VIS_PATH_PROFILE; echo ($client_image!='')?$client_image:'default.jpg'; ?>" class="sm">
</div>
<? }?>
                           <!--<span id="vis_header_profile_img" class="thumb-sm avatar pull-left"><img src="<? echo VIS_PATH_PROFILE; echo ($client_image!='')?$client_image:'default.jpg'; ?>"></span>--> <?= $client_name; ?> <b class="caret"></b> 
                           </a>
                           <ul class="dropdown-menu animated fadeInRight">
                              <li><span class="arrow top"></span> <a class="link" href="index.php?/client/view-profile"><? echo $vis_language['TXTPROFILE']; ?></a></li>
							  <? if($client_details[0]['group_id']!=1 && $client_details[0]['is_manager']==1 ){?>
							  <li><span class="arrow top"></span> <a class="link" href="index.php?/client/view-organization/<?echo $client_details[0]['group_id'];?>"><? echo $vis_language['TXTORGANIZATION']; ?></a></li>
							  <? } ?>
							    <? if((VIS_HEAD_MENU_FORUM==1 || (VIS_HEAD_MENU_FORUM==2 && IS_LOGIN)) && VIS_MODULE_ACCESS_FORUM==1) {?>
								 <li><span class="arrow top"></span> <a class="link" href="index.php?/forums/topic-list/1"><? echo $vis_language['TXTFORUMACTIVITY']; ?></a></li>		
								<? } ?>
                              <?if($client_details[0]['parent_id']==0){ ?>
                              <li><span class="arrow top"></span> <a class="link" href="index.php?/client/contacts"><? echo $vis_language['TXTCONTACTS']; ?></a></li>
                              <? } ?>
                              <li><span class="arrow top"></span> <a class="link" href="index.php?/client/report"><? echo $vis_language['TXTREPORTS']; ?></a></li>
							 <li><a class="link" href="index.php?/home/logout"><? echo $vis_language['TXTLOGOUT']; ?></a></li>
                           </ul>
                        </li>
                        <? }  if(count($language_list)>1) { ?>
                        <li class="dropdown">
                           <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="menu" aria-haspopup="true" aria-expanded="false">
                           <i class="vh vh-lg vh-language"></i>
                           <span class="caret"></span>
                           </a>
                           <ul class="dropdown-menu animated fadeInRight">
                              <?  for($i=0;$i<count($language_list);$i++) { ?>
                              <li> 
                                 <a class="link" href="<? echo (defined('IS_WHMCS')?'submitticket.php':'index.php')?>?/language/<?= $language_list[$i]['language_code'].'/'.$language_list[$i]['language_id']; ?>"><? echo $language_list[$i]['language_name']; ?></a> 
                              </li>
                              <? } ?>
                           </ul>
                        </li>
                     </ul>
                     <? }?>
                  </div>
                  <div class="hidden-sm hidden-md hidden-lg">
                     <? global $language_list; ?>
                     <ul class="nav navbar-nav navbar-right">
                        <?	if(IS_LOGIN==1){ ?>
                        <li class="dropdown">
                           <a data-toggle="dropdown" class="dropdown-toggle" href="#"> 
                           <? if($client_image=='' || $client_image=='default.jpg'){?>
<div class="l-avatar pull-left" id="vis_header_profile_img">
<? if($client_details[0]['first_name']!=''){
$firstname=preg_split('//u', $client_details[0]['first_name'], -1, PREG_SPLIT_NO_EMPTY);
$lastname=preg_split('//u', $client_details[0]['last_name'], -1, PREG_SPLIT_NO_EMPTY);
	?>
<div class="sm"><? echo ucfirst($firstname[0]).ucfirst($lastname[0]);?></div>
    <? }else{ ?>
    <img class="sm" src="<?= VIS_PATH_PROFILE.'default.jpg';?>">
    <? }?>

</div>
<? }else{ ?>
<div class="l-avatar pull-left" id="vis_header_profile_img">
<img src="<? echo VIS_PATH_PROFILE; echo $client_image; ?>" class="sm">
</div>
<? }?>
                           <!--<span id="vis_header_profile_img" class="thumb-sm avatar pull-left"><img src="<? echo VIS_PATH_PROFILE; echo ($client_image!='')?$client_image:'default.jpg'; ?>"></span>--> <?= $client_name; ?> <b class="caret"></b> 
                           </a>
                           <ul class="dropdown-menu animated fadeInRight">
                              <li><a class="link" href="index.php?/client/view-profile"><? echo $vis_language['TXTPROFILE']; ?></a></li>
							   <? if(VIS_MODULE_ACCESS_FORUM==1) {?>
								 <li><span class="arrow top"></span> <a class="link" href="index.php?/forums/topic-list/1"><? echo $vis_language['TXTFORUMACTIVITY']; ?></a></li>		
								<? } ?>
                              <?if($client_details[0]['parent_id']==0){ ?>
                              <li> <a class="link" href="index.php?/client/contacts"><? echo $vis_language['TXTCONTACTS']; ?></a></li>
                              <? } ?>
                              <li><span class="arrow top"></span> <a class="link" href="index.php?/client/report"><? echo $vis_language['TXTREPORTS']; ?></a></li>
							  <li><a class="link" href="index.php?/home/logout"><? echo $vis_language['TXTLOGOUT']; ?></a></li>
                           </ul>
                        </li>
                        <? } if(count($language_list)>1) { ?>
                        <li class="dropdown">
                           <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="menu" aria-haspopup="true" aria-expanded="false">
                           <i class="vh vh-lg vh-language"></i>
                           <span class="caret"></span>
                           </a>
                           <ul class="dropdown-menu animated fadeInDown">
                              <?  for($i=0;$i<count($language_list);$i++) { ?>
                              <li> 
                                 <a class="link" href="<? echo (defined('IS_WHMCS')?'submitticket.php':'index.php')?>?/language/<?= $language_list[$i]['language_code'].'/'.$language_list[$i]['language_id']; ?>"><? echo $language_list[$i]['language_name']; ?></a> 
                              </li>
                              <? } ?>
                           </ul>
                        </li>
                     </ul>
                     <? }?>
                  </div>
               </div>
            </div>
            <!-- / .container -->
         </nav>
      </header>
      <!-- ==========  END HEADER NAV ========== -->
      <!-- ========== START SEARCHBOX ========== -->
      
      <?php //if((VIS_DEFAULT_HOME_OPERATION != $operation['vis_operation']) || (VIS_DEFAULT_HOME_OPERATION =='view_selfhelp_group' && isset($parentid) && $parentid!='')){ ?>
      <?php if((VIS_DEFAULT_HOME_OPERATION != $operation['vis_operation'] && $operation['vis_operation']!='home') || (VIS_DEFAULT_HOME_OPERATION =='view_selfhelp_group' && isset($parentid) && $parentid!='')  && $operation['vis_operation']!='home'){ ?>
      <?php //if(VIS_FIRST_PAGE==0){ ?>
      						<? if(VIS_DEFAULT_HOME_OPERATION =='view_selfhelp_group'){ $links='index.php?/selfhelp/categories';}
						    elseif(VIS_DEFAULT_HOME_OPERATION =='view_forums_group'){ $links='index.php?/forums/forums';}
							elseif(VIS_DEFAULT_HOME_OPERATION =='new_ticket_step_one'){ $links='index.php?/ticket/submit-ticket';}
							else{ $links='index.php?';} ?>
      <div class="well bg-light m-b-none" id="iframe_hd_div" >
         <div class="container">
            <div class="row">
               <div class="col-lg-7 col-md-7">
                  <div class="hidden-xs">
                     <? if($operation['vis_module']=='selfhelp') $vis_title=(isset($operation['vis_search_text']))?$vis_language['TXTSEARCH']:$vis_language['TXTSELFHELP'];?>
                     <h2><?=$vis_title. ((isset($vis_count))?' ('.$vis_count.')':'') ?></h2>
                     <ol class="breadcrumb text-ellipsis bg-empty no-borders m-l-n-sm">
                        <?php foreach($breadcrumb as $title=>$link){
                           if($link!= ''){?>
                           <? if($title=='Home'){$link=$links;} ?>
                        <li><a href="<?=$link ?>"><?=$title?></a></li>
						
                        <?php  }else {	?>
                        <li class="active"><?=$title?></li>
                        <?php } }?>
                     </ol>
                  </div>
                  <div class="hidden-sm hidden-md hidden-lg">
                     <h3 class="m-l-sm"><?=$vis_title. (($vis_count!='')?' ('.$vis_count.')':'') ?></h3>
                     <ol class="breadcrumb text-ellipsis bg-empty no-borders">
                        <?php foreach($breadcrumb as $title=>$link){
                           if($link!= ''){?>
                           <? if($title=='Home'){$link=$links;} ?>
                        <li><a href="<?=$link ?>"><?=$title?></a></li>
                        <?php  }else {	?>
                        <li class="active"><?=$title?></li>
                        <?php } }?>
                     </ol>
                  </div>
               </div>
               <div class="col-lg-5 col-md-5">
                  <? if(isset($operation['vis_search_msg']) && $operation['vis_search_msg']!='') {?>
                  <script> $("#vis_submit_err_div").show(); $("#vis_submit_err_div").html('<? echo $operation['vis_search_msg']; ?>'); </script>
                  <? } ?> <?php if((VIS_HEAD_MENU_SOLUTION_TICKET_SEARCH==1 || (VIS_HEAD_MENU_SOLUTION_TICKET_SEARCH==2 && IS_LOGIN)) && $operation['vis_operation']!='get_feedback' && $operation['vis_operation']!='get_survey' ) {?>
                  <div class="hidden-xs">
                     <form class="m-t padder-v" method="post" onSubmit="return searchvalidation()">
                        <div class="form-group">
                           <div class="input-group input-group-lg">
                              <span class="input-group-btn">
                              <button type="submit" class="btn bg-white b-white rounded"><i class="vh vh-lg vh-search"></i></button>
                              </span>
                              <input type="hidden" name="vis_module" value="selfhelp" /><input type="hidden" name="vis_operation" value="selfhelp_search" />
                              <input type="text" id="vis_search_text" name="vis_search_text"  class="form-control b-white rounded" placeholder="<? echo $vis_language['TXTSEARCH']; ?>" value="<? echo (isset($operation['vis_search_text'])) ? $operation['vis_search_text'] : '';?>">
                           </div>
						 </div>
						  <? if(IS_LOGIN==1){ ?>
							 <!-- <div class="btn-group pull-right"><a class="link" href="index.php?/ticket/advanced_search"><? //echo $vis_language['TXTADVSEARCH']; ?></a></div>--> <?}?>
					 </form>
                  </div>
				  
                  <div class="hidden-sm hidden-md hidden-lg">
                     <form method="post" class="m-t" onSubmit="return searchvalidation()">
                        <div class="form-group">
                           <div class="input-group">
                              <span class="input-group-btn">
                              <button type="submit" class="btn bg-white b-white rounded"><i class="vh vh-lg vh-search"></i></button>
                              </span>
                              <input type="hidden" name="vis_module" value="selfhelp" /><input type="hidden" name="vis_operation" value="selfhelp_search" />
                              <input type="text" id="vis_search_text" name="vis_search_text"  class="form-control b-white rounded" placeholder="<? echo $vis_language['TXTSEARCH']; ?>" value="<? echo (isset($operation['vis_search_text'])) ? $operation['vis_search_text'] : '';?>">
                           </div>

                        </div>
						 <? if(IS_LOGIN==1){ ?>
							 <!-- <div class="btn-group pull-right"><a class="link" href="index.php?/ticket/advanced_search"><? //echo $vis_language['TXTADVSEARCH']; ?></a></div> --> <?}?>
                     </form>
                  </div>
                  <?php }?>	
               </div>
            </div>
         </div>
      </div>
      <!-- ==========  END SEARCHBOX  ========== -->
      <?php } else {?>
      <?php //if((VIS_HEAD_MENU_SOLUTION_TICKET_SEARCH==1 || (VIS_HEAD_MENU_SOLUTION_TICKET_SEARCH==2 && IS_LOGIN)) && $operation['vis_operation']!='get_feedback' && $operation['vis_operation']!='get_survey' && VIS_FIRST_PAGE==1 ) {
							if((VIS_HEAD_MENU_SOLUTION_TICKET_SEARCH==1 || (VIS_HEAD_MENU_SOLUTION_TICKET_SEARCH==2 && IS_LOGIN)) && $operation['vis_operation']!='get_feedback' && $operation['vis_operation']!='get_survey' ) {?>
      <div class="well bg-light m-b-none"  align="center">
         <h1 class="m-l-lg hidden-xs"><? echo $vis_language['TXTHOWCANWEHELP']; ?></h1>
         <div class="wrapper-sm">
            <form method="post" name="vis_selfhelp_search"  class="m-b-sm" onSubmit="return searchvalidation()">
               <div class="input-group input-group-lg col-sm-9">
                  <span class="input-group-btn">
                  <button type="submit" class="btn bg-white b-white rounded"><i class="vh vh-lg vh-search"></i></button>
                  <input type="hidden" name="vis_module" value="selfhelp" /><input type="hidden" name="vis_operation" value="selfhelp_search" />
                  </span>
                  <input type="text" id="vis_search_text" name="vis_search_text"  class="form-control b-white rounded" placeholder="<? echo $vis_language['TXTSEARCH']; ?>" value="<? echo (isset($operation['vis_search_text'])) ? $operation['vis_search_text'] : '';?>">
               </div>
			    <? if(IS_LOGIN==1){ ?>
				 <!--<div class="input-group input-group-lg col-sm-9 text-right"><a class="link" href="index.php?/ticket/advanced_search"><? echo $vis_language['TXTADVSEARCH']; ?></a></div>--> <?}?>
		  </form>
         </div>
         <!-- / .wrapper -->
         <div class="col-md-2"></div>
      </div>
      <?php } }?>
      
      <?php }//check if all module disable ?>
<div id="vis_submit_msg_div" class="m-t container alert text-center alert-success" style="display:none"></div>
<div id="vis_submit_err_div" class="m-t container alert text-center alert-danger" style="display:none"></div>

<script>
function searchvalidation()
{
	var search_obj = document.getElementById('vis_search_text').value;
	   //alert(search_obj);
	if(search_obj =='')
		return false;
}
</script>
