/*ONLY IF OFFER IS GREATER THAN 2 */
This commit is contained in:
@@ -42,6 +42,9 @@ long RecoPendingInterestCount( int itm_count, CVars in, CVars &out );
|
|||||||
long RecoStartMarketCard( int itm_count, CVars in, CVars &out );
|
long RecoStartMarketCard( int itm_count, CVars in, CVars &out );
|
||||||
long RecoStartMarketCardUS( int itm_count, CVars in, CVars &out );
|
long RecoStartMarketCardUS( int itm_count, CVars in, CVars &out );
|
||||||
|
|
||||||
|
long RecoLearnMore( int itm_count, CVars in, CVars &out );
|
||||||
|
long RecoJobOwner( int itm_count, CVars in, CVars &out );
|
||||||
|
|
||||||
long recommendation_engine(long action , CVars in, CVars &out) {
|
long recommendation_engine(long action , CVars in, CVars &out) {
|
||||||
try{
|
try{
|
||||||
|
|
||||||
@@ -90,7 +93,7 @@ long WrenchHomeBanners(CVars in, CVars &out) {
|
|||||||
char vname[30];
|
char vname[30];
|
||||||
long member_id = REQ_LONG(in, "member_id", 1, -1);
|
long member_id = REQ_LONG(in, "member_id", 1, -1);
|
||||||
int itm_count= 0;
|
int itm_count= 0;
|
||||||
if( RecoCheckOffers( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; }
|
if( RecoCheckOffers( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; } /*ONLY IF OFFER IS GREATER THAN 2 */
|
||||||
if( RecoCheckActiveTask( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; }
|
if( RecoCheckActiveTask( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; }
|
||||||
if( RecoStartMarketCardUS( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; }
|
if( RecoStartMarketCardUS( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; }
|
||||||
if( RecoStartMarketCard( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; }
|
if( RecoStartMarketCard( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; }
|
||||||
@@ -157,8 +160,17 @@ JOBOWNER_HOME_DASH
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
long RecoLearnMore( int itm_count, CVars in, CVars &out ){
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
long RecoJobOwner( int itm_count, CVars in, CVars &out ){
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
long RecoStartMarketCardUS( int itm_count, CVars in, CVars &out ){
|
long RecoStartMarketCardUS( int itm_count, CVars in, CVars &out ){
|
||||||
logfmt(logINFO, "RecoCheckOffers()");
|
logfmt(logINFO, "RecoStartMarketCardUS()");
|
||||||
long ret = PHP_API_BAD_PARAM;
|
long ret = PHP_API_BAD_PARAM;
|
||||||
const PGresult *res;
|
const PGresult *res;
|
||||||
char vname[30];
|
char vname[30];
|
||||||
@@ -218,7 +230,7 @@ long RecoStartMarketCardUS( int itm_count, CVars in, CVars &out ){
|
|||||||
} catch (bad_parameter) {
|
} catch (bad_parameter) {
|
||||||
out["status"] = "ERROR";
|
out["status"] = "ERROR";
|
||||||
}
|
}
|
||||||
logfmt(logINFO, "/RecoStartMarketCard()");
|
logfmt(logINFO, "/RecoStartMarketCardUS()");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -289,7 +301,7 @@ long RecoOffersInterest(int itm_count, CVars in, CVars &out ){
|
|||||||
}
|
}
|
||||||
|
|
||||||
long RecoStartMarketCard( int itm_count, CVars in, CVars &out ){
|
long RecoStartMarketCard( int itm_count, CVars in, CVars &out ){
|
||||||
logfmt(logINFO, "RecoCheckOffers()");
|
logfmt(logINFO, "RecoStartMarketCard()");
|
||||||
long ret = PHP_API_BAD_PARAM;
|
long ret = PHP_API_BAD_PARAM;
|
||||||
const PGresult *res;
|
const PGresult *res;
|
||||||
char vname[30];
|
char vname[30];
|
||||||
@@ -358,7 +370,7 @@ long RecoStartMarketCard( int itm_count, CVars in, CVars &out ){
|
|||||||
logfmt(logINFO, "/RecoStartMarketCard()");
|
logfmt(logINFO, "/RecoStartMarketCard()");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
/*ONLY IF OFFER IS GREATER THAN 2 */
|
||||||
long RecoCheckOffers(int itm_count, CVars in, CVars &out ){
|
long RecoCheckOffers(int itm_count, CVars in, CVars &out ){
|
||||||
logfmt(logINFO, "RecoCheckOffers()");
|
logfmt(logINFO, "RecoCheckOffers()");
|
||||||
long ret = PHP_API_BAD_PARAM;
|
long ret = PHP_API_BAD_PARAM;
|
||||||
@@ -368,7 +380,7 @@ long RecoCheckOffers(int itm_count, CVars in, CVars &out ){
|
|||||||
int ic = itm_count;
|
int ic = itm_count;
|
||||||
long member_id = REQ_LONG(in, "member_id", 1, -1);
|
long member_id = REQ_LONG(in, "member_id", 1, -1);
|
||||||
res = pgsql_query("SELECT * FROM members_jobs_offer WHERE expire > now() AND status = 1 AND client_id > 0 AND client_id = %lu ",member_id);
|
res = pgsql_query("SELECT * FROM members_jobs_offer WHERE expire > now() AND status = 1 AND client_id > 0 AND client_id = %lu ",member_id);
|
||||||
if (res != NULL && pgsql_num_rows(res) > 0) {
|
if (res != NULL && pgsql_num_rows(res) > 2) {
|
||||||
|
|
||||||
snprintf(vname, sizeof (vname), "title_%05d", ic);
|
snprintf(vname, sizeof (vname), "title_%05d", ic);
|
||||||
out[vname] = "Some offers are waiting for you.";
|
out[vname] = "Some offers are waiting for you.";
|
||||||
@@ -402,7 +414,7 @@ long RecoCheckOffers(int itm_count, CVars in, CVars &out ){
|
|||||||
out[vname] = "Continue";
|
out[vname] = "Continue";
|
||||||
|
|
||||||
snprintf(vname, sizeof (vname), "short_button_text_%05d", ic);
|
snprintf(vname, sizeof (vname), "short_button_text_%05d", ic);
|
||||||
out[vname] = "short_button_text";
|
out[vname] = "View now";
|
||||||
|
|
||||||
snprintf(vname, sizeof (vname), "short_title_%05d", ic);
|
snprintf(vname, sizeof (vname), "short_title_%05d", ic);
|
||||||
out[vname] = "Some offers are waiting for you.";
|
out[vname] = "Some offers are waiting for you.";
|
||||||
@@ -663,7 +675,7 @@ long RecoCheckFamilyCount( int itm_count, CVars in, CVars &out ){
|
|||||||
out[vname] = "Continue";
|
out[vname] = "Continue";
|
||||||
|
|
||||||
snprintf(vname, sizeof (vname), "short_button_text_%05d", ic);
|
snprintf(vname, sizeof (vname), "short_button_text_%05d", ic);
|
||||||
out[vname] = "short_button_text";
|
out[vname] = "View now";
|
||||||
|
|
||||||
snprintf(vname, sizeof (vname), "short_title_%05d", ic);
|
snprintf(vname, sizeof (vname), "short_title_%05d", ic);
|
||||||
out[vname] = "Activate your family account.";
|
out[vname] = "Activate your family account.";
|
||||||
|
|||||||
Reference in New Issue
Block a user