function mostra_lista_edital($id) { $this->create_view(); $sql = "select * from csf_view where id_ed = " . $id . ' order by ed_titulo '; $rlt = $this->db->query($sql); $rlt = $rlt->result_array($rlt); $sx = '<table width="100%" align="left" class="border1 tabela01">'; $sx .= '<tr> <th width="30%" align=left>estudantes</th> <th width="30%" align=left>edital</th> <th width="10%" align=left>país</th> <th width="10%" align=left>universidade</th> </tr> '; $tot = 0; for ($r = 0; $r < count($rlt); $r++) { $tot++; $line = $rlt[$r]; $link = base_url('index.php/csf/ver/' . $line['id_csf'] . '/' . checkpost_link($line['id_csf'])); $link = '<A HREF="' . $link . '" class="lt2 link">'; $sx .= '<tr valign="top">'; $sx .= '<td class="lt1 borderb1" align=left>'; $sx .= $link . $line['us_nome'] . '</A>'; $sx .= '</td>'; $link = base_url('index.php/csf/ver_edital/' . $line['id_ed'] . '/' . checkpost_link($line['id_ed'])); $link = '<A HREF="' . $link . '" class="lt2 link">'; $sx .= '<td class="lt1 borderb1" align=left>'; $sx .= $link . $line['ed_titulo'] . '</A>'; $sx .= '</td>'; $link = base_url('index.php/csf/ver_pais/' . $line['id'] . '/' . checkpost_link($line['id'])); $link = '<A HREF="' . $link . '" class="lt2 link">'; $sx .= '<td class="lt1 borderb1" align=left>'; $sx .= $link . $line['nome'] . '</A>'; $sx .= '</td>'; $link = base_url('index.php/csf/ver_universidade/' . $line['id_gpip'] . '/' . checkpost_link($line['id_gpip'])); $link = '<A HREF="' . $link . '" class="lt2 link">'; $sx .= '<td class="lt1 borderb1" align=left>'; $sx .= $link . $line['gpip_nome'] . '</A>'; $sx .= '</td>'; } $sx .= '<tr class="lt1"> <td class="bold">Total ' . $tot . ' estudantes.</td> </tr>'; $sx .= '</table>'; return $sx; }
function form_botton_new($url, $txt = 'Novo registro') { $link = '<A HREF="' . $url . '/edit/0/' . checkpost_link('0') . '">'; $sx = $link . '<span class="botton_new">' . $txt . '</span>' . '</A>'; return $sx; }