<main class="gift zero"><ul class="top"><li><a class="ajax block" href="<?=$spot?>"><img alt="" class="icon" src="/design/icons/refresh.png">Обновить</a></li>
<? if ($give || $open || $drudge) : ?><? if ($open || !$select) : ?><li><a class="ajax block" href="/gifts"><img alt="" class="icon" src="/design/icons/back.png">К моим подаркам</a>
</li><? endif; ?><? if ($give || $open) : ?><li><a class="ajax block" href="/profile/<?=$nicked?>"><img alt="" class="icon" src="/design/icons/<?=$USER->sex($buddy['sex'])?>.png">
Профиль игрока</a></li><? endif; ?><? if ($give && $select) : ?><li><a class="ajax block" href="/gifts/give/<?=$nicked?>"><img alt="" class="icon" src="/design/icons/gift.png">К выбору
подарков</a></li><? endif; ?><? if ($drudge) : ?><li><a class="ajax block" href="/profile/<?=$bud['link']?>"><img alt="" class="icon" src="/design/icons/<?=$USER->sex($bud['sex'])?>.png">
Профиль <?=$bud['nick']?></a></li><? endif; ?><? endif; ?><? if ($view && !$give) : ?><li><a class="ajax block" href="/gifts/viewer/<?=$moan['id']?>/token/<?=TOKEN?>">
<img alt="" class="icon" src="/design/icons/go.png">Смотреть жалобу</a></li><? endif; ?></ul><? if ($give) : ?><? if (!$present) : ?><p class="notice">
<img alt="" class="icos" src="/design/icons/cross.png"><?=$ban?></p><? else : ?><p class="center">Подарок для <span class="color"><?=$buddy['nick']?></span>:</p>
<? if ($select) : ?><p class="center"><img alt="" class="gift" src="/design/gifts/<?=$buy?>.png"></p><form name="gift"><p><img alt="" class="icos" src="/design/icons/pencil.png">
Комментарий:<br><textarea id="smiles" maxlength="100" 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="buy" value="<?=$buy?>"><input type="hidden" name="token" value="<?=TOKEN?>"><button>Отправить</button></form><? endif; ?>
<? if (!isset($roster)) : foreach($data as &$post) : ?><? if ($post['start']) : ?><ul class="gift"><li><a class="ajax button gift" href="/gifts/give/<?=$nicked?>/buy/<?=$post['image']?>">
<img alt="" class="gift" src="/design/gifts/<?=$post['image']?>.png"><?=$post['name']?></a></li><? endif; ?><? if ($post['end']) : ?><li>
<a class="ajax button gift" href="/gifts/give/<?=$nicked?>/buy/<?=$post['image']?>"><img alt="" class="gift" src="/design/gifts/<?=$post['image']?>.png">
<?=$post['name']?></a></li></ul><? endif; ?><? endforeach; endif; ?><? if ($nav) : ?><ul class="page"><? if ($page != 1) : ?>
<li><a class="ajax button shop" href="/gifts/give/<?=$nicked?>">1</a></li><? endif; ?><? if ($page != 2) : ?><li>
<a class="ajax button shop" href="/gifts/give/<?=$nicked?>/page/2">2</a></li><? endif; ?><? if ($page != 3) : ?><li>
<a class="ajax button shop" href="/gifts/give/<?=$nicked?>/page/3">3</a></li><? endif; ?><? if ($page != 4) : ?>
<li><a class="ajax button shop" href="/gifts/give/<?=$nicked?>/page/4">4</a></li><? endif; ?><? if ($page != 5) : ?><li>
<a class="ajax button shop" href="/gifts/give/<?=$nicked?>/page/5">5</a></li><? endif; ?></ul><? endif; ?><? endif; ?><? elseif ($open || $drudge) : ?>
<p class="center">Подарок от <span class="color"><?=$buddy['nick']?></span>:</p><p class="center"><img alt="" class="gift" src="/design/gifts/<?=$present['image']?>.png">
</p><p class="center"><?=$GAME->message($present['text'])?></p><? endif; ?><? if (!$main) : ?><ul class="bottom"><? if ($open && $claim) : ?><li>
<a class="ajax block" href="/gifts/drudge/<?=$present['id']?>/token/<?=TOKEN?>"><img alt="" class="icon" src="/design/icons/warning.png">Пожаловаться</a></li><? endif; ?>
<? if ($open) : ?><li><a class="ajax block" href="/gifts/delete/<?=$present['id']?>/token/<?=TOKEN?>"><img alt="" class="icon" src="/design/icons/trash.png">Удалить подарок</a></li>
<? endif; ?><? if ($drudge) : ?><li><a class="ajax block" href="/gifts/viewed/<?=$present['id']?>/act/ok/token/<?=TOKEN?>"><img alt="" class="icon" src="/design/icons/tick.png">
Просмотрено</a></li><? if ($setup['gift'] == 'yes') : ?><li><a class="ajax block" href="/gifts/viewer/<?=$present['id']?>/block/<?=$bud['id']?>/token/<?=TOKEN?>">
<img alt="" class="icon" src="/design/icons/lock.png">Блокировать <?=$bud['nick']?></a></li><? endif; ?><? endif; ?></ul><? endif; if ($main) : if ($empty) : ?>
<p class="notice"><img alt="" class="icos" src="/design/icons/cross.png">У Вас нет подарков.</p><? else : ?><? if ($presents > 0) : ?><h3><span class="color">
Количество подарков</span>: <?=$presents?></h3><? endif; ?><ul class="gifts"><? foreach($gift as &$post) : ?><li><a class="ajax list" href="/gifts/open/<?=$post['id']?>">
<article class="gifts"><img alt="" class="icon gifts" src="/design/icons/<?=$post['type']?>.png"><img alt="" class="icon gifts" 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="/gifts"><?=$one?></a></li><? endif; ?><? if ($page != 2) : ?><li><a class="ajax button shop" href="/gifts/page/2">
<?=$two?></a></li><? endif; ?><? if ($page != 3 && $pages > 2) : ?><li><a class="ajax button shop" href="/gifts/page/3">3</a></li><? endif; ?><? if ($page != 4 && $pages > 3) : ?>
<li><a class="ajax button shop" href="/gifts/page/4">4</a></li><? endif; ?><? if ($page != 5 && $pages > 4) : ?><li><a class="ajax button shop" href="/gifts/page/5">5</a>
</li><? endif; ?></ul><? endif; ?><? endif; endif; ?></main>