Merge branch 'master' of https://codefirst.iut.uca.fr/git/nathan.boileau/Scripted
continuous-integration/drone/push Build is passing Details

ServeurDeTest
Johan LACHENAL 2 years ago
commit dde8462c92

@ -0,0 +1,13 @@
kind: pipeline
name: Scripted_Pipeline
trigger:
event:
- push
steps:
- name: start
image: node
commands:
- npm install
# - find -name "*.js"| grep -v "node_modules" | xargs node -c

2
.gitignore vendored

@ -13,3 +13,5 @@
*.vsix *.vsix
/node_modules/ /node_modules/
/.idea

8
.idea/.gitignore vendored

@ -1,8 +0,0 @@
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PublishConfigData" serverName="scripted">
<serverData>
<paths name="scripted">
<serverdata>
<mappings>
<mapping local="$PROJECT_DIR$" web="/WEB/src/Main.html" />
</mappings>
</serverdata>
</paths>
</serverData>
</component>
</project>

@ -1,7 +0,0 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="SqlDialectInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="SqlNoDataSourceInspection" enabled="false" level="WARNING" enabled_by_default="false" />
</profile>
</component>

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/Scripted.iml" filepath="$PROJECT_DIR$/.idea/Scripted.iml" />
</modules>
</component>
</project>

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PhpProjectSharedConfiguration" php_language_level="8.1">
<option name="suggestChangeDefaultLanguageLevel" value="false" />
</component>
</project>

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

@ -0,0 +1,51 @@
<?php
class Autoload
{
private static $_instance = null;
public static function charger()
{
if(null !== self::$_instance) {
throw new RuntimeException(sprintf('%s is already started', __CLASS__));
}
self::$_instance = new self();
if(!spl_autoload_register(array(self::$_instance, '_autoload'), false)) {
throw new RuntimeException(sprintf('%s : Could not start the autoload', __CLASS__));
}
}
public static function shutDown()
{
if(null !== self::$_instance) {
if(!spl_autoload_unregister(array(self::$_instance, '_autoload'))) {
throw new RuntimeException('Could not stop the autoload');
}
self::$_instance = null;
}
}
private static function _autoload($class)
{
global $rep;
$filename = $class.'.php';
$dir =array('Model/','./','Config/','Controller/');
foreach ($dir as $d){
$file=$rep.$d.$filename;
//echo $file;
if (file_exists($file))
{
include $file;
}
}
}
}
?>

@ -1,13 +1,25 @@
<?php <?php
//préfixe //préfixe
$rep='../'; $rep = __DIR__ . '/../';
//BD //BD
$dsn = 'mysql:host=londres.uca.local; dbname=dbnogarnier1'; $dsn = 'mysql:host=londres.uca.local; dbname=dbnogarnier1';
$user = 'nogarnier1'; $user = 'nogarnier1';
$password = 'achanger'; $password = 'achanger';
// $dsn = 'mysql:host=localhost; dbname=scripted';
// $user = 'root';
// $password = 'p';
//View //View
//Page
$vues['main'] = 'View/src/pages/Main.php';
$vues['presenation'] = 'View/src/pages/Presentation.html';
$vues['login'] = 'View/src/pages/LogSign/Login.php';
$vues['signUp'] = 'View/src/pages/LogSign/SignUp.php';
//Error
$vues['erreurSignUp'] = 'View/Error/ErreurSignUp.php'; $vues['erreurSignUp'] = 'View/Error/ErreurSignUp.php';
$vues['erreur'] = 'View/Error/Erreur.php'; $vues['erreur'] = 'View/Error/Erreur.php';
$vues['erreurBd'] = 'View/Error/ErreurBd.php'; $vues['erreurBd'] = 'View/Error/ErreurBd.php';

