diff --git a/admin/committees.php b/admin/committees.php index a14878a..d2fc587 100644 --- a/admin/committees.php +++ b/admin/committees.php @@ -27,7 +27,8 @@ user_auth_required('committee', 'admin'); - $users_id = intval($_POST['users_id']); +if($_POST['users_id']) + $uid = intval($_POST['users_id']); /* Some actions we want to redirect to the personal editor, so deal with those first */ if($_POST['add_member']) @@ -40,7 +41,7 @@ } if($_POST['action'] == 'edit') { - header("location: {$config['SFIABDIRECTORY']}/user_personal.php?edit=$users_id"); + header("location: {$config['SFIABDIRECTORY']}/user_personal.php?edit=$uid"); exit; } @@ -141,11 +142,11 @@ if($_POST['action']=="assign") if($_POST['committees_id'] && $_POST['users_id']) { $cid = intval($_POST['committees_id']); - $q=mysql_query("SELECT * FROM committees_link WHERE committees_id='$cid' AND users_id='$users_id'"); + $q=mysql_query("SELECT * FROM committees_link WHERE committees_id='$cid' AND users_id='$uid'"); if(!mysql_num_rows($q)) { - mysql_query("INSERT INTO committees_link (committees_id,users_id) VALUES ('$cid','$users_id')"); + mysql_query("INSERT INTO committees_link (committees_id,users_id) VALUES ('$cid','$uid')"); echo happy(i18n("Successfully added member to committee")); } else @@ -166,8 +167,8 @@ if($_GET['deletecommittee']) if($_POST['action']=="remove") { - user_delete($users_id, 'committee'); - mysql_query("DELETE FROM committees_link WHERE users_id='$users_id'"); + user_delete($uid, 'committee'); + mysql_query("DELETE FROM committees_link WHERE users_id='$uid'"); echo happy(i18n("Committee member removed")); } @@ -194,7 +195,7 @@ if($_POST['add_member_to_committees_id']) echo "