#include <infodrom.style>
#include "lt.style"
#include "functions.inc"

<postgresconnect>
<ltpage title="Project Management -- Social Event">

<h3>Social Event</h3>

<p>The following people from the same same project like you have signed
up for the social event.

<p>
<?
  $query = sprintf ("SELECT name,id FROM person WHERE socialevent = 1 "
		   ."AND project = '%s' ORDER BY upper(name)", $LINUXTAG_AUTH['project']);
  $sth = pg_exec ($dbh, $query) or die("Datenbank-Abfrage!");

  if (pg_NumRows ($sth) > 0) {
    echo ("<ol>");
    for ($nr=0; $nr < pg_NumRows ($sth); $nr++) {
      $row = pg_fetch_array ($sth, $nr);

      if (is_admin()) {
        printf ("<li><a href=\"edit_person.php3?id=%d\">%s</a>", urlencode($row['id']), $row['name']);
      } else {
        printf ("<li>%s", $row['name']);
      }
    }
    echo ("</ol>");
  } else {
    echo "Looks like nobody signed up yet.";
  }
?>

</ltpage>

# Local variables:
# mode: indented-text
# mode: auto-fill
# end:
