__section__
default
__description__

__title__

__page__
newsvac
__lang__
en_US
__name__
listUrls
__template__
[% INCLUDE titlebar width="100%" title="List of urls" -%]

<form action="[% gSkin.rootdir %]/newsvac.pl" method="get">
<input type="hidden" name="op" value="listurls">
<table>
        <tr>
                <td><input type="submit" value="List Only URLs Containing:">
		<input type="text" size="60" name="like" value=""></td>
        </tr>
</table>
</form>
<form action="[% gSkin.rootdir %]/newsvac.pl" method="get">
<input type="hidden" name="op" value="processurls">
<table>
        <tr>
                <td><input type="submit" value="Process URLs:">
		<input type="text" size="60" name="ids" value=""></td>
        </tr>
</table>
</form>
<form enctype="multipart/form-data" action="[% 
gSkin.rootdir %]/newsvac.pl" method="post">
<input type="hidden" name="op" value="newurl">
<table>
        <tr>
                <td><input type="submit" value="Add URL:">
		<input type="text" size="60" name="newurl" value=""></td>
        </tr>
</table>
<table border="0" width=900>
        <tr>
		<td colspan=8>
	[%- IF urls_total != urls_with_miners -%]
		<i>[% urls_total %] URLs in database 
		[% IF urls_no_miners %], [% urls_no_miners %] DO NOT have an 
		associated miner.[% END %]
		</i>
	[%- ELSE %]&nbsp;[% END -%]
		</td>
        </tr>
        <tr>
                <td width="5%"><b>ID</b></td>
                <td width="10%"><b>OK?</b></td>
                <td width="10%"><b>Last&nbsp;Success<b></td>
                <td width="10%"><b>Bytes</b></td>
                <td width="10%"><b>Hits</b></td>
                <td width="10%"><b>Miner&nbsp;Name</b></td>
                <td width="45%"><b>URL</b></td>
        </tr>
	[%- IF !urls -%]
	<tr>
		<td colspan=8><i>no urls found [%-
		IF form.like and n_urls_with_miners -%]
		(probable error in SQL query - try reload)[%-
		END -%]</i></td>
	</tr>
	[%- END -%]
	[%- FOREACH u = urls -%]
		[%- DEFAULT 
			u.last_success_formatted = '<i>n/a</i>',
			u.message_body_length = 0,
			u.referencing = 0;

			YesNo = { '0' => 'N', '1' => 'Y' }; 
			IF u.is_success.defined;
		   		success = YesNo.${u.is_success}; 
			ELSE; 
		   		success = '<i>n/a</i>'; 
			END
		-%]
        <tr>
                <td><a href="[% gSkin.rootdir 
		-%]/newsvac.pl?op=editurl&url_id=[% u.url_id %]">[% u.url_id
		-%]</a></td>
                <td>[% success %]</td>
                <td>[% u.last_success_formatted.replace(' ', '&nbsp;') %]</td>
                <td>[% u.message_body_length %]</td>
                <td>[% u.referencing %]</td>
                <td><a href="[% gSkin.rootdir
		-%]/newsvac.pl?op=editminer&miner_id=[% u.miner_id %]">[%
		u.name -%]</a></td>
                <td><a href="[% u.url %]" target="_blank">[% u.url %]</a></td>
        </tr>
	[%- END -%]

</table>
</form>

__seclev__
100
__version__
$Id$
