#! /bin/ksh

html-header "Program Contacts"

echo "
This report is a quick reference format of the HCI programs and
people to contact for more information.  To apply to a program,
see the report on programs, or see the data file for the program.
The entry for each program in this report includes:
<ul>
 <li> the <b><i>code</i></b> for the program, based on the institution and unit
 <li> the <b><i>shortname</i></b> for the institution and academic unit
 <li> the <b><i>contact</i></b> person and their email address
</ul>"

echo "<table border=0>"

for file in ${*-Data/*}
do
	shortfile=${file##*/}
	shortname=`sssearch section=unit $file |
		ssformat -t "<a href=$file>%shortname</a>"`
	contact=`sssearch section=program $file |
		ssformat -t "%contact (<a href=mailto:%email>%email</a>)"`
	echo "
	<tr valign=top>
		<td><a href=$file>$shortfile</a></td>
		<td>$shortname<br>$contact</td>
	</tr>"
done 

echo "</table>"

echo "</body></html>"

exit 0
