more cards
This commit is contained in:
@@ -31,6 +31,9 @@ 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 RecoCheckActiveTask( 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 );
|
||||
long RecoOffersInterest( int itm_count, CVars in, CVars &out );
|
||||
@@ -80,13 +83,27 @@ long WrenchHomeBanners(CVars in, CVars &out) {
|
||||
if( RecoPendingInterestCount( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; }
|
||||
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(itm_count < 3){ // if you dont have 3 cards let ckeck
|
||||
// active task
|
||||
if( RecoCheckActiveTask( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; }
|
||||
// reward family
|
||||
|
||||
}
|
||||
|
||||
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++; } // - temporary for test
|
||||
|
||||
if( RecoOffersInterest( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; }
|
||||
if( RecoReferAFreind( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; }
|
||||
|
||||
if(itm_count < 3){
|
||||
|
||||
|
||||
}
|
||||
|
||||
if( RecoCheckBlog( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; }
|
||||
if( RecoReferAFreind( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; }
|
||||
|
||||
|
||||
out["home_dash_type"]="DEFAULT_HOME_DASH";
|
||||
LoginWrenchBoardSetDashType(in, out);
|
||||
@@ -578,6 +595,70 @@ long RecoCheckCoupons( int itm_count, CVars in, CVars &out ){
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
long RecoCheckActiveTask( int itm_count, CVars in, CVars &out ){
|
||||
logfmt(logINFO, "RecoCheckActiveTask()");
|
||||
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 client_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] = "View you current task(s) ";
|
||||
|
||||
snprintf(vname, sizeof (vname), "description_%05d", ic);
|
||||
out[vname] = "View you current tasks, manage deliveries and updates";
|
||||
|
||||
snprintf(vname, sizeof (vname), "card_type_%05d", ic);
|
||||
out[vname] = "ACTIVEJOB";
|
||||
|
||||
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] ="https://www.wrenchboard.com/assets/images/apps/banners/active-jobs.jpg";
|
||||
|
||||
snprintf(vname, sizeof (vname), "banner_location_%05d", ic);
|
||||
out[vname] ="URL";
|
||||
|
||||
snprintf(vname, sizeof (vname), "link_path_%05d", ic);
|
||||
out[vname] = "my-active-jobs";
|
||||
|
||||
snprintf(vname, sizeof (vname), "button_text_%05d", ic);
|
||||
out[vname] = "View Tasks";
|
||||
|
||||
snprintf(vname, sizeof (vname), "short_button_text_%05d", ic);
|
||||
out[vname] = "View";
|
||||
|
||||
snprintf(vname, sizeof (vname), "short_title_%05d", ic);
|
||||
out[vname] = "Current Tasks";
|
||||
|
||||
snprintf(vname, sizeof (vname), "short_description_%05d", ic);
|
||||
out[vname] = "View you current task(s) ";
|
||||
|
||||
snprintf(vname, sizeof (vname), "short_style_%05d", ic);
|
||||
out[vname] = "short_style lr";
|
||||
|
||||
ret = PHP_API_OK;
|
||||
}
|
||||
} catch (bad_parameter) {
|
||||
out["status"] = "ERROR";
|
||||
}
|
||||
logfmt(logINFO, "/RecoCheckActiveTask()");
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
long RecoCheckTaskDue( int itm_count, CVars in, CVars &out ){
|
||||
logfmt(logINFO, "RecoCheckTaskDue()");
|
||||
long ret = PHP_API_BAD_PARAM;
|
||||
|
||||
Reference in New Issue
Block a user