__section__
default
__description__

__title__

__page__
newsvac
__lang__
en_US
__name__
editSpider
__template__
[% USE date %]
<form action="[% gSkin.rootdir %]/newsvac.pl" method="post">
<input type="hidden" name="op" value="updatespider">
<input type="hidden" name="spider_id" value="[% spider_id %]">

[%- INCLUDE titlebar width="100%" title="Editing spider '$name'" -%]

<table border="0">
	<tr valign=top>
		<td width="40"><b>ID</b></td>
		<td>[% spider_id %]</td>
	</tr>
	<tr valign=top>
		<td width="40"><b>Name</b></td>
		<td><input type="text" size="20" name="name" value="[% name
		-%]"></td>
	</tr>
	<tr valign=top>
		<td width="40"><b>Last Edit</b></td>
		<td>[% last_edit %] by [% last_edit_aid %]</td>
	</tr>
	<tr valign=top>
		<td width="40"><b>Conditions</b></td>
		<td>
		<textarea cols=80 rows=3 name="conditions">[%
		conditions -%]</textarea>
		</td>
	</tr>
	<tr valign=top>
		<td width="40"><b>Group 0 Selects</b></td>
		<td>
		<textarea cols=80 rows=3 name="group_0_selects">[% 
		group_0_selects -%]</textarea></td>
	</tr>
	<tr valign=top>
		<td width="40"><b>Commands</b>&nbsp;&nbsp;</td>
		<td><textarea cols=80 rows=6 name="commands">[%
		commands -%]</textarea></td>
	</tr>
</table>

[% 
# We perform the check on 'timespec_0_err' here in case a previous form 
# attempted to add a timespec, but used "Save" rather than "Add Timespec" 
# to submit the form. 
DEFAULT timespecs=[]; 
errkey = "timespec_0_err";
IF form.addtimespec || form.$errkey; timespecs.push({ timespec_id=>0 }); END;
IF timespecs.size -%]
<p>
[% INCLUDE titlebar width="75%" title="Time Specifications" -%]
<p>
[%
	no_insert_ID=1;
	FOR t=timespecs;
		IF t.timespec_id == 0; no_insert_ID = 0; END;
		errkey = "timespec_${t.timespec_id}_err";
		IF form.$errkey -%]
[% form.$errkey %]<br>
[%		END -%]
<input type="text" size=30 name="timespec_[% t.timespec_id 
-%]_timespec" value="[% t.timespec %]">&nbsp;&nbsp;
[% IF t.timespec_id != 0 %]<input type="checkbox" name="timespec_[% 
t.timespec_id -%]_del">[% END %] <small>(<b>Last run</b>: [%
date.format(t.last_run, "%F %R") -%] for [% t.duration %]s, '[% t.results %]')</small><br>
[% 
	END;	# FOR t=timespecs
	insert_errkey = "timespec_0_err";
	IF form.$insert_errkey && no_insert_ID -%]
[% form.$insert_errkey %]<br>
[%	END -%]

<br><br>
<input type="submit" name="addtimespec" value="Add Time Specification">
<br><br>
[% ELSE -%]
<input type="submit" name="addtimespec" value="Add Time Specification">
[% END -%]

<input type="submit" value="Save Spider">
<input type="submit" name="runspider" value="Run Spider">
<input type="submit" name="deletespider" value="Delete Spider">
</form>
<!-- end editSpider -->
__seclev__
100
__version__
$Id: editSpider;newsvac;default,v 1.10 2005/07/27 22:54:12 pudge Exp $
