Compare commits
3 Commits
cd8afaf1b1
...
a4ba2da5ed
| Author | SHA1 | Date | |
|---|---|---|---|
| a4ba2da5ed | |||
| de6288fc3a | |||
| 5e5f643d9f |
@@ -0,0 +1,180 @@
|
||||
Subject: {{site_name}} - Coupon Allocated
|
||||
|
||||
<!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}} - Coupon Allocated</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: #153643; font-family: sans-serif;}
|
||||
.h1 {font-size: 33px; line-height: 38px; font-weight: bold;}
|
||||
.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 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="#c7d8a7" 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%; 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://dashboard.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>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<![endif]-->
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="innerpadding borderbottom">
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
<table width="100%" 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%;">
|
||||
<tr>
|
||||
<td class="bodycopy">
|
||||
Hello {{firstname}},
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td class="bodycopy">
|
||||
Please be informed that you logged on to {{site_name}} account at <b>{{last_login2}}</b>.
|
||||
If you did not log on to your account at the time detailed above, please contact us immediately.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<![endif]-->
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="innerpadding bodycopy">
|
||||
For all support, contact us at <a href="{{server_name}}/contact">https://{{server_name}}/contact</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="innerpadding bodycopy">
|
||||
{{site_name}} Team
|
||||
<br>
|
||||
{{server_name}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td class="bodycopy">
|
||||
<br>
|
||||
Recently added task(s)
|
||||
<table border="0" width='100%;' id="table1" style="font-family: Trebuchet MS; font-size: 10pt ">
|
||||
{{\inv_items}}
|
||||
{{...}}
|
||||
{{pin}}
|
||||
{{/...}}
|
||||
{{/inv_items}}
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</td></tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="footer">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td align="center" class="footercopy">
|
||||
® {{site_name}} 2022<br/>
|
||||
You received this email because you subscribe to {{site_name}}. If you get this email in error, please <a href="https://{{server_name}}/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="https://{{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="https://twitter.com/wrenchboard">
|
||||
<img src="https://{{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>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<![endif]-->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -12,7 +12,7 @@ ZEND_EXT_TYPE = zend_extension
|
||||
RE2C = exit 0;
|
||||
AWK = gawk
|
||||
WRENCHBOARD_API_OAMEYE_SHARED_LIBADD = -Wl,-rpath,/usr/lib64 -L/usr/lib64 -lpq -lstdc++ -lcurl -lconfig++ -ljson-c -lssl -lz -lpcrecpp -lgcc_s
|
||||
shared_objects_wrenchboard_api_oameye = core/XmlElements.lo core/XmlParser.lo core/cfg.lo core/cgi.lo core/clog.lo core/cvariables.lo core/exceptions.lo core/hmac_sha2.lo core/input.lo core/list.lo core/pgsql.lo core/pgsql_wrapper.lo core/safestring.lo core/sha2.lo core/sha512.lo core/smtp.lo core/timer.lo core/util.lo core/vars.lo core/wrenchboard.lo core/wrenchboard_api.lo shared_tool/account.lo shared_tool/account_mngt.lo shared_tool/bko.lo shared_tool/common_tool.lo shared_tool/contract.lo shared_tool/creditcards.lo shared_tool/email.lo shared_tool/groups.lo shared_tool/jobs.lo shared_tool/login.lo shared_tool/mobile.lo shared_tool/namespaces.lo shared_tool/payments.lo shared_tool/site_crons.lo shared_tool/smoney.lo shared_tool/stripe.lo shared_tool/stripe_charge.lo shared_tool/topups.lo shared_tool/twilo.lo shared_tool/wrenchboard_api_main.lo
|
||||
shared_objects_wrenchboard_api_oameye = core/XmlElements.lo core/XmlParser.lo core/cfg.lo core/cgi.lo core/clog.lo core/cvariables.lo core/exceptions.lo core/hmac_sha2.lo core/input.lo core/list.lo core/pgsql.lo core/pgsql_wrapper.lo core/safestring.lo core/sha2.lo core/sha512.lo core/smtp.lo core/timer.lo core/util.lo core/vars.lo core/wrenchboard.lo core/wrenchboard_api.lo shared_tool/account.lo shared_tool/account_mngt.lo shared_tool/bko.lo shared_tool/common_tool.lo shared_tool/contract.lo shared_tool/coupons.lo shared_tool/creditcards.lo shared_tool/email.lo shared_tool/groups.lo shared_tool/jobs.lo shared_tool/login.lo shared_tool/mobile.lo shared_tool/namespaces.lo shared_tool/payments.lo shared_tool/site_crons.lo shared_tool/smoney.lo shared_tool/stripe.lo shared_tool/stripe_charge.lo shared_tool/topups.lo shared_tool/twilo.lo shared_tool/wrenchboard_api_main.lo
|
||||
PHP_PECL_EXTENSION = wrenchboard_api_oameye
|
||||
PHP_MODULES = $(phplibdir)/wrenchboard_api_oameye.la
|
||||
PHP_ZEND_EX =
|
||||
@@ -242,6 +242,8 @@ shared_tool/common_tool.lo: /home/oameye/wrenchboard/wrenchboard/src/shared_tool
|
||||
$(LIBTOOL) --mode=compile $(CXX) -I/home/oameye/wrenchboard/wrenchboard/src/libconfig-1.0.1 -I. -I/home/oameye/wrenchboard/wrenchboard/src $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c /home/oameye/wrenchboard/wrenchboard/src/shared_tool/common_tool.cc -o shared_tool/common_tool.lo
|
||||
shared_tool/contract.lo: /home/oameye/wrenchboard/wrenchboard/src/shared_tool/contract.cc
|
||||
$(LIBTOOL) --mode=compile $(CXX) -I/home/oameye/wrenchboard/wrenchboard/src/libconfig-1.0.1 -I. -I/home/oameye/wrenchboard/wrenchboard/src $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c /home/oameye/wrenchboard/wrenchboard/src/shared_tool/contract.cc -o shared_tool/contract.lo
|
||||
shared_tool/coupons.lo: /home/oameye/wrenchboard/wrenchboard/src/shared_tool/coupons.cc
|
||||
$(LIBTOOL) --mode=compile $(CXX) -I/home/oameye/wrenchboard/wrenchboard/src/libconfig-1.0.1 -I. -I/home/oameye/wrenchboard/wrenchboard/src $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c /home/oameye/wrenchboard/wrenchboard/src/shared_tool/coupons.cc -o shared_tool/coupons.lo
|
||||
shared_tool/creditcards.lo: /home/oameye/wrenchboard/wrenchboard/src/shared_tool/creditcards.cc
|
||||
$(LIBTOOL) --mode=compile $(CXX) -I/home/oameye/wrenchboard/wrenchboard/src/libconfig-1.0.1 -I. -I/home/oameye/wrenchboard/wrenchboard/src $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c /home/oameye/wrenchboard/wrenchboard/src/shared_tool/creditcards.cc -o shared_tool/creditcards.lo
|
||||
shared_tool/email.lo: /home/oameye/wrenchboard/wrenchboard/src/shared_tool/email.cc
|
||||
|
||||
@@ -50,6 +50,8 @@ shared_tool/common_tool.lo: /home/oameye/wrenchboard/wrenchboard/src/shared_tool
|
||||
$(LIBTOOL) --mode=compile $(CXX) -I/home/oameye/wrenchboard/wrenchboard/src/libconfig-1.0.1 -I. -I/home/oameye/wrenchboard/wrenchboard/src $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c /home/oameye/wrenchboard/wrenchboard/src/shared_tool/common_tool.cc -o shared_tool/common_tool.lo
|
||||
shared_tool/contract.lo: /home/oameye/wrenchboard/wrenchboard/src/shared_tool/contract.cc
|
||||
$(LIBTOOL) --mode=compile $(CXX) -I/home/oameye/wrenchboard/wrenchboard/src/libconfig-1.0.1 -I. -I/home/oameye/wrenchboard/wrenchboard/src $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c /home/oameye/wrenchboard/wrenchboard/src/shared_tool/contract.cc -o shared_tool/contract.lo
|
||||
shared_tool/coupons.lo: /home/oameye/wrenchboard/wrenchboard/src/shared_tool/coupons.cc
|
||||
$(LIBTOOL) --mode=compile $(CXX) -I/home/oameye/wrenchboard/wrenchboard/src/libconfig-1.0.1 -I. -I/home/oameye/wrenchboard/wrenchboard/src $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c /home/oameye/wrenchboard/wrenchboard/src/shared_tool/coupons.cc -o shared_tool/coupons.lo
|
||||
shared_tool/creditcards.lo: /home/oameye/wrenchboard/wrenchboard/src/shared_tool/creditcards.cc
|
||||
$(LIBTOOL) --mode=compile $(CXX) -I/home/oameye/wrenchboard/wrenchboard/src/libconfig-1.0.1 -I. -I/home/oameye/wrenchboard/wrenchboard/src $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c /home/oameye/wrenchboard/wrenchboard/src/shared_tool/creditcards.cc -o shared_tool/creditcards.lo
|
||||
shared_tool/email.lo: /home/oameye/wrenchboard/wrenchboard/src/shared_tool/email.cc
|
||||
|
||||
@@ -12,9 +12,9 @@ generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
hostname = WrenchBoardDev
|
||||
uname -m = x86_64
|
||||
uname -r = 4.18.0-193.14.2.el8_2.x86_64
|
||||
uname -r = 4.18.0-358.el8.x86_64
|
||||
uname -s = Linux
|
||||
uname -v = #1 SMP Sun Jul 26 03:54:29 UTC 2020
|
||||
uname -v = #1 SMP Mon Jan 10 13:11:20 UTC 2022
|
||||
|
||||
/usr/bin/uname -p = x86_64
|
||||
/bin/uname -X = unknown
|
||||
@@ -50,7 +50,7 @@ configure:2566: found /usr/bin/cc
|
||||
configure:2577: result: cc
|
||||
configure:2608: checking for C compiler version
|
||||
configure:2617: cc --version >&5
|
||||
cc (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5)
|
||||
cc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-10)
|
||||
Copyright (C) 2018 Free Software Foundation, Inc.
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
@@ -65,7 +65,7 @@ OFFLOAD_TARGET_DEFAULT=1
|
||||
Target: x86_64-redhat-linux
|
||||
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --disable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
|
||||
Thread model: posix
|
||||
gcc version 8.3.1 20191121 (Red Hat 8.3.1-5) (GCC)
|
||||
gcc version 8.5.0 20210514 (Red Hat 8.5.0-10) (GCC)
|
||||
configure:2628: $? = 0
|
||||
configure:2617: cc -V >&5
|
||||
cc: error: unrecognized command line option '-V'
|
||||
@@ -216,7 +216,7 @@ configure:4113: found /usr/bin/g++
|
||||
configure:4124: result: g++
|
||||
configure:4151: checking for C++ compiler version
|
||||
configure:4160: g++ --version >&5
|
||||
g++ (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5)
|
||||
g++ (GCC) 8.5.0 20210514 (Red Hat 8.5.0-10)
|
||||
Copyright (C) 2018 Free Software Foundation, Inc.
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
@@ -231,7 +231,7 @@ OFFLOAD_TARGET_DEFAULT=1
|
||||
Target: x86_64-redhat-linux
|
||||
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --disable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
|
||||
Thread model: posix
|
||||
gcc version 8.3.1 20191121 (Red Hat 8.3.1-5) (GCC)
|
||||
gcc version 8.5.0 20210514 (Red Hat 8.5.0-10) (GCC)
|
||||
configure:4171: $? = 0
|
||||
configure:4160: g++ -V >&5
|
||||
g++: error: unrecognized command line option '-V'
|
||||
@@ -537,6 +537,7 @@ generated by GNU Autoconf 2.69. Invocation command line was
|
||||
on WrenchBoardDev
|
||||
|
||||
config.status:944: creating config.h
|
||||
config.status:1034: config.h is unchanged
|
||||
config.status:1048: executing libtool commands
|
||||
|
||||
## ---------------- ##
|
||||
|
||||
@@ -662,7 +662,7 @@ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
|
||||
finish_eval=''
|
||||
hardcode_into_libs='yes'
|
||||
sys_lib_search_path_spec='/usr/lib/gcc/x86_64-redhat-linux/8 /usr/lib64 /lib64 /usr/lib /lib '
|
||||
configure_time_dlsearch_path='/lib64 /usr/lib64 /lib /usr/lib /usr/lib64//bind9-export/ /usr/lib64/dyninst '
|
||||
configure_time_dlsearch_path='/lib64 /usr/lib64 /lib /usr/lib /usr/lib64//bind9-export/ /usr/lib64/dyninst '
|
||||
configure_time_lt_sys_library_path=''
|
||||
hardcode_action='immediate'
|
||||
enable_dlopen='unknown'
|
||||
|
||||
@@ -38,6 +38,7 @@ long sendmoney_email(long mailtype, CVars in, CVars &out);
|
||||
long alert_email(long mailtype, CVars in, CVars &out) ;
|
||||
long SendmarketMessage(CVars in, CVars &out);
|
||||
long cron_email(long mailtype, CVars in, CVars &out);
|
||||
long coupon_email(long mailtype, CVars in, CVars &out);
|
||||
|
||||
long SignupPendingAlertMailfile(CVars in);
|
||||
long SignupCompletedAlertMailfile(CVars in);
|
||||
|
||||
@@ -249,6 +249,17 @@ enum { PARTNER_STRIPE };
|
||||
#define WRENCHBOARD_ADD_SURVEY 55050
|
||||
#define WRENCHBOARD_LOAD_SURVEY 55055
|
||||
|
||||
//**************************************************************
|
||||
#define WRENCHBOARD_COUPON_START 85000
|
||||
|
||||
#define WRENCHBOARD_COUPON_CREATE 85010
|
||||
#define WRENCHBOARD_COUPON_ACTIVATE 85015
|
||||
#define WRENCHBOARD_COUPON_REDEEM 85020
|
||||
|
||||
#define WRENCHBOARD_COUPON_END 85999
|
||||
//**************************************************************
|
||||
|
||||
|
||||
#define WRENCHBOARD_STRIPE_CHARGE_ONE 90004
|
||||
#define WRENCHBOARD_STRIPE_CHARGE_NEW 90005
|
||||
|
||||
|
||||
@@ -285,7 +285,7 @@ hardcode_into_libs=yes
|
||||
sys_lib_search_path_spec="/usr/lib/gcc/x86_64-redhat-linux/8 /usr/lib64 /lib64 /usr/lib /lib "
|
||||
|
||||
# Detected run-time system search path for libraries.
|
||||
sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib /usr/lib64//bind9-export/ /usr/lib64/dyninst "
|
||||
sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib /usr/lib64//bind9-export/ /usr/lib64/dyninst "
|
||||
|
||||
# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
|
||||
configure_time_lt_sys_library_path=""
|
||||
|
||||
@@ -223,6 +223,49 @@ long cron_email(long mailtype, CVars in, CVars &out) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
long coupon_email(long mailtype, CVars in, CVars &out) {
|
||||
|
||||
//REQ_LONG( in, "member_id", 1, -1 );
|
||||
CVars x;
|
||||
C_CGI_Form form("", "");
|
||||
|
||||
CGIList * inv_list = new CGIList(&form, "inv_items");
|
||||
char listing_items[1024];
|
||||
const PGresult *res;
|
||||
bool exclude_email = true;
|
||||
char * server_name = getenv("SERVER_NAME");
|
||||
form.LetStr("server_name", "https://dashboard.wrenchboard.com");
|
||||
form.LetStr("site_name", "WrenchBoard");
|
||||
form.LetStr("site_trade_name", "Connecting Opportunities");
|
||||
|
||||
try {
|
||||
|
||||
switch (mailtype) {
|
||||
/*
|
||||
|
||||
wrenchboard=> SELECT substring(ca.code,0,4)||'XXXXXXXX' as code, ca.amount,m.email,m.firstname FROM coupons_allocation ca LEFT JOIN members m ON m.id=ca.member_id;
|
||||
code | amount | email | firstname
|
||||
-------------+--------+----------------------+-----------
|
||||
1M5XXXXXXXX | 0 | ses66181+1@gmail.com | Olusesan
|
||||
*/
|
||||
case WRENCHBOARD_COUPON_ACTIVATE:
|
||||
REQ_LONG(in, "coupon_id", 1, -1);
|
||||
if (load_db_record(x, "SELECT substring(ca.code,0,4)||'XXXXXXXX' as code, ca.amount,m.email,m.firstname FROM coupons_allocation ca LEFT JOIN members m ON m.id=ca.member_id WHERE ca.id = %lu ", in["coupon_id"].Long())) {
|
||||
vars2form(x, form);
|
||||
form.LetStr("email", x["email"].c_str());
|
||||
form.Email("COUPON/member_coupon_allocated.mailfile");
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
} catch (bad_parameter) {
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
long account_email(long mailtype, CVars in, CVars &out) {
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "pgsql_wrapper.h"
|
||||
#include "stripe_charge.h"
|
||||
#include "account_mngt.h"
|
||||
#include "coupons.h"
|
||||
|
||||
#include "twilo.h"
|
||||
//extern CSQL *sql;
|
||||
@@ -56,6 +57,11 @@ long wrenchboard_api_main(CVars in, CVars &out) {
|
||||
return sitecrons_calls(in, out);
|
||||
}
|
||||
|
||||
if (action >= WRENCHBOARD_COUPON_START && action <= WRENCHBOARD_COUPON_END) {
|
||||
logfmt(logINFO, "coupons_calls");
|
||||
return coupons_calls(in, out);
|
||||
}
|
||||
|
||||
if (action >= WRENCHBOARD_ACCOUNT_START && action <= WRENCHBOARD_ACCOUNT_END) {
|
||||
logfmt(logINFO, "account calls");
|
||||
return account_calls(in, out);
|
||||
|
||||
@@ -30,6 +30,12 @@ class Dash extends Users_Controller {
|
||||
redirect(home);
|
||||
} else {
|
||||
// load the Dash model now
|
||||
|
||||
$this->load->model('coupon_model');
|
||||
$activeCouponResult = $this->coupon_model->loadMemberActiveCoupons($_SESSION['member_id'] ,$fliters=[]);
|
||||
$_SESSION['coupon'] = $activeCouponResult->num_rows();
|
||||
|
||||
// print_r($_SESSION);
|
||||
$this->load->model('dash_model');
|
||||
$out = $this->dash_model->getDashData($data);
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
class Coupon_model extends CI_Model {
|
||||
|
||||
function __construct() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function loadMemberActiveCoupons($member_id,$fliters=[]){
|
||||
$sql="SELECT ca.code, ca.amount, ca.added,ca.status
|
||||
FROM coupons_allocation ca WHERE ca.member_id = $member_id ORDER BY ca.id DESC";
|
||||
$q = $this->db->query($sql);
|
||||
return $q;
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,17 @@ setlocale(LC_MONETARY, 'en_NG');
|
||||
?>
|
||||
<!--begin::Row-->
|
||||
<div class="row g-5 g-xl-8">
|
||||
<?php
|
||||
if ( isset($_SESSION['coupon']) && $_SESSION['coupon'] > 0 )
|
||||
{
|
||||
?>
|
||||
<div class="col-xl-3 bg-light-danger rounded p-5 mb-7" style="text-align: center;">
|
||||
<a href="/coupons/"> <h5 class="no-margin"> You have credit coupons</h5></a>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if ( isset($_SESSION['wallet']) && $_SESSION['wallet'] == true)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user