# Update IP Address PGN Server

## Ringkasan Perubahan

**Tanggal:** 28 Oktober 2025  
**Perubahan:** IP Address Server PGN diupdate  
**IP Lama:** `103.133.223.211`  
**IP Baru:** `103.133.223.213`

---

## File yang Diupdate

### 1. File Konfigurasi Utama
- ✅ `config/hosting_config.php` (localhost & hosting environment)

### 2. File PGN Module (22 files)
1. ✅ `pgn/module/report/view_planned.php`
2. ✅ `pgn/module/report/user_hakakses_improved.php`
3. ✅ `pgn/module/report/user_hakakses_final.php`
4. ✅ `pgn/module/report/User_HakAkses_Del.php`
5. ✅ `pgn/module/report/User_HakAkses_Add.php`
6. ✅ `pgn/module/report/user_hakakses.php`
7. ✅ `pgn/module/report/user_data.php`
8. ✅ `pgn/module/report/update_hakakses.php`
9. ✅ `pgn/module/report/test_pgn_tables.php`
10. ✅ `pgn/module/report/test_pgn_fixed.php`
11. ✅ `pgn/module/report/test_export_pgn.php`
12. ✅ `pgn/module/report/test_ajax_detail.php`
13. ✅ `pgn/module/report/shipment_detail.php`
14. ✅ `pgn/module/report/reset_password.php`
15. ✅ `pgn/module/report/jam_operasi.php`
16. ✅ `pgn/module/report/hakakses.php`
17. ✅ `pgn/module/report/get_hakakses_data.php`
18. ✅ `pgn/module/report/export/shipment_detail_fixed.php`
19. ✅ `pgn/module/report/export/shipment_detail_backup.php`
20. ✅ `pgn/module/report/export/shipment_detail.php`
21. ✅ `pgn/module/report/add_pland.php`
22. ✅ `pgn/module/report/ajax_shipment_detail.php`

---

## Status Update

| Kategori | Jumlah File | Status |
|----------|-------------|--------|
| **Total File** | 22 | ✅ **BERHASIL** |
| **Berhasil Diupdate** | 22 | ✅ 100% |
| **Error** | 0 | ✅ 0% |

---

## Konfigurasi Database Setelah Update

### PGN (Pengapon)
```php
'pgn' => [
    'server' => '103.133.223.213',  // ← UPDATED
    'database' => 'ExperionTASBSI',
    'username' => 'AS',
    'password' => '111222'
]
```

### RWL (Rewulu)
```php
'rwl' => [
    'server' => '103.133.223.212',  // ← TIDAK BERUBAH
    'database' => 'ExperionTASBSI',
    'username' => 'dspreport',
    'password' => 'R3wuluindah'
]
```

---

## Backup Files

Semua file yang diupdate telah di-backup secara otomatis dengan format:
```
[nama_file].php.backup_20251028_[timestamp]
```

Contoh:
- `shipment_detail.php.backup_20251028_143022`
- `ajax_shipment_detail.php.backup_20251028_143022`

**Lokasi Backup:** Di folder yang sama dengan file aslinya

---

## Cara Rollback (Jika Diperlukan)

Jika terjadi masalah dan perlu kembali ke IP lama:

1. **Menggunakan script update:**
   ```bash
   # Edit file update_pgn_ip.php
   # Ubah:
   $old_ip = '103.133.223.213';
   $new_ip = '103.133.223.211';
   
   # Jalankan:
   php update_pgn_ip.php
   ```

2. **Manual dari backup:**
   ```bash
   # Contoh restore satu file:
   cp pgn/module/report/shipment_detail.php.backup_20251028_143022 pgn/module/report/shipment_detail.php
   ```

---

## Testing Checklist

Setelah update, pastikan untuk test:

- [ ] Koneksi database PGN
- [ ] Login system PGN
- [ ] Shipment detail report PGN
- [ ] Export Excel PGN
- [ ] AJAX functionality PGN
- [ ] User management PGN
- [ ] Planned data PGN

### Command Test:
```bash
# Test koneksi database
php pgn/module/report/test_pgn_fixed.php

# Test export
php pgn/module/report/test_export_pgn.php

# Test AJAX
php pgn/module/report/test_ajax_detail.php
```

---

## Catatan Penting

⚠️ **PENTING:**
- IP RWL **TIDAK BERUBAH** (tetap `103.133.223.212`)
- Hanya IP PGN yang diupdate menjadi `103.133.223.213`
- Semua perubahan sudah mencakup environment localhost DAN hosting
- File backup otomatis dibuat untuk semua file yang diubah

✅ **Status:** Update berhasil 100%  
✅ **Error:** 0 file  
✅ **Total File Updated:** 22 file

---

## Kontak Support

Jika ada masalah setelah update, hubungi:
- **Developer:** [Your Name]
- **Email:** [Your Email]
- **Phone:** [Your Phone]

---

**Generated by:** Automated Update Script  
**Date:** 28 Oktober 2025  
**Script:** `update_pgn_ip.php`
