Нет дилеров - нет панели.

This commit is contained in:
lopar 2018-12-13 22:37:51 +02:00
parent 875ade0a0d
commit 6aa3055288

View File

@ -2,9 +2,9 @@
ob_start("ob_gzhandler");
session_start();
if ($_SESSION['uid'] == null) header("Location: index.php");
include "config.php";
include "functions.php";
$friend = mysql_fetch_array(mysql_query("SELECT * FROM `friends` WHERE `user` = '{$user['id']}' LIMIT 1;"));
require_once 'functions.php';
$friend = db::c()->query('SELECT * FROM `friends` WHERE `user` = ?i', $_SESSION['uid'])->fetch_assoc();
if ($_POST['sd4'] && $_POST['friendadd']) {
@ -16,14 +16,28 @@ echo"<font color=red>Персонаж не найден.</font>";
}
$_POST['comment'] = htmlspecialchars($_POST['comment'], NULL, "");
$igogo2 = mysql_fetch_array(mysql_query("SELECT enemy,friend,notinlist FROM `friends` WHERE `user` = '" . $user['id'] . "' and (`friend`=" . $igogo['id'] . " or `enemy`=" . $igogo['id'] . " or `notinlist`=" . $igogo['id'] . ") LIMIT 1;"));
if(!$igogo['id']){echo"<font color=red>Персонаж не найден.</font>";}
elseif($igogo['id']==$user['id']){echo"<font color=red>Себя добавить нельзя.</font>";}
elseif(preg_match("/__/",$_POST['comment']) || preg_match("/--/",$_POST['comment'])){echo"<font color=red>Введен неверный текст.</font>";}
elseif($igogo2['enemy'] or $igogo2['friend'] or $igogo2['notinlist']){echo"<font color=red>Персонаж уже есть в вашем списке.</font>";}
else{
if($_POST['group']==0){$notinlist=0; $friend=$igogo['id']; $enemy=0;}
elseif($_POST['group']==1){$notinlist=0; $friend=0; $enemy=$igogo['id'];}
else{$notinlist=$igogo['id']; $friend=0; $enemy=0;}
if (!$igogo['id']) {
echo "<font color=red>Персонаж не найден.</font>";
} elseif ($igogo['id'] == $user['id']) {
echo "<font color=red>Себя добавить нельзя.</font>";
} elseif (preg_match("/__/", $_POST['comment']) || preg_match("/--/", $_POST['comment'])) {
echo "<font color=red>Введен неверный текст.</font>";
} elseif ($igogo2['enemy'] or $igogo2['friend'] or $igogo2['notinlist']) {
echo "<font color=red>Персонаж уже есть в вашем списке.</font>";
} else {
if ($_POST['group'] == 0) {
$notinlist = 0;
$friend = $igogo['id'];
$enemy = 0;
} elseif ($_POST['group'] == 1) {
$notinlist = 0;
$friend = 0;
$enemy = $igogo['id'];
} else {
$notinlist = $igogo['id'];
$friend = 0;
$enemy = 0;
}
mysql_query("INSERT INTO `friends` (`user`, `friend`, `enemy`, `notinlist`, `comment`) VALUES(" . $user['id'] . ", " . $friend . ", " . $enemy . ", " . $notinlist . ", '" . $_POST['comment'] . "');");
echo "<font color=red>Персонаж <b>" . $_POST['friendadd'] . "</b> добавлен.</font>";
}
@ -36,26 +50,31 @@ echo"<font color=red>Персонаж не найден.</font>";
} else {
$igogo = mysql_fetch_array(mysql_query("SELECT id FROM `users` WHERE `login` = '{$_POST['friendremove']}' LIMIT 1;"));
}
if(!$igogo['id']){echo"<font color=red>Персонаж не найден.</font>";}
else{$igogo2 = mysql_fetch_array(mysql_query("SELECT enemy,friend,notinlist FROM `friends` WHERE `user` = '".$user['id']."' and (`friend`=".$igogo['id']." or `enemy`=".$igogo['id']." or `notinlist`=".$igogo['id'].") LIMIT 1;"));
if(!$igogo2['enemy'] && !$igogo2['friend'] && !$igogo2['notinlist']){echo"<font color=red>Персонаж не найден в вашем списке.</font>";}else{
if($igogo2['friend']>0){$per="`friend`='".$igogo2['friend']."'";}
if($igogo2['enemy']>0){$per="`enemy`='".$igogo2['enemy']."'";}
if($igogo2['notinlist']>0){$per="`notinlist`='".$igogo2['notinlist']."'";}
if(mysql_query("DELETE FROM `friends` WHERE `user`='".$user['id']."' and ".$per.";")){echo"<font color=red>Данные контакта <b>".$_POST['friendremove']."</b> успешно удалены.</font>";}
if (!$igogo['id']) {
echo "<font color=red>Персонаж не найден.</font>";
} else {
$igogo2 = mysql_fetch_array(mysql_query("SELECT enemy,friend,notinlist FROM `friends` WHERE `user` = '" . $user['id'] . "' and (`friend`=" . $igogo['id'] . " or `enemy`=" . $igogo['id'] . " or `notinlist`=" . $igogo['id'] . ") LIMIT 1;"));
if (!$igogo2['enemy'] && !$igogo2['friend'] && !$igogo2['notinlist']) {
echo "<font color=red>Персонаж не найден в вашем списке.</font>";
} else {
if ($igogo2['friend'] > 0) {
$per = "`friend`='" . $igogo2['friend'] . "'";
}
if ($igogo2['enemy'] > 0) {
$per = "`enemy`='" . $igogo2['enemy'] . "'";
}
if ($igogo2['notinlist'] > 0) {
$per = "`notinlist`='" . $igogo2['notinlist'] . "'";
}
if (mysql_query("DELETE FROM `friends` WHERE `user`='" . $user['id'] . "' and " . $per . ";")) {
echo "<font color=red>Данные контакта <b>" . $_POST['friendremove'] . "</b> успешно удалены.</font>";
}
}
}
}
if ($_POST['friendedit']) {
$_POST['friendedit'] = htmlspecialchars($_POST['friendedit'], NULL, 'cp1251');
if (preg_match("/__/", $_POST['friendedit']) || preg_match("/--/", $_POST['friendedit'])) {
echo "<font color=red>Персонаж не найден.</font>";
@ -63,47 +82,248 @@ echo"<font color=red>Персонаж не найден.</font>";
$igogo = mysql_fetch_array(mysql_query("SELECT id FROM `users` WHERE `login` = '{$_POST['friendedit']}' LIMIT 1;"));
}
$_POST['comment'] = htmlspecialchars($_POST['comment'], NULL, "");
if(!$igogo['id']){echo"<font color=red>Персонаж не найден.</font>";}
elseif($igogo['id']==$user['id']){echo"<font color=red>Себя отредактировать нельзя.</font>";}
elseif(preg_match("/__/",$_POST['comment']) || preg_match("/--/",$_POST['comment'])){echo"<font color=red>Введен неверный текст.</font>";}
else{
if (!$igogo['id']) {
echo "<font color=red>Персонаж не найден.</font>";
} elseif ($igogo['id'] == $user['id']) {
echo "<font color=red>Себя отредактировать нельзя.</font>";
} elseif (preg_match("/__/", $_POST['comment']) || preg_match("/--/", $_POST['comment'])) {
echo "<font color=red>Введен неверный текст.</font>";
} else {
if($_POST['group']==0){$notinlist=0; $friend=$igogo['id']; $enemy=0;}
elseif($_POST['group']==1){$notinlist=0; $friend=0; $enemy=$igogo['id'];}
else{$notinlist=$igogo['id']; $friend=0; $enemy=0;}
if ($_POST['group'] == 0) {
$notinlist = 0;
$friend = $igogo['id'];
$enemy = 0;
} elseif ($_POST['group'] == 1) {
$notinlist = 0;
$friend = 0;
$enemy = $igogo['id'];
} else {
$notinlist = $igogo['id'];
$friend = 0;
$enemy = 0;
}
$igogo2 = mysql_fetch_array(mysql_query("SELECT enemy,friend,notinlist FROM `friends` WHERE `user` = '" . $user['id'] . "' and (`friend`=" . $igogo['id'] . " or `enemy`=" . $igogo['id'] . " or `notinlist`=" . $igogo['id'] . ") LIMIT 1;"));
if(!$igogo2['enemy'] && !$igogo2['friend'] && !$igogo2['notinlist']){echo"<font color=red>Персонаж не найден в вашем списке.</font>";}else{
if($igogo2['friend']>0){$per="`friend`='".$igogo2['friend']."'";}
if($igogo2['enemy']>0){$per="`enemy`='".$igogo2['enemy']."'";}
if($igogo2['notinlist']>0){$per="`notinlist`='".$igogo2['notinlist']."'";}
if (!$igogo2['enemy'] && !$igogo2['friend'] && !$igogo2['notinlist']) {
echo "<font color=red>Персонаж не найден в вашем списке.</font>";
} else {
if ($igogo2['friend'] > 0) {
$per = "`friend`='" . $igogo2['friend'] . "'";
}
if ($igogo2['enemy'] > 0) {
$per = "`enemy`='" . $igogo2['enemy'] . "'";
}
if ($igogo2['notinlist'] > 0) {
$per = "`notinlist`='" . $igogo2['notinlist'] . "'";
}
mysql_query("UPDATE `friends` SET `friend` = " . $friend . ",`enemy` = " . $enemy . ",`notinlist` = " . $notinlist . ",`comment` = " . $_POST['comment'] . " WHERE `user`='" . $user['id'] . "' and " . $per . "");
echo "<font color=red>Данные контакта <b>" . $_POST['friendedit'] . "</b> успешно изменены.</font>";
}
}
}
?>
<HTML>
<HEAD>
<meta charset="utf-8">
<link rel=stylesheet href="css/main.css">
<link rel=stylesheet href="css/friend/main.css">
<link href="css/friend/design3.css" rel="stylesheet" type="text/css">
</HEAD>
<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 bgcolor=e2e0e0>
<div id=hint4 class=ahint></div>
<TABLE cellspacing=0 cellpadding=2 width="100%">
<TR>
<TD style="vertical-align: top; ">
<TABLE cellspacing=0 cellpadding=2 width="100%">
<TR>
<TD colspan="4" align="center"><h4>Контакты</h4></TD>
</TR>
<?php
$data = mysql_query("SELECT `notinlist`,`comment` FROM `friends` WHERE `user` = '" . $user['id'] . "' and `notinlist`>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['notinlist'] . "';")); ?>
<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>';
}
}
?>
<HTML><HEAD>
<meta content="text/html; charset=utf-8" http-equiv=Content-type>
<META Http-Equiv=Cache-Control Content=no-cache>
<meta http-equiv=PRAGMA content=NO-CACHE>
<META Http-Equiv=Expires Content=0>
<link rel=stylesheet type="text/css" href="css/friend/main.css">
<link href="css/friend/design3.css" rel="stylesheet" type="text/css">
</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['notinlist'] ?>,\"<?= $us['level'] ?>\",<?= $us['align'] ?>,\"<?= $us['klan'] ?>\")</SCRIPT>", "2", 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 `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'] . "';")); ?>
<SCRIPT LANGUAGE="JavaScript" SRC="js/sl2.21.js"></SCRIPT>
<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())'>
&nbsp;&nbsp;&nbsp;
<INPUT type='button' style='width: 100px' value='Удалить'
onclick='findlogin("Удалить из списка", "contactscontacts.php", "friendremove", "", 0)'>
</TD>
</TR>
</TABLE>
</TD>
<TD style="width: 5%; vertical-align: top; ">&nbsp;</TD>
<TD style="width: 30%; vertical-align: top; ">
<TABLE cellspacing=0 cellpadding=2>
<TR>
<TD style="width: 25%; vertical-align: top; text-align: right; ">
<INPUT type='button'
value='Обновить'
style='width: 75px'
onclick='location="/contactscontacts.php?friends=0.834468433941264"'>
&nbsp;<INPUT TYPE=button value="Вернуться" style='width: 75px'
onclick="location.href='main.php';">
</TD>
</TR>
<TR>
<TD align=center><h4>Модераторы on-line</h4></TD>
</TR>
<TR>
<TD bgcolor=efeded nowrap style="text-align: center; ">
<table>
<?php
$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>
</TR>
<TR>
<TD style="text-align: left; ">
<small>Уважаемые Игроки!<BR>Для более быстрого и эффективного решения Вашей проблемы просьба
обращаться к тем Модераторам, ники которых находятся вверху списка "Модераторы on-line".
<BR>Цените
свое и чужое время!
</small>
</div></TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
<script src="js/sl2.21.js"></script>
<script>
var nlevel = 0;
var from = Array('+', ' ', '#');
var to = Array('%2B', '+', '%23');
function editcontact(title, script, name, login, flogin, group, groups, subgroup, subgroups, comment)
{ var s = '<table width=250 cellspacing=1 cellpadding=0 bgcolor=CCC3AA><tr><td align=center><B>'+title+'</td><td width=20 align=right valign=top style="cursor: hand" onclick="closehint3();"><BIG><B>x</td></tr><tr><td colspan=2>';
function editcontact(title, script, name, login, flogin, group, groups, subgroup, subgroups, comment) {
var s = '<table width=250 cellspacing=1 cellpadding=0 bgcolor=CCC3AA><tr><td align=center><B>' + title + '</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 cellspacing=0 cellpadding=4 bgcolor=FFF6DD><tr><form action="' + script + '" method=POST><td align=center>';
s += '<table width=1% border=0 cellspacing=0 cellpadding=2 align=center><tr><td align=right>';
flogin = flogin.replace(/^<SCRIPT>drwfl\((.*)\)<\/SCRIPT>$/i, 'drw($1)');
@ -114,7 +334,8 @@ function editcontact(title, script, name, login, flogin, group, groups, subgroup
s += '<option value="' + i + '"' + (group == i ? ' selected' : '') + '>' + groups[i];
}
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">&nbsp;';
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>';
@ -126,8 +347,8 @@ document.all("comment").focus();
Hint3Name = '';
}
function findlogin2(title, script, name, groups, subgroups)
{ var s = '<form action="'+script+'" method=POST><table width=270 cellspacing=1 cellpadding=0 bgcolor=CCC3AA><tr><td align=center><B>'+title+'</td><td width=20 align=right valign=top style="cursor: hand" onclick="closehint3();"><BIG><B>x</td></tr><tr><td colspan=2>';
function findlogin2(title, script, name, groups, subgroups) {
var s = '<form action="' + script + '" method=POST><table width=270 cellspacing=1 cellpadding=0 bgcolor=CCC3AA><tr><td align=center><B>' + title + '</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% cellspacing=0 cellpadding=2 bgcolor=FFF6DD><tr><td align=center>';
s += '<table width=90% cellspacing=0 cellpadding=2 align=center><tr><td align=left colspan="2">';
s += 'Укажите логин персонажа:<br><small>(можно щелкнуть по логину в чате)</small></td></tr>';
@ -138,7 +359,8 @@ for(i=0; i< groups.length; i++) {
s += '<option value="' + i + '">' + groups[i];
}
s += '</SELECT></td></tr>';
};
}
;
s += '<tr><td align=right><small><b>Комментарий:</b></small></td><td><INPUT TYPE=text NAME="comment" VALUE="" style="width:105px">&nbsp;';
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>';
@ -179,7 +401,9 @@ s+=online;
}
if (align == "") align = "0";
s += ' <IMG SRC=i/align' + align + '.gif WIDTH=12 HEIGHT=15>';
if (klan!='') {s+='<IMG SRC="i/klan/'+klan+'.gif" WIDTH=24 HEIGHT=15 ALT="">'}
if (klan != '') {
s += '<IMG SRC="i/klan/' + klan + '.gif" WIDTH=24 HEIGHT=15 ALT="">'
}
if (level) {
if (nlevel == 0) {
nlevel = 1; //s="<BR>"+s;
@ -197,6 +421,7 @@ s+='</FONT>';
}
document.write(s + '<BR>');
}
function m(login, id, align, klan, level) {
var s = '';
s += '<a href="javascript:top.AddToPrivate(\'' + login + '\',true)"><IMG SRC=i/friend/lock.gif WIDTH=20 HEIGHT=15 ALT="Приватно"></a>';
@ -207,8 +432,8 @@ s+='<IMG SRC="i/klan/'+klan+'.gif" WIDTH=24 HEIGHT=15 ALT="">'
s += '<a href="javascript:top.AddTo(\'' + login + '\')">' + login + '</a>[' + level + ']<a href=/inf.pl?' + id + ' target=_blank><IMG SRC=i/inf.gif WIDTH=12 HEIGHT=11 ALT="Информация о персонаже"></a>';
document.write(s + '<BR>');
}
function drw(name, id, level, align, klan, img, sex)
{
function drw(name, id, level, align, klan, img, sex) {
var s = "";
if (align != "0") s += "<A HREF='" + getalignurl(align) + "' target=_blank><IMG SRC='i/align_" + align + ".gif' WIDTH=12 HEIGHT=15 ALT=\"" + getalign(align) + "\"></A>";
if (klan) s += "<A HREF='claninf.php?" + klan + "' target=_blank><IMG SRC='i/klan/" + klan + ".gif' WIDTH=24 HEIGHT=15 ALT=''></A>";
@ -219,8 +444,7 @@ if (img) s+="<A HREF='http://capitalcity.combats.com/encicl/obraz_"+(sex?"w":"m"
return s;
}
function getalign(al)
{
function getalign(al) {
al += "";
if (al.substring(0, 1) == "3") return ("Темное братство");
if (al.substring(0, 1) == "2") return ("Хаос");
@ -229,8 +453,7 @@ function getalign(al)
return ("");
}
function drwfl(name, id, level, align, klan)
{
function drwfl(name, id, level, align, klan) {
var s = "";
if (align != "0") s += "<IMG SRC='i/align_" + align + ".gif' WIDTH=12 HEIGHT=15 ALT=\"" + getalign(align) + "\">";
@ -243,178 +466,5 @@ function drwfl(name, id, level, align, klan)
}
</script>
</HEAD>
<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 bgcolor=e2e0e0>
<div id=hint4 class=ahint></div>
<TABLE cellspacing=0 cellpadding=2 width="100%">
<TR>
<TD style="vertical-align: top; "><TABLE cellspacing=0 cellpadding=2 width="100%">
<TR>
<TD colspan="4" align="center"><h4>Контакты</h4></TD>
</TR>
<?php
$data=mysql_query("SELECT `notinlist`,`comment` FROM `friends` WHERE `user` = '".$user['id']."' and `notinlist`>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['notinlist']."';"));?>
<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['notinlist']?>,\"<?=$us['level']?>\",<?=$us['align']?>,\"<?=$us['klan']?>\")</SCRIPT>", "2", 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 `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())'>
&nbsp;&nbsp;&nbsp;
<INPUT type='button' style='width: 100px' value='Удалить' onclick='findlogin("Удалить из списка", "contactscontacts.php", "friendremove", "", 0)'></TD>
</TR>
</TABLE></TD>
<TD style="width: 5%; vertical-align: top; ">&nbsp;</TD>
<TD style="width: 30%; vertical-align: top; "><TABLE cellspacing=0 cellpadding=2>
<TR>
<TD style="width: 25%; vertical-align: top; text-align: right; "><INPUT type='button' value='Обновить' style='width: 75px' onclick='location="/contactscontacts.php?friends=0.834468433941264"'>
&nbsp;<INPUT TYPE=button value="Вернуться" style='width: 75px' onclick="location.href='main.php';"></TD>
</TR>
<TR>
<TD align=center><h4>Модераторы on-line</h4></TD>
</TR>
<TR>
<TD bgcolor=efeded nowrap style="text-align: center; "><table>
<?
$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>
</TR>
<TR>
<TD style="text-align: left; "><small>Уважаемые Игроки!<BR>Для более быстрого и эффективного решения Вашей проблемы просьба обращаться к тем Модераторам, ники которых находятся вверху списка "Модераторы on-line".<BR>Цените свое и чужое время!</small></div></TD>
</TR>
<TR>
<TD align=center><h4>Дилеры on-line</h4></TD>
</TR>
<TR>
<TD bgcolor=efeded nowrap style="text-align: center; "><table>
<?
$data=mysql_query("SELECT `id`, `login`, `level`, `align`, `invis`, (select `id` from `online` WHERE `date` >= ".(time()-60)." AND `id` = users.`id`) as `online` FROM `users` WHERE (`deal` = 1 OR `align` = 5) order by align desc, login asc ;");
while ($row = mysql_fetch_array($data)) {
if($row['id'] == 777 || $row['id'] == 9081 ) { $row["invis"] = 1; }
if ($row['online']>0 && $row['id']>0 && !$row["invis"]) {
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>
</TR>
<TR>
<TD style="text-align: left; "><small>Список дилеров находящихся на данный момент в on-line.<BR>Вы всегда можете узнать как приобрести екр в игре.</small></div></TD>
</TR>
</TABLE></TD>
</TR>
</TABLE>
</body>
</HTML>