Thanks for signing up! You have been sent an email containing instructions on how to activate your account. Please review this email and click the button below once you\'ve activated your account.
You can edit your subscription below. You can bookmark this page and return to edit your subscription at any time.
'; } } else { if (isset($_POST['dms_leprechaun_link'])) { echo 'Please complete your signup using the following form:
'; } else { echo 'Holidays on the Net now offers a number of Free text messaging (SMS) and email services to help you celebrate the Holidays! Please fill out the form below and choose which services you\'d like to receive.
'; } } if ($dms_user->isRegistered() && $dms_user->active === 'Y' && isset($_COOKIE['backlink'])) { echo '', $e->getMessage(), '
'; } elseif ($e instanceof DMSPublicException) { echo '', $e->getMessage(), '
'; echo ''; } else { echo 'Sorry, an unknown error has occurred.
'; echo ''; } } // // TODO: refactor! this is way too complicated. // // define('DMS_EXCEPTION_ERROR_PRIVATE', 1001); // Prints in red to visitor "Sorry, an unknown error has occurred" along with a "Try Again" button. // define('DMS_EXCEPTION_ERROR_PUBLIC', 1002); // Prints exception message in red to visitor along with a "Try Again" button. // define('DMS_EXCEPTION_BAIL_PUBLIC', 1003); // Bails out and prints a message in green to visitor. (return, basically) // // try { // $dms_new_signup = FALSE; // $dms_accept_post = TRUE; // // try { // if (isset($_POST['dms_uid'])) { // $dms_user_id_hash = substr(preg_replace('/[^a-z0-9]/msi', '', $_POST['dms_uid']), 0, 40); // $dms_user = DMS_User::retrieve(array('id_hash' => $dms_user_id_hash)); // } // elseif (isset($_GET['dms_uid'])) { // $dms_user_id_hash = substr(preg_replace('/[^a-z0-9]/msi', '', $_GET['dms_uid']), 0, 40); // $dms_user = DMS_User::retrieve(array('id_hash' => $dms_user_id_hash)); // } // else { // $dms_user = new DMS_User(); // $dms_accept_post = FALSE; // } // } // catch (Exception $e) { // if (isset($_POST['dms_user_submit'])) { // new signup passes uid in GET/POST which throws exception above // $dms_check_email = preg_replace('/[^a-z0-9@\._-]/', '', $_POST['dms_user_email_address']); // // try { // $dms_existing_email = DMS_User::retrieve(array('email_address' => $dms_check_email)); // } // catch (Exception $e) { // $dms_existing_email = FALSE; // } // // if ($dms_existing_email instanceof DMS_User) { // throw new Exception('Sorry, that email address is already in use!', DMS_EXCEPTION_ERROR_PUBLIC); // } // // $dms_user = new DMS_User(); // // $dms_test_new_uid = substr(preg_replace('/[^a-z0-9]/', '', $_POST['dms_uid']), 0, 40); // // if (strlen($dms_test_new_uid) !== 40) { // throw new Exception(NULL, DMS_EXCEPTION_ERROR_PRIVATE); // } // // $dms_user->id_hash = $dms_test_new_uid; // // $dms_new_signup = TRUE; // } // else { // throw new Exception(NULL, DMS_EXCEPTION_ERROR_PRIVATE); // } // } // // if ($dms_user->active === 'Y' && $dms_user->getDbId() > 0 && isset($_POST['dms_user_delete'])) { // $dms_user->delete(); // // throw new Exception('Your account has been removed.', DMS_EXCEPTION_BAIL_PUBLIC); // } // // if (TRUE === $dms_accept_post && isset($_POST['dms_user_submit'])) { // $_POST['dms_user_name'] = preg_replace('/[^ A-Za-z\'\.-]/', '', $_POST['dms_user_name']); // $_POST['dms_user_email_address'] = preg_replace('/[^a-z0-9@\._-]/', '', $_POST['dms_user_email_address']); // $_POST['dms_user_cellphone_nr'] = preg_replace('/[^0-9]/', '', $_POST['dms_user_cellphone_nr']); // $_POST['dms_user_cellphone_carrier'] = preg_replace('/[^0-9]/', '', $_POST['dms_user_cellphone_carrier']); // $_POST['dms_user_timezone'] = substr(preg_replace('/[^A-Z]/', '', $_POST['dms_user_timezone']), 0, 3); // // if (FALSE === in_array($_POST['dms_user_timezone'], array('EST', 'CST', 'MST', 'PST'))) { // $_POST['dms_user_timezone'] = 'EST'; // } // // if (empty($_POST['dms_user_email_address'])) { // throw new Exception('Empty email address!', DMS_EXCEPTION_ERROR_PUBLIC); // } // // $dms_user->name = $_POST['dms_user_name']; // $dms_user->email_address = $_POST['dms_user_email_address']; // $dms_user->cellphone_nr = $_POST['dms_user_cellphone_nr']; // // try { // if ($_POST['dms_user_cellphone_carrier'] > 0) { // $dms_user->cellphone_carrier = DMS_SMSCarrier::retrieve(array('id' => $_POST['dms_user_cellphone_carrier'])); // } // else { // throw new Exception(); //This one gets caught just below // } // } // catch (Exception $e) { // $dms_user->cellphone_carrier = 0; // } // // $dms_user->timezone = $_POST['dms_user_timezone']; // // foreach (DMS_MessageCategory::retrieve_all(array('public' => 'Y')) as $dms_category) { // if (isset($_POST['dms_subscribe_'.$dms_category->getDbId()])) { // $dms_user->addSubscription($dms_category); // } // else { // $dms_user->unsubscribe($dms_category); // } // } // // $dms_user->save(); // // if (TRUE === $dms_new_signup) { // // $subscriptions_list = ''; // // foreach (DMS_MessageCategory::retrieve_all() as $category) { // if ($dms_user->receives($category)) { // $subscriptions_list .= ' ' . $category->name . PHP_EOL; // } // } // // mail($dms_user->email_address, 'Holidays on the Net - Subscription Confirmation', // preg_replace('/^\t+/ms', '', // 'Dear '.$dms_user->name.' // // Thanks for subscribing to Holidays on the Net Email and Text Messaging Services! // // Please activate your account by visiting the following URL: // http://www.holidays.net/dms/verify_email.php?token='.$dms_user->verify_token.' // // If you did not request this service, please cancel your account by visiting the following URL: // http://www.holidays.net/dms/cancel_email.php?token='.$dms_user->verify_token.' // // Your subscriptions: // '.$subscriptions_list.' // // You can edit your subscription at any time by visiting http://www.holidays.net/hol_lists2.htm?dms_uid='.$dms_user->id_hash.' // // -- // Thanks again for joining us as we celebrate the holidays of the year. // Holidays on the Net (http://www.holidays.net) // '), // 'From: mail@holidays.net'."\r\n". // 'Reply-To: mail@holidays.net'."\r\n". // 'Content-type: text/plain'."\r\n". // 'X-Mailer: DMS/1.0' // ); // // mail('info@holidays.net', 'HON - New DMS Signup', // preg_replace('/^\t+/ms', '', // ' The following account has been registered: // // Date/Time: // '.date('r').' // // Account: // Name: '.$dms_user->name.' // Email: '.$dms_user->email_address.' // Cell #: '.$dms_user->cellphone_nr.' // Carrier: '.(($dms_user->cellphone_carrier instanceof DMS_SMSCarrier) ? $dms_user->cellphone_carrier->name : 'None chosen (yet?)').' // Timezone: '.$dms_user->timezone.' // // Database details: // User ID: '.$dms_user->getDbId().' // User ID Hash: '.$dms_user->id_hash.' // // This email was sent by '.__FILE__.' (Line 268) // // -- // Thanks, Holidays on the Net (http://www.holidays.net) // ') // ); // } // } // // echo ' // // '; // // /* // if ($dms_new_signup === TRUE) { // //echo 'Thanks for signing up! You can edit your subscription below. You can bookmark this page and return to edit your subscription at any time.
'; // } // else { // if (isset($_POST['dms_leprechaun_link'])) { // echo 'Please complete your signup using the following form:
'; // } // else { // echo 'Holidays on the Net now offers a number of Free text messaging (SMS) and email services to help you celebrate the Holidays! Please fill out the form below and choose which services you\'d like to receive.
'; // } // } // */ // // if ($dms_user->getDbId() > 0 && $dms_user->active === 'Y' && isset($_COOKIE['backlink'])) { // echo ' //// Thanks for signing up! You have been sent an email containing instructions on how to activate // your account. Please review this email and click the button below once you\'ve activated your account. //
//You have been sent an email containing information on how to activate your subscription. You can edit your subscription once you\'ve activated it.
'; // } // else { // if (isset($_POST['dms_leprechaun_link'])) { // echo 'Please complete your signup using the following form:
'; // } // else { // if ($dms_user->getDbId() > 0) { // echo 'You can edit your subscription below. You can bookmark this page and return to edit your subscription at any time.
'; // } // else { // echo 'Holidays on the Net now offers a number of Free text messaging (SMS) and email services to help you celebrate the Holidays! Please fill out the form below and choose which services you\'d like to receive.
'; // } // } // echo ' // // '; // } // } // catch (Exception $e) { // if ($e->getCode() === DMS_EXCEPTION_BAIL_PUBLIC) { // echo '', $e->getMessage(), '
'; // } // elseif ($e->getCode() === DMS_EXCEPTION_ERROR_PUBLIC) { // echo '', $e->getMessage(), '
'; // echo ''; // } // else { // echo 'Sorry, an unknown error has occurred.
'; // echo ''; // } // } ?>Please Note: It is Holidays on the Nets policy to never release your email address, phone number, or any other information. Your email address or cell phone # will only be used to send out notifications of upcoming celebrations and holidays related news!
We thank you for your support.