示例#1
0
function index()
{
    modTitle('Planit | Recheche');
    if (!isCO()) {
        setAlert('Veuillez vous connecter pour faire une recherche', 'warning');
    }
    loadModel('villes');
    $k['villes'] = getAllVille();
    set($k);
    if (!empty($_POST)) {
        $ok = 0;
        foreach ($_POST as $post) {
            if (!empty($post)) {
                $ok = 1;
                break;
            }
        }
        if ($ok) {
            loadModel('recherche');
            $v['result'] = search_result($_POST);
            if (empty($v['result'])) {
                setAlert('Aucun resultat trouve', 'warning');
            }
            set($v);
        } else {
            setAlert('Remplir au moins un champs', 'danger');
        }
    }
    render();
}
示例#2
0
文件: index.php 项目: kasuke5/planit
<?php

if (isCO()) {
    ?>
      <!-- afarkas.github.io/webshim/demos/index.html q-->
        <script src="//cdn.jsdelivr.net/webshim/1.14.5/polyfiller.js"></script>
        <script>
            webshims.setOptions('forms-ext', {types: 'date'});
            webshims.polyfill('forms forms-ext');
        </script>

<form class="form-horizontal" name="rechercher" method="post">
  <fieldset>
    <legend>Faire une recherche</legend>
      <div class="form-group">
        <label for="num_vols" class="col-sm-2 control-label">N° de vol :</label>
        <div class="col-sm-5">
        <input type="text" id="num_vols" name="num_vols" value="" placeholder="N° de vol ..."  class="form-control"/>
        </div>
      </div>
        <div class="form-group">
        <label for="provenance" class="col-sm-2 control-label">Provenance :</label>
        <div class="col-sm-5">
        <select id="provenance" name="provenance" value=""  class="form-control chosen-select">
          <option></option> 
        <?php 
    foreach ($villes as $ville) {
        ?>
          <option value="<?php 
        echo $ville['id'];
        ?>