Update correspondents template to new db schema

This commit is contained in:
Roan Horning 2022-07-12 22:59:08 -04:00
parent 9bf239521e
commit 9431e0cac4
Signed by: rho_n
GPG Key ID: 234AEF20B72D5769

View File

@ -7,16 +7,23 @@
<th >Name &amp; Host ID</th> <th >Name &amp; Host ID</th>
<th >license</th> <th >license</th>
<th >Last Show</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"> <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> Host ID: <a href="correspondents/<!--% host.hostid %-->.html"><!--% host.hostid %--></a></td>
<td><!--% host.default_license %--></td> <td><!--% host.license %--></td>
<td> host.last_posted </td> <td><!--% host.date %--></td>
</tr> </tr>
<!--% END %--> <!--% END %-->
</table> <p><a href="contribute.php">Become a Correspondent</a></p> </table>
<p><a href="contribute.php">Become a Correspondent</a></p>
</article> </article>