Archived
4
2
This repository has been archived on 2024-09-28. You can view files and clone it, but cannot push or open issues or pull requests.
hpr_generator/templates/content-correspondent.tpl.html

50 lines
1.6 KiB
HTML
Raw Normal View History

<!--% PROCESS 'shared-episode-summary.tpl.html' %-->
<!--% PROCESS 'shared-avatar.tpl.html' %-->
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<!--% query_show_count = DBI.prepare('
SELECT id
FROM eps
WHERE eps.hostid = ? ')
%-->
<!--% query_shows = DBI.prepare('
SELECT
eps.id,
CASE eps.explicit WHEN 1 THEN \'Explicit\' ELSE \'Clean\' END AS explicit ,
eps.date, eps.license, eps.duration,
eps.title, eps.summary, eps.tags,
eps.notes,
hosts.local_image,
hosts.hostid,
hosts.host, hosts.email,
miniseries.name AS series
FROM eps
INNER JOIN hosts ON eps.hostid = hosts.hostid
INNER JOIN miniseries ON eps.series = miniseries.id
WHERE hosts.hostid = ?
ORDER BY date DESC ')
%-->
<!--% shows_to_count = query_show_count.execute(id); %-->
<!--% shows = query_shows.execute(id); %-->
<!--% show_count = 0 %-->
<!--% FOREACH show IN shows_to_count %-->
<!--% show_count = show_count +1; %-->
<!--% END %-->
<!--% hosts = DBI.tie('hosts', 'hostid') %-->
<article>
<!--% this_host = hosts.$id %-->
<h2 class="title">Correspondent</h2>
<h2><!--% this_host.host %--></h2>
<p><img src="./images/<!--% get_avatar(this_host.hostid) %-->"
height="80" alt="Host Image" /><br>
<label>Host ID</label>: <!--% this_host.hostid %--><br><br>
<label>email:</label> <u><!--% this_host.email %--></u><br>
<label>episodes:</label> <strong><!--% show_count %--></strong>
</p>
<!--% FOREACH show IN shows; %-->
<!--% show_summary(show, 'hide_host') %-->
<!--% END %-->
</article>
<p><a href="contribute.html">Become a Correspondent</a></p>