Exemplo n.º 1
0
//echo '<tr><td>'.$req.'</td></tr>';
$reponse = $db->query($req);
$rep = $reponse->fetchAll();
if (count($rep) == 0) {
    echo '<tr><td><span class="glyphicon glyphicon-warning-sign"></span> Aucun résultat</td></td>';
} else {
    foreach ($rep as $data) {
        $id = $data["ID"];
        $ref_client = $data["REF_CLIENT"];
        $type_client = abbrToFull($data["TYPE_CLIENT"]);
        $type_inter = abbrToFull($data["TYPE_INTER"]);
        $date_livraison = $data["DATE_LIVRAISON"];
        $facturation = $data["FACTURATION"];
        $n_bc = $data["N_BC"];
        $priorite = $data["PRIORITE"];
        $avancement = abbrToFull($data["AVANCEMENT"]);
        $date_format = date("D d/m/Y", strtotime($date_livraison));
        if ($priorite == 0) {
            $tr = '<td class="success">';
        } else {
            if ($priorite == 1) {
                $tr = '<td class="warning">';
            } else {
                if ($priorite == 2) {
                    $tr = '<td class="danger">';
                }
            }
        }
        echo '<tr class="clickable-row" data-href="./showTicket.php?id=' . $id . '"><td>' . $id . '</td><td>' . $ref_client . ' (' . $type_client . ')</td><td>' . $date_format . '</td><td>' . $type_inter . '</td><td>' . $avancement . '</td><td>' . $n_bc . '</td>' . $tr . '&nbsp;&nbsp;</td></tr>';
    }
}
Exemplo n.º 2
0
?>
</option>
                    <option value="ap"><?php 
echo abbrToFull('ap');
?>
</option>
                    <option value="arf"><?php 
echo abbrToFull('arf');
?>
</option>
                    <option value="te"><?php 
echo abbrToFull('te');
?>
</option>
                    <option value="tl"><?php 
echo abbrToFull('tl');
?>
</option>
                  </select>
                </div>
                <div class="row">
                  <br />
                    <button type="submit" class="btn btn-success"><span class="glyphicon glyphicon-plus"></span> Ajouter</button>
                  </div>
                </div>
              </div>
            </div>
            </form>
          </div>
        </div>
  </div>
