alerts@dailyclassicalmusic.com ; updated wording require_once('../../lib/site.php'); // The file of sets of correct and incorrect statements $substatementsfile = '/home/mv/dailyclassicalmusic.com/data/substatements.txt'; # the error code from the form, if any $formerror = null; // Has anything been completed on the form? if (isset($_POST["statement"])) { // A statement has been chosen - was it the valid one? // First read in the file of sets of statements $numrecs = orgla_load_array($substatementsfile, "\n", "\t", $statements, 1, array(0,1)); // Now get the response, and also the timestamp and the number of the set of statements $resp = $_POST['statement']; list($timestamp, $setno) = explode('.', $_POST['set']); $statementset = $statements[$setno]; // Check if the response is valid if ('Y' == $statementset[$resp][2][0]) { // Check that the email address is valid $email = strtolower(trim($_POST['email'])); if (!$email) { $formerror = "You haven't provided your email address."; } else if (is_valid_email($email)) { // Make sure that there's already a subscription using this email address. // To do this, we need to load the subscription file indexed on email address. $numrecs = orgla_load_array('/home/mv/dailyclassicalmusic.com/data/subscription.txt', "\n", "\t", $subs, 0, array(0)); if (isset($subs[$email])) { // At this point, we should (later?) check that the user's subscription hasn't already expired. // Now send an email to the person asking them to click on a link to reset their password. // Create the file they'll click on first, and delete it after they've used it // or after a specific time. // Create a random string and then make an HTML filename from it. // The file contains a PHP script which changes the person's password to a generated random string // and then it deletes itself $filename = 'subscription/pppp' . or_identifier('') . time() . '.htm'; $file = HOMEPATH . $filename; $url = HOMEURL . $filename; $pass = orgla_random_string(6, 10, false, true, '01234567890'); // This is the code for the temporary PHP script which resets the user's password. // Various characters need to be escaped to pass them through to the generated script. $contents = <<< HEREDOC ' . "\\r\\n" . 'X-Mailer: Orion Web Edit/'; mail('$email', 'Your Daily Classical Music password has now been reset', \$message, \$headers); echo "Your Daily Classical Music password has now been reset\\n"; echo "

Your Daily Classical Music password has now been reset.

\n"; echo "

To login now, please use the following login details:

username: $email
password: $pass

to access the subscription site:

www.dailyclassicalmusic.com

Both your username and password are case sensitive.

Your username (or 'name') is your WHOLE email address.

Once logged in, please add the subscription site to your browser bookmarks or favourites.

Please note that the subscription service has a different URL - you'll need to log in at the different address shown above!

To receive email alerts or newsletters, or to change your password to something more memorable, please visit the preferences page

\\n"; echo "

(We have also sent you a copy of this information by email.)

\n"; echo "\\n"; // Finally delete this file once it's been used, for security reasons // unlink(\$_SERVER['SCRIPT_FILENAME']); ?> HEREDOC; file_put_contents($file, $contents); // Now send the email containing the link to the file $message = "Thank you for requesting that your Daily Classical Music password be reset.\n\nPlease now click on this link (or copy the address into your web browser) to confirm that you would like your password to be reset:\n\n"; $message .= $url; $message .= "\n\nIf you didn't ask for your password to be reset, simply delete this email without clicking on the link and nothing will happen.\n\n"; $headers = 'From: Daily Classical Music ' . "\r\n" . 'X-Mailer: Orion Web Edit/'; mail($_POST['email'], 'Daily Classical Music password reset - please confirm that we should reset your password', $message, $headers); $savrecs = orgla_save_array(DATAPATH . 'pwdresets.txt', array($email, 'Y', time()), 'a', "\n", "\t"); } else { // (If the email address provided is not in our subscription file, behave in the same way as if it is, // so that people can't use this to find out if certain email addresses have subscribed or not.) // 14 Nov 2011 - bugfix here - array didn't contain time() $savrecs = orgla_save_array(DATAPATH . 'pwdresets.txt', array($email, 'N', time()), 'a', "\n", "\t"); // $savrecs = orgla_save_array(DATAPATH . 'pwdresets.txt', array($email, 'N'), time(), 'a', "\n", "\t"); } ?> M&V Password reset: Please check your email

Music and Vision homepageMusic and Vision - read us daily on the net

Music & Vision - password reset

We've just sent you an email to ''.

Please check your inbox and click on the link in the email to reset your password.

(Note: A few people have had problems receiving our password reset confirmation email. You should receive the email very quickly. If you don't receive an email from us within a few minutes, please check that the email address shown above is completely correct. If there are any mistakes, you definitely won't receive the email. If you have a 'spam' folder, it's worth checking that too. You can complete the form again to send another copy of the password reset confirmation email. If you still don't receive the email, then please get in touch with us, stating that you're having password reset problems. Please remember to include the email address for which you're trying to reset the password. We'll then investigate and get back to you.)

 

-------

 << Music & Vision home             Readers' questions >>

 

 

Reset your Music and Vision password

Music and Vision homepageMusic and Vision - read us daily on the net

Reset your Daily Classical Music subscription password

This page is for people who have already subscribed to read the full version of Music & Vision Magazine, but have lost, forgotten or otherwise mislaid their password or their welcome email. (If you're not yet a Music & Vision subscriber, you can signup here. If you just want to know more about the magazine, our questions and answers page might be a good place to start.)

To reset your Daily Classical Music password and receive a new welcome email with instructions how to access our subscription site, type your email address in the box below, complete the (easy) test to prove that you're a person and not a machine, and then press the RESET MY PASSWORD button. We'll then send you a confirmation email. When you click on the link in the email, we'll reset your password, and you should then be able to log in to our subscription service.

 
ERROR: $formerror

\n"; } ?>

Please provide your e-mail address so that we know whose password to reset:  
 
 
Please complete this simple test by choosing the one correct statement from the list below. Only one of the statements is true. If you don't know the answer, refresh (or revisit) the page to see a different set of statements. It should be easy, though - the correct statement is always about classical music. Completing the test is not designed to test your knowledge of classical music but just to prove that you're a human being and not a machine:

\n"; // $name Name of select tag // $array Multi-dimensional array containing the options we'll select from // $selected Selected option or value (eg from a previous form) // $default The default option - initially shown selected (unless === 0 or different $selected) // $selectfield Array field number containing the select string // $valuefield Array field number containing the value string // $testfield Array field number to test for inclusion // $testval Value which $testfield must have if included in list // $sortfunc Sort function for sorting options before listing them // $encodefunc Function to encode values of options before display // $decodefunc Function to restore decoded values (for comparing) // $class CSS class associated with the select tag echo orhta_select_list_array('statement', $statementset, '', 'Please choose the only correct statement from this list', 3, 1, '', false, false, false, false, false); ?>
 
 

 

-------

 << Music & Vision home             Readers' questions >>