Ejemplo n.º 1
0
 function UnidadMedida($id = 0)
 {
     $this->id = $id;
     if ($this->id > 0) {
         $sql = " SELECT * FROM unidad_medida";
         $query = new Consulta($sql);
         if ($query->numregistros() > 0) {
             $row = $query->ConsultaVerRegistro();
             $this->nombre = $row['nombre_unidad_medida'];
             $this->descripcion = $row['descripcion_unidad_medida'];
         }
     }
 }
Ejemplo n.º 2
0
    function carga_combo($sql, $nom, $next = '', $msg_d = '-- Seleccione --', $msg_v = '-- Sin Opciones --')
    {
        $q = new Consulta($sql);
        if ($q->numregistros() == 0) {
            ?>
			<select name="<?php 
            echo $nom;
            ?>
"><option value=''><?php 
            echo $msg_v;
            ?>
</option></select>
<?php 
        } else {
            ?>
	<select name="<?php 
            echo $nom;
            ?>
" onchange="carga_combo(this,'<?php 
            echo $next;
            ?>
')" > 
		<option value='' selected ><?php 
            echo $msg_d;
            ?>
</option>
		<?php 
            while ($r = $q->ConsultaVerRegistro()) {
                ?>
			<option value='<?php 
                echo $r[0];
                ?>
'><?php 
                echo urlencode($r[1]);
                ?>
</option>
		<?php 
            }
            ?>
</select><?php 
        }
        //if hay registros
    }
$mes = array();
while ($rcrono = $sq_crono->ConsultaVerRegistro()) {
    ?>
	<tr bgcolor="#eeeeee">
		<td class="descripcion">
			<?php 
    echo $rcrono['codigo_programacion_metas'];
    ?>
 .- &nbsp;&nbsp;
			<?php 
    echo $rcrono['fase_ejecucion_programacion_metas'];
    ?>
</td><?php 
    for ($x = 1; $x < 13; $x++) {
        $ver_mes = new Consulta("SELECT * FROM programacion_metas_meses \r\n\t\t\t\t\t\t\t\tWHERE id_programacion_metas='" . $rcrono[0] . "' AND\r\n\t\t\t\t\t\t\t\t\tid_mes='" . $x . "'");
        if ($ver_mes->numregistros() > 0) {
            if (!array_key_exists($x, $mes)) {
                $mes[$x] = $x;
            }
        }
        ?>
												
		<td align="center" class="descripcion"><?php 
        if ($ver_mes->numregistros() > 0) {
            if (!array_key_exists($x, $mes)) {
                $mes[$x] = $x;
            }
            echo "x";
        } else {
            echo "&nbsp;";
        }
    ob_start();
}
require "../libs/verificar.inc.php";
require "../../includes.php";
require "../cls/reporteinformaciongeneral.cls.php";
$link = new Conexion();
if ($pag) {
    $pag = $_GET[pag];
} else {
    $pag = 1;
}
$tam_pag = 20;
$reg1 = ($pag - 1) * $tam_pag;
$sql = "SELECT cargo_anp.nombre_cargo_anp FROM cargo_anp ORDER BY nro_orden";
$queryPg = new Consulta($sql);
$row_res_pag = $queryPg->numregistros();
//TIPO CAMBIO ANUAL
$sql_axo = "SELECT * FROM axo_poa where id_axo_poa='" . $_SESSION[inrena_4][2] . "'";
$Queryt = new Consulta($sql_axo);
$tp = $Queryt->ConsultaVerRegistro();
$tipo_cambio = $tp[tipo_cambio];
?>
<title>Reporte</title>
<link href="../../style.css" rel="stylesheet" type="text/css">
<script language="javascript" src="../../js/js.js"></script> 
<script language="javascript" src="../js/reporte.js"></script> 
<style type="text/css">
<!--
body {
	background-color: #FFFFFF;
}
Ejemplo n.º 5
0
 function sumar_programado_fuente($idff, $cwhere = '', $campogroup = '', $campoorder = '')
 {
     $camposuma = " Sum(ppm.monto_programacion_partidas_meses) AS monto_total, pf.tipo_cambio_ff ";
     $wherefuente = " AND pf.id_ff='" . $idff . "'" . $cwhere;
     $sql = $this->set_sql($camposuma, $wherefuente, $campogroup, $campoorder);
     $query = new Consulta($sql);
     $row = $query->ConsultaVerRegistro();
     if ($query->numregistros() > 1) {
         //die($sql);
         return "Es un array";
     }
     return $row;
 }
Ejemplo n.º 6
0
function sumar_trimestral_programado($sql)
{
    //suma de montos programados
    $query = new Consulta($sql);
    $num = $query->numregistros();
    while ($row = $query->ConsultaVerRegistro()) {
        //$id_trimestre
        $id = $row[id_mes];
        if ($row[total_monto] > 0) {
            $trimestre[0] = $trimestre[0] + $row[total_monto];
            $Dtrim = DevValTrimestre($id, $row[total_monto]);
            $idtrim = $Dtrim['trimestre'];
            $vartrim = $Dtrim['valor'];
            $trimestre[$idtrim] = $trimestre[$idtrim] + $vartrim;
        }
    }
    return $trimestre;
}
Ejemplo n.º 7
0
function sumar_trimestral_programado($sql)
{
    //suma de montos programados
    $query = new Consulta($sql);
    $num = $query->numregistros();
    while ($row = $query->ConsultaVerRegistro()) {
        $id = $row[id_trimestre];
        if ($row[total_monto] > 0) {
            $trimestre[0] = $trimestre[0] + $row[total_monto];
            $trimestre[$id] = num_format($row[total_monto]);
        }
    }
    $trimestre[0] = num_format($trimestre[0]);
    return $trimestre;
}
Ejemplo n.º 8
0
    function mostrar_chk_ffs($id_fuente = '')
    {
        $anpid = $this->anpid;
        $query = new Consulta($sql = $this->set_sql("ff.id_fuentefinanciamiento", "", "ff.id_fuentefinanciamiento"));
        if ($query->numregistros() < 1) {
            echo '<center> <strong style="font:Verdana, Arial, Helvetica, sans-serif; color:#FF0000"> Anp no tiene datos programados En este AÑO</strong></center>';
            exit;
        }
        ?>
		<br>
		<table width="85%"  border="0" cellspacing="0" cellpadding="0" align="center">
			<tr>
				<td width="24%" align="right">&nbsp;</td>
				<td width="76%"><b><u>Fuentes Asociados</u></td>
			</tr>
		</table>
		
		<table width="85%"  border="0" cellspacing="0" cellpadding="0" align="center"> 

					<tr>
					  <td colspan="2" align="right">&nbsp;</td>
					  <td>&nbsp;</td>
					  <td>&nbsp;</td>
		  			</tr>
					<?php 
        while ($rows = $query->ConsultaVerRegistro()) {
            $row_ff = table_row($rows['id_fuentefinanciamiento'], "fuentefinanciamiento");
            ?>
							<tr>
							  <td width="24%" align="right">&nbsp;</td>
							  <td colspan="4" align="left">
					          <em><strong><?php 
            echo $row_ff[nombre_fuentefinanciamiento];
            ?>
</strong></em></td>
						     </tr>
					 <?php 
            /*$Select="
            		sa.id_subactividad, sa.nombre_subactividad,sa.codigo_subactividad,
            		sa.codigo_completo_subactividad, fas.id_presupuesto_anp, pf.id_axo_poa,
            			asb.id_anp_subactividad, fas.id_ff_anp_subactividad, pa.id_anp,ff.id_ff,
            			ff.siglas_ff, ff.nombre_ff";*/
            $Select = "\r\n\t\t\t\t\tt.id_tarea, t.nombre_tarea, \r\n\t\t\t\t\t\tconcat(codigo_objetivo_estrategico,'.',codigo_objetivo_especifico,'.',nro_asignacion) as codigo,\r\n\t\t\t\t\t \tafao.id_presupuesto_anp, pf.id_axo_poa,\r\n\t\t\t\t\t\taao.id_asignacion_anp_objetivos, afao.id_asignacion_ff_anp_objetivos, pa.id_anp,ff.id_ff,\r\n\t\t\t\t\t\tff.siglas_ff, ff.nombre_ff";
            $querryject = new Consulta($sqlejct = $this->set_sql($Select, " AND ff.id_fuentefinanciamiento='" . $rows[id_fuentefinanciamiento] . "'", "ff.id_ff", "ff.id_ff"));
            $e = 0;
            while ($row = $querryject->ConsultaVerRegistro()) {
                $Activochk = "";
                for ($i = 0; $i < count($id_fuente); $i++) {
                    if ($id_fuente[$i] == $row['id_ff']) {
                        $Activochk = 'checked="checked"';
                        echo $Activochk;
                        echo $id_fuente[$i];
                    }
                }
                ?>
	
						
						<tr>
							<td colspan="2" align="right">
								<input type="checkbox" name="S2[]" value="<?php 
                echo $row['id_ff'];
                ?>
" onclick="CargarSubActvXFf()" <?php 
                echo $Activochk;
                ?>
 />						</td>
							<td width="2%">&nbsp;</td>
							<td width="68%"><?php 
                echo $row['nombre_ff'];
                ?>
 </td>
						</tr>
					
							
					<?php 
            }
        }
        ?>
				
				
				
				
					<tr>
						<td colspan="4" align="center"><br />
							Seleccione una Tarea </td>
					</tr>
					<tr>
						<td align="center" colspan="4">
				
						<?php 
        $gsql = "";
        if (is_array($id_fuente)) {
            $gsql = GeneraSqlArray($id_fuente, "ff.id_ff", " OR ");
            $gsql = " AND (" . $gsql . ")";
        }
        $sqlffs = $this->set_sql($Select, " " . $gsql, "ff.id_ff", "ff.siglas_ff");
        //echo ($sqlffs);
        $Qffs = new Consulta($sqlffs);
        ?>
						<select name="id_var" >
						<option value="0">Seleccionar Todas</option>
						<?php 
        while ($row_ffs = $Qffs->ConsultaVerRegistro()) {
            ?>
							<optgroup   label="<?php 
            echo $row_ffs[siglas_ff];
            ?>
">
							
								<?php 
            $sqlsa = $this->set_sql($Select, " AND ff.id_ff='" . $row_ffs['id_ff'] . "'", "t.id_tarea,id_asignacion_ff_anp_objetivos", "codigo ASC");
            //die ($sqlsa);
            $QSubactividad = new Consulta($sqlsa);
            while ($row1 = $QSubactividad->ConsultaVerRegistro()) {
                $Aid_ff_anp[] = $row1['id_asignacion_ff_anp_objetivos'];
                echo '<option value="' . $row1['id_asignacion_ff_anp_objetivos'] . '">' . "\n";
                $numletras = 40;
                $nombre = $row1['nombre_tarea'];
                if (strlen($nombre) > $numletras) {
                    $nombre = substr($nombre, 0, $numletras) . "...";
                }
                echo $row1['codigo'];
                echo " - ";
                echo $nombre;
                echo '</option>' . "\n";
            }
            $_SESSION['id_ff_anp'] = "";
            $_SESSION['id_ff_anp'] = $Aid_ff_anp;
            ?>
						
							</optgroup>
						<?php 
        }
        ?>
						</select>
						<?php 
        //echo "-->"; print_r($Aid_ff_anp);
        ?>
						</td>
					</tr>
					<tr>
						<td colspan=4 align=center>
						<br /><br />	
						Mostrar el Reporte
							<a href="#" onclick="LlamarReporteFichaSB('<?php 
        echo $anpid;
        ?>
')">
							<img src="../../imgs/b_select.png" border="0"> </a>						</td>
					</tr>
				</table>
					
		<?php 
    }
Ejemplo n.º 9
0
 function LoginSessionQ($anyo, $ruta)
 {
     global $AuthVar, $mnuconsug, $calc;
     $sql = "SELECT u.id_usuario, q.nombre_quinquenio, uq.id_quinquenio \r\n\t\t\t\tFROM usuario_quinquenio uq Inner Join usuarios u ON u.id_usuario=uq.id_usuario\r\n\t\t\t\t\tInner Join quinquenio q ON q.id_quinquenio=uq.id_quinquenio \r\n\t\t\tWHERE u.id_usuario='" . $AuthVar['idu'] . "'\r\n\t\t\tORDER BY q.id_quinquenio ASC ";
     //echo "<br>".$sql;
     $query = new Consulta($sql);
     if ($query->numregistros() != 0) {
         while ($rows = $query->ConsultaVerRegistro()) {
             $prg[] = array('id_usuario' => $rows[id_usuario], 'quinquenio' => $rows[nombre_quinquenio], 'id_quinquenio' => $rows[id_quinquenio]);
         }
     }
     $ARaxos = $prg;
     if (is_array($ARaxos)) {
         for ($i = 0; $i < count($ARaxos); $i++) {
             if ($ARaxos[$i][id_quinquenio] == $anyo) {
                 $AxoAnt = $ARaxos[$i - 1][id_quinquenio];
                 $AxoPost = $ARaxos[$i + 1][id_quinquenio];
             }
             //echo "Usuario ".$ARaxos[$i][id_usuario]. " Año ".$ARaxos[$i][axo]." AÑO AC.".$anyo."<br>";
         }
     }
     if (isset($AxoAnt)) {
         $LinkA = '<a href="#" onclick="top.location=' . "'../axopoa.php?filename=" . $ruta . "&axo=" . $AxoAnt . "'" . '" title="Anterior Quinquenio"><img src="../imgs/b_firstpage.png" alt="Anterior Quinquenio" width="16" height="13" border="0"> </a>';
     }
     if (isset($AxoPost)) {
         $LinkB = '<a href="#" onclick="top.location=' . "'../axopoa.php?filename=" . $ruta . "&axo=" . $AxoPost . "'" . '" title="Siguiente Quinquenio" ><img src="../imgs/b_lastpage.png" alt="Siguiente Quinquenio" width="16" height="13" border="0"></a>';
     }
     $Links = array($LinkA, $LinkB, $mnuconsug);
     return $Links;
 }
    function reporte_d_prg_an_p()
    {
        /*
        				$sqlprg="SELECT p.*, aop.descripcion_anp_objetivo_programa FROM programa AS p Inner Join anp_objetivo_programa AS aop ON aop.id_programa = p.id_programa WHERE aop.id_anp =  '".$this->anpid."' AND aop.id_axo_poa =  '".$this->axo_poa."' ORDER BY p.id_programa ASC";*/
        $sqlprg = "SELECT p.*, aop.descripcion_anp_objetivo_programa FROM programa p,anp_objetivo_programa aop \r\n\t\t\t\t\t\tWHERE aop.id_programa = p.id_programa AND aop.id_anp = '" . $this->anpid . "' \r\n\t\t\t\t\t\tAND aop.id_axo_poa = '" . $this->axo_poa . "' \r\n\t\t\t\t\t\tORDER BY p.id_programa ASC";
        //echo $sqlprg." - ";
        $queryprg = new Consulta($sqlprg);
        $nregs = $queryprg->numregistros();
        /*if ($nregs=='0'){
        			 echo("<strong>El reporte no contiene datos</strong>");
        			 return false;
        		}*/
        //$rowprg=$queryprg->ConsultaVerRegistro();
        while ($rowprg = $queryprg->ConsultaVerRegistro()) {
            $id_programa = $rowprg[id_programa];
            ?>
				<table width="100%" border="0" cellpadding="0" cellspacing="0" 
				bordercolor="#666666" id="programa">
				<tr bgcolor="#CCCCCC">
				<td class="altn" width="15%"><strong><?php 
            echo $rowprg[codigo_programa] . ".";
            ?>
</strong></td>
				<td class="altn"><strong><?php 
            echo 'Programa de ' . $rowprg[nombre_programa];
            ?>
</strong>
				</td></tr>
				  <tr>
					<td colspan="2"><?php 
            echo $rowprg[descripcion_anp_objetivo_programa];
            ?>
</td>
				  </tr>
				</table>			
				<hr />
				<?php 
            $this->reporte_d_prg_an_sp($rowprg);
            ?>
				<br /><?php 
        }
    }
Ejemplo n.º 11
0
function Verkff($functjs = '', $ClassObj = '')
{
    $anpid = $ClassObj->anpid;
    //$this=$ClassObj->$this;
    //$anpid=$_SESSION['anp']['idanp'];
    $query = new Consulta($sql = $ClassObj->set_sql("m.id_mes, m.nombre_mes", "", "m.id_mes"));
    //echo $sql;
    ?>
<style type="text/css">
<!--
.Estilo1 {font-family: Verdana, Arial, Helvetica, sans-serif}
.Estilo3 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
}
body,td,th {
	color: #000000;
	font-family: Verdana, Arial, Helvetica, sans-serif;
}
body {
	background-color: #00CCCC;
}
-->
</style>
		
					<br>
					<table width="85%"  border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#00CCCC"> 
						<tr>
						  <td colspan="4" align="center"><span class="Estilo1"><br />
					          <span class="Estilo3">Seleccione el Mes </span></span></td>
		 			  </tr>
						<tr>
						  <td height="46" colspan="4" align="center"><p class="Estilo1">
						    <select name="idmes" >
                              <option value="">Elija el Mes</option>
                              
                              <?php 
    while ($row_ffs = $query->ConsultaVerRegistro()) {
        if ($_POST[idmes] == $row_ffs['id_mes']) {
            $select = "selected";
        } else {
            $select = "";
        }
        ?>
                        <option value="<?php 
        echo $row_ffs['id_mes'];
        ?>
"><?php 
        echo $row_ffs['nombre_mes'];
        ?>
</option><?php 
    }
    ?>
                            </select>  
                                                                                                                
						  </p>				                  </td>
				    </tr>
			
					<?php 
    /*$queryfte=new Consulta($row_ffs=$ClassObj->set_sql("ff.id_fuentefinanciamiento", " and m.id_mes='".$_POST[idmes]."'","ff.id_fuentefinanciamiento"));*/
    $queryfte = new Consulta($row_ffs = $ClassObj->set_sql("ff.id_fuentefinanciamiento", " ", "ff.id_fuentefinanciamiento"));
    if ($queryfte->numregistros()) {
        while ($row = $queryfte->ConsultaVerRegistro()) {
            $row_ff = table_row($row['id_fuentefinanciamiento'], "fuentefinanciamiento");
            ?>
							<tr>
							  <td width="9%" align="right">&nbsp;</td>
							  <td colspan="3" align="left">
						        <em><strong><?php 
            echo $row_ff[nombre_fuentefinanciamiento];
            ?>
</strong></em></td>
						     </tr>
							 	<?php 
            ////$querryject=new Consulta ($sqlejct= $ClassObj->set_sql("ff.id_ff,ff.nombre_ff"," AND ff.id_fuentefinanciamiento='".$row[id_fuentefinanciamiento]."' and m.id_mes='".$_POST[idmes]."'","ff.id_ff","ff.id_ff"));
            $querryject = new Consulta($sqlejct = $ClassObj->set_sql("ff.id_ff,ff.nombre_ff", " AND ff.id_fuentefinanciamiento='" . $row[id_fuentefinanciamiento] . "' ", "ff.id_ff", "ff.id_ff"));
            //echo $sqlejct;
            while ($rowej = $querryject->ConsultaVerRegistro()) {
                ?>

						
											  <tr>
												<td colspan="2" align="right">
											    <!-- <input type="checkbox" name="checkbox" value="checkbox" /> -->
											    <input name="S2[]" type="checkbox"  value="<?php 
                echo $rowej[id_ff];
                ?>
"  /></td>
												<td width="2%">&nbsp;</td>
												<td width="76%"><?php 
                echo $rowej[nombre_ff];
                ?>
</td>
											</tr>
										<?php 
            }
        }
        ?>
<tr>
								<td colspan="2">&nbsp; 			</td>
								<td>&nbsp; 			</td>
								<td>&nbsp; 			</td>
							</tr>
							
							<tr>
								<td colspan=4 align=center>
								<p><br /><br />	
								<span class="Estilo5 Estilo1">Mostrar el Reporte </span></p>
										<p align="center">
										  <?php 
        if (empty($anpid)) {
            $functjs = $functjs . "()";
        } else {
            $functjs = $functjs . "('" . $anpid . "')";
        }
        $_SESSION[idmes] = $_POST[idmes];
        ?>
				                 <!--   <a href="../informacionanp/presupuestomensualporpartidas.php" onclick="'.$functjs.'"> -->
										<a href="#" onclick="'.$functjs.'">
				              <img src="../../imgs/b_select.png" width="16" height="16" border="0" align="middle"> </a>                              </p>                              </td>
							</tr>
						</table>
				   
			        <div align="center" class="Estilo3">
			          <?php 
    } else {
        ?>
			          <strong style="font:Verdana, Arial, Helvetica, sans-serif; color:#FF0000"> Seleccione el Mes o su Anp no tiene datos programados En este AÑO</strong>		              </div>
				      <?php 
    }
}
Ejemplo n.º 12
0
 function ValidarListarSubmodulos($id_modulo, $id_usuario)
 {
     $sql = "SELECT s.nombre_submodulo, s.url_submodulo, su.lectura, su.escritura, \r\n\t\t\tcad_submodulo \r\n\t\t\tFROM submodulo_usuario su, submodulo s \r\n\t\t\tWHERE su.id_submodulo=s.id_submodulo AND \r\n\t\t\t\tsu.id_usuario='" . $id_usuario . "'\tAND\r\n\t\t\t\ts.id_modulo='" . $id_modulo . "'\r\n\t\t\t\tORDER BY s.orden_submodulo,s.id_submodulo";
     //echo $sql;
     $query = new Consulta($sql);
     if ($query->numregistros() > 0) {
         while ($rows = $query->ConsultaVerRegistro()) {
             ///caducidad
             $estado = 0;
             if ($rows[cad_submodulo] != '0') {
                 //echo "===>".$_SESSION['inrena_'.$_SESSION[Module]][2];
                 if ($rows[cad_submodulo] == 1 && $_SESSION['inrena_' . $_SESSION[Module]][2] > 2) {
                     $estado = 1;
                 }
                 if ($rows[cad_submodulo] == 2 && $_SESSION['inrena_' . $_SESSION[Module]][2] < 3) {
                     $estado = 1;
                 }
             }
             //fin caducidad
             if ($estado == 0) {
                 $prg[] = array('submodulo' => $rows['nombre_submodulo'], 'url' => $rows['url_submodulo'], 'lectura' => $rows['lectura'], 'escritura' => $rows['escritura']);
             }
         }
     }
     return $prg;
 }
    function reporte_d_prg_an_p()
    {
        /*$sqlprg = "SELECT * FROM anp_objetivo_estrategico aoe,objetivo_estrategico oe, anp_objetivo_estrategico_meta m 
        		WHERE aoe.id_objetivo_estrategico=oe.id_objetivo_estrategico 
        			AND m.id_anp_objetivo_estrategico=aoe.id_anp_objetivo_estrategico
        			AND id_anp='".$_SESSION['anp']['idanp']."' AND id_axo_poa='".$_SESSION['inrena_4']['2']."'
        			AND id_quinquenio='".axo_quinq($_SESSION['inrena_4']['2'],'','id')."'
        		ORDER BY codigo_objetivo_estrategico  ";*/
        $sqlprg = "SELECT * FROM tarea Inner Join asignacion_anp_objetivos \r\n\t\t\t\t\t\t\tON tarea.id_tarea = asignacion_anp_objetivos.id_tarea\r\n\t\t\t\t\t\tInner Join anp_objetivo_especifico aoe \r\n\t\t\t\t\t\t\tON aoe.id_anp_objetivo_especifico=asignacion_anp_objetivos.id_anp_objetivo_especifico\r\n\t\t\t\t\t\tINNER JOIN anp_objetivo_estrategico\taoet\r\n\t\t\t\t\t\t\tON aoet.id_anp_objetivo_estrategico=aoe.id_anp_objetivo_estrategico\r\n\t\t\t\t\t\tINNER JOIN objetivo_estrategico oe \r\n\t\t\t\t\t\t\tON\taoet.id_objetivo_estrategico=oe.id_objetivo_estrategico\r\n\t\t\t\t\t\tINNER JOIN anp_objetivo_estrategico_meta m\r\n\t\t\t\t\t\t\tON m.id_anp_objetivo_estrategico=aoe.id_anp_objetivo_estrategico\t\r\n\t\t\t\t  WHERE\tasignacion_anp_objetivos.id_axo_poa =  '" . $_SESSION['inrena_4']['2'] . "' AND\r\n\t\t\t\t\t\tasignacion_anp_objetivos .id_anp =  '" . $_SESSION['anp']['idanp'] . "' AND id_quinquenio='" . axo_quinq($_SESSION['inrena_4']['2'], '', 'id') . "'" . " GROUP BY aoet.id_anp_objetivo_estrategico ORDER BY codigo_objetivo_estrategico";
        //echo $sqlprg." - ";
        $queryprg = new Consulta($sqlprg);
        $nregs = $queryprg->numregistros();
        /*if ($nregs=='0'){
        			 echo("<strong>El reporte no contiene datos</strong>");
        			 return false;
        		}*/
        //$rowprg=$queryprg->ConsultaVerRegistro();
        while ($rowprg = $queryprg->ConsultaVerRegistro()) {
            $id_programa = $rowprg[id_programa];
            ?>
				<table width="100%" border="0" cellpadding="0" cellspacing="0" 
				bordercolor="#666666" id="programa">
				<tr bgcolor="#CCCCCC">
				<td class="altn" width="5%"><strong><?php 
            echo $rowprg[codigo_objetivo_estrategico] . ".";
            ?>
</strong></td>
				<td width="95%" class="altn"><strong><?php 
            echo ' ' . $rowprg[nombre_objetivo_estrategico];
            ?>
</strong></td>
				</tr>
				  <!--<tr>
					<td colspan="2"><?php 
            echo "<strong>Indicador:&nbsp;&nbsp;</strong>" . $rowprg[indicador_objetivo_estrategico] . "<br><strong>Unidad de Medida:&nbsp;&nbsp;</strong>" . $rowprg[id_unidad_medida];
            ?>
</td>
				  </tr>-->
				</table>			
				<hr />
				<?php 
            $this->reporte_d_prg_an_sp($rowprg);
            ?>
				<br /><?php 
        }
    }
Ejemplo n.º 14
0
function Verkff($functjs = '', $ClassObj = '')
{
    //$this->SqlSelect($_SESSION['anp']['idanp'],$_SESSION["inrena_4"][2],$_SESSION["inrena_4"][1]);
    //$this->anpid=$anpid;
    //$this->axo_poa=$axo_poa;
    //$this->id_user=$id_user;
    $anpid = $ClassObj->anpid;
    $query = new Consulta($sql = $ClassObj->set_sql("ff.id_fuentefinanciamiento", " and m.id_mes='" . $_POST[idmes] . "'", "ff.id_fuentefinanciamiento"));
    ///echo $sql;
    if ($query->numregistros()) {
        echo '<br>	
					<table width="85%"  border="0" cellspacing="0" cellpadding="0" align="center">
						<tr>
								<td width="9%" align="right">&nbsp;</td>
							<td width="91%"><u><strong>Fuentes y Ejecutores Asociados </strong></u></td>
					  	</tr>
					</table>		
					
					<table width="85%"  border="0" cellspacing="0" cellpadding="0" align="center"> 
							<tr>
							  <td colspan="3" align="right">&nbsp;</td>
							  <td>&nbsp;</td>
					 		 </tr>';
        while ($row = $query->ConsultaVerRegistro()) {
            $row_ff = table_row($row['id_fuentefinanciamiento'], "fuentefinanciamiento");
            echo '<tr>
							  <td width="9%" align="right">&nbsp;</td>
							  <td colspan="3" align="left">
						        <em><strong>' . $row_ff[nombre_fuentefinanciamiento] . '</strong></em></td>
						     </tr>';
            ///echo $row_ff;
            $querryject = new Consulta($sqlejct = $ClassObj->set_sql("ff.id_ff,ff.nombre_ff", " AND ff.id_fuentefinanciamiento='" . $row[id_fuentefinanciamiento] . "' AND m.id_mes='" . $_POST[idmes] . "' ", "ff.id_ff", "ff.id_ff"));
            //echo $sqlejct;
            while ($rowej = $querryject->ConsultaVerRegistro()) {
                echo '	 <tr>
												<td colspan="2" align="right">
													 <!-- <input type="checkbox" name="checkbox" value="checkbox" /> -->
													  <input type="checkbox" name="S2[]" value="' . $rowej['id_ff'] . '" />
												</td>
												<td width="2%">&nbsp;</td>
												<td width="76%">' . $rowej[nombre_ff] . '' . $rowej['id_ff'] . '</td>
											</tr>';
            }
        }
        echo '<tr>
								<td colspan="2">&nbsp; 			</td>
								<td>&nbsp; 			</td>
								<td>&nbsp; 			</td>
							</tr>
							
							<tr>
									<td colspan=4 align=center>
										<br /><br />	
										Mostrar el Reporte	
											';
        if (empty($anpid)) {
            $functjs = $functjs . "()";
        } else {
            $functjs = $functjs . "('" . $anpid . "')";
        }
        echo '<a href="#" onclick="' . $functjs . '">	
									<img src="../../imgs/b_select.png" border="0">	 </a>				
									</td>
									
							</tr>
						</table>';
    } else {
        echo '<center> <strong style="font:Verdana, Arial, Helvetica, sans-serif; color:#FF0000"> Anp no tiene datos programados En este AÑO</strong></center>';
    }
}