================================================================================
  FACE UPLOAD - daftar.systemkehadiran.com
  SIAP UPLOAD KE HOSTING
================================================================================

Folder ini BOLEH terus upload ke subdomain:
  https://daftar.systemkehadiran.com/

Keperluan hosting:
  - PHP 7.4 atau lebih baru (disyorkan PHP 8+)
  - Extension PHP: curl
  - mod_rewrite Apache (untuk .htaccess)
  - SSL/HTTPS (wajib untuk kamera telefon)


================================================================================
LANGKAH UPLOAD (cPanel / FTP)
================================================================================

1) Login hosting (cPanel File Manager atau FTP)

2) Buka folder subdomain daftar.systemkehadiran.com
   Biasanya:
   - public_html/daftar/
   - atau folder khusus subdomain

3) Upload SEMUA fail dalam folder ini:
   - index.html
   - config.js
   - .htaccess
   - config.php
   - api/index.php
   - api/ZkClient.php

4) Semak config.php (password ZK sudah diisi):
   server_url  = http://imigresen.systemkehadiran.com
   username    = kemuncak
   password    = (password ZK anda)

5) Test API health:
   https://daftar.systemkehadiran.com/api/health

   Jika OK, akan keluar JSON:
   {"ok":true,"server":"http://imigresen.systemkehadiran.com"}

6) Buka page utama:
   https://daftar.systemkehadiran.com/

7) Test flow:
   - Masukkan Employee ID
   - Sahkan nama
   - Ambil selfie
   - Upload


================================================================================
STRUKTUR FOLDER DI HOSTING
================================================================================

daftar.systemkehadiran.com/
  index.html
  config.js
  .htaccess
  config.php          (RAHSIA - jangan kongsi)
  api/
    index.php
    ZkClient.php


================================================================================
TROUBLESHOOTING
================================================================================

- Page putih / 500 error
  -> Hosting mesti support PHP + curl
  -> Semak config.php wujud

- /api/health 404
  -> mod_rewrite tidak aktif
  -> Cuba tanya hosting enable .htaccess

- Employee not found
  -> Semak Employee ID betul
  -> Semak username/password ZK dalam config.php

- Upload gagal
  -> Hosting perlu boleh reach ZK server:
     http://imigresen.systemkehadiran.com
  -> Jika ZK hanya dalam LAN, hosting luar tidak boleh connect

- Kamera tak keluar
  -> Mesti guna HTTPS (SSL certificate subdomain)


================================================================================
NOTA KESELAMATAN
================================================================================

- config.php mengandungi password ZK
- Jangan letak dalam folder public yang boleh dibaca terus
- .htaccess sudah block akses config.php dari browser

================================================================================
