Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Lionel Ferrafiat
RIE-2017-ProjetTutore-G1
Commits
141ece9d
Commit
141ece9d
authored
Dec 14, 2018
by
System Administrator
Browse files
affichage de formulaire en cliquant sur lire message
parents
be2e6e23
d5816a6f
Changes
2
Hide whitespace changes
Inline
Side-by-side
SiteWeb/html/accueil.php
View file @
141ece9d
...
...
@@ -22,22 +22,19 @@ session_start(); // Demmare la Session
<!-- Custom styles for this template -->
<link
href=
"./style/css/sticky-footer-navbar.css"
rel=
"stylesheet"
>
<script
type=
"text/javascript"
>
function
noBack
(){
window
.
history
.
forward
()}
noBack
();
window
.
onload
=
noBack
;
window
.
onpageshow
=
function
(
evt
){
if
(
evt
.
persisted
)
noBack
()}
window
.
onunload
=
function
(){
void
(
0
)}
function
bascule
(
id
)
{
if
(
document
.
getElementById
(
id
).
style
.
visibility
==
"
hidden
"
)
document
.
getElementById
(
id
).
style
.
visibility
=
"
visible
"
;
else
document
.
getElementById
(
id
).
style
.
visibility
=
"
hidden
"
;
}
</script>
</script>
</head>
<body>
<body
>
<?php
//Appel au header du site
...
...
@@ -65,10 +62,24 @@ session_start(); // Demmare la Session
<button
class=
"btn btn-outline-secondary"
type=
"submit"
>
Écrire un message
</button>
</form>
<br>
<button
class=
"btn btn-outline-secondary"
onclick=
"bascule('header');"
>
Lire un message
</button>
<!-- <form action="deconnexion.php">
<button class="btn btn-outline-secondary" type="submit">Déconnexion</button>
</form> -->
<button
class=
"btn btn-outline-secondary"
onclick=
"bascule('form');"
>
Lire un message
</button>
<form
METHOD=
"post"
ACTION=
"consommateur.php"
id=
"form"
style=
"visibility: hidden;"
>
<p>
Nom de topic
</p>
<div
class=
"form-group"
>
<input
type=
"text"
class=
"form-control"
name=
"topic"
value=
""
required
/>
</div>
<p>
Mot de passe :
</p>
<div
class=
"form-group"
>
<input
type=
"password"
class=
"form-control"
name=
"password"
value=
""
pattern=
".{6,}"
required
/>
</div>
<div
class=
"form-group"
>
<input
class=
"btn btn-outline-secondary"
type=
"submit"
name=
"Valider"
value=
"Valider"
>
</div>
</form>
<?php
...
...
@@ -162,11 +173,25 @@ session_start(); // Demmare la Session
<button
class=
"btn btn-outline-secondary"
type=
"submit"
>
Écrire un message
</button>
</form>
<br>
<!-- <button class="btn btn-outline-secondary" type="submit">Lire un message</button> -->
<button
class=
"btn btn-outline-secondary"
type=
"submit"
onclick=
"bascule('header');"
>
Lire un message
</button>
<!-- <form action="deconnexion.php">
<button class="btn btn-outline-secondary" type="submit">Déconnexion</button>
</form> -->
<button
class=
"btn btn-outline-secondary"
onclick=
"bascule('form');"
>
Lire un message
</button>
<form
METHOD=
"post"
ACTION=
"consommateur.php"
id=
"form"
style=
"visibility: hidden;"
<
p
>
Nom de topic
</p>
<div
class=
"form-group"
>
<input
type=
"text"
class=
"form-control"
name=
"topic"
value=
""
required
/>
</div>
<p>
Mot de passe :
</p>
<div
class=
"form-group"
>
<input
type=
"password"
class=
"form-control"
name=
"password"
value=
""
pattern=
".{6,}"
required
/>
</div>
<div
class=
"form-group"
>
<input
class=
"btn btn-outline-secondary"
type=
"submit"
name=
"Valider"
value=
"Valider"
>
</div>
</form>
<?php
}
else
{
require_once
(
"consommateur.php"
);
...
...
SiteWeb/html/consommateur.php
View file @
141ece9d
...
...
@@ -15,7 +15,7 @@
// On sécurise les données entrées par le membre.
// Le htmlentities() passera les guillemets en entités HTML, ce qui empêchera les injections SQL.
$topic
=
htmlentities
(
$_POST
[
'topic'
]
)
,
ENT_QUOTES
,
"ISO-8859-1"
);
$topic
=
htmlentities
(
$_POST
[
'topic'
],
ENT_QUOTES
,
"ISO-8859-1"
);
$pass_topic
=
htmlentities
(
$_POST
[
'pass_topic'
],
ENT_QUOTES
,
"ISO-8859-1"
);
// On se connecte à la base de données
...
...
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