PABX da Simples IP
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

66 lines
3.0 KiB

<?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
function GetDetalhes($query, $codItem) {
global $params;
$janW = 500;
$janH = 150;
$result = pg_query($query);
$imgInc = "<img id=\"incClass\" src=\"imgSite/novoUser.png\" width=\"16\" height=\"16\" border=\"0\" title=\"Inclui nova classificação\">";
$linhaDados = "";
$totalItem = 0;
$codDetalhe = 0;
While ($row = pg_fetch_array($result)) {
$codigo = $row["id"];
$descricao = $row["desc"];
$imgYes = "<img src=\"imgSite/stAprovado.png\" width=\"12\" height=\"12\ border=\"0\">";
$imgNo = "<img src=\"imgSite/no.gif\" width=\"12\" height=\"12\ border=\"0\">";
$imgAlt = "<img src=\"imgSite/editaUser.png\" width=\"16\" height=\"16\" border=\"0\" title=\"Edita o registro corrente!\">";
//$imgDel = "<img src=\"imgSite/deletaUser.png\" width=\"16\" height=\"16\" border=\"0\" title=\"Apaga o registro corrente!\">";
$status = $row["status"] ? $imgYes : $imgNo;
$imgAlt = "<a href=\"javaScript:NovaJanela('index.php?idProg=31&clit_id=$codigo', 'clasCad', '$janW', '$janH', 'resizable=NO,scrollbars=NO');\">$imgAlt</a>";
$imgDel = GetLinkFormDelete($codigo . '|' . $params, 'DeletaClassificacaoItem');
$clas = "";
$idLn = "";
$sel = "<input $clas name=\"btSel_$codigo\" type=\"button\" id=\"btSel_$codigo\" value=\"Detalhes\" onClick=\"ListaItensClassifica('$codigo', '$descricao' )\">";
$linhaDados .= "<tr>";
$linhaDados .= "<td width=\"50\" align=\"center\" class=\"headData\">$codigo</td>
<td align=\"left\" class=\"headData\">$descricao</td>
<td width=\"20\" align=\"center\" class=\"headData\">$status</td>
<td width=\"20\" align=\"center\" class=\"headData\">$imgAlt</td>
<td width=\"20\" align=\"center\" class=\"headData\">$imgDel</td>";
$linhaDados .= "</tr>";
$totalItem++;
}
return $linhaDados;
}
function GetHtmlDetalhe($linhas, $itemNovo = 'Novo Item') {
return "<table style=\"border: 0\" cellpadding=\"2\" width=\"100%\" class=\"grid\">
<tr >
<td style=\"border: 0\" colspan=\"6\" align=\"right\">$itemNovo</td>
</tr>
<tr>
<th colspan=\"6\" align=\"center\"> Itens de Atendimento <span id=\"lbTitle\"></span></th>
</tr>
<tr>
<th width=\"50\" align=\"center\" class=\"headColun\">C&oacute;digo</th>
<th align=\"left\" class=\"headColun\">Descri&ccedil;&atilde;o</th>
<th width=\"20\" align=\"center\" class=\"headColun\">Status</th>
<th align=\"center\" colspan=\"3\" class=\"headColun\">Opera&ccedil;&otilde;es</th>
</tr>
$linhas
</table>";
}
?>