result list

This commit is contained in:
CHIEFSOFT\ameye
2024-11-18 06:53:51 -05:00
parent b2f8ac55a1
commit ffc22f5119
2 changed files with 30 additions and 2 deletions
+22
View File
@@ -119,6 +119,28 @@ class ResultFormatter extends Model
// id AS coupon_id, ca.code, ca.amount, ca.added::date,ca.status
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:
$total = $out["total_record"];
$res = array(