PHP - error cuand queiro generar este reporte

 
Vista:
Imágen de perfil de DANIEL ALEXANDER
Val: 28
Ha aumentado su posición en 161 puestos en PHP (en relación al último mes)
Gráfica de PHP

error cuand queiro generar este reporte

Publicado por DANIEL ALEXANDER (13 intervenciones) el 01/11/2019 16:27:44
el error me lo aroja desde aqui
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
<?php
session_start();
include_once(dirname(dirname(dirname((__FILE__)))) . '/script/fpdf.php');
include_once(dirname(dirname(dirname((__FILE__)))) . '/script/FuncionesPHP.php');
include_once(dirname(dirname(dirname((__FILE__)))) . '/script/Utilidades.php');
include_once(dirname(dirname(dirname((__FILE__)))) . '/model/md_publicpre_factorriesgo.php');
include_once(dirname(dirname(dirname((__FILE__)))) . '/model/md_public_pre_objetivo.php');
 
// include_once(dirname(dirname(dirname((__FILE__)))) . '/model/md_cli_solicitudesdetalles.php');
 
 
$cDesde1 = $_REQUEST['cDesde1'];//Area  
$cDesde2 = $_REQUEST['cDesde2'];//SuB Area
$cDesde3 = $_REQUEST['cDesde3'];//Proceso
$cDesde4 = $_REQUEST['cDesde4'];//Sub Proceso
$cDesde5 = $_REQUEST['cDesde5'];//Factor Riesgo
 
 
$objTablaFactor = new pre_factorriesgo();
$condicionFactor = " WHERE f.id = $cDesde4";
//$condicionFactor = " WHERE f.idsubareas=" . $cDesde5;
$retornoFactor = $objTablaFactor->buscar_factor_matriz($condicionFactor);
 
$objTablaObjetivo = new pre_objetivo();
$condicionObjetivo = " WHERE id ='" . $cDesde1 . "'";
$retornoObjetivo = $objTablaObjetivo->buscar($condicionObjetivo);
$rowObjetivo = pg_fetch_object($retornoObjetivo);
 
$condicionObjetivo1 = " WHERE id ='" . $cDesde3 . "'";
$retornoObjetivo1 = $objTablaObjetivo->buscar($condicionObjetivo1);
$rowObjetivo1 = pg_fetch_object($retornoObjetivo1);
 
 
 
 
 
$fecha = new DateTime();
 
