<? //	@session_start(); ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pt-br">

<?php
// VERIFICA SE EXISTE A SESSAO. SE NAO EXISTIR INCLUI O VER_SESSAO
if( $_SESSION[sistema] == '' )
	include_once "ver_sessao.php";

include $_SERVER[DOCUMENT_ROOT].$_SESSION[sistema]."configura.php";

$CACTUX_CONF['path'] = $CONFIGURA[PATH];
//include $_SERVER[DOCUMENT_ROOT]."/cactux25/cactux.php"; // CACTUX (c) 2006 CACTUS TI
//include $_SERVER[DOCUMENT_ROOT]."/cactux3/cactux.php"; // CACTUX (c) 2006 CACTUS TI

if($CONFIGURA[LAYOUT]!='layout'){
	// CACTUX (c) 2006 CACTUS TI
	if( fopen($_SERVER[DOCUMENT_ROOT].$_SESSION[sistema]."/cactux3/cactux.php",'r')  ) {
		include $_SERVER[DOCUMENT_ROOT].$_SESSION[sistema]."/cactux3/cactux.php";
	} else {
		include $_SERVER[DOCUMENT_ROOT]."/cactux3/cactux.php";
	}

	// O FUNCOES_FORM FOI LEVADO PAR AO CACTUX3
	//include "funcoes_form.php";

	// O FUNCOES_PAGINA DEVE FICAR DENTRO DA PASTA DO CLIENTE

	include $_SERVER[DOCUMENT_ROOT].$_SESSION[sistema]."funcoes_pagina.php";
}else{

	// include "$_SERVER[DOCUMENT_ROOT]/cactux3/funcoes/funcoes_pagina.php";
	include $_SERVER[DOCUMENT_ROOT].$_SESSION[sistema]."/".$CONFIGURA[LAYOUT]."/funcoes_pagina.php";
	include "$_SERVER[DOCUMENT_ROOT]/cactux3/funcoes/funcoes_bd.php";
	// include "$_SERVER[DOCUMENT_ROOT]/cactux3/funcoes/funcoes_form.php";
	include $_SERVER[DOCUMENT_ROOT].$_SESSION[sistema]."/".$CONFIGURA[LAYOUT]."/funcoes_form.php";
	// include "$_SERVER[DOCUMENT_ROOT]/cactux3/funcoes/funcoes_diversas.php";
	include $_SERVER[DOCUMENT_ROOT].$_SESSION[sistema]."/".$CONFIGURA[LAYOUT]."/funcoes_diversas.php";
	include "$_SERVER[DOCUMENT_ROOT]/cactux3/funcoes/funcoes_ajax.php";
	include "$_SERVER[DOCUMENT_ROOT]/cactux3/funcoes/funcoes_aba.php";
	// include "$_SERVER[DOCUMENT_ROOT]/cactux3/funcoes/funcoes_grid.php";
	include $_SERVER[DOCUMENT_ROOT].$_SESSION[sistema]."/".$CONFIGURA[LAYOUT]."/funcoes_grid.php";
//	include "$_SERVER[DOCUMENT_ROOT]/cactux3/funcoes/funcoes_combo.php";
	include $_SERVER[DOCUMENT_ROOT].$CONFIGURA[PATH]."/".$CONFIGURA[LAYOUT]."/funcoes_combo.php";
	

	include $_SERVER[DOCUMENT_ROOT].$_SESSION[sistema]."/".$CONFIGURA[LAYOUT]."/funcoes_layout.php";
	setDestino('_top'); // faz com que os link sejam direcionados para a janela superior! caso tenha um frame entrar com onome do frame

	$PHP_SELF = $_SERVER[SCRIPT_NAME]; 
	// mudan? ocorrida no servidor que necessita substituir a variavel $PHP_SELF por essa outra superglobal

?>


<script src="/cactux3/js/funcoes.js"></SCRIPT>
<script src="/cactux3/js/ajax.js"></SCRIPT>
<script src="<?= $_SESSION[sistema].$CONFIGURA[LAYOUT]?>/div.js"></SCRIPT>
<script src="/cactux3/js/mascaras.js"></SCRIPT>
<script src="<?= $_SESSION[sistema].$CONFIGURA[LAYOUT]?>/combo_net.js"></SCRIPT>
<script src="<?= $_SESSION[sistema].$CONFIGURA[LAYOUT]?>/combo_novo.js"></SCRIPT>

<script src="<?=$_SESSION[sistema].$CONFIGURA[LAYOUT]?>/js/janela.js?1"></SCRIPT>
<?
}


include "pdv/pdv_funcoes.php";
echo "<script src='/kernel/pdv/pdv.js?".time()."'></script>\r\n";

set_destino_frame();
	
setlocale(LC_CTYPE,"pt_BR");	

date_default_timezone_set('America/Fortaleza');


error_reporting(E_ALL && ~E_NOTICE);
// ---------------------------------------------------------------
//
// acho que o conecta deve ser iqual ao ver_sessao. apenas direcionar par ao da pasta do cliente
//
// ---------------------------------------------------------------
?>

