promo action
This commit is contained in:
@@ -293,11 +293,25 @@ long RegisterPromoPoint(CVars in){
|
|||||||
}
|
}
|
||||||
|
|
||||||
long RegisterPromoAction(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);
|
||||||
|
|
||||||
|
ret = PHP_API_OK;
|
||||||
|
out["status"] = "OK";
|
||||||
return 0;
|
} catch (bad_parameter) {
|
||||||
|
logfmt(logINFO, "ERROR CALL long RegisterPromoAction(CVars in, CVars &out)");
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
long RefreshBlogs(CVars in, CVars &out){
|
long RefreshBlogs(CVars in, CVars &out){
|
||||||
|
|||||||
Reference in New Issue
Block a user