if ($cDesde5 == 1) {
    header("Content-type: application/x-msexcel");
    header("Content-Disposition: attachment; filename=ArchivoExcel.xls");
    header("Pragma: no-cache");
    header("Expires: 0");
}
?>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>Matriz Prevencion</title>
        <style>
            @media print{
                .botonImprimir{
                    display: none;
                }
            }
            body{
 
                font-family:Times New Roman;
                font-size:5pt;
 
            }
            .texto{
                font-weight: bolder;
            }
        </style>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    </head>
    <body style="width: 720px; margin-bottom: 10px; margin-top:0px" >
        <table border="0" width="150%" cellpadding="0px" >
            <thead>
                <tr>
                    <td align="right" colspan="8">
                        <button class="botonImprimir" type="button" id="btnImprimir" name="btnImprimir" style="cursor:default" onclick="window.print();">
                            <table align="center" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td width="10">&nbsp;</td>
                                    <td width="17"><img src="../../img/icons/printer.png" alt="print"/></td>
                                    <td width="10">&nbsp;</td>
                                    <td width="36">Imprimir</td>
                                </tr>
                            </table>
                        </button>
                    </td>
                </tr>
                <tr>
                    <td align="center" height='15px'></td>
                </tr>
                <tr>
                    <td  align="center" height='15px' colspan="8">
                        <?php echo utf8_decode($rowObjetivo->descripcion) ?>
                    </td>
                </tr>
                <tr>
                    <td  align="left" height='15px' colspan="8">
                        <?php echo "PROCESO: " . $rowObjetivo1->descripcion ?>
                    </td>
 
                </tr>
                <tr>
                    <td  align="left" height='15px' colspan="8">
                        <?php echo "RESPONSABLE : " . $rowObjetivo1->responsable ?>
                    </td>
                </tr>
                <tr>
                    <td align="left" height='15px'></td>
                </tr>
 
            </thead>
            <tbody>
                <?php
                if (pg_num_rows($retornoFactor) > 1) {
                    $iFila = 0;
                    $bprimera = "SI";
                    while ($rowFactor = pg_fetch_object($retornoFactor)) {
                        $iFila++;
                        $descfactorriesgo = htmlentities(utf8_decode(substr($rowFactor->descfactorriesgo, 0, 60)));
                        $impacto = $rowFactor->impacto;
                        $frecuencia = $rowFactor->frecuencia;
                        $criticidad = $rowFactor->criticidad;
                        $incidenciafondo = htmlentities(utf8_decode(substr($rowFactor->incidenciafondo, 0, 60)));
                        ?>
                        <table border="1" width="150%">
                            <?php
                            if ($bprimera == "SI") {
                                $bprimera = "NO";
                                ?>
                                <tr>
                                    <td bgcolor=#A4A4A4 width="15%" align="center">
                                        <strong><?php echo htmlentities(utf8_decode('IDENTIFICACIÓN DEL RIESGO')); ?></strong>
                                    </td>
                                    <td  bgcolor=#A4A4A4 width="1%"  align="center">
                                        <strong><?php echo 'I' ?></strong>
                                    </td>
                                    <td  bgcolor=#A4A4A4 width="1%" align="center">
                                        <strong><?php echo 'F' ?></strong>
                                    </td>
                                    <td  bgcolor=#A4A4A4 width="1%" align="center">
                                        <strong><?php echo 'C' ?></strong>
                                    </td>
                                    <td  bgcolor=#A4A4A4 width="10%" align="center">
                                        <strong><?php echo 'INCIDENCIA EN EL FONDO' ?></strong>
                                    </td>
                                    <td>
                                        <table border='1' width="100%">
 
                                            <td  bgcolor=#A4A4A4>
                                                <strong><?php echo 'MEDIDAS DE MITIGACIÓN' ?></strong>
                                            </td>
                                            <td  bgcolor=#A4A4A4>
                                                <strong><?php echo 'VAM' ?></strong>
                                            </td>
                                            <td  bgcolor=#A4A4A4 width='200px' align='center'>
                                                <strong><?php echo 'ACTIVIDADES' ?></strong>
                                            </td>
                                            <td  bgcolor=#A4A4A4 width='52px' align='center'>
                                                <strong><?php echo 'T' ?></strong>
                                            </td>
                                            <td  bgcolor=#A4A4A4 width='20px' align='center'>
                                                <strong><?php echo 'RP' ?></strong>
                                            </td>
                                            <td  bgcolor=#A4A4A4 width='25px' align='center'>
                                                <strong><?php echo 'RL' ?></strong>
                                            </td>
                                            <td  bgcolor=#A4A4A4 width='0px' align='center'>
                                                <strong><?php echo '%E' ?></strong>
                                            </td>
                                        </table>
                                    </td>
 
                                </tr>
                                <?php
                            }
                            ?>
 
 
                            <tr>
                                <td width="15%" align="left">
                                    <strong><?php echo $descfactorriesgo; ?></strong>
                                </td>
                                <!-- IMPACTO -->
                                <?php if ($impacto == 1) { ?>
                                    <td  bgcolor=#0B6121 width="1%"  align="center"> <!-- verde -->
                                        <strong><?php echo $impacto; ?></strong>
                                    </td>
                                <?php } elseif ($impacto == 2) { ?>
                                    <td   bgcolor=#FFFF00 width="1%"  align="center"> <!-- amarillo -->
                                        <strong><?php echo $impacto; ?></strong>
                                    </td>
                                <?php } elseif ($impacto == 3) { ?>
                                    <td  bgcolor=#FF0000 width="1%"  align="center"> <!-- rojo -->
                                        <strong><?php echo $impacto; ?></strong>
                                    </td>
                                <?php } ?>
                                <!-- FRECUENCIA -->
                                <?php if ($frecuencia == 1) { ?>
                                    <td  bgcolor=#0B6121 width="1%"  align="center"> <!-- verde -->
                                        <strong><?php echo $frecuencia; ?></strong>
                                    </td>
                                <?php } elseif ($frecuencia == 2) { ?>
                                    <td  bgcolor=#FFFF00 width="1%"  align="center"> <!-- amarillo -->
                                        <strong><?php echo $frecuencia; ?></strong>
                                    </td>
                                <?php } elseif ($frecuencia == 3) { ?>
                                    <td  bgcolor=#FF0000 width="1%"  align="center"> <!-- rojo -->
                                        <strong><?php echo $frecuencia; ?></strong>
                                    </td>
                                <?php } ?>
                                <!-- CRITICIDAD -->
                                <?php if ($criticidad == 1 || $criticidad == 2 || $criticidad == 3) { ?>
                                    <td  bgcolor=#0B6121 width="1%"  align="center"> <!-- verde -->
                                        <strong><?php echo $criticidad; ?></strong>
                                    </td>
                                <?php } elseif ($criticidad == 4 || $criticidad == 5 || $criticidad == 6) { ?>
                                    <td  bgcolor=#FFFF00 width="1%"  align="center"> <!-- amarillo -->
                                        <strong><?php echo $criticidad; ?></strong>
                                    </td>
                                <?php } elseif ($criticidad == 7 || $criticidad == 8 || $criticidad == 89) { ?>
                                    <td bgcolor=#FF0000 width="1%"  align="center"> <!-- rojo -->
                                        <strong><?php echo $criticidad; ?></strong>
                                    </td>
                                <?php } ?>
                                <td width="10%" align="left">
                                    <strong><?php echo $incidenciafondo; ?></strong>
                                </td>
                                <td width="30%" align="left">
                                    <table border =1>
                                        <?php
                                        // ACCION MITIGANTE
                                        $condicionAccionM = " WHERE am.idfactorriesgo = " . $rowFactor->id;
                                        $retornoAccionM = $objTablaFactor->buscar_accionM_matriz($condicionAccionM);
                                        $filaAccion = 0;
                                        while ($rowAccionM = pg_fetch_object($retornoAccionM)) {
                                            $filaAccion++;
 
//                                        for ($iAccion = 1; $iAccion <= $filaAccion; $iAccion++) {
                                            $iFila1++;
                                            $condicionActividadM = " WHERE aA.idaccionmitigante = $rowAccionM->idaccionmitigante";
                                            $retornoActividadM = $objTablaFactor->buscar_actividadM_matriz($condicionActividadM);
                                            ?>
                                            <tr>
                                                <td width="30%"  align="center">
                                                    <strong><?php echo $rowAccionM->descaccionmitigante ?></strong>
                                                </td>
 
                                                <!-- valor -->
                                                <?php if ($rowAccionM->valor == 1) { ?>
                                                    <td bgcolor=#0B6121 width="4%"  align="center"> <!-- verde -->
                                                        <strong><?php echo $rowAccionM->valor; ?></strong>
                                                    </td>
                                                <?php } elseif ($rowAccionM->valor == 2) { ?>
                                                    <td bgcolor=#FFFF00 width="4%"  align="center"> <!-- amarillo -->
                                                        <strong><?php echo $rowAccionM->valor; ?></strong>
                                                    </td>
                                                <?php } elseif ($rowAccionM->valor == 3) { ?>
                                                    <td bgcolor=#FF0000 width="4%"  align="center"> <!-- rojo -->
                                                        <strong><?php echo $rowAccionM->valor; ?></strong>
                                                    </td>
                                                <?php } ?>
                                                <td>
                                                    <table border='1' >
 
                                                        <?php
                                                        while ($rowActividadM = pg_fetch_object($retornoActividadM)) {
                                                            if ($rowActividadM->aplicada == 1) {
                                                                $ejecutado = number_format($rowActividadM->valorporcentual);
                                                                $porejecutado = bcadd($porejecutado, $ejecutado);
                                                            }
                                                            ?>
                                                            <tr>
                                                                <td width="30%" align="center">
                                                                    <strong><?php echo $rowActividadM->descactividad ?></strong>
                                                                </td>
                                                                <td width="4%" align="center">
                                                                    <strong><?php echo number_format($rowActividadM->valorporcentual) . '%' ?></strong>
                                                                </td>
                                                                <td width="15%" align="center">
                                                                    <strong><?php echo $rowActividadM->responsable ?></strong>
                                                                </td>
                                                            </tr>
                                                        <?php   } ?>
 
                                                    </table>
                                                </td>
                                                <td width="10%"  align="center">
                                                    <strong><?php echo $rowAccionM->plazo ?></strong>
                                                </td>
                                                <td width="5%"  align="center">
                                                    <strong><?php echo $rowFactor->riesgoreputacional ?></strong>
                                                </td>
                                                <td width="5%"  align="center">
                                                    <strong><?php echo $rowFactor->riesgolegal ?></strong>
                                                </td>
                                                <td width="5%"  align="center">
                                                    <strong><?php echo $porejecutado.'%' ?></strong>
                                                </td>
                                            </tr>
 
                                            <?php
//                                        }
                                      $porejecutado=0;
                                        }
                                        ?>
                                    </table>
                                </td>
 
 
                            </tr>
                        </table>
                        <?php
                    }
                }
                ?>
            </tbody>
        </table>
    </body>
</html>
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
Imágen de perfil de Kathyu
Val: 1.802
Plata
Ha mantenido su posición en PHP (en relación al último mes)
Gráfica de PHP

error cuand queiro generar este reporte

Publicado por Kathyu (905 intervenciones) el 01/11/2019 16:38:14
aaaaaa si ya veo, si justo ahí esta.

Y es obvio que ahí tambien lo puede solventar si cambia eso por lo que pone en medio.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
1
Comentar
Imágen de perfil de Kathyu
Val: 1.802
Plata
Ha mantenido su posición en PHP (en relación al último mes)
Gráfica de PHP

error cuand queiro generar este reporte

Publicado por Kathyu (905 intervenciones) el 01/11/2019 20:52:01
En serio no entendió?

No somos genios, necesitamos saber el error que le da !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
1
Comentar