Exemplo n.º 1
0
	                            <div class="col-sm-6">
	                                <select id="cbtipo" class="form-control">
	                                    <option></option>
	                                    <option value="1">Levantamento na Loja</option>
	                                    <option value="2">Reparação na casa do cliente</option>
	                                </select>                            
	                            </div>
	                        </div>
	                        <!-- combobox dos reparadores -->
	                        <div class="form-group">
	                            <label class="col-sm-2 control-label" for="textinput" >Reparador</label>
	                            <div class="col-sm-6">
	                                <select id="cbsearchreparador" class="form-control">
	                                    <option></option>
	                                    <?php 
$table = reparadorGetByFiltro("rep_enable = 1", "rep_name");
while ($data = mysql_fetch_array($table)) {
    ?>
	                                        <option value="<?php 
    echo $data['rep_id'];
    ?>
"><?php 
    echo $data['rep_name'];
    ?>
</option>
	                                        <?php 
}
?>
	                                </select>                            
	                            </div>
	                        </div>
Exemplo n.º 2
0
    case "rep_name":
        $where .= $_POST['campo'] . " LIKE " . dbString("%" . $_POST['valor'] . "%");
        break;
    case "rep_telefone":
        if (is_numeric($_POST['valor']) && strlen($_POST['valor']) > 8) {
            $where .= "rep_telefone1 = " . dbInteger($_POST['valor']) . " OR  rep_telefone2 = " . dbInteger($_POST['valor']);
        } else {
            $where .= "rep_telefone1 = 999999999";
        }
        break;
    case "rep_id":
        $where .= $_POST['campo'] . " = " . dbInteger($_POST['valor']);
        break;
}
$where .= " AND rep_enable = 1";
$table = reparadorGetByFiltro($where, "rep_id");
?>
<table class="table table-striped table-hover">
    <thead>  
          <tr>  
            <th>Nº</th>  
            <th>Nome</th> 
            <th>Email</th> 
            <th>Email2</th>
            <th>Contacto</th>
            <th>Nome</th>
            <th>Contacto 2</th>
            <th>Nome 2</th>
          </tr>  
    </thead>
    <tbody>