diff --git a/2020-2021/TD3/voiture.txt b/2020-2021/TD3/voiture.txt index e69de29..ab14f04 100755 --- a/2020-2021/TD3/voiture.txt +++ b/2020-2021/TD3/voiture.txt @@ -0,0 +1,5 @@ +Renault Prix Peugeot Prix Volkswagen Prix +Twingo 8999 107 7999 Lupo 8549 +Clio 11999 207 12499 Polo 11549 +Megane 13999 308 14999 Golf 16549 +Laguna 18999 508 19999 Passat 22549 diff --git a/2020-2021/TD4/export/.gitignore b/2020-2021/TD4/export/.gitignore new file mode 100644 index 0000000..aab52d9 --- /dev/null +++ b/2020-2021/TD4/export/.gitignore @@ -0,0 +1 @@ +*.png \ No newline at end of file diff --git a/2020-2021/TD4/export/index.html b/2020-2021/TD4/export/index.html new file mode 100644 index 0000000..be8109a --- /dev/null +++ b/2020-2021/TD4/export/index.html @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + +
+
+ Back to homepage +
+
+ + + \ No newline at end of file diff --git a/2020-2021/TD4/index.php b/2020-2021/TD4/index.php index 55c1f43..80ca577 100755 --- a/2020-2021/TD4/index.php +++ b/2020-2021/TD4/index.php @@ -1,84 +1,148 @@ -'; - } -} - -?> - - + - M314 - TD4 + + + M314 - TD4 - Manipulation de fichiers et de répertoire + + + + + + + + + -

M314 - TD4 – Manipulation de fichiers et de répertoire

- - - - - - +
+ +
+ + + +
+
+
+ +

Le Formulaire

