<?php
//
// Montar MENU LATERAL
REQUIRE_ONCE('./modulos/modulos.inc');
// Largura do Item     Invervalo dos pulos    Pulos da lateral em pixel
$nWidthItem = 70;      $nInter_Efeito = 8;    $nPulo_no_Left = 20;       $nPosAtu = 0;
$nIntervalo_Snc = 30*60;         // Intervalo para atualizar informa��es (em segundos)
//$nFatDelDias = SQLVarConfig('GARCOM_FAT_ITEM_DEL_DIAS')+0;
$nData_Trabalho = ConvertDataSTR(SQLVarConfig('DATA_DE_TRABALHO'));           // Data de trabalho
$nData_Ult_Intg = ConvertDtHrSTR(SQLVarConfig('DATA_WEB_ULT_INTEGRACAO'));    // Data e hora da ultima sincroniza��o Web

$bTribuFiscal = Terminal_e_Fiscal();
$bRev_Gas = SQLVarConfig('REVENDA_DE_GAS'); // para mostrar relat�rio no menu somente g�s
//
//  ** PRINCIPAL **
If ( EMPTY($sSubModulo) ) {
    $sLocal_ECook_URI = $_SERVER['REQUEST_URI'];
    $sLocal_ECook_URI = SUBSTR($sLocal_ECook_URI,0,STRPOS(STRTOLOWER($sLocal_ECook_URI),"car_js.php"));
    SQLVarConfigG("LOCAL_ECOOK_URI", $sLocal_ECook_URI);
    $RowT_CadDir = MYSQL_QUERY("SELECT * FROM cad_direitos WHERE DIR_CODIGO=0 ;") or die(MYSQL_ERROR());
    $RowT_CadDir = MYSQL_FETCH_OBJECT($RowT_CadDir);
    $sLst_AcsGer = @$RowT_CadDir->DIR_ACESSO;
    $sMenuLat_HTML = '';
    $nMenuCont1    = 1;
    $bDir_ConPag = False;
    $sMODULOS_ACESSO_RETWEB = SQLVarConfig( 'MODULOS_ACESSO_RETWEB' );
    //
    While ($nMenuCont1<18) {
       $sM_Titulo = @$aMenuLat[$nMenuCont1.'_TITULO'];
       $sM_Imagem = @$aMenuLat[$nMenuCont1.'_IMAGEM'];
       $bM_M_Menu = @$aMenuLat[$nMenuCont1.'_H_MENU']+0;   // Ocultar no menu
       If ( STRLEN($sM_Titulo)==0 OR $bM_M_Menu ) { BREAK; }
   
	   
	   
       $nMenuCont2 = 1;
       $sTemp1_HTML = '';
       $nMenuContW = 1;
       While ($nMenuCont2<15) {
          $sMS_Titulo   = @$aMenuLat[$nMenuCont1.'_'.$nMenuCont2.'_TITULO'];
          $sMS_Imagem   = @$aMenuLat[$nMenuCont1.'_'.$nMenuCont2.'_IMAGEM'];
          $sMS_Acesso   = @$aMenuLat[$nMenuCont1.'_'.$nMenuCont2.'_ACESSO'];
          $sMS_Modulo   = @$aMenuLat[$nMenuCont1.'_'.$nMenuCont2.'_MODULO'];
    	  $sMS_Condic   = @$aMenuLat[$nMenuCont1.'_'.$nMenuCont2.'_CONDIC'];
    	  $sMS_M_Menu   = @$aMenuLat[$nMenuCont1.'_'.$nMenuCont2.'_M_MENU'];
		  $bM_M_Menu_Sub= @$aMenuLat[$nMenuCont1.'_'.$nMenuCont2.'_H_MENU']+0;
//        If ( STRLEN($sMS_Titulo)==0 OR $bM_M_Menu_Sub ) { BREAK; }
          If ( STRLEN($sMS_Titulo)>0 and ! $bM_M_Menu_Sub ) {
		  
		  
    	  $bAcsPerm = ( STRPOS(' ;'.$sLst_AcsGer, ';'.$sMS_Acesso.';')>0 );
    	  If ( STRLEN($sMS_M_Menu)>0 ) {
    	     If ( ($sMS_M_Menu+0)==0) {
    	        $bAcsPerm = False; 
    		 }
    	  }
    	  If ($sMS_Acesso=="RELVEN") {
    	     If (! $bRev_Gas) {
    		    $bAcsPerm = False;
             }
    	  }
          //
    	  If ($bAcsPerm) { $bAcsPerm = ( STRPOS(' '.@$s_DireitosLst, '<|'.$sMS_Acesso.'|>')>0 ); }
          //
    	  If (STRPOS(' '.$sMS_Condic,"(LIVRE)")>0 ) {
            $bAcsPerm = True;
          }
    	  If ($bAcsPerm && STRPOS(' '.$sMS_Condic,"(FISCAL)")>0 ) {
            $bAcsPerm = $bTribuFiscal;
          }
    	  If ($bAcsPerm && STRPOS(' '.$sMS_Condic,"(CFG_ACESSO_WEB)")>0 ) {
            $bAcsPerm = ( STRPOS( ' ;'.$sMODULOS_ACESSO_RETWEB.';', ";".$sMS_Acesso.";" )>0 );
          }
          //
    	  If ($bAcsPerm) {
    		  //$sOnClkMenu = "ChamarModJ('".$sMS_Acesso."','".$sMS_Modulo."');";
    		  If ($sMS_Acesso=="FINCPG") {
    		     $bDir_ConPag = True; 
    		     //$sOnClkMenu = "location.href = './interno/mov_contas_pagar_despesas.php'";
    		     //$sOnClkMenu = "window.open('./interno/mov_contas_pagar_despesas.php','_blank');";
    		    $sOnClkMenu = "ChamarModJ('".$sMS_Acesso."','".$sMS_Modulo."');";
    		  } Else {
    		    $sOnClkMenu = "ChamarModJ('".$sMS_Acesso."','".$sMS_Modulo."');";
    		  }
    		  
    		  $sTemp1_HTML =
    	       '<td width="'.$nWidthItem.'px">'.
                '<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" onclick="'.$sOnClkMenu.'">'.
    			 '<tr>'.
                  '<td align="center" valign="middle">'.
    	           '<img src="images/'.$sMS_Imagem.'" border="0" width="48px" height="48px" style="cursor: pointer;">'.
                  '</td>'.
                 '</tr>'.
    			 '<tr>'.
                  '<td height="" align="center" valign="top">'.
    	           '<a style="cursor: pointer;">'.$sMS_Titulo.'</a>'.
                  '</td>'.
                 '</tr>'.
                '</table>'.
    	       '</td>'.
    	       $sTemp1_HTML;
    		 $nMenuContW++;
    	  }
		  
			}
          $nMenuCont2++;
       }
	   
	   
	   
       If (STRLEN($sTemp1_HTML)>5) {
          $sTemp1_HTML = '<table height="100%" border="0" cellspacing="0" cellpadding="0"><tr>'.$sTemp1_HTML.'</tr></table>';
          $nWeightMax = $nWidthItem*($nMenuContW-1);
          
    	  $sMenuLat_HTML .=
            //'<div id="dv_MenuL_Item'.$nMenuCont1.'" style="position:relative; left:-'.$nWeightMax.'px; width:'.($nWeightMax+85).'px; height:85px; background:url(images/barra1_menu.png) no-repeat; background-position: right top;" onmouseover="Car_Indc1.T_EfeitoMenu'.$nMenuCont1.'( 1, '.$nPulo_no_Left.' );" onmouseout="Car_Indc1.T_EfeitoMenu'.$nMenuCont1.'( 1, -'.$nPulo_no_Left.' );" onclick="Car_Indc1.T_EfeitoMenu'.$nMenuCont1.'( 2, -'.$nPulo_no_Left.' );">'.
    		'<div id="dv_MenuL_Item'.$nMenuCont1.'" style="position:relative; left:-'.$nWeightMax.'px; width:'.($nWeightMax+90).'px; height:85px; background:url(images/barra1_menu.png) no-repeat; background-position: right top;" onClick="Car_Indc1.T_ClickMenu('.$nMenuCont1.');">'.
            '<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">'.
             '<tr>'.
    	      '<td valing="middle" align="right">'.
    	       $sTemp1_HTML.
    	      '</td>'.
    	      '<td width="10px" valing="middle" align="right">'.
               '<table height="75px">'.
                '<tr>'.
                 '<td style="border-right-style: solid; border-right-width: 1px;">'.
                  '&nbsp;'.
    	         '</td>'.
                '</tr>'.
               '</table>'.
    	      '</td>'.
    	      '<td width="90px">'.
               '<table width="100%" height="100%" id="tbp_MenuL_Item'.$nMenuCont1.'" style="cursor:pointer;">'.
                '<tr>'.
                 '<td align="center" valign="middle">'.
    	          '<img src="images/'.$sM_Imagem.'" border="0" width="48px" height="48px">'.
                 '</td>'.
                '</tr><tr>'.
                 '<td height="20px" align="center" valign="top">'.
    	          ''.$sM_Titulo.''.
                 '</td>'.
                '</tr>'.
               '</table>'.
    	      '</td>'.
    	      '<td width="4px" valing="middle" align="right">'.
    	        '&nbsp;'.
    	      '</td>'.
    	     '</tr>'.
            '</table>'.
           '</div>';
           //
          $sRet_Javs .=
           "var vT_EfeitoMenu".$nMenuCont1.";".
    	   "var vT_SelectMenu".$nMenuCont1."=0;".
    	   "function T_EfeitoMenu".$nMenuCont1."( bIniciaTimer, nSomaM ) {".
    	      "var dvM, nWeight;".
    	 	  "if ( nSomaM>0 && vB_EfeitoMenuT ) { return; }".
              "var TbpM = parent.document.getElementById('tbp_MenuL_Item".$nMenuCont1."');".
              "if (nSomaM>0 && vT_SelectMenu".$nMenuCont1."==0) {".
    			  "parent.Alt_Transparencia(TbpM,40);".
    		      "vT_SelectMenu".$nMenuCont1." = 1;".
    		  "} else if (nSomaM<0 && vT_SelectMenu".$nMenuCont1."==1 ) {".
    			  "parent.Alt_Transparencia(TbpM,-1);".
    		      "vT_SelectMenu".$nMenuCont1." = 0;".
    		  "}".
    		  
    		  "if ( bIniciaTimer==2 ) {".
    	 	      "vB_EfeitoMenuT = 1;".
     	      "}".
              "if ( bIniciaTimer ) {".
        	      "if ( vT_EfeitoMenu".$nMenuCont1."!=null ) {".
         	      "clearInterval(vT_EfeitoMenu".$nMenuCont1.");".
         	  "}".
         	  "vT_EfeitoMenu".$nMenuCont1." = setInterval(function(){ T_EfeitoMenu".$nMenuCont1."(0,nSomaM) },".$nInter_Efeito.");".
         	  "}".
              "dvM = parent.document.getElementById('dv_MenuL_Item".$nMenuCont1."');".
              "nWeight = parseInt(dvM.style.left)+nSomaM;".
         	  "if ( nSomaM<0 && nWeight<-".$nWeightMax." ) {".
         	      "nWeight = -".$nWeightMax.";".
    	 	      "vB_EfeitoMenuT = 0;".
         	      "clearInterval(vT_EfeitoMenu".$nMenuCont1.");".
         	  "} else if ( nWeight>0 ) {".
         	      "nWeight = 0;".
    	 	      "vB_EfeitoMenuT = 0;".
         	      "clearInterval(vT_EfeitoMenu".$nMenuCont1.");".
         	  "}".
              "dvM.style.left = nWeight+'px';".
           "}";
    	   
       }
       $nMenuCont1++;
    }
    // Hora atual
    $sRet_Javs .=
      "var vB_EfeitoMenuT=0;".
      "var hh = ".DATE("H").";".
      "var mm = ".DATE("i").";".
      "var ss = ".DATE("s").";".
      "function Relogio_Automatico() {".
         "if (ss >= 60) {".
             "ss = 00;".
             "mm = mm + 1;".
             "if (mm >= 60){".
                 "mm = 00;".
                 "hh = hh + 1;".
                 "if (hh >= 24){".
                     "hh = 00;".
                 "}".
    	     "}".
    	 "}".
         "ss = ss + 1;".
         "if (hh <= 9){".
             'xhh = "0" + hh;'.
         "} else {".
             "xhh = hh;".
         "}".
         "if (mm <= 9){".
             'xmm = "0" + mm;'.
         "} else {".
             "xmm = mm;".
         "}".
         "if (ss <= 9){".
             'xss = "0" + ss;'.
         "} else {".
             "xss = ss;".
         "}".
         'parent.document.getElementById("sp_barrasup_hora").innerHTML = xhh + ":" + xmm + ":" + xss;'.
         'setTimeout("Relogio_Automatico();", 1000);'.
      '}'.
      'setTimeout("Relogio_Automatico();", 1000);'.
      //
      "var objBody = parent.document.body; ".
      "var New_Script = document.createElement('script'); ".
      "New_Script.setAttribute('type','text/javascript'); ".
      "var script = parent.document.createTextNode(".
        JAVA_CharCode(
          "var bModIni_Ping_Ativo = true;".
          "function Executar_Ping() {".
            "nIntervalo = 10;".
            "if ( bModIni_Ping_Ativo ) {".
                //"frames['car_Sessao_Ping'].location.reload();".
                "frames['car_Sessao_Ping'].location.href = './car_js.php?mod=SESSAO_PING';".
                "nIntervalo = 120;".
            "}".
            "setTimeout( Executar_Ping ,nIntervalo*1000);".
          "}"
        ).
      ");".
      "New_Script.appendChild(script); ".
      "objBody.appendChild(New_Script);".
      //
      '';
    //
    $sRet_JavsPos .=
      "parent.Executar_Ping();".
      // Bot�o de sair fica visivel ou invisivel igual a barra
      "function AcompanhaBtSair() {".
         'parent.document.getElementById("img_Ini_btSair").style.visibility = parent.document.getElementById("dv_MenuL_Barra").style.visibility;'.
         'setTimeout("AcompanhaBtSair();", 500);'.
      "}".
      "AcompanhaBtSair();".
      "nPosMenuAtual = 0;".
      "function T_ClickMenu( nPosMenu ) {".
    	  "if ( nPosMenuAtual != 0) {".
             "setTimeout('T_EfeitoMenu'+nPosMenuAtual+'(1,-".$nPulo_no_Left.");', 10);".
    	     "if (nPosMenu == nPosMenuAtual) {".
    		     "nPosMenu = 0;".
    		 "} else {".
                 "setTimeout('T_EfeitoMenu'+nPosMenu+'(1,".$nPulo_no_Left.");', 10);".
    		 "}".
    	  "} else {".
             "setTimeout('T_EfeitoMenu'+nPosMenu+'(1,".$nPulo_no_Left.");', 10);".
    	  "}".
    	  "nPosMenuAtual = nPosMenu;".
      "}".
	  //
	  "function Puxar_Infs_Auto() {".
	     "var Fm = parent.document.forms.fm_Puxa_Info;".
		 "Fm.submod.value = 'PUXAR_INFS';".
		 "Fm.acao.value = '';".
		 "Fm.submit();".
	     "setTimeout('Puxar_Infs_Auto()',".($nIntervalo_Snc*1000).");".
	  "}".
	  "setTimeout('Puxar_Infs_Auto()',500);".
      "";
    //
    // 
    If ( ISSET($aSessao['LICENCA_SFT_VALIDA']) ) {
       If ( $aSessao['LICENCA_SFT_VALIDA'] ) {
          $aSessao['LIC_LIBERADO'] = True;
          //$aSessao['CHA_LIBERADO'] = True;
          //$aSessao['PER_CINCO']   = False;
       } Else {
          $aSessao['LIC_LIBERADO'] = False;
       }
    }
    If ( SQLVarConfig('CFG_T_D_P')+0>0 ) {
       $aSessao['LIC_LIBERADO'] = @$aSessao['LICENCA_SFT_VALIDA']+0;
    } 
    //ECHO    // *** Teste ***
    //  'LICENCA_SFT_VALIDA='.(@$aSessao['LICENCA_SFT_VALIDA']+0).'<br>'.
    //  'LIC_LIBERADO='.(@$aSessao['LIC_LIBERADO']+0).'<br>'.
    //  'CHA_LIBERADO='.(@$aSessao['CHA_LIBERADO']+0).'<br>'.
    //  'PER_CINCO='.(@$aSessao['PER_CINCO']+0).'<br>'.
    //  '';
    //trava de hd
    If (!( @$aSessao['LIC_LIBERADO'] )) {
      $sRet_Javs .= "parent.ChamarMod('lic_liberacao',2);";
    //verifica se tem que digitar chave
    } ElseIf ( !( @$aSessao['CHA_LIBERADO'])) {
      $sRet_Javs .= "parent.ChamarMod('lib_prazo',2);";
    } 
    //
    If ( ! ISSET($aSessao['PER_CINCO']) ) {
       $aSessao['PER_CINCO'] = False;
    }
    If(SUBSTR(@$_Lib_erado,0,1)=='F'){ // FALTA CINCO DIAS
    	$aSessao['DIA_CINCO'] = SUBSTR(@$_Lib_erado,1,1);	  
    	If(!$aSessao['PER_CINCO']) { // SE JA PEDIU NAO PEDE DE NOVO
       	$sRet_Javs .= "parent.ChamarMod('men_cinco',2);";
    	   $aSessao['PER_CINCO'] = True;
    	}
    			
    }
    //                 HD                     CHAVE DE INTERNET
    If ( @$aSessao['LIC_LIBERADO'] && @$aSessao['CHA_LIBERADO'] &&  ( ! @$aSessao['PER_CINCO'])) {
      //
       // AVISO: Limpesa de comandas
       //If ($nFatDelDias>0) {
       //   $sRet_Javs .= Info_Evento('CUIDADO!!!! O sistema est� configurado para apagar as comandas com mais de '.$nFatDelDias.' dia(s).');
       //} Else {
          //
          // AVISO: Sobre a configura��o para Retaguarda CLIPPER
          If ((SQLVarConfig('QUAL_RETAGUARDA')+0)==0) {
             $sRet_Javs .= Info_Evento('CUIDADO!!!! O Gar�om Express est� configurado para trabalhar com Retaguarda Clipper.');
          } Else {
             // verifica se tem direitos ao contas a pagar para avisar na tela
    		 If ($bDir_ConPag) {
    		    $sDComputador = DATE("Y-m-d", TIME());
    			$sData_Select = DATE("Y-m-d", TIME()-(60*60*24*3)); //Data do computador -3
    		    
    		    $Row_MovPag = MYSQL_QUERY("SELECT CTP_DTAVEN FROM fin_contas_pagar WHERE (CTP_DTAVEN>='".$sData_Select."' ) AND (CTP_DTAVEN<='".$sDComputador."') AND CTP_DTAPAG=0 AND CTP_DTACAN=0;") or die('ERRO NO SELECT fin_contas_pagar. '.mysql_error());
    		    If (MYSQL_NUM_ROWS($Row_MovPag)>0) {
    			   $sRet_Javs .="parent.Alerta_Simples('ATENCAO: Existem Duplicatas Vencendo Hoje !',0);";
    			}
    		 }
    		 //
             // AVISO: Sobre o backup
             If ( (SQLVarConfig('ECOOK_EFETUAR_BKP_ATRASADO')+0>0) ) {
       	        $nData_UltBkp = ConvertDataSTR(SQLVarConfig('DATA_ULT_BKP'));
                If ( $nData_UltBkp<(TIME()-(4 *24*60*60)) ) {
                   $sRet_Javs .= Info_Evento('ATENCAO: O backup do sistema est� muito atrazado.<br>O Ultimo backup efetuado foi em '.DATE("d/m/Y",$nData_UltBkp).'.');
                }
             }
          }
       //}
       //
    } //Else {
      //$sRet_Javs .= "parent.ChamarMod('lic_liberacao',2);";
    //}
    IF ( @$aSessao['LIC_LIBERADO'] && @$aSessao['CHA_LIBERADO'] && (SQLVarConfig('ECOOK_ZERAR_COMANDAS')+0>0) ) {
       $sRet_Javs .= "parent.ChamarMod('seq_comandas',3);";
    }
    //
    $sRet_Tela1_HTML .=
      //'<iframe name="car_Sessao_Ping" src="./car_js.php?mod=SESSAO_PING" onload="'."setTimeout( function () { frames['car_Sessao_Ping'].location.reload(); } ,120000);".'"></iframe>'.
      '<iframe name="car_Sessao_Ping" src="about:blank"></iframe>'.
      '<table width="100%" height="52px" style="background:url(images/barratitulo.png); -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -ms-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%;">'.
       '<tr>'.
    	  '<td width="20%" align="left" valign="middle">'.
    		 //'<img src="images/Logo_25.png"  border="0" height="50px">'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.
    		 '<img src="images/logo_simsoft_branco.png" border="0" height="52px">'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.
           //'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.     
    	  '</td>'.
          '<td width="25%" align="right" valign="middle">'.
    	    '<img src="images/eCook150X150.png"  border="0" height="50px">'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.
           //'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.
    	  '</td>'.
    	  '<td width="50%" align="right" valign="top" style="position:relative; top:0px;">'.
           '<span style="font-size:16px; color:#000000; font-weight:bold;">'.
             STRTOUPPER($Dados_Empresa['EMP_APELIDO']).
             '&nbsp;&nbsp;&nbsp;&nbsp;'.
           '</span>'.
           '<span style="font-size:16px; color:#000000; font-weight:bold;">'.
    		  ( $aSessao['LIC_LIBERADO'] ? 'Data de trabalho: '.DATE("d/m/Y",$nData_Trabalho) : '').
    	   '</span>'.
		   //
           '<div id="dv_Data_Ult_Intg" style="display:none; width:100%; color:#000000; font-size:11px; align-text:right;">'.
           '</div>'.
		   '<div style="display:none;">'.
            '<form name="fm_Puxa_Info" accept-charset="utf-8" method="post" action="./car_js.php" target="frm_Puxa_Info">'.
             '<input name="mod" type="hidden" value="'.$sModulo.'">'.
             '<input name="submod" type="hidden" value="">'.
             '<input name="acao" type="hidden" value="">'.
    	     '<input name="nomeacs" type="hidden" value="'.$sNomeAcesso.'">'.
			'</form>'.
			'<iframe name="frm_Puxa_Info"></iframe>'.
		   '</div>'.
		   //
           '<span align="left" valign="bottom" style="font-size: 11px; color: #000000;">'.
    	     '&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.'&nbsp;'.
    		  $aDias_da_Semana[(DATE("N",$nData_Trabalho)+0)].',&nbsp;'.
           '</span>'.	   
    	   '<span id="sp_barrasup_hora">00:00:00</span>&nbsp;&nbsp;'.
           '<span align="left" valign="bottom" style="color: #000000; font-size: 11px;">'.
            'Seu IP: '.ObterIPdoCliente().'&nbsp;'.
            'Funcion�rio: '.PegarPorPausa($R_CadFuncionario->FUN_NOMECP,3).
           '</span>'.
    	  '</td>'.
         
    	  //'<td width="250px" align="right" valign="bottom" style="font-size:17px; color:#FFFFFF; font-weight:bold;">'.
    	  //( $aSessao['LIC_LIBERADO'] ? 'Data de trabalho: '.DATE("d/m/Y",$nData_Trabalho) : '').
         //'</td>'.
    	  //'<td width="50%" align="right" valign="bottom" style="font-size: 11px; color: #FFFFFF;">'.
    	  //   $aDias_da_Semana[(DATE("N",$nData_Trabalho)+0)].',&nbsp;'.
    	  //   '<span id="sp_barrasup_hora">00:00:00</span>&nbsp;&nbsp;'.
         //'</td>'.
         //'<td width="50%" align="left" valign="bottom" style="color: #FFFFFF; font-size: 11px;">'.
         //   'Seu IP: '.ObterIPdoCliente().'&nbsp;'.
         //   'Funcion�rio: '.PegarPorPausa($R_CadFuncionario->FUN_NOMECP,3).
         //'</td>'.
         '<td width="60px" align="left" valign="middle" style="color: #FFFFFF;">'.
    	     '<img id="img_Ini_btSair" src="images/bot_sair.png" border="0" height="52px" onclick="'."parent.ChamarMod('logoff')".';" style="cursor:pointer;">'.
         '</td>'.
       '</tr>'.
      '</table>'.
      '<div id="qdr_TelaJ" style="position:absolute; top:57px; left:0px; width:100%; height:93%; overflow:auto;"></div>'.
      '<div id="dv_MenuL_Barra">'.
       ( $aSessao['LIC_LIBERADO'] ? $sMenuLat_HTML : '').
      '</div>'.
      '';
    //
    //$sRet_Tela1_HTML .=
    //  '<table width="100%" height="55px" style="background:url(images/barratitulo.png); -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -ms-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%;">'.
    //   '<tr>'.
    //    '<td width="170px" align="right" valign="middle">'.
    //     '<img src="images/logo_simsoft_branco.png" border="0" height="52px">'.
    //    '</td>'.
    //    '<td>'.
    //     '&nbsp;'.
    //    '</td>'.
    //    '<td width="250px" align="right" valign="bottom" style="font-size:17px; color:#FFFFFF; font-weight:bold;">'.
    //	 ( $aSessao['LIC_LIBERADO'] ? 'Data de trabalho: '.DATE("d/m/Y",$nData_Trabalho) : '').
    //    '</td>'.
    //    '<td width="200px" align="right" valign="bottom" style="font-size: 11px; color: #FFFFFF;">'.
    //	 $aDias_da_Semana[(DATE("N",$nData_Trabalho)+0)].',&nbsp;'.
    //	 '<span id="sp_barrasup_hora">00:00:00</span>&nbsp;&nbsp;'.
    //    '</td>'.
    //    '<td width="280px" align="left" valign="bottom" style="color: #FFFFFF; font-size: 11px;">'.
    //     'Seu IP: '.ObterIPdoCliente().'&nbsp;'.
    //     'Funcion�rio: '.PegarPorPausa($R_CadFuncionario->FUN_NOMECP,3).
    //    '</td>'.
    //    '<td width="60px" align="left" valign="middle" style="color: #FFFFFF;">'.
    //	 '<img id="img_Ini_btSair" src="images/bot_sair.png" border="0" height="52px" onclick="'."parent.ChamarMod('logoff')".';" style="cursor:pointer;">'.
    //    '</td>'.
    //   '</tr>'.
    //  '</table>'.
    //  '<div id="qdr_TelaJ" style="position:absolute; top:57px; left:0px; width:100%; height:93%; overflow:auto;"></div>'.
    //  '<div id="dv_MenuL_Barra">'.
    //   ( $aSessao['LIC_LIBERADO'] ? $sMenuLat_HTML : '').
    //  '</div>'.
    //  '';
    //
} ElseIf ( $sSubModulo == "PUXAR_INFS" ) {
	$sHTML_Data_Intg = '';
	If ( $nData_Ult_Intg > MKTIME(0,0,0,1,1,2015) ) {
	   $sHTML_Data_Intg =
	      '<div style="height:3px;"></div>'.
	      'Data da ultima sincroniza��o: '.DATE("d/m/Y H:i:s",$nData_Ult_Intg).
	      '<div style="height:6px;"></div>'.
	      '';
	}
	$sRet_JavsPos .=
	   "var dv_Data_Intg = parent.document.getElementById('dv_Data_Ult_Intg');".
	   ( EMPTY($sHTML_Data_Intg) ?
	    "dv_Data_Intg.style.display = 'none';"
	   :
	    "dv_Data_Intg.innerHTML = ".JAVA_CharCode($sHTML_Data_Intg).";".
	    "dv_Data_Intg.style.display = '';"
	   ).
	   "";
}
?>