Example #1
0
 function testa_user_hidden($s_usuario, $s_nivel, $s_nivel_desc, $permissao, $help = '')
 {
     if (!isset($_SESSION['s_logado']) || $_SESSION['s_logado'] == 0) {
         print "<script>window.open('../../index.php','_parent','')</script>";
         exit;
     } else {
         //print "<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>";
         if ($help != '') {
             //../../includes/icons/   align='top' //absmiddle  absbottom
             $help = "&nbsp;<a><img align='absmiddle' src='" . ICONS_PATH . "help-16.png' width='16' height='16' border='0' onClick=\"return popupS('" . HELP_PATH . "" . $help . "')\"></a>";
         }
         if ($s_nivel > $permissao) {
             $this->saida = "<script>window.open('../../index.php','_parent','')</script>";
             exit;
         } else {
             if (is_file("./.invmon_dir")) {
                 $this->texto = TRANS('MENU_TTL_MOD_INV');
             } else {
                 if (is_file("./.admin_dir")) {
                     $this->texto = TRANS('MENU_TTL_MOD_ADMIN');
                 } else {
                     $this->texto = TRANS('MENU_TTL_MOD_OCCO');
                 }
             }
             $this->saida = "<TABLE class='header_centro' cellspacing='1' border='0' cellpadding='1' align='center' width='100%'>" . "<TR>" . ($this->saida .= "</TR>" . "</TABLE>");
             $this->saida = "";
         }
         print $this->saida;
     }
 }
Example #2
0
if (isset($_GET['numero']) && $_SESSION['s_nivel'] == 1) {
    $query = "DELETE FROM ocorrencias WHERE numero=" . $_GET['numero'] . "";
    $resultado = mysql_query($query) or die(TRANS('ERR_DEL') . '!<BR>' . $query);
    //$qryAssent = "SELECT * FROM assentamentos WHERE numero = ".$_GET['numero']."";
    $query2 = "DELETE FROM assentamentos WHERE ocorrencia = " . $_GET['numero'] . "";
    $resultado2 = mysql_query($query2) or die(TRANS('ERR_DEL') . '!<BR>' . $query2);
    $query3 = "DELETE FROM tempo_status WHERE ts_ocorrencia = " . $_GET['numero'] . "";
    $resultado3 = mysql_query($query3) or die(TRANS('ERR_DEL') . '!<BR>' . $query3);
    $query4 = "DELETE FROM doc_time WHERE doc_oco = " . $_GET['numero'] . "";
    $resultado4 = mysql_query($query4) or die(TRANS('ERR_DEL') . '!<BR>' . $query4);
    $query5 = "DELETE FROM global_tickets WHERE gt_ticket = " . $_GET['numero'] . "";
    $resultado5 = mysql_query($query5) or die(TRANS('ERR_DEL') . '!<BR>' . $query5);
    $query6 = "DELETE FROM lock_oco WHERE lck_oco = " . $_GET['numero'] . "";
    $resultado6 = mysql_query($query6) or die(TRANS('ERR_DEL') . '!<BR>' . $query6);
    $query7 = "DELETE FROM ocodeps WHERE dep_pai = " . $_GET['numero'] . " OR dep_filho = " . $_GET['numero'] . "";
    $resultado7 = mysql_query($query7) or die(TRANS('ERR_DEL') . '!<BR>' . $query7);
    $query8 = "DELETE FROM solucoes WHERE numero = " . $_GET['numero'] . "";
    $resultado8 = mysql_query($query8) or die(TRANS('ERR_DEL') . '!<BR>' . $query8);
    $query9 = "DELETE FROM imagens WHERE img_oco = " . $_GET['numero'] . "";
    $resultado9 = mysql_query($query9) or die(TRANS('ERR_DEL') . '!<BR>' . $query9);
    if ($resultado == 0 || $resultado2 == 0 || $resultado3 == 0) {
        $aviso = TRANS('ERR_DEL');
    } else {
        $aviso = TRANS('OK_DEL');
    }
    print "<script>mensagem('" . $aviso . "'); redirect('ocorrencias.php');</script>";
} else {
    //print "<script>mensagem('".$aviso."'); redirect('ocorrencias.php');</script>";
}
print "</body>";
print "</html>";
    // 				if (isset($row) && $rowResol['resol_cod'] == $row['resolucao_cod'])
    // 					print " selected";
    print ">" . $rowResol['resol_nome'] . "</option>";
}
print "<option value=null>" . TRANS('cmb_selec_nenhum') . "</option>";
print "</SELECT>";
print "</TD>";
print "</tr>";
print "<TR>";
print "<TD width='20%' align='left' bgcolor='" . TD_COLOR . "'><b>" . TRANS('COL_SUBSCRIBE_DATE') . ":</b></TD>";
print "<TD width='30%' align='left' bgcolor='" . BODY_COLOR . "'>" . datab($hoje) . "</TD>";
print "</TR>";
print "<TR>";
print "<TD colspan='2'  align='right' bgcolor='" . BODY_COLOR . "'><input type='submit' value='" . TRANS('bt_cadastrar') . "' name='submit' " . "class='button' title='Cadastrar as informações fornecidas.'>";
print "</TD>";
print "<TD colspan='2' align='right' bgcolor='" . BODY_COLOR . "'><INPUT type='reset' value='" . TRANS('bt_cancelar') . "' " . "class='button' onClick='javascript:history.back()'></TD>";
print "</TR>";
print "</TABLE>";
print "</FORM>";
?>
<script type="text/javascript">
<!--
	function valida(){

		var ok = validaForm('idTipo','COMBO','Tipo de equipamento',1);
		if (ok) var ok = validaForm('idFab','COMBO','Fabricante',1);
		if (ok) var ok = validaForm('idModelo','COMBO','Modelo',1);

		return ok;
	}
<script type='text/javascript'>

	function popup_alerta(pagina)	{ //Exibe uma janela popUP
		x = window.open(pagina,'_blank','width=700,height=470,scrollbars=yes,statusbar=no,resizable=yes');
		x.moveTo(window.parent.screenX+50, window.parent.screenY+50);
		return false
	}
</script>
<?php 
print "<HTML><head><title>" . TRANS('TTL_TIMES_DOCUMENT') . "</title>";
include 'includes/header.php';
print "</head>";
print "<BODY bgcolor='" . BODY_COLOR . "'>";
$auth = new auth();
$auth->testa_user($_SESSION['s_usuario'], $_SESSION['s_nivel'], $_SESSION['s_nivel_desc'], 4);
$sql = "select d.*, u.* from doc_time d, usuarios u where d.doc_user = u.user_id and doc_oco = " . $_GET['cod'] . " ";
$exec_sql = mysql_query($sql);
$total = 0;
$totalGeral = 0;
print "<br><b>" . TRANS('TTL_TIMES_DOCUMENT_OCCO') . " <font color='red'>" . $_GET['cod'] . "</font>:</b><br>";
print "<table cellspacing='0' border='1' cellpadding='1' align='left' width='100%'>";
print "<tr><td width='20%'><b>" . TRANS('OCO_FIELD_OPERATOR') . "</b></td><td width='20%'><b>" . TRANS('OCO_SEL_OPEN') . "</b></td><td width='20%'><b>" . TRANS('COL_EDITION') . "</b></td><td width='20%'><b>" . TRANS('COL_CLOSING') . "</b></td><td width='20%'><b>" . TRANS('TOTAL') . "</b></td></tr>";
while ($row = mysql_fetch_array($exec_sql)) {
    $total = $row['doc_open'] + $row['doc_edit'] + $row['doc_close'];
    print "<tr><td width='20%'>" . $row['nome'] . "</td><td width='20%'>" . segundos_em_horas($row['doc_open']) . "</td><td width='20%'>" . segundos_em_horas($row['doc_edit']) . "</td><td width='20%'>" . segundos_em_horas($row['doc_close']) . "</td><td width='20%'>" . segundos_em_horas($total) . "</td></tr>";
    $totalGeral += $total;
}
print "<tr><td colspan='4'><b>" . TRANS('COL_TIME_TOTAL_DOC') . "</b></td><td class='line'><b>" . segundos_em_horas($totalGeral) . "</b></td></tr>";
print "</table>";
print "</body>";
print "</html>";
         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
  */
