function colorea($id)
{
    //FUNCION QUE SE EJECUTA PARA LA COLUMNA EXTRA
    $aux = consulta("select * from p_analisis_resultados where ANALISIS_RESULTADO_ID=" . $id);
    $anormal = resultado_anormal($aux["VALOR_MINIMO"], $aux["VALOR_MAXIMO"], $aux["VALOR"]);
    if ($anormal) {
        $color = "fa2805";
        $string = '<table id="func_' . $id . '" border="0" width="100%" cellpadding="0" cellspacing="1" bgcolor="' . $color . '"><tr><td>&nbsp;</td></tr></table>';
    }
    return $string;
}
Exemplo n.º 2
0
        $sql_con = "select CONCEPTO_ID from p_recepcion_partidas WHERE RECEPCION_PARTIDAS_ID = " . $partida_id;
        //echo $sql_con."</br>";
        $fila_con = consulta($sql_con);
        $conepto_id = $fila_con["CONCEPTO_ID"];
        //echo $conepto_id."++";
        $sql_par = "select UNIDAD from c_analisis_parametros where CONCEPTO_ID = " . $conepto_id . " AND PARAMETRO LIKE '" . $resultados["PARAMETRO"] . "'";
        $res_par = mysql_query($sql_par);
        $fila_par = mysql_fetch_assoc($res_par);
        $unidad = $fila_par["UNIDAD"];
        if ($resultados["VALOR_MINIMO"] != "" && $resultados["VALOR_MAXIMO"] != "") {
            $guion = " - ";
        } else {
            $guion = " ";
        }
        //	echo 	 $sql_par."+++" 			;
        if (resultado_anormal($resultados["VALOR_MINIMO"], $resultados["VALOR_MAXIMO"], $resultados["VALOR"])) {
            $cuerpo .= '
						<tr>
						<td><strong>' . $resultados["PARAMETRO"] . '</strong></td>
						<td align= center><strong>***' . $resultados["VALOR"] . '</strong></td>
						<td align="center">' . $unidad . '</td>
						<td align= center><strong>' . $resultados["VALOR_MINIMO"] . '</strong> ' . $guion . ' <strong>' . $resultados["VALOR_MAXIMO"] . '</strong></td>
						</tr>';
        } else {
            $cuerpo .= '
					   <tr>
						<td>' . $resultados["PARAMETRO"] . '</td>
						<td align= center>' . $resultados["VALOR"] . '</td>
						<td align="center">' . $unidad . '</td>						
						<td align= center>' . $resultados["VALOR_MINIMO"] . ' ' . $guion . ' ' . $resultados["VALOR_MAXIMO"] . '</td>
					  </tr>';