promo action

This commit is contained in:
CHIEFSOFT\ameye
2024-11-23 12:31:56 -05:00
parent d62b9d7899
commit 1a545646b7
+17 -3
View File
@@ -293,11 +293,25 @@ long RegisterPromoPoint(CVars in){
}
long RegisterPromoAction(CVars in){
long ret = PHP_API_BAD_PARAM;
CVars xx;
try {
long blog_id = REQ_LONG(in, "blog_id", 1, -1);
REQ_STRING (in, "category", 5, 49, "(.*)");
REQ_STRING (in, "description", 5, 149, "(.*)");
long admin_id = REQ_LONG(in, "admin_id", 1, -1);
xx["category"] = in["category"]; xx["category"].set_valid( true );
xx["description"] = in["description"]; xx["description"].set_valid( true );
xx["admin_id"] = in["admin_id"]; xx["admin_id"].set_valid( true );
insert_db_record(DBS_VALID, "promo_actions", "promo_actions_id_seq", xx);
return 0;
ret = PHP_API_OK;
out["status"] = "OK";
} catch (bad_parameter) {
logfmt(logINFO, "ERROR CALL long RegisterPromoAction(CVars in, CVars &out)");
}
return ret;
}
long RefreshBlogs(CVars in, CVars &out){