Move formulaire files to formulaire/

This commit is contained in:
Théophile Gervreau-Mercier
2026-01-26 15:24:02 +01:00
parent 787f62a9e2
commit 0697753dd3
13 changed files with 0 additions and 0 deletions

42
formulaire/README.md Normal file
View File

@@ -0,0 +1,42 @@
# PostERG - Formulaire d'ajout de mémoires
Le formulaire a pour objectif de rendre possible au étudiant.e.s sortant de l'erg en cursus de Master, de mettre à disposition leur mémoires et travaux de fin d'études, dans le cadre du projet PostERG.
Les métadonnées sont sauvegarder en format .yaml, et toutes les données sont téléversé sur un serveur interne à l'école, pour ensuite être afficher publiquement en ligne à travers [le siteweb PostERG](https://codeberg.org/PostERG/posterg-website).
Le formulaire est en PHP, utilisant à la fois du css fait-main et [Simple.css](https://simplecss.org/). La librairie de traitement du YAML est [Symfony](https://symfony.com/doc/current/components/yaml.html).
Pour installer toutes les dépendances citées dans `compose.json`, installer compose sur votre système:
```shell
curl -sS https://getcomposer.org/installer | php
```
ou
```shell
php -r "readfile('https://getcomposer.org/installer');" | php
```
ou installer le paquet composer de votre distribution.
Puis naviguer jusqu'au dossier du projet dans un terminal et lancer la commande:
```shell
composer install
```
Il vous faudras un serveur php pour voir le site en local.
Pour cela, utiliser soit WAMP/MAMP/LAMP, soit installé php pour votre système et lancé dans le dossier du projet depuis un terminal la commande suivant:
```shell
php -S 127.0.0.1:3000
```
Ouvrer votre navigateur de choix (Firefox ;-) ) et entrer l'addresse:
```
127.0.0.1:3000
```
dans la barre d'URL.

Binary file not shown.

View File

@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="lucide lucide-archive-restore"
version="1.1"
id="svg12"
sodipodi:docname="icon.svg"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs16" />
<sodipodi:namedview
id="namedview14"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
showgrid="false"
inkscape:zoom="24.719275"
inkscape:cx="5.2185997"
inkscape:cy="13.713995"
inkscape:window-width="1920"
inkscape:window-height="1011"
inkscape:window-x="0"
inkscape:window-y="32"
inkscape:window-maximized="1"
inkscape:current-layer="svg12" />
<rect
width="20"
height="5"
x="2"
y="4"
rx="2"
id="rect2"
style="stroke:#c104fc;stroke-opacity:1" />
<path
d="M12 13v7"
id="path4"
style="stroke:#c104fc;stroke-opacity:1" />
<path
d="m9 16 3-3 3 3"
id="path6"
style="stroke:#c104fc;stroke-opacity:1" />
<path
d="M4 9v9a2 2 0 0 0 2 2h2"
id="path8"
style="stroke:#c104fc;stroke-opacity:1" />
<path
d="M20 9v9a2 2 0 0 1-2 2h-2"
id="path10"
style="stroke:#c104fc;stroke-opacity:1" />
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

349
formulaire/assets/normalize.css vendored Normal file
View File

@@ -0,0 +1,349 @@
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/
html {
line-height: 1.15; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/* Sections
========================================================================== */
/**
* Remove the margin in all browsers.
*/
body {
margin: 0;
}
/**
* Render the `main` element consistently in IE.
*/
main {
display: block;
}
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/* Grouping content
========================================================================== */
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr {
box-sizing: content-box; /* 1 */
height: 0; /* 1 */
overflow: visible; /* 2 */
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
pre {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/* Text-level semantics
========================================================================== */
/**
* Remove the gray background on active links in IE 10.
*/
a {
background-color: transparent;
}
/**
* 1. Remove the bottom border in Chrome 57-
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
border-bottom: none; /* 1 */
text-decoration: underline; /* 2 */
text-decoration: underline dotted; /* 2 */
}
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder;
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/**
* Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/* Embedded content
========================================================================== */
/**
* Remove the border on images inside links in IE 10.
*/
img {
border-style: none;
}
/* Forms
========================================================================== */
/**
* 1. Change the font styles in all browsers.
* 2. Remove the margin in Firefox and Safari.
*/
button,
input,
optgroup,
select,
textarea {
font-family: inherit; /* 1 */
font-size: 100%; /* 1 */
line-height: 1.15; /* 1 */
margin: 0; /* 2 */
}
/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/
button,
input { /* 1 */
overflow: visible;
}
/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
button,
select { /* 1 */
text-transform: none;
}
/**
* Correct the inability to style clickable types in iOS and Safari.
*/
button,
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
}
/**
* Remove the inner border and padding in Firefox.
*/
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
/**
* Restore the focus styles unset by the previous rule.
*/
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
outline: 1px dotted ButtonText;
}
/**
* Correct the padding in Firefox.
*/
fieldset {
padding: 0.35em 0.75em 0.625em;
}
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
box-sizing: border-box; /* 1 */
color: inherit; /* 2 */
display: table; /* 1 */
max-width: 100%; /* 1 */
padding: 0; /* 3 */
white-space: normal; /* 1 */
}
/**
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
vertical-align: baseline;
}
/**
* Remove the default vertical scrollbar in IE 10+.
*/
textarea {
overflow: auto;
}
/**
* 1. Add the correct box sizing in IE 10.
* 2. Remove the padding in IE 10.
*/
[type="checkbox"],
[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
[type="search"] {
-webkit-appearance: textfield; /* 1 */
outline-offset: -2px; /* 2 */
}
/**
* Remove the inner padding in Chrome and Safari on macOS.
*/
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button; /* 1 */
font: inherit; /* 2 */
}
/* Interactive
========================================================================== */
/*
* Add the correct display in Edge, IE 10+, and Firefox.
*/
details {
display: block;
}
/*
* Add the correct display in all browsers.
*/
summary {
display: list-item;
}
/* Misc
========================================================================== */
/**
* Add the correct display in IE 10+.
*/
template {
display: none;
}
/**
* Add the correct display in IE 10.
*/
[hidden] {
display: none;
}