+
+
+
+
+ +
+ Pseudo discord (Pseudo#1234) :
+ Nom de votre OC :
+ Race de votre OC :
+ Image de votre OC :

+
+
+
+ +
+ +
+ +
+
+ + + + + + + + + + - - - - \ No newline at end of file + + diff --git a/2020-2021/TD4/results.csv b/2020-2021/TD4/results.csv new file mode 100644 index 0000000..5672a62 --- /dev/null +++ b/2020-2021/TD4/results.csv @@ -0,0 +1,2 @@ +Discord;Nom OC;Race;Image +JunkJumper#3773;UmmingBird;pegase;https://www.junkjumper-projects.com/FP/export/UmmingBirdummin-nsfw.png \ No newline at end of file diff --git a/2020-2021/TD4/src/bg.png b/2020-2021/TD4/src/bg.png new file mode 100644 index 0000000..327a300 Binary files /dev/null and b/2020-2021/TD4/src/bg.png differ diff --git a/2020-2021/TD4/src/end.png b/2020-2021/TD4/src/end.png new file mode 100644 index 0000000..1902929 Binary files /dev/null and b/2020-2021/TD4/src/end.png differ diff --git a/2020-2021/TD4/traitement.php b/2020-2021/TD4/traitement.php new file mode 100644 index 0000000..30111e3 --- /dev/null +++ b/2020-2021/TD4/traitement.php @@ -0,0 +1,150 @@ +'; //ok on recup dans $tab[nomVar] +//print_r($_FILES['fichier']); +//echo '
'; + + +/************************************************************ + * Partie check valeurs * + *************************************************************/ + + $nom = strtr( + $$_REQUEST['oc'], + 'ÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÒÓÔÕÖÙÚÛÜÝàáâãäåçèéêëìíîïðòóôõöùúûüýÿ', + 'AAAAAACEEEEIIIIOOOOOUUUUYaaaaaaceeeeiiiioooooouuuuyy' + ); + $nom = preg_replace('/([^.a-z0-9]+)/i', '-', $nom ); + + +if($_REQUEST['oc'] == "") { + $die = true; + $message = $message ."Vous n'avez pas renseigné le nom de votre OC !".'
'; +} + + +if($_REQUEST['race'] == "") { + $die = true; + $message = $message ."Vous n'avez pas renseigné une race !".'
'; +} + + +/************************************************************ + * Partie gestion des images * + *************************************************************/ + +$dossier = './export/'; +$fichier = basename($_FILES['fichier']['name']); +$taille_maxi = 10485760; +$taille = filesize($_FILES['fichier']['tmp_name']); +$extensions = array('.png'); +$extension = strrchr($_FILES['fichier']['name'], '.'); + + + + +//Début des vérifications de sécurité... +if (!in_array($extension, $extensions)) { //Si l'extension n'est pas dans le tableau + $erreur = 'Vous devez uploader un fichier de type png'; + $die = true; +} +if ($taille > $taille_maxi) { + $erreur = 'Le fichier est trop gros...'; + $die = true; +} + +if (!isset($erreur)) { //S'il n'y a pas d'erreur, on upload + //On formate le nom du fichier ici... + $fichier = strtr( + $fichier, + 'ÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÒÓÔÕÖÙÚÛÜÝàáâãäåçèéêëìíîïðòóôõöùúûüýÿ', + 'AAAAAACEEEEIIIIOOOOOUUUUYaaaaaaceeeeiiiioooooouuuuyy' + ); + $fichier = preg_replace('/([^.a-z0-9]+)/i', '-', $fichier); + if (move_uploaded_file($_FILES['fichier']['tmp_name'], $dossier .$_REQUEST['oc'] .$fichier) && (!$die) ) { //Si la fonction renvoie TRUE, c'est que ça a fonctionné... + $path = $dossier .$_REQUEST['oc'] .$fichier; + $message = 'Upload effectué avec succès !'; + $envoi = true; + } else { //Sinon (la fonction renvoie FALSE). + $message = $message .' Echec de l\'upload ! Vérifiez bien les conditions d\'envoi !'; + $die = true; + } +} else { + //echo $erreur; +} + +/************************************************************ + * Partie export CSV * + *************************************************************/ + + //Discord;oc;race;avatar +if ($envoi) { +$write = fopen('results.csv', 'a'); + fputs($write, "\n" .$tab['discord'] .";" .$tab['oc'] .";" .$tab['race'] .";https://www.junkjumper-projects.com/FP/" .substr($path, 2)); +fclose($write); +} + + +?> + + + + + + + + + + + + + setTimeout(function() {window.location.href = "index.php";}, 4975);'; + } else { + echo ''; + } + ?> + + + + +
+ +
+

+

' ; + echo $message; + } else { + echo 'erreur

'; + echo $erreur; + } + ?> +

+

+
+
+


Vous allez être redirigé vers la page précédente dans quelques instants
+

+
+
+ + + \ No newline at end of file diff --git a/2020-2021/TD5/TP5-eno.pdf b/2020-2021/TD5/TP5-eno.pdf new file mode 100644 index 0000000..f9ba158 Binary files /dev/null and b/2020-2021/TD5/TP5-eno.pdf differ diff --git a/2020-2021/TD5/index.php b/2020-2021/TD5/index.php new file mode 100644 index 0000000..02f5058 --- /dev/null +++ b/2020-2021/TD5/index.php @@ -0,0 +1,84 @@ + +'; + } +} + +?> + + + + + M314 - TD5 + +

M314 - TD5 – Manipulation de sessions, cookies et mails

+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/2020-2021/TD6/TP6-eno.pdf b/2020-2021/TD6/TP6-eno.pdf new file mode 100644 index 0000000..1c387db Binary files /dev/null and b/2020-2021/TD6/TP6-eno.pdf differ diff --git a/2020-2021/TD6/index.php b/2020-2021/TD6/index.php new file mode 100644 index 0000000..13adc7b --- /dev/null +++ b/2020-2021/TD6/index.php @@ -0,0 +1,84 @@ + +'; + } +} + +?> + + + + + M314 - TD6 + +

M314 - TP6 PHP Orienté Objet

+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/2020-2021/TD6/results.csv b/2020-2021/TD6/results.csv new file mode 100644 index 0000000..7f47459 --- /dev/null +++ b/2020-2021/TD6/results.csv @@ -0,0 +1,54 @@ +Discord;Nom OC;Race;Image +JunkJumper#7912;UmmingBird;pegase;https://www.junkjumper-projects.com/FP/export/UmmingBirdApplejunk1-00129.png +AlexTheBest#5282;WindFlyer;pegase;https://www.junkjumper-projects.com/FP/export/WindFlyerMy-OC.png +Modrý Poník#4845;Feather Blue;terrestre;https://www.junkjumper-projects.com/FP/export/Feather BlueQuentin-steampunk-1.png +Juju Darky#7517;Darky;pegase;https://www.junkjumper-projects.com/FP/export/DarkyDarky.png +Comet Wing#7640;Comet Wing;pegase;https://www.junkjumper-projects.com/FP/export/Comet WingCometWingFlying.png +Akififi#0467 ;Sea Glow;pegase;https://www.junkjumper-projects.com/FP/export/Sea Glowmedium-3-.png +Patapon Jack_Dashie#4634;Ice Warm;licorne;https://www.junkjumper-projects.com/FP/export/Ice Warmice-warm.png +Chevalier Patate#4443;Falscher;changelin;https://www.junkjumper-projects.com/FP/export/Falscherty-ly-chargement.png +Ben_Alpha#1505;Ryoku Memori;alicorne;https://www.junkjumper-projects.com/FP/export/Ryoku MemoriRyoku-Memori.png +Skyller#1804;Lupina;pegase;https://www.junkjumper-projects.com/FP/export/LupinaLupina-Arley.png +Violet Cross#9720;Candy Gold;changelin;https://www.junkjumper-projects.com/FP/export/Candy GoldCandy-Gold.png +DanTriplerUn#4652;Dan Éditon;terrestre;https://www.junkjumper-projects.com/FP/export/Dan ÉditonLets-A-Go-Dan-Only-1.png +Scissor Twilight#0447;santal;licorne;https://www.junkjumper-projects.com/FP/export/santalPony.png +Lux The Pegasus#3209;Photo After;pegase;https://www.junkjumper-projects.com/FP/export/Photo Afterlux-pour-mlp-rainbow-by-lux-the-pegasus-dcukff0-Copie000.png +Virgile "VILE"#9211;Finami;terrestre;https://www.junkjumper-projects.com/FP/export/Finamifinami-MLP.png +Déliambre#3796;Déliambre Floss;pegase;https://www.junkjumper-projects.com/FP/export/Déliambre Flossdiscord.png +VinylSkaarj#7811;VinylSkaarj;pegase;https://www.junkjumper-projects.com/FP/export/VinylSkaarjmyPony.png +Janeo#1101;Zapfaine;terrestre;https://www.junkjumper-projects.com/FP/export/Zapfainezapfaine.png +CaptainPie ❤ 👮#1030;CaptainPie;pegase;https://www.junkjumper-projects.com/FP/export/CaptainPiesfffffffw2.png +Im A Flying T90#2917;Twist Cable;licorne;https://www.junkjumper-projects.com/FP/export/Twist CableTwist-Cable-2.png +C_Chell#8337;Kimi;licorne;https://www.junkjumper-projects.com/FP/export/KimiKimi.png +C_Chell#8337;Kimi;licorne;https://www.junkjumper-projects.com/FP/export/KimiKimi2.png +C_Chell#8337;Yakstodon;yak;https://www.junkjumper-projects.com/FP/export/YakstodonYak.png +Retributer#0059;Deck Swapper;terrestre;https://www.junkjumper-projects.com/FP/export/Deck SwapperRetriBanniere.png +Gael80 (Red Fly)#2236;Red Fly;pegase;https://www.junkjumper-projects.com/FP/export/Red FlyDBLtIh2XkAAYZ0b.png +TheoTam#2545;Lightfast;pegase;https://www.junkjumper-projects.com/FP/export/LightfastLightfast.png +AppleJacky#0343;AppleJacky;terrestre;https://www.junkjumper-projects.com/FP/export/AppleJackyhiResPony.png +ShurixDashiie#0666;ShellaSwift;pegase;https://www.junkjumper-projects.com/FP/export/ShellaSwiftShella-Swift-by-Faquali.png +Yuki#2138;Yuki;licorne;https://www.junkjumper-projects.com/FP/export/Yukitumblr-nf5ohq1Tn01qexvxeo2-1280.png +Céliart#2008;Céliart;terrestre;https://www.junkjumper-projects.com/FP/export/CéliartCy-liart.png +Céliart#2008;Céliart;terrestre;https://www.junkjumper-projects.com/FP/export/CéliartCy-liart.png +Onyx Stell#2102;Onyx Stell;licorne;https://www.junkjumper-projects.com/FP/export/Onyx StellOnyxSousDroguefondtransparent.png +EmMane-iac Mayhem#0103;Nightmare Tears;alicorne;https://www.junkjumper-projects.com/FP/export/Nightmare TearsNightmare-tears2.png +Fire (étonnant non ?)#0848;Fire Aspect;pegase;https://www.junkjumper-projects.com/FP/export/Fire AspectL-ocDuFire-removebg-preview.png +Cedric ☾MӨӨП☽ - Luna Vult#0003;Moon Rise;licorne;https://www.junkjumper-projects.com/FP/export/Moon RiseMoon-Rise.png +Minty Joy (Flora.morian#4838);Minty Joy;licorne;https://www.junkjumper-projects.com/FP/export/Minty JoyMintyJoy.png +Im A Flying T90#2917;Twist Cable;licorne;https://www.junkjumper-projects.com/FP/export/Twist CableTwistCable2.png +Coati Songeur#1932;Amari;pegase;https://www.junkjumper-projects.com/FP/export/AmariAmari.png +🦌 Juniper 🦌 #1070;Amari;pegase;https://www.junkjumper-projects.com/FP/export/AmariAmari.png +Stanislas M. Foutoukrée #4102;Mount Génépi;terrestre;https://www.junkjumper-projects.com/FP/export/Mount GénépiMount.png +Blossoming Painting#2329;Blossoming Painting;terrestre;https://www.junkjumper-projects.com/FP/export/Blossoming PaintingBlossomingPaintingOC.png +Moonrise#6352;Moon Rise;licorne;https://www.junkjumper-projects.com/FP/export/Moon Risemoonrise.png +Luke Mystic#7759;Luke Lulamoon;pegase;https://www.junkjumper-projects.com/FP/export/Luke LulamoonPop-corn-Luke-HD4.png +Ragnar#9305;Crimson Blaze;pegase;https://www.junkjumper-projects.com/FP/export/Crimson BlazeCrimsonBlaze.png +le chevalier rouki#0135;rouki;terrestre;https://www.junkjumper-projects.com/FP/export/roukirouki.png +LumaCraft10#6112;Astral;pegase;https://www.junkjumper-projects.com/FP/export/AstralAstral.png +Minux86#1225;IlluminOC;terrestre;https://www.junkjumper-projects.com/FP/export/IlluminOCIllumiOC.png +Aliax#8962;Aliax Smily;pegase;https://www.junkjumper-projects.com/FP/export/Aliax Smilycm-for-aliax29-2-by-unisoleil-dbumfgh.png +The-Volcano (The-Pony)#1128;Steam Gear;licorne;https://www.junkjumper-projects.com/FP/export/Steam GearTheVolcanoOC.png +Pegasuhira (Rnbw-I)#5451;Blue ;seapony;https://www.junkjumper-projects.com/FP/export/Blue B.png +Mcrafteur62#3826;Missile Touch;licorne;https://www.junkjumper-projects.com/FP/export/Missile Touchmissile-touch.png +Titanium TechFR#8092;Titanium TechFR;pegase;https://www.junkjumper-projects.com/FP/export/Titanium TechFRtitaniumV5FP.png +Nightfeathers#4082;Pheden Gearsing;licorne;https://www.junkjumper-projects.com/FP/export/Pheden GearsingWallpaperPheden.png \ No newline at end of file diff --git a/src/umming_lines_paint.png b/src/umming_lines_paint.png new file mode 100644 index 0000000..91f3a57 Binary files /dev/null and b/src/umming_lines_paint.png differ