Review job codes

This commit is contained in:
CHIEFSOFT\ameye
2023-06-08 12:52:15 -04:00
parent 054e10ac76
commit be0655f5e1
2 changed files with 62 additions and 2 deletions
+55
View File
@@ -31,6 +31,7 @@ long RecoCheckFamilyLogin( int itm_count, CVars in, CVars &out );
long RecoCheckFamilyCount( int itm_count, CVars in, CVars &out );
long RecoCheckCoupons( int itm_count, CVars in, CVars &out );
long RecoCheckTaskDue( int itm_count, CVars in, CVars &out );
long RecoCheckTaskReview( int itm_count, CVars in, CVars &out );
long RecoCheckBlog( int itm_count, CVars in, CVars &out );
@@ -76,6 +77,7 @@ long WrenchHomeBanners(CVars in, CVars &out) {
if( RecoCheckFamilyLogin( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; }
if( RecoCheckFamilyCount( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; }
if( RecoCheckCoupons( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; }
if( RecoCheckTaskReview( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; }
if( RecoCheckTaskDue( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; }
if( RecoCheckBlog( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; }
@@ -372,6 +374,59 @@ long RecoCheckTaskDue( int itm_count, CVars in, CVars &out ){
return ret;
}
long RecoCheckTaskReview( int itm_count, CVars in, CVars &out ){
logfmt(logINFO, "RecoCheckTaskReview()");
long ret = PHP_API_BAD_PARAM;
const PGresult *res;
char vname[30];
try {
int ic = itm_count;
long member_id = REQ_LONG(in, "member_id", 1, -1);
res = pgsql_query("SELECT * FROM members_jobs_contract WHERE member_id = %lu AND status = 4 ",member_id);
if (res != NULL && pgsql_num_rows(res) > 0) {
snprintf(vname, sizeof (vname), "title_%05d", ic);
out[vname] = "Some of your task as owner Need Review now ";
snprintf(vname, sizeof (vname), "description_%05d", ic);
out[vname] = "Some of your task as owner Need Review now,Some of your task as owner Need Review now, S Need Review now";
snprintf(vname, sizeof (vname), "card_type_%05d", ic);
out[vname] = "REVIEWJOB";
snprintf(vname, sizeof (vname), "offer_id_%05d", ic);
out[vname] = "0";
snprintf(vname, sizeof (vname), "blog_id_%05d", ic);
out[vname] = "0";
snprintf(vname, sizeof (vname), "card_icon_%05d", ic);
out[vname] = "icon1";
snprintf(vname, sizeof (vname), "banner_%05d", ic);
out[vname] ="banner-job-due.jpg";
snprintf(vname, sizeof (vname), "banner_location_%05d", ic);
out[vname] ="LOCAL";
snprintf(vname, sizeof (vname), "link_path_%05d", ic);
out[vname] = "my-review-jobs";
snprintf(vname, sizeof (vname), "button_text_%05d", ic);
out[vname] = "View Tasks";
ret = PHP_API_OK;
}
} catch (bad_parameter) {
out["status"] = "ERROR";
}
logfmt(logINFO, "/RecoCheckTaskReview()");
return ret;
}
long RecoCheckBlog( int itm_count, CVars in, CVars &out ){
logfmt(logINFO, "RecoCheckBlog()");
long ret = PHP_API_BAD_PARAM;