link parts
This commit is contained in:
@@ -132,6 +132,7 @@ long WrenchImportContacts(CVars in, CVars &out);
|
||||
long WrenchRequestVirtualCard(CVars in, CVars &out);
|
||||
long WrenchRequestFamilyVirtualCard(CVars in, CVars &out);
|
||||
long WrenchLoadReferLink(CVars in, CVars &out);
|
||||
long WrenchResendMyReferLink(CVars in, CVars &out);
|
||||
|
||||
long account_calls(CVars in, CVars &out) {
|
||||
logfmt(logINFO, "account_calls()");
|
||||
@@ -494,7 +495,7 @@ long account_calls(CVars in, CVars &out) {
|
||||
break;
|
||||
|
||||
case WRENCHBOARD_MYREFLINK:
|
||||
// return WrenchMyFilesList(in, out);
|
||||
return WrenchResendMyReferLink(in, out);
|
||||
break;
|
||||
|
||||
case WRENCHBOARD_ACCOUNT_PREFERENCES:
|
||||
@@ -532,6 +533,24 @@ long account_calls(CVars in, CVars &out) {
|
||||
|
||||
#define PHP_API_TRANSFER_COMPLETE 200
|
||||
|
||||
long WrenchResendMyReferLink(CVars in, CVars &out) {
|
||||
logfmt(logINFO, "WrenchMyPageIntro()");
|
||||
long ret = PHP_API_BAD_PARAM;
|
||||
const PGresult *res;
|
||||
char buf[1500];
|
||||
CVars x;
|
||||
|
||||
try {
|
||||
REQ_STRING(in, "uid_part", 5, 15, "(.*)");
|
||||
long member_id = REQ_LONG(in, "member_id", 1, -1);
|
||||
|
||||
|
||||
} catch (bad_parameter) {
|
||||
out["status"] = "ERROR";
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
long WrenchLoadReferLink(CVars in, CVars &out) {
|
||||
logfmt(logINFO, "WrenchMyPageIntro()");
|
||||
long ret = PHP_API_BAD_PARAM;
|
||||
|
||||
@@ -32,11 +32,13 @@ class WrenchUser extends BaseController
|
||||
$in = json_decode($raw_json, true);
|
||||
$in["action"] = WRENCHBOARD_MYREFLINK;
|
||||
$out=[];
|
||||
$in["refer_link"] = $this->user_server_name."/".substr($out["uid"], 0, 8).str_pad($out["member_id"], 4, "0", STR_PAD_LEFT);
|
||||
|
||||
|
||||
|
||||
|
||||
$in["uid_part"] = substr(trim($in["refer_link"]), 0, 8);
|
||||
$in["member_id"] = (int) substr(trim($in["refer_link"]), 9);
|
||||
if ( $in["uid_part"] !='' && $in["member_id"] > 0 ){
|
||||
$ret = $this->wrenchboard->wrenchboard_api($in, $out);
|
||||
}
|
||||
|
||||
log_message('critical', "***** ***** WrenchUser::UsersRefLink Ret ");
|
||||
return $this->respond( $this->summaryReturnData($in,$out), 200);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user