Created At: 2026-06-14T15:52:02Z
Completed At: 2026-06-14T15:52:02Z
File Path: `file:///c:/Users/HP/Downloads/climate-system/climate-system/index.php`
Total Lines: 4761
Total Bytes: 203898
Showing lines 3850 to 3950
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:     
<truncated 3330 bytes>
able=${encodeURIComponent(variable)}&period=${encodeURIComponent(period)}`);
3922:         const result = await res.json();
3923: 
3924:         let stripeUrl = PLACEHOLDER_IMG;
3925:         let found = false;
3926:         if (result.success && result.data) {
3927:           const savedData = result.data;
3928:           if (scenario === 'SSP1-2.6' && savedData.imageStripeSSP126) { stripeUrl = normalizeImageUrl(savedData.imageStripeSSP126); found = true; }
3929:           else if (scenario === 'SSP2-4.5' && savedData.imageStripeSSP245) { stripeUrl = normalizeImageUrl(savedData.imageStripeSSP245); found = true; }
3930:           else if (scenario === 'SSP3-7.0' && savedData.imageStripeSSP370) { stripeUrl = normalizeImageUrl(savedData.imageStripeSSP370); found = true; }
3931:           else if (scenario === 'SSP5-8.5' && savedData.imageStripeSSP585) { stripeUrl = normalizeImageUrl(savedData.imageStripeSSP585); found = true; }
3932:           
3933:           if (!found && savedData.imageClimateStripe) {
3934:             stripeUrl = normalizeImageUrl(savedData.imageClimateStripe);
3935:             found = true;
3936:           }
3937:         }
3938: 
3939:         document.getElementById('futureImageClimateStripe').src = stripeUrl;
3940:         document.getElementById('futureVariableTextStripe').innerText = "Variabel: " + variable;
3941:         document.getElementById('futurePeriodTextStripe').innerText = "Skenario: " + scenario + (found ? "" : " (Data tidak ditemukan)");
3942:       } catch (err) {
3943:         console.error(err);
3944:         alert('Gagal memuat data stripe proyeksi.');
3945:       }
3946:     }
3947: 
3948:     async function applyFutureTSFilter() {
3949:       const lokasi = document.getElementById('futureLocationTS').value;
3950:       const variable = document.getElementById('futureVariableTS').value;
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.
