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
9e5ac5ed
Commit
9e5ac5ed
authored
Apr 05, 2020
by
Liang Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
profil
parent
09363e2c
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
104 additions
and
122 deletions
+104
-122
aliments.php
aliments.php
+0
-1
profil_affichage.php
profil_affichage.php
+101
-6
profil_modif.php
profil_modif.php
+0
-99
signup.php
signup.php
+3
-15
template_menu.php
template_menu.php
+0
-1
No files found.
aliments.php
View file @
9e5ac5ed
...
...
@@ -76,7 +76,6 @@
<th>
Type
</th>
<th>
Modifier
</th>
<th>
Supprimer
</th>
<th>
Ajouter au Journal
</th>
</tr>
</thead>
<tbody
id=
"tbody_aliment"
><tbody>
...
...
profil_affichage.php
View file @
9e5ac5ed
...
...
@@ -11,13 +11,13 @@
</script>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
var
ident
=
sessionStorage
.
getItem
(
'para'
);
var
ident
=
sessionStorage
.
getItem
(
'para'
);
// var essai= "lwu";
$
.
getJSON
(
'https://eden.imt-lille-douai.fr/~liang.wu/API_LOGIN/identite/read_one.php?login='
+
ident
,
function
(
data
){
table
=
$
(
'#tbody_info'
);
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></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>'
);
});
});
...
...
@@ -27,11 +27,11 @@
<section
id=
"profil_contenu"
style=
"display : flex; flex-direction : row; "
>
<div
style=
"margin-right:100px"
>
<h1>
informations Personnelles
</h1>
<table
id=
"table_info"
class=
"dataTable"
style=
"color : #212529; "
>
<thead>
<tr>
<th>
id
</th>
<th>
ID
</th>
<th>
login
</th>
<th>
password
</th>
<th>
pseudo
</th>
...
...
@@ -40,10 +40,105 @@
<th>
taille(cm)
</th>
<th>
sexe
</th>
<th>
niveau_du_sport
</th>
<th>
Action
</th>
<th>
Besoin en calories journalier(Kcal)
</th>
</tr>
</thead>
<tbody
id=
"tbody_info"
><tbody>
</table>
</div>
</section>
<section>
<h1>
Utilisez ce formulaire, si vous voulez modifier vos informations
</h1>
<form
id=
"form_edit"
action=
"#"
method=
"POST"
>
<div>
<label>
ID (Remettez votre ID)
</label>
<input
type=
'text'
id=
'id'
name=
'id'
class=
"form-control"
required
/>
</div>
<div>
<label>
Login
</label>
<input
type=
'text'
id=
'login'
name=
'login'
class=
"form-control"
required
/>
</div>
<div>
<label>
Password
</label>
<input
type=
'text'
id=
'password'
name=
'password'
class=
"form-control"
required
/>
</div>
<div>
<label>
Pseudo
</label>
<input
type=
'text'
id=
'pseudo'
name=
'pseudo'
class=
"form-control"
required
/>
</div>
<div>
<label>
Âge
</label>
<input
type=
'text'
id=
'age'
name=
'age'
class=
"form-control"
required
/>
</div>
<div>
<label>
Poids(kg)
</label>
<input
type=
'text'
id=
'poids'
name=
'poids'
class=
"form-control"
required
/>
</div>
<div>
<label>
Taille(cm)
</label>
<input
type=
'text'
id=
'taille'
name=
'taille'
class=
"form-control"
required
/>
</div>
<div
class=
"form-group"
>
<label>
Sexe
</label>
<select
class=
"form-control"
id=
"sexe"
name=
"sexe"
>
<option
selected
>
Choisir...
</option>
<option>
Femme
</option>
<option>
Homme
</option>
</select>
</div>
<div
class=
"form-group"
>
<label>
Niveau de sport
</label>
<select
class=
"form-control"
id=
"niveaudusport"
name=
"niveaudusport"
>
<option
selected
>
Choisir...
</option>
<option>
Bas
</option>
<option>
Moyen
</option>
<option>
Elevé
</option>
</select>
</div>
<!-- button to submit form -->
</div>
<div
class=
"form-action-buttons"
>
<input
type=
"submit"
value=
"Modifier"
>
</div>
</form>
<script
src=
"https://code.jquery.com/jquery-3.4.1.min.js"
integrity=
"sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
crossorigin=
"anonymous"
></script>
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/jquery-serialize-object/2.5.0/jquery.serialize-object.min.js"
></script>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
(
$
)
{
// will run if create identite form was submitted
$
(
document
).
on
(
'submit'
,
'#form_edit'
,
function
(){
// get form data
var
form_data
=
JSON
.
stringify
(
$
(
this
).
serializeObject
());
// console.log(form_data);
// submit form data to api
$
.
ajax
({
url
:
"https://eden.imt-lille-douai.fr/~liang.wu/API_LOGIN/identite/update.php"
,
type
:
"POST"
,
contentType
:
'application/json'
,
data
:
form_data
});
});
});
</script>
</section>
profil_modif.php
deleted
100644 → 0
View file @
09363e2c
<head>
<meta
charset=
"utf-8"
>
<script
src=
"https://code.jquery.com/jquery-3.4.1.js"
integrity=
"sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU="
crossorigin=
"anonymous"
></script>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"https://cdn.datatables.net/1.10.20/css/jquery.dataTables.css"
>
<script
type=
"text/javascript"
charset=
"utf8"
src=
"https://cdn.datatables.net/1.10.20/js/jquery.dataTables.js"
></script>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
$
(
'#table_récap'
).
DataTable
();
}
);
</script>
</head>
<section>
<table>
<tr>
<td>
<table
id=
"table_récap"
class=
"dataTable"
style=
"color : #212529; "
>
<thead>
<tr>
<th>
Login
</th>
<th>
Âge
</th>
<th>
Poids
</th>
<th>
Taille(m)
</th>
<th>
Sexe
</th>
<th>
Niveau de sport
</th>
<th>
Besoins journaliers en calories
</th>
<th>
CRUD
</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</td>
<td>
<form
onsubmit=
"event.preventDefault();onFormSubmit();"
autocomplete=
"off"
>
<table>
<tr>
<th>
Login :
</th>
<td><input
type=
"text"
name=
"login"
id=
"login"
></td>
</tr>
<tr>
<th>
Âge :
</th>
<td>
<input
type=
"text"
name=
"age"
id=
"age"
>
</td>
</tr>
<tr>
<th>
Poids(kg) :
</th>
<td>
<input
type=
"text"
name=
"poids"
id=
"poids"
>
</td>
</tr>
<tr>
<th>
Taille(m):
</th>
<td>
<input
type=
"text"
name=
"taille"
id=
"taille"
>
</td>
</tr>
<tr>
<th>
Sexe :
</th>
<td>
<label>
Homme
<input
type=
"radio"
name=
"sex"
id=
"M"
>
</label><br>
<label>
Femme
<input
type=
"radio"
name=
"sex"
id=
"F"
>
</label></td>
</tr>
<tr>
<th>
Niveau de pratique sportive :
</th>
<td>
<label>
Bas
<input
type=
"radio"
name=
"sport"
id=
"bas"
>
</label><br>
<label>
Moyen
<input
type=
"radio"
name=
"sport"
id=
"moyen"
>
</label><br>
<label>
Elevé
<input
type=
"radio"
name=
"sport"
id=
"eleve"
>
</label>
</td>
</tr>
<tr>
<td><input
type=
"submit"
name=
"Valider"
></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<script
src=
"scriptcalcul.js"
></script>
<h2>
Nom
</h2>
<img
src=
"logo.png"
alt=
""
height=
"90px"
width=
"150px"
/>
</section>
</body>
</html>
\ No newline at end of file
signup.php
View file @
9e5ac5ed
...
...
@@ -3,13 +3,13 @@ require_once('template_header.php');
?>
<section>
<div
id=
"response"
></div>
<div><a
href=
"index.php"
>
Se connecter
</a></div>
</section>
<section>
<!-- 'create identite' html form -->
<form
id=
"form_signup"
action=
"#"
method=
"POST"
>
<form
id=
"form_signup"
method=
"POST"
>
<div>
<label>
Login
</label>
<input
type=
'text'
id=
'login'
name=
'login'
class=
"form-control"
required
/>
...
...
@@ -89,19 +89,7 @@ $(document).ready( function($) {
url
:
"https://eden.imt-lille-douai.fr/~liang.wu/API_LOGIN/identite/create.php"
,
type
:
"POST"
,
contentType
:
'application/json'
,
data
:
form_data
,
success
:
function
(
result
){
$
(
'#response'
).
html
(
"<div class='alert alert-danger'>success.</div>"
);
},
error
:
function
(
xhr
,
resp
,
text
){
// on error, tell the user login has failed & empty the input boxes
$
(
'#response'
).
html
(
"<div class='alert alert-danger'>failed</div>"
);
login_form
.
find
(
'input'
).
val
(
''
);
}
data
:
form_data
});
});
});
...
...
template_menu.php
View file @
9e5ac5ed
...
...
@@ -5,7 +5,6 @@ $mymenu = array(
// idPage titre
'home'
=>
array
(
'Accueil'
),
'profil_affichage'
=>
array
(
'Profil'
),
'profil_modif'
=>
array
(
'Modifier mon profil'
),
'aliments'
=>
array
(
'Aliments'
),
'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