Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Projet_idaw
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
Liang Wu
Projet_idaw
Commits
be77a7fb
Commit
be77a7fb
authored
Apr 05, 2020
by
Liang Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
joli truc
parent
9e5ac5ed
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
83 additions
and
80 deletions
+83
-80
.DS_Store
.DS_Store
+0
-0
accueil.php
accueil.php
+34
-0
bootstrap.css
bootstrap/css/bootstrap.css
+1
-0
home.php
home.php
+3
-2
index.php
index.php
+23
-11
profil.php
profil.php
+0
-57
profil_affichage.php
profil_affichage.php
+1
-0
signup.php
signup.php
+20
-9
template_menu.php
template_menu.php
+1
-1
No files found.
.DS_Store
View file @
be77a7fb
No preview for this file type
accueil.php
0 → 100644
View file @
be77a7fb
<section>
<canvas
id=
"myChart"
></canvas>
<script
src=
"https://cdn.jsdelivr.net/npm/chart.js@2.8.0"
></script>
<script>
Chart
.
defaults
.
global
.
title
.
display
=
true
;
Chart
.
defaults
.
global
.
title
.
text
=
"Consommation de calories"
;
</script>
<script>
var
ctx
=
document
.
getElementById
(
'myChart'
).
getContext
(
'2d'
);
var
chart
=
new
Chart
(
ctx
,
{
// The type of chart we want to create
type
:
'line'
,
// The data for our dataset
data
:
{
labels
:
[
'January'
,
'February'
,
'March'
,
'April'
,
'May'
,
'June'
,
'July'
],
datasets
:
[{
label
:
'My First dataset'
,
backgroundColor
:
'rgb(255, 99, 132)'
,
borderColor
:
'rgb(255, 99, 132)'
,
data
:
[
0
,
10
,
5
,
2
,
20
,
30
,
45
]
}]
},
// Configuration options go here
options
:
{}
});
</script>
</section>
bootstrap/css/bootstrap.css
View file @
be77a7fb
...
@@ -41,6 +41,7 @@
...
@@ -41,6 +41,7 @@
box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
}
html
{
html
{
font-family
:
sans-serif
;
font-family
:
sans-serif
;
line-height
:
1.15
;
line-height
:
1.15
;
...
...
home.php
View file @
be77a7fb
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
require_once
(
'template_header.php'
);
require_once
(
'template_header.php'
);
require_once
(
'template_menu.php'
);
require_once
(
'template_menu.php'
);
$currentPageId
=
'
home
'
;
$currentPageId
=
'
accueil
'
;
if
(
isset
(
$_GET
[
'page'
])){
if
(
isset
(
$_GET
[
'page'
])){
$currentPageId
=
$_GET
[
'page'
];
$currentPageId
=
$_GET
[
'page'
];
}
}
...
@@ -33,6 +33,7 @@ if(isset($_GET['page'])){
...
@@ -33,6 +33,7 @@ if(isset($_GET['page'])){
</div>
</div>
</header>
</header>
<?php
<?php
renderMenuToHTML
(
$currentPageId
);
renderMenuToHTML
(
$currentPageId
);
?>
?>
...
...
index.php
View file @
be77a7fb
...
@@ -4,17 +4,26 @@ require_once('template_header.php');
...
@@ -4,17 +4,26 @@ require_once('template_header.php');
<main
role=
"main"
class=
"container starter-template"
>
<main
role=
"main"
class=
"container starter-template"
>
<div
class=
"
row"
>
<div
class=
"
login_style"
style=
"width:400px;
<div
class=
"col"
>
margin:0 auto;
margin-top:10%;"
>
<!-- where prompt / messages will appear -->
<!-- where prompt / messages will appear -->
<div
id=
"response"
></div>
<div
id=
"response"
></div>
<h1
style=
"width: 38%;
margin: 0 auto;
padding-bottom: 10px;
text-align:center;"
>
Connexion
</h1>
<div>
<div>
<form
id=
"login_form"
method=
"POST"
>
<form
id=
"login_form"
style=
"width:100%;
padding: 30px;
border: 1px solid #f1f1f1;
background: #fff;
box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.24);"
method=
"POST"
>
<table>
<table>
<tr>
<tr>
<th>
Login
:
</th>
<th>
Identifiant
:
</th>
<td><input
type=
"text"
id =
'login'
name=
"login"
></td>
<td><input
type=
"text"
id =
'login'
name=
"login"
></td>
</tr>
</tr>
<tr>
<tr>
...
@@ -23,16 +32,11 @@ require_once('template_header.php');
...
@@ -23,16 +32,11 @@ require_once('template_header.php');
</tr>
</tr>
<tr>
<tr>
<th></th>
<th></th>
<td><input
type=
"submit"
value=
"Se connecter..."
/></td>
<td><input
type=
"submit"
value=
"Se connecter"
/></td>
</tr>
<tr>
<a
href=
"signup.php"
>
S'inscrire
</a>
</tr>
</tr>
</table>
</table>
</form>
</form>
</div>
</div>
</div>
</div>
</div>
</main>
</main>
...
@@ -66,6 +70,7 @@ $(document).ready(function() {
...
@@ -66,6 +70,7 @@ $(document).ready(function() {
sessionStorage
.
setItem
(
'para'
,
ac_log
.
login
);
sessionStorage
.
setItem
(
'para'
,
ac_log
.
login
);
window
.
location
=
"home.php"
;
window
.
location
=
"home.php"
;
},
},
error
:
function
(
xhr
,
resp
,
text
){
error
:
function
(
xhr
,
resp
,
text
){
// on error, tell the user login has failed & empty the input boxes
// on error, tell the user login has failed & empty the input boxes
...
@@ -77,3 +82,10 @@ $(document).ready(function() {
...
@@ -77,3 +82,10 @@ $(document).ready(function() {
});
});
</script>
</script>
</body>
<footer>
<div
style=
"text-align:center"
>
<a
href=
"signup.php"
>
S'inscrire
</a>
</div>
</footer>
profil.php
deleted
100644 → 0
View file @
9e5ac5ed
<section>
<form
id=
"info_form"
action=
".php"
method=
"GET"
>
<table>
<tr>
<th>
Login :
</th>
<td><input
type=
"text"
name=
"login"
></td>
</tr>
<tr>
<th>
Tranche d'âge :
</th>
<td>
<label>
Moins de 40 ans
<input
type=
"radio"
name=
"radioAge"
value=
"<40"
>
</label><br>
<label>
Moins de 50 ans
<input
type=
"radio"
name=
"radioAge"
value=
"<60"
>
</label><br>
<label>
60 ans et plus
<input
type=
"radio"
name=
"radioAge"
value=
"60+"
>
</label>
</td>
</tr>
<tr>
<th>
Sexe :
</th>
<td>
<label>
Homme
<input
type=
"radio"
name=
"radioSexe"
value=
"<40"
>
</label><br>
<label>
Femme
<input
type=
"radio"
name=
"radioSexe"
value=
"<60"
>
</label></td>
</tr>
<tr>
<th>
Niveau de pratique sportive :
</th>
<td>
<label>
Bas
<input
type=
"radio"
name=
"radioSport"
value=
"<40"
>
</label><br>
<label>
Moyen
<input
type=
"radio"
name=
"radioSport"
value=
"<60"
>
</label><br>
<label>
Elevé
<input
type=
"radio"
name=
"radioSport"
value=
"60+"
>
</label>
</td>
</tr>
<tr>
<td><input
type=
"submit"
name=
"Valider"
></td>
</tr>
</table>
</form>
<h2>
Nom
</h2>
<img
src=
"logo.png"
alt=
""
height=
"90px"
width=
"150px"
/>
</section>
</body>
</html>
\ No newline at end of file
profil_affichage.php
View file @
be77a7fb
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
table
=
$
(
'#tbody_info'
);
table
=
$
(
'#tbody_info'
);
table
.
html
(
''
);
table
.
html
(
''
);
table
.
append
(
'<tr><td>'
+
data
.
id
+
'</td><td>'
+
data
.
login
+
'</td><td>'
+
data
.
password
+
'</td><td>'
+
data
.
pseudo
+
'</td><td>'
+
data
.
age
+
'</td><td>'
+
data
.
poids
+
'</td><td>'
+
data
.
taille
+
'</td><td>'
+
data
.
sexe
+
'</td><td>'
+
data
.
niveaudusport
+
'</td><td>'
+
data
.
icalories
+
'</td></tr>'
);
table
.
append
(
'<tr><td>'
+
data
.
id
+
'</td><td>'
+
data
.
login
+
'</td><td>'
+
data
.
password
+
'</td><td>'
+
data
.
pseudo
+
'</td><td>'
+
data
.
age
+
'</td><td>'
+
data
.
poids
+
'</td><td>'
+
data
.
taille
+
'</td><td>'
+
data
.
sexe
+
'</td><td>'
+
data
.
niveaudusport
+
'</td><td>'
+
data
.
icalories
+
'</td></tr>'
);
sessionStorage
.
setItem
(
'copieid'
,
data
.
id
);
});
});
});
});
...
...
signup.php
View file @
be77a7fb
...
@@ -2,21 +2,26 @@
...
@@ -2,21 +2,26 @@
require_once
(
'template_header.php'
);
require_once
(
'template_header.php'
);
?>
?>
<section>
<section
style=
"width:400px;
margin:0 auto;
<div><a
href=
"index.php"
>
Se connecter
</a></div>
"
>
</section>
<h1
style=
"width: 38%;
margin: 0 auto;
<section>
padding-bottom: 10px;
"
>
Inscription
</h1>
<!-- 'create identite' html form -->
<!-- 'create identite' html form -->
<form
id=
"form_signup"
method=
"POST"
>
<form
id=
"form_signup"
method=
"POST"
style=
"width:100%;
padding: 30px;
border: 1px solid #f1f1f1;
background: #fff;
box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.24);"
>
<div>
<div>
<label>
Login
</label>
<label>
Identifiant
</label>
<input
type=
'text'
id=
'login'
name=
'login'
class=
"form-control"
required
/>
<input
type=
'text'
id=
'login'
name=
'login'
class=
"form-control"
required
/>
</div>
</div>
<div>
<div>
<label>
Password
</label>
<label>
Mot de passe
</label>
<input
type=
'text'
id=
'password'
name=
'password'
class=
"form-control"
required
/>
<input
type=
'text'
id=
'password'
name=
'password'
class=
"form-control"
required
/>
</div>
</div>
...
@@ -97,4 +102,10 @@ $(document).ready( function($) {
...
@@ -97,4 +102,10 @@ $(document).ready( function($) {
</section>
</section>
</body>
<footer>
<div
style=
"text-align:center"
>
<a
href=
"index.php"
>
Se connecter
</a>
</div>
</footer>
template_menu.php
View file @
be77a7fb
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
// un tableau qui d\'efinit la structure du site
// un tableau qui d\'efinit la structure du site
$mymenu
=
array
(
$mymenu
=
array
(
// idPage titre
// idPage titre
'
home
'
=>
array
(
'Accueil'
),
'
accueil
'
=>
array
(
'Accueil'
),
'profil_affichage'
=>
array
(
'Profil'
),
'profil_affichage'
=>
array
(
'Profil'
),
'aliments'
=>
array
(
'Aliments'
),
'aliments'
=>
array
(
'Aliments'
),
'journal'
=>
array
(
'Journal'
)
'journal'
=>
array
(
'Journal'
)
...
...
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