session_start();
include "../../includes/include_geral.inc.php";
include "../../includes/include_geral_II.inc.php";
include 'includes/header.php';
$_SESSION['s_page_invmon'] = $_SERVER['PHP_SELF'];
$cab = new headers();
$cab->set_title(TRANS("html_title"));
$auth = new auth();
$auth->testa_user($_SESSION['s_usuario'], $_SESSION['s_nivel'], $_SESSION['s_nivel_desc'], 2);
$hoje = date("Y-m-d H:i:s");
$cor = TD_COLOR;
$cor1 = TD_COLOR;
$cor3 = BODY_COLOR;
$queryB = "SELECT count(*) from equipamentos";
$resultadoB = mysql_query($queryB);
$total = mysql_result($resultadoB, 0);
// Select para retornar a quantidade e percentual de equipamentos cadastrados no sistema
$query = "SELECT count( l.loc_reitoria )  AS qtd, count(  *  )  / " . $total . " * 100 AS porcento,\n\t\t\t\tl.loc_reitoria AS cod_reitoria, l.loc_id AS tipo_local, t.tipo_nome AS equipamento,\n\t\t\t\tt.tipo_cod AS tipo, r.reit_nome AS reitoria FROM equipamentos AS c, tipo_equip AS t,\n\t\t\t\tlocalizacao AS l, reitorias AS r WHERE c.comp_tipo_equip = t.tipo_cod AND\n\t\t\t\tc.comp_local = l.loc_id AND l.loc_reitoria = r.reit_cod GROUP  BY l.loc_reitoria, equipamento\n\t\t\t\tORDER  BY reitoria, qtd DESC";
$resultado = mysql_query($query);
$linhas = mysql_num_rows($resultado);
print "<TABLE border='0' cellpadding='5' cellspacing='0' align='center' width='80%' bgcolor='" . $cor3 . "'>";
print "<tr><td class='line'></TD></tr>";
<HTML>
   <HEAD>
     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
   </HEAD>
</HTML>

