function comment_display() { $sql = "select * from " . $this->tabela . " "; $sql .= " left join usuario on cepc_user = us_codigo "; $sql .= " where cepc_codigo = '" . $this->codigo . "' "; $sql .= " order by cepc_data desc, cepc_hora desc "; $rlt = db_query($sql); $totc = 0; $sx .= '<table class="bdcomment" width="100%" aling="center">'; $sx .= '<TR class="bdcomment_hd"><TD colspan=2 class="lt4">' . msg('comments'); while ($line = db_read($rlt)) { $totc++; $she = trim($line['us_genero']); $sx .= '<TR valign="top">'; $sx .= '<TD width=50 rowspan=2>'; if ($she != 'W') { $sx .= '<img src="img/icone_noimage_he.png" height=80 >'; } else { $sx .= '<img src="img/icone_noimage_she.png" height=80 >'; } $sx .= '<TD>'; $sx .= '<B><I>' . $line['us_nome'] . '</B></I><BR>'; $sx .= '<font class="lt1">'; $sx .= $line['cepc_comment']; $sx .= '<TR valign="bottom"><TD>'; $ava = $line['cepc_avaliation']; /* if ($ava == '1') { $sx .= '<img src="img/icone_coment_ok.png">'; } */ /* if ($ava == '0') { $sx .= '<img src="img/icone_coment_nook.png">'; } */ $sx .= '<font class="lt0"> ' . stodate($line['cepc_data']) . ' ' . $line['cepc_hora']; $sx .= '<TR><TD style="background-color: #FFFFFF" colspan=2>'; } $sx .= $this->comment_form(); $sx .= '</table>'; return $sx; }
function protocolos_avaliacao($sta, $tipo = '') { global $ss; $us = strzero(round($ss->user_id), 7); if (strlen($tipo) > 0) { $wh = " and (cep_tipo = '{$tipo}' )"; } else { $wh = ''; } if ($sta == 'Z') { $sql = "select * from " . $this->tabela . " \n\t\t\t\t\t inner join cep_dictamen on pp_protocolo = cep_protocol \n\t\t\t\t\t where \n\t\t\t\t\t (cep_status = '@' or cep_status = 'A' or cep_status = 'B' or cep_status = 'C' or cep_status = 'D')\n\t\t\t\t\t and pp_avaliador = '{$us}' \n\t\t\t\t\t and (pp_status <> 'B' and pp_status <> 'X')\n\t\t\t\t\t {$wh}\n\t\t\t\t\t order by cep_reuniao "; } else { $sql = "select * from " . $this->tabela . " \n\t\t\t\t\t left join usuario on us_codigo = cep_pesquisador\n\t\t\t\t\t where cep_status = '{$sta}' \n\t\t\t\t\t {$wh}\n\t\t\t\t\t order by cep_reuniao \n\t\t\t\t\t "; } $rlt = db_query($sql); $dta = 19000101; $tot = 0; while ($line = db_read($rlt)) { $tot++; $data = $line['cep_reuniao']; if ($data != $dta) { $sx .= '<TR><TD colspan=4 align="center" class="lt2"><center>' . msg('meet_data') . ' ' . stodate($data); $dta = $data; } $sx .= $this->mostra($line); } $sa = '<table width=96% class="table_normal" border=0>'; $sa .= '<TR><TH>' . msg('protocol'); $sa .= '<TH>' . msg('project_title'); $sa .= '<TH>' . msg('status'); $sa .= $sx; $sa .= '<TR><TD colspan=5>' . msg('found') . ' ' . $tot . ' ' . msg('records'); $sa .= '</table>'; if ($tot == 0) { $sa = ''; } return $sa; }