public ActionResult FlightData([Bind(Prefix = "ID")] int FlightID = 0, int IsLive = 0) { if (!exLogic.User.hasAccess("FLIGHT.MAP")) { return(RedirectToAction("NoAccess", "Home")); } ViewBag.FlightID = FlightID; Drones thisDrone = new Drones(); ViewBag.AllowedLocation = thisDrone.getAllowedLocation(FlightID); ViewBag.DroneID = thisDrone.DroneID; if (thisDrone.isLiveFlight(FlightID) || IsLive == 1) { ViewBag.IsLive = true; ViewBag.PlayerURL = thisDrone.getLiveURL(FlightID); ViewBag.Title = "Flight Map (Live)"; } else { ViewBag.IsLive = false; ViewBag.Title = "Flight Map (Replay)"; ViewBag.VideoStartAt = thisDrone.getVideoStartDate(FlightID); ViewBag.PlayerURL = thisDrone.getPlayListURL(FlightID); } //if (IsLive == 1) IsLive = ViewBag.IsLive = true; if (!exLogic.User.hasAccess("FLIGHT.VIDEOS")) { ViewBag.PlayerURL = String.Empty; ViewBag.VideoStartAt = String.Empty; } return(View(thisDrone)); }