View File

@@ -0,0 +1,109 @@
@font-face {
font-family: police1;
src: url("./Combinedd.otf");
}
/* Dark theme */
/* UTILE POUR FORCER UN MODE LIGHT */
@media (prefers-color-scheme: dark) {
:root,
::backdrop {
--bg: #fff;
--accent-bg: #f5f7ff;
--text: #212121;
--text-light: #585858;
--border: #898EA4;
--accent: #0d47a1;
--code: #d81b60;
--preformatted: #444;
--marked: #ffdd33;
--disabled: #efefef;
}
}
body{
background-color: white;
}
/* ENTÊTE */
header {
font-family: 'police1';
background: linear-gradient(280deg, rgba(77, 168, 112, 1) 0%, rgba(193, 4, 252, 1) 85%);
text-decoration: none;
outline: none;
font-size: 2rem;
}
body > header h1 {
color: white;
margin: 3rem auto auto auto;
}
/* FORMULAIRE */
form label {
font-family: police1;
font-size: 1rem;
}
form input,
select, textarea {
border-color: #c104fc;
overflow: visible;
outline: none;
background-color: white;
}
form input:focus,
select:focus {
border: 3px solid rgba(77, 168, 112, 1);
}
label{
margin-top: 2rem;
}
input {
/* font-family: police1; */
/* font-weight: bold; */
background-color: none;
color: rgb(193, 4, 252);
border: 1px solid rgb(193, 4, 252);
}
a{
color: rgb(193, 4, 252);
}
a:hover {
text-decoration: none;
}
a, a:visited {
color: rgb(193, 4, 252);
}
input:active {
border-color: rgba(77, 168, 112, 1);
}
button, [role="button"], input[type="submit"], input[type="reset"], input[type="button"], label[type="button"] {
background-color: rgb(193, 4, 252);
margin-top: 2rem;
}
/* For Google Chrome, Safari, and newer versions of Opera */
::placeholder {
/* color: rgb(213, 73, 255); */
font-size: 0.8rem;
}
/* For Mozilla Firefox */
::-moz-placeholder {
/* color: rgb(213, 73, 255); */
font-size: 0.8rem;}

View File