Exemplo n.º 3
0
         $req->execute(array('description' => $_POST['mat_desc_' . $i], 'n_ticket' => $lastID, 'type' => $_POST['mat_type_' . $i], 'mdp' => $_POST['mat_mdp_' . $i], 'periph' => $periph));
     }
 }
 if ($_POST["typeinter"] == 'sav') {
     $req = $db->prepare('INSERT INTO sav(N_TICKET, MARQUE, MODELE, N_SERIE) VALUES(:n_ticket, :marque, :modele, :n_serie)');
     $req->execute(array('n_ticket' => $lastID, 'marque' => $_POST['marque'], 'modele' => $_POST['modele'], 'n_serie' => $_POST['noserie']));
     $destinataire = '*****@*****.**';
     $expediteur = '*****@*****.**';
     $objet = "[" . $_POST['ref_client'] . "] " . $_POST['marque'] . ' ' . $_POST['modele'] . ' ' . $_POST['noserie'];
     $message = "<h1>Retour SAV pour " . $_POST['ref_client'] . "</h1>";
     $message .= "[R&eacute;f&eacute;rence client : " . $_POST['ref_client'] . "]<br /><u>Marque :</u> " . $_POST['marque'] . '<br /><u>Mod&egrave;le :</u> ' . $_POST['modele'] . '<br /><u>N s&eacute;rie :</u> ' . $_POST['noserie'];
     $message .= "<br /><br /><u>Description du ticket :</u> <br />" . $_POST['description'];
     $message .= "<br /><u>Date de livraison :</u> " . $_POST['datepicker'] . "<br />";
     if ($nb > 0) {
         for ($i = 1; $i <= $nb; $i++) {
             $message .= "<br /><u>Mat{$eacute};riel " . $i . " :</u> " . abbrToFull($_POST['mat_type_' . $i]) . " (" . $_POST['mat_desc_' . $i] . ")";
         }
     }
     $message .= "<br /><br />Cordialement,<br />Louis Dupont<br />D&eacute;veloppeur web super comp&eacute;tent";
     $headers = 'MIME-Version: 1.0' . "\n";
     // Version MIME
     $headers .= 'Content-type: text/html; charset=ISO-8859-1' . "\n";
     $headers .= 'Reply-To: ' . $expediteur . "\n";
     // Mail de reponse
     $headers .= 'From: "ITECH gestion SAV"<' . $expediteur . '>' . "\n";
     // Expediteur
     $headers .= 'Delivered-to: ' . $destinataire . "\n";
     // Destinataire
     mail($destinataire, $objet, $message, $headers);
 }
 if ($_POST['mailrappel'] = 'mail') {
Exemplo n.º 4
0
                  <option value="sav" <?php 
if ($type_inter == 'sav') {
    echo 'selected';
}
?>
><?php 
echo abbrToFull('sav');
?>
</option>
                  <option value="site" <?php 
if ($type_inter == 'site') {
    echo 'selected';
}
?>
><?php 
echo abbrToFull('site');
?>
</option>
                </select>
              </div>
              <label for="facturation" class="control-label col-md-2">Facturation :</label>
              <div class="col-md-4">
                <select id="facturation" title="Facturation" class="form-control" name="facturation" required>
                  <option value="fac" <?php 
if ($facturation == '1') {
    echo 'selected';
}
?>
>À facturer</option>
                  <option value="gar" <?php 
if ($facturation == '0') {
Exemplo n.º 5
0
    if ($data["PRIORITE"] == 0) {
        $class = "alert alert-success";
    } else {
        if ($data["PRIORITE"] == 1) {
            $class = "alert alert-warning";
        } else {
            $class = "alert alert-danger";
        }
    }
    $datelivraison = new DateTime($data["DATE_LIVRAISON"]);
    if ($datelivraison > $today) {
        $days = $datelivraison->diff($today)->format('%d jour(s) restant(s)');
    } else {
        $days = $datelivraison->diff($today)->format('Dépassé de %r%a jour(s)');
    }
    echo '<tr class="clickable-row" data-href="../showTicket.php?id=' . $data["ID"] . '" ><td><strong>' . abbrToFull($data["AVANCEMENT"]) . ' : ' . abbrToFull($data["TYPE_INTER"]) . ' pour ' . $data["REF_CLIENT"] . '.</strong> ' . $days . '.</td><td class="' . $class . '">&nbsp;</td></tr>';
    if (++$count >= $max_row) {
        break;
    }
}
if ($nbrow > $max_row) {
    echo '<tr><td>Encore <span class="badge">' . ($nbrow - $max_row) . '</span> autre(s) ticket(s)</td></tr>';
}
?>

</table>
<script>
  jQuery(document).ready(function($) {
      $(".clickable-row").click(function() {
          window.document.location = $(this).data("href");
Exemplo n.º 6
0
while ($data = $requete->fetch()) {
    if ($data["PRIORITE"] == 0) {
        $class = "alert alert-success";
    } else {
        if ($data["PRIORITE"] == 1) {
            $class = "alert alert-warning";
        } else {
            $class = "alert alert-danger";
        }
    }
    $datelivraison = new DateTime($data["DATE_LIVRAISON"]);
    if ($datelivraison > $today) {
        $days = $datelivraison->diff($today)->format('%d jour(s) restant(s)');
    } else {
        $days = $datelivraison->diff($today)->format('Dépassé de %r%a jour(s)');
    }
    echo '<a class="alert-link" href="showTicket.php?id=' . $data['ID'] . '" ><div class="' . $class . '">
          <strong>' . abbrToFull($data["AVANCEMENT"]) . ' : ' . abbrToFull($data["TYPE_INTER"]) . ' pour ' . $data["REF_CLIENT"] . '.</strong> ' . $days . '.</div></a>';
    if (++$count >= $max_row) {
        break;
    }
}
if ($nbrow > $max_row) {
    echo '<a class="btn btn-default" href="allTickets.php">Tickets suivants <span class="badge">' . ($nbrow - $max_row) . '</span></a>';
}
?>

</div>
</div>