added more status
This commit is contained in:
@@ -77,33 +77,36 @@ logfmt(logINFO, "WrenchMarketImport()");
|
||||
|
||||
long WrenchPromoLoad(CVars in, CVars &out) {
|
||||
logfmt(logINFO, "WrenchPromoLoad()");
|
||||
// $in["promo"] = $promo;
|
||||
// $in["promo_owner"] = $promoOwner;
|
||||
long ret = PHP_API_BAD_PARAM;
|
||||
try {
|
||||
REQ_STRING(in, "promo_owner", 2, 149, "(.*)");
|
||||
REQ_STRING(in, "promo", 2, 49, "(.*)");
|
||||
|
||||
// $in["promo"] = $promo;
|
||||
// $in["promo_owner"] = $promoOwner;
|
||||
//
|
||||
// log_message('critical', "promoStart::promoStart ********* ALL ".serialize($in) );
|
||||
// $in["loc"] = $_SERVER["REMOTE_ADDR"];
|
||||
// $in['limit'] = 10;
|
||||
// $out["firstname"] = "Firstname";
|
||||
// $out["promo_title"] = "This is the promo title";
|
||||
// $out["promo_description"] = "This is the promo description , This is the promo description ,This is the promo description ,This is the promo description ,This is the promo description ,This is the promo description ,This is the promo description ,";
|
||||
// $out["site_name"]= "WrenchBoard";
|
||||
// $out["server_name"]= "https://www.wrenchboard.com";
|
||||
// $out['yyyy'] = '2024';
|
||||
// $out['user_server_name'] = 'https://dev-users.wrenchboard.com';
|
||||
load_db_record(out, "SELECT to_char(now(), 'yyyy') AS YYYY");
|
||||
|
||||
if ( load_db_record(out, "SELECT firstname , lastname , middlename , status,email FROM market_import WHERE uid::text ='%s' ", in["promo_owner"].c_str())> 0){
|
||||
load_db_record(out, "SELECT to_char(now(), 'yyyy') AS YYYY");
|
||||
|
||||
if ( load_db_record(out, "SELECT firstname , lastname , middlename , status,email FROM market_import WHERE uid::text ='%s' AND status = 1", in["promo_owner"].c_str())> 0){
|
||||
if ( load_db_record(out, "SELECT id FROM members WHERE LOWER(username) = LOWER('%s')", out["username"].c_str())> 0){
|
||||
out["status_message"] = "VALID_LINK_NOT_FOUND";
|
||||
}
|
||||
else
|
||||
{
|
||||
out["status_message"] = "VALID_LINK_FOUND";
|
||||
}
|
||||
}
|
||||
else{
|
||||
out["status_message"] = "VALID_LINK_NOT_FOUND";
|
||||
}
|
||||
|
||||
if ( load_db_record(out, "SELECT * FROM market_promo WHERE promo::text ='%s' ", in["promo"].c_str())> 0){
|
||||
|
||||
}
|
||||
|
||||
return 0 ;
|
||||
ret = PHP_API_OK;
|
||||
out["status"] = "OK";
|
||||
} catch (bad_parameter) {
|
||||
logfmt(logINFO, "ERROR CALL long WrenchPromoLoad(CVars in, CVars &out)");
|
||||
}
|
||||
logfmt(logINFO, "/WrenchPromoLoad()");
|
||||
return ret ;
|
||||
}
|
||||
/*
|
||||
#define WRENCHBOARD_MARKET_PLAN01_START 220001
|
||||
|
||||
Reference in New Issue
Block a user