<div class="admin_right_top"><{$lang.custom_pages}></div>
<div class="notice"><div class="drag"><{$lang.drap_des}></div></div>
<table class="admin_table tab-list">
	<tr class="listBatch sheader">
		<td><{$lang.title}></td>
	    <td width="13%"><{$lang.option}></td>
	</tr>
	<tbody id="tcon">
		<{foreach item=list key=num from=$hpages}>
		<tr data-itemid='<{$num}>'>
			<td class="al"><{$list}></td>
			<td>
				<span style="display:block; width:100%;">
					<a href="main.php?m=company&s=cominfo&type=<{$num}>&name=<{$list|urlencode}>"><{$lang.edit}></a> 
					<a href="main.php?m=company&s=custom_pages&del=<{$num}>"><{$lang.delete}></a> 
				</span>
			</td>
		</tr>
		<{/foreach}>
	</tbody>
	
	<{foreach item=list key=num from=$cpages}>
		<{if !@in_array($num,$keyhpages) }>
		<tr data-itemid='<{$num}>'>
			<td class="al"><{$list}></td>
			<td>
			<a href="main.php?m=company&s=custom_pages&creat=<{$num}>&name=<{$list|urlencode}>"><{$lang.creat}></a>
			</td>
		</tr>
		<{/if}>
	<{/foreach}>
</table>
<script type="text/javascript" src="script/jquery.dragsort-0.5.1.min.js"></script>
<script type="text/javascript">
$("#tcon").dragsort({dragSelectorExclude:"span",dragEnd: saveOrder});
function saveOrder()
{
	var data = $("#tcon tr").map(function() { return $(this).data("itemid"); }).get();
	$.post("main.php?m=company&s=custom_pages", { "ids[]": data });
 };
</script>
