// do not show the interface } $buttons = ""; if (isset($_REQUEST['new'])) { $new = true; } else { $new = false; } if (isset($_REQUEST['edit']) || $new) { $edit = true; } else { $edit = false; } $del = isset($_REQUEST['del']); if (isset($_REQUEST['City'])) { if (!$del || !delCity($_REQUEST['City'])) { $City = readCity($_REQUEST['City']); } else { $City = false; } // delete was a succes! } else { if ($new) { $City = new City(); } else { $City = false; } } if ($City) { writeHead("<TITLE>City - VIRO - ADL Prototype</TITLE>" . ($edit ? '<SCRIPT type="text/javascript" src="edit.js"></SCRIPT>' : '<SCRIPT type="text/javascript" src="navigate.js"></SCRIPT>') . "\n"); if ($edit) {
} elseif ($act == "addProv") { $mes = addProv(); } elseif ($act == "editProv") { $where = "id={$id}"; $mes = editProv($where); } elseif ($act == "delProv") { $where = "id={$id}"; $mes = delProv($where); } elseif ($act == "addCity") { $mes = addCity(); } elseif ($act == "editCity") { $where = "id={$id}"; $mes = editCity($where); } elseif ($act == "delCity") { $where = "id={$id}"; $mes = delCity($where); } elseif ($act == "addUser") { $mes = addUser(); } elseif ($act == "editUser") { $mes = editUser($id); } elseif ($act == "delUser") { $mes = delUser($id); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Insert title here</title> </head>
$cityID = $_POST["cityID"]; $cityName = $_POST["cityName"]; $cityCode = $_POST["cityCode"]; $cityStateID = $_POST["cityStateID"]; setCity($cityID, $cityName, $cityCode, $cityStateID, $mysqli); } if ($functionname == 'getCity') { getCity($mysqli); } if ($functionname == 'getCityByID') { $cityID = $_POST["cityID"]; getCityByID($cityID, $mysqli); } if ($functionname == 'delCity') { $cityID = $_POST["cityID"]; delCity($cityID, $mysqli); } if ($functionname == 'getCityByStateID') { $stateID = $_POST["stateID"]; getCityByStateID($stateID, $mysqli); } /*Location*/ if ($functionname == 'setLocation') { $locationID = $_POST["locationID"]; $locationName = $_POST["locationName"]; $locationRegionID = $_POST["locationRegionID"]; setLocation($locationID, $locationName, $locationRegionID, $mysqli); } if ($functionname == 'getLocation') { getLocation($mysqli); }