<html>
<head>
<title>{$site_name}</title>
<mets http-equiv=Content-Type content="text/html; charset=utf-8">
<link href="{$cssurl}/administrator.css" type=text/css rel=stylesheet>

</head>
<body>
<br>

<table width="90%" align="center" cellpadding="5" cellspacing="5">
<tr>
	<td>
    	<h3>Advertisements</h3>
    </td>
</tr>
<tr>
    <td colspan="2" height="1" bgcolor="#dfdfdf"></td>
</tr>
<table>

                <table width="90%" align="center" cellpadding="5" cellspacing="5">
                <tr>
                <td>
                	<b>Ad ID</b>
                	<br>
                    <a href='listads.php?sortby=AID&sorthow=asc'>asc</a>
                    <a href='listads.php?sortby=AID&sorthow=desc'>desc</a>
                </td>
                <td><b>Description</b>
                	<br>
                    <a href='listads.php?sortby=description&sorthow=asc'>asc</a>
                    <a href='listads.php?sortby=description&sorthow=desc'>desc</a>
                </td>
                <td><b>Active</b>
                	<br>
                    <a href='listads.php?sortby=active&sorthow=asc'>asc</a>
                    <a href='listads.php?sortby=active&sorthow=desc'>desc</a>
                </td>
                <td><b>Edit</b>
                </td>
                </tr>

                {section name=i loop=$advert}
                <tr>
                <td>{$advert[i].AID}</td>
                <td>{$advert[i].description}</td>
                <td>{if $advert[i].active eq "1"}Yes{else}No{/if}</td>
                <td><a href='listadsedit.php?edit=true&AID={$advert[i].AID}'>Edit</a>
                </td>
                </tr>
                <tr>
                	<td colspan="4" align="center">
                    <b>PREVIEW:</b>
                    {$advert[i].code}
                    </td>
                </tr>
                {/section}
                </table>

</body>
</head>
</html>