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
  */
include "../../includes/include_geral.inc.php";
include "../../includes/include_geral_II.inc.php";
include 'includes/header.php';
$cab = new headers();
$cab->set_title($TRANS["html_title"]);
$auth = new auth();
$auth->testa_user($s_usuario, $s_nivel, $s_nivel_desc, 4);
if ($s_nivel != 1) {
    echo "<META HTTP-EQUIV=REFRESH   CONTENT=\"0;\n                        URL=../index.php\">";
} else {
    $query = "SELECT c.comp_inv as etiqueta, c.comp_sn as serial, c.comp_nome as nome, \n \t\t\tc.comp_nf as nota, inst.inst_nome as instituicao, inst.inst_cod as cod_inst,\n \t\t\tc.comp_coment as comentario, c.comp_valor as valor, c.comp_data as data_cadastro, \n\t\t\tc.comp_data_compra as data_compra, c.comp_ccusto as ccusto, c.comp_situac as situacao, \n\t\t\tc.comp_local as tipo_local, loc.loc_reitoria as reitoria_cod, reit.reit_nome as reitoria,\n\t\t\tc.comp_mb as tipo_mb, c.comp_proc as tipo_proc,\n\t\t\tc.comp_tipo_equip as tipo, c.comp_memo as tipo_memo, c.comp_video as tipo_video,\n\t\t\tc.comp_modelohd as tipo_hd, c.comp_modem as tipo_modem, c.comp_cdrom as tipo_cdrom,\n\t\t\tc.comp_dvd as tipo_dvd, c.comp_grav as tipo_grav, c.comp_resolucao as tipo_resol,\n\t\t\tc.comp_polegada as tipo_pole, c.comp_tipo_imp as tipo_imp,\n\t\t\tequip.tipo_nome as equipamento, c.comp_rede as tipo_rede, c.comp_som as tipo_som,\n\t\t\tt.tipo_imp_nome as impressora, loc.local, \n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tproc.mdit_fabricante as fabricante_proc, proc.mdit_desc as processador, proc.mdit_desc_capacidade as clock, proc.mdit_cod as cod_processador,\n\t\t\thd.mdit_fabricante as fabricante_hd, hd.mdit_desc as hd, hd.mdit_desc_capacidade as hd_capacidade,hd.mdit_cod as cod_hd,\n\t\t\tvid.mdit_fabricante as fabricante_video, vid.mdit_desc as video, vid.mdit_cod as cod_video,\n\t\t\tred.mdit_fabricante as rede_fabricante, red.mdit_desc as rede, red.mdit_cod as cod_rede,\n\t\t\tmod.mdit_fabricante as fabricante_modem, mod.mdit_desc as modem, mod.mdit_cod as cod_modem,\n\t\t\tcd.mdit_fabricante as fabricante_cdrom, cd.mdit_desc as cdrom, cd.mdit_cod as cod_cdrom,\n\t\t\tgrav.mdit_fabricante as fabricante_gravador, grav.mdit_desc as gravador, grav.mdit_cod as cod_gravador,\n\t\t\tdvd.mdit_fabricante as fabricante_dvd, dvd.mdit_desc as dvd, dvd.mdit_cod as cod_dvd,\n\t\t\tmb.mdit_fabricante as fabricante_mb, mb.mdit_desc as mb, mb.mdit_cod as cod_mb,\n\t\t\tmemo.mdit_desc as memoria, memo.mdit_cod as cod_memoria,\n\t\t\tsom.mdit_fabricante as fabricante_som, som.mdit_desc as som, som.mdit_cod as cod_som, \n\n\t\t\tfab.fab_nome as fab_nome, fab.fab_cod as fab_cod, fo.forn_cod as fornecedor_cod, \n\t\t\tfo.forn_nome as fornecedor_nome, model.marc_cod as modelo_cod, model.marc_nome as modelo,\n\t\t\tpol.pole_cod as polegada_cod, pol.pole_nome as polegada_nome, \n\t\t\tres.resol_cod as resolucao_cod, res.resol_nome as resol_nome,\n\t\t\tsit.situac_cod as situac_cod, sit.situac_nome as situac_nome,\n\t\t\tdate_add(c.comp_data_compra, interval tmp.tempo_meses month)as vencimento\n\t\t\n\t\tFROM ((((((((((((((((((equipamentos as c left join  tipo_imp as t on \n\t\t\tt.tipo_imp_cod = c.comp_tipo_imp) left join polegada as pol on c.comp_polegada\n\t\t\t = pol.pole_cod) left join resolucao as res on c.comp_resolucao = res.resol_cod)\n\t\t\tleft join fabricantes as fab on fab.fab_cod = c.comp_fab) \n\t\t\tleft join fornecedores as fo on fo.forn_cod = c.comp_fornecedor) \n\t\t\tleft join situacao as sit on sit.situac_cod = c.comp_situac)\n\t\t\tleft join tempo_garantia as tmp on tmp.tempo_cod =c.comp_garant_meses)\n\t\t\t\n\t\t\tleft join modelos_itens as proc on proc.mdit_cod = c.comp_proc)\n\t\t\tleft join modelos_itens as hd on hd.mdit_cod = c.comp_modelohd)\n\t\t\tleft join modelos_itens as vid on vid.mdit_cod = c.comp_video)\n\t\t\tleft join modelos_itens as red on red.mdit_cod = c.comp_rede)\n\t\t\tleft join modelos_itens as mod on mod.mdit_cod = c.comp_modem)\n\t\t\tleft join modelos_itens as cd on cd.mdit_cod = c.comp_cdrom)\n\t\t\tleft join modelos_itens as grav on grav.mdit_cod = c.comp_grav)\n\t\t\tleft join modelos_itens as dvd on dvd.mdit_cod = c.comp_dvd)\n\t\t\tleft join modelos_itens as mb on mb.mdit_cod = c.comp_mb)\n\t\t\tleft join modelos_itens as memo on memo.mdit_cod = c.comp_memo)\n\t\t\tleft join modelos_itens as som on som.mdit_cod = c.comp_som),\n\n\t\t\t\n\t\t\tlocalizacao as loc, instituicao as inst, marcas_comp as model, tipo_equip as equip,\n\t\t\treitorias as reit\n            WHERE\n \t\t\t((c.comp_local = loc.loc_id) and\n\t\t\t(c.comp_inst = inst.inst_cod) and (c.comp_marca = model.marc_cod) and \n\t\t\t(c.comp_tipo_equip = equip.tipo_cod) and (loc.loc_reitoria = reit.reit_cod) and\n\t\t\t(c.comp_inv = {$comp_inv}) and (inst.inst_cod = {$comp_inst}))\n\t\t\t\n\t\t\t";
    $resultado = mysql_query($query);
    $linhas = mysql_num_rows($resultado);
    $row = mysql_fetch_array($resultado);
    if (!empty($row['ccusto'])) {
        $CC = $row['ccusto'];
        $query2 = "select * from planejamento.CCUSTO where codigo= {$CC}";
        $resultado2 = mysql_query($query2);
        $resultado3 = mysql_result($resultado2, 0, 4);
        //$row2 = mysql_fetch_array($resultado2);
        $centroCusto = "{$resultado3}";
    }
include "../../includes/include_geral.inc.php";
include "../../includes/include_geral_II.inc.php";
include 'includes/header.php';
print "<SCRIPT LANGUAGE='Javascript' SRC='../../includes/javascript/ColorPicker2.js'></SCRIPT>";
print "<SCRIPT LANGUAGE='Javascript' SRC='../../includes/javascript/PopupWindow.js'></SCRIPT>";
print "<SCRIPT LANGUAGE='Javascript' SRC='../../includes/javascript/AnchorPosition.js'></SCRIPT>";
$_SESSION['s_page_admin'] = $_SERVER['PHP_SELF'];
print "<HTML>";
print "<head>";
?>
<script language="javascript"> var cp = new ColorPicker(); // DIV style</script><?php 
print "</head>";
print "<BODY bgcolor=" . BODY_COLOR . " onClick=\"setBGColor('idDestaca'); setBGColor('idMarca'); setBGColor('idLin_par'); " . "setBGColor('idLin_impar'); setBGColor('idBody');  setBGColor('idTD'); setBorderWidth('idBorda'); " . "setBGColor('idBordaColor'); setBGColor('idTrHeader'); setBGColor('idTopo'); setBGColor('idBarra'); " . "setBGColor('idMenu'); setBGColor('idFonteNormal'); setBGColor('idFonteHover'); setBGColor('idFonteDestaque');" . "setBGColor('idFundoDestaque'); setBGColor('idFontTrHeader'); setBGColor('idHeaderCentro'); setBGColor('idFonteTopo');" . "\">";
//setBGColor('idTab');
$auth = new auth();
$auth->testa_user($_SESSION['s_usuario'], $_SESSION['s_nivel'], $_SESSION['s_nivel_desc'], 1, 'helpconfiggeral.php');
print "<BR><B>" . TRANS('TTL_APPEARANCE', 'Configurações de aparência do sistema') . ":</b><BR>";
$query = "SELECT * FROM styles ";
$resultado = mysql_query($query) or die(TRANS('ERR_QUERY'));
$row = mysql_fetch_array($resultado);
if (empty($_GET['action']) and empty($_POST['submit'])) {
    print "<br><TD align='left'>" . "<input type='button' class='button' id='idBtIncluir' value='" . TRANS('BT_EDIT_CONFIG', 'Editar Configuração', 0) . "' onClick=\"redirect('" . $_SERVER['PHP_SELF'] . "?action=alter&cellStyle=true');\">" . "</TD><br><BR>";
    if (mysql_numrows($resultado) == 0) {
        echo mensagem(TRANS('ALERT_CONFIG_EMPTY'));
    } else {
        $cor = TD_COLOR;
        $cor1 = TD_COLOR;
        $linhas = mysql_numrows($resultado);
        print "<td>";
        print "<TABLE border='0' cellpadding='5' cellspacing='0'  width='50%'>";
        print "<TR class='header'><td>" . TRANS('OPT_DIRETIVA', 'Diretiva') . "</TD><td>" . TRANS('OPT_VALOR', 'Valor') . "</TD></TD></tr>";
Exemple #3
0
         Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
session_start();
include "../../includes/include_geral.inc.php";
include "../../includes/include_geral_II.inc.php";
include "../../includes/classes/paging.class.php";
$_SESSION['s_page_admin'] = $_SERVER['PHP_SELF'];
$OPERADOR_AREA = false;
if (isset($_SESSION['s_area_admin']) && $_SESSION['s_area_admin'] == '1' && $_SESSION['s_nivel'] != '1') {
    $OPERADOR_AREA = true;
}
print "<HTML>";
print "<BODY bgcolor='" . BODY_COLOR . "'>";
$auth = new auth();
if ($OPERADOR_AREA) {
    $auth->testa_user($_SESSION['s_usuario'], $_SESSION['s_nivel'], $_SESSION['s_nivel_desc'], 2);
} else {
    $auth->testa_user($_SESSION['s_usuario'], $_SESSION['s_nivel'], $_SESSION['s_nivel_desc'], 1);
}
print "<BR><B>" . TRANS('ADM_PROBS') . "</B><BR>";
print "<FORM method='POST' action='" . $_SERVER['PHP_SELF'] . "' onSubmit=\"return valida()\">";
$PAGE = new paging("PRINCIPAL");
$PAGE->setRegPerPage($_SESSION['s_page_size']);
if (!isset($_GET['cellStyle'])) {
    $cellStyle = "cellpadding='5' cellspacing='0'";
} else {
    $cellStyle = "cellpadding='0' cellspacing='1'";
}
print "<TABLE border='0' align='left' " . $cellStyle . "  width='100%' bgcolor='" . BODY_COLOR . "'>";
if (isset($_POST['search'])) {
    $search = $_POST['search'];
		function popup(pagina)	{ //Exibe uma janela popUP
			x = window.open(pagina,'popup','dependent=yes,width=400,height=200,scrollbars=yes,statusbar=no,resizable=yes');
			x.moveTo(window.parent.screenX+100, window.parent.screenY+100);
			return false
		}
		window.setInterval("redirect('abertura.php')",120000);
	</script>

	<?php 
print "</head>";
$auth = new auth();
if (isset($_GET['popup'])) {
    $auth->testa_user_hidden($_SESSION['s_usuario'], $_SESSION['s_nivel'], $_SESSION['s_nivel_desc'], 2);
} else {
    $auth->testa_user($_SESSION['s_usuario'], $_SESSION['s_nivel'], $_SESSION['s_nivel_desc'], 2, 'helpOabertura.php');
}
//DIV PARA MOSTRAR OS HINTS
print "<div id='bubble_tooltip'>";
print "<div class='bubble_top'><span></span></div>";
print "<div class='bubble_middle'><span id='bubble_tooltip_content'></span></div>";
print "<div class='bubble_bottom'></div>";
print "</div>";
$dt = new dateOpers();
//Criado o objeto $dt
$dta = new dateOpers();
$cor = TD_COLOR;
$cor1 = TD_COLOR;
$cor3 = BODY_COLOR;
$percLimit = 20;
//Tolerância em percentual