You are here

function gotwo_reset_confirm in Go - url redirects 5

Create confirmation form for click counter item reset.

1 string reference to 'gotwo_reset_confirm'
gotwo_menu in ./gotwo.module
Implementation of hook_menu

File

./gotwo.module, line 431
Module that provides easy to use redirection links. A redirection link would be like: http://examples.org/go/a_label http://examples.org/go/123546 http://examples.org/go/or/like/this

Code

function gotwo_reset_confirm($gid) {
  $res = db_fetch_object(db_query('SELECT * FROM {gotwo} WHERE gid = %d', $gid));
  $form['gid'] = array(
    '#type' => 'value',
    '#value' => $res->gid,
  );
  return confirm_form($form, t('Reset click counter for %label', array(
    '%label' => $res->src,
  )), 'admin/build/gotwo', '<p>' . t('Are you sure you want to reset the click counter for %label? This action cannot be undone.', array(
    '%label' => $res->src,
  )) . '</p>', t('Reset'), t('Cancel'));
}