@@ -0,0 +1,673 @@
/* Global variables. */
:root,
::backdrop {
/* Set sans-serif & mono fonts */
--sans-font: -apple-system, BlinkMacSystemFont, "Avenir Next", Avenir,
"Nimbus Sans L", Roboto, "Noto Sans", "Segoe UI", Arial, Helvetica,
"Helvetica Neue", sans-serif;
--mono-font: Consolas, Menlo, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
--standard-border-radius: 5px;
/* Default (light) theme */
--bg: #fff;
--accent-bg: #f5f7ff;
--text: #212121;
--text-light: #585858;
--border: #898EA4;
--accent: #0d47a1;
--code: #d81b60;
--preformatted: #444;
--marked: #ffdd33;
--disabled: #efefef;
}
/* Dark theme */
@media (prefers-color-scheme: dark) {
:root,
::backdrop {
color-scheme: dark;
--bg: #212121;
--accent-bg: #2b2b2b;
--text: #dcdcdc;
--text-light: #ababab;
--accent: #ffb300;
--code: #f06292;
--preformatted: #ccc;
--disabled: #111;
}
/* Add a bit of transparency so light media isn't so glaring in dark mode */
img,
video {
opacity: 0.8;
}
}
/* Reset box-sizing */
*, *::before, *::after {
box-sizing: border-box;
}
/* Reset default appearance */
textarea,
select,
input,
progress {
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
}
html {
/* Set the font globally */
font-family: var(--sans-font);
scroll-behavior: smooth;
}
/* Make the body a nice central block */
body {
color: var(--text);
background-color: var(--bg);
font-size: 1.15rem;
line-height: 1.5;
display: grid;
grid-template-columns: 1fr min(45rem, 90%) 1fr;
margin: 0;
}
body > * {
grid-column: 2;
}
/* Make the header bg full width, but the content inline with body */
body > header {
background-color: var(--accent-bg);
border-bottom: 1px solid var(--border);
text-align: center;
padding: 0 0.5rem 2rem 0.5rem;
grid-column: 1 / -1;
}
body > header h1 {
max-width: 1200px;
margin: 1rem auto;
}
body > header p {
max-width: 40rem;
margin: 1rem auto;
}
/* Add a little padding to ensure spacing is correct between content and header > nav */
main {
padding-top: 1.5rem;
}
body > footer {
margin-top: 4rem;
padding: 2rem 1rem 1.5rem 1rem;
color: var(--text-light);
font-size: 0.9rem;
text-align: center;
border-top: 1px solid var(--border);
}
/* Format headers */
h1 {
font-size: 3rem;
}
h2 {
font-size: 2.6rem;
margin-top: 3rem;
}
h3 {
font-size: 2rem;
margin-top: 3rem;
}
h4 {
font-size: 1.44rem;
}
h5 {
font-size: 1.15rem;
}
h6 {
font-size: 0.96rem;
}
/* Prevent long strings from overflowing container */
p, h1, h2, h3, h4, h5, h6 {
overflow-wrap: break-word;
}
/* Fix line height when title wraps */
h1,
h2,
h3 {
line-height: 1.1;
}
/* Reduce header size on mobile */
@media only screen and (max-width: 720px) {
h1 {
font-size: 2.5rem;
}
h2 {
font-size: 2.1rem;
}
h3 {
font-size: 1.75rem;
}
h4 {
font-size: 1.25rem;
}
}
/* Format links & buttons */
a,
a:visited {
color: var(--accent);
}
a:hover {
text-decoration: none;
}
button,
[role="button"],
input[type="submit"],
input[type="reset"],
input[type="button"],
label[type="button"] {
border: none;
border-radius: var(--standard-border-radius);
background-color: var(--accent);
font-size: 1rem;
color: var(--bg);
padding: 0.7rem 0.9rem;
margin: 0.5rem 0;
}
button[disabled],
[role="button"][aria-disabled="true"],
input[type="submit"][disabled],
input[type="reset"][disabled],
input[type="button"][disabled],
input[type="checkbox"][disabled],
input[type="radio"][disabled],
select[disabled] {
cursor: not-allowed;
}
input:disabled,
textarea:disabled,
select:disabled,
button[disabled] {
cursor: not-allowed;
background-color: var(--disabled);
color: var(--text-light)
}
input[type="range"] {
padding: 0;
}
/* Set the cursor to '?' on an abbreviation and style the abbreviation to show that there is more information underneath */
abbr[title] {
cursor: help;
text-decoration-line: underline;
text-decoration-style: dotted;
}
button:enabled:hover,
[role="button"]:not([aria-disabled="true"]):hover,
input[type="submit"]:enabled:hover,
input[type="reset"]:enabled:hover,
input[type="button"]:enabled:hover,
label[type="button"]:hover {
filter: brightness(1.4);
cursor: pointer;
}
button:focus-visible:where(:enabled, [role="button"]:not([aria-disabled="true"])),
input:enabled:focus-visible:where(
[type="submit"],
[type="reset"],
[type="button"]
) {
outline: 2px solid var(--accent);
outline-offset: 1px;
}
/* Format navigation */
header > nav {
font-size: 1rem;
line-height: 2;
padding: 1rem 0 0 0;
}
/* Use flexbox to allow items to wrap, as needed */
header > nav ul,
header > nav ol {
align-content: space-around;
align-items: center;
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
list-style-type: none;
margin: 0;
padding: 0;
}
/* List items are inline elements, make them behave more like blocks */
header > nav ul li,
header > nav ol li {
display: inline-block;
}
header > nav a,
header > nav a:visited {
margin: 0 0.5rem 1rem 0.5rem;
border: 1px solid var(--border);
border-radius: var(--standard-border-radius);
color: var(--text);
display: inline-block;
padding: 0.1rem 1rem;
text-decoration: none;
}
header > nav a:hover {
border-color: var(--accent);
color: var(--accent);
cursor: pointer;
}
/* Reduce nav side on mobile */
@media only screen and (max-width: 720px) {
header > nav a {
border: none;
padding: 0;
text-decoration: underline;
line-height: 1;
}
}
/* Consolidate box styling */
aside, details, pre, progress {
background-color: var(--accent-bg);
border: 1px solid var(--border);
border-radius: var(--standard-border-radius);
margin-bottom: 1rem;
}
aside {
font-size: 1rem;
width: 30%;
padding: 0 15px;
margin-left: 15px;
float: right;
}
/* Make aside full-width on mobile */
@media only screen and (max-width: 720px) {
aside {
width: 100%;
float: none;
margin-left: 0;
}
}
article, fieldset, dialog {
border: 1px solid var(--border);
padding: 1rem;
border-radius: var(--standard-border-radius);
margin-bottom: 1rem;
}
article h2:first-child,
section h2:first-child {
margin-top: 1rem;
}
section {
border-top: 1px solid var(--border);
border-bottom: 1px solid var(--border);
padding: 2rem 1rem;
margin: 3rem 0;
}
/* Don't double separators when chaining sections */
section + section,
section:first-child {
border-top: 0;
padding-top: 0;
}
section:last-child {
border-bottom: 0;
padding-bottom: 0;
}
details {
padding: 0.7rem 1rem;
}
summary {
cursor: pointer;
font-weight: bold;
padding: 0.7rem 1rem;
margin: -0.7rem -1rem;
word-break: break-all;
}
details[open] > summary + * {
margin-top: 0;
}
details[open] > summary {
margin-bottom: 0.5rem;
}
details[open] > :last-child {
margin-bottom: 0;
}
/* Format tables */
table {
border-collapse: collapse;
margin: 1.5rem 0;
}
td,
th {
border: 1px solid var(--border);
text-align: left;
padding: 0.5rem;
}
th {
background-color: var(--accent-bg);
font-weight: bold;
}
tr:nth-child(even) {
/* Set every other cell slightly darker. Improves readability. */
background-color: var(--accent-bg);
}
table caption {
font-weight: bold;
margin-bottom: 0.5rem;
}
/* Format forms */
textarea,
select,
input {
font-size: inherit;
font-family: inherit;
padding: 0.5rem;
margin-bottom: 0.5rem;
color: var(--text);
background-color: var(--bg);
border: 1px solid var(--border);
border-radius: var(--standard-border-radius);
box-shadow: none;
max-width: 100%;
display: inline-block;
}
label {
display: block;
}
textarea:not([cols]) {
width: 100%;
}
/* Add arrow to drop-down */
select:not([multiple]) {
background-image: linear-gradient(45deg, transparent 49%, var(--text) 51%),
linear-gradient(135deg, var(--text) 51%, transparent 49%);
background-position: calc(100% - 15px), calc(100% - 10px);
background-size: 5px 5px, 5px 5px;
background-repeat: no-repeat;
padding-right: 25px;
}
/* checkbox and radio button style */
input[type="checkbox"],
input[type="radio"] {
vertical-align: middle;
position: relative;
width: min-content;
}
input[type="checkbox"] + label,
input[type="radio"] + label {
display: inline-block;
}
input[type="radio"] {
border-radius: 100%;
}
input[type="checkbox"]:checked,
input[type="radio"]:checked {
background-color: var(--accent);
}
input[type="checkbox"]:checked::after {
/* Creates a rectangle with colored right and bottom borders which is rotated to look like a check mark */
content: " ";
width: 0.18em;
height: 0.32em;
border-radius: 0;
position: absolute;
top: 0.05em;
left: 0.17em;
background-color: transparent;
border-right: solid var(--bg) 0.08em;
border-bottom: solid var(--bg) 0.08em;
font-size: 1.8em;
transform: rotate(45deg);
}
input[type="radio"]:checked::after {
/* creates a colored circle for the checked radio button */
content: " ";
width: 0.25em;
height: 0.25em;
border-radius: 100%;
position: absolute;
top: 0.125em;
background-color: var(--bg);
left: 0.125em;
font-size: 32px;
}
/* Makes input fields wider on smaller screens */
@media only screen and (max-width: 720px) {
textarea,
select,
input {
width: 100%;
}
}
/* Set a height for color input */
input[type="color"] {
height: 2.5rem;
padding: 0.2rem;
}
/* do not show border around file selector button */
input[type="file"] {
border: 0;
}
/* Misc body elements */
hr {
border: none;
height: 1px;
background: var(--border);
margin: 1rem auto;
}
mark {
padding: 2px 5px;
border-radius: var(--standard-border-radius);
background-color: var(--marked);
color: black;
}
img,
video {
max-width: 100%;
height: auto;
border-radius: var(--standard-border-radius);
}
figure {
margin: 0;
display: block;
overflow-x: auto;
}
figcaption {
text-align: center;
font-size: 0.9rem;
color: var(--text-light);
margin-bottom: 1rem;
}
blockquote {
margin: 2rem 0 2rem 2rem;
padding: 0.4rem 0.8rem;
border-left: 0.35rem solid var(--accent);
color: var(--text-light);
font-style: italic;
}
cite {
font-size: 0.9rem;
color: var(--text-light);
font-style: normal;
}
dt {
color: var(--text-light);
}
/* Use mono font for code elements */
code,
pre,
pre span,
kbd,
samp {
font-family: var(--mono-font);
color: var(--code);
}
kbd {
color: var(--preformatted);
border: 1px solid var(--preformatted);
border-bottom: 3px solid var(--preformatted);
border-radius: var(--standard-border-radius);
padding: 0.1rem 0.4rem;
}
pre {
padding: 1rem 1.4rem;
max-width: 100%;
overflow: auto;
color: var(--preformatted);
}
/* Fix embedded code within pre */
pre code {
color: var(--preformatted);
background: none;
margin: 0;
padding: 0;
}
/* Progress bars */
/* Declarations are repeated because you */
/* cannot combine vendor-specific selectors */
progress {
width: 100%;
}
progress:indeterminate {
background-color: var(--accent-bg);
}
progress::-webkit-progress-bar {
border-radius: var(--standard-border-radius);
background-color: var(--accent-bg);
}
progress::-webkit-progress-value {
border-radius: var(--standard-border-radius);
background-color: var(--accent);
}
progress::-moz-progress-bar {
border-radius: var(--standard-border-radius);
background-color: var(--accent);
transition-property: width;
transition-duration: 0.3s;
}
progress:indeterminate::-moz-progress-bar {
background-color: var(--accent-bg);
}
dialog {
max-width: 40rem;
margin: auto;
}
dialog::backdrop {
background-color: var(--bg);
opacity: 0.8;
}
@media only screen and (max-width: 720px) {
dialog {
max-width: 100%;
margin: auto 1em;
}
}
/* Classes for buttons and notices */
.button,
.button:visited {
display: inline-block;
text-decoration: none;
border: none;
border-radius: 5px;
background: var(--accent);
font-size: 1rem;
color: var(--bg);
padding: 0.7rem 0.9rem;
margin: 0.5rem 0;
}
.button:hover,
.button:focus {
filter: brightness(1.4);
cursor: pointer;
}
.notice {
background: var(--accent-bg);
border: 2px solid var(--border);
border-radius: 5px;
padding: 1.5rem;
margin: 2rem 0;
}

