long RegisterPromoAction(CVars in)

This commit is contained in:
CHIEFSOFT\ameye
2024-11-23 11:51:42 -05:00
parent 7bf57b7324
commit 10b0fd1d8d
+26
View File
@@ -37,6 +37,9 @@ long ProcessExpiredOffers(CVars in, CVars &out);
long ScheduleHolidayJobs(CVars in, CVars &out);
long RefreshBlogs(CVars in, CVars &out);
long RefreshPromoActivities(CVars in, CVars &out);
long RegisterPromoPoint(CVars in);
long RegisterPromoAction(CVars in);
/*
CREATE TABLE cron_jobs (
id SERIAL,
@@ -215,6 +218,7 @@ long RefreshPromoActivities(CVars in, CVars &out){
resF = pgsql_query("SELECT status FROM members_pending where LOWER(username)= LOWER('%s')", rec["email"].c_str());
if (resF != NULL && pgsql_num_rows(resF) > 0) {
pgsql_query("UPDATE promo_member SET updated = now(), status=2 WHERE id = %lu ", rec["id"].Long()); // mo
RegisterPromoAction(rec);
}
}
}
@@ -234,6 +238,12 @@ long RefreshPromoActivities(CVars in, CVars &out){
resF = pgsql_query("SELECT status FROM members where LOWER(username)= LOWER('%s')", rec["email"].c_str());
if (resF != NULL && pgsql_num_rows(resF) > 0) {
pgsql_query("UPDATE promo_member SET updated = now(), status=3 WHERE id = %lu ", rec["id"].Long()); // mo
// now let us register the points
CVars xp;
xp["category"] ="SIGNUP";
xp["member_uid"] = rec["uid"];
xp["points"] = "100";
RegisterPromoPoint(xp);
}
}
}
@@ -264,6 +274,22 @@ long RefreshPromoActivities(CVars in, CVars &out){
return ret;
}
long RegisterPromoPoint(CVars in){
RegisterPromoAction(in);
return 0;
}
long RegisterPromoAction(CVars in){
return 0;
}
long RefreshBlogs(CVars in, CVars &out){
long ret = PHP_API_BAD_PARAM;
CVars xx;