Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
projet-cdaw
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thibaut Felten
projet-cdaw
Commits
5085fdff
Commit
5085fdff
authored
Dec 04, 2020
by
thibaut-felten
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gvipers.imt-lille-douai.fr/thibaut.felten/projet-cdaw
into master
parents
a30174ac
6b7bb5c0
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
12 additions
and
40 deletions
+12
-40
ResultController.class.php
backend/MVC/controller/ResultController.class.php
+0
-3
Online.class.php
backend/MVC/model/Online.class.php
+0
-4
Role.class.php
backend/MVC/model/Role.class.php
+0
-0
Role.sql.php
backend/MVC/sql/Role.sql.php
+0
-0
LoginNavbar.vue
frontend/src/components/LoginNavbar.vue
+0
-4
main.js
frontend/src/main.js
+1
-1
AdminPrivate.vue
frontend/src/views/AdminPrivate.vue
+0
-4
Game.vue
frontend/src/views/Game.vue
+0
-3
Inscription.vue
frontend/src/views/Inscription.vue
+1
-3
JoinPrivate.vue
frontend/src/views/JoinPrivate.vue
+1
-2
Online.vue
frontend/src/views/Online.vue
+9
-13
PlayerPrivate.vue
frontend/src/views/PlayerPrivate.vue
+0
-3
No files found.
backend/MVC/controller/ResultController.class.php
View file @
5085fdff
...
...
@@ -36,9 +36,6 @@ class ResultController extends Controller {
case
'OPTIONS'
:
return
Response
::
okresponse
(
json_encode
(
"OPTIONS"
));
// $data = json_decode(file_get_contents("php://input"),TRUE);
// return $this->deleteLine($data);
// break;
}
return
Response
::
errorResponse
(
"unsupported parameters or method in game"
);
...
...
backend/MVC/model/Online.class.php
View file @
5085fdff
...
...
@@ -20,8 +20,6 @@ class Online extends Model {
$idmin
=
$res
[
0
]
->
USER_ID
;
if
(
$id
==
$idmin
){
$game
=
Online
::
getIdGame
();
// print_r($game);
// exit;
if
(
count
(
$game
)
==
1
){
Online
::
deleteUserOnline
(
array
(
":id"
=>
$id
));
Game
::
addUserGame
(
array
(
":GAME_ID"
=>
$game
[
0
]
->
GAME_ID
,
":USER_ID"
=>
$id
));
...
...
@@ -30,8 +28,6 @@ class Online extends Model {
else
{
$idgame
=
Game
::
createGame
(
array
(
":GAME_DESC"
=>
"Desc"
,
":private"
=>
"0"
));
Online
::
deleteUserOnline
(
array
(
":id"
=>
$id
));
// print_r($idgame);
// exit;
Game
::
addUserGame
(
array
(
":GAME_ID"
=>
$idgame
[
0
]
->
id
,
":USER_ID"
=>
$id
));
return
$idgame
[
0
]
->
id
;
...
...
backend/MVC/model/Role.class.php
deleted
100644 → 0
View file @
a30174ac
backend/MVC/sql/Role.sql.php
deleted
100644 → 0
View file @
a30174ac
frontend/src/components/LoginNavbar.vue
View file @
5085fdff
...
...
@@ -29,10 +29,6 @@ export default {
},
}
console
.
log
(
user
.
id
);
</
script
>
<
style
scoped
>
...
...
frontend/src/main.js
View file @
5085fdff
...
...
@@ -4,7 +4,7 @@ import router from './router'
Vue
.
config
.
productionTip
=
false
sessionStorage
.
setItem
(
'APIURL'
,
'http://localhost/projet-cdaw/backend/MVC/api.php'
)
sessionStorage
.
setItem
(
'APIURL'
,
'http://localhost/
felten/
projet-cdaw/backend/MVC/api.php'
)
new
Vue
({
router
,
...
...
frontend/src/views/AdminPrivate.vue
View file @
5085fdff
...
...
@@ -67,7 +67,6 @@ export default {
let
response
=
await
fetch
(
url
,
params
)
let
result
=
await
response
.
json
()
console
.
log
(
result
)
document
.
getElementById
(
"codeGame"
).
innerHTML
=
result
[
0
].
id
;
game
.
id
=
result
[
0
].
id
;
// console.log(game.id)
...
...
@@ -88,7 +87,6 @@ export default {
},
ajoutAdminGame
:
async
function
(){
const
url
=
sessionStorage
.
getItem
(
'APIURL'
)
+
"/gameuser"
console
.
log
(
game
.
id
)
let
data
=
{
"GAME_ID"
:
game
.
id
,
"USER_ID"
:
user
.
id
,
...
...
@@ -102,7 +100,6 @@ export default {
},
JoueurPresent
:
async
function
(){
let
url
=
sessionStorage
.
getItem
(
'APIURL'
)
+
"/gameuser/game"
console
.
log
(
game
.
id
)
url
+=
"/"
+
game
.
id
;
var
params
=
{
method
:
"GET"
...
...
@@ -119,7 +116,6 @@ export default {
return
}
setTimeout
(()
=>
{
if
(
game
.
id
){
this
.
JoueurPresent
()}},
3000
)
// setInterval(() => {if(game.id){this.JoueurPresent()}}, 3000)
},
retour
:
async
function
()
{
...
...
frontend/src/views/Game.vue
View file @
5085fdff
...
...
@@ -148,9 +148,6 @@ export default {
let
rock
=
this
.
rock
let
paper
=
this
.
paper
let
scissors
=
this
.
scissors
console
.
log
(
"ID : "
+
user
.
id
)
console
.
log
(
"TOKEN : "
+
user
.
token
)
await
fetch
(
sessionStorage
.
getItem
(
'APIURL'
)
+
`/user/
${
user
.
id
}
`
,
{
...
...
frontend/src/views/Inscription.vue
View file @
5085fdff
...
...
@@ -144,8 +144,6 @@ export default {
method
:
'POST'
,
body
:
JSON
.
stringify
(
data
)
};
console
.
log
(
params
.
body
.
lastname
)
fetch
(
url
,
params
)
.
then
(
response
=>
response
.
json
())
.
then
(
response
=>
{
...
...
frontend/src/views/JoinPrivate.vue
View file @
5085fdff
...
...
@@ -76,8 +76,7 @@ export default {
method
:
'POST'
,
body
:
JSON
.
stringify
(
data
)
};
game
.
id
=
this
.
idgame
;
let
response
=
await
fetch
(
url
,
params
)
console
.
log
(
response
)
await
fetch
(
url
,
params
)
this
.
$router
.
push
(
"/playerPrivate"
)
}
},
...
...
frontend/src/views/Online.vue
View file @
5085fdff
...
...
@@ -62,12 +62,9 @@ export default {
method
:
"GET"
}
)
console
.
log
(
res
)
const
result
=
await
res
.
json
()
console
.
log
(
result
)
if
(
result
.
length
>=
1
)
{
game
.
id
=
result
console
.
log
(
result
)
this
.
goGame
(
result
)
return
}
...
...
@@ -78,7 +75,6 @@ export default {
goGame
:
async
function
(
gameID
)
{
let
url
=
sessionStorage
.
getItem
(
'APIURL'
)
+
"/gameuser/game"
console
.
log
(
gameID
)
url
+=
"/"
+
gameID
;
var
params
=
{
method
:
"GET"
...
...
frontend/src/views/PlayerPrivate.vue
View file @
5085fdff
...
...
@@ -38,19 +38,16 @@ export default {
},
JoueurPresent
:
async
function
(){
let
url
=
sessionStorage
.
getItem
(
'APIURL'
)
+
"/gameuser/game"
console
.
log
(
game
.
id
)
url
+=
"/"
+
game
.
id
;
var
params
=
{
method
:
"GET"
}
let
response
=
await
fetch
(
url
,
params
)
let
result
=
await
response
.
json
()
console
.
log
(
result
)
let
text
=
""
;
result
.
forEach
(
user
=>
{
text
+=
`<tr><h2 class='joueur' id='joueur'>
${
user
.
USER_ID
}
</h2></tr>`
});
console
.
log
(
text
)
document
.
getElementById
(
"joueurs"
).
innerHTML
=
text
if
(
result
.
length
>=
2
){
this
.
$router
.
push
(
`/game/
${
game
.
id
}
`
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment