示例#1
0
</td>                                
                                    <td><?php 
            echo 'R$ ' . Utilitarios::formatarMoeda($conta['saldo']);
            ?>
</td>                   
                                </tr>                                
                            <?php 
        }
        ?>
                                <tr>
                                    <td colspan="2"></td>                                    
                                </tr>
                                <tr>
                                    <td></td>                                
                                    <td><?php 
        echo 'R$ ' . Utilitarios::formatarMoeda($total);
        ?>
</td> 
                                </tr>
                            <?php 
    } else {
        ?>
                            
                                <tr>
                                    <td colspan="3" align="center">Nenhuma conta cadastrada</td>
                                </tr>
                            
                            <?php 
    }
    ?>
                        </tbody> 
示例#2
0
                                                    <div class="form-group">
                                                        <label for="exibirMapa" class="col-xs-12 col-sm-3 control-label no-padding-right" style="font-weight: bold;">Exibir mapa:</label>
                                                        <div class="col-xs-12 col-sm-5">
                                                            <select id="exibirMapa" class="width-100" name="exibirMapa">
                                                                <option value="S">Sim</option>
                                                                <option value="N">Não</option>                                                                
                                                            </select>
                                                        </div>
                                                    </div>

                                                    <div class="form-group">
                                                        <label for="valor" class="col-xs-12 col-sm-3 control-label no-padding-right" style="font-weight: bold;">Valor R$:</label>
                                                        <div class="col-xs-12 col-sm-5">
                                                            <input type="text" id="valor" class="obrigatorio width-100 decimal" name="valor" title="Valor" value="<?php 
    echo Utilitarios::formatarMoeda($anuncio->getValor());
    ?>
" placeholder="Informe o valor do anúncio" onkeypress="return(MascaraMoeda(this,'.',',',event))"/>
                                                            
                                                            <div class="help-block col-xs-12 col-sm-reset inline">
                                                                <?php 
    echo Utilitarios::msgAviso('<strong>ATENÇÃO:</strong> Se você deixar o campo valor vazio ou zerado, aparecerá <strong><i>"Valor sob consulta"</i></strong> no seu anúncio.');
    ?>
                                                            </div>
                                                            <!--<div class="help-block col-xs-12 col-sm-reset inline">*Se o valor for igual a 0 (zero), aparecerá <strong>"Valor sob consulta"</strong> no anúncio.</div>-->
                                                            <!--<span style="font-weight: bold; color: red;"></span>-->

                                                        </div>
                                                        
                                                    </div>
                                                    
<?php

$status = 'ERRO';
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    try {
        include_once '../../../config.php';
        $sol = new ImovelSolicitado(Conf::pegCnxPadrao());
        $sol->setDados($_POST);
        $sol->setUf($_POST['uf_']);
        $sol->setCidade($_POST['cidade_']);
        $sol->setBairro($_POST['bairro_']);
        $sol->setFinalidade($_POST['finalidade_']);
        $sol->setValorMax(Utilitarios::formatarMoeda($_POST['valorMax']));
        $sol->setValorMin(Utilitarios::formatarMoeda($_POST['valorMin']));
        $status = $sol->_salvar() ? 'OK' : 'ERRO';
    } catch (PDOException $e) {
        $status = 'ERRO: ' . $e;
    }
}
echo json_encode(array('status' => $status));