Created At: 2026-06-14T15:35:07Z
Completed At: 2026-06-14T15:35:08Z
File Path: `file:///c:/Users/HP/Downloads/climate-system/climate-system/index.php`
Total Lines: 4751
Total Bytes: 202808
Showing lines 3850 to 3895
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.
3850:       if (!lokasi || !variable || !period) {
3851:         alert('Silakan pilih lokasi, variabel, dan periode terlebih dahulu.');
3852:         return;
3853:       }
3854: 
3855:       document.getElementById('futureDataInfo').innerHTML =
3856:         'Lokasi: ' + lokasi + ' | Variabel: ' + variable + ' | Periode: ' + period;
3857: 
3858:       try {
3859:         const res = await fetch(`?action=get_future&location=${encodeURIComponent(lokasi)}&variable=${encodeURIComponent(variable)}&period=${encodeURIComponent(period)}`);
3860:         const result = await res.json();
3861: 
3862:         if (result.success && result.data) {
3863:           const savedData = result.data;
3864:           document.getElementById('futureDescription').innerText = savedData.description || '';
3865: 
3866:           // Climate Change Map
3867:           document.getElementById('futureImageClimateMap').src = savedData.imageClimateMap ? normalizeImageUrl(savedData.imageClimateMap) : PLACEHOLDER_IMG;
3868:           document.getElementById('futureImageClimateMap2').src = savedData.imageClimateMap2 ? normalizeImageUrl(savedData.imageClimateMap2) : PLACEHOLDER_IMG;
3869:           switchClimateMap(1); // Reset slider to show Map 1 first
3870:           document.getElementById('futureCategoryTitleMap').innerText = "Climate Change Map";
3871:           document.getElementById('futureVariableText').innerText = "Variabel: " + variable;
3872:           document.getElementById('futurePeriodText').innerText = "Periode: " + period;
3873: 
3874:           // Future Climate Stripe
3875:           document.getElementById('futureImageClimateStripe').src = savedData.imageClimateStripe ? normalizeImageUrl(savedData.imageClimateStripe) : PLACEHOLDER_IMG;
3876:           document.getElementById('futureCategoryTitleStripe').innerText = "Future Climate Stripe";
3877:           document.getElementById('futureVariableTextStripe').innerText = "Variabel: " + variable;
3878:           document.getElementById('futurePeriodTextStripe').innerText = "Periode: " + period;
3879:         } else {
3880:           document.getElementById('futureDescription').innerText = 'Data climate belum tersedia di database untuk filter ini, namun visualisasi telah diperbarui.';
3881:           // Reset gambar ke placeholder
3882:           document.getElementById('futureImageClimateMap').src = PLACEHOLDER_IMG;
3883:           document.getElementById('futureImageClimateMap2').src = PLACEHOLDER_IMG;
3884:           switchClimateMap(1); // Reset slider to show Map 1 first
3885:           document.getElementById('futureImageClimateStripe').src = PLACEHOLDER_IMG;
3886:           
3887:           document.getElementById('futureVariableText').innerText = "Variabel: " + variable;
3888:           document.getElementById('futurePeriodText').innerText = "Periode: " + period;
3889:           document.getElementById('futureVariableTextStripe').innerText = "Variabel: " + variable;
3890:           document.getElementById('futurePeriodTextStripe').innerText = "Periode: " + period;
3891:         }
3892:       } catch (err) {
3893:         console.error(err);
3894:         alert('Gagal memuat data peta & stripe proyeksi.');
3895:       }
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.
