<?php date_default_timezone_set('Asia/Bangkok'); ?>
<!DOCTYPE html>
<html lang="<?php echo $LANG; ?>">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $languageInfo[$LANG]['charset']; ?>"/>
  <meta name="viewport" content="width=1366, initial-scale=1, maximum-scale=1.0"/>
  <title>HTL Service</title>
  <link rel="stylesheet" href="tpl/css/font.css">
  <link rel="stylesheet" href="tpl/css/materialize.min.css">
  <link rel="stylesheet" href="tpl/css/tablesorter/style.css">
  <link rel="stylesheet" href="tpl/css/progress.css">
  <link rel="icon" type="image/png" href="tpl/img/favicon_toptran.png">
  <style>
  body {
    -moz-transform: scale(0.9, 0.9); /* Moz-browsers */
    zoom: 0.9; /* Other non-webkit browsers */
    zoom: 90%; /* Webkit browsers */ }
    .fjksdbnfkj input {display:none!important;} .navbar-fixed nav {    padding-left: 10px;} select.exclude{    display: block!important;    background: transparent!important;     border-bottom: 1px solid #999!important; } .black { background-color: #f3f4f4 !important; } nav.black ul a, nav.black .input-field label i{ color: #000 !important; } .colortoptran, button.colortoptran{ background-color:#004ea2 !important; } .character-counter{ display: none !important; } h3{ font-size: 1.92rem; margin: 0px; padding: 0px; } table tr.tr_total td{ background: #fff2a8 !important; font-weight: bold; } main{ padding:0 20px; } .row .col.s2{ width:12%; } .show-table{ display:none; } ul.tabs{ margin: 0px; padding: 0px; list-style: none; } ul.tabs li{ background: none; color: #222; display: inline-block; padding: 10px 15px; cursor: pointer; border-top: 3px solid #eeeeee; } ul.tabs li.current{ background: #ffffff; color: #26a69a; border-top: 3px solid #26a69a; } .tab-link:hover { background: white; border-top: 3px solid #26a69a; } .tab-content{ display: none; padding: 15px; } .tab-content.current{ display: inline-table; } .modal-fixed{ width:15% !important; } .navbar-fixed nav{ position:relative;    max-width: 100%;
    overflow: auto; } .tabform{ width:3%; } table.striped tr { border-bottom: 1px solid #fff; } #tabnameSave{ display:none; position: absolute; top: 50%; right: 0; transform: translate(-50%,-50%); cursor: pointer; outline:none; border:none; background: #eee; } #tabnameSave:hover{ color: #008200; } .right{ padding-right: 10px; } .close{ position: relative; top: 0px; right: 25px; font-size: 2em; border: none; background: transparent; cursor: pointer; display:none; color:black; } .close:hover{ color:red; } button:focus{ background-color: #f60404; } table.tablesorter thead tr th{ background-color: #fff; } @media only screen and (min-width: 1200px){ html { font-size: 14px; } } .tab-content tr > td > div { display: none; } table.tablesorter tbody td { vertical-align: top; } .isoppa , .isacc:hover { opacity: 0.5; } .isoppa:hover, .isacc { opacity: 1; } .container { width: 100%; }
	@media only screen and (max-width: 1367px) {
		table.tablesorter thead tr th {
			font-size: 11.5px!important;
			font-weight: normal;
		}
		.btn, .btn-large, .btn-small, .btn-flat {
			padding: 0 7px!important;
		}
	}
	</style>   
  <script src="tpl/js/jquery-2.1.1.min.js"></script>  
  <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">
 <script src="https://code.jquery.com/ui/1.13.1/jquery-ui.js"></script>
</head>
<body>
    <div class="navbar-fixed" >
      <nav class="black" role="navigation" style="overflow: auto;" >
          <a id="logo-container" href="./" class="brand-logo grey-text text-lighten-2" style=" color: #000 !important; text-transform: uppercase;">
          <img style="vertical-align:middle; margin-top: -10px;  "  src="https://htlservice.net/images/logohtl.png">
        </a>
          <div class="nav-wrapper " style="    width: max-content;    margin-left: 105px;    margin-right: 10px;    float: right;">
        
	<ul class="right fjksdbnfkj" style="padding-top: 10px;width:70px;"  >
		<select name="lang" id="lang" class="exclude exclude2" onchange="document.location.href ='./index.php?lang='+jQuery(this).val();" > 
			<option value="cn" selected  >China</option>                          
                        <option value="en" >English</option>
						<option value="vi"  >VietNam</option>
						<option value="tha"   >Thailand</option>
		</select>
		<script>
			<?php if($_SESSION['HTTP_ACCEPT_LANGUAGE'] != ''){ ?>
			$("#lang").val('<?php echo $_SESSION['HTTP_ACCEPT_LANGUAGE']; ?>');
			<?php }else{ ?> 
			$("#lang").val('cn');
			<?php } ?>
		</script>	
	</ul>
	<?php if ((strpos($_SERVER['REQUEST_URI'],'setting.php') !== false) || 1 == 1) { 
    //$acseting = 'http://localhost/toptrans/expense/index.php';
    $acseting = 'https://htlservice.net/expense/index.php';
    ?>
		<ul class="right">
          <li style="color:black;">
              <form method="POST" action="<?php echo $acseting; ?>">
					<input style="width: 65px;" type="password" name="password" placeholder="<?php echo $i18n["New Password"] ; ?>" required /> 
					<button type="submit" class="btn waves-effect waves-light "><?php echo $i18n["Save Issue"] ; ?></button>
			   </form>
          </li>
        </ul>
		<?php } ?>
        <ul class="right">
          <li style="color:black;">
              <?php echo $currentuser->name;?>
          </li>
        </ul>
        <ul class="right">
          <li>
            <a style="    padding: 0 5px;" href="./logout.php" class="tooltipped" data-position="top" data-tooltip="<?php echo $i18n['LOGOUT']; ?>">
              <i class="material-icons">exit_to_app</i>
            </a>
          </li>
        </ul>
		<?php if ( ( strpos($_SERVER['REQUEST_URI'],'index.php') !== false || strpos($_SERVER['REQUEST_URI'],'php') === false ) && $_GET['showsearch'] == 1 ){ ?>
		<ul class="right" style="    padding: 0; " >
			<ul class="collapsible" style="    border: none;    margin: 0;" >
				<li>
				  <div class="collapsible-header" style="    background: transparent;" >
					<i style="    height: 32px;    line-height: 36px;    color: #333;    margin: 0;" class="fas fa-search"></i></div>
				  <div class="collapsible-body" >
				  <input style="    color: #000;    padding: 0px 5px;" id="project" placeholder="<?php echo $i18n["å‡­è¯å·"]; ?>" /></div>
				</li>
		  </ul>
        </ul>
		<?php } ?>
<?php if($currentuser->gm  == '1' || $currentuser->role  == 'Finance' ){

	if ( strpos($_SERVER['REQUEST_URI'],'total.php') !== false && 0 == 1){
				 ?>
				 <ul class="right" style="padding-top: 10px;width:200px;" >
					<select name="currency" id="currency" onchange="document.location.href ='./total.php?currency='+jQuery(this).val();" >                           
							   <?php foreach ($currency as $r){  if($_SESSION['currencyUser'][id] == $r['id'] ){ ?>
						<option value="<?php echo $r['id']; ?>" selected ><?php echo $r['currency'].' - '. $r['name']; ?></option>
					<?php }else{ ?>
						<option value="<?php echo $r['id']; ?>" ><?php echo $r['currency'].' - '. $r['name']; ?></option>
					<?php }} ?>
					</select>	
				</ul>
				 <?php
			}
         
        
        
                        
         
}

if($currentuser->gm  == '1' || $currentuser->mod22 ) {
	
	 echo ' 
			<style>			
			@media only screen and (max-width: 1399px) {}
			
				.right {padding-right: 2px;}
			
			.btn, .btn-large, .btn-small, .btn-flat {  
				padding: 0 12px;
			}
			</style>
			
			<ul class="right">
                <li>
                
		<a style="    padding: 0 5px;" onclick="document.location.href =\'./setting.php\' " class="tooltipped" data-position="top" data-tooltip="'.$i18n['Setting'].'-Modaa">
              <i class="material-icons">settings</i>
            </a>
                </li>
              </ul>';
}

$Notis = json_decode(file_get_contents('data/Noti.json'),true);$checkdd = 0;
		foreach ($Notis as $Noti){  
			if ( strtotime(str_replace('.', '-', $Noti['Start'])) < time() &&  strtotime(str_replace('.', '-', $Noti['End']).' 23:59:59') > time() && ( $Noti['Role'] == 'All' || $Noti['Role'] == $currentuser->role ) && ( $Noti['location'] == 'All' || $Noti['location'] == $currentuser->location )  ){
				$sonotic++;
		}
	}
        if(  $currentuser->gm  == '1'  || $currentuser->noti == 1 ){ 
  echo '	<ul class="right">
                <li>
                <a style="    padding: 0 5px; position: relative;" onclick="document.location.href =\'./noti.php\' " class="tooltipped bkasbi" data-position="top" data-tooltip="'.$i18n['Noti'].'-MOD19">
              <i class="material-icons">notifications</i>	 <span style="    Color: #f00;    border-radius: 50%;    position: absolute;    top: -10px;    left: 24px;    font-size: 12px;    height: 15px;    float: left;    font-weight: bold;" > '.$sonotic.' </span> </a> </li>
              </ul>
		';
        }
			if(  $currentuser->gm  == '1'  || $currentuser->chart == 1 ){ 
		echo '<ul class="right">
                <li>
                	<a style="    padding: 0 5px;" onclick="document.location.href =\'./total_chart.php\' " class="tooltipped" data-position="top" data-tooltip="'.$i18n['Chart'].'-MOD18">
              <i class="material-icons">bar_chart</i>
            </a>
               	
                </li>
              </ul>
        ';
}


$mywork = json_decode(file_get_contents('data/mywork.json'));
		foreach ($mywork as $r){  
		if($r->who == $currentuser->id && $r->status == 'new' ){	
			$socv++;
		}
	}      
	if(  $currentuser->gm  == '1'  || $currentuser->mod17 == '1' ){         
 echo ' <ul class="right"><li>
	<a style="    padding: 0 5px;position: relative;"  onclick="document.location.href =\'./mywork.php\' "  class="tooltipped" data-position="top" data-tooltip="'.$i18n['My Work'].'-MOD17">
              <i class="material-icons">work</i>'.(($socv > 0)?'<span style="   Color: #f00;    border-radius: 50%;    position: absolute;    top: -10px;    left: 24px;    font-size: 12px;    height: 15px;    float: left;    font-weight: bold;" > '.$socv.' </span>':'').'
            </a>
	</li></ul>';                
        }                   

if( $currentuser->gm  == '1' || $currentuser->mod23 == '1' ){
             echo ' <ul class="right">
                <li>
                
	<a style="    padding: 0 5px;"  onclick="document.location.href =\'./user.php\' " class="tooltipped" data-position="top" data-tooltip="'.$i18n['User'].'-Modab">
              <i class="material-icons">group</i> </a>
               
		
                </li>
              </ul>
	

            ';
			}

          if(  $currentuser->gm  == '1'  || $currentuser->condition == 1 ){ 
		echo '<ul class="right">
                <li>
                	<a style="    padding: 0 5px;"  onclick="document.location.href =\'./total_expend.php\' " class="tooltipped" data-position="top" data-tooltip="'.$i18n['Condition'].'-MOD14">
              <i class="material-icons">search</i> </a>               	
                </li>
              </ul>
        ';
}             
                        
                        
                       
			
	if(  $currentuser->gm  == '1'  || $currentuser->mod15 == '1' ){ 		
                        
			echo '
    <ul class="right">
                  <li>          
                  
	<a style="    padding: 0 5px;" onclick="window.open( \'filemanager.php\',  \'_self\'  );" class="tooltipped" data-position="top" data-tooltip="'.$i18n['File Manager'].'-mod15">
              <i class="material-icons">folder</i>
            </a>
   
       </li></ul>';
        }
                          if((($currentuser->role == 'Manager'|| $currentuser->role == 'controler' ) && $currentuser->mod21  == '1' ) || $currentuser->gm  == '1'  ){
echo '<ul class="right">
                  <li>
                    <button '.(( strpos($_SERVER['REQUEST_URI'],'index.php') === false && strpos($_SERVER['REQUEST_URI'],'local.php') === false && strpos($_SERVER['REQUEST_URI'],'.php') !== false)?'onclick="document.location.href =\'./index.php\' "':'').' class="btn waves-effect waves-light toggle tooltipped" data-position="top" data-tooltip="mod21" >'.$i18n['New Expense'].'
                      <i class="material-icons right" style="line-height:1.5;    margin-left: 3px;">add_circle_outline</i>
                    </button>
                  </li>
                </ul>
                ';
          }
          if( 0 == 1){
	 echo ' 		<ul class="right">
                <li>
                 <button  class="btn waves-effect waves-light btnCreate-user dsadasd" onclick="document.location.href =\'./total.php\' " > '.$i18n['Total'].'
                  </button>
		
                </li>
              </ul>




            ';
			
          }
 
 
 
 ?>
 <?php

	
	
if($currentuser->gm  == '1' || $currentuser->changedcurrency  == '1' ){
	
  echo '<ul class="right">
                <li>
                 <button  class="btn waves-effect waves-light btnCreate-user tooltipped" onclick="document.location.href =\'./currency.php\' "  data-position="top" data-tooltip="MOD5"> '.$i18n['Currency'].'
                  </button>
		
                </li>
            </ul>
		';
}			
 ?>
 
 
<?php
if( $currentuser->totalconsignee  == '1' || $currentuser->total  == '1' || $currentuser->totalmonth  == '1' || $currentuser->mod4  == '1' || $currentuser->gm  == '1'  ){ 
	
		echo '<ul class="right">
                <li>
                 <button  class="btn waves-effect waves-light btnCreate-user tooltipped " onclick="document.location.href =\'./total.php\' " data-position="top" data-tooltip="MOD4" > '.$i18n['Total'].'
                  </button>		
                </li>
              </ul>
        ';
	
}
if(  $currentuser->gm  == '1'  || $currentuser->borrow == '1' ){ 
		echo '<ul class="right">
                <li>
                 <button  class="btn waves-effect waves-light btnCreate-user tooltipped" data-position="top" data-tooltip="MOD13" onclick="document.location.href =\'./total_borrower.php\' " > '.$i18n['Loan/Pay'].'
                  </button>		
                </li>
              </ul>
        ';
}

if(  $currentuser->gm  == '1'  || $currentuser->mod12 == '1' ){ 
		echo '<ul class="right">
                <li>
                 <button  class="btn waves-effect waves-light btnCreate-user tooltipped" data-position="top" data-tooltip="MOD12" onclick="document.location.href =\'./total_lender.php\' " >'.$i18n['Total Lender'].'</button>		
                </li>
              </ul>';
}
	


if(  $currentuser->gm  == '1'  || ( $currentuser->reminder == 1 && strtotime(str_replace('.', '-', $currentuser->{'end'})) > time() )  ){
		$reminder = json_decode(file_get_contents('data/reminder.json'),true);
		foreach ($reminder as $rem){ 
			if(in_array(date('d'),(array)$rem['dayofmonth'])){
				$sorm++;
			}
		}		
		echo '<ul class="right">
                <li>
                 <button  class="btn waves-effect waves-light btnCreate-user tooltipped"
				 onclick="document.location.href =\'./reminder.php\'"  data-position="top" data-tooltip="MOD11" > '.$i18n['Reminder'].'
				 '.(($sorm > 0)?'<span style="background:red;	Color:#fff; padding:0px 5px;border-radius:50%;" > '.$sorm.' </span>':'').'
						 
                  </button>		
                </li>
              </ul>
        ';
}	



 $payv = 0;
 $invoices    = json_decode(file_get_contents('data/invoice.json'), true);
 
 foreach ($invoices as $invoice ){
	if($currentuser->id != '1' && $currentuser->id != '1563434108'  ){
                if($invoice['createdby'] == ''){
                    // DANNA ANNA JANE XAVIA
                }
		if( strtolower($currentuser->name) != strtolower($invoice['createdby']) ){
			continue;
		}
	}
			 
	if($invoice['status'] != 'gotoexpend' ){
		$payv++;
	}
 }
 if(  $currentuser->gm  == '1'  || $currentuser->mod10 == '1' ){  
?>
<ul class="right"  >
<li><button class="btn tooltipped"  data-position="top" data-tooltip="MOD10"  onclick="document.location.href='./invoice.php' "  ><?php echo $i18n['invoice']; ?> <i style="    height: 32px;    line-height: 36px;    margin-right: 7px;    font-size: 17px;
    margin-top: -5px;" class="fas fa-file-invoice-dollar"></i> <span style="background: red; color: rgb(255, 255, 255);padding: 0px 4px 2px 5px; border-radius: 50%;"><?php echo $payv; ?></span> </button></li>
</ul>
              
<?php
 }
	if(  $currentuser->gm  == '1'  || $currentuser->mod16 == '1' ){ 
    echo '<ul class="right">
                <li>
                 <button  class="btn waves-effect waves-light btnCreate-user tooltipped" data-position="top" data-tooltip="MOD16" onclick="document.location.href =\'./api.php\' " > Api
                  </button>		
                </li>
              </ul>';
}              
	

if(  $currentuser->gm  == '1'  || $currentuser->role == 'Manager' || $currentuser->mod26 == '1'  ){ 
    echo '<ul class="right">
                <li>
                 <button  class="btn waves-effect waves-light btnCreate-user tooltipped" data-position="top"  data-tooltip="MOD23" onclick="if($(this).hasClass(\'cajkcb\')){ jQuery(\'.dsjkfbkj\').hide(); $(this).removeClass(\'cajkcb\'); }else{ jQuery(\'.dsjkfbkj\').show(); $(this).addClass(\'cajkcb\'); }" > '.$i18n['Create Profile'].'                  </button>		
                 
                
                </li>
              </ul>';
}             
?>
<?php 

        
	$correspondingv = 0;
	$corresponding = json_decode(file_get_contents('data/Corresponding.json'));
	foreach ($corresponding as $r){  
            if($r->accept != 1){
                $correspondingv++;
            }
	}
        
        
          if(  ($currentuser->gm  == '1'  || $currentuser->mod9 == '1') && 0 == 1 ){  
		echo '
				
					  
				<ul class="right">
						<li>
						 <button  class="btn waves-effect waves-light btnCreate-user tooltipped" data-position="top" data-tooltip="MOD9"  onclick="document.location.href =\'./receiver_payer.php\' " >'.$i18n['Receiver Payer'].'</button>
						</li>
					  </ul>	';
          }
//  if(  $currentuser->gm  == '1'  || $currentuser->mod8 == '1' ){               
//echo ' <ul class="right">
//						<li>
//						 <button  class="btn waves-effect waves-light btnCreate-user tooltipped" data-position="top" data-tooltip="MOD8"   onclick="document.location.href =\'./corresponding.php\' " >'.$i18n['Corresponding'].' <span style="background:red;	Color:#fff; padding:0px 5px;border-radius:50%;" > '.$correspondingv.' </span></button>
//						</li>
//					  </ul>	
//  '; }

		?>	  
          <?php  


         
          
          if(($currentuser->role == 'Operator' || $currentuser->role == 'Finance') && $currentuser->mod21  == '1' ){
               echo '<ul class="right">
                  <li>
                    <button '.(( strpos($_SERVER['REQUEST_URI'],'index.php') === false && strpos($_SERVER['REQUEST_URI'],'.php') !== false )?'onclick="document.location.href =\'./index.php\' "':'').' class="btn waves-effect waves-light toggle tooltipped"  data-position="top" data-tooltip="MOD21"  >'.$i18n['New Expense'].'
                      <i class="material-icons right" style="line-height:1.5;    margin-left: 3px;">add_circle_outline</i>
                    </button>
                  </li>
                </ul>
                ';

             
          }
           if( $currentuser->gm  == '1' || $currentuser->mod7  == '1'){  
		echo '<ul class="right">
                <li>
                 <button  class="btn waves-effect waves-light btnCreate-user tooltipped" data-position="top" data-tooltip="MOD7" onclick="document.location.href =\'./customer.php\'" >'.$i18n['Customer'].'</button>
		
                </li>
              </ul>';
           }
                if( $currentuser->gm  == '1' || $currentuser->mod6  == '1'){  
		echo '<ul class="right">
                <li>
                 <button  class="btn waves-effect waves-light btnCreate-user tooltipped" data-position="top" data-tooltip="MOD6" onclick="document.location.href =\'./newconsignee.php\'" >Consignee</button>
		
                </li>
              </ul> ';
                }
                
		echo '	  <style> @media only screen and (max-width: 1400px) { nav.black button i { display:none!important; } } </style>'; 
		if( $currentuser->gm  == '1'  || $currentuser->mod24  == '1' ){  
			  echo '<ul class="right">
                <li>
                 <button  class="btn waves-effect waves-light btnCreate-user tooltipped"  data-position="top" data-tooltip="Modac" onclick="document.location.href =\'./revision.php\'" >'.$i18n['Revision'].'<span class="asbdkbas" style="display:none;background:red;	Color:#fff; padding:0px 5px;border-radius:50%;">0</span></button>
                </li>
              </ul>'; 
                          
                          
                        
/*
			  echo '<ul class="right">
                <li>
                 <button  class="btn waves-effect waves-light btnCreate-user "  onclick="document.location.href =\'./local.php\'" >åˆ©æ¶¦</button>
                </li>
              </ul>';
*/
		if( strpos($_SERVER['REQUEST_URI'],'local.php') !== false ){	  
		?>
			 
        <form class="black right" method="GET">
          <div class="input-field">
            <input value="<?php echo htmlentities(@$_GET['q']); ?>" 
             placeholder="<?php echo count($data).' '.$TYPE; ?>" 
             id="search" type="search" name="q" >
            <label class="label-icon" for="search"><i class="material-icons">search</i></label>
            <i class="material-icons">close</i>
          </div>
        </form>
		  <ul class="right">

		  <li <?php if ($_GET['location'] != 'cn' && $_GET['location'] != ''){  ?> class="isoppa" <?php }elseif ($_GET['location'] == 'cn'){ ?> class="isacc" <?php } ?> style="    line-height: 16px; ">
			<a <?php if ($_GET['location'] == 'cn' ){  ?> title="Turn Off China Tab" href="./local.php" <?php }else{ ?> title="Turn On China Tab" href="./local.php?location=cn" <?php } ?>  style="padding: 0;    padding-top: 5px;background: transparent!important;" ><img src="tpl/img/china.png" style="    width: 75px;" /></a> </li>
		  <li <?php if ($_GET['location'] != 'tha' && $_GET['location'] != ''){  ?> class="isoppa" <?php }elseif ($_GET['location'] == 'tha'){ ?> class="isacc" <?php } ?> style="line-height: 16px;">
			<a <?php if ($_GET['location'] == 'tha' ){  ?> title="Turn Off ThaiLand Tab" href="./local.php" <?php }else{ ?> title="Turn On ThaiLand Tab" href="./local.php?location=tha" <?php } ?> style="padding: 0;    padding-top: 5px;background: transparent!important;" ><img src="tpl/img/thailan.png" style="    width: 75px;" /></a> </li>
		  <li <?php if ($_GET['location'] != 'vn' && $_GET['location'] != ''){  ?> class="isoppa" <?php }elseif ($_GET['location'] == 'vn'){ ?> class="isacc" <?php } ?>  style="    line-height: 16px;">
			<a <?php if ($_GET['location'] == 'vn' ){  ?> title="Turn Off Vietnam Tab" href="./local.php" <?php }else{ ?> title="Turn On Vietnam Tab" href="./local.php?location=vn"  <?php } ?> style="padding: 0;    padding-top: 5px;background: transparent!important;" ><img src="tpl/img/vietnam.png" style="    width: 75px;" /></a>  </li>
		</ul>
		<style>
			nav.black .nav-wrapper ul:nth-child(10),nav.black .nav-wrapper ul:nth-child(11),nav.black .nav-wrapper ul:nth-child(12),nav.black .nav-wrapper ul:nth-child(13),nav.black .nav-wrapper ul:nth-child(6),nav.black .nav-wrapper ul:nth-child(6),nav.black .nav-wrapper ul:nth-child(7),nav.black .nav-wrapper ul:nth-child(8),nav.black .nav-wrapper ul:nth-child(9) {
				display:none;
			}
			nav.black button i {
				display: block!important;
			}
		</style>
		<?php	  
		}
		}
                
                 if( $currentuser->gm  == '1' || $currentuser->mod27  == '1'){  
                  echo '<ul class="right">
                <li>
                 <button  class="btn waves-effect waves-light btnCreate-user tooltipped"  data-position="top" data-tooltip="Mod24" onclick="document.location.href =\'./financialsystem.php\'" >'.$i18n['财务系统'].'</button>
                </li>
              </ul>'; 
                 }
                
		   if ( ( $currentuser->gm == 1 || $currentuser->name == 'DANNA') && ( strpos($_SERVER['REQUEST_URI'],'index.php') !== false || strpos($_SERVER['REQUEST_URI'],'php') === false ) && 0 == 1  ){
				 echo ' <ul class="right bsdbk">
						<li>
						<form id="dsjdbksa" method="POST">
						<input value="'.$datestart.'" id="datestart2" name="datestart" type="hidden" />
						<input value="'.$dateto.'" id="dateto2" name="dateto" type="hidden" />
						<div class="reportrange2" style=" display:none;  cursor: pointer;position: absolute;    z-index: 1000;    top: 0px;    left: -69px;    width: 100%;    width: 23px; ">
							<i class="material-icons " style="float:right;color:rgb(38, 166, 154);" >date_range</i> 
						</div>
						<select id="tabexport" name="tabexport[]" multiple="" tabindex="-1"><option value="clicktosearch" > '.$datestart.' to '.$dateto.' ?</option>';
						
                            foreach($tabs as $tab){
								if( $currentuser->gm != 1 && $tab->iduser != $currentuser->id && !in_array($tab->id,(array)$currentuser->account) ) { continue; } 
                                echo '<option value="'.$tab->id.'">'.$tab->name.'</option>';
                            }
				echo	'<option value="-1" > '.$i18n['Go'].' </option></select><button   class="btn waves-effect waves-light" > '.$i18n['Excel'].'  
							<img src="https://htlservice.net/Docs/tpl/img/excel.png" style="width:24px;    height: auto;    margin-top: 5px;    margin-bottom: -5px;" />
						  </button>
						  <input id="task" type="hidden"  name="exportexcel" value="1" >
						</form>
						</li>
					  </ul>
				';
			}
        ?> 
		
      </div>
    </nav>
         
        <div class="dsjkfbkj" style="display:none; position: absolute;    top: 62px;    right: 50%;" >
            <?php   if(  $currentuser->gm  == '1'  || $currentuser->mod8 == '1' ){               
echo '
						 <button style="margin-top:5px;"  class="btn waves-effect waves-light btnCreate-user tooltipped" data-position="top" data-tooltip="MOD8"   onclick="document.location.href =\'./corresponding.php\' " >'.$i18n['Corresponding'].' <span style="background:red;	Color:#fff; padding:0px 5px;border-radius:50%;" > '.$correspondingv.' </span></button><br>
						
  '; }
?>
              <button  style="margin-top:5px;" class="btn waves-effect waves-light btnCreate-user tooltipped" data-position="top" onclick="document.location.href ='./customerdocs.php'" >收付款人</button><br>		
              
                    	
                    <button  style="margin-top:5px;" class="btn waves-effect waves-light btnCreate-user tooltipped" data-position="top"  onclick="document.location.href ='./departure.php'" >港口</button>
                    	<br>
                    <button  style="margin-top:5px;" class="btn waves-effect waves-light btnCreate-user tooltipped" data-position="top"  onclick="document.location.href ='./product.php'" > 品名</button>		
                    <br><button  style="margin-top:5px;" class="btn waves-effect waves-light btnCreate-user tooltipped" data-position="top"  onclick="document.location.href ='./person.php'" > 经办人</button>	
                
                </div>
  </div>
     
<script>
 jQuery(document).ready({

 var start;
 var stop;
                        var startPosition = 0;
                        var mult = 1.3;
                        jQuery("nav").draggable({

                            axis: "x",
                            start: function(event, ui) {
                                start = ui.position.left;
                            },
                            stop: function(event, ui) {
                                stop = ui.position.left;
                            },
                            drag: function( event, ui ) {

                                ui.position.left += (ui.offset.left - ui.originalPosition.left) * mult;
                                if(ui.position.left > startPosition){
                                    ui.position.left = startPosition;
                                }
                                 if(ui.position.left <  -2000 ){
                                    ui.position.left = -2000;
                                }
                            }
                        });

 });

</script>
<style>
div.nav-wrapper {
}
</style>
  <main>
    <div class="section no-pad-bot" id="index-banner">
      <div class="">
