<?php
error_reporting(0);
include_once '../sys/inc/start.php';
include_once '../sys/inc/compress.php';
include_once '../sys/inc/sess.php';
include_once '../sys/inc/home.php';
include_once '../sys/inc/settings.php';
include_once '../sys/inc/db_connect.php';
include_once '../sys/inc/ipua.php';
include_once '../sys/inc/fnc.php';
include_once '../sys/inc/user.php';
$set['title']='Брак';
include_once '../sys/inc/thead.php';
title();
aut();


if (isset($_GET['id']))$idd=intval($_GET['id']);
$id=mysql_fetch_array(mysql_query("SELECT * FROM `zags` WHERE `id`='$idd'"));
$q_on=mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id`='".$id['on']."'"));
$q_ona=mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id`='".$id['ona']."'"));

if (isset($user) &&$id[inter]!=0)echo '<img src="img/inter/'.$id['inter'].'.png" alt="" class="icon"/><br/>'; 
if (isset($user) &&$id[kruiz]!=NULL)echo '<img src="img/kruiz/1.png" alt="" class="icon"/>  '.$id['kruiz'].'<br/>'; 
if (isset($user) &&$id[trans]!=0)echo '<img src="img/trans/'.$id['trans'].'.png" alt="" class="icon"/><br/>';
if (isset($user) &&$id[tort]!=0)echo '<img src="img/tort/'.$id['tort'].'.png" alt="" class="icon"/>'; 
if (isset($user) &&$id[byk]!=0)echo '<img src="img/byk/'.$id['byk'].'.png" alt="" class="icon"/>';
if (isset($user) &&$id[kol]!=0)echo '<img src="img/kol/'.$id['kol'].'.png" alt="" class="icon"/>';
$coundd=$id[inter]+$id[trans]+$id[tort]+$id[byk]+$id[kol];
if (isset($user) &&$coundd==0)echo '<div class="err">На свадьбу не чего не было куплено!</div>'; else echo "<br/>";

echo "<img src='icon/on.png'> Муж: ".$q_on['nick']."<br/>";
echo "<img src='icon/ona.png'> Жена: $q_ona[nick]<br/>";
echo "<img src='icon/clock.png'> Дата свадьбы :".vremja($id['time'])."<br/>";

if (isset($user) &&$user['id']==$id['on'])echo "><a href='razvod.php?id=".$id['id']."'>Развестись</a><br/>";
elseif (isset($user) &&$user['id']==$id['ona'])echo "><a href='razvod.php?id=".$id['id']."'>Развестись</a><br/>";
echo "> <a href='index.php'>Загс</a>";
include_once '../sys/inc/tfoot.php';
?>