Created At: 2026-06-14T14:07:50Z
Completed At: 2026-06-14T14:07:50Z
File Path: `file:///c:/Users/HP/Downloads/climate-system/climate-system/index.php`
Total Lines: 4593
Total Bytes: 193982
Showing lines 3940 to 3995
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.
3940:           document.getElementById('futureSetImageClimateMap').value = '';
3941:           document.getElementById('futureSetImageClimateMap2').value = '';
3942:           document.getElementById('futureSetImageClimateStripe').value = '';
3943:         }
3944:       } catch (err) {
3945:         console.error(err);
3946:       }
3947:     }
3948: 
3949:     // Mengirim data baru Future Climate ke backend (settings)
3950:     async function saveFutureMapSettings() {
3951:       const lokasi = document.getElementById('futureSetLocationMap').value.trim();
3952:       const variable = document.getElementById('futureSetVariableMap').value.trim();
3953:       const period = document.getElementById('futureSetPeriodMap').value.trim();
3954:       const description = document.getElementById('futureSetDescriptionMap').value.trim();
3955:       const imageClimateMap = normalizeImageUrl(document.getElementById('futureSetImageClimateMap').value.trim());
3956:       const imageClimateMap2 = normalizeImageUrl(document.getElementById('futureSetImageClimateMap2').value.trim());
3957:       const imageClimateStripe = normalizeImageUrl(document.getElementById('futureSetImageClimateStripe').value.trim());
3958: 
3959:       if (!lokasi || !variable || !period) {
3960:         alert('Lokasi, Variable, dan Periode wajib diisi!');
3961:         return;
3962:       }
3963: 
3964:       const data = {
3965:         location: lokasi,
3966:         variable: variable,
3967:         period: period,
3968:         description: description,
3969:         imageClimateMap: imageClimateMap,
3970:         imageClimateMap2: imageClimateMap2,
3971:         imageClimateStripe: imageClimateStripe
3972:       };
3973: 
3974:       try {
3975:         const res = await fetch('?action=save_future', {
3976:           method: 'POST',
3977:           headers: {
3978:             'Content-Type': 'application/json'
3979:           },
3980:           body: JSON.stringify(data)
3981:         });
3982:         const result = await res.json();
3983: 
3984:         if (result.success) {
3985:           alert('Data peta & stripe proyeksi berhasil disimpan ke database SQLite!');
3986:           await loadFilters();
3987:         } else {
3988:           alert('Gagal menyimpan: ' + (result.error || result.message));
3989:         }
3990:       } catch (err) {
3991:         console.error(err);
3992:         alert('Gagal mengirim data penyimpanan ke server.');
3993:       }
3994:     }
3995: 
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.