@ -15,8 +15,7 @@ class Controller
$action=$_REQUEST['action']; $action=$_REQUEST['action'];
switch($action) { switch($action) {
case NULL: case NULL:
require ('./View/src/pages/Main.php'); require ($rep.$vues['main']);
//header('Location: http://londres.uca.local/~nogarnier1/Scripted/WEB/View/src/pages/Main.html');
break; break;
case "signUp": case "signUp":
$this->signUp(); $this->signUp();
@ -36,6 +35,9 @@ class Controller
case "goToSignUp": case "goToSignUp":
$this->goToSignUp(); $this->goToSignUp();
break; break;
case "goToEnigme":
$this->goToEnigme();
break;
} }
} catch (PDOException $e) } catch (PDOException $e)
{ {
@ -54,7 +56,7 @@ class Controller
$joueur = new Joueur($_REQUEST['email'], $_REQUEST['username'], $_REQUEST['password']); $joueur = new Joueur($_REQUEST['email'], $_REQUEST['username'], $_REQUEST['password']);
$gateway->insert($joueur); $gateway->insert($joueur);
$_SESSION['connected'] = 'true'; $_SESSION['connected'] = 'true';
require ('./View/src/pages/Main.php'); require ($rep.$vues['main']);;
}catch (Exception $e){ }catch (Exception $e){
require($rep.$vues['erreurSignUp']); require($rep.$vues['erreurSignUp']);
} }
@ -72,7 +74,7 @@ class Controller
throw new InvalidMdpException("Mot de passe invalide"); throw new InvalidMdpException("Mot de passe invalide");
} }
$_SESSION['connected'] = 'true'; $_SESSION['connected'] = 'true';
require ('./View/src/pages/Main.php'); require ($rep.$vues['main']);
}catch (JoueurNotFoundException $e){ }catch (JoueurNotFoundException $e){
require($rep.$vues['erreurLoginEmail']); require($rep.$vues['erreurLoginEmail']);
}catch (InvalidMdpException $m) { }catch (InvalidMdpException $m) {
@ -83,7 +85,7 @@ class Controller
private function goToPresentation() { private function goToPresentation() {
global $rep, $vues; global $rep, $vues;
try { try {
require ('./View/src/pages/Presentation.html'); require ($rep.$vues['presenation']);
}catch (Exception $e){ }catch (Exception $e){
require($rep.$vues['erreur404']); require($rep.$vues['erreur404']);
} }
@ -92,7 +94,7 @@ class Controller
private function goToHome() { private function goToHome() {
global $rep, $vues; global $rep, $vues;
try { try {
require ('./View/src/pages/Main.php'); require ($rep.$vues['main']);
}catch (Exception $e){ }catch (Exception $e){
require($rep.$vues['erreur404']); require($rep.$vues['erreur404']);
} }
@ -101,7 +103,7 @@ class Controller
private function goToLogin() { private function goToLogin() {
global $rep, $vues; global $rep, $vues;
try { try {
require ('./View/src/pages/LogSign/Login.php'); require ($rep.$vues['login']);
}catch (Exception $e){ }catch (Exception $e){
require($rep.$vues['erreur404']); require($rep.$vues['erreur404']);
} }
@ -110,7 +112,16 @@ class Controller
private function goToSignUp() { private function goToSignUp() {
global $rep, $vues; global $rep, $vues;
try { try {
require ('./View/src/pages/LogSign/SignUp.php'); require ($rep.$vues['signUp']);
}catch (Exception $e){
require($rep.$vues['erreur404']);
}
}
private function goToEnigme() {
global $rep, $vues;
try {
require ($rep.$vues['enigme']);
}catch (Exception $e){ }catch (Exception $e){
require($rep.$vues['erreur404']); require($rep.$vues['erreur404']);
} }

@ -1,8 +1,4 @@
<?php <?php
require_once "../Model/Partie.php";
require_once "../Config/Connection.php";
class PartieGateway class PartieGateway
{ {
private Connection $con; private Connection $con;

Binary file not shown.

After

Width:  |  Height:  |  Size: 514 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 814 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

@ -1,453 +0,0 @@
/*Fonts CSS */
@import url('https://fonts.googleapis.com/css2?family=Orbitron&display=swap');
/*Default CSS*/
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
overflow-x: hidden;
position: relative;
font-family: "Orbitron", sans-serif;
}
h1, h2, h3, h4, h5, h6 {
margin: 0;
padding: 0;
line-height: normal;
}
p, a, li, button, ul {
margin: 0;
padding: 0;
line-height: normal;
text-decoration: none !important;
}
a:hover {
text-decoration: none !important;
}
input:focus, textarea:focus, select:focus {
outline: none;
}
@media (min-width:1700px) {
main .container {
max-width: 100%;
padding: 0 150px;
}
}
/* Animation CSS*/
@keyframes blink {
0%,
22%,
36%,
75% {
color: #ffe6ff;
text-shadow: 0 0 0.6rem #ffe6ff, 0 0 1.5rem #dd07bf,
-0.2rem 0.1rem 1rem #dd07bf, 0.2rem 0.1rem 1rem #dd07bf,
0 -0.5rem 2rem #841174, 0 0.5rem 3rem #841174;
}
28%,
33% {
color: #dd07bf;
text-shadow: none;
}
82%,
97% {
color: #991888;
text-shadow: none;
}
}
@keyframes flicker {
from {
opacity: 1;
}
4% {
opacity: 0.9;
}
6% {
opacity: 0.85;
}
8% {
opacity: 0.95;
}
10% {
opacity: 0.9;
}
11% {
opacity: 0.922;
}
12% {
opacity: 0.9;
}
14% {
opacity: 0.95;
}
16% {
opacity: 0.98;
}
17% {
opacity: 0.9;
}
19% {
opacity: 0.93;
}
20% {
opacity: 0.99;
}
24% {
opacity: 1;
}
26% {
opacity: 0.94;
}
28% {
opacity: 0.98;
}
37% {
opacity: 0.93;
}
38% {
opacity: 0.5;
}
39% {
opacity: 0.96;
}
42% {
opacity: 1;
}
44% {
opacity: 0.97;
}
46% {
opacity: 0.94;
}
56% {
opacity: 0.9;
}
58% {
opacity: 0.9;
}
60% {
opacity: 0.99;
}
68% {
opacity: 1;
}
70% {
opacity: 0.9;
}
72% {
opacity: 0.95;
}
93% {
opacity: 0.93;
}
95% {
opacity: 0.95;
}
97% {
opacity: 0.93;
}
to {
opacity: 1;
}
}
@keyframes animate1{
0%{
left: -100%;
}
50%,100%{
left: 100%;
}
}
@keyframes animate2{
0%{
top: -100%;
}
50%,100%{
top: 100%;
}
}
@keyframes animate3{
0%{
right: -100%;
}
50%,100%{
right: 100%;
}
}
@keyframes animate4{
0%{
bottom: -100%;
}
50%,100%{
bottom: 100%;
}
}
/* Main CSS */
.main{
background-image: url(../../assets/img/BackgroundMain.jpg);
scroll-behavior: smooth;
height: 100vh;
background-position: center center;
background-color: #464646;
background-attachment: fixed;
background-repeat: no-repeat;
background-size: cover;
}
/*Title CSS*/
.flicker {
animation: shine 2s forwards, blink 3s 2s infinite;
}
.fast-flicker {
animation: shine 2s forwards, blink 10s 1s infinite;
}
.sign{
margin-bottom: 100px;
}
.sign h1 {
font-weight: 600;
margin: auto !important;
display: flex;
justify-content: center;
align-items: center;
width: 40%;
height: 40%;
left: 50%;
top: 50%;
letter-spacing: 0.5rem;
font-family: "Orbitron", sans-serif;
text-transform: uppercase;
font-size: 5em;
color: #ffe6ff;
text-shadow: 0 0 0.6rem #ffe6ff, 0 0 1.5rem #dd07bf,
-0.2rem 0.1rem 1rem #dd07bf, 0.2rem 0.1rem 1rem #dd07bf,
0 -0.5rem 2rem #841174, 0 0.5rem 3rem #841174;
animation: shine 2s forwards, flicker 3s infinite;
}
/*Main Button CSS*/
.main .duel{
margin-top: 60px;
}
.main .align-items-center a {
letter-spacing: 0.2rem;
padding: 25px 30px;
color: #ff86ff;
height: 50px;
width: 200px;
border: none;
font-weight: 400;
border-radius: 10px;
font-size: 22px;
display: flex;
position: relative;
align-items: center;
justify-content: space-around;
cursor: pointer;
text-transform: uppercase;
transition: 0.5s;
overflow: hidden;
}
.main .align-items-center .duel{
color: #56fcfc;
}
.align-items-center{
display: table;
margin: auto;
}
.main .align-items-center .enigme:hover {
background: #ff86ff;
color: #000000;
box-shadow: 0 0 5px #ff86ff,
0 0 25px #ff86ff,
0 0 50px #ff86ff,
0 0 100px #ff86ff;
-webkit-box-reflect:below 1px linear-gradient(transparent, #0005);
}
.main .align-items-center .duel:hover{
background: #56fcfc;
color: #000000 !important;
box-shadow: 0 0 5px #56fcfc,
0 0 25px #56fcfc,
0 0 50px #56fcfc,
0 0 100px #56fcfc;
-webkit-box-reflect:below 1px linear-gradient(transparent, #0005);
}
.main a span{
position: absolute;
display: block;
}
.duel span:nth-child(1){
background: linear-gradient(90deg, transparent, #56fcfc);
}
a span:nth-child(1){
top: 0;
left: 0;
width: 100%;
height: 2px;
background: linear-gradient(90deg,transparent,#ff86ff);
animation: animate1 1s linear infinite;
}
.duel span:nth-child(2){
background: linear-gradient(180deg, transparent, #56fcfc);
}
a span:nth-child(2){
top: -100%;
right: 0;
width: 2px;
height: 100%;
background: linear-gradient(180deg,transparent,#ff86ff);
animation: animate2 1s linear infinite;
animation-delay: 0.25s;
}
.duel span:nth-child(3){
background: linear-gradient(270deg, transparent, #56fcfc);
}
a span:nth-child(3){
bottom: 0;
right: 0;
width: 100%;
height: 2px;
background: linear-gradient(270deg,transparent,#ff86ff);
animation: animate3 1s linear infinite;
animation-delay: 0.50s;
}
.duel span:nth-child(4){
background: linear-gradient(360deg, transparent, #56fcfc);
}
a span:nth-child(4){
bottom: -100%;
left: 0;
width: 2px;
height: 100%;
background: linear-gradient(360deg,transparent,#ff86ff);
animation: animate4 1s linear infinite;
animation-delay: 0.75s;
}
/* LogIn Button Css */
.main .align-items-center #login{
display: flex;
justify-content: center;
}
.main .align-items-center .log{
color: #ffffff;
margin-bottom: 60px;
width: 140px;
font-weight: 500;
font-size: 20px;
}
.main .align-items-center .log:hover{
background: #6090d1;
color: #000000 !important;
transition-delay: 450ms;
box-shadow: 0 0 5px #6090d1,
0 0 25px #6090d1,
0 0 50px #6090d1,
0 0 100px #6090d1;
-webkit-box-reflect:below 1px linear-gradient(transparent, #0005);
}
.main .align-items-center .log:before,
.main .align-items-center .log:after{
content:'';
position:absolute;
top:0;
right:0;
height:2px;
background: #6090d1;
width:0;
box-shadow: 0 0 5px #6090d1, 0 0 5px #6090d1 inset;
transition:400ms ease all;
}
.main .align-items-center .log:after{
right:inherit;
top:inherit;
left:0;
bottom:0;
}
.main .align-items-center .log:hover:before,
.main .align-items-center .log:hover:after{
width:100%;
transition:800ms ease all;
}

@ -9,7 +9,6 @@
src: url("../../assets/fonts/Equinox.otf"); src: url("../../assets/fonts/Equinox.otf");
} }
body { body {
min-height: 100vh; min-height: 100vh;
font-family: "Equinox", sans-serif; font-family: "Equinox", sans-serif;
@ -23,21 +22,40 @@ body {
background-color: #050e15; background-color: #050e15;
} }
/* Navbar CSS */
nav { nav {
background: none; background-color: #050e15;
}
/* Scrolling Page */
/* Section Histoire */
section{
min-height: 30vh;
}
.hidden {
opacity: 0;
filter: blur(10px);
transform: translateX(-100px);
transition: all 1.2s;
} }
h1{ .show {
z-index: 10; opacity: 1;
color: #fff; filter: blur(0px);
font-size: 65px; transform: translateX(0px);
letter-spacing: 1px; }
@media (prefers-reduced-motion) {
.hidden {
transition: none;
}
} }
section img { p {
position: absolute; font-family: "Fauna", sans-serif;
top: 0; font-size: 20px;
left: 0;
width: 100%;
object-fit: cover;
} }

@ -0,0 +1,14 @@
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
console.log(entry);
if (entry.isIntersecting) {
entry.target.classList.add('show');
} else {
entry.target.classList.remove('show');
}
});
});
const hiddenElements = document.querySelectorAll('.hidden');
hiddenElements.forEach(element => observer.observe(element));

@ -1,47 +0,0 @@
<!DOCTYPE html>
<html lang="fr">
<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">
<link rel="stylesheet" href="../CSS/Home.css">
<title>Home</title>
</head>
<body>
<div class="main" id="home">
<div class="sign">
<h1>
<span class="fast-flicker">s</span>
<span>crip</span>
<span class="flicker">t</span>
<span>ed</span>
</h1>
</div>
<div class="align-items-center">
<div id="login">
<a href="LogSign/Login.php" class="log">
LOgin
</a>
</div>
<div>
<a class="enigme" href="Presentation.html">
<span></span>
<span></span>
<span></span>
<span></span>
Énigme
</a>
</div>
<div>
<a class="duel" href="./Duel/Duel.html">
<span></span>
<span></span>
<span></span>
<span></span>
Multi
</a>
</div>
</div>
</div>
</body>
</html>

@ -21,15 +21,19 @@
integrity="sha384-oesi62hOLfzrys4LxRF63OJCXdXDipiYWBnvTl9Y9/TRlw5xlKIEHpNyvvDShgf/" integrity="sha384-oesi62hOLfzrys4LxRF63OJCXdXDipiYWBnvTl9Y9/TRlw5xlKIEHpNyvvDShgf/"
crossorigin="anonymous" crossorigin="anonymous"
></script> ></script>
<script defer src="../JS/Presentation.js"></script>
</head> </head>
<body> <body>
<nav class="navbar navbar-expand-lg navbar-dark"> <nav class="navbar navbar-expand-lg navbar-dark fixed-top">
<div class="container-fluid mx-0"> <div class="container-fluid mx-0">
<div class="nav-item nav-link"> <div class="nav-item nav-link">
<a class="navbar-brand">Home</a> <a class="navbar-brand" href="./Main.html">Home</a>
</div> </div>
<div class="mx-auto"> <div class="mx-auto">
<h5 class="m-1 fw-bold text-uppercase" style="color: #fff"> <h5
class="m-1 text-uppercase"
style="color: #fff; font-weight: bold; font-size: 22px"
>
Northgan Northgan
</h5> </h5>
</div> </div>
@ -39,11 +43,43 @@
</div> </div>
</nav> </nav>
<section class=" position-relative w-100 h-100 d-flex justify-content-center align-items-center"> <img src="../../assets/img/TestBG.png" class="img-fluid" />
<h1>Scripted</h1>
<img src="../../assets/img/MenBGPres.png" id="men"></img> <div class="container mt-5 ml-0">
<img src="../../assets/img/BuildingBG.png" id="building"></img> <div class="row py-5 justify-content-around">
<div class="col-3">
<img
src="../../assets/img/neonHead.jpg"
alt="Logo"
class="img-fluid"
id="moving-fox"
/>
</div>
<div class="col-7 align-self-center ml-4">
<!-- <h4
class="display-4 fw-bold mb-5 text-uppercase d-flex justify-content-start"
>
Hello
</h4> -->
<section class="hidden row ">
<p>Bonjour Utilisateur !</p>
</section> </section>
<section class="hidden row">
<p>
Je suis Foxy, une IA créer par Ashley Northgan, une éminente
chercheuse, malhereusement celle-ci est porté disparu.
</p>
</section>
<section class="hidden row">
<p>
Je suis Foxy, une IA créer par Ashley Northgan, une éminente
chercheuse, malhereusement celle-ci est porté disparu.
</p>
</section>
</div>
</div>
</div>
</body> </body>
</html> </html>

@ -27,7 +27,7 @@
</div> </div>
<div class="Presentation"> <div class="Presentation">
<div class="Histoire"> <div class="Histoire">
<img src="../../assets/img/Renard.png" alt="Foxy"> <img src="./View/assets/img/Renard.png" alt="Foxy">
<div class="Consigne" id="message"> <div class="Consigne" id="message">
<p>Bonjour utilisateur ! Je suis Foxy, une IA créer par Howard Aiken, un eminent chercheur, <p>Bonjour utilisateur ! Je suis Foxy, une IA créer par Howard Aiken, un eminent chercheur,
malhereusement celui-ci est mort. J'ai besoin de votre aide pour protéger mon code source d'une organisation malhereusement celui-ci est mort. J'ai besoin de votre aide pour protéger mon code source d'une organisation
@ -66,5 +66,6 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</body> </body>
</html> </html>

@ -1,24 +1,11 @@
<?php <?php
require_once './Config/Config.php'; require_once(__DIR__.'/config/config.php');
require_once "./Config/Connection.php"; require_once(__DIR__.'/config/Autoload.php');
require_once './Config/Validation.php'; Autoload::charger();
require_once "./Model/Joueur.php";
require_once "./Model/Enigme.php";
require_once './Controller/JoueurGateway.php';
require_once './Controller/EnigmeGateway.php';
require_once './Controller/JoueurNotFoundException.php';
require_once './Controller/InvalidMdpException.php';
require_once './Controller/Controller.php';
//unset($_SESSION['connected']);
$con = new Connection($dsn, $user, $password); $con = new Connection($dsn, $user, $password);
$control = new Controller($con); $control = new Controller($con);
session_unset(); //efface les variable session session_unset();
session_destroy();//détruit la session session_destroy();
$_SESSION = null;//histoire d'être sûre $_SESSION = null;
Loading…
Cancel
Save