This commit is contained in:
Igor Barkov [iwork] 2018-12-14 16:44:31 +02:00
parent 3116b8a5eb
commit c4273d8819

View File

@ -43,6 +43,7 @@ if (input::post('friendedit')) {
$admins_list = db::c()->query('SELECT `id` FROM `users` WHERE `admin` = 1 ORDER BY `login` ASC', (time() - 60)); $admins_list = db::c()->query('SELECT `id` FROM `users` WHERE `admin` = 1 ORDER BY `login` ASC', (time() - 60));
$contacts_list = db::c()->query('SELECT `friend`,`comment` FROM `friends` WHERE `friend` > 0 AND `user` = ?i', $_SESSION['uid']); $contacts_list = db::c()->query('SELECT `friend`,`comment` FROM `friends` WHERE `friend` > 0 AND `user` = ?i', $_SESSION['uid']);
?> ?>
<!doctype html>
<HTML> <HTML>
<HEAD> <HEAD>
<meta charset="utf-8"> <meta charset="utf-8">
@ -84,7 +85,8 @@ $contacts_list = db::c()->query('SELECT `friend`,`comment` FROM `friends` WHERE
</TD> </TD>
<TD width="1%"> <TD width="1%">
<input type='button' style="background: darkgrey; border: 1px solid grey; border-radius: 2px;" value="Редактировать" <input type='button' style="background: darkgrey; border: 1px solid grey; border-radius: 2px;" value="Редактировать"
onclick='editcontact("<?= $us['login'] ?>", "<?= $row['comment'] ?>")'> onclick='use(`comment`,`wow`)'>
<!-- editcontact("<?= $us['login'] ?>", "<?= $row['comment'] ?>") -->
</TD> </TD>
</TR> </TR>
<? endwhile; ?> <? endwhile; ?>
@ -145,6 +147,10 @@ $contacts_list = db::c()->query('SELECT `friend`,`comment` FROM `friends` WHERE
document.getElementById("hint4").style.visibility = "hidden"; document.getElementById("hint4").style.visibility = "hidden";
Hint3Name = ''; Hint3Name = '';
} }
function use(option, placeholder) {
document.getElementById(option).innerHTML = "<form method='post'><input placeholder='"+placeholder+"' name='"+option+"'><input value='Ок' type='submit'></form>";
}
</script> </script>
</body> </body>
</HTML> </HTML>