Browse Source

export sqlite

master
BARRAUX Arthur 3 years ago
parent
commit
efa1c54864
  1. 4
      referant/admin.php
  2. 1
      referant/cible/export.php
  3. 5
      referant/export.php
  4. 8
      referant/index.php
  5. 6
      referant/liste.php
  6. 8
      referant/search.php

4
referant/admin.php

@ -23,8 +23,8 @@
</thead> </thead>
<tbody> <tbody>
<tr class='table__title'> <tr class='table__title'>
<td>Login</td> <td>Identifiant</td>
<td>Password</td> <td>Mot de passe</td>
</tr> </tr>
<?php <?php
foreach ($arr as $key => $value) { foreach ($arr as $key => $value) {

1
referant/cible/export.php

@ -1,5 +1,4 @@
<?php <?php
$bdd = new SQLite3('../../database/ticket_panne.db', SQLITE3_OPEN_READWRITE); $bdd = new SQLite3('../../database/ticket_panne.db', SQLITE3_OPEN_READWRITE);
$res = $bdd->query('SELECT * FROM ' .$_POST['bdd']); $res = $bdd->query('SELECT * FROM ' .$_POST['bdd']);
$title = array_keys($res->fetchArray(SQLITE3_ASSOC)); $title = array_keys($res->fetchArray(SQLITE3_ASSOC));

5
referant/export.php

@ -14,10 +14,11 @@ include '../sessions/session_restraintes.php';
<div class="container-field"> <div class="container-field">
<p>Type:</p> <p>Type:</p>
<select class="container-field__field" name="type"> <select class="container-field__field" name="type">
<option value="csv">CSV</option> <option value="csv" onclick="document.getElementById('base-choice').style.display = 'block'; document.getElementById('form').setAttribute('action','cible/export.php');">CSV</option>
<option value="sqlite" onclick="document.getElementById('base-choice').style.display = 'none'; document.getElementById('form').setAttribute('action','../database/ticket_panne.db');">SQLite</option>
</select> </select>
</div> </div>
<div class="container-field"> <div id="base-choice" class="container-field">
<p>Base:</p> <p>Base:</p>
<select class="container-field__field" name="bdd"> <select class="container-field__field" name="bdd">
<option value="pannes">pannes</option> <option value="pannes">pannes</option>

8
referant/index.php

@ -16,20 +16,20 @@ include '../sessions/session_restraintes.php';
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
<th colspan="14">Ticket récents non traités</th> <th colspan="15">Ticket récents non traités</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr class="table__title"> <tr class="table__title">
<td>ID</td> <td>ID</td>
<td>date</td> <td>date</td>
<td>details</td> <td>détails</td>
<td>lieu</td> <td>lieu</td>
<td>salle</td> <td>salle</td>
<td>pos</td> <td>pos</td>
<td>materiel</td> <td>matériel</td>
<td>marque</td> <td>marque</td>
<td>model</td> <td>modèle</td>
<td>nserie</td> <td>nserie</td>
<td>demandeur</td> <td>demandeur</td>
<td>traitement</td> <td>traitement</td>

6
referant/liste.php

@ -23,13 +23,13 @@ include '../sessions/session_restraintes.php';
<tr class='table__title'> <tr class='table__title'>
<td>ID</td> <td>ID</td>
<td>date</td> <td>date</td>
<td>details</td> <td>détails</td>
<td>lieu</td> <td>lieu</td>
<td>salle</td> <td>salle</td>
<td>pos</td> <td>pos</td>
<td>materiel</td> <td>matériel</td>
<td>marque</td> <td>marque</td>
<td>model</td> <td>modèle</td>
<td>nserie</td> <td>nserie</td>
<td>demandeur</td> <td>demandeur</td>
<td>traitement</td> <td>traitement</td>

8
referant/search.php

@ -35,7 +35,7 @@ include '../sessions/session_restraintes.php';
<input class="container-field__field" type="input" name="value"> <input class="container-field__field" type="input" name="value">
</div> </div>
<div class="container-field"> <div class="container-field">
<input class="container-field__field container-field__field--submit" type="submit"> <input class="container-field__field container-field__field--submit" type="submit" value="Rechercher">
</div> </div>
@ -50,13 +50,13 @@ include '../sessions/session_restraintes.php';
<tr class='table__title'> <tr class='table__title'>
<td>ID</td> <td>ID</td>
<td>date</td> <td>date</td>
<td>details</td> <td>détails</td>
<td>lieu</td> <td>lieu</td>
<td>salle</td> <td>salle</td>
<td>pos</td> <td>pos</td>
<td>materiel</td> <td>matériel</td>
<td>marque</td> <td>marque</td>
<td>model</td> <td>modèle</td>
<td>nserie</td> <td>nserie</td>
<td>demandeur</td> <td>demandeur</td>
<td>traitement</td> <td>traitement</td>

Loading…
Cancel
Save