- Update the printing of the user list, if it's a fair, print the fair name too.

This commit is contained in:
dave 2009-05-06 04:46:08 +00:00
parent 036cf2c295
commit 74d0c53dd3

View File

@ -222,7 +222,16 @@ function neweditor()
$types = split(',', $r['types']);
$span = count($types) > 1 ? "rowspan=\"".count($types)."\"" : '';
echo "<tr><td $span>";
echo "<a href=\"#\" onclick=\"return openeditor({$r['id']})\">{$r['firstname']} {$r['lastname']}</a>";
$name = "{$r['firstname']} {$r['lastname']}";
if(in_array('fair', $types)) {
$qq = mysql_query("SELECT * FROM users_fair
LEFT JOIN fairs ON fairs.id=users_fair.fairs_id
WHERE users_id='{$r['id']}'");
$rr = mysql_fetch_assoc($qq);
$name = "{$rr['name']}".((trim($name)=='') ? '' : "<br />($name)");
}
echo "<a href=\"#\" onclick=\"return openeditor({$r['id']})\">$name</a>";
echo "</td>";
echo "<td $span>{$r['email']}</td>";