Formted jobs list
This commit is contained in:
@@ -317,10 +317,11 @@ long account_calls(CVars in, CVars &out) {
|
||||
}
|
||||
break;
|
||||
|
||||
// case WRENCHBOARD_START_JOBLIST:
|
||||
// return WrenchReturnStartJobList(in, out);
|
||||
// break;
|
||||
//
|
||||
case WRENCHBOARD_START_JOBLIST:
|
||||
return WrenchReturnStartJobList(in, out);
|
||||
break;
|
||||
|
||||
case WRENCHBOARD_ACCOUNT_JOBLIST:
|
||||
return WrenchReturnJobList(in, out);
|
||||
break;
|
||||
|
||||
@@ -433,7 +433,9 @@ long WrenchReturnJobList(CVars in, CVars &out) {
|
||||
|
||||
const PGresult *res;
|
||||
|
||||
res = pgsql_query("SELECT j.title,j.description,m.id AS job_id,m.expire,m.job_description,j.price,m.offer_code,j.timeline_days, to_char(m.expire, 'Day Mon dd, yyyy HH:MI AM') AS expire2 "
|
||||
res = pgsql_query("SELECT j.title,j.description,m.id AS job_id,m.expire,m.job_description,j.price, "
|
||||
"m.offer_code,j.timeline_days, to_char(m.expire, 'Day Mon dd, yyyy HH:MI AM') AS expire2,"
|
||||
"m.uid AS offer_uid,j.uid AS job_uid "
|
||||
"FROM members_jobs_offer m "
|
||||
"LEFT JOIN members_jobs j ON j.id=m.job_id "
|
||||
"WHERE m.status = 1 AND m.client_id=0 "
|
||||
@@ -473,6 +475,12 @@ long WrenchReturnJobList(CVars in, CVars &out) {
|
||||
|
||||
snprintf(vname, sizeof (vname), "id_%05d", i);
|
||||
out[vname] = rec["job_id"];
|
||||
|
||||
snprintf(vname, sizeof (vname), "offer_uid_%05d", i);
|
||||
out[vname] = rec["offer_uid"];
|
||||
|
||||
snprintf(vname, sizeof (vname), "job_uid_%05d", i);
|
||||
out[vname] = rec["job_uid"];
|
||||
}
|
||||
}
|
||||
ret = PHP_API_OK;
|
||||
|
||||
@@ -159,6 +159,8 @@ function processOutJson($in, $out) {
|
||||
"title" => $out["title_${key}"],
|
||||
"description" => $out["description_${key}"],
|
||||
"id" => $out["id_${key}"],
|
||||
"offer_uid" => $out["offer_uid_${key}"],
|
||||
"job_uid" => $out["job_uid_${key}"],
|
||||
"job_description" => cleanUpDescription($out["job_description_${key}"]),
|
||||
"price" => $out["price_${key}"],
|
||||
"timeline_days" => $out["timeline_days_${key}"],
|
||||
|
||||
Reference in New Issue
Block a user