Skip to content

Commit

Permalink
last
Browse files Browse the repository at this point in the history
efdali committed Jul 26, 2019
1 parent 1d83ff4 commit e190389
Showing 30 changed files with 148 additions and 39 deletions.
Binary file modified .vs/FilmPortalı/v15/.suo
Binary file not shown.
Binary file modified .vs/FilmPortalı/v15/Server/sqlite3/storage.ide
Binary file not shown.
Binary file not shown.
Binary file not shown.
43 changes: 37 additions & 6 deletions FilmPortalı/Controllers/HomeController.cs
Original file line number Diff line number Diff line change
@@ -29,6 +29,19 @@ public ActionResult Tur(string tur)
{
string sort = Request.QueryString["sortBy"] == null ? "imdb" : Request.QueryString["sortBy"];

if (tur == "2019")
{
ViewBag.Header = "2019 Yılı Filmleri";
}
else if (tur == "en-cok-izlenenler")
{

ViewBag.Header = "En Çok İzlenen Filmler";
}
else
{
ViewBag.Header = tur + " kategorisindeki filmler";
}
ViewBag.active = sort;
ViewBag.tur = tur;
ViewBag.Count = db.Films.Count();
@@ -59,7 +72,6 @@ public ActionResult GetType(string tur, string sort, int page = 0)
films = db.Films.Where(f => f.FYear.ToString() == "2019")
.OrderByDescending(f => f.FImdb).Skip(page * 40).Take(40).ToList();
}
ViewBag.Header = "2019 Yılı Filmleri";
}
else if (tur == "en-cok-izlenenler")
{
@@ -75,15 +87,34 @@ public ActionResult GetType(string tur, string sort, int page = 0)
{
films = db.Films.OrderByDescending(f => f.FImdb).Skip(page * 40).Take(40).ToList();
}
ViewBag.Header = "En Çok İzlenen Filmler";
}
else
{
films = (from f in db.Films
join fc in db.FilmCategory on f.FId equals fc.FId
join c in db.Categories.Where(c => c.CAd.Contains(tur)) on fc.CId equals c.CId
select f).OrderByDescending(f => f.FCDate).Skip(page * 40).Take(40).ToList();
if (sort == "izlenme")
{
films = (from f in db.Films
join fc in db.FilmCategory on f.FId equals fc.FId
join c in db.Categories.Where(c => c.CAd.Contains(tur)) on fc.CId equals c.CId
select f).OrderByDescending(f => f.FUDate).Skip(page * 40).Take(40).ToList();

}
else if (sort == "eklenme")
{
films = (from f in db.Films
join fc in db.FilmCategory on f.FId equals fc.FId
join c in db.Categories.Where(c => c.CAd.Contains(tur)) on fc.CId equals c.CId
select f).OrderByDescending(f => f.FCDate).Skip(page * 40).Take(40).ToList();

}
else
{
films = (from f in db.Films
join fc in db.FilmCategory on f.FId equals fc.FId
join c in db.Categories.Where(c => c.CAd.Contains(tur)) on fc.CId equals c.CId
select f).OrderByDescending(f => f.FImdb).Skip(page * 40).Take(40).ToList();

}

}
return View("GetFilms", films);
}
2 changes: 1 addition & 1 deletion FilmPortalı/Controllers/SecurityController.cs
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ public JsonResult Login(Users users)
if (ModelState.IsValid)
{

var user = db.Users.Where(u => u.UNick == users.UNick || u.UMail == users.UMail);
Users user = db.Users.Where(u => u.UNick == users.UNick || u.UMail == users.UMail).FirstOrDefault();
if(user != null)
{
return Json(new { status = 0, message = "Nick veya Mail adresi kullanımda." });
2 changes: 1 addition & 1 deletion FilmPortalı/Global.asax.cs
Original file line number Diff line number Diff line change
@@ -67,7 +67,7 @@ protected void Session_End()

protected void Application_Error()
{
StreamWriter hd = new StreamWriter(Server.MapPath("~/erros.txt"), true);
StreamWriter hd = new StreamWriter(Server.MapPath("~/errors.txt"), true);
//Oluşan hatalar HataDosyasi adlı bir dosyaya kaydediliyor.
hd.WriteLine(DateTime.Now.ToString());
//Server nesnesini GetLastError metodu sunucuda oluşan son hatayı Exception tipinden getirir. Bu da şu an oluşan hata olacaktır.
Original file line number Diff line number Diff line change
@@ -70,10 +70,10 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<publishTime>06/07/2018 11:03:48</publishTime>
</File>
<File Include="bin/FilmPortalı.dll">
<publishTime>07/21/2019 23:57:54</publishTime>
<publishTime>07/25/2019 21:39:43</publishTime>
</File>
<File Include="bin/FilmPortalı.pdb">
<publishTime>07/21/2019 23:57:54</publishTime>
<publishTime>07/25/2019 21:39:43</publishTime>
</File>
<File Include="bin/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll">
<publishTime>07/03/2019 14:33:10</publishTime>
@@ -5140,7 +5140,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<publishTime>06/15/2019 14:35:44</publishTime>
</File>
<File Include="errors.txt">
<publishTime>07/21/2019 22:54:37</publishTime>
<publishTime>07/25/2019 21:32:33</publishTime>
</File>
<File Include="Fonts/HindGuntur-Regular.ttf">
<publishTime>06/15/2019 14:34:11</publishTime>
@@ -5185,7 +5185,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<publishTime>07/12/2019 21:08:58</publishTime>
</File>
<File Include="Views/Film/FilmDetails.cshtml">
<publishTime>07/21/2019 22:07:22</publishTime>
<publishTime>07/25/2019 20:30:37</publishTime>
</File>
<File Include="Views/Home/GetFilms.cshtml">
<publishTime>07/20/2019 23:09:54</publishTime>
@@ -5197,7 +5197,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<publishTime>07/20/2019 23:24:17</publishTime>
</File>
<File Include="Views/Home/Tur.cshtml">
<publishTime>07/13/2019 10:46:31</publishTime>
<publishTime>07/25/2019 21:18:49</publishTime>
</File>
<File Include="Views/Partial/Footer.cshtml">
<publishTime>07/20/2019 23:30:57</publishTime>
@@ -5218,13 +5218,13 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<publishTime>07/19/2019 22:20:33</publishTime>
</File>
<File Include="Views/Shared/_Layout.cshtml">
<publishTime>07/19/2019 22:17:16</publishTime>
<publishTime>07/25/2019 20:38:35</publishTime>
</File>
<File Include="Views/web.config">
<publishTime>07/12/2019 22:50:27</publishTime>
</File>
<File Include="Web.config">
<publishTime>07/21/2019 00:10:41</publishTime>
<publishTime>07/25/2019 21:39:44</publishTime>
</File>
</ItemGroup>
</Project>
3 changes: 2 additions & 1 deletion FilmPortalı/Views/Film/FilmDetails.cshtml
Original file line number Diff line number Diff line change
@@ -140,7 +140,8 @@
e.preventDefault();
});
$(".open-film").click(function () {
var url = $(this).data("url");
$("#film-src").attr("src", url);
$("#video-modal").css("max-width", "100%");
4 changes: 2 additions & 2 deletions FilmPortalı/Views/Home/Tur.cshtml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@model List<FilmPortalı.Models.Films>
@{
ViewBag.Title = "Tur";
ViewBag.Title = ViewBag.Header;
Layout = "~/Views/Shared/_Layout.cshtml";
}

@@ -11,7 +11,7 @@
<b>Sıralama şekli:</b> <a href='@ViewContext.RouteData.Values["routeName"]?sortBy=eklenme' class='@(ViewBag.active=="eklenme" ? "active" : "")'>Ekleme Tarihi</a>-<a href='@ViewContext.RouteData.Values["routeName"]?sortBy=imdb' class='@(ViewBag.active=="imdb" ? "active" : "")'>IMDB puanı</a>-<a href='@ViewContext.RouteData.Values["routeName"]?sortBy=izlenme' class='@(ViewBag.active=="izlenme" ? "active" : "")'>İzlenme Sayısı</a>
</div>
<div class="film-wrapper">
@{Html.RenderAction("GetType", "Home");}
@{Html.RenderAction("GetType", "Home",new {tur=ViewBag.Tur,sort=ViewBag.active});}
</div>
<button class="btn btn-more">Daha Fazla Film</button>
</div>
7 changes: 4 additions & 3 deletions FilmPortalı/Views/Shared/_Layout.cshtml
Original file line number Diff line number Diff line change
@@ -35,15 +35,16 @@
<link rel="shortcut icon" type="image/x-icon" href="~/Content/img/favicon.ico" />

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-144181286-1"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-144560126-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-144181286-1');
gtag('config', 'UA-144560126-1');
</script>


</head>
<body>

3 changes: 1 addition & 2 deletions FilmPortalı/Web.config
Original file line number Diff line number Diff line change
@@ -21,9 +21,8 @@
<compilation debug="true" targetFramework="4.6.1" />
<httpRuntime targetFramework="4.6.1" />
<authentication mode="Forms">
<forms loginUrl="Home" timeout="1440"></forms>
<forms loginUrl="Home"></forms>
</authentication>
<sessionState timeout="1440" mode="InProc" />
<roleManager enabled="true" defaultProvider="UserRoleProvider">
<providers>
<add name="UserRoleProvider" type="FilmPortalı.Security.UserRoleProvider" />
Binary file modified FilmPortalı/bin/FilmPortalı.dll
Binary file not shown.
3 changes: 1 addition & 2 deletions FilmPortalı/bin/FilmPortalı.dll.config
Original file line number Diff line number Diff line change
@@ -21,9 +21,8 @@
<compilation debug="true" targetFramework="4.6.1" />
<httpRuntime targetFramework="4.6.1" />
<authentication mode="Forms">
<forms loginUrl="Home" timeout="1440"></forms>
<forms loginUrl="Home"></forms>
</authentication>
<sessionState timeout="1440" mode="InProc" />
<roleManager enabled="true" defaultProvider="UserRoleProvider">
<providers>
<add name="UserRoleProvider" type="FilmPortalı.Security.UserRoleProvider" />
Binary file modified FilmPortalı/bin/FilmPortalı.pdb
Binary file not shown.
4 changes: 3 additions & 1 deletion FilmPortalı/errors.txt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@

7/25/2019 9:32:33 PM
The controller for path '/undefined' was not found or does not implement IController.
/undefined
75 changes: 75 additions & 0 deletions FilmPortalı/erros.txt
Original file line number Diff line number Diff line change
@@ -112,3 +112,78 @@ The controller for path '/undefined' was not found or does not implement IContro
7/21/2019 11:57:11 PM
Invalid JSON primitive: efdali.
/
7/25/2019 8:30:56 PM
Object reference not set to an instance of an object.
/detay/undefined
7/25/2019 8:30:56 PM
Input string was not in a correct format.
/Film/CheckList?filmId=122
7/25/2019 8:30:58 PM
Input string was not in a correct format.
/Film/AddWatched?filmId=122
7/25/2019 8:31:14 PM
Object reference not set to an instance of an object.
/detay/undefined
7/25/2019 8:31:14 PM
Input string was not in a correct format.
/Film/CheckList?filmId=140
7/25/2019 8:31:16 PM
Input string was not in a correct format.
/Film/AddWatched?filmId=140
7/25/2019 8:32:36 PM
Object reference not set to an instance of an object.
/detay/undefined
7/25/2019 8:32:37 PM
Input string was not in a correct format.
/Film/CheckList?filmId=123
7/25/2019 8:32:41 PM
Input string was not in a correct format.
/Film/AddWatched?filmId=123
7/25/2019 8:32:57 PM
Input string was not in a correct format.
/Film/AddWatched?filmId=123
7/25/2019 8:33:11 PM
Object reference not set to an instance of an object.
/detay/undefined
7/25/2019 8:33:11 PM
Input string was not in a correct format.
/Film/CheckList?filmId=112
7/25/2019 8:33:21 PM
Object reference not set to an instance of an object.
/detay/undefined
7/25/2019 8:33:21 PM
Input string was not in a correct format.
/Film/CheckList?filmId=125
7/25/2019 8:33:25 PM
Input string was not in a correct format.
/Film/AddWatched?filmId=125
7/25/2019 8:33:51 PM
Object reference not set to an instance of an object.
/detay/undefined
7/25/2019 8:33:51 PM
Input string was not in a correct format.
/Film/CheckList?filmId=126
7/25/2019 8:33:54 PM
Input string was not in a correct format.
/Film/AddWatched?filmId=126
7/25/2019 8:41:22 PM
Object reference not set to an instance of an object.
/detay/undefined
7/25/2019 8:41:24 PM
Input string was not in a correct format.
/Film/CheckList?filmId=112
7/25/2019 9:05:25 PM
A public action method 'Tur' was not found on controller 'FilmPortalı.Controllers.HomeController'.
/Home/Tur
7/25/2019 9:06:21 PM
Object reference not set to an instance of an object.
/detay/undefined
7/25/2019 9:06:21 PM
Input string was not in a correct format.
/Film/CheckList?filmId=141
7/25/2019 9:06:24 PM
Object reference not set to an instance of an object.
/detay/undefined
7/25/2019 9:06:24 PM
Input string was not in a correct format.
/Film/CheckList?filmId=138
Binary file modified FilmPortalı/obj/Debug/FilmPortalı.dll
Binary file not shown.
Binary file modified FilmPortalı/obj/Debug/FilmPortalı.pdb
Binary file not shown.
Binary file modified FilmPortalı/obj/Release/FilmPortalı.dll
Binary file not shown.
Binary file modified FilmPortalı/obj/Release/FilmPortalı.pdb
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -140,7 +140,8 @@
e.preventDefault();
});
$(".open-film").click(function () {
var url = $(this).data("url");
$("#film-src").attr("src", url);
$("#video-modal").css("max-width", "100%");
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@model List<FilmPortalı.Models.Films>
@{
ViewBag.Title = "Tur";
ViewBag.Title = ViewBag.Header;
Layout = "~/Views/Shared/_Layout.cshtml";
}

@@ -11,7 +11,7 @@
<b>Sıralama şekli:</b> <a href='@ViewContext.RouteData.Values["routeName"]?sortBy=eklenme' class='@(ViewBag.active=="eklenme" ? "active" : "")'>Ekleme Tarihi</a>-<a href='@ViewContext.RouteData.Values["routeName"]?sortBy=imdb' class='@(ViewBag.active=="imdb" ? "active" : "")'>IMDB puanı</a>-<a href='@ViewContext.RouteData.Values["routeName"]?sortBy=izlenme' class='@(ViewBag.active=="izlenme" ? "active" : "")'>İzlenme Sayısı</a>
</div>
<div class="film-wrapper">
@{Html.RenderAction("GetType", "Home");}
@{Html.RenderAction("GetType", "Home",new {tur=ViewBag.Tur,sort=ViewBag.active});}
</div>
<button class="btn btn-more">Daha Fazla Film</button>
</div>
Original file line number Diff line number Diff line change
@@ -35,15 +35,16 @@
<link rel="shortcut icon" type="image/x-icon" href="~/Content/img/favicon.ico" />

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-144181286-1"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-144560126-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-144181286-1');
gtag('config', 'UA-144560126-1');
</script>


</head>
<body>

3 changes: 1 addition & 2 deletions FilmPortalı/obj/Release/Package/PackageTmp/Web.config
Original file line number Diff line number Diff line change
@@ -21,9 +21,8 @@
<compilation targetFramework="4.6.1" />
<httpRuntime targetFramework="4.6.1" />
<authentication mode="Forms">
<forms loginUrl="Home" timeout="1440"></forms>
<forms loginUrl="Home"></forms>
</authentication>
<sessionState timeout="1440" mode="InProc" />
<roleManager enabled="true" defaultProvider="UserRoleProvider">
<providers>
<add name="UserRoleProvider" type="FilmPortalı.Security.UserRoleProvider" />
Binary file not shown.
Binary file modified FilmPortalı/obj/Release/Package/PackageTmp/bin/FilmPortalı.pdb
Binary file not shown.
4 changes: 3 additions & 1 deletion FilmPortalı/obj/Release/Package/PackageTmp/errors.txt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@

7/25/2019 9:32:33 PM
The controller for path '/undefined' was not found or does not implement IController.
/undefined
Original file line number Diff line number Diff line change
@@ -21,9 +21,8 @@
<compilation debug="true" targetFramework="4.6.1" />
<httpRuntime targetFramework="4.6.1" />
<authentication mode="Forms">
<forms loginUrl="Home" timeout="1440"></forms>
<forms loginUrl="Home"></forms>
</authentication>
<sessionState timeout="1440" mode="InProc" />
<roleManager enabled="true" defaultProvider="UserRoleProvider">
<providers>
<add name="UserRoleProvider" type="FilmPortalı.Security.UserRoleProvider" />
Original file line number Diff line number Diff line change
@@ -21,9 +21,8 @@
<compilation targetFramework="4.6.1" />
<httpRuntime targetFramework="4.6.1" />
<authentication mode="Forms">
<forms loginUrl="Home" timeout="1440"></forms>
<forms loginUrl="Home"></forms>
</authentication>
<sessionState timeout="1440" mode="InProc" />
<roleManager enabled="true" defaultProvider="UserRoleProvider">
<providers>
<add name="UserRoleProvider" type="FilmPortalı.Security.UserRoleProvider" />

0 comments on commit e190389

Please sign in to comment.