From 70659e901b209a43c9add3640895241b935de1cd Mon Sep 17 00:00:00 2001 From: dev-chiefworks Date: Sun, 17 Apr 2022 15:25:08 -0400 Subject: [PATCH] fix --- app/Models/userCards.php | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/app/Models/userCards.php b/app/Models/userCards.php index 6ab295a..93f6d2e 100644 --- a/app/Models/userCards.php +++ b/app/Models/userCards.php @@ -183,7 +183,10 @@ $vl=''; $out["total_record"] = 0; $out['session_valid'] = ''; $out['internal_return'] = PHP_API_OK; - $saveCards = $this->db->query("SELECT m.id AS saved_card_id, mc.*,mc.id AS card_id FROM member_saved_cards m LEFT JOIN main_cards mc ON m.card_id = mc.id WHERE m.member_id = " . $member_id . " AND m.status = 1 LIMIT 10"); + $saveCards = $this->db->query("SELECT m.id AS saved_card_id, mc.*,mc.id AS card_id + FROM member_saved_cards m + LEFT JOIN main_cards mc ON m.card_id = mc.id + WHERE m.member_id = " . $member_id . " AND m.status = 1"); if ($saveCards != null) { $out["total_record"] = $saveCards->getNumRows(); @@ -195,24 +198,41 @@ $vl=''; $this->logArray2("card lines total => ".$ic); $suffix = str_pad($ic, 5, '0', STR_PAD_LEFT); $out['name_' . $suffix] = $f['name']; - $out['short_title_' . $suffix] = $f['short_title']; - $out['title_' . $suffix] = $f['title']; - $out['description_' . $suffix] = $f['description']; + $out['assign_id_' . $suffix] = $f['assign_id']; + $out['card_id_' . $suffix] = $f['card_id']; + $out['can_save_' . $suffix] = $f['can_save']; $out['short_title_' . $suffix] = $f['short_title']; $out['title_' . $suffix] = $f['short_title']; $out['background_picture_' . $suffix] = $f['background_picture']; $out['button1_' . $suffix] = $f['button1']; $out['button1_text_' . $suffix] = $f['button1_text']; $out['button1_action_' . $suffix] = $f['button1_action']; - $out['can_save_' . $suffix] = $f['can_save']; - $out['card_id_' . $suffix] = $f['card_id']; + $out['expires_' . $suffix] = $f['card_expiration']; $out['template_' . $suffix] = $f['template']; $out['card_canexpire_' . $suffix] = $f['card_canexpire']; - $out['card_canexpire_' . $suffix] = $f['card_canexpire']; - $out['expires_' . $suffix] = $f['card_expiration']; + $out['card_action_type_' . $suffix] = $f['card_action_type']; + $out['card_action_data_' . $suffix] = $f['card_action_data']; + $out['titleshow_' . $suffix] = $f['titleshow']; + $out['multiple_answer_' . $suffix] = $f['multiple_answer']; + $out['use_short_title_' . $suffix] = $f['use_short_title']; + $out['target_key_' . $suffix] = $f['target_key']; + $out['target_text_' . $suffix] = $f['target_text']; + $out['description_' . $suffix] = $f['description']; + $out['long_description_' . $suffix] = $f['long_description']; + $out['card_behavior_' . $suffix] = $f['card_behavior']; + $out['card_type_' . $suffix] = $f['card_type']; + $out['card_time_' . $suffix] = $f['card_time']; + $out['card_country_' . $suffix] = $f['card_country']; + $out['card_location_' . $suffix] = $f['card_location']; + $out['latitude_' . $suffix] = $f['latitude']; + $out['longitude_' . $suffix] = $f['longitude']; + $out['card_order_' . $suffix] = $f['card_order']; + $out['background_color_' . $suffix] = $f['background_color']; + $out['blog_id_' . $suffix] = $f['blog_id']; + $out['expiration_' . $suffix] = $f['expiration']; + //$out['card_action_type_' . $suffix] = $f['card_action_type']; //$out['card_action_data_' . $suffix] = $f['card_action_data']; - $out['titleshow_' . $suffix] = $f['titleshow']; $ic++; }