File size: 988 Bytes
e26fba6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | 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"]);
}
}
}
|