function optout_page() { if (!isset($_GET['key']) || !isset($_GET['mail'])) { return '<div class="opaque radius twenty-pad"> <p class="bold">Oopsie something went wrong.</p> <p>The link you used for this page is incomplete. Please carefully check your link and try again</p> </div>'; exit; } $dat = array(); $found = FALSE; $M = subscriptionData('read', $_GET['mail'], $_GET['key']); if (!$M) { return '<div class="opaque radius twenty-pad"> <p class="bold">Oopsie something went wrong.</p> <p>The link you used for this page did not validate or this mail has already been removed. Please carefully check your link and try again.</p> </div>'; exit; } $D = subscriptionData('delete', $_GET['mail'], $_GET['key']); drupal_set_message(t('Your alert has been deactivated.')); $subscribe = l(t('subscribe'), 'subscribe', array('attributes' => array('class' => array('my-btn pop-link')))); return '<div class="opaque radius twenty-pad"> <p>' . t('Your alert subscription has been removed. You may ') . $subscribe . t(' again at any time.') . '</p> </div>'; }
function libya_quick_subscribe_form_submit($form, &$form_state) { $mail = $form_state['values']['mail']; $data = array('rand' => str_rand(12), 'mail' => $mail, 'confirm' => 0); subscriptionData('create', $data); subscribeSendMail($data); drupal_set_message(t('Email subscribed. Please check your mail for the confirmation link. You must confirm your email for your subscription to become active. Thank you.')); }