Update correspondents template to new db schema
This commit is contained in:
parent
9bf239521e
commit
9431e0cac4
@ -1,22 +1,29 @@
|
||||
<article>
|
||||
<p>
|
||||
<h2 class="title">Correspondents</h2><p>For more information on how to become a Correspondent see our <a href="contribute.php">contribute</a></center> page. To add a logo here, either email one to admin at hpr or setup your email on <a href="https://en.gravatar.com/">Gravatar</a>. To protect your browsing privacy we gather the images every hour and serve them directly from HPR.<p />
|
||||
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
|
||||
<table>
|
||||
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
|
||||
<table>
|
||||
<th >Avatar</th>
|
||||
<th >Name & Host ID</th>
|
||||
<th >license</th>
|
||||
<th >Last Show</th>
|
||||
<!--% FOREACH host IN DBI.query('SELECT * FROM Contributors ORDER BY handle') %-->
|
||||
<!--% FOREACH host IN DBI.query(
|
||||
'select h.hostid, h.host, h.license, e.date,
|
||||
CASE WHEN h.local_image = 0 THEN \'hpr_logo\' ELSE h.hostid END AS avatar
|
||||
from hosts as h
|
||||
inner join (select hostid, max(date) as date from eps group by hostid) as e
|
||||
on h.hostid = e.hostid '
|
||||
) %-->
|
||||
<tr height="80" bgcolor="#CCCCCC">
|
||||
<td><img src="./images/<!--% host.avatar %-->" height="80" width="80" alt="" /></td>
|
||||
<td><img src="./images/<!--% host.avatar%-->.png" height="80" width="80" alt="avatar" /></td>
|
||||
|
||||
<td><strong><!--% host.handle %--></strong><br />
|
||||
<td><strong><!--% host.host %--></strong><br />
|
||||
|
||||
Host ID: <a href="correspondents/<!--% host.id %-->.html"><!--% host.id %--></a></td>
|
||||
<td><!--% host.default_license %--></td>
|
||||
<td> host.last_posted </td>
|
||||
Host ID: <a href="correspondents/<!--% host.hostid %-->.html"><!--% host.hostid %--></a></td>
|
||||
<td><!--% host.license %--></td>
|
||||
<td><!--% host.date %--></td>
|
||||
</tr>
|
||||
<!--% END %-->
|
||||
</table> <p><a href="contribute.php">Become a Correspondent</a></p>
|
||||
</table>
|
||||
<p><a href="contribute.php">Become a Correspondent</a></p>
|
||||
</article>
|
||||
|
Loading…
Reference in New Issue
Block a user