BDG V10 - Login Fix and SaaS Lottery Change Map
================================================

LOGIN FIX IN V10
----------------
File changed:
  codexhub/api/webapi/Login.php

Fixes:
1. Login signature verification now uses every non-empty field signed by the
   frontend (including deviceId, packId, captchaId and advertising identifiers).
   The previous fixed six-field signature rejected valid requests.
2. Phone login accepts both 91XXXXXXXXXX and +91XXXXXXXXXX formats.
3. Successful login stores the JWT session by user ID, so both phone and email
   login update shonu_subjects.akshinak correctly.
4. Wrong-password counters are also updated by user ID, fixing email accounts.
5. Session updates use a prepared statement, so browser User-Agent characters
   cannot break the login SQL.
6. Optional login-notification failure can no longer stop a successful login.

SAAS LOTTERY - FILES/CHANGES THAT MAKE IT WORK
-----------------------------------------------

A. Frontend and local API selection
  index.html
    - VITE_API_URL points to /codexhub.
    - SAAS_LOTTERY_DRAW_URL points to /draw.

  app.config.js
    - Contains the same local platform API and draw settings.

  assets/js/index-DO1iGk86.js
    - Recognizes vendorCode ARLottery.
    - Reads the launch Token/Skin/Lang.
    - Stores ar_token and same-origin ar_api/ar_api_json values.
    - Opens WinGo, K3, D5 and TrxWinGo SaaS routes inside the BDG UI.

B. ARLottery discovery and launch
  codexhub/api/webapi/GetLotteryCategoryList.php
    - Adds gameCode values WinGo_30S, K3_1M, D5_1M and TrxWinGo_1M.

  codexhub/api/webapi/GetAllGameList.php
    - Publishes the local ARLottery game/category entries.

  codexhub/api/webapi/GetHomeSettings.php
    - Enables isOpenArLottery from the local betting control.

  codexhub/api/webapi/GetGameUrl.php
    - Validates the logged-in JWT/session.
    - Returns a same-origin URL containing Token, Skin and Lang.
    - No external lottery operator URL is required.

C. Local SaaS Lottery API and result feed
  api/.htaccess
  api/Lottery/index.php
    - Serve the /api/Lottery/* calls used by the SaaS game.

  draw/.htaccess
  draw/index.php
    - Serve the /draw/* current result and history JSON routes.

  saas_lottery/bootstrap.php
  saas_lottery/config.php
  saas_lottery/schema.sql
  saas_lottery/.htaccess
    - Provide authentication, wallet/bet logic, schema and protected runtime
      configuration for the bundled lottery engine.

D. Shared platform wallet
  codexhub/api/webapi/_app_api.php
  codexhub/api/webapi/GetSaasAllwallets.php
  codexhub/api/webapi/RecoverSaasBalance.php
  codexhub/api/webapi/NotifyARGameRecover.php
    - Use the logged-in user's shonu_kaichila.motta balance for the local game.

E. Admin controls (management, not required for page routing)
  codexhub/app_core.php
  admin/game_control_center.php
  admin/pro_settings.php
    - Store and manage game enable/source/API/manual-result controls.

DEPLOY/TEST
-----------
Upload the complete package and preserve its folder structure. Then use a hard
refresh or an incognito window.

Expected login request:
  POST /codexhub/api/webapi/Login
  Response code: 0

Expected first local lottery launch:
  POST /codexhub/api/webapi/GetGameUrl
  Then /api/Lottery/* and /draw/* requests.

