Created At: 2026-06-14T15:34:53Z
Completed At: 2026-06-14T15:34:53Z
File Path: `file:///c:/Users/HP/Downloads/climate-system/climate-system/index.php`
Total Lines: 4752
Total Bytes: 202391
Showing lines 4126 to 4180
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.
4126:         location: lokasi,
4127:         variable: variable,
4128:         period: period,
4129:         imageClimateStripe: stripeUrl
4130:       };
4131: 
4132:       try {
4133:         const res = await fetch('?action=save_future', {
4134:           method: 'POST',
4135:           headers: {
4136:             'Content-Type': 'application/json'
4137:           },
4138:           body: JSON.stringify(data)
4139:         });
4140:         const result = await res.json();
4141: 
4142:         if (result.success) {
4143:           alert('Data Climate Stripe berhasil disimpan ke database SQLite!');
4144:           await loadFilters();
4145:         } else {
4146:           alert('Gagal menyimpan: ' + (result.error || result.message));
4147:         }
4148:       } catch (err) {
4149:         console.error(err);
4150:         alert('Gagal mengirim data penyimpanan ke server.');
4151:       }
4152:     }
4153: 
4154:     async function loadFutureGraphSettingsData() {
4155:       const lokasi = document.getElementById('futureSetLocationGraph').value.trim();
4156:       const variable = document.getElementById('futureSetVariableGraph').value.trim();
4157: 
4158:       if (!lokasi || !variable) return;
4159: 
4160:       try {
4161:         const res = await fetch(`?action=get_future&location=${encodeURIComponent(lokasi)}&variable=${encodeURIComponent(variable)}`);
4162:         const result = await res.json();
4163: 
4164:         if (result.success && result.data) {
4165:           const d = result.data;
4166:           document.getElementById('futureSetGraphBaseValue').value = d.graphBaseValue !== null ? d.graphBaseValue : '';
4167:           document.getElementById('futureSetGraphUncertainty').value = d.graphUncertainty !== null ? d.graphUncertainty : '';
4168:           document.getElementById('futureSetGraphSSP1Slope').value = d.graphSSP1Slope !== null ? d.graphSSP1Slope : '';
4169:           document.getElementById('futureSetGraphSSP2Slope').value = d.graphSSP2Slope !== null ? d.graphSSP2Slope : '';
4170:           document.getElementById('futureSetGraphSSP3Slope').value = d.graphSSP3Slope !== null ? d.graphSSP3Slope : '';
4171:           document.getElementById('futureSetGraphSSP5Slope').value = d.graphSSP5Slope !== null ? d.graphSSP5Slope : '';
4172:           
4173:           const csvDataVal = d.csvData || '';
4174:           document.getElementById('futureSetCsvData').value = csvDataVal;
4175: 
4176:           const indicator = document.getElementById('csvStatusIndicator');
4177:           if (indicator) {
4178:             if (csvDataVal !== '') {
4179:               try {
4180:                 const rows = JSON.parse(csvDataVal);
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.
