Download MovieFinder.Web/Controllers/AdController.cs from niobures/VideoSearch: direct link, hf CLI and curl.
- Browser
- Download file 988 Bytes
-
https://huggingface.co/niobures/VideoSearch/resolve/main/MovieFinder.Web/Controllers/AdController.cs
- Command line
-
hf download hf://niobures/VideoSearch/MovieFinder.Web/Controllers/AdController.cs
-
curl -L -o AdController.cs https://huggingface.co/niobures/VideoSearch/resolve/main/MovieFinder.Web/Controllers/AdController.cs
988 Bytes
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Web; | |
| using System.Web.Mvc; | |
| using System.Configuration; | |
| namespace MovieFinder.Web.Controllers | |
| { | |
| public class AdController : Controller | |
| { | |
| // | |
| // GET: /Ad/ | |
| public ActionResult Index(string id, string uid, string cn) | |
| { | |
| return View("Index", (object)id); | |
| } | |
| public bool ShowAds(string uid, string cn, long? timeStamp, string pcName, string version) | |
| { | |
| Guid guid = Guid.NewGuid(); | |
| var dt = new DateTime(2000,1,1); | |
| try | |
| { | |
| guid = new Guid(uid); | |
| dt = new DateTime(timeStamp.Value); | |
| } | |
| catch { return false; } | |
| DataService.LogShowAd(guid, Request.UserHostAddress, cn,dt, pcName, version ); | |
| return Convert.ToBoolean(ConfigurationManager.AppSettings["ShowAds"]); | |
| } | |
| } | |
| } | |