function verificacao($parametro, $valor, $tipo2, $tipo3) {
if ($parametro == '1') {
if ($valor == '1') {
return "Sim";
} else {
return "";
}
}
if ($parametro == '2') {
if (($valor != '') && ($valor != '0')) {
if ($parametro == '2' && $tipo2 == '3' && $tipo3 == '64' || $tipo3 == '65' || $tipo3 == '66' || $tipo3 == '67' || $tipo3 == '68' || $tipo3 == '69' || $tipo3 == '70' || $tipo3 == '71' || $tipo3 == '72' ){
return $valor."m?";
}else{
return $valor;
}
} else {
return "";
}
}
} //end function
$sql_tot_reg = "SELECT * FROM tcamposdetalhes ORDER BY CamCodigo ASC, CamCodigo2 ASC";
$mysqli_tot_reg = mysqli_query($conecta, $sql_tot_reg);
$cont = 0;
while ($rstemp_tot_reg = mysqli_fetch_array($mysqli_tot_reg)) {
$valor_ = $rstemp_imovel[$rstemp_tot_reg["CamVariavel"]];
$parametro = $rstemp_tot_reg["CamTipo"];
$tipo2 = $rstemp_det["CamTipo2"];
$tipo3 = $rstemp_det["CamCodigoPrimario"];
if (verificacao($parametro, $valor_, $tipo2, $tipo3)!='') {
$cont = $cont + 1;
}
} //end while
$totreg = $cont;
$totcoluna = $totreg/3+1;
?>