Created At: 2026-06-14T16:17:33Z
Completed At: 2026-06-14T16:17:33Z
File Path: `file:///c:/Users/HP/Downloads/climate-system/climate-system/index.php`
Total Lines: 3882
Total Bytes: 163903
Showing lines 3520 to 3620
The following code has been modified to include a line number before every line, in the format: <line_number>: <original_line>. Please note that any changes targeting the original code should remove the line number, colon, and leading space.
3520:           // Reset gambar ke placeholder
3521:           document.getElementById('futureImageClimateMap').src = PLACEHOLDER_IMG;
3522:           document.getElementById('futureImageClimateMap2').src = PLACEHOLDER_IMG;
3523:           switchClimateMap(1); // Reset slider to show Map 1 first
3524:           document.getElementById('futureImageClimateStripe').src = PLACEHOLDER_IMG;
3525:           
3526:           document.getElementById('futureVariableText').innerText = "Variabel: " + variable;
3527:           document.getElementById('futurePeriodText').innerText = "Periode: " + period;
3528:           document.getElementById('futureVariableTextTS').innerText = "Variabel: " + variable;
3529:           document.getElementById('futurePeriodTextTS').innerText = "Periode: " + period;
3530:           document.getElementById('futureVariableTextStripe').innerText = "Variabel: " + variable;
3531:           document.getElementById('futurePeriodTextStripe').innerText = "Periode: " + period;
3532:         }
3533:       } catch (err) {
3534:         console.error(err);
3535:         alert('Gagal memuat data future tambahan dari database server.');
3536:       }
3537:     }
3538: 
3539:     // Mengirim data baru Future Climate ke backend (settings)
3540:     async function saveFutureData() {
3541:       const lokasi = document.getElementById('futureSetLocation').value.trim();
3542:       const variable = document.getElementById('futureSetVariable').value.trim();
3543:       const period = document.getElementById('futureSetPeriod').value.trim();
3544:       const descriptio
<truncated 2122 bytes>
hSSP2Slope) : '',
3576:         graphSSP3Slope: graphSSP3Slope !== '' ? parseFloat(graphSSP3Slope) : '',
3577:         graphSSP5Slope: graphSSP5Slope !== '' ? parseFloat(graphSSP5Slope) : '',
3578:         csvData: csvData
3579:       };
3580: 
3581:       try {
3582:         const res = await fetch('?action=save_future', {
3583:           method: 'POST',
3584:           headers: {
3585:             'Content-Type': 'application/json'
3586:           },
3587:           body: JSON.stringify(data)
3588:         });
3589:         const result = await res.json();
3590: 
3591:         if (result.success) {
3592:           alert('Data future berhasil disimpan ke database SQLite!');
3593:           // Clear CSV input and indicators
3594:           const csvFileEl = document.getElementById('futureSetCsvFile');
3595:           if (csvFileEl) csvFileEl.value = '';
3596:           const csvDataEl = document.getElementById('futureSetCsvData');
3597:           if (csvDataEl) csvDataEl.value = '';
3598:           const csvIndicatorEl = document.getElementById('csvStatusIndicator');
3599:           if (csvIndicatorEl) csvIndicatorEl.innerText = '';
3600: 
3601:           // Segera perbarui dropdown list filter
3602:           await loadFilters();
3603:         } else {
3604:           alert('Gagal menyimpan: ' + (result.error || result.message));
3605:         }
3606:       } catch (err) {
3607:         console.error(err);
3608:         alert('Gagal mengirim data penyimpanan ke server.');
3609:       }
3610:     }
3611: 
3612:     // Tambah Lokasi Master
3613:     async function addMasterLocation() {
3614:       const nameInput = document.getElementById('masterLocationName');
3615:       const name = nameInput.value.trim();
3616:       if (!name) {
3617:         alert('Nama lokasi tidak boleh kosong!');
3618:         return;
3619:       }
3620: 
The above content does NOT show the entire file contents. If you need to view any lines of the file which were not shown to complete your task, call this tool again to view those lines.
