long WrenchRelativesReminder(CVars in, CVars &out)
This commit is contained in:
@@ -38,6 +38,8 @@ long WrenchFamilyInvite(CVars in, CVars &out);
|
||||
long WrenchFamilyInviteList(CVars in, CVars &out);
|
||||
long WrenchRelativesKidsEdit(CVars in, CVars &out);
|
||||
long WrenchRelativesSettings(CVars in, CVars &out);
|
||||
long WrenchRelativesReminder(CVars in, CVars &out);
|
||||
|
||||
|
||||
long family_calls(CVars in, CVars &out){
|
||||
logfmt(logINFO, "family_calls()");
|
||||
@@ -128,11 +130,46 @@ long family_calls(CVars in, CVars &out){
|
||||
|
||||
case WRENCHBOARD_RELATIVES_REMINDER:
|
||||
logfmt(logINFO, "ENTER CALL long WRENCHBOARD_RELATIVES_SETTINGS");
|
||||
return WrenchRelativesReminder(in, out);
|
||||
return 0;
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
long WrenchRelativesReminder(CVars in, CVars &out){
|
||||
|
||||
logfmt(logINFO, "ENTER CALL long WrenchRelativesReminder");
|
||||
char vname[30];
|
||||
long ret = PHP_API_BAD_PARAM;
|
||||
long relative_kid_id = 0;
|
||||
const PGresult *res;
|
||||
CVars xx;
|
||||
|
||||
try{
|
||||
REQ_STRING(in, "uid", 3, 150, "(.*)");
|
||||
REQ_STRING(in, "relative_uid", 3, 150, "(.*)");
|
||||
out["total_kid"] ="0";
|
||||
|
||||
load_db_record(out, "SELECT id AS member_id FROM members WHERE uid::text = '%s' ", in["uid"].c_str());
|
||||
if ( out["member_id"].Long() > 0)
|
||||
{
|
||||
load_db_record(out, "SELECT id AS relative_id, uid AS relative_uid FROM members_family_relative WHERE member_id = %lu AND uid::text ='%s' ",out["member_id"].Long(), in["relative_uid"].c_str());
|
||||
|
||||
|
||||
ret = PHP_API_OK;
|
||||
out["status"] = "OK";
|
||||
}
|
||||
} catch (bad_parameter) {
|
||||
logfmt(logINFO, "ERROR CALL long WrenchRelativesReminder");
|
||||
}
|
||||
|
||||
logfmt(logINFO, "WrenchRelativesReminder()");
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
long WrenchRelativesSettings(CVars in, CVars &out){
|
||||
|
||||
logfmt(logINFO, "ENTER CALL long WrenchRelativesSettings");
|
||||
|
||||
@@ -40,6 +40,11 @@ class WrenchFamily extends BaseController
|
||||
$raw_json = file_get_contents('php://input');
|
||||
$in = json_decode($raw_json, true);
|
||||
$out =[];
|
||||
|
||||
$in["action"] = WRENCHBOARD_RELATIVES_REMINDER;
|
||||
$ret = $this->wrenchboard->wrenchboard_api($in, $out);
|
||||
$out['internal_return'] = $ret;
|
||||
|
||||
return $this->summaryReturnData($in,$out);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user