upload family parts
This commit is contained in:
@@ -270,18 +270,32 @@ return 0;
|
||||
long WrenchJobManagerActiveTasksList(CVars in, CVars &out) {
|
||||
logfmt(logINFO, "WrenchJobManagerActiveTasksList()");
|
||||
char vname[30];
|
||||
char extra_filter[300];
|
||||
long ret = PHP_API_BAD_PARAM;
|
||||
|
||||
try {
|
||||
long member_id = REQ_LONG(in, "member_id", 1, -1);
|
||||
long offset = REQ_LONG(in, "offset", 1, -1);
|
||||
long limit = REQ_LONG(in, "limit", 1, -1);
|
||||
OPTIONAL(in, "family_uid") REQ_STRING(in, "family_uid", 5, 55, "(.*)");
|
||||
|
||||
out["total_record"] = "0";
|
||||
|
||||
// Prepare more filters
|
||||
snprintf(extra_filter, sizeof (extra_filter), " "); // just make sure it is just space when not needed
|
||||
const PGresult *res0;
|
||||
if (in["family_uid"]!=""){
|
||||
res0 = pgsql_query("SELECT family_member_id AS client_id "
|
||||
" FROM members_family WHERE member_id = %lu "
|
||||
" AND uid ='%s'", in["member_id"].Long(), in["family_uid"].c_str());
|
||||
if (res0 != NULL && pgsql_num_rows(res0) > 0) {
|
||||
map<const char*, const char*>f1 = pgsql_fetch_assoc(res0, 0);
|
||||
CVars res0;
|
||||
map_to_cvars(f1, res0);
|
||||
}
|
||||
}
|
||||
|
||||
const PGresult *res;
|
||||
|
||||
|
||||
res = pgsql_query("SELECT mc.id AS contract_id, mc.job_id AS job_id, mc.price, mc.timeline_days,mc.contract, "
|
||||
" mj.title, mj.description AS description,mc.job_detail AS job_description, "
|
||||
" (CASE WHEN mc.status=4 THEN 'Review' "
|
||||
|
||||
Reference in New Issue
Block a user