diff --git a/Controllers/adminController.cs b/Controllers/adminController.cs
index 45f0090..d175d7f 100644
--- a/Controllers/adminController.cs
+++ b/Controllers/adminController.cs
@@ -13,7 +13,7 @@ namespace atakanozbancom.Controllers
private readonly Context db = new Context();
[Authorize]
- public ActionResult Index()
+ public ActionResult Index() // admin dashboard landing page
{
ViewBag.MyProjectsCount = db.MyProjects.Count();
ViewBag.AffiliateLinksCount = db.AffiliateLinks.Count();
@@ -22,7 +22,7 @@ namespace atakanozbancom.Controllers
}
[Authorize]
- public ActionResult MyProjects()
+ public ActionResult MyProjects() // shows what we have
{
var value = db.MyProjects.ToList();
return View(value);
@@ -53,6 +53,7 @@ namespace atakanozbancom.Controllers
DescTR = tr != null ? tr.description : ""
};
+ // NEW:
vm.medias = db.projectmedia
.Where(m => m.project_id == p.id)
.OrderBy(m => m.sort_order)
@@ -183,11 +184,19 @@ namespace atakanozbancom.Controllers
return RedirectToAction("myprojectsget", new { id = projectId });
}
+ var trimmed = iframeUrl.Trim();
+ if (!Uri.TryCreate(trimmed, UriKind.Absolute, out var embedUri)
+ || (embedUri.Scheme != Uri.UriSchemeHttps && embedUri.Scheme != Uri.UriSchemeHttp))
+ {
+ TempData["ok"] = "Iframe URL must be a valid http(s) address.";
+ return RedirectToAction("myprojectsget", new { id = projectId });
+ }
+
var row = new projectmedia
{
project_id = projectId,
media_type = MediaType.Iframe,
- url = iframeUrl.Trim(),
+ url = trimmed,
sort_order = sortOrder
};
@@ -295,6 +304,9 @@ namespace atakanozbancom.Controllers
return RedirectToAction("myprojectsget", new { id = projectId });
}
+ // ================= AFFILIATE LINKS =================
+
+ // .svg intentionally excluded: SVGs can embed
+
+ }
+
+
+
diff --git a/Views/login/index.cshtml b/Views/login/index.cshtml
index 5a02e9f..f8518fd 100644
--- a/Views/login/index.cshtml
+++ b/Views/login/index.cshtml
@@ -1,19 +1,15 @@
-
-@{
+@{
Layout = null;
}
-
Sign-in
-
-
-
@using (Html.BeginForm("index", "login", FormMethod.Post))
{
+ @Html.AntiForgeryToken()
Please sign in
+ if (ViewBag.Error != null)
+ {
+ @ViewBag.Error
+ }
+
-
+
-