<main class="mail zero"><ul class="top"><li><a class="ajax block" href="<?=$spot?>"><img alt="" class="icon" src="/design/icons/refresh.png">Обновить</a>
</li><? if ($dialog || $drudge) : ?><li><a class="ajax block" href="/mail"><img alt="" class="icon" src="/design/icons/back.png">Назад в почту</a></li><? if ($dialog) : ?>
<li><a class="ajax block" href="/profile/<?=$nicked?>"><img alt="" class="icon" src="/design/icons/<?=$USER->sex($buddy['sex'])?>.png">Профиль игрока</a></li><? endif; ?>
<? if ($drudge) : ?><li><a class="ajax block" href="/profile/<?=$author['link']?>"><img alt="" class="icon" src="/design/icons/<?=$USER->sex($author['sex'])?>.png">Профиль <?=$author['nick']?>
</a></li><li><a class="ajax block" href="/profile/<?=$reply['link']?>"><img alt="" class="icon" src="/design/icons/<?=$USER->sex($reply['sex'])?>.png">Профиль <?=$reply['nick']?></a></li>
<? endif; ?><? endif; ?><? if ($view && !$dialog) : ?><li><a class="ajax block" href="/mail/viewer/<?=$moan['id']?>/token/<?=TOKEN?>"><img alt="" class="icon" src="/design/icons/go.png">
Смотреть жалобу</a></li><? endif; ?></ul><? if ($dialog || $drudge) : ?><? if ($form) : ?><form name="msg"><p><img alt="" class="icos" src="/design/icons/pencil.png">
Диалог с <span class="color"><?=$buddy['nick']?></span>:<br><textarea id="smiles" maxlength="500" name="text"></textarea></p><div class="smiles">
<span><img class="smile" src="/design/smiles/smile.png" alt=":)"></span><span><img class="smile" src="/design/smiles/wink.png" alt=";)">
</span><span><img class="smile" src="/design/smiles/laugh.png" alt=":D"></span><span><img class="smile" src="/design/smiles/biggrin.png" alt="XD">
</span><span><img class="smile" src="/design/smiles/tongue.png" alt=":P"></span><span><img class="smile" src="/design/smiles/cool.png" alt="8)">
</span><span><img class="smile" src="/design/smiles/shock.png" alt=":O"></span><span><img class="smile" src="/design/smiles/happen.png" alt=":|">
</span><span><img class="smile" src="/design/smiles/sad.png" alt=":("></span><span><img class="smile" src="/design/smiles/angry.png" alt=":Z">
</span></div><input type="hidden" name="nick" value="<?=$buddy['nick']?>"><input type="hidden" name="token" value="<?=TOKEN?>"><button>Отправить</button>
</form><? else : ?><? if ($ban) : ?><p class="notice"><img alt="" class="icos" src="/design/icons/cross.png"><?=$ban?></p><? endif; ?><? endif; ?>
<? if ($empty) : ?><p class="mail notice"><img alt="" class="icos" src="/design/icons/cross.png">Диалог отсутствует.</p><? else : ?><? if ($drudge) : ?>
<h3 class="none">Просмотр жалобы</h3><? endif; ?><ul class="msg"><? foreach($mail as &$post) : ?><li><article class="mail"><h4>
<img alt="" class="icos" src="/design/icons/<?=$USER->sex($post['sex'])?>.png"><?=$post['nick']?><img alt="" class="icos" src="/design/icons/<?=$post['visit']?>.png"></h4>
<p class="text"><?=$post['text']?></p><p class="time"><img alt="" class="icos" src="/design/icons/time.png"><?=$post['time']?></p></article></li><? endforeach; ?></ul>
<? if ($pages > 1) : ?><ul class="page"><? if ($page != 1) : ?><li><a class="ajax button shop" href="<?=$bottom?>"><?=$one?></a></li><? endif; ?>
<? if ($page != 2) : ?><li><a class="ajax button shop" href="<?=$bottom?>/page/2"><?=$two?></a></li><? endif; ?><? if ($page != 3 && $pages > 2) : ?>
<li><a class="ajax button shop" href="<?=$bottom?>/page/3">3</a></li><? endif; ?><? if ($page != 4 && $pages > 3) : ?>
<li><a class="ajax button shop" href="<?=$bottom?>/page/4">4</a></li><? endif; ?><? if ($page != 5 && $pages > 4) : ?><li>
<a class="ajax button shop" href="<?=$bottom?>/page/5">5</a></li><? endif; ?></ul><? endif; ?><ul class="bottom"><? if ($claim) : ?><li>
<a class="ajax block" href="/mail/grudge/<?=$nicked?>/token/<?=TOKEN?>"><img alt="" class="icon" src="/design/icons/warning.png">Пожаловаться</a></li><? endif; ?>
<? if ($delete) : ?><li><a class="ajax block" href="/mail/delete/<?=$nicked?>/token/<?=TOKEN?>"><img alt="" class="icon" src="/design/icons/trash.png">Удалить контакт</a></li>
<? endif; ?><? if ($drudge) : ?><li><a class="ajax block" href="/mail/viewed/<?=$duolog['id']?>/act/ok/token/<?=TOKEN?>"><img alt="" class="icon" src="/design/icons/tick.png">
Просмотрено</a></li><? if ($setup['mail'] == 'yes') : ?><li><a class="ajax block" href="/mail/viewer/<?=$duolog['id']?>/block/<?=$author['id']?>/token/<?=TOKEN?>">
<img alt="" class="icon" src="/design/icons/lock.png">Блокировать <?=$author['nick']?></a></li><? endif; if ($tune['mail'] == 'yes') : ?><li>
<a class="ajax block" href="/mail/viewer/<?=$duolog['id']?>/block/<?=$reply['id']?>/token/<?=TOKEN?>"><img alt="" class="icon" src="/design/icons/lock.png">
Блокировать <?=$reply['nick']?></a></li><? endif; ?><? endif; ?></ul><? endif; ?><? else : ?><? if ($empty) : ?><p class="notice"><img alt="" class="icos" src="/design/icons/cross.png">
Диалоги отсутствуют.</p><? else : ?><? if ($contacts > 0) : ?><h3><span class="color">Количество контактов</span>: <?=$contacts?></h3><? endif; ?><ul class="dialog">
<? foreach($mail as &$post) : ?><li><a class="ajax list" href="/mail/dialog/<?=$post['nick']?>"><article class="dialog"><img alt="" class="icon dialog" src="/design/icons/<?=$post['type']?>.png">
<img alt="" class="icon dialog" src="/design/icons/<?=$USER->sex($post['sex'])?>.png"><h4><?=$post['name']?> <span class="color">(<?=$post['time']?>)</span></h4></article>
</a></li><? endforeach; ?></ul><? if ($pages > 1) : ?><ul class="page"><? if ($page != 1) : ?><li><a class="ajax button shop" href="/mail"><?=$one?></a></li><? endif; ?>
<? if ($page != 2) : ?><li><a class="ajax button shop" href="/mail/page/2"><?=$two?></a></li><? endif; ?><? if ($page != 3 && $pages > 2) : ?><li>
<a class="ajax button shop" href="/mail/page/3">3</a></li><? endif; ?><? if ($page != 4 && $pages > 3) : ?><li><a class="ajax button shop" href="/mail/page/4">4</a></li><? endif; ?>
<? if ($page != 5 && $pages > 4) : ?><li><a class="ajax button shop" href="/mail/page/5">5</a></li><? endif; ?></ul><? endif; ?><? endif; ?><? endif; ?></main>