8
formulaire/composer.json Normal file
View File

@@ -0,0 +1,8 @@
{
"require": {
"symfony/polyfill-iconv": "^1.27",
"symfony/yaml": "^6.2",
"symfony/intl": "^6.2",
"behat/transliterator": "^1.5"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

618
formulaire/error.log Normal file
View File

@@ -0,0 +1,618 @@
[02-May-2023 10:04:39 UTC] PHP Fatal error: Uncaught Error: Class "Transliterator" not found in /home/lockpick/Projects/posterg-formulaire/formulaire.php:42
Stack trace:
#0 {main}
thrown in /home/lockpick/Projects/posterg-formulaire/formulaire.php on line 42
[02-May-2023 17:27:08 UTC] FILES array: Array
(
[files] => Array
(
[name] => undefinedMega_2023-04-24.pdf
[full_path] => undefinedMega_2023-04-24.pdf
[type] => application/pdf
[tmp_name] => /tmp/phptz5xyY
[error] => 0
[size] => 64998
)
)
[02-May-2023 17:29:09 UTC] FILES array: Array
(
[files] => Array
(
[name] => undefinedMega_2023-04-24.pdf
[full_path] => undefinedMega_2023-04-24.pdf
[type] => application/pdf
[tmp_name] => /tmp/phpbgEPg4
[error] => 0
[size] => 64998
)
)
[02-May-2023 17:29:24 UTC] FILES array: Array
(
[files] => Array
(
[name] => Array
(
[0] => UdeM_Guide-ecriture-inclusive.pdf
[1] => undefinedMega_2023-04-24.pdf
)
[full_path] => Array
(
[0] => UdeM_Guide-ecriture-inclusive.pdf
[1] => undefinedMega_2023-04-24.pdf
)
[type] => Array
(
[0] => application/pdf
[1] => application/pdf
)
[tmp_name] => Array
(
[0] => /tmp/php5XBNaE
[1] => /tmp/phpGrs9Dq
)
[error] => Array
(
[0] => 0
[1] => 0
)
[size] => Array
(
[0] => 579957
[1] => 64998
)
)
)
[02-May-2023 17:29:24 UTC] Processing file: UdeM_Guide-ecriture-inclusive.pdf
[02-May-2023 17:29:24 UTC] File successfully moved: data/content///UdeM_Guide-ecriture-inclusive.pdf
[02-May-2023 17:29:24 UTC] Processing file: undefinedMega_2023-04-24.pdf
[02-May-2023 17:29:24 UTC] File successfully moved: data/content///undefinedMega_2023-04-24.pdf
[02-May-2023 17:31:08 UTC] FILES array: Array
(
[files] => Array
(
[name] => Array
(
[0] => UdeM_Guide-ecriture-inclusive.pdf
[1] => undefinedMega_2023-04-24.pdf
)
[full_path] => Array
(
[0] => UdeM_Guide-ecriture-inclusive.pdf
[1] => undefinedMega_2023-04-24.pdf
)
[type] => Array
(
[0] => application/pdf
[1] => application/pdf
)
[tmp_name] => Array
(
[0] => /tmp/phpQbhzwi
[1] => /tmp/phpm8u5q7
)
[error] => Array
(
[0] => 0
[1] => 0
)
[size] => Array
(
[0] => 579957
[1] => 64998
)
)
)
[02-May-2023 17:31:08 UTC] Processing file: UdeM_Guide-ecriture-inclusive.pdf
[02-May-2023 17:31:08 UTC] File successfully moved: data/content/2024/Théophile Gervreau-Mercier/UdeM_Guide-ecriture-inclusive.pdf
[02-May-2023 17:31:08 UTC] Processing file: undefinedMega_2023-04-24.pdf
[02-May-2023 17:31:08 UTC] File successfully moved: data/content/2024/Théophile Gervreau-Mercier/undefinedMega_2023-04-24.pdf
[02-May-2023 17:31:34 UTC] FILES array: Array
(
[files] => Array
(
[name] => Array
(
[0] => UdeM_Guide-ecriture-inclusive.pdf
[1] => undefinedMega_2023-04-24.pdf
)
[full_path] => Array
(
[0] => UdeM_Guide-ecriture-inclusive.pdf
[1] => undefinedMega_2023-04-24.pdf
)
[type] => Array
(
[0] => application/pdf
[1] => application/pdf
)
[tmp_name] => Array
(
[0] => /tmp/phpC8OF8o
[1] => /tmp/phpGoliAt
)
[error] => Array
(
[0] => 0
[1] => 0
)
[size] => Array
(
[0] => 579957
[1] => 64998
)
)
)
[02-May-2023 17:31:34 UTC] Processing file: UdeM_Guide-ecriture-inclusive.pdf
[02-May-2023 17:31:34 UTC] File successfully moved: data/content/2025/Théophile Gervreau-Mercier/UdeM_Guide-ecriture-inclusive.pdf
[02-May-2023 17:31:34 UTC] Processing file: undefinedMega_2023-04-24.pdf
[02-May-2023 17:31:34 UTC] File successfully moved: data/content/2025/Théophile Gervreau-Mercier/undefinedMega_2023-04-24.pdf
[03-May-2023 16:06:52 UTC] FILES array: Array
(
[files] => Array
(
[name] => Array
(
[0] => why_oatmeal_is_cheap_fdg2023.pdf
)
[full_path] => Array
(
[0] => why_oatmeal_is_cheap_fdg2023.pdf
)
[type] => Array
(
[0] => application/pdf
)
[tmp_name] => Array
(
[0] => /tmp/phpX9bMti
)
[error] => Array
(
[0] => 0
)
[size] => Array
(
[0] => 568705
)
)
)
[03-May-2023 16:06:52 UTC] Processing file: why_oatmeal_is_cheap_fdg2023.pdf
[03-May-2023 16:06:52 UTC] File successfully moved: data/content/2025/Théophile Gervreau-Mercier/why_oatmeal_is_cheap_fdg2023.pdf
[04-May-2023 08:22:06 UTC] FILES array: Array
(
[files] => Array
(
[name] => Array
(
[0] => why_oatmeal_is_cheap_fdg2023.pdf
)
[full_path] => Array
(
[0] => why_oatmeal_is_cheap_fdg2023.pdf
)
[type] => Array
(
[0] => application/pdf
)
[tmp_name] => Array
(
[0] => /tmp/phpREgzf4
)
[error] => Array
(
[0] => 0
)
[size] => Array
(
[0] => 568705
)
)
)
[04-May-2023 08:22:06 UTC] Processing file: why_oatmeal_is_cheap_fdg2023.pdf
[04-May-2023 08:22:06 UTC] File successfully moved: data/content/2024/Théophile Gervreau-Mercier/why_oatmeal_is_cheap_fdg2023.pdf
[04-May-2023 21:36:54 UTC] FILES array: Array
(
[files] => Array
(
[name] => Array
(
[0] => undefinedMega_2023-04-24.pdf
[1] => mov_bbb.mp4
)
[full_path] => Array
(
[0] => undefinedMega_2023-04-24.pdf
[1] => mov_bbb.mp4
)
[type] => Array
(
[0] => application/pdf
[1] => video/mp4
)
[tmp_name] => Array
(
[0] => /tmp/phpwhLgCH
[1] => /tmp/phprfELDx
)
[error] => Array
(
[0] => 0
[1] => 0
)
[size] => Array
(
[0] => 64998
[1] => 788493
)
)
)
[04-May-2023 21:36:55 UTC] PHP Warning: Undefined array key "tags" in /home/lockpick/Projects/posterg-formulaire/formulaire.php on line 27
[04-May-2023 21:36:55 UTC] PHP Fatal error: Uncaught TypeError: array_map(): Argument #2 ($array) must be of type array, null given in /home/lockpick/Projects/posterg-formulaire/formulaire.php:25
Stack trace:
#0 /home/lockpick/Projects/posterg-formulaire/formulaire.php(25): array_map()
#1 {main}
thrown in /home/lockpick/Projects/posterg-formulaire/formulaire.php on line 25
[04-May-2023 21:39:04 UTC] FILES array: Array
(
[files] => Array
(
[name] => Array
(
[0] => undefinedMega_2023-04-24.pdf
[1] => mov_bbb.mp4
)
[full_path] => Array
(
[0] => undefinedMega_2023-04-24.pdf
[1] => mov_bbb.mp4
)
[type] => Array
(
[0] => application/pdf
[1] => video/mp4
)
[tmp_name] => Array
(
[0] => /tmp/php5iA7cZ
[1] => /tmp/phpkc0Kil
)
[error] => Array
(
[0] => 0
[1] => 0
)
[size] => Array
(
[0] => 64998
[1] => 788493
)
)
)
[04-May-2023 21:39:04 UTC] Processing file: undefinedMega_2023-04-24.pdf
[04-May-2023 21:39:04 UTC] File successfully moved: data/content/2024/Théophile Gervreau-Mercier/undefinedMega_2023-04-24.pdf
[04-May-2023 21:39:04 UTC] PHP Warning: Undefined variable $pdfMimeTypes in /home/lockpick/Projects/posterg-formulaire/formulaire.php on line 115
[04-May-2023 21:39:04 UTC] PHP Fatal error: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in /home/lockpick/Projects/posterg-formulaire/formulaire.php:115
Stack trace:
#0 /home/lockpick/Projects/posterg-formulaire/formulaire.php(115): in_array()
#1 {main}
thrown in /home/lockpick/Projects/posterg-formulaire/formulaire.php on line 115
[05-May-2023 08:16:20 UTC] FILES array: Array
(
[couverture] => Array
(
[name] => PXL_20230429_202209418.jpg
[full_path] => PXL_20230429_202209418.jpg
[type] =>
[tmp_name] =>
[error] => 1
[size] => 0
)
[files] => Array
(
[name] => Array
(
[0] => why_oatmeal_is_cheap_fdg2023.pdf
)
[full_path] => Array
(
[0] => why_oatmeal_is_cheap_fdg2023.pdf
)
[type] => Array
(
[0] => application/pdf
)
[tmp_name] => Array
(
[0] => /tmp/phpgC7WDR
)
[error] => Array
(
[0] => 0
)
[size] => Array
(
[0] => 568705
)
)
)
[05-May-2023 08:16:20 UTC] PHP Warning: Undefined variable $memoireFolder in /home/lockpick/Projects/posterg-formulaire/formulaire.php on line 34
[05-May-2023 08:16:20 UTC] Processing file: why_oatmeal_is_cheap_fdg2023.pdf
[05-May-2023 08:16:20 UTC] File successfully moved: data/content/2024/Théophile Gervreau-Mercier/why_oatmeal_is_cheap_fdg2023.pdf
[05-May-2023 08:16:20 UTC] PHP Warning: Undefined variable $previewPath in /home/lockpick/Projects/posterg-formulaire/formulaire.php on line 126
[05-May-2023 08:17:52 UTC] FILES array: Array
(
[couverture] => Array
(
[name] => PXL_20230429_202209418.jpg
[full_path] => PXL_20230429_202209418.jpg
[type] =>
[tmp_name] =>
[error] => 1
[size] => 0
)
[files] => Array
(
[name] => Array
(
[0] => why_oatmeal_is_cheap_fdg2023.pdf
)
[full_path] => Array
(
[0] => why_oatmeal_is_cheap_fdg2023.pdf
)
[type] => Array
(
[0] => application/pdf
)
[tmp_name] => Array
(
[0] => /tmp/php9es1iw
)
[error] => Array
(
[0] => 0
)
[size] => Array
(
[0] => 568705
)
)
)
[05-May-2023 08:17:52 UTC] PHP Warning: Undefined variable $memoireFolder in /home/lockpick/Projects/posterg-formulaire/formulaire.php on line 34
[05-May-2023 08:17:52 UTC] Processing file: why_oatmeal_is_cheap_fdg2023.pdf
[05-May-2023 08:17:52 UTC] File successfully moved: data/content/2024/Théophile Gervreau-Mercier/why_oatmeal_is_cheap_fdg2023.pdf
[05-May-2023 08:24:04 UTC] FILES array: Array
(
[couverture] => Array
(
[name] => PXL_20230429_202209418.jpg
[full_path] => PXL_20230429_202209418.jpg
[type] =>
[tmp_name] =>
[error] => 1
[size] => 0
)
[files] => Array
(
[name] => Array
(
[0] => why_oatmeal_is_cheap_fdg2023.pdf
)
[full_path] => Array
(
[0] => why_oatmeal_is_cheap_fdg2023.pdf
)
[type] => Array
(
[0] => application/pdf
)
[tmp_name] => Array
(
[0] => /tmp/phpGPzdzS
)
[error] => Array
(
[0] => 0
)
[size] => Array
(
[0] => 568705
)
)
)
[05-May-2023 08:24:04 UTC] PHP Warning: Undefined variable $memoireFolder in /home/lockpick/Projects/posterg-formulaire/formulaire.php on line 34
[05-May-2023 08:24:04 UTC] Processing file: why_oatmeal_is_cheap_fdg2023.pdf
[05-May-2023 08:24:04 UTC] File successfully moved: data/content/2024/Théophile Gervreau-Mercier/why_oatmeal_is_cheap_fdg2023.pdf
[05-May-2023 10:15:12 UTC] FILES array: Array
(
[couverture] => Array
(
[name] => Screenshot 2023-05-03 at 18-09-15 ThankYou.png
[full_path] => Screenshot 2023-05-03 at 18-09-15 ThankYou.png
[type] => image/png
[tmp_name] => /tmp/php3w8hiB
[error] => 0
[size] => 177748
)
[files] => Array
(
[name] => Array
(
[0] => how do I make a bookmarklet in firefox.md
)
[full_path] => Array
(
[0] => how do I make a bookmarklet in firefox.md
)
[type] => Array
(
[0] => text/markdown
)
[tmp_name] => Array
(
[0] => /tmp/phplxW8Jk
)
[error] => Array
(
[0] => 0
)
[size] => Array
(
[0] => 3677
)
)
)
[05-May-2023 10:15:12 UTC] PHP Warning: Undefined variable $memoireFolder in /home/lockpick/Projects/posterg-formulaire/formulaire.php on line 38
[05-May-2023 10:15:12 UTC] PHP Warning: Undefined variable $uniqueId in /home/lockpick/Projects/posterg-formulaire/formulaire.php on line 46
[05-May-2023 10:15:12 UTC] Processing file: how do I make a bookmarklet in firefox.md
[05-May-2023 10:15:12 UTC] Invalid file type or extension: how do I make a bookmarklet in firefox.md
[05-May-2023 10:15:12 UTC] PHP Warning: Undefined variable $resume in /home/lockpick/Projects/posterg-formulaire/formulaire.php on line 129
[05-May-2023 10:30:59 UTC] FILES array: Array
(
[couverture] => Array
(
[name] => Screenshot 2023-05-03 at 18-09-15 ThankYou.png
[full_path] => Screenshot 2023-05-03 at 18-09-15 ThankYou.png
[type] => image/png
[tmp_name] => /tmp/phpb4uUfg
[error] => 0
[size] => 177748
)
[files] => Array
(
[name] => Array
(
[0] => how do I make a bookmarklet in firefox.md
)
[full_path] => Array
(
[0] => how do I make a bookmarklet in firefox.md
)
[type] => Array
(
[0] => text/markdown
)
[tmp_name] => Array
(
[0] => /tmp/phpvJqkeo
)
[error] => Array
(
[0] => 0
)
[size] => Array
(
[0] => 3677
)
)
)
[05-May-2023 10:30:59 UTC] PHP Warning: Undefined variable $memoireFolder in /home/lockpick/Projects/posterg-formulaire/formulaire.php on line 38
[05-May-2023 10:30:59 UTC] PHP Warning: Undefined variable $uniqueId in /home/lockpick/Projects/posterg-formulaire/formulaire.php on line 46
[05-May-2023 10:30:59 UTC] Processing file: how do I make a bookmarklet in firefox.md
[05-May-2023 10:30:59 UTC] Invalid file type or extension: how do I make a bookmarklet in firefox.md
[05-May-2023 10:30:59 UTC] PHP Warning: Undefined variable $resume in /home/lockpick/Projects/posterg-formulaire/formulaire.php on line 129

147
formulaire/formulaire.php Normal file
View File

@@ -0,0 +1,147 @@
<?php // formulaire.php
// Configure error reporting
ini_set('display_errors', 0);
ini_set('log_errors', 1);
ini_set('error_log', 'error.log');
// Log the content of the $_FILES array
error_log("FILES array: " . print_r($_FILES, true));
require_once 'vendor/autoload.php';
use Symfony\Component\Yaml\Yaml;
use Behat\Transliterator\Transliterator;
// Define variables
$yamlFolder = "data/yaml/";
$date = date("Y-m-d");
// Sanitize input data
$auteurice = filter_var($_POST["auteurice"], FILTER_SANITIZE_STRING);
$annee = filter_var($_POST["année"], FILTER_SANITIZE_NUMBER_INT);
$mail = filter_var($_POST["mail"], FILTER_SANITIZE_EMAIL);
$titre = filter_var($_POST["titre"], FILTER_SANITIZE_STRING);
$tag = filter_var($_POST["tag"], FILTER_SANITIZE_STRING);
$promoteurice = filter_var($_POST["promoteurice"], FILTER_SANITIZE_STRING);
$problematique = filter_var($_POST["problématique"], FILTER_SANITIZE_STRING);
$description = filter_var($_POST["description"], FILTER_SANITIZE_STRING);
$orientation = filter_var($_POST["orientation"], FILTER_SANITIZE_STRING);
$ap = filter_var($_POST["ap"], FILTER_SANITIZE_STRING);
$lien = filter_var($_POST["lien"], FILTER_SANITIZE_STRING);
$couverture = $_FILES["couverture"];
$files = $_FILES["files"];
// Transformation du string de mot-clé en un array.
$tagArray = explode(', ', $tag);
$coverFolder = $memoireFolder . "data/cover/";
if (!file_exists($coverFolder)) {
mkdir($coverFolder, 0755, true);
}
$couverturePath = "";
if ($couverture["error"] === UPLOAD_ERR_OK) {
$fileExtension = pathinfo($couverture["name"], PATHINFO_EXTENSION);
$newCouvertureName = $auteurice . "_" . $annee . "_" . $uniqueId . "." . $fileExtension;
$targetFile = $coverFolder . $newCouvertureName;
if (move_uploaded_file($couverture["tmp_name"], $targetFile)) {
chmod($targetFile, 0644);
$couverturePath = $targetFile;
} else {
error_log("Failed to move uploaded couverture file: " . $couverture["name"]);
}
}
$uploadedFiles = [];
// Create necessary directories
$memoireFolder = "data/content/{$annee}/{$auteurice}/";
if (!file_exists($yamlFolder)) {
mkdir($yamlFolder, 0755, true);
}
if (!file_exists($memoireFolder)) {
mkdir($memoireFolder, 0755, true);
}
$targetDir = $memoireFolder;
// Generate unique file name
$uniqueId = time() . "_" . rand(1000, 9999);
$sanitizedAuteurice = Transliterator::transliterate($auteurice);
$uniqueFileName = $sanitizedAuteurice . "_" . $date . "_" . $uniqueId;
// Define security constraints
$allowedMimeTypes = ['image/jpeg', 'image/png', 'application/pdf', 'video/mp4', 'application/zip'];
$allowedExtensions = ['jpg', 'jpeg', 'png', 'pdf', 'mp4', 'zip'];
$maxFileSize = 50 * 1024 * 1024; // 50 MB
// Process uploaded files
if (is_array($files["name"])) {
for ($i = 0; $i < count($files["name"]); $i++) {
// Log the file being processed
error_log("Processing file: " . $files["name"][$i]);
// Check for file upload errors
if ($files["error"][$i] !== UPLOAD_ERR_OK) {
error_log("File upload error: " . $files["name"][$i]);
continue;
}
// Check MIME type and file extension
$finfo = new finfo(FILEINFO_MIME_TYPE);
$mimeType = $finfo->file($files["tmp_name"][$i]);
$fileExtension = pathinfo($files["name"][$i], PATHINFO_EXTENSION);
if (!in_array($mimeType, $allowedMimeTypes) || !in_array($fileExtension, $allowedExtensions)) {
error_log("Invalid file type or extension: " . $files["name"][$i]);
continue;
}
// Check file size
if ($files["size"][$i] > $maxFileSize) {
error_log("File is too large: " . $files["name"][$i]);
continue;
}
// Move and set permissions for the uploaded file
$targetFile = $targetDir . basename($files["name"][$i]);
if (move_uploaded_file($files["tmp_name"][$i], $targetFile)) {
// Log successful file move
error_log("File successfully moved: " . $targetFile);
chmod($targetFile, 0644);
$uploadedFiles[] = $targetFile;
} else {
error_log("Failed to move uploaded file: " . $files["name"][$i]);
}
}
}
// Prepare form data for YAML
$formData = [
'auteurice' => $auteurice,
'année' => $annee,
'email' => $mail,
'titre' => $titre,
'tag' => $tagArray,
'promoteurice' => $promoteurice,
'problématique' => $problematique,
'description' => $resume,
'orientation' => $orientation,
'ap' => $ap,
'lien' => $lien,
'couverture' => $couverturePath,
'files' => $uploadedFiles
];
// Convert form data to YAML
$yamlData = Yaml::dump($formData);
// Save YAML file
$yamlFilePath = $yamlFolder . $uniqueFileName . ".yaml";
file_put_contents($yamlFilePath, $yamlData);
// Redirect to the thank you page
header('Location: thanks.php?file=' . urlencode($yamlFilePath));
?>

97
formulaire/index.php Normal file
View File

@@ -0,0 +1,97 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Formulaire</title>
<link rel="stylesheet" href="assets/normalize.css">
<link rel="stylesheet" href="assets/simple.css">
<link rel="stylesheet" href="assets/posterg.css">
<link rel="shortcut icon" href="assets/icon.svg" type="image/svg">
</head>
<body>
<header>
<h1>Formulaire Posterg</h1>
</header>
<main>
<form action="formulaire.php" method="post" enctype="multipart/form-data">
<label>Nom/Prénom/Pseudo</label>
<input type="text" name="auteurice" placeholder="..." required>
<label>Année diplômante (2023, 2024, ...)</label>
<input type="text" name="année" placeholder="..." required>
<label>Orientation principale</label>
<select name="orientation" required>
<option value="">-- Ton orientation --</option>
<option value="typographie">Typographie</option>
<option value="graphisme">Graphisme</option>
<option value="designnumérique">Design Numérique</option>
<option value="Cinéma d'animation">Cinéma d'animation</option>
<option value="Illustration">Illustration</option>
<option value="BD">Bande dessinée</option>
<option value="Photographie">Photographie</option>
<option value="Vidéographie">Vidéographie</option>
<option value="Sculpture">Sculpture</option>
<option value="Peinture">Peinture</option>
<option value="Art numérique">Art numérique</option>
<option value="Vidéographie">Vidéographie</option>
<option value="Photographie">Photographie</option>
<option value="Dessin">Dessin</option>
<option value="Installation performance">Installation performance</option>
</select>
<label>Atelier Pratique</label>
<select name="ap" required>
<option value="">-- Ton AP --</option>
<option value="DPM">Design et politique du multiple</option>
<option value="APS">Art et pratique situé</option>
<option value="R&E">Récits et expérimentation</option>
<option value="PAOC">Pratique de l'art et outils critiques</option>
</select>
<label>Contact : mail, insta, ...</label>
<input type="email" name="mail" placeholder="Votre contact">
<label>Titre du mémoire</label>
<input type="titre" name="titre" placeholder="..." required>
<label>Tag/mots-clefs sur le mémoire</label>
<input type="text" name="tag" placeholder="typographie, photographie, outils libre, post-colonial,..">
<label>Promoteur.rice</label>
<input type="text" name="promoteurice" placeholder="nom/prénom/pseudo">
<label>Problématique</label>
<input type="text" name="problématique" placeholder="Problématique de ton mémoire...">
<label>Résumé en quelque lignes</label>
<textarea id="textareaField" rows="8" type="text" name="description" placeholder="Description de ton mémoire..."></textarea>
<label>Lien vers un site web ou quelque chose d'autres en lignes</label>
<input type="text" name="lien" placeholder="https://monmémoire.erg.be/...">
<label>Importer une couverture</label>
<i>Vérifie que ton fichier est bien un jpg.</i>
<br>
<!-- THE FILES[] IS NECESSARY IF THERE ARE MULTIPLE FILES UPLOADED -->
<input type="file" name="couverture">
<label>Importer les divers fichers de son mémoire</label>
<i>Si tu veux importer un dossier, créer une archive zip.</i>
<!-- THE FILES[] IS NECESSARY IF THERE ARE MULTIPLE FILES UPLOADED -->
<input type="file" name="files[]" multiple>
<br>
<input type="submit" name="go" value="envoyer">
</form>
</main>
<footer>
<p>Formulaire fait avec en PHP et <a href="https://github.com/kevquirk/simple.css">SimpleCSS</a>.</p>
</footer>
</body>
</html>

14
formulaire/struct.txt Normal file
View File

@@ -0,0 +1,14 @@
.
├── assets
├── composer.json
├── composer.lock
├── data
├── error.log
├── formulaire.php
├── index.php
├── README.md
├── struct.txt
├── thanks.php
└── vendor
4 directories, 8 files

43
formulaire/thanks.php Normal file
View File

@@ -0,0 +1,43 @@
<?php
// Configure error reporting
ini_set('display_errors', 0);
ini_set('log_errors', 1);
ini_set('error_log', 'error.log');
require 'vendor/autoload.php';
use Symfony\Component\Yaml\Yaml;
$yamlFile = isset($_GET['file']) ? urldecode($_GET['file']) : '';
$data = Yaml::parseFile($yamlFile);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ThankYou</title>
<link rel="stylesheet" href="assets/normalize.css">
<link rel="stylesheet" href="assets/simple.css">
<link rel="stylesheet" href="assets/posterg.css">
<link rel="shortcut icon" href="assets/icon.svg" type="image/svg">
</head>
<body>
<header>
<h1>Merci 💜</h1>
</header>
<main>
<p>d'avoir rempli le formulaire. Le contenu soumis a été sauvegardé et est en attente de traitement.</p>
<h4>Voici les informations que vous avez encodées dans le formulaire, affiché tel que c'est stocké, en yaml:</h4>
<pre><code><?php echo htmlspecialchars(Yaml::dump($data)); ?></code></pre>
<p>Pour revenir au <a href="index.php">formulaire</a>.</p>
</main>
<footer>
<p>Formulaire fait avec ❤ en PHP et <a href="https://github.com/kevquirk/simple.css">SimpleCSS</a>.</p>
</footer>
</body>
</html>