<script language="javascript" type="text/javascript" src="[% webpath %]/js/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
    mode : "textareas",
    theme : "advanced",
    plugins : "preview,searchreplace",
    theme_advanced_buttons1 : "bold,italic,underline,strikethrough,sub,sup,formatselect,hr,|,justifyleft,justifycenter,justifyright,justifyfull",
    theme_advanced_buttons2 : "bullist,numlist,|,link,unlink,anchor,|,undo,redo,search,replace,|,cleanup,help,preview",
    theme_advanced_buttons3 : "",
    theme_advanced_toolbar_location : "top",
    theme_advanced_toolbar_align : "left",
    theme_advanced_path_location : "bottom",
    extended_valid_elements : "hr[class|width|size|noshade]",
    force_br_newlines : true,
    force_p_newlines : false,
    convert_urls : false
});
</script>



<h2>[% IF data.linkid %]Edit[% ELSE %]Add[% END %] Link</h2>

<form method="post" action="[% cgipath %]/pages.cgi">
<input type="hidden" name="act" value="link-save" />
<input type="hidden" name="linkid" value="[% data.linkid %]" />

<div class="boxer">
<div class="blocker">
[% IF thanks %]<p>Link saved successfully.[% END %]
[% IF errmess %]
[% IF errmess == 1 %]
<p class="alert">There are invalid or missing fields, as noted by the <span class="red">&empty;</span> symbol.
[% ELSE %]
<p class="alert">[% errmess %]
[% END %]
[% END %]
</div>
</div>

<div class="boxer">
<table class="blocker">
<tr><th>Category *</th>
    <td class="red">[% data.catid_err %]</td>
    <td>[% data.ddcats %]</td></tr>
<tr><th>Link *</th>
    <td class="red">[% data.href_err %]</td>
    <td><input type="text" name="href" size="55" value="[% data.href %]" /></td></tr>
<tr><th>Title</th>
    <td class="red">[% date.title_err %]</td>
    <td><input type="text" name="title" size="55" value="[% data.title %]" /></td></tr>
<tr><th>Info</th>
    <td class="red">[% data.body_err %]</td>
    <td><textarea name="body" rows="10" cols="45">[% data.body %]</textarea></td></tr>
</table>
</div>

<p align="center"><input type="submit" value="Save Link" />

</form>
