promotion
This commit is contained in:
@@ -0,0 +1,161 @@
|
||||
Subject: View opportunities at {{site_name}}
|
||||
|
||||
<!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>View opportunities at {{site_name}}</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: 16px; 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: 16px; color: #ffffff;}
|
||||
.footercopy a {color: #ffffff; text-decoration: underline;}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body style="margin: 0; padding: 10px; min-width: 100%!important; font-size: 16px; 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;">
|
||||
Welcome to <a href="{{server_name}}">{{site_name}}</a>; please follow the link below to learn about our opportunities.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bodycopy" style="padding: 10px 50px 10px 50px;">
|
||||
<hr size="1" style="color:lightgrey; size=1" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bodycopy" style="padding:20px auto 40px auto; font-weight:bold; text-align:center; font-size 20px; color:darkgreen; background-color: #e8f6f3; ">
|
||||
<a style="text-decoration:none;" href="{{promo_server_name}}/{{promo}}/{{promo_uid}}">Click here to view opportunities</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<tr class="innerpadding borderbottom" style="padding: 10px 10px 10px 10px;">
|
||||
<td class="innerpadding borderbottom">
|
||||
<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>
|
||||
|
||||
<td class="bodycopy">
|
||||
|
||||
<div style="background-color:#fce6f2; margin-top: 10px; padding: 5px; border-radius: 10px;">
|
||||
We value your privacy. If you did not initiate this process or have any further support questions, don't hesitate to get in touch with us at {{server_name}}/contact<br>
|
||||
</div>
|
||||
|
||||
</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 you subscribed to the {{site_name}} questionnaire. 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>
|
||||
@@ -169,6 +169,7 @@ enum { PARTNER_STRIPE };
|
||||
#define WRB_CRONJOB_PROCESSTRANSFER 781
|
||||
|
||||
#define WRB_CRONJOB_AUTO_OFFEREXPIRE 785
|
||||
#define WRB_CRONJOB_HOLIDAY_BROADCAST 786
|
||||
|
||||
#define WRB_CRONJOB_PENDINGSM 790
|
||||
|
||||
|
||||
@@ -290,9 +290,12 @@ long cron_email(long mailtype, CVars in, CVars &out) {
|
||||
form.Email("REMINDER/offer_pending_reminder.mailfile");
|
||||
break;
|
||||
|
||||
|
||||
|
||||
|
||||
case WRB_CRONJOB_HOLIDAY_BROADCAST:
|
||||
vars2form(x, form); // need to remove
|
||||
vars2form(in, form);
|
||||
form.LetStr("email", in["email"].c_str());
|
||||
form.Email("HOLIDAY/independence_ng_2025.mailfile");
|
||||
break;
|
||||
}
|
||||
|
||||
} catch (bad_parameter) {
|
||||
|
||||
@@ -32,6 +32,7 @@ long ProcessTransferJobs(CVars in, CVars &out);
|
||||
long ScheduleTransferJobs(CVars in, CVars &out);
|
||||
long TestNotificationsJobs(CVars in, CVars &out);
|
||||
long ProcessExpiredOffers(CVars in, CVars &out);
|
||||
long ScheduleHolidayJobs(CVars in, CVars &out);
|
||||
|
||||
/*
|
||||
CREATE TABLE cron_jobs (
|
||||
@@ -147,14 +148,45 @@ long sitecrons_calls(CVars in, CVars &out) {
|
||||
CronTracker(ct, co);
|
||||
return ProcessExpiredOffers(in, out);
|
||||
break;
|
||||
|
||||
|
||||
//define('WRB_CRONJOB_HOLIDAY_BROADCAST', 786);
|
||||
case WRB_CRONJOB_HOLIDAY_BROADCAST:
|
||||
return ScheduleHolidayJobs(in, out);
|
||||
break;
|
||||
}
|
||||
|
||||
logfmt(logINFO, "/sitecrons_calls()");
|
||||
return ret;
|
||||
}
|
||||
|
||||
long ScheduleHolidayJobs(CVars in, CVars &out){
|
||||
char vname[30];
|
||||
long ret = PHP_API_BAD_PARAM;
|
||||
try {
|
||||
out["total_record"] = "0";
|
||||
const PGresult *res;
|
||||
res = pgsql_query("SELECT * FROM holiday_message WHERE status = 1 AND completed IS NULL ORDER BY id DESC LIMIT 5");
|
||||
|
||||
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);
|
||||
cron_email(WRB_CRONJOB_HOLIDAY_BROADCAST, rec, out); // send the cron email
|
||||
pgsql_query("UPDATE holiday_message SET status = 5, completed = now() WHERE id = %lu ", rec["id"].Long()); // move the status so no retry
|
||||
}
|
||||
}
|
||||
ret = PHP_API_OK;
|
||||
out["status"] = "OK";
|
||||
} catch (bad_parameter) {
|
||||
logfmt(logINFO, "ERROR CALL long ScheduleHolidayJobs(CVars in, CVars &out)");
|
||||
}
|
||||
logfmt(logINFO, "/ScheduleHolidayJobs()");
|
||||
return ret;
|
||||
}
|
||||
|
||||
long ProcessExpiredOffers(CVars in, CVars &out){
|
||||
char vname[30];
|
||||
CVars inR;
|
||||
|
||||
@@ -54,7 +54,7 @@ $routes->get('/en/flow/api/v1/scheduletransfer', 'AirFlow::flowScheduleTrans
|
||||
$routes->get('/en/flow/api/v1/testnotifications', 'AirFlow::flowTestNotifications');
|
||||
$routes->get('/en/flow/api/v1/automarket01', 'AirFlow::flowAutoMarket01');
|
||||
$routes->get('/en/flow/api/v1/offersmissed', 'AirFlow::flowOfferMissed');
|
||||
|
||||
$routes->get('/en/flow/api/v1/holidaybroadcast', 'AirFlow::flowHolidayBroadCast');
|
||||
|
||||
|
||||
include "RoutesV1.php";
|
||||
|
||||
@@ -15,6 +15,7 @@ define('WRB_CRONJOB_SCHEULETRANSFER', 780);
|
||||
define('WRB_CRONJOB_PROCESSTRANSFER', 781);
|
||||
|
||||
define('WRB_CRONJOB_AUTO_OFFEREXPIRE', 785);
|
||||
define('WRB_CRONJOB_HOLIDAY_BROADCAST', 786);
|
||||
|
||||
define('WRB_CRONJOB_PENDINGSM', 790) ;
|
||||
|
||||
@@ -30,6 +31,16 @@ class AirFlow extends BaseController
|
||||
return []; //json_encode( $final_out );
|
||||
}
|
||||
|
||||
public function flowHolidayBroadCast(){
|
||||
$raw_json = file_get_contents('php://input');
|
||||
$in = json_decode($raw_json, true);
|
||||
$in["action"] = WRB_JOB_CRONJOB; //WRB_CRONJOB_AUTO_OFFEREXPIRE
|
||||
$in["call_action"] = WRB_CRONJOB_HOLIDAY_BROADCAST;
|
||||
$out =[];
|
||||
log_message('critical', "AirFlow::flowOfferMissed ********* ALL ".serialize($in) );
|
||||
$ret['WRB_CRONJOB_HOLIDAY_BROADCAST'] = (new \App\Models\BackendModel())->wrenchboard_api($in, $out);
|
||||
return []; //json_encode( $final_out );
|
||||
}
|
||||
public function flowOfferPending(){
|
||||
|
||||
$raw_json = file_get_contents('php://input');
|
||||
|
||||
Reference in New Issue
Block a user