View file user/cover/inc/profileCoverPc.php

File size: 2.25Kb
<?
include_once(H . 'user/cover/inc/configs.php');
?>
<link rel="stylesheet" type="text/css" href="/ajax/profileCover/stylePc.css">
<script src="/ajax/profileCover/index.js"></script>
<div class='nav2'>
<div class="profileCoverWrapper">
	<img src="/style/covers/<?=($ank['profileCover'] ? $ank['profileCover'] : 'default')?>.jpg" alt="" class="profileCoverImage">
	<div class="profileCoverInfo">
		<div class="profileCoverNick">
			<?=group($ank['id'])." ".$ank['nick']." ".medal($ank['id'])." ".online($ank['id'])." ".((user_access('user_ban_set') || user_access('user_ban_set_h') || user_access('user_ban_unset')) && $ank['id'] != $user['id'] ? "<a href='/adm_panel/ban.php?id=$ank[id]'><font color=red>[Бан]</font></a>" : null)?>
		</div>
		<div class="profileCoverAvatar">
			<?=avatar($ank['id'], true, 128, false)?>
		</div>
	</div>
	<?if (isset($user) && $ank['id'] == $user['id']):?><div class="profileCoverChangeWrapper" onclick="toggle('.profileCoverSelect')"></div><div class="profileCoverChange" onclick="toggle('.profileCoverSelect')"></div><?endif?>
</div>
<?if (isset($user) && $ank['id'] == $user['id']):?>
<div class="profileCoverSelect">
	<div class="profileCoverSelectCategories">
		<?
		$qcats = mysql_query("SELECT * FROM `profileCoversCategories` ORDER BY `name` ASC");
		while ($cat = mysql_fetch_array($qcats)):
		?>
		<div class="nav<?=($num % 2 ? 2 : 1)?>">
			<?$num++?>
			<img src="/style/covers/category.png" /> <a href="#<?=$cat['id']?>" onclick="selectCategory(<?=$cat['id']?>)"><?=htmlspecialchars($cat['name'])?></a> (<?=mysql_result(mysql_query("SELECT COUNT(*) FROM `profileCoversList` WHERE `id_category` = '$cat[id]'"), 0)?>) 
			<div class="profileCoverSelectCategory" id="category<?=$cat['id']?>">
				<?
				$qcovers = mysql_query("SELECT * FROM `profileCoversList` WHERE `id_category` = '$cat[id]' ORDER BY `id` DESC");
				while ($cover = mysql_fetch_array($qcovers)):
				?>
				<div class="profileCoverSelectDo" onclick="selectCover(<?=$cover['id']?>)">
					<?show_cover_preview($cover['id'], $preview_sizes['large'])?>
					<div class="profileCoverSelectPrice"><?=sklon_text($cover['price'], $sklon_balance_array)?></div>
				</div>
				<?endwhile?>
			</div>
		</div>
		<?endwhile?>
	</div>
</div>
<?endif?>