Обновление устаревших яваскриптов.2

This commit is contained in:
lopar 2018-12-14 02:30:54 +02:00
parent da33492a06
commit e24e47e883

View File

@ -124,16 +124,14 @@ $contacts_list = db::c()->query('SELECT `friend`,`comment` FROM `friends` WHERE
</TD>
</TR>
</TABLE>
<!--<script src="js/sl2.21.js"></script>-->
<script>
function editcontact(login, comment) {
var s = '<table width=250 bgcolor=CCC3AA><tr><td align=center><b>Редактирование контакта</b></td><td width=20 align=right valign=top style="cursor: hand" onclick="closehint3();"><BIG><B>x</td></tr><tr><td colspan=2>';
s += '<table width=250 bgcolor=FFF6DD><tr><form method=POST><td align=center>';
s += '<table width=1% align=center><tr><td align=right>';
s += '<small><b>Контакт:</b></small></td><td><INPUT type="hidden" name="friendedit" value="' + login + '"></td></tr>';
s += '<tr><td align=right><small><b>Комментарий:</b></small></td><td width="1%"><input name="comment" VALUE="' + comment + '" style="width: 105px">&nbsp;';
s += '<input type="submit" name="Сохранить" style="border:0; vertical-align: middle"></TD></TR></TABLE><INPUT TYPE=hidden name=sd4 value=""></TD></FORM></TR></TABLE></td></tr></table>';
var s = '<table width=250 bgcolor=CCC3AA><tr><td align=center><b>Редактировать контакт</b></td><td width=20 align=right valign=top style="cursor: hand" onclick="closehint();"><b>x</td></tr><tr><td colspan=2>';
s += '<table width=100% align=center bgcolor=FFF6DD><form method=POST>';
s += '<tr><td><input type="hidden" name="friendedit" value="' + login + '"><input type="hidden" name="sd4">';
s += '<input name="comment" value="' + comment + '" placeholder="Комментарий" style="width: 105px"></td></tr>';
s += '<tr><td><input type="submit" value="Сохранить" style="border:0; vertical-align: middle"></td></tr></form></table>';
s += '</td></tr></table>';
document.getElementById("hint4").innerHTML = s;
document.getElementById("hint4").style.visibility = "visible";
document.getElementById("hint4").style.left = 100;
@ -143,12 +141,12 @@ $contacts_list = db::c()->query('SELECT `friend`,`comment` FROM `friends` WHERE
}
function addcontact() {
var s = '<form method=POST><table width=270 bgcolor=CCC3AA><tr><td align=center><B>Добавить в список</td><td width=20 align=right valign=top style="cursor: hand" onclick="closehint3();"><BIG><B>x</td></tr><tr><td colspan=2>';
s += '<table width=100% bgcolor=FFF6DD><tr><td align=center>';
s += '<table width=90% align=center>';
s += '<tr><td align=right><small><b>Логин:</b></small></td><td><input name="friendadd" style="width:140px"></td></tr>';
s += '<tr><td align=right><small><b>Комментарий:</b></small></td><td><input name="comment" style="width:105px">&nbsp;';
s += '<input type="submit" name="Добавить запись" style="border:0; vertical-align: middle"></TD></TR></TABLE><INPUT TYPE=hidden name=sd4 value="1"></TD></TR></TABLE></td></tr></table></FORM>';
var s = '<table width=250 bgcolor=CCC3AA><tr><td align=center><B>Добавить контакт</td><td width=20 align=right valign=top style="cursor: hand" onclick="closehint();"><b>x</td></tr><tr><td colspan=2>';
s += '<table width=100% bgcolor=FFF6DD align=center><form method=POST>';
s += '<tr><td><input name="friendadd" placeholder="Логин" style="width:105px"></td></tr>';
s += '<tr><td><input name="comment" placeholder="Комментарий" style="width:105px"></td></tr>';
s += '<tr><td><input type="submit" value="Добавить запись" style="border:0; vertical-align: middle"><input type="hidden" name="sd4"></td></tr></form></table>';
s += '</td></tr></table>';
document.getElementById("hint4").innerHTML = s;
document.getElementById("hint4").style.visibility = "visible";
document.getElementById("hint4").style.left = 100;
@ -158,11 +156,12 @@ $contacts_list = db::c()->query('SELECT `friend`,`comment` FROM `friends` WHERE
}
function removecontact() {
var s;
s='<table width=100%><tr><form method=POST><td colspan=2>'+
'Укажите логин персонажа:</TD></TR><TR><TD width=50% align=right><input style="width: 100%" name="friendremove"></TD><TD width=50%><input type="submit" name="Удалить"></TD></TR></FORM></TABLE>';
var s = '<table width=250 bgcolor=CCC3AA><tr><td align=center><b>Удалить контакт</b></td><td width=20 align=right valign=top style="cursor: hand" onclick="closehint();"><b>x</td></tr><tr><td colspan=2>';
s += '<table width=100% align=center bgcolor=FFF6DD><form method=POST>';
s += '<tr><td><input type="hidden" name="friendedit" value="' + login + '"><input type="hidden" name="sd4">';
s += '<input name="friendremove" placeholder="Логин" style="width: 105px"></td></tr>';
s += '<tr><td><input type="submit" value="Сохранить" style="border:0; vertical-align: middle"></td></tr></form></table>';
s += '</td></tr></table>';
document.getElementById("hint4").innerHTML = s;
document.getElementById("hint4").style.visibility = "visible";
document.getElementById("hint4").style.left = 100;
@ -171,7 +170,7 @@ $contacts_list = db::c()->query('SELECT `friend`,`comment` FROM `friends` WHERE
Hint3Name = name;
}
function closehint3()
function closehint()
{
document.getElementById("hint4").style.visibility="hidden";
Hint3Name='';