home banners

This commit is contained in:
CHIEFSOFT\ameye
2023-06-06 11:18:28 -04:00
parent fffeb353ce
commit 36f9ab520e
3 changed files with 63 additions and 4 deletions
+61 -4
View File
@@ -76,7 +76,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( RecoCheckTaskDue( 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++; }
// WrenchReturnJobOffersList(in, offV);
@@ -149,6 +149,9 @@ long RecoCheckOffers(int itm_count, CVars in, CVars &out ){
snprintf(vname, sizeof (vname), "banner_%05d", ic);
out[vname] ="https://blog.wrenchboard.com/wp-content/uploads/2022/01/wrechboard-sample.jpg";
snprintf(vname, sizeof (vname), "banner_location_%05d", ic);
out[vname] ="URL";
snprintf(vname, sizeof (vname), "link_path_%05d", ic);
out[vname] = "mytask";
@@ -196,6 +199,9 @@ long RecoCheckFamilyLogin(int itm_count, CVars in, CVars &out ){
snprintf(vname, sizeof (vname), "banner_%05d", ic);
out[vname] ="https://blog.wrenchboard.com/wp-content/uploads/2022/01/wrechboard-sample.jpg";
snprintf(vname, sizeof (vname), "banner_location_%05d", ic);
out[vname] ="URL";
snprintf(vname, sizeof (vname), "link_path_%05d", ic);
out[vname] = "acc-family";
@@ -241,6 +247,9 @@ long RecoCheckFamilyCount( int itm_count, CVars in, CVars &out ){
snprintf(vname, sizeof (vname), "banner_%05d", ic);
out[vname] ="https://blog.wrenchboard.com/wp-content/uploads/2022/01/wrechboard-sample.jpg";
snprintf(vname, sizeof (vname), "banner_location_%05d", ic);
out[vname] ="URL";
snprintf(vname, sizeof (vname), "link_path_%05d", ic);
out[vname] = "acc-family";
@@ -284,7 +293,10 @@ long RecoCheckCoupons( int itm_count, CVars in, CVars &out ){
out[vname] = "icon1";
snprintf(vname, sizeof (vname), "banner_%05d", ic);
out[vname] ="https://blog.wrenchboard.com/wp-content/uploads/2022/01/wrechboard-sample.jpg";
out[vname] ="banner-coupons.jpg";
snprintf(vname, sizeof (vname), "banner_location_%05d", ic);
out[vname] ="LOCAL";
snprintf(vname, sizeof (vname), "link_path_%05d", ic);
out[vname] = "my-coupon";
@@ -299,8 +311,50 @@ long RecoCheckCoupons( int itm_count, CVars in, CVars &out ){
}
long RecoCheckTaskDue( int itm_count, CVars in, CVars &out ){
long ret = PHP_API_BAD_PARAM;
return ret;
logfmt(logINFO, "RecoCheckTaskDue()");
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 =1 AND delivery_date > now() ",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 of the tasks are due ";
snprintf(vname, sizeof (vname), "description_%05d", ic);
out[vname] = "Some of your task as owner of the tasks are due, Some of your task as owner of the tasks are due";
snprintf(vname, sizeof (vname), "card_type_%05d", ic);
out[vname] = "PASTDUEJOB";
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-pastdue-jobs";
ret = PHP_API_OK;
}
} catch (bad_parameter) {
out["status"] = "ERROR";
}
logfmt(logINFO, "/RecoCheckTaskDue()");
return ret;
}
long RecoCheckBlog( int itm_count, CVars in, CVars &out ){
@@ -333,6 +387,9 @@ long RecoCheckBlog( int itm_count, CVars in, CVars &out ){
snprintf(vname, sizeof (vname), "banner_%05d", ic);
out[vname] ="https://blog.wrenchboard.com/wp-content/uploads/2022/01/wrechboard-sample.jpg";
snprintf(vname, sizeof (vname), "banner_location_%05d", ic);
out[vname] ="URL";
snprintf(vname, sizeof (vname), "link_path_%05d", ic);
out[vname] = "blog-page";
+1
View File
@@ -112,6 +112,7 @@ class ResultFormatter extends Model
"card_icon" => $out["card_icon_${key}"],
"offer_id" => $out["offer_id_${key}"],
"banner" => $out["banner_${key}"],
"banner_location" => $out["banner_location_${key}"],
"link_path" => $out["link_path_${key}"],
);
}
+1
View File
@@ -106,6 +106,7 @@ function processOutJson($in, $out) {
"card_icon" => $out["card_icon_${key}"],
"offer_id" => $out["offer_id_${key}"],
"banner" => $out["banner_${key}"],
"banner_location" => $out["banner_location_${key}"],
"link_path" => $out["link_path_${key}"],
);
}