Earning Bot - Final New Installation

1. Import: faucetpanda_trx_final.sql (into an EMPTY database — it's a clean
   fresh-install script, no leftover test data).
2. Configure config.php/database.php.
3. Admin panel: /earningbot/admin/
4. Default admin username: admin
   Default password: admin123 — change this from Admin -> Settings after
   your first login.
5. In Admin -> Settings -> Monetag:
   - Put your Monetag main SDK zone ID.
   - Paste the SDK <script> tag supplied by Monetag into Monetag SDK Tag.
6. Daily Streak and Spin Wheel require a Monetag rewarded interstitial ad before the reward is credited.
7. Configure tasks, daily streak rewards, referrals and rank rewards in Admin.
8. Spin Wheel: Admin -> Rewards -> Spin Wheel.
   - "Spin Enabled" turns the whole feature on/off.
   - "Daily Spin Limit" caps how many times each user can spin per day
     (0 = unlimited).
   - Each segment has a Label, Coins, Weight and an Active toggle. Weight
     sets the odds — the spin is a weighted random draw, so a segment
     with more weight wins more often (weights don't need to add up to
     100; the panel shows each segment's live win % as you type). Use
     "Add Segment" for more rows, or untick Active to disable one without
     losing its settings. The coin amount configured here is shown
     centered inside that slice on the wheel in the Mini App.
9. Rank rewards are distributed when the configured reward date is reached. For truly automatic execution, add a server cron:
   * * * * * /usr/bin/php /home/USERNAME/public_html/earningbot/cron/distribute_ranks.php >/dev/null 2>&1
10. Withdrawal method is ONE at a time: FaucetPay or OxaPay.
11. Direct BSC private-key withdrawal has been removed.

Monetag notes:
- The Mini App uses Monetag Rewarded Interstitial.
- Monetag documentation recommends preloading and handling the Promise resolution before granting rewards.
- Test ads inside Telegram, not only in a normal browser.

What changed in this update:
- Spin Wheel now supports a daily spin limit: Admin -> Rewards -> Spin
  Wheel -> "Daily Spin Limit" (0 = unlimited). Once a user hits it, the
  Spin button disables itself and shows "Daily spin limit reached — come
  back tomorrow." until the next day; a "X of Y spins left today" note
  shows while they still have spins available.
- Removed the two "You must watch the Monetag rewarded ad..." notices
  from the Mini App — the ad still plays before Daily Streak/Spin
  rewards exactly as before, it's just not named to the user anymore.
- The withdraw screen now adapts to whichever withdrawal method is
  active in Admin: FaucetPay shows "FaucetPay Email or Username" as the
  field label; OxaPay shows "<COIN> Wallet Address (<network> network)"
  using the coin and network configured in Admin -> Settings ->
  Withdrawal Gateway.
- Added a FaucetPay Referral Link field (Admin -> Settings -> FaucetPay
  Settings). When set and FaucetPay is the active withdrawal method, the
  Mini App shows "Don't have a FaucetPay account? Create one here"
  under the withdraw button, linking to it.
- FaucetPay payout currency is now a dropdown of FaucetPay's supported
  coins (from https://faucetpay.io/api-docs) instead of a text field, and
  the "Smallest-unit Multiplier" field is gone. Per FaucetPay's own docs,
  every coin uses the same fixed internal unit (100,000,000 — the same
  convention as satoshis) regardless of that coin's real on-chain
  decimals, so it was never actually something to configure per
  install — it's now just hardcoded correctly in the code.
- Spin Wheel segments are drawn as equal-size slices on the wheel,
  regardless of their configured weight — only the actual odds of
  winning are weight-based (server-side). The wheel is built dynamically
  from whatever segments are configured in Admin, with each segment's
  coin amount centered inside its slice (previously a static placeholder
  with no connection to your configured segments).
- The bottom navigation menu is bigger (larger icons/padding) and raised
  slightly off the bottom edge instead of sitting flush against it.
- The Mini App's icons are now FontAwesome instead of emoji (loaded from
  the free cdnjs FontAwesome CDN). The Telegram bot's own chat messages
  (webhook.php / functions.php) intentionally still use emoji — Telegram
  message text can't render an icon font, only Unicode emoji, so those
  were left as-is.
- Fixed a bug where the Daily Streak button could keep showing "Watch Ad
  & Claim" after a successful claim instead of "Already Claimed": the
  claim was recorded using PHP's local date but re-checked with MySQL's
  CURDATE(), which can disagree with PHP's date near midnight if the DB
  server's time zone differs from the one set in config.php. Both sides
  now use the same PHP-generated date. Already-claimed streak days are
  now also visually darkened with a checkmark badge in the Mini App.
- Admin -> Rewards -> Spin Wheel: added the Active toggle per segment,
  an "Add Segment" button, and a live win-% readout per segment.
- faucetpanda_trx_final.sql was rewritten as a single clean fresh-install
  script: no leftover developer/test data, and three unused legacy
  tables (tasks, task_attempts, earn_more_items) were dropped. See the
  comment block at the top of that file for the full list of changes.

Note: config.php / database.php in this zip still contain the bot token
and DB credentials from your uploaded copy, carried over unchanged.