<?php 
session_start();
include "../../includes/include_geral.inc.php";
include "../../includes/include_geral_II.inc.php";
include "../../includes/classes/lock.class.php";
$queryA = "INSERT INTO assentamentos (ocorrencia, assentamento, data, responsavel, asset_privated)" . " values (" . $_GET['num'] . ",";
$queryA .= " '" . $_GET['registro'] . "',";
$queryA .= " '" . date('Y-m-d H:i:s') . "', " . $_GET['resp'] . ", " . $_GET['privado'] . ")";
$resultado3 = mysql_query($queryA) or die(TRANS('MSG_NOT_SAVE_INFO_EDIT_CALL') . '<br>' . $queryA);
Example #7
0
print "<TABLE border='0'  width='40%' bgcolor='" . BODY_COLOR . "'>";
print "<TR>";
print "<TD width='20%' align='left' bgcolor='" . TD_COLOR . "'>" . TRANS('OCO_FIELD_UNIT') . ":</font></font></TD>";
print "<TD width='30%' align='left' bgcolor='" . BODY_COLOR . "'>";
print "<SELECT class='select' name='comp_inst'>";
$query = "SELECT * from instituicao  order by inst_nome";
$resultado = mysql_query($query);
$linhas = mysql_numrows($resultado);
while ($row = mysql_fetch_array($resultado)) {
    print "<option value='" . $row['inst_cod'] . "'>" . $row['inst_nome'] . "</option>";
}
print "</SELECT>";
print "</TD>";
print "</tr>";
print "<TR>";
print "<TD width='20%' align='left' bgcolor='" . TD_COLOR . "'>" . TRANS('OCO_FIELD_TAG') . ":</font></font></TD>";
print "<TD width='30%' align='left' bgcolor='" . BODY_COLOR . "'>" . "<INPUT type='text' class='text' name='comp_inv' id='idComp_inv'>" . "</TD>";
print "</TR>";
NL(2);
print "<TR>";
if (isset($_GET['from_menu'])) {
    print "<input type='hidden' name='from_menu' value='1'>";
}
print "<TD align='center' bgcolor='" . BODY_COLOR . "'><input type='submit' class='button' value='" . TRANS('MNL_CON') . "' name='ok'>";
print "</TD>";
print "<TD align='center' bgcolor='" . BODY_COLOR . "'>" . "<INPUT type='reset' class='button' value='" . TRANS('BT_CANCEL') . "' onClick='javascript:history.back()'></TD>";
print "</TR>";
print "</table>";
print "</form>";
print "</body>";
print "</html>";
Example #8
0
} else {
    print "<TR class='header'><td class='line'><B>" . TRANS('TXT_OCCO_ONLY_FOUND') . "</B></TD></TR>";
}
//print "</TD>";
//print "<td class='line'>";
print "<TABLE border='0' cellpadding='5' cellspacing='0' align='center' width='100%'>";
print "<TR class='header'><td class='line'>" . TRANS('COL_NUMBER') . "</TD><td class='line'>" . TRANS('COL_PROB') . "</TD><td class='line'>" . TRANS('COL_LOCAL') . "</TD><td class='line'>" . TRANS('COL_OPERATOR') . "</TD>\n                <td class='line'>" . TRANS('COL_OPEN') . "</TD><td class='line'>" . TRANS('COL_STATUS') . "</TD><td class='line'>" . TRANS('COL_EDIT') . "</TD><td class='line'>" . TRANS('COL_DEL') . "</TD></TR>";
$i = 0;
$j = 2;
while ($row = mysql_fetch_array($resultado)) {
    if ($j % 2) {
        $trClass = "lin_par";
    } else {
        $trClass = "lin_impar";
    }
    $j++;
    print "<tr class=" . $trClass . " id='linhax" . $j . "' onMouseOver=\"destaca('linhax" . $j . "','" . $_SESSION['s_colorDestaca'] . "');\" onMouseOut=\"libera('linhax" . $j . "','" . $_SESSION['s_colorLinPar'] . "','" . $_SESSION['s_colorLinImpar'] . "');\"  onMouseDown=\"marca('linhax" . $j . "','" . $_SESSION['s_colorMarca'] . "');\">";
    print "<td class='line'><a href='mostra_consulta.php?numero=" . $row['numero'] . "'>" . $row['numero'] . "</a></TD>";
    print "<td class='line'>" . $row['problema'] . "</TD>";
    print "<td class='line'>" . $row['setor'] . "</TD>";
    print "<td class='line'>" . $row['nome'] . "</TD>";
    print "<td class='line'>" . datab($row['data_abertura']) . "</TD>";
    print "<td class='line'>" . $row['chamado_status'] . "</TD>";
    print "<td class='line'><a onClick=\"redirect('altera_dados_ocorrencia.php?numero=" . $row['numero'] . "')\"><img height='16' width='16' src='" . ICONS_PATH . "edit.png' title='" . TRANS('HNT_EDIT') . "'></a></TD>";
    print "<td class='line'><a onClick=\"confirma('" . TRANS('MSG_DEL_OCCO_SYSTEM') . "','excluir_ocorrencia.php?numero=" . $row['numero'] . "')\"><img height='16' width='16' src='" . ICONS_PATH . "drop.png' title='" . TRANS('HNT_DEL') . "'></a></TD>";
    print "</TR>";
    $i++;
}
print "</table>";
print "</BODY>";
print "</HTML>";
Example #9
0
		if (ok) var ok = validaForm('idLocal','COMBO','Local',1);
		if (ok) var ok = validaForm('idData_fechamento','DATAHORA','Data',1);
		if (ok) var ok = validaForm('idDesc','','Descrição técnica',1);
		if (ok) var ok = validaForm('idSolucao','','Solução',1);
		
		if (ok) {
			var justification = document.getElementById('idJustificativa');
			if (justification != null){
				if (ok) var ok = validaForm('idJustificativa','','Justificativa',1);
				if (ok) {
					if(justification.value.length <= <?php 
print $descricaoMinima;
?>
) {
						alert('<?php 
print TRANS('ALERT_TOO_SHORT_JUSTIFICATION');
?>
');
						ok = false;
						document.form1.justificativa.focus();
					}
				}
			}
		}		
		

		return ok;
	}

	function popup_alerta(pagina)	{ //Exibe uma janela popUP
      		x = window.open(pagina,'Alerta','dependent=yes,width=700,height=470,scrollbars=yes,statusbar=no,resizable=yes');
print "</form>";
?>
	<script language="JavaScript">

		function valida(){
			var ok = false;

			var ok = validaForm('idSigla','','<?php 
print TRANS('TPL_SIGLA');
?>
',1);
			if (ok) var ok = validaForm('idMlDesc','','<?php 
print TRANS('ML_DESC');
?>
',1);
			if (ok) var ok = validaForm('idMlList','MULTIEMAIL','<?php 
print TRANS('ML_ADDRESS_TO');
?>
',1);
			if (ok) var ok = validaForm('idMlListCc','MULTIEMAIL','<?php 
print TRANS('ML_ADDRESS_CC');
?>
',1);

			return ok;
		}
	//-->
	</script>
	<?php 
print "</body>";
print "</html>";
Example #11
0
         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";
print "<HTML>";
print "<BODY bgcolor='" . BODY_COLOR . "'>";
$auth = new auth();
$auth->testa_user($_SESSION['s_usuario'], $_SESSION['s_nivel'], $_SESSION['s_nivel_desc'], 2);
print "<BR><B>" . TRANS('OCO_REPORT_FULL', 'Relatório de Ocorrências') . "</B><BR>";
print "<FORM method='POST' name='form1' action='mostra_resultado_relatorio_total.php'>";
print "<TABLE border='0'  align='center' width='100%'>";
?>
        <TR>
                <TD width="20%" align="left" bgcolor=<?php 
print TD_COLOR;
?>
>Número inicial:</TD>
                <TD width="30%" align="left" bgcolor=<?php 
print BODY_COLOR;
?>
><INPUT type="text" name="numero_inicial" class='data'></TD>
                <TD width="20%" align="left" bgcolor=<?php 
print TD_COLOR;
?>
 //$rowPainel = mysql_fetch_array($resultado2);
 $linhas = mysql_num_rows($resultado);
 if ($linhas == 0) {
     print "<script>window.alert('" . TRANS('MSG_NO_REGISTER_PERIOD') . "'); history.back();</script>";
 } else {
     //if($linhas==0)
     $campos = array();
     $saida = -1;
     switch ($saida) {
         case -1:
             $criterio = "<br>";
             $background = '#C7D0D9';
             print "<table class='centro' cellspacing='0' border='0' width='90%'>";
             print "<tr bgcolor='" . TD_COLOR . "'>" . "<td class='line'><b><a title='" . TRANS('HNT_RESPONSE_TIME') . "'>" . TRANS('OCO_RESPONSE') . "</a></td>";
             print "<td class='line'><b><a title='" . TRANS('HNT_SOLUTION_TIME') . "'>" . TRANS('OCO_SOLUC') . "</a></td></B>";
             print "<td class='line'><b><a title='tempo definido para resposta para cada setor'>" . TRANS('COL_TIT_SLA_RESP') . "</a></td></B>\n\t\t\t\t\t<td class='line'><b><a title='tempo definido para solução para cada problema'>" . TRANS('COL_TIT_SLA_SOL') . "</a></td></B>\n\t\t\t\t\t<td class='line'><b><a title='indicador de resposta'>" . TRANS('COL_TIT_REPLY') . "</a></td></B>\n\t\t\t\t\t<td class='line'><b><a title='indicador de solução'>" . TRANS('COL_TIT_SOLUTION') . "</a></td></B>\n\t\t\t\t\t<td class='line'><b><a title='indicador de solução a partir da primeira resposta'>" . TRANS('COL_SOL_RESP') . "</a></td></B>\n\t\t\t\t\t<td class='line'><b><a title='tempo em que o chamado esteve pendente no usuário'>" . TRANS('COL_USER_DEPEN') . "</a></td></B>\n\t\t\t\t\t<td class='line'><b><a title='tempo em que o chamado esteve pendente por algum serviço de terceiros'>" . TRANS('COL_DEPEN_THIRD') . "</a></td></B>\n\t\t\t\t\t<td class='line'><b><a title='tempo em equipamento de backup ou alterado após encerramento'>" . TRANS('COL_IT_ARRE_DEPEN') . "</a></td></B>\n\t\t\t\t\t<td class='line'><b><a title='Tempo de solução menos o tempo em pendência do usuário'>" . TRANS('COL_RECALC_SOLUTION') . "</a></td></B>\n\t\t\t\t\t<td class='line'><b><a title='indicador atualizado descontando a pendência do usuário'>" . TRANS('COL_POINTER_UPDATE') . "</a></td></B>\n\t\t\t\t\t<td class='line'><b><a title='" . TRANS('HNT_REMAIN_TIME_IN_SLA') . "'>" . TRANS('COL_REMAIN_TIME') . "</a></td></B>\n\t\t\t\t\t</tr>";
             //INICIALIZANDO CONTADORES!!
             $sla_green = 0;
             $sla_red = 0;
             $sla_yellow = 0;
             $slaR_green = 0;
             $slaR_red = 0;
             $slaR_yellow = 0;
             $c_slaS_blue = 0;
             $c_slaS_yellow = 0;
             $c_slaS_red = 0;
             $c_slaR_blue = 0;
             $c_slaR_yellow = 0;
             $c_slaR_red = 0;
             $c_slaM_blue = 0;
             $c_slaM_yellow = 0;
         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
  */
session_start();
include "../../includes/include_geral.inc.php";
include "../../includes/include_geral_II.inc.php";
print "<HTML>";
print "<BODY bgcolor='" . BODY_COLOR . "'>";
$auth = new auth();
$auth->testa_user($_SESSION['s_usuario'], $_SESSION['s_nivel'], $_SESSION['s_nivel_desc'], 1);
print "<br><br>";
print TRANS('MSG_UPDATE_PRIOR');
print "<br><br>";
$qry = "SELECT * FROM prior_atend WHERE pr_default = 1";
$exec = mysql_query($qry) or die('ERRO NA TENTATIVA DE BUSCAR AS INFORMAÇÕES DA PRIORIDADE PADRÃO!');
if (mysql_numrows($exec) == 0) {
    print "<b><font color='red'>" . TRANS('DEFAULT_PRIOR_NOT_DEFINED') . "</font></b>";
    exit;
}
$row = mysql_fetch_array($exec);
//exit;
$qry_update = "UPDATE ocorrencias SET oco_prior = '" . $row['pr_cod'] . "' WHERE oco_prior is null ";
$exec_update = mysql_query($qry_update) or die('OCORREU UM ERRO NA TENTATIVA DE ATUALIZAR A PRIORIDADE PADRÃO DAS OCORRÊNCIAS!');
print "<br><br>";
print "<b><font color='green'>" . TRANS('MSG_UPDATE_PRIOR_OK') . "</font></b>";
print "</body>";
print "</html>";
Example #14
0
$selProb = 0;
if (isset($_GET['prob']) && !isset($_GET['radio_prob'])) {
    $selProb = $_GET['prob'];
} else {
    if (isset($_GET['prob']) && isset($_GET['radio_prob'])) {
        $selProb = $_GET['radio_prob'];
    }
}
$qry_problema = "SELECT p.prob_descricao, sc.*, script.* FROM problemas as p " . "LEFT JOIN prob_x_script as sc on sc.prscpt_prob_id = p.prob_id " . "LEFT JOIN scripts as script on script.scpt_id = sc.prscpt_scpt_id " . "WHERE p.prob_id = " . $selProb . " ";
$exec_problema = mysql_query($qry_problema) or die($qry_problema);
$row_problema = mysql_fetch_array($exec_problema);
if (mysql_num_rows($exec_problema) == 0) {
    print "<div></div>";
} else {
    if (!empty($row_problema['prscpt_prob_id']) && ($_SESSION['s_nivel'] != 3 || $row_problema['scpt_enduser'] == 1)) {
        $script = "<a onClick=\"popup('../../admin/geral/scripts.php?action=popup&prob=" . $selProb . "')\"><br /><b><font color='green'>" . TRANS('TIPS') . "</font></b></a>";
    } else {
        $script = "";
    }
    if (!empty($row_problema['prob_descricao']) or !empty($script)) {
        ?>
						<TABLE border='0' cellpadding='2' cellspacing='0' width='90%'>
							<TR>
								<TD>
									<div style='{
										margin-left: auto; margin-right: auto; margin-top: 10px; margin-bottom: 10px; 
										padding: 5px; width: 90%; border: 1px solid black; background-color: <?php 
        print $_SESSION['s_colorMarca'];
        ?>
;
										line-height: 150%;
        print "</table>";
        print "<tr><p><TD bgcolor='" . $cor1 . "'><b>" . TRANS('COL_TYPE') . ":\t</b>" . $rowA['item_nome'] . "</TD></tr><br>";
        print "<tr><TD bgcolor='" . $cor1 . "'><b>" . TRANS('COL_MODEL') . ":\t</b>" . $rowA['mdit_fabricante'] . "&nbsp;" . $rowA['mdit_desc'] . "&nbsp;" . $rowA['mdit_desc_capacidade'] . "&nbsp;" . $rowA['mdit_sufixo'] . "</TD></tr><br>";
        print "<tr><TD bgcolor='" . $cor1 . "'><b>" . TRANS('COL_SN') . ":</b>\t" . $rowA['estoq_sn'] . "</TD></tr><br></p>";
    } else {
        $texto = TRANS('OCO_LOCAL');
        print "<TR><TD bgcolor='" . $cor1 . "'><B>" . TRANS('TXT_FOUND_ONLY_ONE_REG_OF_LOCALIZATION_FOR_EQUIP') . "</B></TD></TR>";
        print "<tr><p><TD bgcolor='" . $cor1 . "'><b>" . TRANS('COL_TYPE') . ":\t</b>" . $rowA['item_nome'] . "</TD></tr><br>";
        print "<tr><TD bgcolor='" . $cor1 . "'><b>" . TRANS('COL_MODEL') . ":\t</b>" . $rowA['mdit_fabricante'] . "&nbsp;" . $rowA['mdit_desc'] . "&nbsp;" . $rowA['mdit_desc_capacidade'] . "&nbsp;" . $rowA['mdit_sufixo'] . "</TD></tr><br>";
        print "<tr><TD bgcolor='" . $cor1 . "'><b>" . TRANS('COL_SN') . ":</b>\t" . $rowA['estoq_sn'] . "</TD></tr><br></p>";
    }
}
print "</TD>";
print "<td class='line'>";
print "<TABLE border='0' cellpadding='5' cellspacing='0' align='left' width='100%'>";
print "<TR class='header'><td class='line'><b>" . $texto . "</TD><TD class='line'>" . TRANS('ASSOC_EQUIP_PIECES') . "</TD>" . "<TD class='line'>" . TRANS('COL_MODIF_IN') . "</TD><td class='line'><b>" . TRANS('COL_MODIF_FOR') . "</TD>" . "<td class='line'>" . TRANS('TECHNICIAN') . "</td> ";
$i = 0;
$j = 2;
//	while ($row = mysql_fetch_array($resultado2)) {
//if ($i==0) {
//$atualmente = "<font ".$alerta.">[".TRANS('TXT_CURRENT_PLACE')."]</font>";  //Perfumaria: Serve para identificar para o usuário o local atual onde o equipamento está!!!
//} else
//$atualmente = '';
//		print "<tr class=".$trClass." id='linhax".$j."' onMouseOver=\"destaca('linhax".$j."','".$_SESSION['s_colorDestaca']."');\" onMouseOut=\"libera('linhax".$j."','".$_SESSION['s_colorLinPar']."','".$_SESSION['s_colorLinImpar']."');\"  onMouseDown=\"marca('linhax".$j."','".$_SESSION['s_colorMarca']."');\">";
//		print "<td class='line'><a ".$alerta." onClick= \"javascript: window.opener.location.href='mostra_consulta_comp.php?comp_local=".$row['local_cod']."&comp_tipo_equip=".$row['tipo']."&ordena=fab_nome,modelo,local,etiqueta'\">".$row['locais']." </a><b><font color='green'>".$atualmente."</font></b></td>";
//		print "<td class='line'><font ".$alerta.">".$row['DIA']."/".$row['MES']."/".$row['ANO']."</font></td>";
//              print "</TR>";
//}
$j = 2;
while ($row = mysql_fetch_array($resultado2)) {
    if ($j % 2) {
Example #16
0
                print "<table class='centro' cellspacing='0' border='1' align='center'>";
                print "<tr><td bgcolor='" . $background . "'><B>" . TRANS('COL_AMOUNT') . "</td>\n\t\t\t\t\t\t\t\t<td bgcolor='" . $background . "' ><B>" . TRANS('COL_EQUIP') . "</td>\n\t\t\t\t\t\t\t</tr>";
                $total = 0;
                while ($row = mysql_fetch_array($resultado)) {
                    print "<tr>";
                    print "<td class='line'><a class='botao' onClick= \"javascript: popup_alerta('hw_historico.php?inv=" . $row['hwa_inv'] . "&inst=" . $row['hwa_inst'] . "')\"><font color='#5E515B'>" . $row['total'] . "</font></td>";
                    print "<td class='line'><a onClick=\"javascript: popup_alerta('mostra_consulta_inv.php?comp_inv=" . $row['hwa_inv'] . "&comp_inst=" . $row['hwa_inst'] . "')\"><font color='#5E515B'>" . $row['inst_nome'] . "&nbsp;" . $row['hwa_inv'] . "</font></a></td>";
                    print "</tr>";
                    $total += $row['total'];
                }
                print "<tr><td class='line'><b>" . TRANS('TOTAL') . "</b></td><td class='line'><b>" . $total . "</b></td></tr>";
            }
            //if($linhas==0)
            //if  $d_ini_completa <= $d_fim_completa
        } else {
            $aviso = TRANS('MSG_DATE_FINISH_>_DATE_BEGIN');
            print "<script>mensagem('" . $aviso . "'); redirect('" . $_SERVER['PHP_SELF'] . "');</script>";
        }
    }
    //if ((empty($d_ini)) and (empty($d_fim)))
    ?>
			<script type='text/javascript'>
			<!--
				function popup(pagina)	{ //Exibe uma janela popUP
					x = window.open(pagina,'popup','width=400,height=200,scrollbars=yes,statusbar=no,resizable=yes');
					//x.moveTo(100,100);
					x.moveTo(window.parent.screenX+100, window.parent.screenY+100);
					return false
				}

				function popup_alerta(pagina)	{ //Exibe uma janela popUP
                        $cabs[] = "T Solução Total";
                        $cabs[] = "T Resposta Válido";
                        $cabs[] = "T Solução Válido";
                        $logo = "logo_unilasalle.gif";
                        $msg1 = "Centro de Informática";
                        $msg2 = date('d/m/Y H:m');
                        $msg3 = "Relatório de SLA's";
                        gera_relatorio(1, $query, $campos, $cabs, $logo, $msg1, $msg2, $msg3);
                        break;
                }
                // switch
            }
            //if($linhas==0)
        } else {
            //if  $d_ini_completa <= $d_fim_completa
            print "<script>window.alert('" . TRANS('MSG_COMPARE_DAT') . "'); history.back();</script>";
        }
    }
    //if ((empty($d_ini)) and (empty($d_fim)))
    ?>
        <script type='text/javascript'>

			 function popup(pagina)	{ //Exibe uma janela popUP
				x = window.open(pagina,'popup','width=400,height=200,scrollbars=yes,statusbar=no,resizable=yes');
				//x.moveTo(100,100);
				x.moveTo(window.parent.screenX+100, window.parent.screenY+100);
				return false
			 }

			 function popup_alerta(pagina)	{ //Exibe uma janela popUP
                x = window.open(pagina,'_blank','width=700,height=470,scrollbars=yes,statusbar=no,resizable=yes');
        }
    } else {
        if (($row['situac_cod'] == 4 or $row['situac_cod'] == 5) and $i == 0) {
            //Equipamento trocado ou furtado!!
            $color = '#FF0000';
            $alerta = "style='{color:white;}'";
            $trClass = "lin_alerta";
        } else {
            $color = 'white';
            $alerta = "";
            $trClass = "lin_impar";
        }
    }
    $j++;
    if ($i == 0) {
        $atualmente = "<font " . $alerta . ">[" . TRANS('TXT_CURRENT_PLACE') . "]</font>";
        //Perfumaria: Serve para identificar para o usuário o local atual onde o equipamento está!!!
    } else {
        $atualmente = '';
    }
    print "<tr class=" . $trClass . " id='linhax" . $j . "' onMouseOver=\"destaca('linhax" . $j . "','" . $_SESSION['s_colorDestaca'] . "');\" onMouseOut=\"libera('linhax" . $j . "','" . $_SESSION['s_colorLinPar'] . "','" . $_SESSION['s_colorLinImpar'] . "');\"  onMouseDown=\"marca('linhax" . $j . "','" . $_SESSION['s_colorMarca'] . "');\">";
    print "<td class='line'><a " . $alerta . " onClick= \"javascript: window.opener.location.href='mostra_consulta_comp.php?comp_local=" . $row['local_cod'] . "&comp_tipo_equip=" . $row['tipo'] . "&ordena=fab_nome,modelo,local,etiqueta'\">" . $row['locais'] . " </a><b><font color='green'>" . $atualmente . "</font></b></td>";
    print "<td class='line'><font " . $alerta . ">" . $row['DIA'] . "/" . $row['MES'] . "/" . $row['ANO'] . "</font></td>";
    print "</TR>";
    $i++;
}
print "<tr><td colspan='4'>&nbsp;</td></tr>";
print "<tr><td colspan='4' align='center'><input type='button' class='minibutton' value='" . $BT_TEXT . "' onClick=\"" . $GETOUT . "\"</td></tr>";
print "</TABLE>";
print "</BODY>";
print "</HTML>";
    print "<select class='select' name='software'>";
    print "<option value=-1 selected>" . TRANS('SEL_SOFT') . "</option>";
    //retorna os softwares cadastrados para o equipamento
    $sql = "select s.*, l.*, c.*, f.*, h.* from softwares as s, licencas as l, categorias as c, " . "fabricantes as f, hw_sw as h " . "where s.soft_tipo_lic = l.lic_cod and s.soft_cat = c.cat_cod and s.soft_fab = f.fab_cod " . "and h.hws_sw_cod = s.soft_cod and h.hws_hw_cod = " . $_GET['comp_inv'] . " and h.hws_hw_inst = " . $_GET['comp_inst'] . " " . "order by f.fab_nome, s.soft_desc";
    $commit = mysql_query($sql);
    //$softs = "";
    while ($rowA = mysql_fetch_array($commit)) {
        $softs .= $rowA["soft_cod"] . ",";
    }
    if (isset($softs)) {
        $softs = substr($softs, 0, -1);
    } else {
        $softs = -1;
    }
    //Retorna todos os softwares menos os cadastrados nesse equipamento
    $select = "select s.*, f.* from softwares s, fabricantes f where f.fab_cod = s.soft_fab " . "and s.soft_cod not in (" . $softs . ") " . "order by fab_nome, soft_desc";
    $exec = mysql_query($select);
    while ($row = mysql_fetch_array($exec)) {
        print "<option value='" . $row['soft_cod'] . "'>" . $row['fab_nome'] . " " . $row['soft_desc'] . " " . $row["soft_versao"] . "</option>";
    }
    // while
    print "</select>";
    print "</tr>";
    print "<tr>";
    print "<td align='center' width='20%' bgcolor=" . BODY_COLOR . "><input type='submit' value='" . TRANS('BT_ADD') . "' name='submit' class='button'></td>";
    print "<td align='center' width='80%' bgcolor=" . BODY_COLOR . "><input type='reset' value='" . TRANS('BT_CANCEL') . "' onClick=\"javascript:self.close()\" name='cancelar' class='button'></td>";
    print "</tr>";
}
print "</table>";
print "</form>";
$cab->set_foot();
         }
     }
     //if ((empty($d_ini)) and (empty($d_fim)))
 } else {
     if (isset($_GET['action']) && $_GET['action'] == 'list') {
         $query = "SELECT *, s.sistema AS area, l.local as localizacao, p.problema as prob_desc\n\t\t\t\t\tFROM ocorrencias AS o, sistemas AS s, usuarios as u, problemas as p, localizacao as l\n\t\t\t\t\tWHERE o.sistema = s.sis_id and o.operador = u.user_id and o.problema = p.prob_id and o.local = l.loc_id\n\t\t\t\t\t\tAND o.data_fechamento >= '" . $_GET['date1'] . "' AND\n\t\t\t\t\t\to.data_fechamento <= '" . $_GET['date2'] . "' and s.sis_id in (" . $_GET['area'] . ") ";
         $exec = mysql_query($query) or die($query);
         $linhas = mysql_num_rows($exec);
         print "<table border='0' cellspacing='1' summary=''";
         print "<TR>";
         print "<TD colspan='3' align='left' ><B>" . TRANS('FOUND') . " " . $linhas . " " . TRANS('TXT_REG_OF_CLOSED_CALLS') . ":</B></TD>";
         print "</tr>";
         print "<tr><td>&nbsp;</td></tr>";
         print "</table>";
         print "<TABLE border='0' cellpadding='5' cellspacing='0' align='left' width='100%'>";
         print "<TR class='header'>" . "<TD class='line'>" . TRANS('COL_AREA') . "</TD>" . "<TD class='line'>" . TRANS('COL_NUMBER') . "</TD>" . "<TD class='line'>" . TRANS('OCO_PROB') . "</TD>" . "<TD class='line'>" . TRANS('COL_LOCAL') . "</TD>" . "<TD class='line'>" . TRANS('TECHNICIAN') . "</TD>" . "<TD class='line'>" . TRANS('FIELD_DATE_CLOSING') . "</TD>";
         $i = 0;
         $j = 2;
         while ($rowlist = mysql_fetch_array($exec)) {
             if ($j % 2) {
                 $trClass = "lin_par";
             } else {
                 $trClass = "lin_impar";
             }
             $j++;
             print "<tr class=" . $trClass . " id='linhax" . $j . "' onMouseOver=\"destaca('linhax" . $j . "','" . $_SESSION['s_colorDestaca'] . "');\" onMouseOut=\"libera('linhax" . $j . "','" . $_SESSION['s_colorLinPar'] . "','" . $_SESSION['s_colorLinImpar'] . "');\"  onMouseDown=\"marca('linhax" . $j . "','" . $_SESSION['s_colorMarca'] . "');\">";
             print "<td class='line'>" . $rowlist['area'] . "</td>";
             print "<td class='line'><a onClick=\"javascript: popup_alerta('mostra_consulta.php?numero=" . $rowlist['numero'] . "')\">" . NVL($rowlist['numero']) . "</a></td>";
             print "<td class='line'>" . NVL($rowlist['prob_desc']) . "</td>";
             print "<td class='line'>" . NVL($rowlist['localizacao']) . "</td>";
             print "<td class='line'>" . NVL($rowlist['nome']) . "</td>";
        $rowMailArea = mysql_fetch_array($execMailArea);
        $qryconfmail = "SELECT * FROM mailconfig";
        $execconfmail = mysql_query($qryconfmail) or die(TRANS('ERR_QUERY'));
        $rowconfmail = mysql_fetch_array($execconfmail);
        //if (isset($_POST['mailAR']) || isIn($_SESSION['s_area'],$rowconf['conf_custom_areas'])) {
        $event = 'edita-para-area';
        $qrymsg = "SELECT * FROM msgconfig WHERE msg_event like ('" . $event . "')";
        $execmsg = mysql_query($qrymsg) or die(TRANS('ERR_QUERY'));
        $rowmsg = mysql_fetch_array($execmsg);
        send_mail($event, $rowMailArea['sis_email'], $rowconfmail, $rowmsg, $VARS);
        //}
        print "<script>redirect('mostra_consulta.php?numero=" . $_POST['numero'] . "&id=" . $_POST['urlid'] . "');</script>";
    }
}
print "</table>";
print "</form>";
?>
<script type="text/javascript">
<!--
	function valida(){

		var ok = validaForm('idAssentamento','ALFA','<?php 
print TRANS('INSERT_COMMENT');
?>
',1);

		return ok;
	}
-->
</script>
Example #22
0
         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
*/
session_start();
include "../../includes/include_geral.inc.php";
include "../../includes/include_geral_II.inc.php";
print "<HTML>";
print "<BODY bgcolor='" . BODY_COLOR . "'>";
$auth = new auth();
$auth->testa_user($_SESSION['s_usuario'], $_SESSION['s_nivel'], $_SESSION['s_nivel_desc'], 2);
if (!isset($_GET['COD'])) {
    print TRANS('MSG_ERROR_PARAM', 'ERRO: Falta parâmentro de entrada') . "!";
    exit;
} else {
    print "<BR><B>" . TRANS('TTL_LIST_FILES', 'Arquivos anexados à ocorrência número') . ":&nbsp;" . $_GET['COD'] . "</B><BR>";
    print "<TABLE border='0'>";
    $qryTela = "select * from imagens where img_oco = " . $_GET['COD'] . "";
    $execTela = mysql_query($qryTela) or die("NÃO FOI POSSÍVEL RECUPERAR AS INFORMAÇÕES DOS ARQUIVOS ANEXOS!");
    //$rowTela = mysql_fetch_array($execTela);
    $isTela = mysql_num_rows($execTela);
    $cont = 0;
    while ($rowTela = mysql_fetch_array($execTela)) {
        //if ($isTela !=0) {
        $cont++;
        print "<tr>";
        $size = round($rowTela['img_size'] / 1024, 1);
        print "<TD  bgcolor='" . TD_COLOR . "' >Anexo " . $cont . "&nbsp;[" . $rowTela['img_tipo'] . "]<br>(" . $size . "k):</td>";
        //if(eregi("^image\/(pjpeg|jpeg|png|gif|bmp)$", $rowTela["img_tipo"])) {
        if (isImage($rowTela["img_tipo"])) {
            $viewImage = "&nbsp;<a onClick=\"javascript:popupWH('../../includes/functions/showImg.php?" . "file=" . $_GET['COD'] . "&cod=" . $rowTela['img_cod'] . "'," . $rowTela['img_largura'] . "," . $rowTela['img_altura'] . ")\" " . "title='View the file'><img src='../../includes/icons/kghostview.png' width='16px' height='16px' border='0'></a>";
    //&& $_POST['problema'])
    $query .= " WHERE lower(p.problema) like lower(('%" . $rowId['problema'] . "%')) " . $clausula . "";
} else {
    $query .= " WHERE p.problema = -1 " . $clausula . "";
}
$query .= " ORDER  BY s.sistema, p.problema";
//print $query;
$resultado = mysql_query($query) or die(TRANS('ERR_QUERY'));
$registros = mysql_num_rows($resultado);
if (mysql_num_rows($resultado) == 0) {
    //print "<tr><td align='center'>";
    //echo mensagem(TRANS('NO_CAT_TIL_SEL_PROB'));
    //print "</tr></td>";
} else {
    print "<tr><td colspan='8'></tr>";
    print "<TR class='header'><td class='line'>" . TRANS('COL_PROB', 'Problema') . "<td class='line'>" . TRANS('COL_SLA', 'SLA') . "</TD>" . "<td class='line'>" . $row_config['conf_prob_tipo_1'] . "</TD><td class='line'>" . $row_config['conf_prob_tipo_2'] . "</TD>" . "<td class='line'>" . $row_config['conf_prob_tipo_3'] . "</TD></tr>";
    $j = 2;
    while ($row = mysql_fetch_array($resultado)) {
        if ($j % 2) {
            $trClass = "lin_par";
        } else {
            $trClass = "lin_impar";
        }
        $j++;
        print "<tr class=" . $trClass . " id='linhaxx" . $j . "' onMouseOver=\"destaca('linhaxx" . $j . "','" . $_SESSION['s_colorDestaca'] . "');\" onMouseOut=\"libera('linhaxx" . $j . "','" . $_SESSION['s_colorLinPar'] . "','" . $_SESSION['s_colorLinImpar'] . "');\"  onMouseDown=\"marca('linhaxx" . $j . "','" . $_SESSION['s_colorMarca'] . "');\">";
        //------------------------------------------------------------- INICIO ALTERACAO --------------------------------------------------------------
        //print "<td class='line'><input type='radio' id='idRadioProb' name='radio_prob' value='".$row['prob_id']."'";
        print "<td class='line'><input type='radio' id='idRadioProb" . $row['prob_id'] . "' name='radio_prob' value='" . $row['prob_id'] . "'";
        //------------------------------------------------------------- FIM ALTERACAO --------------------------------------------------------------
        if (isset($_GET['radio_prob']) && $_GET['radio_prob'] == $row['prob_id']) {
            print " checked";
Example #24
0
}
//------------------------------------------------------------- FIM ALTERACAO --------------------------------------------------------------
$query = "";
if ($_GET['area_habilitada'] == 'sim') {
    if ($_GET['area_cod'] == "" || $_GET['area_cod'] == -1) {
        print "<option value='-1'>" . TRANS('OCO_SEL_AREA') . "</option>";
    } else {
        $query = "\n                SELECT * \n                FROM problemas \n                WHERE \n                \tprob_area = " . $_GET['area_cod'] . " OR \n                \tprob_area IS NULL OR \n                \tprob_area = -1\n                GROUP BY problema \n                ORDER BY problema\n                ";
        $exec_prob = mysql_query($query);
        print "<option value='-1'>" . TRANS('OCO_SEL_PROB') . "</option>";
        while ($row_prob = mysql_fetch_array($exec_prob)) {
            print "<option value=" . $row_prob['prob_id'] . "";
            if ($row_prob['prob_id'] == $_GET['prob']) {
                print " selected";
            }
            print " >" . $row_prob['problema'] . " </option>";
        }
    }
} else {
    $query = "\n                SELECT * \n                FROM problemas\n                GROUP BY problema \n                ORDER BY problema\n                ";
    $exec_prob = mysql_query($query);
    print "<option value='-1'>" . TRANS('OCO_SEL_PROB') . "</option>";
    while ($row_prob = mysql_fetch_array($exec_prob)) {
        print "<option value=" . $row_prob['prob_id'] . "";
        if ($row_prob['prob_id'] == $_GET['prob']) {
            print " selected";
        }
        print " >" . $row_prob['problema'] . " </option>";
    }
}
print "</select>";
    //if ($isTela !=0) {
    $cont++;
    print "<tr>";
    print "<TD  bgcolor='" . TD_COLOR . "' >" . TRANS('FIELD_ATTACH') . "  " . $cont . " " . TRANS('TXT_THE_INVEN') . ":</td>";
    print "<td colspan='5' bgcolor='" . BODY_COLOR . "'><a onClick=\"javascript:popupWH('../../includes/functions/showImg.php?file=" . $rowTela['img_cod'] . "&cod=" . $rowTela['img_cod'] . "'," . $rowTela['img_largura'] . "," . $rowTela['img_altura'] . ")\"><img src='../../includes/icons/attach2.png'>" . $rowTela['img_nome'] . "</a>";
    print "<input type='checkbox' name='delImg[" . $cont . "]' value='" . $rowTela['img_cod'] . "'><img height='16' width='16' src='" . ICONS_PATH . "drop.png' title='Excluir o registro'></TD>";
    print "</tr>";
}
print "<tr><td colspan='4'>&nbsp;</td></tr>";
print "<tr>";
print "<TD align='center' colspan='2' bgcolor='" . BODY_COLOR . "'><input type='submit' class='button' value='" . TRANS('BT_ALTER') . "' name='submit'>";
print "<input type='hidden' name='cont' value='" . $cont . "'>";
print "<input type='hidden' name='comp_inv' value='" . $_REQUEST['comp_inv'] . "'>";
print "<input type='hidden' name='comp_inst' value='" . $_REQUEST['comp_inst'] . "'>";
print "</TD>";
print "<TD align='center' colspan='2' bgcolor='" . BODY_COLOR . "'><INPUT type='reset' class='button' value='" . TRANS('BT_CANCEL') . "' onClick=\"javascript:history.back();\" name='cancelar'></TD>";
print "</tr>";
if (isset($_POST['submit'])) {
    //$depois = $_POST['status'];
    $erro = false;
    for ($j = 1; $j <= $_POST['cont']; $j++) {
        if (isset($_POST['delImg'][$j])) {
            $qryDel = "DELETE FROM imagens WHERE img_cod = " . $_POST['delImg'][$j] . "";
            $execDel = mysql_query($qryDel) or die("NÃO FOI POSSÍVEL EXCLUIR A IMAGEM!");
        }
    }
    $gravaImg = false;
    if (isset($_FILES['img']) and $_FILES['img']['name'] != "") {
        $qryConf = "SELECT * FROM config";
        $execConf = mysql_query($qryConf) or die("NÃO FOI POSSÍVEL ACESSAR AS INFORMAÇÕES DE CONFIGURAÇÃO, A TABELA CONF FOI CRIADA?");
        $rowConf = mysql_fetch_array($execConf);
                        } else {
                            $qry = "INSERT INTO dominios (dom_desc) values ('" . noHtml($_POST['descricao']) . "')";
                            $exec = mysql_query($qry) or die(TRANS('MSG_ERR_INCLUDE_REG') . $qry);
                            print "<script>mensagem('" . TRANS('MSG_DATA_INCLUDE_OK') . "'); window.opener.location.reload(); redirect('dominios.php');</script>";
                        }
                    } else {
                        print "<script>mensagem('" . TRANS('MSG_EMPTY_DATA') . "'); redirect('dominios.php');</script>";
                    }
                } else {
                    if ($_POST['submit'] = TRANS('BT_ALTER')) {
                        if (!empty($_POST['descricao'])) {
                            $qry = "UPDATE dominios set dom_desc='" . noHtml($_POST['descricao']) . "' where dom_cod=" . $_POST['cod'] . "";
                            $exec = mysql_query($qry) or die(TRANS('MSG_NOT_ALTER_REG') . $qry);
                            print "<script>mensagem('" . TRANS('MSG_DATA_ALTER_OK') . "'); window.opener.location.reload(); history.go(-2)(); </script>";
                        } else {
                            print "<script>mensagem('" . TRANS('MSG_EMPTY_DATA') . "'); history.go(-2)(); </script>";
                        }
                    }
                }
            }
        }
    }
}
print "</body>";
?>
<script type="text/javascript">
<!--
	function valida(){
		var ok = validaForm('idDesc','','Descrição',1);
		return ok;
	}
