{include file="header.tpl"}
<div class="box">
<div class="box_title" id="tba">Add Directory Link</div>
<div class="box_body">

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><b><a href="{"?a=directory"|encurl}">Main</a> {foreach from=$path item=p} :: <a href="{"?a=directory&cat=`$p.id`"|encurl}">{$p.name}</a>{/foreach}</b>
</td></tr>
</table><br>
<div style="font-weight:bold">
To add link into our directory you should place our  <a href="{"?a=codes"|encurl}">link code</a> on your site.
</div>
<br>
{if $errors}
<ul style="color:red">
{if $errors.turing}<li> Invalid turing image provided.</li>{/if}
{if $errors.category}<li> Please, select links category</li>{/if}
{if $errors.title}<li> Please, enter your site title</li>{/if}
{if $errors.url}<li> Please, enter your site URL, it should starts from http:// or https://</li>{/if}
{if $errors.back_link}<li> Please, enter your Back Link, it should starts from http:// or https://</li>{/if}
{if $errors.email}<li> Please, enter your valid email</li>{/if}
</ul>
{/if}

<form method="post" action="">
<input type=hidden name="a" value="directory">
<input type=hidden name="action" value="add">
<input type=hidden name="cat" value="{$cat.id}">
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<tr>
  <td>Category</td>
  <td><b>{$cat.name|escape:html|default:"Main"}</b></td>
</tr>
<tr>
  <td>Site Title</td>
  <td><input type=text name="title" maxlength="255" value="{$frm.title|escape:htmlall}" class="inpts" size="45"></td>
</tr>
<tr>
  <td>Site Description</td>
  <td><input type=text name="description" maxlength="1024" value="{$frm.description|escape:htmlall}" class="inpts" size="45"></td>
</tr>
<tr>
  <td>Site URL</td>
  <td><input type=text name="url" maxlength="255" value="{$frm.url|escape:htmlall}" class="inpts" size="45"></td>
</tr>
<tr>
  <td>Button URL</td>
  <td><input type=text name="button_url" maxlength="255" value="{$frm.button_url|escape:htmlall}" class="inpts" size="45"></td>
</tr>
<tr>
  <td>Back Link</td>
  <td><input type=text name="back_link" maxlength="255" value="{$frm.back_link|escape:htmlall}" class="inpts" size="45"></td>
</tr>
<tr>
  <td>E-mail</td>
  <td><input type=text name="email" maxlength="255" value="{$frm.email|escape:htmlall}" class="inpts" size="45"></td>
</tr>
{if $settings.use_turing}
<tr>
  <th><img src="{"?a=turing&`$sesname`=`$sesid`&r=`$rand`"|encurl}" alt="turing code"></th>
  <td><input type=text name="turing" maxlength=6 size="10" class="inpts"></td>
</tr>
{/if}
<tr>
  <td></td>
  <td><input type=submit value="Add Site" class="sbmt"></td>
</tr>
</table>
</form>
</div></div>
{include file="footer.tpl"}