0) { $passwordexpiry = "DATE_ADD(CURDATE(), INTERVAL {$config['committee_password_expiry_days']} DAY)"; } else { $passwordexpiry = "NULL"; } $deleted = ($c['deleted'] == 'Y') ? 'yes' : 'no'; $q = "INSERT INTO users (`types`,`firstname`,`lastname`,`username`,`password`,`passwordexpiry`, `email`,`phonehome`,`phonework`,`phonecell`,`fax`,`organization`, `created`,`deleted`) VALUES ('committee','$fn', '$ln', '$username', '".mysql_escape_string($c['password'])."', $passwordexpiry, '{$c['email']}', '{$c['phonehome']}', '{$c['phonework']}', '{$c['phonecell']}', '{$c['fax']}', '".mysql_escape_string($c['organization'])."', NOW(), '$deleted')"; mysql_query($q); echo "$q\n"; $id = mysql_insert_id(); $access_admin = ($c['access_admin'] == 'Y') ? 'yes' : 'no'; $access_config = ($c['access_config'] == 'Y') ? 'yes' : 'no'; $access_super = ($c['access_super'] == 'Y') ? 'yes' : 'no'; $displayemail = ($c['displayemail'] == 'Y') ? 'yes' : 'no'; $q = "INSERT INTO users_committee(`users_id`,`emailprivate`, `ord`,`displayemail`,`access_admin`,`access_config`, `access_super`) VALUES ( '$id', '{$c['emailprivate']}', '{$c['ord']}', '$displayemail', '$access_admin', '$access_config', '$access_super')"; mysql_query($q); echo "$q\n"; echo mysql_error(); /* Update committee links */ $q = "UPDATE committees_link SET users_id='$id' WHERE committees_members_id='{$c['id']}'"; mysql_query($q); echo "$q\n"; } } ?>