result list
This commit is contained in:
@@ -89,8 +89,14 @@ long WrenchPromoGetList( CVars in, CVars &out )
|
|||||||
CVars rec;
|
CVars rec;
|
||||||
map_to_cvars(f, rec);
|
map_to_cvars(f, rec);
|
||||||
|
|
||||||
snprintf(vname, sizeof (vname), "added_date_%05d", i);
|
snprintf(vname, sizeof (vname), "updated_%05d", i);
|
||||||
out[vname] = rec["added_date"];
|
out[vname] = rec["updated"];
|
||||||
|
|
||||||
|
snprintf(vname, sizeof (vname), "uid_%05d", i);
|
||||||
|
out[vname] = rec["uid"];
|
||||||
|
|
||||||
|
snprintf(vname, sizeof (vname), "added_%05d", i);
|
||||||
|
out[vname] = rec["added"];
|
||||||
|
|
||||||
snprintf(vname, sizeof (vname), "firstname_%05d", i);
|
snprintf(vname, sizeof (vname), "firstname_%05d", i);
|
||||||
out[vname] = rec["firstname"];
|
out[vname] = rec["firstname"];
|
||||||
|
|||||||
@@ -119,6 +119,28 @@ class ResultFormatter extends Model
|
|||||||
|
|
||||||
// id AS coupon_id, ca.code, ca.amount, ca.added::date,ca.status
|
// id AS coupon_id, ca.code, ca.amount, ca.added::date,ca.status
|
||||||
switch ($in["action"]) {
|
switch ($in["action"]) {
|
||||||
|
|
||||||
|
case WRENCHBOARD_PROMOADMIN_GETLIST:
|
||||||
|
$total = $out["sum_total_record"];
|
||||||
|
$res = array(
|
||||||
|
"status" => $out["status"],
|
||||||
|
"total_record" => $total,
|
||||||
|
"internal_return" => $out["internal_return"],
|
||||||
|
"result_list" => array(),
|
||||||
|
);
|
||||||
|
for ($i = 0; $i < $total; $i++) {
|
||||||
|
$key = sprintf("%05d", $i);
|
||||||
|
$res["result_list"][] = array(
|
||||||
|
"firstname" => $out["firstname_${key}"],
|
||||||
|
"uid" => $out["uid_${key}"],
|
||||||
|
"lastname" => $out["lastname_${key}"],
|
||||||
|
"email" => $out["email_${key}"],
|
||||||
|
"status" => $out["status_${key}"],
|
||||||
|
"added" => $out["added_${key}"],
|
||||||
|
"updated" => $out["updated_${key}"]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
break;
|
||||||
case WRENCHBOARD_ACCOUNT_PREFERENCES:
|
case WRENCHBOARD_ACCOUNT_PREFERENCES:
|
||||||
$total = $out["total_record"];
|
$total = $out["total_record"];
|
||||||
$res = array(
|
$res = array(
|
||||||
|
|||||||
Reference in New Issue
Block a user