Created At: 2026-06-14T15:34:47Z
Completed At: 2026-06-14T15:34:47Z
File Path: `file:///c:/Users/HP/Downloads/climate-system/climate-system/index.php`
Total Lines: 4752
Total Bytes: 202391
Showing lines 4030 to 4125
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.
4030:       const description = document.getElementById('futureSetDescriptionMap').value.trim();
4031:       const imageClimateMap = normalizeImageUrl(document.getElementById('futureSetImageClimateMap').value.trim());
4032:       const imageClimateMap2 = normalizeImageUrl(document.getElementById('futureSetImageClimateMap2').value.trim());
4033:       const imageClimateStripe = normalizeImageUrl(document.getElementById('futureSetImageClimateStripe').value.trim());
4034: 
4035:       if (!lokasi || !variable || !period) {
4036:         alert('Lokasi, Variable, dan Periode wajib diisi!');
4037:         return;
4038:       }
4039: 
4040:       const data = {
4041:         location: lokasi,
4042:         variable: variable,
4043:         period: period,
4044:         description: description,
4045:         imageClimateMap: imageClimateMap,
4046:         imageClimateMap2: imageClimateMap2,
4047:         imageClimateStripe: imageClimateStripe
4048:       };
4049: 
4050:       try {
4051:         const res = await fetch('?action=save_future', {
4052:           method: 'POST',
4053:           headers: {
4054:             'Content-Type': 'application/json'
4055:           },
4056:           body: JSON.stringify(data)
4057:         });
4058:         const result = await res.json();
4059: 
4060:         if (result.success) {
4061:           alert('Data peta & stripe proyeksi berhasil disimpan ke database SQLite!');
4062:           await loadFilters();
4063:         } else {
4064:           alert('Gagal menyimpan: ' + (result.error || result.message));
4065:         }
4066:   
<truncated 837 bytes>
eriod
4086:       let period = '2021-2050';
4087:       if (scenario === 'SSP2-4.5') period = '2031-2060';
4088:       else if (scenario === 'SSP3-7.0') period = '2041-2070';
4089:       else if (scenario === 'SSP5-8.5') period = '2051-2080';
4090: 
4091:       try {
4092:         const res = await fetch(`?action=get_future&location=${encodeURIComponent(lokasi)}&variable=${encodeURIComponent(variable)}&period=${encodeURIComponent(period)}`);
4093:         const result = await res.json();
4094: 
4095:         const stripeInput = document.getElementById('futureSetStripeUrl');
4096:         if (stripeInput) {
4097:           if (result.success && result.data) {
4098:             stripeInput.value = result.data.imageClimateStripe || '';
4099:           } else {
4100:             stripeInput.value = '';
4101:           }
4102:         }
4103:       } catch (err) {
4104:         console.error(err);
4105:       }
4106:     }
4107: 
4108:     async function saveFutureStripeSettings() {
4109:       const lokasi = document.getElementById('futureSetStripeLocation').value.trim();
4110:       const variable = document.getElementById('futureSetStripeVariable').value.trim();
4111:       const scenario = document.getElementById('futureSetStripeScenario').value.trim();
4112:       const stripeUrl = normalizeImageUrl(document.getElementById('futureSetStripeUrl').value.trim());
4113: 
4114:       if (!lokasi || !variable || !scenario) {
4115:         alert('Lokasi, Variable, dan Skenario wajib diisi!');
4116:         return;
4117:       }
4118: 
4119:       // Map scenario to period
4120:       let period = '2021-2050';
4121:       if (scenario === 'SSP2-4.5') period = '2031-2060';
4122:       else if (scenario === 'SSP3-7.0') period = '2041-2070';
4123:       else if (scenario === 'SSP5-8.5') period = '2051-2080';
4124: 
4125:       const data = {
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.
