/* Copyright 2005 Flávio Ribeiro
This file is part of OCOMON.
OCOMON is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
OCOMON is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Foobar; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
is_file( "./includes/config.inc.php" )
or die( "Você precisa configurar o arquivo config.inc.php em OCOMON/INCLUDES/para iniciar o uso do OCOMON! Leia o arquivo README.TXT para obter as principais informações sobre a instalação do OCOMON!".
"
You have to configure the config.inc.php file in OCOMON/INCLUDES/ to start using Ocomon! Read the file README.TXTto get the main informations about the Ocomon Installation!" );
session_start();
//session_destroy();
if (!isset($_SESSION['s_language'])) $_SESSION['s_language']= "pt_BR.php";
if (!isset($_SESSION['s_usuario'])) $_SESSION['s_usuario']= "";
if (!isset($_SESSION['s_logado'])) $_SESSION['s_logado']= "";
if (!isset($_SESSION['s_nivel'])) $_SESSION['s_nivel']= "";
include ("PATHS.php");
//include ("".$includesPath."var_sessao.php");
include ("includes/functions/funcoes.inc");
include ("includes/javascript/funcoes.js");
include ("includes/queries/queries.php");
include ("".$includesPath."config.inc.php");
//require_once ("includes/languages/".LANGUAGE."");
include ("".$includesPath."versao.php");
include("includes/classes/conecta.class.php");
$conec = new conexao;
$conec->conecta('MYSQL') ;
$qryLang = "SELECT * FROM config";
$execLang = mysql_query($qryLang);
$rowLang = mysql_fetch_array($execLang);
$_SESSION['s_language']= $rowLang['conf_language'];
$uLogado = $_SESSION['s_usuario'];
if (empty($uLogado)) {
$USER_TYPE = TRANS('MNS_OPERADOR');//$TRANS['MNS_OPERADOR'];
$uLogado = TRANS('MNS_NAO_LOGADO'); //$TRANS['MNS_NAO_LOGADO'];
$logInfo = "".TRANS('MNS_LOGON').""; //$TRANS['MNS_LOGON']
$hnt = TRANS('HNT_LOGON');
} else {
if ($_SESSION['s_nivel'] < 3) {
$USER_TYPE = TRANS('MNS_OPERADOR');
} else
$USER_TYPE = TRANS('MNS_USUARIO');
$logInfo = "".TRANS('MNS_LOGOFF')."";
$hnt = TRANS('HNT_LOGOFF');
}
$marca = "HOME";
//print "";
print "";
print "
";
if (empty($_SESSION['s_permissoes'])&& $_SESSION['s_nivel']!=1){
print "
";
print "
";
print "
";
print "
";
print "
";
$conec->desconecta('MYSQL');
} else{
// include("includes/classes/conecta.class.php");
// $conec = new conexao;
// $conec->conecta('MYSQL') ;
$qryconf = $QRY["useropencall"];
$execconf = mysql_query($qryconf) or die('Não foi possível ler as informações de configuração do sistema!');
$rowconf = mysql_fetch_array($execconf);
$qryStyle = "SELECT * FROM temas t, uthemes u WHERE u.uth_uid = ".$_SESSION['s_uid']." and t.tm_id = u.uth_thid";
$execStyle = mysql_query($qryStyle) or die('ERRO NA TENTATIVA DE RECUPERAR AS INFORMAÇÕES DE ESTILOS! '.$qryStyle);
$rowStyle = mysql_fetch_array($execStyle);
$regs = mysql_num_rows($execStyle);
if ($regs==0){ //SE NÃO ENCONTROU TEMA ESPECÍFICO PARA O USUÁRIO
unset ($rowStyle);
$qryStyle = "SELECT * FROM styles";
$execStyle = mysql_query($qryStyle);
$rowStyle = mysql_fetch_array($execStyle);
}
print "
";
if ($sis=="") $sis="sis=a";
if ($sisPath=="") $sisPath="";
if ($sistem=="") $sistem = "menu.php";
if ($marca=="")$marca = "ADMIN";
//$home = "home=true";
} else
print "
".TRANS('MNS_ADMIN')."
";
print "
";
$conec->desconecta('MYSQL');
}
print "
";
print "
";
if ($_SESSION['s_logado']){
//BLOCO PARA RECARREGAR A PÁGINA NO MÓDULO ADMIN QUANDO FOR SELECIONADO NOVO TEMA
if (isset($_GET['LOAD']) && $_GET['LOAD'] == 'ADMIN'){
$PARAM = "&LOAD=ADMIN";
$marca = "ADMIN";
}else
$PARAM = "";
print "