} echo _theme_footer(); } else { opendb_not_authorised_page(PERM_ADMIN_SEND_EMAIL, $HTTP_VARS); } } else { if ($HTTP_VARS['op'] == 'send_to_uid' && is_user_permitted_to_receive_email($HTTP_VARS['uid'])) { if (is_user_granted_permission(PERM_SEND_EMAIL)) { echo _theme_header(get_opendb_lang_var('send_email'), $HTTP_VARS['inc_menu']); echo "<h2>" . get_opendb_lang_var('send_email') . "</h2>"; $from_user_r = fetch_user_r(get_opendb_session_var('user_id')); $HTTP_VARS['toname'] = trim(strip_tags($HTTP_VARS['toname'])); if ($HTTP_VARS['op2'] == 'send' && send_email_to_userids(array($HTTP_VARS['uid']), $from_user_r['user_id'], $HTTP_VARS['subject'], $HTTP_VARS['message'], $errors)) { // do nothing } else { show_email_form($HTTP_VARS['uid'], fetch_user_name($HTTP_VARS['uid']), $from_user_r['user_id'], $from_user_r['fullname'], $HTTP_VARS['subject'], $HTTP_VARS['message'], $HTTP_VARS, $errors); } echo _theme_footer(); } else { opendb_not_authorised_page(PERM_SEND_EMAIL, $HTTP_VARS); } } else { opendb_operation_not_available(); } } } } else { opendb_operation_not_available(); } } else { // invalid login, so login instead.
echo "<h3>" . tra("1) If you know your account's email address, and you can receive email there:") . "</h3><p>" . tra("Enter the email address below, and click OK. You will be sent email instructions for resetting your password."); start_table(); echo "<form method=post action=mail_passwd.php>\n"; row2(tra("Email address"), "<input type=\"text\" size=40 name=email_addr>"); row2("", "<input class=\"btn btn-default\" type=submit value=\"" . tra("OK") . "\">"); echo "</form>"; end_table(); } function show_auth_form() { $master_url = parse_config(get_config(), "<master_url>"); $x = strstr($master_url, "//"); $x = substr($x, 2); $x = rtrim($x, "/"); $x = str_replace("/", "_", $x); $account_file = "account_{$x}.xml"; echo "<p><h3>" . tra("2) If you forgot your account's email address, or you can't receive email there:") . "</h3>" . tra("If you have run BOINC under this account, you can still access it. Here's how:") . "\n\n <ul>\n <li> " . tra("Go to the BOINC data directory on your computer (its location is written to the Event Log at startup).") . "\n <li> " . tra("Find your account file for this project; it will be named <b>%1</b>.", $account_file) . "\n <li> " . tra("Open the file in a text editor like Notepad. You'll see something like") . "\n <pre>\n <account>\n <master_url>{$master_url}</master_url>\n <authenticator>8b8496fdd26df7dc0423ecd43c09a56b</authenticator>\n <project_name>" . PROJECT . "</project_name>\n ...\n </account>\n </pre>\n\n <li> " . tra("Select and Copy the string between %1 and %2 (%3 in the above example).", "<authenticator>", "</authenticator>", "<b>8b8496fdd26df7dc0423ecd43c09a56b</b>") . "\n\n <li> " . tra("Paste the string into the field below, and click OK.") . "\n <li> " . tra("You will now be logged in to your account; update the email and password of your account.") . "\n </ul>\n "; start_table(); echo "<form action=login_action.php method=post>\n"; row2(tra("Log in with authenticator"), "<input type=\"text\" name=authenticator size=40>"); row2(tra("Stay logged in on this computer"), "<input type=checkbox name=send_cookie checked>"); row2("", "<input class=\"btn btn-default\" type=submit value=\"" . tra("OK") . "\">"); echo "</form>"; end_table(); } page_head(tra("Forgot your account info?")); show_email_form(); if (!no_computing()) { show_auth_form(); } page_tail();