!hR V1Ru5
```php
hjkhghoppoopppooppoppoppoopoirh
bnmbertsurheoppopopooooooooooooooopoopopdf'tdfg
!hR V1Ru5
```php
hjkhghoppoopppooppoppoppoopoirh
bnmbertsurheoppopopooooooooooooooopoopopdf'tdfg
const accesskey = "12324324hjklsdfghg";
const stateApi = "https://api.rojgarmahakumbh.co.in/createlocation.php";
const cityApi = "https://api.rojgarmahakumbh.co.in/city.php";
document.addEventListener("DOMContentLoaded", async () => {
await loadStates();
initCityCrud();
});
async function loadStates() {
try {
const res = await fetch(`${stateApi}?accesskey=${accesskey}`, { method: 'GET' });
const json = await res.json();
console.log("States API response:", json);
if (json.status === "success") {
const select = document.getElementById("cityStateSelect");
select.innerHTML = ''; // optional default
json.data.forEach(state => {
const opt = document.createElement("option");
opt.value = state.refno;
opt.textContent = state.state;
select.appendChild(opt);
});
} else {
console.error('State API error:', json.message || json);
}
} catch (err) {
console.error('Error loading states:', err);
}
}
function initCityCrud() {
const cityModal = new bootstrap.Modal(document.getElementById('cityModal'));
const deleteModal = new bootstrap.Modal(document.getElementById('confirmDeleteModal'));
const cityTableBody = document.getElementById('cityTableBody');
const openAddCityBtn = document.getElementById('openAddCityBtn');
const citySaveBtn = document.getElementById('citySaveBtn');
const confirmDeleteBtn = document.getElementById('confirmDeleteBtn');
const cityRefnoInput = document.getElementById('cityRefno');
const cityStateSelect = document.getElementById('cityStateSelect');
const cityNameInput = document.getElementById('cityNameInput');
const cityStatusInput = document.getElementById('cityStatusInput');
openAddCityBtn.addEventListener('clic