function _send_mail() { $title = $this->get_attribute('title'); $content = $this->get_attribute('content'); $author = $this->get_attribute('author'); $subscribe_email = ADMINISTRATOR_EMAIL; //fix $parent_object_data =& fetch_requested_object(); $recipients = $this->_get_theme_subscribers($parent_object_data['id']); if(!count($recipients)) return false; foreach($recipients as $recipient) { @ send_html_mail( array('"' . $recipient['name'].'" <'. $recipient['email'] .'>'), '"' . $author.'" <'. $subscribe_email .'>', $title, $content); } return true; }
define("PAGE_DESCRIPTION", t("report_abuse_meta_description", "Report Abuse or Copyright Infringement")); define("PAGE_KEYWORDS", t("report_abuse_meta_keywords", "report, abuse, copyright, infringement, file, hosting")); // send report if submitted if ((int) $_REQUEST['submitme']) { if (!strlen(trim($_REQUEST['fileDetails']))) { setError(t("report_abuse_error_no_content", "Please enter the details of the reported file.")); } else { $subject = "New abuse report on " . SITE_CONFIG_SITE_NAME; $plainMsg = "There is a new abuse report on " . SITE_CONFIG_SITE_NAME . " with the following details:\n\n"; $plainMsg .= "***************************************\n"; $plainMsg .= trim($_REQUEST['fileDetails']) . "\n"; $plainMsg .= "***************************************\n"; $plainMsg .= "Submitted IP: " . getUsersIPAddress() . "\n"; $plainMsg .= "***************************************\n\n"; $plainMsg .= "Please login via " . WEB_ROOT . "/admin/ to investigate further."; send_html_mail(SITE_CONFIG_REPORT_ABUSE_EMAIL, $subject, str_replace("\n", "<br/>", $plainMsg), SITE_CONFIG_REPORT_ABUSE_EMAIL, $plainMsg); redirect(WEB_ROOT); } } require_once '_header.php'; ?> <div class="contentPageWrapper"> <?php if (isErrors()) { echo outputErrors(); } ?> <!-- report abuse form -->
$db->query('UPDATE album SET disabled = \'TRUE\' WHERE account_id = ' . $db->escapeNumber($account_id)); $db->lockTable('album_has_comments'); $db->query('SELECT MAX(comment_id) FROM album_has_comments WHERE album_id = ' . $db->escapeNumber($account_id)); if ($db->nextRecord()) { $comment_id = $db->getField('MAX(comment_id)') + 1; } else { $comment_id = 1; } $db->query('INSERT INTO album_has_comments (album_id, comment_id, time, post_id, msg) VALUES (' . $db->escapeNumber($account_id) . ', ' . $db->escapeNumber($comment_id) . ', ' . $db->escapeNumber(TIME) . ', 0, ' . $db->escape_string('<span class="green">*** Picture disabled by an admin</span>') . ')'); $db->unlock(); // get his email address and send the mail $db->query('SELECT email FROM account WHERE account_id = ' . $db->escapeNumber($account_id)); if ($db->nextRecord()) { send_html_mail('SMR Photo Album', '*****@*****.**', $db->getField('email'), 'SMR Photo Album Notification', nl2br($email_txt)); } } else { if ($var['task'] == 'reset_location') { $db->query('UPDATE album SET location = \'\' WHERE account_id = ' . $db->escapeNumber($account_id)); } else { if ($var['task'] == 'reset_email') { $db->query('UPDATE album SET email = \'\' WHERE account_id =' . $db->escapeNumber($account_id)); } else { if ($var['task'] == 'reset_website') { $db->query('UPDATE album SET website = \'\' WHERE account_id = ' . $db->escapeNumber($account_id)); } else { if ($var['task'] == 'reset_birthdate') { $db->query('UPDATE album SET day = 0, month = 0, year = 0 WHERE account_id = ' . $db->escapeNumber($account_id)); } else { if ($var['task'] == 'reset_other') {
if (isset($_POST['register-captcha'])) { $inputValue[4] = ""; /* we need to always clear the captcha field, because it will regenerate after a reresh*/ if ($Error->captcha($_POST['register-captcha'])) { $errorClass[4] = 'success'; } else { $errorClass[4] = 'error'; } } else { if (isset($_POST['action'])) { $Error->add('error', 'Captcha cannot be left empty'); $errorClass[4] = 'error'; } } // Instantiontiate the erroring before we need to refresh the page $msg = $Error->alert(); // Check if the form was submitted without any errors. if (isset($_POST['register-username']) && isset($_POST['register-password']) && isset($_POST['register-confirm']) && isset($_POST['register-email']) && isset($_POST['register-captcha']) && !$Error->ok()) { $complete = true; // Create the actual user Auth::createNewUser($_POST['register-username'], $_POST['register-password'], $_POST['register-email']); $userId = Auth::userId($_POST['register-username']); $link = full_url_to_script('activate.php') . "?action=activate&code=" . Activation::get($userId) . "&id=" . $userId; //echo $link; Emailtemplate::setBaseDir('./assets/email_templates'); $html = Emailtemplate::loadTemplate('activation', array('title' => 'Activation Email', 'prettyName' => Options::get('prettyName'), 'name' => $_POST['register-username'], 'siteName' => Options::get('emailName'), 'activationLink' => $link, 'footerLink' => Options::get('siteName'), 'footerEmail' => Options::get('emailInfo'))); send_html_mail(array($_POST['register-username'] => $_POST['register-email']), 'Activation Email', $html, array(Options::get('siteName') => Options::get('emailAdmin'))); } Template::setBaseDir('./assets/tmpl'); $html = Template::loadTemplate('layout', array('header' => Template::loadTemplate('header', array('title' => $title, 'user' => $user, 'admin' => $isadmin, 'msg' => $msg, 'meta' => $meta, 'selected' => 'register')), 'content' => Template::loadTemplate('register', array('errorClass' => $errorClass, 'inputValue' => $inputValue, 'complete' => $complete, 'callback' => $callback)), 'footer' => Template::loadTemplate('footer', array('time_start' => $time_start)))); echo $html;
<?php die; // DISABLED - ENABLED AS REQUIRED FOR TESTING // setup includes require_once 'includes/master.inc.php'; $subject = "Test email from email_test.php"; $plainMsg = "Test email content"; send_html_mail($_REQUEST['email'], $subject, $plainMsg, SITE_CONFIG_REPORT_ABUSE_EMAIL, $plainMsg, true);
if (strpos($file, "options") === 0) { $csv_format_id = 3; } $zco_notifier = new notifier(); $ProductCSV = new ProductCSV(); $template = new template_func(DIR_WS_TEMPLATES); ProductCSV::import($to_path . $file, $csv_format_id, true, false); $email = file_get_contents("includes/addon_modules/product_csv/email/email_template_default.html"); $email = str_replace('$EMAIL_SUBJECT', sprintf(PRODUCT_CSV_IMPORTED, $file), $email); $email = str_replace('$EMAIL_MESSAGE_HTML', $body, $email); product_csv_import_write_log("INFO", $file . "\n" . $email); send_html_mail(SUCCESS_PRODUCT_CSV_IMPORT . $file, $email); } else { $msg = ERROR_PRODUCT_CSV_IMPORT_FILE_READ . "(" . $to_path . $file . ")"; product_csv_import_write_log("ERROR", $msg); send_html_mail(UNSUCCESS_PRODUCT_CSV_IMPORT . $file, $msg); } } } } } // ファイル取得 function product_csv_get_files($base, $ext) { $handle = opendir($base); $files = array(); while (($filename = readdir($handle)) !== false) { if ($filename == "." || $filename == "..") { continue; } if (filetype($base . "/" . $filename) == "file") {
} // create the account if (!isErrors()) { $newPassword = createPassword(); $newUser = UserPeer::create($username, $newPassword, $emailAddress, $title, $firstname, $lastname); if ($newUser) { $subject = "Account details for " . SITE_CONFIG_SITE_NAME; $plainMsg = "Dear " . $firstname . ",\n\n"; $plainMsg .= "Your account on " . SITE_CONFIG_SITE_NAME . " has be created. Use the details below to login to your new account:\n\n"; $plainMsg .= "<strong>Url:</strong> <a href='" . WEB_ROOT . "'>" . WEB_ROOT . "</a>\n"; $plainMsg .= "<strong>Username:</strong> " . $username . "\n"; $plainMsg .= "<strong>Password:</strong> " . $newPassword . "\n\n"; $plainMsg .= "Feel free to contact us if you need any support with your account.\n\n"; $plainMsg .= "Regards,\n"; $plainMsg .= SITE_CONFIG_SITE_NAME . " Admin\n"; send_html_mail($emailAddress, $subject, str_replace("\n", "<br/>", $plainMsg), SITE_CONFIG_DEFAULT_EMAIL_ADDRESS_FROM, strip_tags($plainMsg)); redirect(WEB_ROOT . "/register_complete." . SITE_CONFIG_PAGE_EXTENSION); } else { setError(t("problem_creating_your_account_try_again_later", "There was a problem creating your account, please try again later")); } } } require_once '_header.php'; ?> <div class="contentPageWrapper"> <?php if (isErrors()) { echo outputErrors(); }
if (htmlspecialchars(Options::userGet($userId, $dateOption)) !== htmlspecialchars($timestamp)) { // Set the option to the new value Options::userSet($userId, $dateOption, $timestamp); $changes = true; } } } if (isset($_POST['action']) && $_POST['action'] == 'Save Changes') { // These are the 2 static things in your account a password and a email address if (isset($_POST['user-email']) && $Error->email($_POST['user-email'], false) && $_POST['user-email'] !== $u->email) { $u->email = $_POST['user-email']; $u->update(); Activation::remove($userId); $link = full_url_to_script('activate.php') . "?action=activate&code=" . Activation::generate($userId) . "&id=" . $userId; Emailtemplate::setBaseDir('./assets/email_templates'); $html = Emailtemplate::loadTemplate('reactivate', array('title' => 'Reactivation Email', 'prettyName' => Options::get('prettyName'), 'name' => $u->username, 'siteName' => Options::get('emailName'), 'activationLink' => $link, 'footerLink' => Options::get('siteName'), 'footerEmail' => Options::get('emailInfo'))); send_html_mail(array($u->username => $u->email), 'Reactivation Email', $html, array(Options::get('siteName') => Options::get('emailAdmin'))); $Error->add('info', '<strong>Logged Out</strong><br />We have sent you a reactivation email to the new email address in order to verify it. Please check your email and follow the link within.'); $Auth->logout(); } // These are the 2 static things in your account a password and a email address if (isset($_POST['user-password']) && $_POST['user-password'] !== $inputValue[1] && $_POST['user-password'] !== '') { Auth::changePassword($u->id, $_POST['user-password']); $Error->add('info', '<strong>Logged Out</strong><br />Password updated, you may login with your new password'); $Auth->logout(); } } } Template::setBaseDir('./assets/tmpl'); $html = Template::loadTemplate('layout', array('header' => Template::loadTemplate('header', array('title' => $title, 'user' => $user, 'admin' => $isadmin, 'msg' => $msg)), 'content' => Template::loadTemplate('settings', array('inputValue' => $inputValue, 'userId' => $userId, 'changes' => $changes)), 'footer' => Template::loadTemplate('footer', array('time_start' => $time_start)))); echo $html;
// Instantiontiate the erroring before we need to refresh the page $msg = $Error->alert(); // Check if the form was submitted without any errors. if (isset($detail) && Auth::resetPasswordCheck($detail) !== false) { $userId = Auth::resetPasswordCheck($detail); $activationCode = Activation::get($userId); $complete = true; $u = new User($userId); $link = full_url_to_script('forgot.php') . "?action=resetpassword&code=" . Activation::get($userId) . "&uid=" . $userId; // Select the Email tempalte and replace the relevant values Emailtemplate::setBaseDir('./assets/email_templates'); $html = Emailtemplate::loadTemplate('forgot', array('title' => 'Reset Password Email', 'prettyName' => Options::get('prettyName'), 'name' => $u->username, 'siteName' => Options::get('emailName'), 'link' => $link, 'footerLink' => Options::get('siteName'), 'footerEmail' => Options::get('emailInfo'))); // Replace the relevant values and send the HTML email send_html_mail(array($u->username => $u->email), 'Reset Password Email', $html, array(Options::get('siteName') => Options::get('emailAdmin'))); } // Otherwise if the email link is followed lets reset the password and email it to the user. if (isset($_GET['action']) && $_GET['action'] == 'resetpassword' && isset($_GET['uid']) && isset($_GET['code']) and Activation::get($_GET['uid']) == $_GET['code']) { $u = new User($_GET['uid']); $userId = $u->id; $newPassword = Auth::generateStrongPassword(6, false, 'ld'); Auth::changePassword($userId, $newPassword); $reset = true; // Select the Email tempalte and replace the relevant values Emailtemplate::setBaseDir('./assets/email_templates'); $html = Emailtemplate::loadTemplate('reset', array('title' => 'Password Successfully Reset', 'prettyName' => Options::get('prettyName'), 'name' => $u->username, 'siteName' => Options::get('emailName'), 'password' => $newPassword, 'footerLink' => Options::get('siteName'), 'footerEmail' => Options::get('emailInfo'))); // Replace the relevant values and send the HTML email send_html_mail(array($u->username => $u->email), 'New Password', $html, array(Options::get('siteName') => Options::get('emailAdmin'))); } Template::setBaseDir('./assets/tmpl'); $html = Template::loadTemplate('layout', array('header' => Template::loadTemplate('header', array('title' => $title, 'user' => $user, 'admin' => $isadmin, 'msg' => $msg, 'meta' => $meta, 'selected' => 'forgot')), 'content' => Template::loadTemplate('forgot', array('inputValue' => $inputValue, 'complete' => $complete, 'reset' => $reset, 'password' => $newPassword)), 'footer' => Template::loadTemplate('footer', array('time_start' => $time_start)))); echo $html;