$title = ''; $user = new SI_User(); // Clean up hourly_rate if (!empty($_POST['hourly_rate'])) { $_POST['hourly_rate'] = preg_replace('/[^0-9\\.]/', '', $_POST['hourly_rate']); } // Clean up salary if (!empty($_POST['salary'])) { $_POST['salary'] = preg_replace('/[^0-9\\.]/', '', $_POST['salary']); } if ($_REQUEST['mode'] == 'add') { $title = "Add User"; if ($_POST['save']) { $_POST['password'] = md5($_POST['password']); $user->updateFromAssocArray($_POST); if ($user->add()) { if ($user->updateRights($_POST['rights'])) { goBack(); } else { $error_msg .= "Error updating user rights!\n"; debug_message($user->getLastError()); } } else { $error_msg .= "Error adding User!\n"; debug_message($user->getLastError()); } } } else { if ($_REQUEST['mode'] == 'edit') { $title = "Edit User"; if (empty($_REQUEST['id'])) {