__section__
default
__description__

__title__

__page__
search
__lang__
en_US
__name__
searchform
__template__
<div class="generalbody">
[% IF tref.image %]
	<div class="topic">
		<a href="[% gSkin.rootdir %]/search.pl?tid=[% tref.tid %]">
			<img src="[% constants.imagedir %]/topics/[% tref.image %]" width="[% tref.width %]" height="[% tref.height %]" alt="[% tref.alttext %]" title="[% tref.alttext %]">
		</a>
	</div>
[% END %]

<form action="[% gSkin.rootdir %]/search.pl" method="get">
<fieldset>
	<legend>Search [% form.query %]</legend>
	<input type="hidden" name="tid" value="[% form.tid %]">
	<input type="text" size="40" name="query" value="[% form.query %]">
	[% IF authors %]
		[% Slash.createSelect("author", authors, form.author, 1, 0, 1) %]
	[% END %]
	[% Slash.createSelect("sort", sort, form.sort, 1) %]

	<input type="submit" value="Search"><BR>

	<input type="radio" name="op" value="stories"[% constants.markup_checked_attribute IF op == 'stories' %]> Stories
	<input type="radio" name="op" value="comments"[% constants.markup_checked_attribute IF op == 'comments' %]> Comments
	<input type="radio" name="op" value="users"[% constants.markup_checked_attribute IF op == 'users' %]> Users
	<input type="radio" name="op" value="polls"[% constants.markup_checked_attribute IF op == 'polls' %]> Polls
	[% IF constants.search_journal_enabled %]
		<input type="radio" name="op" value="journals"[% constants.markup_checked_attribute IF op == 'journals' %]> Journals
	[% END %]
	[% IF constants.rss_store %]
		[% IF constants.search_rss_enabled || user.is_admin %]
			<input type="radio" name="op" value="rss"[% constants.markup_checked_attribute IF op == 'rss' %]> RSS Headlines
		[% END %]
	[% END %]
	[% IF constants.submiss_view || user.is_admin %]
		<input type="radio" name="op" value="submissions"[% constants.markup_checked_attribute IF op == 'submissions' %]> Submissions
	[% END %]
	<div class="options">
	[% IF journal_option %]
	<input type="checkbox" name="journal_only" value="1"[% constants.markup_checked_attribute IF form.journal_only == '1' %]> Users with Journals
	[% END %]

	[% IF submission_notes %]
		[% Slash.createSelect("note", submission_notes, form.note, 1, 0, 1) %]
	[% END %]

	[% IF threshhold %]
		Threshold [% threshold_select %]
		<input type="hidden" name="sid" value="[% form.sid %]">
	[% END %]
	</div>
	</fieldset>
</form>

[% IF sections || topics %]
[%
   topics = Slash.db.getTopicTree();

   listnames = {};
   IF form.tid;
      topic_children = Slash.db.getAllChildrenTids(form.tid);
   ELSE;
      topic_children = topics.${constants.mainpage_nexus_tid}.children;
   END;

   FOREACH t = topic_children;
      NEXT IF !topics.$t.searchable;
      listnames.${topics.$t.textname} = t;
   END;
   
   listcount = listnames.size / 3;
   listex = listnames.size mod 3;
   i = 0;
%]
<div class="sectiontitle">
<a href="[% gSkin.rootdir %]/search.pl">[% constants.sitename %]</a>
[% IF !topics.${form.tid}.nexus && topics.${form.tid}.parent;
   thisparent = topics.${form.tid}.parent.keys.nsort.0;
   IF thisparent == constants.mainpage_nexus_tid;
      thisparent = topics.${form.tid}.parent.keys.nsort.1;
   END;
   IF thisparent %]
:: <a href="[% gSkin.rootdir %]/search.pl?tid=[% thisparent %]">[% topics.$thisparent.textname %]</a>
[% END; END; IF form.tid %]
:: <a href="[% gSkin.rootdir %]/search.pl?tid=[% form.tid %]">[% topics.${form.tid}.textname %]</a>
[% END; IF listnames.size %]
Topics
[% END %]

[% IF listnames.size %]
<table cellpadding="10" width="100%">
<tr><td valign="top">
<ul>
[% FOREACH s = listnames.keys.sort -%]
<li><a href="[% gSkin.rootdir %]/search.pl?tid=[% listnames.$s %]">[% s %]</a>[%
   IF user.is_admin %] [<a href="[% gSkin.rootdir %]/admin.pl?op=topics&amp;nexttid=[% listnames.$s %]">edit</a>] [%
END %]</li>
[%- i = i + 1;
    IF i == listcount.int || i == 0;
       IF i == listcount.int && listex; # do one more line in this row
          listex = 1;
          i = -1;
          NEXT;
       END;
       i = 0;  # end this row
%]</ul></td>
<td valign="top">
<ul>[% END; END # FOREACH %]</ul>
</td></tr>
</table>
[% END # IF listnames.size %]
</div>
[% END # IF sections || topics %]

__seclev__
100
__version__
$Id$
