List part
This commit is contained in:
@@ -37,6 +37,7 @@ long WrenchFamilyTransferHx(CVars in, CVars &out);
|
||||
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 family_calls(CVars in, CVars &out){
|
||||
logfmt(logINFO, "family_calls()");
|
||||
@@ -116,7 +117,7 @@ long family_calls(CVars in, CVars &out){
|
||||
|
||||
case WRENCHBOARD_RELATIVES_SETTINGS:
|
||||
logfmt(logINFO, "ENTER CALL long WRENCHBOARD_RELATIVES_SETTINGS");
|
||||
return 0;
|
||||
return WrenchRelativesSettings(in, out);
|
||||
break;
|
||||
|
||||
case WRENCHBOARD_RELATIVES_EDITKIDS:
|
||||
@@ -132,17 +133,41 @@ long family_calls(CVars in, CVars &out){
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
long WrenchRelativesSettings(CVars in, CVars &out){
|
||||
|
||||
logfmt(logINFO, "ENTER CALL long WrenchRelativesSettings");
|
||||
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, "(.*)");
|
||||
|
||||
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)
|
||||
{
|
||||
res = pgsql_query("SELECT * FROM family_relative_kids WHERE relative_uid::text = '%s'::text AND member_id=%lu AND add_status > 0", in["relative_uid"].c_str(),out["member_id"].Long() );
|
||||
if (res != NULL && pgsql_num_rows(res) > 0) {
|
||||
for (int i = 0, n = pgsql_num_rows(res); i < n; i++) {
|
||||
map<const char*, const char*>f = pgsql_fetch_assoc(res, i);
|
||||
CVars rec;
|
||||
map_to_cvars(f, rec);
|
||||
out["relative_kid_id"] = rec["relative_kid_id"];
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (bad_parameter) {
|
||||
logfmt(logINFO, "ERROR CALL long WrenchRelativesSettings");
|
||||
}
|
||||
|
||||
logfmt(logINFO, "WrenchRelativesSettings()");
|
||||
return ret;
|
||||
}
|
||||
|
||||
long WrenchRelativesKidsEdit(CVars in, CVars &out){
|
||||
|
||||
//'member_id' => int 1
|
||||
// 'sessionid' => string '661A27FE63E366985C4148F02E3D1ED2AE74E64E015AA2F60CBF49A250513672' (length=64)
|
||||
// 'uid' => string '3119b744-42ad-4834-bb83-b737588754ca' (length=36)
|
||||
// 'relative_uid' => string '6c9485b2-a0ac-4d36-ab9e-40d2f224ad2e' (length=36)
|
||||
// 'family_uid' => string '8c6100d7-91c4-47e9-b063-ac3e50385755' (length=36)
|
||||
// 'add' => int 0
|
||||
// 'action' => int 22034
|
||||
|
||||
logfmt(logINFO, "ENTER CALL long WrenchRelativesKidsEdit");
|
||||
char vname[30];
|
||||
long ret = PHP_API_BAD_PARAM;
|
||||
|
||||
Reference in New Issue
Block a user