BARRAUX Arthur 3 years ago
parent
commit
67f2972ba1
  1. 5
      README.md
  2. 5
      css/style.css
  3. 2
      css/style.css.map
  4. BIN
      database/ticket_panne.db
  5. 2
      prof/include/champ.php
  6. 6
      prof/index.php
  7. 1
      referant/cible/delete.php
  8. 5
      referant/cible/export.php
  9. 2
      referant/js/edit.js
  10. 5
      sass/main.scss

5
README.md

@ -1,5 +1,8 @@
# Site de tiquet de panne # Site de tiquet de panne
Le mdp référant est: **3.1415926535**
Le mdp prof est: **1NSI**
C'est un site permettant de créer et gérer des tiquets de panne. Il est composé de **deux parties**: C'est un site permettant de créer et gérer des tiquets de panne. Il est composé de **deux parties**:
- Une partie *formulaire*, accessible à **tous**. - Une partie *formulaire*, accessible à **tous**.
- Une partie *gestion*, accessible seulement des référants. - Une partie *gestion*, accessible seulement des référants.
@ -16,5 +19,3 @@ Cette partie est composée de 5 onglets:
- liste - liste
- admin - admin
- export - export

5
css/style.css

@ -95,8 +95,7 @@ form {
position: relative; position: relative;
float: right; float: right;
width: 20px; width: 20px;
bottom: 20px; top: 12px;
right: 20px;
} }
.container-field__field { .container-field__field {
background-color: inherit; background-color: inherit;
@ -134,7 +133,7 @@ form {
} }
.hint__int { .hint__int {
position: relative; position: relative;
left: 35%; left: 25%;
} }
.hint__help { .hint__help {
display: none; display: none;

2
css/style.css.map

@ -1 +1 @@
{"version":3,"sourceRoot":"","sources":["../sass/main.scss"],"names":[],"mappings":"AAMA;EACI;EACA;;AAGJ;EACI;EACA;EACA,kBAbS;EAcT;EACA;;AACA;EACI;EACA;EACA;EACA;;AAEJ;EACI;;AAEJ;EACI;EACA;EACA;;AAEJ;EACI;EACA,OA9BE;EA+BF;EACA;;;AAOR;EACI;EACA;EACA;EACA,kBA9CQ;EA+CR;;AACA;EACI;EACA;EACA;;AACA;EACI;EACA;EACA;;AAGR;EACI;EACA;EACA;EACA;EACA;EACA;;AACA;EACI,kBAhEG;EAiEH;EACA;;AAEJ;EACI;EACA;EACA;EACA;EACA;EACA;;AACA;EACI;;;AAUhB;EACI;EACA;EAEA;EACA;EAEA;EACA;EACA;EACA;;;AAGJ;EACI;;AACA;EACI;EACA;;AAEJ;EACI;EACA;EACA;EACA;EACA;EACA;;AAEJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACI;EACA,cAnIF;EAoIE;;AAEJ;EACI;EACA;EACA;;;AASZ;EACI;EACA;EACA;;AACA;EACI;EACA;;AAEJ;EAII;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,kBAzKK;EA0KL;;AAbA;EACI;;AAaJ;EACI;EACA;;AAEJ;EACI;EACA;;AAEJ;EACI;EACA;EACA;EACA;EACA;;;AAWZ;EACI;EACA;EACA;EACA;EACA,kBAzMQ;EA0MR;EACA;;AACA;EACI;;AAEJ;EACI,kBA/MK;EAiNL;EACA;EACA;EACA;EAEA;EACA;EACA,OAzNI;;AA0NJ;EACI;EACA;;AAEJ;EACI;EACA;EACA;EACA;EACA,OAnOA;EAoOA;;AACA;EACI;;AAEJ;EACI;EACA;;AAIZ;EACI,OA5OE;EA6OF;EACA;;AAEJ;EACI;EACA;EACA;EACA;;AACA;EACI;EACA;EACA;;AACA;EACI;;AAEJ;EACI;;AAEJ;EACI;;AAGR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAOhB;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACI;EACA;;AAEJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACI;EACA;;AAEJ;EACI;EACA;;AAEJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACI;;;AAOhB;EACI;EACA,kBAtVS;EAuVT;EACA;EACA;;AACA;EACI,OA3VK;EA4VL,kBA1VE;;AA4VN;EACI;EACA;EACA;EACA;EACA,OApWI;;AAsWR;EACI,OApWE;EAqWF;EACA;EACA;EACA","file":"style.css"} {"version":3,"sourceRoot":"","sources":["../sass/main.scss"],"names":[],"mappings":"AAMA;EACI;EACA;;AAGJ;EACI;EACA;EACA,kBAbS;EAcT;EACA;;AACA;EACI;EACA;EACA;EACA;;AAEJ;EACI;;AAEJ;EACI;EACA;EACA;;AAEJ;EACI;EACA,OA9BE;EA+BF;EACA;;;AAOR;EACI;EACA;EACA;EACA,kBA9CQ;EA+CR;;AACA;EACI;EACA;EACA;;AACA;EACI;EACA;EACA;;AAGR;EACI;EACA;EACA;EACA;EACA;EACA;;AACA;EACI,kBAhEG;EAiEH;EACA;;AAEJ;EACI;EACA;EACA;EACA;EACA;EACA;;AACA;EACI;;;AAUhB;EACI;EACA;EAEA;EACA;EAEA;EACA;EACA;EACA;;;AAGJ;EACI;;AACA;EACI;EACA;;AAEJ;EACI;EACA;EACA;EACA;EACA;;AAEJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACI;EACA,cAlIF;EAmIE;;AAEJ;EACI;EACA;EACA;;;AASZ;EACI;EACA;EACA;;AACA;EACI;EACA;;AAEJ;EAII;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,kBAxKK;EAyKL;;AAbA;EACI;;AAaJ;EACI;EACA;;AAEJ;EACI;EACA;;AAEJ;EACI;EACA;EACA;EACA;EACA;;;AAWZ;EACI;EACA;EACA;EACA;EACA,kBAxMQ;EAyMR;EACA;;AACA;EACI;;AAEJ;EACI,kBA9MK;EAgNL;EACA;EACA;EACA;EAEA;EACA;EACA,OAxNI;;AAyNJ;EACI;EACA;;AAEJ;EACI;EACA;EACA;EACA;EACA,OAlOA;EAmOA;;AACA;EACI;;AAEJ;EACI;EACA;;AAIZ;EACI,OA3OE;EA4OF;EACA;;AAEJ;EACI;EACA;EACA;EACA;;AACA;EACI;EACA;EACA;;AACA;EACI;;AAEJ;EACI;;AAEJ;EACI;;AAGR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAOhB;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACI;EACA;;AAEJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACI;EACA;;AAEJ;EACI;EACA;;AAEJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACI;;;AAOhB;EACI;EACA,kBArVS;EAsVT;EACA;EACA;;AACA;EACI,OA1VK;EA2VL,kBAzVE;;AA2VN;EACI;EACA;EACA;EACA;EACA,OAnWI;;AAqWR;EACI,OAnWE;EAoWF;EACA;EACA;EACA","file":"style.css"}

BIN
database/ticket_panne.db

Binary file not shown.

2
prof/include/champ.php

@ -1,7 +1,7 @@
<?php <?php
echo '<p> ',$titre,' : </p> echo '<p> ',$titre,' : </p>
<input class="container-field__field" type=',$type,' name=',$sql_name,'><br>
<img class="container-field__img container-field__img--check" src="../img/check.png" alt="check"> <img class="container-field__img container-field__img--check" src="../img/check.png" alt="check">
<img class="container-field__img container-field__img--excla" src="../img/excla.png" alt="exclamation"> <img class="container-field__img container-field__img--excla" src="../img/excla.png" alt="exclamation">
<input class="container-field__field" type=',$type,' name=',$sql_name,'><br>
<small>',$error,'</small>'; <small>',$error,'</small>';
?> ?>

6
prof/index.php

@ -33,9 +33,9 @@ include '../sessions/session.php';
</div> </div>
<div class="container-field"> <div class="container-field">
<p>Détails :</p> <p>Détails :</p>
<textarea class="container-field__field" rows="10" cols="30" name='details'></textarea><br>
<img class="container-field__img container-field__img--check" src="../img/check.png" alt="check"> <img class="container-field__img container-field__img--check" src="../img/check.png" alt="check">
<img class="container-field__img container-field__img--excla" src="../img/excla.png" alt="exclamation"> <img class="container-field__img container-field__img--excla" src="../img/excla.png" alt="exclamation">
<textarea class="container-field__field" rows="10" cols="30" name='details'></textarea><br>
<small>Error: Veuillez remplir ce champ</small> <small>Error: Veuillez remplir ce champ</small>
</div> </div>
<div class="container-field"> <div class="container-field">
@ -89,6 +89,8 @@ include '../sessions/session.php';
</div> </div>
<div class="container-field"> <div class="container-field">
<p>Matériel :</p> <p>Matériel :</p>
<img class="container-field__img container-field__img--check" src="../img/check.png" alt="check">
<img class="container-field__img container-field__img--excla" src="../img/excla.png" alt="exclamation">
<select class="container-field__field" name='materiel'> <select class="container-field__field" name='materiel'>
<option value="UC">Unité Centrale</option> <option value="UC">Unité Centrale</option>
<option value="IMP">Imprimante</option> <option value="IMP">Imprimante</option>
@ -96,8 +98,6 @@ include '../sessions/session.php';
<option value="VID">Vidéo Projecteur</option> <option value="VID">Vidéo Projecteur</option>
<option value="TBI">Tableau Blanc Interactif</option> <option value="TBI">Tableau Blanc Interactif</option>
</select> </select>
<img class="container-field__img container-field__img--check" src="../img/check.png" alt="check">
<img class="container-field__img container-field__img--excla" src="../img/excla.png" alt="exclamation">
<small>test</small> <small>test</small>
</div> </div>
<div class="container-field"> <div class="container-field">

1
referant/cible/delete.php

@ -4,5 +4,4 @@ $bdd = new SQLite3('../../database/ticket_panne.db', SQLITE3_OPEN_READWRITE);
$request = $bdd->prepare('DELETE FROM pannes WHERE ID=:id'); $request = $bdd->prepare('DELETE FROM pannes WHERE ID=:id');
$request->bindValue(':id', $_POST['id']); $request->bindValue(':id', $_POST['id']);
$request->execute(); $request->execute();
echo "Ticket supprimé veuillez actualiser la page";
?> ?>

5
referant/cible/export.php

@ -1,11 +1,14 @@
<?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));
header('Content-Type: text/csv; charset=utf-8'); header('Content-Type: text/csv; charset=utf-8');
header('Content-Disposition: attachment; filename=' .$_POST['bdd'] .'.csv'); header('Content-Disposition: attachment; filename=' .$_POST['bdd'] .'.csv');
$output = fopen("php://output", "w"); $output = fopen("php://output", "w");
$title = $res->fetchArray(SQLITE3_ASSOC);
fputcsv($output, array_keys($title));
fputcsv($output, $title); fputcsv($output, $title);
while($row = $res->fetchArray(SQLITE3_ASSOC)) { while($row = $res->fetchArray(SQLITE3_ASSOC)) {

2
referant/js/edit.js

@ -81,7 +81,7 @@ function DelTicket(clas) {
let xhr = new XMLHttpRequest(); let xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() { xhr.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) { if (this.readyState == 4 && this.status == 200) {
alert(this.responseText); location.reload();
} }
}; };
xhr.open('POST', 'cible/delete.php', true); xhr.open('POST', 'cible/delete.php', true);

5
sass/main.scss

@ -110,8 +110,7 @@ form {
position: relative; position: relative;
float: right; float: right;
width: 20px; width: 20px;
bottom: 20px; top: 12px;
right: 20px;
} }
&__field { &__field {
background-color: inherit; background-color: inherit;
@ -153,7 +152,7 @@ form {
top: 0; top: 0;
&__int { &__int {
position: relative; position: relative;
left: 35%; left: 25%;
} }
&__help { &__help {
&:hover { &:hover {

Loading…
Cancel
Save