Merge branch 'master' of https://codefirst.iut.uca.fr/git/nathan.boileau/Scripted
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
49745f49a3
@ -0,0 +1,13 @@
|
||||
//~ Function that test the user code
|
||||
|
||||
async function submit(){
|
||||
var test = editor.getValue()+`\n
|
||||
ba
|
||||
R
|
||||
`;
|
||||
exec("print ('True')", "code");
|
||||
exec(test, "solution");
|
||||
result.innerHTML = "Test en cours...";
|
||||
await new Promise(r => setTimeout(r, 1500));
|
||||
check();
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Login</title>
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha1/css/bootstrap.min.css"
|
||||
integrity="sha384-r4NyP46KrjDleawBgD5tp8Y7UzmLA05oM1iAEQ17CSuDqnUK2+k9luXQOfXJCJ4I" crossorigin="anonymous" />
|
||||
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
|
||||
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha1/js/bootstrap.min.js"
|
||||
integrity="sha384-oesi62hOLfzrys4LxRF63OJCXdXDipiYWBnvTl9Y9/TRlw5xlKIEHpNyvvDShgf/"
|
||||
crossorigin="anonymous"></script>
|
||||
<link rel="stylesheet"
|
||||
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0" />
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" />
|
||||
<link rel="stylesheet" href="./View/src/CSS/Login.css" />
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container user-select-none">
|
||||
<div class="login-box col-12" id="form">
|
||||
<div class="row mb-4 d-flex align-items-center">
|
||||
<div class="col-2 justify-content-center">
|
||||
<a class="material-icons p-0 m-0" id="home" href="index.php?action=goToHome"
|
||||
style="font-size: 30px; color: white; text-decoration:none; width: fit-content;">home</a>
|
||||
</div>
|
||||
<div class="col d-flex justify-content-center align-content-center">
|
||||
<h2 class="text-uppercase font-weight-bold text-center" id="h2" style="width:fit-content;">Password
|
||||
Reset</h2>
|
||||
</div>
|
||||
<div class="col-2"></div>
|
||||
</div>
|
||||
<div class="col text-center">
|
||||
<p> Your password was reset go to your mail and enter the validation code.</p>
|
||||
</div>
|
||||
|
||||
<form class="mb-5" action="index.php?action=goToHome" method="POST">
|
||||
<div class="user-box mb-5 position-relative">
|
||||
<input type="text" id="code" name="code" required="" />
|
||||
<label>Code</label>
|
||||
</div>
|
||||
<div class="d-flex justify-content-around mt-5">
|
||||
<button class="py-2 px-3" type="submit">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
Reset Password
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="d-flex justify-content-around">
|
||||
<a href="index.php?action=goToLogin" class="text-center" style="color: #5fc198;">Login</a>
|
||||
<a href="index.php?action=goToSignUp" class="text-center" style="color: #5fc198;">Sign up</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -0,0 +1,64 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Login</title>
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha1/css/bootstrap.min.css"
|
||||
integrity="sha384-r4NyP46KrjDleawBgD5tp8Y7UzmLA05oM1iAEQ17CSuDqnUK2+k9luXQOfXJCJ4I" crossorigin="anonymous" />
|
||||
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
|
||||
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha1/js/bootstrap.min.js"
|
||||
integrity="sha384-oesi62hOLfzrys4LxRF63OJCXdXDipiYWBnvTl9Y9/TRlw5xlKIEHpNyvvDShgf/"
|
||||
crossorigin="anonymous"></script>
|
||||
<link rel="stylesheet"
|
||||
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0" />
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" />
|
||||
<link rel="stylesheet" href="./View/src/CSS/Login.css" />
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container user-select-none">
|
||||
<div class="login-box col-12" id="form">
|
||||
<div class="row mb-4 d-flex align-items-center">
|
||||
<div class="col-2 justify-content-center">
|
||||
<a class="material-icons p-0 m-0" id="home" href="index.php?action=goToHome"
|
||||
style="font-size: 30px; color: white; text-decoration:none; width: fit-content;">home</a>
|
||||
</div>
|
||||
<div class="col d-flex justify-content-center align-content-center">
|
||||
<h2 class="text-uppercase font-weight-bold text-center" id="h2" style="width:fit-content;">Password
|
||||
Reset</h2>
|
||||
</div>
|
||||
<div class="col-2"></div>
|
||||
</div>
|
||||
<div class="col text-center">
|
||||
<p> Enter your email address and we'll send you an email with instructions to reset your password.</p>
|
||||
</div>
|
||||
|
||||
<form class="mb-5" action="index.php?action=goToHome" method="POST">
|
||||
<div class="user-box mb-5 position-relative">
|
||||
<input type="text" id="email" name="email" required="" />
|
||||
<label>Email</label>
|
||||
</div>
|
||||
<div class="d-flex justify-content-around mt-5">
|
||||
<button class="py-2 px-3" type="submit">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
Reset Password
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="d-flex justify-content-around">
|
||||
<a href="index.php?action=goToLogin" class="text-center" style="color: #5fc198;">Login</a>
|
||||
<a href="index.php?action=goToSignUp" class="text-center" style="color: #5fc198;">Sign up</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "WEB",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "WEB",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {}
|
||||
}
|
@ -0,0 +1 @@
|
||||
{}
|
@ -0,0 +1,16 @@
|
||||
import { createServer } from "http";
|
||||
import { Server } from "socket.io";
|
||||
|
||||
const httpServer = createServer();
|
||||
const io = new Server(httpServer, {
|
||||
// options
|
||||
});
|
||||
io.on('connection', (socket) => {
|
||||
console.log("connection de l'utilisateur à l'id ". socket.id);
|
||||
});
|
||||
io.on('launchGame' , function () {
|
||||
console.log('launch the game');
|
||||
location.reload();
|
||||
});
|
||||
|
||||
httpServer.listen(3000);
|
@ -1,27 +0,0 @@
|
||||
<?php
|
||||
|
||||
// Créer l'application express
|
||||
$app = require('/usr/local/lib/node_modules/express');
|
||||
|
||||
// Créer le serveur
|
||||
$server = $app->listen(3000);
|
||||
|
||||
// Créer l'objet socket.io en lui passant le serveur
|
||||
$io = require('/usr/local/lib/node_modules/socket.io')($server);
|
||||
|
||||
// Quand un utilisateur se connecte
|
||||
$io->on('connection', function ($socket) {
|
||||
echo "connection de l'utilisateur à l'id " . $socket->id;
|
||||
});
|
||||
|
||||
// Quand un utilisateur lance le jeu
|
||||
$io->on('launchGame', function () {
|
||||
echo 'launch the game';
|
||||
header('Location: index.php');
|
||||
});
|
||||
|
||||
// Exporter l'objet socket.io
|
||||
putenv("io=$io");
|
||||
|
||||
echo 'iolisten';
|
||||
?>
|
Loading…
Reference in new issue