print "<TR><TD bgcolor='" . $cor3 . "'><b>" . TRANS('OCO_DATE') . "</TD><TD bgcolor='" . $cor3 . "'><b>" . TRANS('COL_QTD') . "</TD></tr>";
$i = 0;
$j = 2;
while ($rowC = mysql_fetch_array($resultadoC)) {
    $color = BODY_COLOR;
    $j++;
    print "<TR>";
    $searchDate = converte_dma_para_amd($rowC['tipo_data']);
    print "<TD bgcolor='" . $color . "'><a href='mostra_consulta_comp.php?comp_data=" . $searchDate . "&ordena=equipamento,modelo,local,etiqueta'>" . $rowC['DIA'] . "/" . $rowC['MES'] . "/" . $rowC['ANO'] . "</a></TD>";
    print "<TD bgcolor='" . $color . "'>" . $rowC['QTD_DIA'] . "</TD>";
    print "</TR>";
    $i++;
}
print "<TR><TD bgcolor='" . $cor3 . "'><b></TD><TD bgcolor='" . $cor3 . "'><b>" . TRANS('TOTAL') . ": " . $total . "</TD></tr>";
print "</TABLE>";
print "</fieldset>";
print "<TABLE width='80%' align='center'>";
// print "<tr><td class='line'></TD></tr>";
// print "<tr><td class='line'></TD></tr>";
// print "<tr><td class='line'></TD></tr>";
// print "<tr><td class='line'></TD></tr>";
// print "</TABLE>";
// print "<TABLE width='80%' align='center'>";
// print "<tr><td class='line'></TD></tr>";
// print "<tr><td class='line'></TD></tr>";
// print "<tr><td class='line'></TD></tr>";
// print "<tr><td class='line'></TD></tr>";
print "<tr><td width='80%' align='center'><b>" . TRANS('SLOGAN_OCOMON') . " <a href='http://www.yip.com.br' target='_blank'>" . TRANS('COMPANY') . "</a>.</b></td></tr>";
print "</TABLE>";
print "</BODY>";
print "</HTML>";
Example #28
0
    print "<tr><td colspan='6'></td></tr>";
    print "<tr><td colspan='6'><div id='SubCalls' style='{display:none}'>";
    //style='{display:none}'	//style='{padding-left:5px;}'
    print "<TABLE border='0' style='{padding-left:10px;}' cellpadding='5' cellspacing='0' align='left' width='90%'>";
    print "<tr class='header'><td class='line'>" . TRANS('OCO_FIELD_NUMBER') . "<br>" . TRANS('OCO_AREA') . "</td><td class='line'>" . TRANS('OCO_FIELD_PROB') . "</td><td class='line'>" . TRANS('OCO_FIELD_CONTACT') . "<br>" . TRANS('OCO_PHONE') . "</td><td class='line'>" . TRANS('OCO_LOCAL') . "<br>" . TRANS('OCO_DESC') . "</td><td class='line'>" . TRANS('FIELD_LAST_OPERATOR') . "<br>" . TRANS('OCO_STATUS') . "</td></tr>";
    $j = 2;
    $execSubCall = mysql_query($qrySubCall);
    while ($rowSub = mysql_fetch_array($execSubCall)) {
        if ($j % 2) {
            $trClass = "lin_par";
        } else {
            $trClass = "lin_impar";
        }
        $j++;
        $qryDetail = $QRY["ocorrencias_full_ini"] . " WHERE  o.numero = " . $rowSub['dep_filho'] . " ";
        $execDetail = mysql_query($qryDetail) or die(TRANS('MSG_ERR_RESCUE_DATA_OCCO') . $qryDetail);
        $rowDetail = mysql_fetch_array($execDetail);
        print "<tr class=" . $trClass . " id='linhaxy" . $j . "' onMouseOver=\"destaca('linhaxy" . $j . "','" . $_SESSION['s_colorDestaca'] . "');\" onMouseOut=\"libera('linhaxy" . $j . "','" . $_SESSION['s_colorLinPar'] . "','" . $_SESSION['s_colorLinImpar'] . "');\"  onMouseDown=\"marca('linhaxy" . $j . "','" . $_SESSION['s_colorMarca'] . "');\">";
        print "<td class='line'><a onClick=\"javascript: popup_alerta('mostra_consulta.php?popup=true&numero=" . $rowDetail['numero'] . "')\"><b>" . $rowDetail['numero'] . "</b></a><br>" . $rowDetail['area'] . "</TD>";
        print "<td class='line'>" . $rowDetail['problema'] . "</TD>";
        print "<td class='line'><b>" . $rowDetail['contato'] . "</b><br>" . $rowDetail['telefone'] . "</TD>";
        $texto = trim($rowDetail['descricao']);
        if (strlen($texto) > 200) {
            $texto = substr($texto, 0, 195) . " ..... ";
        }
        print "<td class='line'><b>" . $rowDetail['setor'] . "</b><br>" . $texto . "</TD>";
        print "<td class='line'><b>" . $rowDetail['nome'] . "</b><br>" . $rowDetail['chamado_status'] . "</TD>";
        print "</tr>";
    }
    print "</table></div></td></tr>";
}
Example #29
0
                        		"prob_tipo_1 = ".$_POST['tipo_1'].", prob_tipo_2 = ".$_POST['tipo_2'].", prob_tipo_3 = ".$_POST['tipo_3']." ".
                        		"WHERE prob_id='".$_POST['cod']."'";*/
                        if (isset($_POST['alimentabancosolucao'])) {
                            $alimentabancosolucao = 1;
                        } else {
                            $alimentabancosolucao = 0;
                        }
                        //$descProb = str_replace("\r\n","",$_POST['descricao']);
                        $descProb = $_POST['descricao'];
                        $query2 = "UPDATE problemas SET " . "problema='" . noHtml($_POST['problema']) . "', prob_area = " . $_POST['area'] . ", prob_sla = " . $_POST['sla'] . ",  " . "prob_tipo_1 = " . $_POST['tipo_1'] . ", prob_tipo_2 = " . $_POST['tipo_2'] . ", prob_tipo_3 = " . $_POST['tipo_3'] . " " . ", " . "prob_descricao = '" . $descProb . "', " . "prob_alimenta_banco_solucao = " . $alimentabancosolucao . " " . "WHERE prob_id='" . $_POST['cod'] . "'";
                        //--------------------------------------------------------------- FIM ALTERACAO ---------------------------------------------------------------
                        $resultado2 = mysql_query($query2);
                        if ($resultado2 == 0) {
                            $aviso = TRANS('ERR_EDIT');
                        } else {
                            $aviso = TRANS('OK_EDIT');
                            //------------------------------------------------------------- INICIO ALTERACAO --------------------------------------------------------------
                            $queryAtualizaOcorrencias = "UPDATE ocorrencias o, problemas p SET o.sistema = p.prob_area WHERE o.problema = p.prob_id AND o.sistema <> p.prob_area";
                            $resultadoAtualizacao = mysql_query($queryAtualizaOcorrencias) or die('ERRO NA TENTATIVA DE ATUALIZAR OCORRENCIAS!<BR>' . $queryAtualizaOcorrencias);
                            //------------------------------------------------------------- FIM ALTERACAO --------------------------------------------------------------
                        }
                        echo "<script>mensagem('" . $aviso . "'); redirect('" . $_SERVER['PHP_SELF'] . "');</script>";
                    }
                }
            }
        }
    }
}
print "</table>";
?>
<script type="text/javascript">
                                }
                                if (!empty($catProb)) {
                                    $query2 = "INSERT INTO prob_x_script (prscpt_prob_id, prscpt_scpt_id) values " . "(" . $catProb . ", " . $_POST['cod'] . ") ";
                                    $execQuery2 = mysql_query($query2) or die($query2);
                                }
                                if ($resultado2 == 0) {
                                    $aviso = TRANS('ERR_EDIT');
                                } else {
                                    $aviso = TRANS('OK_EDIT');
                                }
                                //Exclui os problemas marcados
                                if (isset($_POST['j'])) {
                                    for ($j = 1; $j <= $_POST['j']; $j++) {
                                        if (isset($_POST['delProb'][$j])) {
                                            $qryDel = "DELETE FROM prob_x_script WHERE prscpt_id = " . $_POST['delProb'][$j] . "";
                                            $execDel = mysql_query($qryDel) or die(TRANS('MSG_NOT_EXCLUDED_PROBLEM'));
                                        }
                                    }
                                }
                                echo "<script>mensagem('" . $aviso . "'); redirect('" . $_SERVER['PHP_SELF'] . "');</script>";
                            }
                        }
                    }
                }
            }
        }
    }
}
print "</table>";
?>
<script type="text/javascript">