  <? global $vis_language;
  $type=array(0=>'Pipe', 1=>'POP3', 2=>'POP3 SSL', 3=>'POP3 TLS', 4=>'IMAP', 5=>'IMAP SSL',6=>'IMAP TLS'); ?>
  <div class="wrapper bg-white b-t" id="vis_filter_list" style="display:none;">
	  <form id="vis_mailqueue_search_form" name="vis_mailqueue_search_form" method="post" onkeydown="if (event.keyCode == 13) return false;">
            <label class="control-label"><b><?= $vis_language['TXTFILTERLIST']; ?></b></label>
            <div class="row">
              <div class="m-t m-b">
                <div class="form-group">
                    <label class="col-sm-1 control-label m-t-xs"><? echo $vis_language['TXTEMAIL']; ?></label>
                    <div class="col-sm-2">
                     <input type="text" class="form-control input-sm" id="vis_email" name="vis_email" />
                    </div>
                </div>
                 <div class="form-group">
                    <label class="col-sm-1 control-label m-t-xs"><? echo $vis_language['TXTDEPARTMENT']; ?></label>
                    <div class="col-sm-2">
					<select class="form-control input-sm selectpicker" name="vis_department" id="vis_department"<? if(count($department_details)>10) echo ' data-live-search="true"';?>>
								<option value=""><? echo $vis_language['TXTSELECT']; ?></option>
								<?  
								
								for($i=0;$i<count($department_details);$i++){
									if($i==0) echo '</optgroup>';
									echo '<option value="'.$department_details[$i]['department_id'].'">'.$department_details[$i]['domain_name'].' : '.$department_details[$i]['department_name'].'</option>';
								}
								echo '</optgroup>';?>
					</select>
                    </div>
                </div>
				<div class="form-group">
                    <label class="col-sm-1 control-label m-t-xs"><? echo $vis_language['TXTSTATUS']; ?></label>
                    <div class="col-sm-2">
                       <select name="vis_status" id="vis_status" class="form-control input-sm selectpicker bg-white"><option value=""><? echo $vis_language['TXTSELECT']; ?></option><option value='1'><? echo $vis_language['TXTENABLED'];?></option><option value='0'><? echo $vis_language['TXTDISABLED'];?></option><option value='2'><? echo $vis_language['TXTAUTHENTICATIONERROR'];?></option><option value='3'><? echo $vis_language['TXTCONNECTIONERROR'];?></option></select>
                    </div>
                </div> 
				<div class="form-group">
					<label class="col-sm-1 control-label"><? echo $vis_language['TXTFETCHTYPE']; ?></label>
					<div class="col-sm-2">
						<select id="vis_fetchtype" name="vis_fetchtype" onchange="vis_change_portdetails(this.value)" class="form-control input-sm selectpicker" <? if(count($type)>10) echo 'data-live-search="true"';?> >
						 <option value=""><? echo $vis_language['TXTSELECT']; ?></option>
						<? 
								for($i=0;$i<count($type);$i++) {
							//if($mailqueue_details['mailqueue_type'] == $i) $selected='selected="selected"'; else $selected='';
							echo '<option value="'.$i.'" '.$selected.' >'.$type[$i].'</option>'; } ?></select>
         </div>
      </div>
                 </div>
            </div>
            <div class="row">
                <div class="m-t m-b">
                    <div class="form-group">
                        <div class="col-sm-12">
                          <button type="button" id="btn_apply_filter" class="btn btn-primary pull-right" onclick="<?  if($view_info['page_count']>0) { ?> javascript:vis_apply_filter();<? } ?>"><?= $vis_language['TXTAPPLYFILTER'];?></button>
                          <button type="button" class="btn btn-default pull-right m-r-sm" onclick="$('#vis_mailqueue_search_form').trigger('reset');$('.selectpicker').selectpicker('refresh');"><?= $vis_language['TXTCLEAR'];?></button>
                        </div>
                    </div>
                </div>
            </div>
         </form>
        </div>
