promo ref test
This commit is contained in:
@@ -0,0 +1,163 @@
|
||||
Subject: {{site_name}} - {{send_firstname}} {{send_lastname}} will like to show this to you
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{site_name}} - {{send_firstname}} {{send_lastname}} will like to show this to you </title>
|
||||
<style type="text/css">
|
||||
body {margin: 0; padding: 0; min-width: 100%!important; font-family: sans-serif;}
|
||||
.content {width: 100%; max-width: 600px;}
|
||||
.header {padding: 10px 10px 10px 10px;}
|
||||
.innerpadding {padding: 10px 10px 10px 10px;}
|
||||
.signup_random{ font-size: 44px; padding:10px; margin:10px;}
|
||||
.line-band {height 20px;}
|
||||
.warning{color:lightred; font-weight: bolder; padding 10px;}
|
||||
.continue-web{background-color:aliceblue; padding:10px;}
|
||||
.cent-ver{text-align:center; }
|
||||
.borderbottom {border-bottom: 1px solid #f2eeed;}
|
||||
.subhead {font-size: 12px; color: #ffffff; font-family: sans-serif; letter-spacing: 3px;}
|
||||
.h1, .h2, .bodycopy {color: #153643; font-family: sans-serif;}
|
||||
.h1 {font-size: 33px; line-height: 38px; font-weight: bold;}
|
||||
.bodycopy {font-size: 14px; line-height: 20px; padding-bottom:10px;}
|
||||
.button {text-align: center; font-size: 16px; font-family: sans-serif; font-weight: bold; padding: 0 30px 0 30px;}
|
||||
.button a {color: #ffffff; text-decoration: none;}
|
||||
.footer {padding: 20px 30px 15px 30px; bgcolor:#007bff; background-color:#007bff;}
|
||||
.footercopy {font-family: sans-serif; font-size: 14px; color: #ffffff;}
|
||||
.footercopy a {color: #ffffff; text-decoration: underline;}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body style="margin: 0; padding: 10px; min-width: 100%!important; font-size: 14px; line-height: 20px; font-family: sans-serif; background-color:#f6f8f1;" bgcolor="#f6f8f1; padding: 10px;">
|
||||
<table style="max-width:640px; margin:0px auto auto auto" bgcolor="#f6f8f1" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td>
|
||||
<table bgcolor="#ffffff" class="content" align="center" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="header">
|
||||
<table align="left" border="0" cellpadding="0" cellspacing="0" style="width: 100%; max-width: 600px;">
|
||||
<tr>
|
||||
<td height="30" border="0" style="text-align:center;">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
|
||||
<tr>
|
||||
<td style="padding: 1px 0 1px 0; text-align:center;">
|
||||
<a href="https://www.wrenchboard.com/"><img src="https://www.wrenchboard.com/assets/ext/images/wrenchboard.png" alt="WrenchBoard"></a> <!-- {{site_name}} -->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="subhead"
|
||||
style="font-size: 12px; color: #ffffff; font-family: sans-serif; letter-spacing: 3px; color:black; padding: 0 0 0 3px; text-align:center;">
|
||||
{{site_trade_name}}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="innerpadding borderbottom" style="padding: 10px 10px 10px 10px;">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td class="bodycopy" style="padding-bottom:10px;">
|
||||
Dear <b>{{firstname}}</b>,
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bodycopy" style="padding-bottom:10px;">
|
||||
<span style="color:darkgreen; font-weight:bolder;">{{send_firstname}} {{send_lastname}} </span> invites you to explore <a href="{{server_name}}/invite?refer_link={{refer_link}}">{{site_name}}!</a>. Unlock the power of your skills and social networks. Start earning today!
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bodycopy" style="padding:0px 30px 10px 30px;">
|
||||
<hr />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bodycopy" style="padding-bottom:10px;">
|
||||
|
||||
<b>Invitation Link :</b><br> {{server_name}}/promoref?refer_link={{refer_link}}
|
||||
<hr size="1">
|
||||
<div style="background-color:#fce6f2; margin-top: 10px; padding: 5px; border-radius:10px;">
|
||||
You can also use the button below<br>
|
||||
<div style="color:darkgreen; text-align:center; width:100%; padding: 10px;">
|
||||
<a href="{{server_name}}/invite?refer_link={{refer_link}}">Invitation Link</a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr class="innerpadding borderbottom" style="padding: 10px 10px 10px 10px;">
|
||||
<td class="innerpadding borderbottom">
|
||||
<hr size="1">
|
||||
<table width="100%" border="0" >
|
||||
<tr>
|
||||
<td style="text-align:center;">
|
||||
<a href="https://apps.apple.com/us/app/wrenchboard/id1435718367?ls=1">
|
||||
<img width="200" height="auto" src="{{server_name}}/assets/images/download/apple.jpg" alt="Apple" border="0" />
|
||||
</a>
|
||||
</td>
|
||||
<td style="text-align:center;">
|
||||
<a href="https://apps.apple.com/us/app/wrenchboard/id1435718367?ls=1">
|
||||
<img width="200" height="auto" src="{{server_name}}/assets/images/download/android.jpg" alt="Android" border="0" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="innerpadding bodycopy" style="padding: 10px 10px 10px 10px;">
|
||||
{{site_name}} Team
|
||||
<br>
|
||||
{{server_name}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="footer" style="color:#ffffff; padding: 20px 30px 15px 30px; bgcolor:#007bff; background-color:#007bff; border-radius: 10px 10px 10px 10px;">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td align="center" class="footercopy">
|
||||
® {{site_name}} {{YYYY}}<br/>
|
||||
You received this email because a subscriber, {{send_firstname}} {{send_lastname}}, to {{site_name}} refers you. If you get this email in error, please <a href="{{main_site_url}}contact" class="unsubscribe"><font color="#ffffff">contact</font></a> us.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" style="padding: 20px 0 0 0;">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="37" style="text-align: center; padding: 0 10px 0 10px;">
|
||||
<a href="https://www.facebook.com/wrenchboard/">
|
||||
<img src="{{server_name}}/assets/images/brands/facebook.png" width="37" height="37" alt="Facebook" border="0" />
|
||||
</a>
|
||||
</td>
|
||||
<td width="37" style="text-align: center; padding: 0 10px 0 10px;">
|
||||
<a href="http://www.twitter.com/">
|
||||
<img src="{{server_name}}/assets/images/brands/twitter.png" width="37" height="37" alt="Twitter" border="0" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -86,6 +86,12 @@ long promo_email(long mailtype, CVars in, CVars &out){
|
||||
form.LetStr("email", in["email"]);
|
||||
form.Email("PROMO/promo_alert.mailfile");
|
||||
break;
|
||||
|
||||
case WRENCHBOARD_PROMOADMIN_ADDLIST:
|
||||
vars2form(in, form);
|
||||
form.LetStr("email", in["email"]);
|
||||
form.Email("PROMO/member_referpromo_individual.mailfile");
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -288,6 +288,31 @@ long RefreshPromoActivities(CVars in, CVars &out){
|
||||
return ret;
|
||||
}
|
||||
|
||||
long ReferEmailsNotification(){
|
||||
CVars out;
|
||||
res = pgsql_query("SELECT a.firstname AS send_firstname,a.lastname AS send_lastname,"
|
||||
" p.firstname,p.lastname, 'REFPROMO-'||p.uid AS refer_link , p.email "
|
||||
" FROM promo_member p "
|
||||
" LEFT JOIN promo_admin a ON a.id = p.admin_id "
|
||||
" WHERE email_sent IS NULL LIMIT 20", in["promo"].c_str(), in["limit"].Long());
|
||||
if (res != NULL && pgsql_num_rows(res) > 0) {
|
||||
out["total_record"] = pgsql_num_rows(res);
|
||||
for (int i = 0, n = pgsql_num_rows(res); i < n; i++) {
|
||||
|
||||
map<const char*, const char*>f = pgsql_fetch_assoc(res, i);
|
||||
if (f.empty()) continue;
|
||||
CVars rec;
|
||||
map_to_cvars(f, rec);
|
||||
|
||||
promo_email(WRENCHBOARD_PROMOADMIN_ADDLIST, rec, out); // send the reminder email
|
||||
pgsql_query("UPDATE promotion SET email_sent=now() WHERE id =%lu", rec["promo_id"].Long());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
long ReferEmailsCleanup(){
|
||||
|
||||
logfmt(logINFO, "ReferEmailsCleanup() *** **** **** ENTRY");
|
||||
|
||||
Reference in New Issue
Block a user