forked from science-ation/science-ation
Fix commmittee member management page to work with new user system (and to force committee rollover since we didnt do it on rollover)
This commit is contained in:
parent
22a46874ee
commit
06fdbe1621
@ -255,27 +255,35 @@ if($_GET['unlinkmember'] && $_GET['unlinkcommittee']) {
|
||||
$q2=mysql_query("SELECT
|
||||
committees_link.title,
|
||||
committees_link.ord,
|
||||
users.accounts_id,
|
||||
MAX(users.year) AS my,
|
||||
users.lastname
|
||||
committees_link.accounts_id
|
||||
FROM committees_link
|
||||
JOIN users ON users.accounts_id = committees_link.accounts_id
|
||||
WHERE committees_id='{$r->id}'
|
||||
GROUP BY users.accounts_id
|
||||
ORDER BY ord,
|
||||
users.lastname ");
|
||||
ORDER BY ord");
|
||||
|
||||
echo "</td></tr>\n";
|
||||
echo mysql_error();
|
||||
while($r2=mysql_fetch_object($q2)) {
|
||||
$u = user_load_by_accounts_id($r2->accounts_id);
|
||||
|
||||
//if rollover is proper, this shouldnt be necessary, but, the simcoe rollover didnt do this, so lets do it here as a safety
|
||||
if(!$u) {
|
||||
$roleq=mysql_query("SELECT * FROM roles WHERE type='committee'");
|
||||
$roler=mysql_fetch_object($roleq);
|
||||
//hmm thats okay,w e must have missed something in the rollover... sicne its tied to the accounts_id, we just need to add a record
|
||||
account_add_role($r2->accounts_id,$roler->id,$conference['id']);
|
||||
|
||||
//and now we should be able to load them
|
||||
$u = user_load_by_accounts_id($r2->accounts_id);
|
||||
}
|
||||
|
||||
|
||||
echo "<tr><td align=\"right\"> ";
|
||||
echo "<a title=\"Edit Member\" href=\"#\" onclick=\"openeditor({$u['id']})\"><img src=\"{$config['SFIABDIRECTORY']}/images/16/edit.{$config['icon_extension']}\" border=\"0\" alt=\"Edit\" /></a>";
|
||||
echo " ";
|
||||
echo "<a title=\"Unlink Member from Committee\" onclick=\"return confirmClick('Are you sure you want to unlink this member from this committee?');\" href=\"committees.php?unlinkmember={$u['accounts_id']}&unlinkcommittee={$r->id}\"><img src=\"{$config['SFIABDIRECTORY']}/images/16/undo.{$config['icon_extension']}\" border=\"0\" alt=\"Unlink\" /></a>";
|
||||
echo "</td>";
|
||||
echo "<td valign=\"top\">";
|
||||
echo "<b>{$u['name']}</b>";
|
||||
echo "<b>{$u['firstname']} {$u['lastname']}</b>";
|
||||
echo "</td><td>";
|
||||
echo "<input type=\"text\" value=\"{$r2->title}\" name=\"title[{$r->id}][{$u['accounts_id']}]\" size=\"25\">";
|
||||
echo "</td><td>";
|
||||
|
@ -89,6 +89,7 @@ $tabs = array(
|
||||
'types' => array('teacher','participant','judge','committee','volunteer','sponsor','fair','admin','config'),
|
||||
'file' => 'user_roles.php',
|
||||
'status_func' => false,
|
||||
'enabled' => true,
|
||||
),
|
||||
'school' => array(
|
||||
'label' => 'School',
|
||||
|
Loading…
Reference in New Issue
Block a user