send money alert

This commit is contained in:
CHIEFSOFT\ameye
2024-02-03 16:38:36 -05:00
parent d0fc64017a
commit aa22c92ab0
3 changed files with 150 additions and 2 deletions
@@ -0,0 +1,132 @@
Subject: System Alert- Pending Send Money {{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>WrenchBoard Report {{site_name}}</title>
<style type="text/css">
body {margin: 0; padding: 0; min-width: 100%!important;}
img {height: auto;}
.content {width: 100%; max-width: 600px;}
.header {padding: 10px 10px 10px 10px;}
.innerpadding {padding: 10px 10px 10px 10px;}
.borderbottom {border-bottom: 1px solid #f2eeed;}
.subhead {font-size: 12px; color: #ffffff; font-family: sans-serif; letter-spacing: 3px;}
.h1, .h2, .bodycopy {color: darkgreen; font-family: sans-serif;}
.h1 {font-size: 33px; line-height: 38px; font-weight: bold;}
.bodycopy {font-size: 14px; line-height: 20px; text-align:center; font-weight:bolder;}
.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 bgcolor="#f6f8f1">
<table width="100%" bgcolor="#f6f8f1" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<!--[if (gte mso 9)|(IE)]>
<table width="600" align="center" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<![endif]-->
<table bgcolor="#ffffff" class="content" align="center" cellpadding="0" cellspacing="0" border="0">
<tr>
<td bgcolor="red" class="header">
<!--[if (gte mso 9)|(IE)]>
<table width="100%" align="left" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<![endif]-->
<table align="left" border="0" cellpadding="0" cellspacing="0" style="width: 100%;">
<tr>
<td height="50">
<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="padding: 0 0 0 3px; text-align:center;">
{{site_trade_name}}
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="innerpadding borderbottom">
<table align="left" border="0" cellpadding="0" cellspacing="0" style="width: 100%; max-width: 600px;">
<tr>
<td colspan="2"><h2>{{report_date}}</h2></td>
</tr>
<tr>
<td class="left" style="width:250px; height:10px;">Pending Transfer</td>
<td class="bodycopy">{{pending_count}}</td>
</tr>
<tr class="trColor">
<td class="left" style="width:250px; height:30px;">Pending Transfer Today </td>
<td class="bodycopy"> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="innerpadding bodycopy">
{{site_name}} Support Team
<br>
{{server_name}}
</td>
</tr>
<tr><td>
<tr>
<td class="footer">
<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="{{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>
+5
View File
@@ -89,6 +89,11 @@ long alert_email(long mailtype, CVars in, CVars &out) {
form.Email("ALERT/alert_daily_stats.mailfile");
break;
case WRB_CRONJOB_PENDINGSM:
vars2form(in, form);
form.LetStr("email", out["signupreport"]);
form.Email("ALERT/alert_smpening.mailfile");
break;
}
return 0;
+13 -2
View File
@@ -26,6 +26,8 @@ long PastDueOffersRefund(CVars in, CVars &out);
long NotificationSystem(CVars in, CVars &out);
long CronTracker(CVars in, CVars &out);
long SendMoneyPending(CVars in, CVars &out);
long ProcessGroupJobs(CVars in, CVars &out);
/*
CREATE TABLE cron_jobs (
id SERIAL,
@@ -110,7 +112,7 @@ long sitecrons_calls(CVars in, CVars &out) {
ct["job_type"]="WRB_CRONJOB_GROUPJOBS"; ct["job_type"].set_valid( true );
ct["description"]="Job Group Processing"; ct["description"].set_valid( true );
CronTracker(ct, co);
return 0; //NotificationSystem(in, out);
return ProcessGroupJobs(in, out);
break;
}
@@ -120,10 +122,19 @@ long sitecrons_calls(CVars in, CVars &out) {
}
long SendMoneyPending(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 ProcessGroupJobs(CVars in, CVars &out){
return 0;
}
long NotificationSystem(CVars in, CVars &out){
long ret = 0;
//const PGresult *res;