diff --git a/login/cible.php b/login/cible.php index 75e943c..b13f4c5 100644 --- a/login/cible.php +++ b/login/cible.php @@ -12,6 +12,7 @@ if (isset($_POST['login']) && isset($_POST['pwd'])) { header('location: ../prof/index.php'); } } + $reponse->closeCursor(); } echo ''; diff --git a/referant/admin.php b/referant/admin.php new file mode 100644 index 0000000..2ebd032 --- /dev/null +++ b/referant/admin.php @@ -0,0 +1,45 @@ +query("SELECT * FROM logins"); + $arr = []; + while ($line = $reponse->fetch()) { + $arr[$line[0]] = $line[1]; + } + $reponse->closeCursor(); +?> + + + + + + + + + + + + + + + + + + + + + $value) { + echo ' + + + + '; + } + ?> + + + +
Mot de passe
LoginPassword
', $key,'', $value,'
+ + \ No newline at end of file diff --git a/referant/cible/admin.php b/referant/cible/admin.php new file mode 100644 index 0000000..e067375 --- /dev/null +++ b/referant/cible/admin.php @@ -0,0 +1,8 @@ +query('UPDATE `logins` SET `pwd` = "' .$decode['pwd'] .'" WHERE `login` = "' .$decode['login'] .'"'); + +$traitement = $bdd->query("SELECT * FROM `logins` WHERE `login`= '" .$decode['login'] ."'"); +print_r(json_encode($traitement->fetch())); +?> \ No newline at end of file diff --git a/referant/include/nav.php b/referant/include/nav.php index 353d90d..fb7af3e 100644 --- a/referant/include/nav.php +++ b/referant/include/nav.php @@ -4,7 +4,8 @@ - + + diff --git a/referant/js/admin.js b/referant/js/admin.js new file mode 100644 index 0000000..e73ce1a --- /dev/null +++ b/referant/js/admin.js @@ -0,0 +1,26 @@ +function Edit(clas) { + let obj = document.getElementsByClassName(clas); + let data = new FormData(); + if (obj[2].querySelector('input').value == 'edit') { + obj[1].innerHTML = ''; + obj[2].querySelector('input').value = 'ok'; + } + else { + let value = {}; + value.login = obj[0].textContent; + value.pwd = obj[1].querySelector('input').value; + console.log(value); + let xhr = new XMLHttpRequest(); + data.append('value', JSON.stringify(value)); + xhr.onreadystatechange = function() { + if (this.readyState == 4 && this.status == 200) { + console.log(this.response); + obj[1].innerHTML = this.response[1]; + obj[2].querySelector('input').value = 'edit'; + } + }; + xhr.open('POST', 'cible/admin.php', true); + xhr.responseType = 'json'; + xhr.send(data); + } +} \ No newline at end of file diff --git a/referant/liste.php b/referant/liste.php index 133a1e1..b9b4919 100644 --- a/referant/liste.php +++ b/referant/liste.php @@ -11,7 +11,7 @@ include '../session_restraintes.php'; - + diff --git a/stylepage.css b/stylepage.css index 4a45015..7226b1d 100644 --- a/stylepage.css +++ b/stylepage.css @@ -174,10 +174,11 @@ nav > ul::after{ } nav > ul > li{ - width: 25%; + width: 20%; float: left; position: relative; text-align: center; + list-style-type: none; } nav> ul > li > a{ @@ -185,20 +186,13 @@ nav> ul > li > a{ padding-top: 10px; padding-bottom: 10px; color: #eee; -} - -nav li{ - list-style-type: none; -} - -nav a{ - display: inline-block; + display: inline-block; text-decoration: none; } .menu:hover{ background-color: #59184E; - transition: .5s; + transition: 1s; border-radius: 10px; }
Ticket