{template header}
{template magic_navbar}

</td><td align="right" valign="top">
<!--{if $operation == ''}-->
	<div class="spaceborder" style="width: 98%">
	<table cellspacing="{INNERBORDERWIDTH}" cellpadding="{TABLESPACE}" width="100%" align="center">
	<tr class="header"><td colspan="3" align="left">
		<div class="right">
			<a href="magic.php?action=shop&typeid=1">{lang magics_type_1}</a>
			&nbsp;<a href="magic.php?action=shop&typeid=2">{lang magics_type_2}</a>
			&nbsp;<a href="magic.php?action=shop&typeid=3">{lang magics_type_3}</a>
			&nbsp;<a href="magic.php?action=shop">{lang all}</a>
		</div>{lang magics_shop}
	</td></tr>
	<tr class="altbg2">
	<!--{if $magiclist}-->
		<!--{loop $magiclist $key $magic}-->
			<!--{if $key && ($key % 2 == 0)}-->
				</tr>
				<!--{if $key < $magicnum}-->
					<tr class="altbg2">
				<!--{/if}-->
			<!--{/if}-->
			<td class="altbg2" width="50%">
			<table width="100%" border="0" cellspacing="2" cellpadding="2"><tr>
			<td width="30%" rowspan="4" align="center"><img src="images/magics/$magic[pic]"></td>
			<td width="70%" valign="top"><b>$magic[name]</b></td>
			</tr><tr>
			<td width="70%">$magic[description]</td>
			</tr><tr><td>
			{lang magics_price}: $magic[price] $extcredits[$creditstrans][title] {lang magics_weight}: $magic[weight] {lang magics_shop_num}: $magic[num] {lang magics_shop_salevolume}:$magic[salevolume]
			</td></tr><tr><td>
			<b><a href="magic.php?action=shop&operation=buy&magicid=$magic[magicid]">{lang magics_operation_buy}</a></b>&nbsp;
			</td></tr></table>
			</td>
		<!--{/loop}-->
			$magicendrows
	<!--{else}-->
		<td class="altbg1" colspan="3">{lang magics_shop_nonexistence}</td></tr>
	<!--{/if}-->
<!--{elseif $operation == 'buy'}-->
	<form method="post" action="magic.php?action=shop">
	<input type="hidden" name="formhash" value="{FORMHASH}">
	<input type="hidden" name="operation" value="buy">
	<input type="hidden" name="magicid" value="$magicid">
	<input type="hidden" name="operatesubmit" value="yes">
	<div class="spaceborder" style="width: 98%">
	<table cellspacing="{INNERBORDERWIDTH}" cellpadding="{TABLESPACE}" width="100%" align="center">
	<tr class="header"><td colspan="3" align="left">{lang magics_shop}</td></tr>
	<tr class="altbg2"><td rowspan="5" class="altbg2" align="center" width="20%"><img src="images/magics/$magic[pic]"><br></td>
	<td class="altbg2" width="80%"><b>$magic[name]</b></td></tr>
	<tr class="altbg2"><td class="altbg2">$magic[description]</td></tr>
	<tr class="altbg2"><td class="altbg2">{lang magics_price}: $magic[price] $extcredits[$creditstrans][title] {lang magics_shop_num}: $magic[num] {lang magics_shop_salevolume}: $magic[salevolume] {lang magics_weight}: $magic[weight]</td></tr>
	<tr class="altbg2"><td class="altbg2">{lang magics_permission}: <font color=red><!--{if $useperm}--> {lang magics_permission_yes} <!--{else}--> {lang magics_permission_no} <!--{/if}--></font>
	<!--{if $magic[type] == 1}-->
			<br>{lang magics_permission_forum}: <!--{if $forumperm}-->$forumperm<!--{else}--> {lang magics_permission_allforum} <!--{/if}-->
	<!--{/if}-->
	<!--{if $magic[type] == 2}-->
			<br>{lang magics_permission_group}: <!--{if $targetgroupperm}-->$targetgroupperm<!--{else}--> {lang magics_permission_allgroup} <!--{/if}-->
	<!--{/if}-->
	</td></tr>
	<tr class="altbg2"><td class="altbg2" width="10%">
		{lang magics_amount_buy}: <input name="magicnum" type="text" size="5" value="1">&nbsp;
		<!--{if $allowmagics > 1 }-->
			<input type="checkbox" class="checkbox" value="1" onclick="$('showgive').style.display = $('showgive').style.display == 'none' ? '' : 'none'; this.value = this.value == 1 ? 0 : 1; this.checked = this.value == 1 ? false : true"> {lang magics_shop_present}
			<div id="showgive" style="display:none">
				{lang magics_target_present}: <input name="tousername" type="text" size="5">
			</div>
		<!--{/if}-->
	</td></tr>
	</table></div>
	<br /><div class="option" style="width: 98%"><div class="submitbutton"><input class="button" type="submit" name="operatesubmit" value="{lang magics_operation_buy}"></div></div></form>
<!--{/if}-->
</tr></table></div>
</td></tr></table>
{template footer}