示例#1
0
 public function checkoutSend($checkoutAdminEmailAddress, $checkoutDatabase, $checkoutTenant, $checkoutPeriods, $checkoutContactPhone, $checkoutComment, $totalBudgets, $fee, $totalBudgetsFee)
 {
     $msg = '';
     $msg .= '<p>Here is the checkout request info:<br />';
     $msg .= 'Admin emails       : ' . $checkoutAdminEmailAddress . '<br />';
     $msg .= 'Database           : ' . $checkoutDatabase . '<br />';
     $msg .= 'Tenant             : ' . $checkoutTenant . '<br />';
     $msg .= 'Periods            : ' . $checkoutPeriods . '<br />';
     $msg .= 'Total              : ' . $totalBudgets . '<br />';
     $msg .= 'Fee                : ' . $fee . '<br />';
     $msg .= 'Total included fee : ' . $totalBudgetsFee . '<br />';
     $msg .= 'Contact phone      : ' . $checkoutContactPhone . '<br />';
     $msg .= 'Comment            : ' . $checkoutComment . '<br />';
     $ret = sl_send_email('*****@*****.**', 'Checkout request for ' . $checkoutTenant, $msg);
     return array('ret' => $ret);
 }
示例#2
0
function sendTemplateEmail($to, $template, $data)
{
    $mailq = '';
    $recipients = is_array($to) ? $to : array($to);
    global $emailTemplates;
    $replacedTemplate = !empty($data) ? templateReplace($emailTemplates[$template], $data) : $emailTemplates[$template];
    $subject = $replacedTemplate['subject'];
    $html = $replacedTemplate['body'];
    $plain = isset($replacedTemplate['plain']) ? $replacedTemplate['plain'] : null;
    $resutl = null;
    foreach ($recipients as $recipient) {
        if (!empty($emailTemplates[$template]['mailq'])) {
            $mailq = $emailTemplates[$template]['mailq'];
        }
        $result = sl_send_email($recipient, $subject, $html, $plain, $mailq);
    }
    return $result;
}
示例#3
0
            if ($updated_rewarder_points < 0) {
                $rewarder_points = $user_data["rewarder_points"];
                $updated_rewarder_points = 0;
            }
            $update_points_sql = 'UPDATE ' . REVIEW_USERS . ' SET rewarder_points = \'' . $updated_rewarder_points . '\' where id = ' . $user;
            $update_points_results = mysql_query($update_points_sql);
            if ($update_points_results) {
                $log_sql = "INSERT INTO " . REVIEW_REWARDER_LOG . " (user_id, rewarder_points, awarded_by, date_awarded) VALUES ('" . $user . "', '" . $rewarder_points . "', '" . $userId . "', '" . date("Y-m-d H:i:s") . "')";
                $log_result = mysql_query($log_sql);
                if (isset($_POST["notify-users"]) && $_POST["notify-users"] == '1') {
                    $subject = "Rewarder points received";
                    $body = "You have received " . $rewarder_points . " rewarder points for distribution.  You now have " . $updated_rewarder_points . " points available.<br />";
                    $body .= "To distribute your points, <a href=\"" . SERVER_BASE . "rewarder/rewarder.php\">click here</a><br/><br/>";
                    $body_plain = "You have received " . $rewarder_points . " rewarder points for distribution.  You now have " . $updated_rewarder_points . " points available.<br />";
                    $body_plain .= "To distribute your points, Visit: " . SERVER_BASE . "rewarder/rewarder.php<br/><br/>";
                    sl_send_email($user_data['username'], $subject, $body, $body_plain);
                }
            }
        }
    }
}
//pull list of users from db
$employees_sql = "SELECT * FROM " . REVIEW_USERS . " ORDER BY nickname ASC";
$employees_query = mysql_query($employees_sql);
/*********************************** HTML layout begins here  *************************************/
include "head.html";
?>

<!-- Add page-specific scripts and styles here, see head.html for`global scripts and styles  -->
<link href="css/rewarder.css" rel="stylesheet" type="text/css">
<link href="css/ui.toaster.css" rel="stylesheet" type="text/css">