Updated to properly use the user_save function

This commit is contained in:
jacob 2010-11-18 16:02:11 +00:00
parent 31baeaa715
commit f6eee9666a

View File

@ -71,22 +71,13 @@ case 'save':
$u['willing_chair'] = ($_POST['willing_chair'] == 'yes') ? 'yes' : 'no'; $u['willing_chair'] = ($_POST['willing_chair'] == 'yes') ? 'yes' : 'no';
$u['highest_psd'] = stripslashes($_POST['highest_psd']); $u['highest_psd'] = stripslashes($_POST['highest_psd']);
$u['available_events'] = array_values($_POST['time']);
user_save($u); user_save($u);
/* /*
if(is_array($_POST['questions'])){ if(is_array($_POST['questions'])){
questions_save_answers("judgereg",$u['id'],$_POST['questions']); questions_save_answers("judgereg",$u['id'],$_POST['questions']);
} }
*/ */
// save the availability selection
mysql_query("DELETE FROM schedule_users_availability_link WHERE users_id='{$u['id']}'");
if(is_array($_POST['time']) ) {
foreach($_POST['time'] as $idx) {
mysql_query("
INSERT INTO schedule_users_availability_link (schedule_id, users_id)
VALUES($idx, {$u['id']})
");
}
}
happy_("Preferences successfully saved"); happy_("Preferences successfully saved");