Created At: 2026-06-14T15:49:39Z
Completed At: 2026-06-14T15:49:39Z
File Path: `file:///c:/Users/HP/Downloads/climate-system/climate-system/index.php`
Total Lines: 4761
Total Bytes: 203898
Showing lines 4000 to 4300
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.
4000:       // Future Time Series metadata
4001:       document.getElementById('futureCategoryTitleTimeSeries').innerText = "Future Time Series Graph";
4002:       document.getElementById('futureVariableTextTS').innerText = "Variabel: " + variable;
4003:       document.getElementById('futurePeriodTextTS').innerText = "Rentang Tahun: " + startYear + " - " + endYear;
4004:     }
4005: 
4006:     async function loadFutureMapSettingsData() {
4007:       const lokasi = document.getElementById('futureSetLocationMap').value.trim();
4008:       const variable = document.getElementById('futureSetVariableMap').value.trim();
4009:       const period = document.getElementById('futureSetPeriodMap').value.trim();
4010: 
4011:       if (!lokasi || !variable || !period) return;
4012: 
4013:       try {
4014:         const res = await fetch(`?action=get_future&location=${encodeURIComponent(lokasi)}&variable=${encodeURIComponent(variable)}&period=${encodeURIComponent(period)}`);
4015:         const result = await res.json();
4016: 
4017:         if (result.success && result.data) {
4018:           const d = result.data;
4019:           document.getElementById('futureSetDescriptionMap').value = d.description || '';
4020:           document.getElementById('futureSetImageClimateMap').value = d.imageClimateMap || '';
4021:           document.getElementById('futureSetImageClimateMap2').value = d.imageClimateMap2 || '';
4022:           document.getElementById('futureSetImageClimateStripe').value = d.imageClimateStripe || '';
4023:         } else {
4024:           // Clear inputs if no da
<truncated 11692 bytes>
{
4254:           method: 'POST',
4255:           headers: {
4256:             'Content-Type': 'application/json'
4257:           },
4258:           body: JSON.stringify(data)
4259:         });
4260:         const result = await res.json();
4261: 
4262:         if (result.success) {
4263:           alert('Data parameter grafik proyeksi berhasil disimpan ke database SQLite!');
4264:           // Clear CSV input and indicators
4265:           const csvFileEl = document.getElementById('futureSetCsvFile');
4266:           if (csvFileEl) csvFileEl.value = '';
4267:           const csvDataEl = document.getElementById('futureSetCsvData');
4268:           if (csvDataEl) csvDataEl.value = '';
4269:           const csvIndicatorEl = document.getElementById('csvStatusIndicator');
4270:           if (csvIndicatorEl) csvIndicatorEl.innerText = '';
4271: 
4272:           await loadFilters();
4273:         } else {
4274:           alert('Gagal menyimpan: ' + (result.error || result.message));
4275:         }
4276:       } catch (err) {
4277:         console.error(err);
4278:         alert('Gagal mengirim data penyimpanan ke server.');
4279:       }
4280:     }
4281: 
4282:     // Tambah Lokasi Master
4283:     async function addMasterLocation() {
4284:       const nameInput = document.getElementById('masterLocationName');
4285:       const name = nameInput.value.trim();
4286:       if (!name) {
4287:         alert('Nama lokasi tidak boleh kosong!');
4288:         return;
4289:       }
4290: 
4291:       try {
4292:         const res = await fetch('?action=add_location', {
4293:           method: 'POST',
4294:           headers: {
4295:             'Content-Type': 'application/json'
4296:           },
4297:           body: JSON.stringify({ name })
4298:         });
4299:         const result = await res.json();
4300:         if (result.success) {
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.
