mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 19:04:52 +00:00
Move network edit modal data processing to AJAX
This commit is contained in:
21
post.php
21
post.php
@@ -4889,6 +4889,27 @@ if(isset($_POST['edit_network'])){
|
||||
|
||||
}
|
||||
|
||||
if(isset($_GET['network_get_json_details'])){
|
||||
$network_id = intval($_GET['network_id']);
|
||||
$client_id = intval($_GET['client_id']);
|
||||
|
||||
$network_sql = mysqli_query($mysqli,"SELECT * FROM networks
|
||||
WHERE network_id = $network_id
|
||||
AND network_client_id = $client_id");
|
||||
while($row = mysqli_fetch_array($network_sql)){
|
||||
$response['network'][] = $row;
|
||||
}
|
||||
|
||||
$locations_sql = mysqli_query($mysqli, "SELECT location_id, location_name FROM locations
|
||||
WHERE location_client_id = '$client_id'
|
||||
AND company_id = '$session_company_id'");
|
||||
while($row = mysqli_fetch_array($locations_sql)){
|
||||
$response['locations'][] = $row;
|
||||
}
|
||||
|
||||
echo json_encode($response);
|
||||
}
|
||||
|
||||
if(isset($_GET['delete_network'])){
|
||||
$network_id = intval($_GET['delete_network']);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user