<?

$zinat = mysql_query ("SELECT * FROM zags WHERE na_kom='$ank[id]'");
$row = mysql_fetch_array($zinat);
$zinat1 = mysql_query ("SELECT * FROM zags WHERE id_know='$ank[id]'");
$row1 = mysql_fetch_array($zinat1);
$zinat12 = mysql_query ("SELECT * FROM zags WHERE id_user='$ank[id]'");
$row12 = mysql_fetch_array($zinat12);
$zam=get_user($row1['id_user']);
$zam1=get_user($row12['id_know']);
if (isset($user) && $user['id']==$row['na_kom'])
{
echo "<span class=\"ank_n\">Вам предложение бракосочетания</span> <span class=\"ank_d\"><a href='/moduls.zags/edit.php?act=da'>Принять</a> | </span>";
echo "<span class=\"ank_d\"><a href='/moduls.zags/edit.php?act=net'>Отказатся</a></span><br />";
}
if (isset($user) && $ank['id'] == $row1['id_know'] && $row1['zinat'] == 'da')
{
echo" <img src='/moduls.zags/img/love.png' alt='' />";
echo ($ank['pol'] == 1? 'Женат на ' : 'Замужем за ');
echo "<a href='info.php?id=$zam[id]'>$zam[nick]</a><br />";
}
if (isset($user) && $ank['id'] == $row12['id_user'] && $row12['zinat'] == 'da')
{
echo" <img src='/moduls.zags/img/love.png' alt='' />";
echo ($ank['pol'] == 1? 'Женат на ' : 'Замужем за ');
echo "<a href='info.php?id=$zam1[id]'>$zam1[nick]</a><br />";
}


?>

