You can add confirmation form to your page. There is a Drupal API function for this - confirm_form(), that helps you create such form.
Change your code to like this:
// In your hook_menu().
$items['change_availability/%'] = array(
'title' => t('Change Availability'),
'page callback' => 'drupal_get_form',
'page arguments' => array('change_availability_test_form', 1),
'access callback' => TRUE,
'type' => MENU_CALLBACK,
);
return $items;
/**
* Form callback for 'change_availability/%' path.
*/
function change_availability_test_form($form, $form_state, $account) {
$form['account'] = array(
'#type' => 'value',
'#value' => $account,
);
return confirm_form($form, t('Are you sure you want to change the availability?'), 'here_goes_your_backurl_for_cancel_link');
}
/**
* Submit callback for 'change_availability_test_form' form.
*/
function change_availability_test_form_submit($form, &$form_state) {
$account = $form_state['values']['account'];
// Call your function
change_availability_test($account);
// Redirect back to te table.
$form_state['redirect'] = 'your_backurl';
}