Пример #1
0
 function listar_ff_siglas($dato)
 {
     for ($i = 0; $i < count($dato) - 1; $i++) {
         $retval = $retval . fuente_siglas($dato[$i]) . "/";
     }
     $retval = $retval . fuente_siglas($dato[$i]);
     return $retval;
 }
Пример #2
0
    function mostrar_fisico_financiero($ftefto)
    {
        $gsql = $this->SqlFtt($ftefto);
        $th_fuent = "";
        for ($i = 0; $i < count($ftefto); $i++) {
            $th_fuente .= '<th class="th2" width="3%" align="center" nowrap="nowrap">' . fuente_siglas($ftefto[$i]) . '</th>';
            $td_fuente .= '<td class="td2" > &nbsp;</td>';
        }
        echo '<table width="100%"  border="1" cellspacing="0" cellpadding="0" class="tab">
			  <tr>
					<th class="th2" width="5%" rowspan="2" align="center">Codigo</th>
					<th class="th2" width="15%" rowspan="2" align="center">Obj. Estratégicos / Obj. Especificos/ Tarea</th>
  	 				<th class="th2" colspan="2" align="center">Meta</th>
					<th class="th2" colspan="' . count($ftefto) . '" align="center">Total (S/.)</th>
					<th class="th2" colspan="12" align="center">Cronograma</th>
			  </tr>
				<tr>
					<th class="th2" width="6%">Unidad</th>
					<th class="th2" width="6%">Cantidad</th>					
					' . $th_fuente . '									
					<th class="th2" width="2%" align="center">E</th>
					<th class="th2" width="2%" align="center">F</th>
					<th class="th2" width="2%" align="center">M</th>
					<th class="th2" width="2%" align="center">A</th>
					<th class="th2" width="2%" align="center">M</th>
					<th class="th2" width="2%" align="center">J</th>
					<th class="th2" width="2%" align="center">J</th>
					<th class="th2" width="2%" align="center">A</th>
					<th class="th2" width="2%" align="center">S</th>
					<th class="th2" width="2%" align="center">O</th>
					<th class="th2" width="2%" align="center">N</th>
					<th class="th2" width="2%" align="center">D</th>
			  </tr>
			  <tr>';
        //PROGRAMA ///////////////////////////////////////////////////////////////////////
        $sqlprg = $this->set_sql("oe.*", $gsqlp, "oe.id_objetivo_estrategico", "codigo_objetivo_estrategico");
        $query = new Consulta($sqlprg);
        while ($row_prg = $query->ConsultaVerRegistro()) {
            //$prg=table_row($row_prg[id_programa],"programa");
            $this->registro_programa($row_prg, $ftefto);
            //SUB PROGRAMA///////////////////////////////////////////////////////////////////////
            $gsqlsp = $gsqlp . " AND oe.id_objetivo_estrategico='" . $row_prg[id_objetivo_estrategico] . "'";
            $sql_sb = $this->set_sql("aoesp.*", $gsqlsp, "aoesp.id_anp_objetivo_especifico ", "codigo_objetivo_especifico");
            $query_sb = new Consulta($sql_sb);
            while ($row_sb = $query_sb->ConsultaVerRegistro()) {
                //$sbprg=table_row($row_sb[id_subprograma],"subprograma");
                $gsqla = $gsqlsp . " AND aoesp.id_anp_objetivo_especifico='" . $row_sb[id_anp_objetivo_especifico] . "'";
                $this->registro_subprograma($row_prg, $row_sb, $ftefto);
                //ACTIVIDAD///////////////////////////////////////////////////////////////////////
                $sql_a = $this->set_sql("t.*,afao.*,aao.*", $gsqla, " nro_asignacion", "nro_asignacion");
                $query_a = new Consulta($sql_a);
                while ($row_a = $query_a->ConsultaVerRegistro()) {
                    //$actividad=table_row($row_a[id_actividad],"actividad");
                    $this->registro_actividad($row_prg, $row_sb, $row_a, $ftefto);
                    /*//SUB ACTIVIDAD ///////////////////////////////////////////////////////////////////////
                    		$sql_sa=$this->set_sql(
                    				"sa.id_subactividad, sa.nombre_subactividad, sa.codigo_completo_subactividad, asb.id_anp_subactividad, asb.id_anp,asb.id_axo_poa ", 
                    				$gsql." AND (s.id_subprograma='".$sbprg[id_subprograma]."' AND  s.id_programa='".$row_prg[id_programa]."' AND sa.id_actividad='".$row_a[id_actividad]."')",
                    				"fas.id_anp_subactividad","sa.id_subactividad");
                    				//msql($sql_sa);
                    				$query_sa=new Consulta($sql_sa);
                    				while($row_sa=$query_sa->ConsultaVerRegistro()){ 
                    					$this->registro_subactividad($row_sa,$ftefto);
                    				}//fin SubActividad*/
                }
                // fin actividad
            }
            //fin sub programa
        }
        //fin programa
        echo ' <tr>
							<td class="tdtotal" valign="top">&nbsp;</td>
							<td class="tdtotal" valign="top" align=right><font size=2>TOTAL ' . $this->simbolomd . '
							&nbsp;</font></td>
							<td class="tdtotal" valign="top">&nbsp;</td>
							<td class="tdtotal" valign="top"  align="right">&nbsp;</td>';
        $cls = "tdtotal";
        $campo = " pf.id_ff";
        $campogroup = $campo;
        $campoorder = $campo;
        $td_fuente = $this->generar_td_fuente($ftefto, $cls, $cwhere, $campogroup, $campoorder);
        echo $td_fuente;
        echo '<td class="tdtotal" colspan="12" align="center">&nbsp;</td>
					       </tr> </table>';
    }