$arrSaidaPrz[$prazo['sq_prazo']] = array(); }*/ $arrTmp = getOpcao($arrOpcoes, 'id', $opt); //$arrCabecalho[] = $arrTmp[0]['label']; //$arrSaidaPrz[$prazo['sq_prazo']][] = $prazo[$arrTmp[0]['campo']]; $prz_label = $arrTmp[0]['label']; $prz_campo = $prazo[$arrTmp[0]['campo']]; if ($opt == 'prz-id_unid_destino') { $prz_campo = DaoUnidade::getUnidade($prazo[$arrTmp[0]['campo']], 'nome'); } fwrite($fp, $prz_label . ': ' . $prz_campo . "\n"); } } } if ($buscarPPA || $buscarExecOrc) { $arrPpa = DaoPrazoDemanda::listarObjetivosMetasPpa($prazo['sq_prazo']); if ($arrPpa !== false) { fwrite($fp, "\n----- OBJETIVOS E METAS PPA/LOA -----\n"); for ($j = 0; $j < count($arrPpa); $j++) { fwrite($fp, 'Programa: ' . $arrPpa[$j]['PROGRAMA'] . "\n"); fwrite($fp, 'Exercício: ' . $arrPpa[$j]['EXERCICIO'] . "\n"); fwrite($fp, 'Objetivo: ' . $arrPpa[$j]['OBJETIVO'] . "\n"); fwrite($fp, 'Meta: ' . $arrPpa[$j]['META'] . "\n\n"); } } else { fwrite($fp, "SEM OBJETIVOS E METAS PPA/LOA INFORMADOS\n\n"); } $arrPpa = DaoPrazoDemanda::listarAcoesPpa($prazo['sq_prazo']); if ($arrPpa !== false) { fwrite($fp, "\n----- AÇÕES" . ($buscarExecOrc ? ' E EXECUÇÕES ORÇAMENTÁRIAS' : '') . " PPA/LOA -----\n"); for ($j = 0; $j < count($arrPpa); $j++) {
$lista = $_GET['lista']; function quebrarTexto($texto, $tamanho) { $retorno = trim($texto); if (strlen($retorno) > $tamanho) { return substr($retorno, 0, $tamanho - 3) . '...'; } return $retorno; } $arrDados = null; $strClasseTh = 'style13 ui-state-default'; $numTam = 0; try { if ($lista == 'ppa') { //OBJETIVOS E METAS $arrDados = DaoPrazoDemanda::listarObjetivosMetasPpa($idPrazo); $strTabMetas = '<table class="display" id="tblObjetivosMetas"><thead><tr> <th class="' . $strClasseTh . '">Programa</th> <th class="' . $strClasseTh . '" style="width: 22%;">Objetivo</th> <th class="' . $strClasseTh . '" style="width: 22%;">Meta</th> <th class="' . $strClasseTh . '" style="width: 10%;">Exercício</th> <th class="' . $strClasseTh . '" style="width: 10%;">Opções</th> </tr></thead>'; $numTam = count($arrDados); $tr = '<tr class="even">'; if ($arrDados && $numTam > 0) { for ($i = 0; $i < $numTam; $i++) { $tr = $tr == '<tr class="odd">' ? '<tr class="even">' : '<tr class="odd">'; $strTabMetas .= $tr . '<td class="tdLeft tdMetaPPA">' . quebrarTexto($arrDados[$i]['PROGRAMA'], 60) . '</td>'; $strTabMetas .= '<td class="tdLeft">' . quebrarTexto($arrDados[$i]['OBJETIVO'], 30) . '</td>'; $strTabMetas .= '<td class="tdLeft">' . quebrarTexto($arrDados[$i]['META'], 30) . '</td>';