Панель контактов. Убираем старый код.
This commit is contained in:
parent
6aa3055288
commit
7773593ebb
175
contacts.php
175
contacts.php
@ -121,6 +121,8 @@ if ($_POST['friendedit']) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$admins_list = db::c()->query('SELECT `id` FROM `users` WHERE `admin` = 1 ORDER BY `login` ASC', (time() - 60));
|
||||||
?>
|
?>
|
||||||
<HTML>
|
<HTML>
|
||||||
<HEAD>
|
<HEAD>
|
||||||
@ -129,147 +131,48 @@ if ($_POST['friendedit']) {
|
|||||||
<link rel=stylesheet href="css/friend/main.css">
|
<link rel=stylesheet href="css/friend/main.css">
|
||||||
<link href="css/friend/design3.css" rel="stylesheet" type="text/css">
|
<link href="css/friend/design3.css" rel="stylesheet" type="text/css">
|
||||||
</HEAD>
|
</HEAD>
|
||||||
<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 bgcolor=e2e0e0>
|
<body>
|
||||||
<div id=hint4 class=ahint></div>
|
<div id=hint4 class=ahint></div>
|
||||||
<TABLE cellspacing=0 cellpadding=2 width="100%">
|
<TABLE width="100%">
|
||||||
<TR>
|
<TR>
|
||||||
<TD style="vertical-align: top; ">
|
<TD style="vertical-align: top;">
|
||||||
<TABLE cellspacing=0 cellpadding=2 width="100%">
|
<TABLE cellspacing=0 cellpadding=2 width="100%">
|
||||||
<TR>
|
|
||||||
<TD colspan="4" align="center"><h4>Контакты</h4></TD>
|
|
||||||
</TR>
|
|
||||||
<?php
|
<?php
|
||||||
$data = mysql_query("SELECT `notinlist`,`comment` FROM `friends` WHERE `user` = '" . $user['id'] . "' and `notinlist`>0;");
|
$data = mysql_query("SELECT `friend`,`comment` FROM `friends` WHERE `user` = '" . $user['id'] . "' and `friend`>0;");
|
||||||
while ($row = mysql_fetch_array($data)) {
|
while ($row = mysql_fetch_array($data)) {
|
||||||
$us = mysql_fetch_array(mysql_query("SELECT `id`,`login`,`klan`,`level`,`align`,`room`, `invis`, (select `id` from `online` WHERE `date` >= " . (time() - 60) . " AND `id` = users.`id`) as `online` FROM `users` WHERE `id` = '" . $row['notinlist'] . "';")); ?>
|
$us = mysql_fetch_array(mysql_query("SELECT `id`,`login`,`klan`,`level`,`align`,`room`, `invis`, (select `id` from `online` WHERE `date` >= " . (time() - 60) . " AND `id` = users.`id`) as `online` FROM `users` WHERE `id` = '" . $row['notinlist'] . "';")); ?>
|
||||||
|
|
||||||
|
|
||||||
<TR valign="top">
|
<TR valign="top">
|
||||||
<TD bgcolor=efeded nowrap>
|
<TD>
|
||||||
<?
|
<h3>Контакты</h3>
|
||||||
|
<?php
|
||||||
if ($us['online'] > 0 && !$us["invis"]) {
|
if ($us['online'] > 0 && !$us["invis"]) echo nick::id($us['id'])->full() . " - <i>" . $rooms[$us['room']] . "</i><br>";
|
||||||
echo '<a HREF="javascript:top.AddToPrivate(\'', nick::id($us['id'])->short(), '\', top.CtrlPress)" target=refreshed><img src="i/lock.gif" width=20 height=15></A>';
|
else echo "<span style='color: grey'>" . nick::id($us['id'])->full() . "</span> - Нет в клубе<br>";
|
||||||
echo nick::id($us['id'])->full();
|
|
||||||
$rrm = $rooms[$us['room']];
|
|
||||||
echo ' - <i>', $rrm, '</i><BR>';
|
|
||||||
} else {
|
|
||||||
|
|
||||||
echo '<font color=gray><img src="i/offline.gif" width=20 height=15 alt="Нет в клубе">';
|
|
||||||
echo nick::id($us['id'])->full();
|
|
||||||
echo '</font> - Нет в клубе<BR>';
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</TD>
|
</TD>
|
||||||
<TD bgcolor=efeded width="40%">
|
<TD bgcolor=efeded width="40%">
|
||||||
<small><FONT class=dsc><i><?= $row['comment'] ?></i></FONT></small>
|
<small><span class=dsc><i><?= $row['comment'] ?></i></span></small>
|
||||||
<TD>
|
<TD>
|
||||||
<TD width="1%"><INPUT type=image SRC=i/friend/b__ok.gif WIDTH=25 HEIGHT=18 ALT="Редактировать"
|
<TD width="1%">
|
||||||
style="float: right"
|
<INPUT type=image SRC=i/friend/b__ok.gif WIDTH=25 HEIGHT=18 ALT="Редактировать"
|
||||||
onclick='editcontact("Редактирование контакта", "contactscontacts.php", "friendedit", "<?= $us['login'] ?>", "<SCRIPT>drwfl(\"<?= $us['login'] ?>\",<?= $row['notinlist'] ?>,\"<?= $us['level'] ?>\",<?= $us['align'] ?>,\"<?= $us['klan'] ?>\")</SCRIPT>", "2", new Array( "Друзья","Враги","Не в группе" ), "", new Array( ), "<?= $row['comment'] ?>");'>
|
style="float: right"
|
||||||
|
onclick='editcontact("Редактирование контакта", "contactscontacts.php", "friendedit", "<?= $us['login'] ?>", "<SCRIPT>drwfl(\"<?= $us['login'] ?>\",<?= $row['notinlist'] ?>,\"<?= $us['level'] ?>\",<?= $us['align'] ?>,\"<?= $us['klan'] ?>\")</SCRIPT>", "2", ["Друзья","Враги","Не в группе"], "", [], "<?= $row['comment'] ?>");'>
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
<?
|
<?
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<TR>
|
<TR>
|
||||||
<TD colspan="4" nowrap align="center" style="height: 40px" valign="bottom"><h4>Враги</h4></TD>
|
<TD colspan="4">
|
||||||
</TR>
|
<INPUT type='button' style='width: 100px' value='Добавить'
|
||||||
<?
|
onclick='findlogin2("Добавить в список", "contacts.php", "friendadd", "Друзья", [])'>
|
||||||
$data = mysql_query("SELECT `enemy`,`comment` FROM `friends` WHERE `user` = '" . $user['id'] . "' and `enemy`>0;");
|
|
||||||
while ($row = mysql_fetch_array($data)) {
|
|
||||||
$us = mysql_fetch_array(mysql_query("SELECT `id`,`login`,`klan`,`level`,`align`,`room`, `invis`, (select `id` from `online` WHERE `date` >= " . (time() - 60) . " AND `id` = users.`id`) as `online` FROM `users` WHERE `id` = '" . $row['enemy'] . "';")); ?>
|
|
||||||
|
|
||||||
|
|
||||||
<TR valign="top">
|
|
||||||
<TD bgcolor=efeded nowrap>
|
|
||||||
<?
|
|
||||||
|
|
||||||
if ($us['online'] > 0 && !$us["invis"]) {
|
|
||||||
echo '<A HREF="javascript:top.AddToPrivate(\'', nick::id($us['id'])->short(), '\', top.CtrlPress)" target=refreshed><img src="i/lock.gif" width=20 height=15></A>';
|
|
||||||
echo nick::id($us['id'])->full();
|
|
||||||
$rrm = $rooms[$us['room']];
|
|
||||||
echo ' - <i>', $rrm, '</i><BR>';
|
|
||||||
} else {
|
|
||||||
|
|
||||||
echo '<font color=gray><img src="i/offline.gif" width=20 height=15 alt="Нет в клубе">';
|
|
||||||
echo nick::id($us['id'])->full();
|
|
||||||
echo '</font> - Нет в клубе<BR>';
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
|
||||||
</TD>
|
|
||||||
<TD bgcolor=efeded width="40%">
|
|
||||||
<small><FONT class=dsc><i><?= $row['comment'] ?></i></FONT></small>
|
|
||||||
<TD>
|
|
||||||
<TD width="1%"><INPUT type=image SRC=i/friend/b__ok.gif WIDTH=25 HEIGHT=18 ALT="Редактировать"
|
|
||||||
style="float: right"
|
|
||||||
onclick='editcontact("Редактирование контакта", "contactscontacts.php", "friendedit", "<?= $us['login'] ?>", "<SCRIPT>drwfl(\"<?= $us['login'] ?>\",<?= $row['enemy'] ?>,\"<?= $us['level'] ?>\",<?= $us['align'] ?>,\"<?= $us['klan'] ?>\")</SCRIPT>", "1", new Array( "Друзья","Враги","Не в группе" ), "", new Array( ), "<?= $row['comment'] ?>");'>
|
|
||||||
</TD>
|
|
||||||
</TR>
|
|
||||||
<?
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<TR>
|
|
||||||
<TD colspan="4" nowrap align="center" style="height: 40px" valign="bottom"><h4>Друзья</h4></TD>
|
|
||||||
</TR>
|
|
||||||
|
|
||||||
<?
|
|
||||||
$data = mysql_query("SELECT `friend`,`comment` FROM `friends` WHERE `user` = '" . $user['id'] . "' and `friend`>0;");
|
|
||||||
while ($row = mysql_fetch_array($data)) {
|
|
||||||
$us = mysql_fetch_array(mysql_query("SELECT `id`,`login`,`klan`,`level`,`align`,`room`, `invis`, (select `id` from `online` WHERE `date` >= " . (time() - 60) . " AND `id` = users.`id`) as `online` FROM `users` WHERE `id` = '" . $row['friend'] . "';")); ?>
|
|
||||||
|
|
||||||
|
|
||||||
<TR valign="top">
|
|
||||||
<TD bgcolor=efeded nowrap>
|
|
||||||
<?
|
|
||||||
|
|
||||||
if ($us['online'] > 0 && !$us["invis"]) {
|
|
||||||
echo '<A HREF="javascript:top.AddToPrivate(\'', nick::id($us['id'])->short(), '\', top.CtrlPress)" target=refreshed><img src="i/lock.gif" width=20 height=15></A>';
|
|
||||||
echo nick::id($us['id'])->full();
|
|
||||||
if ($us['room'] > 500 && $us['room'] < 561)
|
|
||||||
$rrm = "Башня Смерти";
|
|
||||||
else
|
|
||||||
$rrm = $rooms[$us['room']];
|
|
||||||
echo ' - <i>', $rrm, '</i><BR>';
|
|
||||||
} else {
|
|
||||||
|
|
||||||
echo '<font color=gray><img src="i/offline.gif" width=20 height=15 alt="Нет в клубе">';
|
|
||||||
echo nick::id($us['id'])->full();
|
|
||||||
echo '</font> - Нет в клубе<BR>';
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
|
||||||
</TD>
|
|
||||||
<TD bgcolor=efeded width="40%">
|
|
||||||
<small><FONT class=dsc><i><?= $row['comment'] ?></i></FONT></small>
|
|
||||||
<TD>
|
|
||||||
<TD width="1%"><INPUT type=image SRC=i/friend/b__ok.gif WIDTH=25 HEIGHT=18 ALT="Редактировать"
|
|
||||||
style="float: right"
|
|
||||||
onclick='editcontact("Редактирование контакта", "contactscontacts.php", "friendedit", "<?= $us['login'] ?>", "<SCRIPT>drwfl(\"<?= $us['login'] ?>\",<?= $row['friend'] ?>,\"<?= $us['level'] ?>\",<?= $us['align'] ?>,\"<?= $us['klan'] ?>\")</SCRIPT>", "7", new Array( "Друзья","Враги","Не в группе" ), "", new Array( ), "<?= $row['comment'] ?>");'>
|
|
||||||
</TD>
|
|
||||||
</TR>
|
|
||||||
<?
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<TR>
|
|
||||||
<TD colspan="4"><INPUT type='button' style='width: 100px' value='Добавить'
|
|
||||||
onclick='findlogin2("Добавить в список", "contactscontacts.php", "friendadd", new Array("Друзья","Враги","Не в группе"), new Array())'>
|
|
||||||
|
|
||||||
<INPUT type='button' style='width: 100px' value='Удалить'
|
<INPUT type='button' style='width: 100px' value='Удалить'
|
||||||
onclick='findlogin("Удалить из списка", "contactscontacts.php", "friendremove", "", 0)'>
|
onclick='findlogin("Удалить из списка", "contacts.php", "friendremove", "", 0)'>
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
</TABLE>
|
</TABLE>
|
||||||
</TD>
|
</TD>
|
||||||
<TD style="width: 5%; vertical-align: top; "> </TD>
|
|
||||||
<TD style="width: 30%; vertical-align: top; ">
|
<TD style="width: 30%; vertical-align: top; ">
|
||||||
<TABLE cellspacing=0 cellpadding=2>
|
<TABLE cellspacing=0 cellpadding=2>
|
||||||
<TR>
|
<TR>
|
||||||
@ -277,43 +180,20 @@ if ($_POST['friendedit']) {
|
|||||||
<INPUT type='button'
|
<INPUT type='button'
|
||||||
value='Обновить'
|
value='Обновить'
|
||||||
style='width: 75px'
|
style='width: 75px'
|
||||||
onclick='location="/contactscontacts.php?friends=0.834468433941264"'>
|
onclick='location="/contacts.php?friends=0.834468433941264"'>
|
||||||
<INPUT TYPE=button value="Вернуться" style='width: 75px'
|
<INPUT TYPE=button value="Вернуться" style='width: 75px'
|
||||||
onclick="location.href='main.php';">
|
onclick="location.href='main.php';">
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
<TR>
|
|
||||||
<TD align=center><h4>Модераторы on-line</h4></TD>
|
|
||||||
</TR>
|
|
||||||
<TR>
|
<TR>
|
||||||
<TD bgcolor=efeded nowrap style="text-align: center; ">
|
<TD bgcolor=efeded nowrap style="text-align: center; ">
|
||||||
<table>
|
<h3>Администраторы</h3>
|
||||||
<?php
|
<?php while ($row = $admins_list->fetch_assoc()) echo nick::id($row['id'])->full() . "<br>"; ?>
|
||||||
$data = mysql_query("SELECT `id`, `login`, `level`, `align`, (select `id` from `online` WHERE `date` >= " . (time() - 60) . " AND `id` = users.`id`) as `online` FROM `users` WHERE (align>1 and align<2) or (align>3 and align<4) order by align desc, login asc ;");
|
|
||||||
while ($row = mysql_fetch_array($data)) {
|
|
||||||
if ($row['online'] > 0 && $row['id'] > 0) {
|
|
||||||
echo '<tr><td><A HREF="javascript:top.AddToPrivate(\'', $row['login'], '\', top.CtrlPress)" target=refreshed><img src="i/lock.gif" width=20 height=15></A>';
|
|
||||||
echo nick::id($row['id'])->full();
|
|
||||||
echo '</tr></td>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</table>
|
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
<TR>
|
|
||||||
<TD style="text-align: left; ">
|
|
||||||
<small>Уважаемые Игроки!<BR>Для более быстрого и эффективного решения Вашей проблемы просьба
|
|
||||||
обращаться к тем Модераторам, ники которых находятся вверху списка "Модераторы on-line".
|
|
||||||
<BR>Цените
|
|
||||||
свое и чужое время!
|
|
||||||
</small>
|
|
||||||
</div></TD>
|
|
||||||
</TR>
|
|
||||||
</TABLE>
|
</TABLE>
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
|
|
||||||
</TABLE>
|
</TABLE>
|
||||||
|
|
||||||
<script src="js/sl2.21.js"></script>
|
<script src="js/sl2.21.js"></script>
|
||||||
@ -335,8 +215,6 @@ if ($_POST['friendedit']) {
|
|||||||
}
|
}
|
||||||
s += '</SELECT></td></tr>';
|
s += '</SELECT></td></tr>';
|
||||||
}
|
}
|
||||||
;
|
|
||||||
|
|
||||||
s += '<tr><td align=right><small><b>Комментарий:</b></small></td><td width="1%"><INPUT TYPE=text NAME="comment" VALUE="' + comment + '" style="width: 105px"> ';
|
s += '<tr><td align=right><small><b>Комментарий:</b></small></td><td width="1%"><INPUT TYPE=text NAME="comment" VALUE="' + comment + '" style="width: 105px"> ';
|
||||||
s += '<INPUT type=image SRC=i/friend/b__ok.gif WIDTH=25 HEIGHT=18 ALT="Сохранить" style="border:0; vertical-align: middle"></TD></TR></TABLE><INPUT TYPE=hidden name=sd4 value=""></TD></FORM></TR></TABLE></td></tr></table>';
|
s += '<INPUT type=image SRC=i/friend/b__ok.gif WIDTH=25 HEIGHT=18 ALT="Сохранить" style="border:0; vertical-align: middle"></TD></TR></TABLE><INPUT TYPE=hidden name=sd4 value=""></TD></FORM></TR></TABLE></td></tr></table>';
|
||||||
document.all("hint4").innerHTML = s;
|
document.all("hint4").innerHTML = s;
|
||||||
@ -360,8 +238,6 @@ if ($_POST['friendedit']) {
|
|||||||
}
|
}
|
||||||
s += '</SELECT></td></tr>';
|
s += '</SELECT></td></tr>';
|
||||||
}
|
}
|
||||||
;
|
|
||||||
|
|
||||||
s += '<tr><td align=right><small><b>Комментарий:</b></small></td><td><INPUT TYPE=text NAME="comment" VALUE="" style="width:105px"> ';
|
s += '<tr><td align=right><small><b>Комментарий:</b></small></td><td><INPUT TYPE=text NAME="comment" VALUE="" style="width:105px"> ';
|
||||||
s += '<INPUT type=image SRC=i/friend/b__ok.gif WIDTH=25 HEIGHT=18 ALT="Добавить контакт" style="border:0; vertical-align: middle"></TD></TR></TABLE><INPUT TYPE=hidden name=sd4 value="1"></TD></TR></TABLE></td></tr></table></FORM>';
|
s += '<INPUT type=image SRC=i/friend/b__ok.gif WIDTH=25 HEIGHT=18 ALT="Добавить контакт" style="border:0; vertical-align: middle"></TD></TR></TABLE><INPUT TYPE=hidden name=sd4 value="1"></TD></TR></TABLE></td></tr></table></FORM>';
|
||||||
document.all("hint4").innerHTML = s;
|
document.all("hint4").innerHTML = s;
|
||||||
@ -464,7 +340,6 @@ if ($_POST['friendedit']) {
|
|||||||
|
|
||||||
document.write(s);
|
document.write(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</HTML>
|
</HTML>
|
Loading…
Reference in New Issue
Block a user