This commit is contained in:
CHIEFSOFT\ameye
2023-12-30 11:25:10 -05:00
parent 5d40bfd1cb
commit 290f37ff62
2 changed files with 21 additions and 1 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ wrenchboard=> SELECT * FROM use_preferences WHERE status = 1 ORDER BY id ASC;
}
}
ret = PHP_API_OK;
+20
View File
@@ -119,6 +119,26 @@ class ResultFormatter extends Model
// id AS coupon_id, ca.code, ca.amount, ca.added::date,ca.status
switch ($in["action"]) {
case WRENCHBOARD_ACCOUNT_PREFERENCES:
$total = $out["total_record"];
$res = array(
"status" => $out["status"],
"total_record" => ($total - 1),
"internal_return" => $out["internal_return"],
"result_list" => array(),
);
for ($i = 0; $i < $total; $i++) {
$key = sprintf("%05d", $i);
$res["result_list"][] = array(
"description" => $out["description_${key}"],
"uid" => $out["uid_${key}"],
"pref" => $out["pref_${key}"],
"lang" => $out["lang_${key}"],
"added" => $out["added_${key}"],
);
}
break;
case WRENCHBOARD_ACCT_NOTIFICATIONS:
$total = $out["total_record"];