Edit Location';
$posts = Mirror::get_one_location($_POST['location_id']);
form_start();
include_once(INC.'/forms/location.php');
form_hidden('doit','1');
form_hidden('action','edit');
form_hidden('location_id',$_POST['location_id']);
form_submit('submit','','button1','Update');
form_end();
require_once(FOOTER);
exit;
}
break;
case 'delete':
if (Mirror::delete_location($_POST['location_id'])) {
set_msg('Location deleted successfully.');
} else {
set_error('Location could not be deleted.');
}
break;
}
} else {
set_error('You must select a mirror to continue.');
}
}
$title = 'Locations';
$nav = INC.'/admin_nav.php';
require_once(HEADER);
echo '
Locations
';
show_error();
show_msg();
$locations = Mirror::get_locations();
$_GET['sort'] = (!empty($_GET['sort']))?$_GET['sort']:'product_name';
$_GET['order'] = (!empty($_GET['order']))?$_GET['order']:'ASC';
$locations = array_order_by($locations,$_GET['sort'],$_GET['order']);
$headers = array(
'location_id'=>'',
'product_name'=>'Product',
'os_name'=>'OS',
'location_path'=>'Path'
);
$actions = array(
'edit'=>'Edit',
'delete'=>'Delete'
);
form_start();
ListOut::show($locations,$headers,'radio',$actions);
form_end();
echo 'Add a Location
';
form_start();
$posts = ['product_id' => '','os_id' =>'', 'location_path' => ''];
include_once(INC.'/forms/location.php');
form_submit('add-submit','','button1','Add Location');
form_end();
require_once(FOOTER);