This commit is contained in:
CHIEFSOFT\ameye
2024-09-23 05:12:50 -04:00
parent 659109624c
commit 841cab75eb
7 changed files with 211 additions and 177 deletions
+164 -169
View File
@@ -4,8 +4,8 @@ Subject: {{subject}}
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{{subject}}</title> <title> {{subject}} </title>
<style type="text/css"> <style type="text/css">
body {margin: 0; padding: 0; min-width: 100%!important;} body {margin: 0; padding: 0; min-width: 100%!important;}
img {height: auto;} img {height: auto;}
@@ -16,198 +16,193 @@ img {height: auto;}
.subhead {font-size: 12px; color: #ffffff; font-family: sans-serif; letter-spacing: 3px;} .subhead {font-size: 12px; color: #ffffff; font-family: sans-serif; letter-spacing: 3px;}
.h1, .h2, .bodycopy {color: #153643; font-family: sans-serif;} .h1, .h2, .bodycopy {color: #153643; font-family: sans-serif;}
.h1 {font-size: 33px; line-height: 38px; font-weight: bold;} .h1 {font-size: 33px; line-height: 38px; font-weight: bold;}
.sect-text {font-weight:bold; text-align: right;}
.bodycopy {font-size: 14px; line-height: 20px;} .bodycopy {font-size: 14px; line-height: 20px;}
.button {text-align: center; font-size: 16px; font-family: sans-serif; font-weight: bold; padding: 0 30px 0 30px;} .button {text-align: center; font-size: 16px; font-family: sans-serif; padding: 0 30px 0 30px;}
.button a {color: #ffffff; text-decoration: none;} .button a {color: #ffffff; text-decoration: none;}
.footer {padding: 20px 30px 15px 30px; bgcolor:#007bff; background-color:#007bff;} .footer {padding: 20px 30px 15px 30px; bgcolor:#007bff; background-color:#007bff;}
.footercopy {font-family: sans-serif; font-size: 14px; color: #ffffff;} .footercopy {font-family: sans-serif; font-size: 14px; color: #ffffff;}
.footercopy a {color: #ffffff; text-decoration: underline;} .footercopy a {color: #ffffff; text-decoration: underline;}
.expire{ color: red; font-weight: bold; padding: 10px 0px 20 0px;}
</style> </style>
</head> </head>
<body bgcolor="#f6f8f1">
<body yahoo bgcolor="#f6f8f1">
<table width="100%" bgcolor="#f6f8f1" border="0" cellpadding="0" cellspacing="0"> <table width="100%" bgcolor="#f6f8f1" border="0" cellpadding="0" cellspacing="0">
<tr> <tr>
<td> <td>
<!--[if (gte mso 9)|(IE)]> <!--[if (gte mso 9)|(IE)]>
<table width="600" align="center" cellpadding="0" cellspacing="0" border="0"> <table width="600" align="center" cellpadding="0" cellspacing="0" border="0">
<tr> <tr>
<td> <td>
<![endif]--> <![endif]-->
<table bgcolor="#ffffff" class="content" align="center" cellpadding="0" cellspacing="0" border="0"> <table bgcolor="#ffffff" class="content" align="center" cellpadding="0" cellspacing="0" border="0">
<tr> <tr>
<td bgcolor="#c7d8a7" class="header"> <td bgcolor="#ffffff" class="header">
<table width="70" align="left" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="70" style="padding: 0 20px 20px 0;">
<img class="fix" src="{{server_name}}/assets/images/wrenchboard-icon.gif" width="70" height="70" border="0" alt="WrenchBoard" />
</td>
</tr>
</table>
<!--[if (gte mso 9)|(IE)]>
<table width="425" align="left" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<![endif]-->
<table class="col425" align="left" border="0" cellpadding="0" cellspacing="0" style="width: 100%; max-width: 425px;">
<tr>
<td height="50">
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> <tr>
<td class="h1" style="padding: 5px 0 0 0;"> <td style="padding: 1px 0 1px 0; text-align:center;">
{{site_name}} <a href="https://www.wrenchboard.com/"><img src="https://www.wrenchboard.com/assets/ext/images/wrenchboard.png" alt="WrenchBoard"></a> <!-- {{site_name}} -->
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="subhead" style="padding: 0 0 0 3px;"> <td class="subhead" style="padding: 0 0 0 3px; color:black; text-align:center;">
{{site_trade_name}} {{site_trade_name}}
</td> </td>
</tr> </tr>
</table> </table>
</td> </td>
</tr> </tr>
</table> <tr>
<!--[if (gte mso 9)|(IE)]> <td class="innerpadding borderbottom">
</td> <table width="100%" border="0" cellspacing="0" cellpadding="0">
</tr> <tr>
</table> <td class="h2">
<![endif]--> Message from {{firstname}},
</td> </td>
</tr> </tr>
<tr> </table>
<td class="innerpadding borderbottom"> </td>
<table width="100%" border="0" cellspacing="0" cellpadding="0"> </tr>
<tr> <tr>
<td class="h3"> <td class="innerpadding borderbottom">
<b>Message from {{firstname}}</b>,
</td> <table class="col380" align="left" border="0" cellpadding="0" cellspacing="0" style="width: 100%; max-width: 550px;">
</tr> <tr>
<tr> <td>
<td class="bodycopy"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
The task at <a href="{{server_name}}/">{{site_name}}</a> shown below is fast approaching deadline. <tr>
</td> <td class="bodycopy">
</tr> The task at <a href="{{server_name}}/">{{site_name}}</a> shown below is fast approaching deadline.
</table> <br>
</td> <span class="expire">Due Date : {{due_date}}.</span>
</tr> <br>
<tr> </td>
<td class="innerpadding borderbottom"> </tr>
<table width="115" align="left" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="115" style="padding: 0 20px 20px 0;">
<img class="fix" src="{{server_name}}/assets/images/article1.png" width="115" height="115" border="0" alt="" />
</td>
</tr>
</table>
<!--[if (gte mso 9)|(IE)]>
<table width="380" align="left" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<![endif]-->
<table class="col380" align="left" border="0" cellpadding="0" cellspacing="0" style="width: 100%; max-width: 380px;">
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="0" class="bodycopy" style="font-size: 14px; font-family: sans-serif; border: 1px solid #f2eeed; background-color:#e6f9ff;">
<tr>
<td style="width:100px;">
<b>Title: </b>
{{title}}
</td>
</tr>
<tr> <tr>
<td> <td>
<b>Job ID: </b>
{{contract}} <div style="background-color:aliceblue; border-radius: 10px; padding: 10px;">
</td> <table width="100%" border="0" cellspacing="1" cellpadding="2" class="bodycopy" style="font-size: 14px; font-family: sans-serif; border: 1px solid #f2eeed;">
<tr>
<td width="100px" class="sect-text">
Title :
</td>
<td class="bodycopy">
{{title}}
</td>
</tr>
<tr>
<td class="sect-text">
Offer ID :
</td>
<td class="bodycopy">
<a href ="{{server_name}}/eoffer?offerID={{offer_code}}">{{offer_code}}</a>
</td>
</tr>
<tr>
<tr>
<td class="sect-text">
Duration :
</td>
<td class="bodycopy">
{{timeline_days}} day(s)
</td>
</tr>
<tr>
<td class="sect-text">
Reward :
</td>
<td class="bodycopy">
{{price}} {{currency}}
</td>
</tr>
<tr>
<td class="sect-text">
Detail :
</td>
<td class="bodycopy">
{{job_description}}
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--[if (gte mso 9)|(IE)]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
</tr> </tr>
<tr> <tr>
<td> <td>
This task will be due very soon. After the due date, the task will be past due, and only the owner can extend it is for a short time before the task is closed permanently. This task will be due very soon. After the due date, the task will be past due, and only the owner can extend it is for a short time before the task is closed permanently.
</td> </td>
</tr> </tr>
<tr>
<td>
<b>Delivery Date: </b>
{{delivery_date}} <tr>
</td> <td class="innerpadding bodycopy">
</tr> If you have any further support question, Please contact us at {{server_name}}/contact<br>
<hr size="1">
</td>
</table> </tr>
</td> <tr>
</tr> <td class="innerpadding bodycopy">
<tr>
<td><h4>Please <a href ="{{server_name}}/eoffer?offerID={{offer_code}}">login</a> into your account to manage this task.</h4>
</td>
</tr>
</table>
<!--[if (gte mso 9)|(IE)]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
<tr>
<td class="innerpadding borderbottom">
<img class="fix" src="{{server_name}}/assets/images/wrenchboard_email_banner.jpg" width="100%" border="0" alt="" />
</td>
</tr>
<tr>
<td class="innerpadding bodycopy">
Please contact us at https://www.wrenchboard.com/contact if you have any question about this email.
</td>
</tr>
<tr>
<td class="innerpadding bodycopy">
{{site_name}} Team {{site_name}} Team
<br> <br>
{{server_name}} {{server_name}}
</td> </td>
</tr> </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">
&reg; {{site_name}} {{YYYY}}<br/>
You received this email because you subscribe to {{site_name}}. If you get this email in error, please <a href="https://{{server_name}}/contactus" class="unsubscribe"><font color="#ffffff">contact</font></a> us.
<tr> </td>
<td class="footer"> </tr>
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr>
<tr> <td align="center" style="padding: 20px 0 0 0;">
<td align="center" class="footercopy"> <table border="0" cellspacing="0" cellpadding="0">
&reg; {{site_name}} {{YYYY}}<br/> <tr>
You received this email because you subscribe to {{site_name}}. If you get this email in error, please <a href="{{main_site_url}}contact" class="unsubscribe"><font color="#ffffff">contact</font></a> us. <td width="37" style="text-align: center; padding: 0 10px 0 10px;">
</td> <a href="https://www.facebook.com/wrenchboard/">
</tr> <img src="{{server_name}}/assets/images/brands/facebook.png" width="37" height="37" alt="Facebook" border="0" />
<tr> </a>
<td align="center" style="padding: 20px 0 0 0;"> </td>
<table border="0" cellspacing="0" cellpadding="0"> <td width="37" style="text-align: center; padding: 0 10px 0 10px;">
<tr> <a href="http://www.twitter.com/">
<td width="37" style="text-align: center; padding: 0 10px 0 10px;"> <img src="{{server_name}}/assets/images/brands/twitter.png" width="37" height="37" alt="Twitter" border="0" />
<a href="https://www.facebook.com/wrenchboard/"> </a>
<img src="{{server_name}}/assets/images/brands/facebook.png" width="37" height="37" alt="Facebook" border="0" /> </td>
</a> </tr>
</td> </table>
<td width="37" style="text-align: center; padding: 0 10px 0 10px;"> </td>
<a href="http://www.twitter.com/"> </tr>
<img src="{{server_name}}/assets/images/brands/twitter.png" width="37" height="37" alt="Twitter" border="0" /> </table>
</a> </td>
</td> </tr>
</tr> </table>
<!--[if (gte mso 9)|(IE)]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
</table> </table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--[if (gte mso 9)|(IE)]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
</table>
</body> </body>
</html> </html>
@@ -166,6 +166,8 @@ enum { PARTNER_STRIPE };
#define WRB_CRONJOB_SCHEULETRANSFER 780 #define WRB_CRONJOB_SCHEULETRANSFER 780
#define WRB_CRONJOB_PROCESSTRANSFER 781 #define WRB_CRONJOB_PROCESSTRANSFER 781
#define WRB_CRONJOB_AUTO_OFFEREXPIRE 785
#define WRB_CRONJOB_PENDINGSM 790 #define WRB_CRONJOB_PENDINGSM 790
//************************************************************** //**************************************************************
+8 -2
View File
@@ -704,12 +704,18 @@ long job_email(long mailtype, CVars in, CVars &out) {
case JOBS_DUE_APPROACH_MAIL: case JOBS_DUE_APPROACH_MAIL:
if (load_db_record(x, "SELECT m.firstname,m.email,mj.title,c.* FROM members_jobs_contract c LEFT JOIN members m ON m.id=c.client_id LEFT JOIN members_jobs mj ON mj.id = c.job_id WHERE c.id=%lu AND c.due_remind IS NULL", in["contract_id"].Long())) { if (load_db_record(x, " SELECT m.firstname,m.email,mj.title,c.* ,cc.description AS currency ,mj.description AS job_description , "
" to_char(c.delivery_date, 'Day Mon dd, yyyy HH:MI AM') AS due_date"
" FROM members_jobs_contract c "
" LEFT JOIN members m ON m.id=c.client_id "
" LEFT JOIN members_jobs mj ON mj.id = c.job_id "
" LEFT JOIN currency cc ON cc.country = mj.country "
" WHERE c.id=%lu AND c.due_remind IS NULL", in["contract_id"].Long())) {
// FOR CRON JOBS SET SERVER NAME // FOR CRON JOBS SET SERVER NAME
form.LetStr("server_name", out["server_name"].c_str()); form.LetStr("server_name", out["server_name"].c_str());
vars2form(x, form); vars2form(x, form);
vars2form(yr, form); vars2form(yr, form);
form.LetStr("subject", "Task Due Date Approaching"); form.LetStr("subject", "Due Date Approaching");
form.LetStr("email", x["email"].c_str()); form.LetStr("email", x["email"].c_str());
//form.LetStr( "email", "ameye@chiefsoft.com" ); //form.LetStr( "email", "ameye@chiefsoft.com" );
form.Email("JOB/job_duereminder.mailfile"); form.Email("JOB/job_duereminder.mailfile");
+2 -2
View File
@@ -114,9 +114,9 @@ long WrenchHomeBanners(CVars in, CVars &out) {
} }
if( RecoCheckBlog( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; }
if( RecoReferAFreind( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; } if( RecoReferAFreind( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; }
if( RecoCheckBlog( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; }
out["home_dash_type"]="DEFAULT_HOME_DASH"; out["home_dash_type"]="DEFAULT_HOME_DASH";
+18
View File
@@ -31,6 +31,8 @@ long ProcessGroupJobs(CVars in, CVars &out);
long ProcessTransferJobs(CVars in, CVars &out); long ProcessTransferJobs(CVars in, CVars &out);
long ScheduleTransferJobs(CVars in, CVars &out); long ScheduleTransferJobs(CVars in, CVars &out);
long TestNotificationsJobs(CVars in, CVars &out); long TestNotificationsJobs(CVars in, CVars &out);
long ProcessExpiredOffers(CVars in, CVars &out);
/* /*
CREATE TABLE cron_jobs ( CREATE TABLE cron_jobs (
id SERIAL, id SERIAL,
@@ -139,12 +141,28 @@ long sitecrons_calls(CVars in, CVars &out) {
return ProcessTransferJobs(in, out); return ProcessTransferJobs(in, out);
break; break;
case WRB_CRONJOB_AUTO_OFFEREXPIRE:
ct["job_type"]="WRB_CRONJOB_AUTO_OFFEREXPIRE"; ct["job_type"].set_valid( true );
ct["description"]="Process Transfer Expired Offers"; ct["description"].set_valid( true );
CronTracker(ct, co);
return ProcessExpiredOffers(in, out);
break;
} }
logfmt(logINFO, "/sitecrons_calls()"); logfmt(logINFO, "/sitecrons_calls()");
return ret; return ret;
} }
long ProcessExpiredOffers(CVars in, CVars &out){
// if ( load_db_record(out, "SELECT count(uid) AS pending_count FROM money_transfer WHERE status =1 AND completed IS NULL ")> 0){
// if ( out["pending_count"].Long() > 0 ){
// alert_email(WRB_CRONJOB_PENDINGSM,out, out);
// }
// }
return 0;
}
long ProcessTransferJobs(CVars in, CVars &out){ long ProcessTransferJobs(CVars in, CVars &out){
// if ( load_db_record(out, "SELECT count(uid) AS pending_count FROM money_transfer WHERE status =1 AND completed IS NULL ")> 0){ // if ( load_db_record(out, "SELECT count(uid) AS pending_count FROM money_transfer WHERE status =1 AND completed IS NULL ")> 0){
+2
View File
@@ -53,6 +53,8 @@ $routes->get('/en/flow/api/v1/processtransfer', 'AirFlow::flowProcessTransf
$routes->get('/en/flow/api/v1/scheduletransfer', 'AirFlow::flowScheduleTransfer'); $routes->get('/en/flow/api/v1/scheduletransfer', 'AirFlow::flowScheduleTransfer');
$routes->get('/en/flow/api/v1/testnotifications', 'AirFlow::flowTestNotifications'); $routes->get('/en/flow/api/v1/testnotifications', 'AirFlow::flowTestNotifications');
$routes->get('/en/flow/api/v1/automarket01', 'AirFlow::flowAutoMarket01'); $routes->get('/en/flow/api/v1/automarket01', 'AirFlow::flowAutoMarket01');
$routes->get('/en/flow/api/v1/offersmissed', 'AirFlow::flowOfferMissed');
include "RoutesV1.php"; include "RoutesV1.php";
+12 -1
View File
@@ -14,6 +14,8 @@ define('WRB_CRONJOB_TESTNOTIFICATIONS', 779);
define('WRB_CRONJOB_SCHEULETRANSFER', 780); define('WRB_CRONJOB_SCHEULETRANSFER', 780);
define('WRB_CRONJOB_PROCESSTRANSFER', 781); define('WRB_CRONJOB_PROCESSTRANSFER', 781);
define('WRB_CRONJOB_AUTO_OFFEREXPIRE', 785);
define('WRB_CRONJOB_PENDINGSM', 790) ; define('WRB_CRONJOB_PENDINGSM', 790) ;
class AirFlow extends BaseController class AirFlow extends BaseController
@@ -49,7 +51,16 @@ class AirFlow extends BaseController
// return []; //json_encode( $final_out ); // return []; //json_encode( $final_out );
} }
// public function flowOfferMissed(){
$raw_json = file_get_contents('php://input');
$in = json_decode($raw_json, true);
$in["action"] = WRB_CRONJOB_AUTO_OFFEREXPIRE;
$out =[];
log_message('critical', "AirFlow::flowOfferMissed ********* ALL ".serialize($in) );
$ret['WRB_CRONJOB_AUTO_OFFEREXPIRE'] = (new \App\Models\BackendModel())->wrenchboard_api($in, $out);
return []; //json_encode( $final_out );
}
public function flowInterestcount(){ public function flowInterestcount(){
$raw_json = file_get_contents('php://input'); $raw_json = file_get_contents('php://input');
$in = json_decode($raw_json, true); $in = json_decode($raw_json, true);