Add support page, admin features, and auth hardening.

Rename public affiliate route to /support with localized nav labels, and include affiliate/social/wallpaper admin, 2FA login, and related site updates.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Atakan Doğan Özban
2026-07-29 20:25:55 +02:00
co-authored by Cursor
parent 202dc16a52
commit fc45c35dbe
149 changed files with 3496 additions and 11263 deletions
+40 -4
View File
@@ -105,6 +105,33 @@ namespace atakanozbancom.App_GlobalResources {
} }
} }
/// <summary>
/// Looks up a localized string similar to Affiliate links will be listed here soon..
/// </summary>
public static string AffiliateLinksComingSoon {
get {
return ResourceManager.GetString("AffiliateLinksComingSoon", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Support my work 💙.
/// </summary>
public static string AffiliateLinksTitle {
get {
return ResourceManager.GetString("AffiliateLinksTitle", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to If you&apos;d like to support my work, you can use the links below. It costs money for me to run and maintain these services, and using them may earn me a small benefit at no extra cost to you..
/// </summary>
public static string AffiliateLinksIntro {
get {
return ResourceManager.GetString("AffiliateLinksIntro", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to I m working hard and on these projects, and your support really motivates me. If you d like to support you can support by these links. /// Looks up a localized string similar to I m working hard and on these projects, and your support really motivates me. If you d like to support you can support by these links.
/// </summary> /// </summary>
@@ -133,11 +160,11 @@ namespace atakanozbancom.App_GlobalResources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to GitHub. /// Looks up a localized string similar to Gitea.
/// </summary> /// </summary>
public static string GitHub { public static string Gitea {
get { get {
return ResourceManager.GetString("GitHub", resourceCulture); return ResourceManager.GetString("Gitea", resourceCulture);
} }
} }
@@ -222,6 +249,15 @@ namespace atakanozbancom.App_GlobalResources {
} }
} }
/// <summary>
/// Looks up a localized string similar to Support my work 💙.
/// </summary>
public static string NavAffiliateLinks {
get {
return ResourceManager.GetString("NavAffiliateLinks", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Home. /// Looks up a localized string similar to Home.
/// </summary> /// </summary>
@@ -241,7 +277,7 @@ namespace atakanozbancom.App_GlobalResources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Server Status. /// Looks up a localized string similar to Service Status.
/// </summary> /// </summary>
public static string Server { public static string Server {
get { get {
+15 -3
View File
@@ -150,6 +150,18 @@
<data name="NavMyProjects" xml:space="preserve"> <data name="NavMyProjects" xml:space="preserve">
<value>My Projects</value> <value>My Projects</value>
</data> </data>
<data name="NavAffiliateLinks" xml:space="preserve">
<value>Support my work 💙</value>
</data>
<data name="AffiliateLinksTitle" xml:space="preserve">
<value>Support my work 💙</value>
</data>
<data name="AffiliateLinksIntro" xml:space="preserve">
<value>If you'd like to support my work, you can use the links below. It costs money for me to run and maintain these services, and using them may earn me a small benefit at no extra cost to you.</value>
</data>
<data name="AffiliateLinksComingSoon" xml:space="preserve">
<value>Affiliate links will be listed here soon.</value>
</data>
<data name="DonateTY" xml:space="preserve"> <data name="DonateTY" xml:space="preserve">
<value>Thank you</value> <value>Thank you</value>
</data> </data>
@@ -171,13 +183,13 @@
<data name="About4" xml:space="preserve"> <data name="About4" xml:space="preserve">
<value>Photographys another passion of mine. I love traveling and capturing 360° photos to upload on Google Street View, making hidden places visible to the world. Its like my own version of a vlog channel, just in pictures.</value> <value>Photographys another passion of mine. I love traveling and capturing 360° photos to upload on Google Street View, making hidden places visible to the world. Its like my own version of a vlog channel, just in pictures.</value>
</data> </data>
<data name="GitHub" xml:space="preserve"> <data name="Gitea" xml:space="preserve">
<value>GitHub</value> <value>Gitea</value>
</data> </data>
<data name="MyProjectsP1_1" xml:space="preserve"> <data name="MyProjectsP1_1" xml:space="preserve">
<value>page.</value> <value>page.</value>
</data> </data>
<data name="Server" xml:space="preserve"> <data name="Server" xml:space="preserve">
<value>Server Status</value> <value>Service Status</value>
</data> </data>
</root> </root>
+15 -3
View File
@@ -150,6 +150,18 @@
<data name="NavMyProjects" xml:space="preserve"> <data name="NavMyProjects" xml:space="preserve">
<value>Projelerim</value> <value>Projelerim</value>
</data> </data>
<data name="NavAffiliateLinks" xml:space="preserve">
<value>Çalışmamı Destekleyin</value>
</data>
<data name="AffiliateLinksTitle" xml:space="preserve">
<value>Çalışmamı Destekleyin</value>
</data>
<data name="AffiliateLinksIntro" xml:space="preserve">
<value>Çalışmalarımı desteklemek isterseniz aşağıdaki linkleri kullanabilirsiniz. Bu servisleri çalıştırmak ve sürdürmek benim için maliyetli, bu linkleri kullanmanız size ekstra bir maliyet çıkarmadan bana küçük bir fayda sağlayabilir.</value>
</data>
<data name="AffiliateLinksComingSoon" xml:space="preserve">
<value>Affiliate linkleri yakında burada listelenecek.</value>
</data>
<data name="DonateTY" xml:space="preserve"> <data name="DonateTY" xml:space="preserve">
<value>Teşekkür ederim</value> <value>Teşekkür ederim</value>
</data> </data>
@@ -171,13 +183,13 @@
<data name="About4" xml:space="preserve"> <data name="About4" xml:space="preserve">
<value>Fotoğrafçılık ise bir başka tutkum. Seyahat etmeyi ve 360° fotoğraflar çekmeyi seviyorum. Bu fotoğrafları Google Street Viewa yükleyerek dünyanın görülmeyen yerlerini görünür kılmayı hedefliyorum. Benim için bu, görsel bir vlog kanalı gibi.</value> <value>Fotoğrafçılık ise bir başka tutkum. Seyahat etmeyi ve 360° fotoğraflar çekmeyi seviyorum. Bu fotoğrafları Google Street Viewa yükleyerek dünyanın görülmeyen yerlerini görünür kılmayı hedefliyorum. Benim için bu, görsel bir vlog kanalı gibi.</value>
</data> </data>
<data name="GitHub" xml:space="preserve"> <data name="Gitea" xml:space="preserve">
<value>GitHub</value> <value>Gitea</value>
</data> </data>
<data name="MyProjectsP1_1" xml:space="preserve"> <data name="MyProjectsP1_1" xml:space="preserve">
<value>sayfamı ziyaret edebilirsiniz.</value> <value>sayfamı ziyaret edebilirsiniz.</value>
</data> </data>
<data name="Server" xml:space="preserve"> <data name="Server" xml:space="preserve">
<value>Sunucu Durumu</value> <value>Servis Durumu</value>
</data> </data>
</root> </root>
+9 -1
View File
@@ -13,10 +13,18 @@ namespace atakanozbancom
{ {
routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
// Keep old /affiliate URLs working
routes.MapRoute(
name: "AffiliateRedirect",
url: "affiliate/{action}/{id}",
defaults: new { controller = "support", action = "Index", id = UrlParameter.Optional },
new[] { "atakanozbancom.Controllers" }
);
routes.MapRoute( routes.MapRoute(
name: "Default", name: "Default",
url: "{controller}/{action}/{id}", url: "{controller}/{action}/{id}",
defaults: new { controller = "Main", action = "Index", id = UrlParameter.Optional }, defaults: new { controller = "main", action = "Index", id = UrlParameter.Optional },
new[] { "atakanozbancom.Controllers" } new[] { "atakanozbancom.Controllers" }
); );
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 854 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 986 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 722 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 526 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 MiB

+740 -129
View File
@@ -13,12 +13,22 @@ namespace atakanozbancom.Controllers
private readonly Context db = new Context(); private readonly Context db = new Context();
[Authorize] [Authorize]
public ActionResult Index() // shows what we have public ActionResult Index() // admin dashboard landing page
{
ViewBag.MyProjectsCount = db.MyProjects.Count();
ViewBag.AffiliateLinksCount = db.AffiliateLinks.Count();
ViewBag.SocialIconsCount = db.SocialIcons.Count();
return View();
}
[Authorize]
public ActionResult MyProjects() // shows what we have
{ {
var value = db.MyProjects.ToList(); var value = db.MyProjects.ToList();
return View(value); return View(value);
} }
[Authorize]
[HttpGet] [HttpGet]
public ActionResult myprojectsget(int id) public ActionResult myprojectsget(int id)
{ {
@@ -35,8 +45,6 @@ namespace atakanozbancom.Controllers
var vm = new AdminMyProjectsEditVM var vm = new AdminMyProjectsEditVM
{ {
id = p.id, id = p.id,
image = p.image,
iframe = p.iframe,
TitleEN = p.title, TitleEN = p.title,
DescEN = p.description, DescEN = p.description,
@@ -45,63 +53,39 @@ namespace atakanozbancom.Controllers
DescTR = tr != null ? tr.description : "" DescTR = tr != null ? tr.description : ""
}; };
// NEW:
vm.medias = db.projectmedia
.Where(m => m.project_id == p.id)
.OrderBy(m => m.sort_order)
.ThenBy(m => m.id)
.ToList();
return View("myprojectsget", vm); return View("myprojectsget", vm);
} }
[Authorize]
[HttpPost] [HttpPost]
[ValidateAntiForgeryToken] [ValidateAntiForgeryToken]
public ActionResult myprojectsget(AdminMyProjectsEditVM vm, HttpPostedFileBase file) public ActionResult myprojectsget(AdminMyProjectsEditVM vm)
{ {
if (!ModelState.IsValid) if (!ModelState.IsValid)
{
vm.medias = db.projectmedia
.Where(m => m.project_id == vm.id)
.OrderBy(m => m.sort_order)
.ThenBy(m => m.id)
.ToList();
return View("myprojectsget", vm); return View("myprojectsget", vm);
}
var p = db.MyProjects.FirstOrDefault(x => x.id == vm.id); var p = db.MyProjects.FirstOrDefault(x => x.id == vm.id);
if (p == null) return HttpNotFound(); if (p == null) return HttpNotFound();
var imageUrl = p.image;
if (file != null && file.ContentLength > 0)
{
try
{
var ext = Path.GetExtension(file.FileName).ToLowerInvariant();
var allowedExtensions = new[] { ".jpg", ".jpeg", ".png", ".webp" };
if (!allowedExtensions.Contains(ext))
{
ModelState.AddModelError("", "You can just upload these formats: '.jpg', '.jpeg', '.png', '.webp'");
return View("myprojectsget", vm);
}
var maxFileSize = 5 * 1024 * 1024;
if (file.ContentLength > maxFileSize)
{
ModelState.AddModelError("", "The size of file exceeds 5MB limit.");
return View("myprojectsget", vm);
}
var uploadsRoot = Server.MapPath("~/Content/uploads/projects");
if (!Directory.Exists(uploadsRoot))
Directory.CreateDirectory(uploadsRoot);
var fileName = Guid.NewGuid().ToString("N") + ext;
var filePath = Path.Combine(uploadsRoot, fileName);
file.SaveAs(filePath);
imageUrl = "/Content/uploads/projects/" + fileName;
}
catch (Exception ex)
{
ModelState.AddModelError("", "An error occured while upload: " + ex.Message);
return View("myprojectsget", vm);
}
}
// EN -> base // EN -> base
p.title = vm.TitleEN; p.title = vm.TitleEN;
p.description = vm.DescEN; p.description = vm.DescEN;
p.image = imageUrl;
p.iframe = vm.iframe;
// TR -> translations // TR -> translations
var tr = db.myprojectstranslations var tr = db.myprojectstranslations
@@ -121,76 +105,28 @@ namespace atakanozbancom.Controllers
return RedirectToAction("myprojectsget", new { id = p.id }); return RedirectToAction("myprojectsget", new { id = p.id });
} }
public ActionResult myprojectsupdate(myprojects x)
{
var ag = db.MyProjects.Find(x.id);
ag.description = x.description;
ag.title = x.title;
ag.image = x.image;
ag.iframe = x.iframe;
db.SaveChanges();
return RedirectToAction("Index");
}
[Authorize]
[HttpGet] [HttpGet]
public ActionResult newmppost() // newmppost = New My Projects Post public ActionResult newmppost() // newmppost = New My Projects Post
{ {
return View(new AdminMyProjectsEditVM()); return View(new AdminMyProjectsEditVM());
} }
[Authorize]
[HttpPost] [HttpPost]
[ValidateAntiForgeryToken] [ValidateAntiForgeryToken]
public ActionResult newmppost(AdminMyProjectsEditVM vm, HttpPostedFileBase file) public ActionResult newmppost(AdminMyProjectsEditVM vm)
{ {
if (!ModelState.IsValid) if (!ModelState.IsValid)
return View(vm); return View(vm);
string imageUrl = vm.image;
try
{
if (file != null && file.ContentLength > 0)
{
var ext = Path.GetExtension(file.FileName).ToLowerInvariant();
var allowedExtensions = new[] { ".jpg", ".jpeg", ".png", ".webp" };
if (!allowedExtensions.Contains(ext))
{
ModelState.AddModelError("", "You can just upload these formats: '.jpg', '.jpeg', '.png', '.webp'");
return View(vm);
}
var maxFileSize = 5 * 1024 * 1024;
if (file.ContentLength > maxFileSize)
{
ModelState.AddModelError("", "The size of file exceeds 5MB limit.");
return View(vm);
}
var uploadsRoot = Server.MapPath("~/Content/uploads/projects");
if (!Directory.Exists(uploadsRoot))
Directory.CreateDirectory(uploadsRoot);
var fileName = Guid.NewGuid().ToString("N") + ext;
var filePath = Path.Combine(uploadsRoot, fileName);
file.SaveAs(filePath);
imageUrl = "/Content/uploads/projects/" + fileName;
}
}
catch (Exception ex)
{
ModelState.AddModelError("", "An errror occured while upload: " + ex.Message);
return View(vm);
}
// EN -> base table // EN -> base table
var newProject = new myprojects var newProject = new myprojects
{ {
title = vm.TitleEN, title = vm.TitleEN,
description = vm.DescEN, description = vm.DescEN
image = imageUrl, // image/iframe artık yok
iframe = vm.iframe
}; };
db.MyProjects.Add(newProject); db.MyProjects.Add(newProject);
@@ -201,17 +137,21 @@ namespace atakanozbancom.Controllers
{ {
project_id = newProject.id, project_id = newProject.id,
culture = "tr", culture = "tr",
title = vm.TitleTR, title = vm.TitleTR ?? "",
description = vm.DescTR description = vm.DescTR ?? ""
}; };
db.myprojectstranslations.Add(tr); db.myprojectstranslations.Add(tr);
db.SaveChanges(); db.SaveChanges();
TempData["ok"] = "Project added successfully!"; TempData["ok"] = "Project added successfully!";
return RedirectToAction("Index"); return RedirectToAction("myprojectsget", new { id = newProject.id }); // direkt edit sayfasına at, media eklesin
} }
[Authorize]
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult myprojectsdelete(int id) public ActionResult myprojectsdelete(int id)
{ {
var mpd = db.MyProjects.Find(id); // mpd = my projects delete var mpd = db.MyProjects.Find(id); // mpd = my projects delete
@@ -220,42 +160,713 @@ namespace atakanozbancom.Controllers
db.MyProjects.Remove(mpd); db.MyProjects.Remove(mpd);
db.SaveChanges(); db.SaveChanges();
} }
return RedirectToAction("Index"); return RedirectToAction("MyProjects");
} }
//[HttpPost] [HttpPost]
//[ValidateAntiForgeryToken] [Authorize]
//public ActionResult EditProject(AdminMyProjectsEditVM vm) [ValidateAntiForgeryToken]
//{ public ActionResult addmedia(
// if (!ModelState.IsValid) int projectId,
// { int mediaType,
// return View("myprojectsget", vm); int sortOrder = 0,
// } string iframeUrl = null,
HttpPostedFileBase mediaFile = null)
{
var type = (MediaType)mediaType;
// var p = db.MyProjects.FirstOrDefault(x => x.id == vm.id); // 1) IFRAME -> URL
// if (p == null) return HttpNotFound(); if (type == MediaType.Iframe)
{
if (string.IsNullOrWhiteSpace(iframeUrl))
{
TempData["ok"] = "Iframe URL boş olamaz.";
return RedirectToAction("myprojectsget", new { id = projectId });
}
// p.image = vm.image; var trimmed = iframeUrl.Trim();
// p.iframe = vm.iframe; if (!Uri.TryCreate(trimmed, UriKind.Absolute, out var embedUri)
// p.title = vm.TitleEN; || (embedUri.Scheme != Uri.UriSchemeHttps && embedUri.Scheme != Uri.UriSchemeHttp))
// p.description = vm.DescEN; {
TempData["ok"] = "Iframe URL must be a valid http(s) address.";
return RedirectToAction("myprojectsget", new { id = projectId });
}
// var tr = db.myprojectstranslations var row = new projectmedia
// .FirstOrDefault(x => x.project_id == p.id && (x.culture == "tr" || x.culture == "tr-TR")); {
project_id = projectId,
media_type = MediaType.Iframe,
url = trimmed,
sort_order = sortOrder
};
// if (tr == null) db.projectmedia.Add(row);
// { db.SaveChanges();
// tr = new myprojectstranslation { project_id = p.id, culture = "tr" };
// db.myprojectstranslations.Add(tr);
// }
// tr.title = vm.TitleTR; TempData["ok"] = "Media eklendi!";
// tr.description = vm.DescTR; return RedirectToAction("myprojectsget", new { id = projectId });
}
// db.SaveChanges(); // 2) IMAGE/VIDEO/DOCUMENT -> FILE
if (mediaFile == null || mediaFile.ContentLength <= 0)
{
TempData["ok"] = "Dosya seçmelisin.";
return RedirectToAction("myprojectsget", new { id = projectId });
}
var ext = Path.GetExtension(mediaFile.FileName)?.ToLowerInvariant() ?? "";
// Tip bazlı uzantı whitelist
string[] allowed;
switch (type)
{
case MediaType.Image:
allowed = new[] { ".jpg", ".jpeg", ".png", ".webp", ".gif" };
break;
//case MediaType.Video:
// allowed = new[] { ".mp4", ".webm", ".mov" };
// break;
//case MediaType.Document:
// allowed = new[] { ".pdf" };
// break;
default:
TempData["ok"] = "Geçersiz media type.";
return RedirectToAction("myprojectsget", new { id = projectId });
}
if (!allowed.Contains(ext))
{
TempData["ok"] = "Bu dosya tipi kabul edilmiyor: " + ext;
return RedirectToAction("myprojectsget", new { id = projectId });
}
// Upload path
var uploadsRoot = Server.MapPath("~/Content/uploads/projects-media");
if (!Directory.Exists(uploadsRoot))
Directory.CreateDirectory(uploadsRoot);
var fileName = Guid.NewGuid().ToString("N") + ext;
var filePath = Path.Combine(uploadsRoot, fileName);
mediaFile.SaveAs(filePath);
var publicUrl = "/Content/uploads/projects-media/" + fileName;
var m = new projectmedia
{
project_id = projectId,
media_type = type,
url = publicUrl,
sort_order = sortOrder
};
db.projectmedia.Add(m);
db.SaveChanges();
TempData["ok"] = "Media eklendi!";
return RedirectToAction("myprojectsget", new { id = projectId });
}
[Authorize]
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult deletemedia(int id, int projectId)
{
var m = db.projectmedia.FirstOrDefault(x => x.id == id && x.project_id == projectId);
if (m == null)
return RedirectToAction("myprojectsget", new { id = projectId });
// Dosya silme: sadece Iframe dışındakiler + URL bizim uploads klasörümüzse
if (m.media_type != MediaType.Iframe && !string.IsNullOrWhiteSpace(m.url))
{
try
{
// Güvenlik: sadece bizim klasördeki dosyaları sil
var prefix = "/Content/uploads/projects-media/";
if (m.url.StartsWith(prefix, StringComparison.OrdinalIgnoreCase))
{
var relative = "~" + m.url; // ~/Content/uploads/...
var physicalPath = Server.MapPath(relative);
if (System.IO.File.Exists(physicalPath))
System.IO.File.Delete(physicalPath);
}
}
catch
{
// istersen log yazdırırız, şimdilik sessiz geçiyoruz
}
}
db.projectmedia.Remove(m);
db.SaveChanges();
TempData["ok"] = "Media silindi.";
return RedirectToAction("myprojectsget", new { id = projectId });
}
// ================= AFFILIATE LINKS =================
// .svg intentionally excluded: SVGs can embed <script> and execute when opened directly.
private static readonly string[] AllowedLogoExtensions = { ".jpg", ".jpeg", ".png", ".webp", ".gif" };
private const string AffiliateLogosPrefix = "/Content/uploads/affiliate-logos/";
[Authorize]
public ActionResult AffiliateLinks()
{
var value = db.AffiliateLinks
.OrderBy(x => x.sort_order)
.ThenBy(x => x.id)
.ToList();
return View(value);
}
[Authorize]
[HttpGet]
public ActionResult newaffiliatepost()
{
return View(new AdminAffiliateLinkVM());
}
[Authorize]
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult newaffiliatepost(AdminAffiliateLinkVM vm)
{
if (vm.logoFile == null || vm.logoFile.ContentLength <= 0)
{
ModelState.AddModelError("logoFile", "Logo image is required.");
}
if (!ModelState.IsValid)
return View(vm);
if (!IsSafeHttpUrl(vm.url))
{
ModelState.AddModelError("url", "URL must be a valid http(s) address.");
return View(vm);
}
var logoUrl = SaveAffiliateLogo(vm.logoFile);
if (logoUrl == null)
{
ModelState.AddModelError("logoFile", "This file type is not accepted.");
return View(vm);
}
var link = new affiliatelink
{
title = vm.TitleEN,
description = vm.DescEN,
url = vm.url,
sort_order = vm.sort_order,
image = logoUrl
};
db.AffiliateLinks.Add(link);
db.SaveChanges();
var tr = new affiliatelinktranslation
{
affiliatelink_id = link.id,
culture = "tr",
title = vm.TitleTR ?? "",
description = vm.DescTR ?? ""
};
db.affiliatelinktranslations.Add(tr);
db.SaveChanges();
TempData["ok"] = "Affiliate link added successfully!";
return RedirectToAction("AffiliateLinks");
}
[Authorize]
[HttpGet]
public ActionResult affiliatelinkget(int id)
{
var a = db.AffiliateLinks
.Include(x => x.Translations)
.FirstOrDefault(x => x.id == id);
if (a == null) return HttpNotFound();
var tr = a.Translations?.FirstOrDefault(t => t.culture == "tr" || t.culture == "tr-TR");
var vm = new AdminAffiliateLinkVM
{
id = a.id,
TitleEN = a.title,
DescEN = a.description,
TitleTR = tr != null ? tr.title : "",
DescTR = tr != null ? tr.description : "",
url = a.url,
sort_order = a.sort_order,
existingImage = a.image
};
return View(vm);
}
[Authorize]
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult affiliatelinkget(AdminAffiliateLinkVM vm)
{
var a = db.AffiliateLinks.Find(vm.id);
if (a == null) return HttpNotFound();
if (!ModelState.IsValid)
{
vm.existingImage = a.image;
return View(vm);
}
if (!IsSafeHttpUrl(vm.url))
{
ModelState.AddModelError("url", "URL must be a valid http(s) address.");
vm.existingImage = a.image;
return View(vm);
}
if (vm.logoFile != null && vm.logoFile.ContentLength > 0)
{
var logoUrl = SaveAffiliateLogo(vm.logoFile);
if (logoUrl == null)
{
ModelState.AddModelError("logoFile", "This file type is not accepted.");
vm.existingImage = a.image;
return View(vm);
}
DeleteAffiliateLogo(a.image);
a.image = logoUrl;
}
a.title = vm.TitleEN;
a.description = vm.DescEN;
a.url = vm.url;
a.sort_order = vm.sort_order;
var tr = db.affiliatelinktranslations
.FirstOrDefault(x => x.affiliatelink_id == a.id && (x.culture == "tr" || x.culture == "tr-TR"));
if (tr == null)
{
tr = new affiliatelinktranslation { affiliatelink_id = a.id, culture = "tr" };
db.affiliatelinktranslations.Add(tr);
}
tr.title = vm.TitleTR;
tr.description = vm.DescTR;
db.SaveChanges();
TempData["ok"] = "Affiliate link updated successfully!";
return RedirectToAction("affiliatelinkget", new { id = a.id });
}
[Authorize]
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult affiliatelinkdelete(int id)
{
var a = db.AffiliateLinks.Find(id);
if (a != null)
{
var translations = db.affiliatelinktranslations.Where(x => x.affiliatelink_id == id);
db.affiliatelinktranslations.RemoveRange(translations);
DeleteAffiliateLogo(a.image);
db.AffiliateLinks.Remove(a);
db.SaveChanges();
}
return RedirectToAction("AffiliateLinks");
}
private string SaveAffiliateLogo(HttpPostedFileBase file)
{
var ext = Path.GetExtension(file.FileName)?.ToLowerInvariant() ?? "";
if (!AllowedLogoExtensions.Contains(ext))
return null;
var uploadsRoot = Server.MapPath("~/Content/uploads/affiliate-logos");
if (!Directory.Exists(uploadsRoot))
Directory.CreateDirectory(uploadsRoot);
var fileName = Guid.NewGuid().ToString("N") + ext;
var filePath = Path.Combine(uploadsRoot, fileName);
file.SaveAs(filePath);
return AffiliateLogosPrefix + fileName;
}
private void DeleteAffiliateLogo(string publicUrl)
{
if (string.IsNullOrWhiteSpace(publicUrl)) return;
if (!publicUrl.StartsWith(AffiliateLogosPrefix, StringComparison.OrdinalIgnoreCase)) return;
try
{
var physicalPath = Server.MapPath("~" + publicUrl);
if (System.IO.File.Exists(physicalPath))
System.IO.File.Delete(physicalPath);
}
catch
{
// silently ignore, matches existing media-delete behavior
}
}
// ================= SOCIAL ICONS (footer) =================
[Authorize]
public ActionResult SocialIcons()
{
var value = db.SocialIcons
.OrderBy(x => x.sort_order)
.ThenBy(x => x.id)
.ToList();
return View(value);
}
[Authorize]
[HttpGet]
public ActionResult newsocialicon()
{
return View(new AdminSocialIconVM());
}
[Authorize]
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult newsocialicon(AdminSocialIconVM vm)
{
if (!ModelState.IsValid)
return View(vm);
if (!IsSafeHttpUrl(vm.url))
{
ModelState.AddModelError("url", "URL must be a valid http(s) address.");
return View(vm);
}
var icon = new socialicon
{
icon = vm.icon,
url = vm.url,
sort_order = vm.sort_order
};
db.SocialIcons.Add(icon);
db.SaveChanges();
TempData["ok"] = "Social icon added successfully!";
return RedirectToAction("SocialIcons");
}
[Authorize]
[HttpGet]
public ActionResult socialiconget(int id)
{
var s = db.SocialIcons.Find(id);
if (s == null) return HttpNotFound();
var vm = new AdminSocialIconVM
{
id = s.id,
icon = s.icon,
url = s.url,
sort_order = s.sort_order
};
return View(vm);
}
[Authorize]
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult socialiconget(AdminSocialIconVM vm)
{
var s = db.SocialIcons.Find(vm.id);
if (s == null) return HttpNotFound();
if (!ModelState.IsValid)
return View(vm);
if (!IsSafeHttpUrl(vm.url))
{
ModelState.AddModelError("url", "URL must be a valid http(s) address.");
return View(vm);
}
s.icon = vm.icon;
s.url = vm.url;
s.sort_order = vm.sort_order;
db.SaveChanges();
TempData["ok"] = "Social icon updated successfully!";
return RedirectToAction("socialiconget", new { id = s.id });
}
[Authorize]
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult socialicondelete(int id)
{
var s = db.SocialIcons.Find(id);
if (s != null)
{
db.SocialIcons.Remove(s);
db.SaveChanges();
}
return RedirectToAction("SocialIcons");
}
// ================= WALLPAPER (site background) =================
private static readonly string[] AllowedWallpaperExtensions = { ".jpg", ".jpeg", ".png", ".webp", ".gif" };
private const string WallpaperPrefix = "/Content/uploads/wallpaper/";
private const string DefaultWallpaperUrl = "/web_atakanozbancom/assets/img/wp.jpg";
[Authorize]
[HttpGet]
public ActionResult Wallpaper()
{
var setting = db.SiteSettings.FirstOrDefault();
ViewBag.CurrentWallpaper = !string.IsNullOrWhiteSpace(setting?.wallpaper) ? setting.wallpaper : DefaultWallpaperUrl;
return View();
}
[Authorize]
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Wallpaper(HttpPostedFileBase wallpaperFile)
{
if (wallpaperFile == null || wallpaperFile.ContentLength <= 0)
{
TempData["ok"] = "Please choose an image.";
return RedirectToAction("Wallpaper");
}
var ext = Path.GetExtension(wallpaperFile.FileName)?.ToLowerInvariant() ?? "";
if (!AllowedWallpaperExtensions.Contains(ext))
{
TempData["ok"] = "This file type is not accepted.";
return RedirectToAction("Wallpaper");
}
var uploadsRoot = Server.MapPath("~/Content/uploads/wallpaper");
if (!Directory.Exists(uploadsRoot))
Directory.CreateDirectory(uploadsRoot);
var fileName = Guid.NewGuid().ToString("N") + ext;
var filePath = Path.Combine(uploadsRoot, fileName);
wallpaperFile.SaveAs(filePath);
var publicUrl = WallpaperPrefix + fileName;
var setting = db.SiteSettings.FirstOrDefault();
if (setting == null)
{
setting = new sitesetting();
db.SiteSettings.Add(setting);
}
else
{
DeleteWallpaperFile(setting.wallpaper);
}
setting.wallpaper = publicUrl;
db.SaveChanges();
TempData["ok"] = "Wallpaper updated successfully!";
return RedirectToAction("Wallpaper");
}
[Authorize]
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult WallpaperReset()
{
var setting = db.SiteSettings.FirstOrDefault();
if (setting != null && !string.IsNullOrWhiteSpace(setting.wallpaper))
{
DeleteWallpaperFile(setting.wallpaper);
setting.wallpaper = null;
db.SaveChanges();
}
TempData["ok"] = "Wallpaper reset to default.";
return RedirectToAction("Wallpaper");
}
private void DeleteWallpaperFile(string publicUrl)
{
if (string.IsNullOrWhiteSpace(publicUrl)) return;
if (!publicUrl.StartsWith(WallpaperPrefix, StringComparison.OrdinalIgnoreCase)) return;
try
{
var physicalPath = Server.MapPath("~" + publicUrl);
if (System.IO.File.Exists(physicalPath))
System.IO.File.Delete(physicalPath);
}
catch
{
}
}
[Authorize]
public ActionResult UserSettings()
{
var user = GetCurrentAdmin();
if (user == null)
return RedirectToAction("Index", "login");
ViewBag.TwoFactorEnabled = user.two_factor_enabled;
ViewBag.Username = user.username;
if (!user.two_factor_enabled)
{
var secret = Session["Pending2FaSetupSecret"] as string;
if (string.IsNullOrWhiteSpace(secret))
{
secret = TotpHelper.GenerateSecret();
Session["Pending2FaSetupSecret"] = secret;
}
ViewBag.SetupSecret = secret;
ViewBag.OtpAuthUri = TotpHelper.BuildOtpAuthUri("atakanozban.com", user.username, secret);
}
return View();
}
[Authorize]
public ActionResult Security()
{
return RedirectToAction("UserSettings");
}
[Authorize]
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult ChangePassword(string currentPassword, string newPassword, string confirmPassword)
{
var user = GetCurrentAdmin();
if (user == null)
return RedirectToAction("Index", "login");
if (string.IsNullOrWhiteSpace(currentPassword)
|| string.IsNullOrWhiteSpace(newPassword)
|| string.IsNullOrWhiteSpace(confirmPassword))
{
TempData["pwdError"] = "All password fields are required.";
return RedirectToAction("UserSettings");
}
if (!PasswordHasher.Verify(currentPassword, user.password))
{
TempData["pwdError"] = "Current password is incorrect.";
return RedirectToAction("UserSettings");
}
if (newPassword.Length < 8)
{
TempData["pwdError"] = "New password must be at least 8 characters.";
return RedirectToAction("UserSettings");
}
if (!string.Equals(newPassword, confirmPassword, StringComparison.Ordinal))
{
TempData["pwdError"] = "New password and confirmation do not match.";
return RedirectToAction("UserSettings");
}
user.password = PasswordHasher.Hash(newPassword);
db.SaveChanges();
TempData["pwdOk"] = "Password updated successfully.";
return RedirectToAction("UserSettings");
}
[Authorize]
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult EnableTwoFactor(string code)
{
var user = GetCurrentAdmin();
if (user == null)
return RedirectToAction("Index", "login");
var secret = Session["Pending2FaSetupSecret"] as string;
if (string.IsNullOrWhiteSpace(secret))
{
TempData["tfaError"] = "Setup expired. Please try again.";
return RedirectToAction("UserSettings");
}
if (!TotpHelper.VerifyCode(secret, code))
{
TempData["tfaError"] = "Invalid code. Scan the QR again and enter a fresh code.";
return RedirectToAction("UserSettings");
}
user.two_factor_secret = SecretProtector.Protect(secret);
user.two_factor_enabled = true;
db.SaveChanges();
Session.Remove("Pending2FaSetupSecret");
TempData["tfaOk"] = "Two-factor authentication is now enabled.";
return RedirectToAction("UserSettings");
}
[Authorize]
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult DisableTwoFactor(string code)
{
var user = GetCurrentAdmin();
if (user == null)
return RedirectToAction("Index", "login");
if (!user.two_factor_enabled || string.IsNullOrWhiteSpace(user.two_factor_secret))
{
TempData["tfaError"] = "Two-factor authentication is not enabled.";
return RedirectToAction("UserSettings");
}
var secret = SecretProtector.Unprotect(user.two_factor_secret) ?? user.two_factor_secret;
if (!TotpHelper.VerifyCode(secret, code))
{
TempData["tfaError"] = "Invalid code. 2FA was not disabled.";
return RedirectToAction("UserSettings");
}
user.two_factor_enabled = false;
user.two_factor_secret = null;
db.SaveChanges();
Session.Remove("Pending2FaSetupSecret");
TempData["tfaOk"] = "Two-factor authentication has been disabled.";
return RedirectToAction("UserSettings");
}
private admin GetCurrentAdmin()
{
var username = User?.Identity?.Name;
if (string.IsNullOrWhiteSpace(username))
return null;
return db.admins.FirstOrDefault(x => x.username == username);
}
private static bool IsSafeHttpUrl(string url)
{
if (string.IsNullOrWhiteSpace(url))
return false;
return Uri.TryCreate(url.Trim(), UriKind.Absolute, out var uri)
&& (uri.Scheme == Uri.UriSchemeHttps || uri.Scheme == Uri.UriSchemeHttp);
}
// TempData["ok"] = "Project updated.";
// return RedirectToAction("myprojectsget", new { id = p.id });
//}
} }
} }
+167 -12
View File
@@ -1,7 +1,5 @@
using System; using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Web;
using System.Web.Mvc; using System.Web.Mvc;
using System.Web.Security; using System.Web.Security;
using atakanozbancom.Models.classes; using atakanozbancom.Models.classes;
@@ -10,33 +8,190 @@ namespace atakanozbancom.Controllers
{ {
public class loginController : Controller public class loginController : Controller
{ {
// GET: Login private readonly Context c = new Context();
Context c = new Context(); private const int MaxPasswordFailures = 8;
private const int MaxTotpFailures = 5;
private const int LockMinutes = 15;
public ActionResult Index() public ActionResult Index()
{ {
return View(); return View();
} }
[HttpPost] [HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Index(admin ad) public ActionResult Index(admin ad)
{ {
var bilgiler = c.admins.FirstOrDefault(x => x.username == ad.username && x.password == ad.password); if (ad == null || string.IsNullOrWhiteSpace(ad.username) || string.IsNullOrWhiteSpace(ad.password))
if (bilgiler != null)
{
FormsAuthentication.SetAuthCookie(bilgiler.username, false);
Session["username"] = bilgiler.username.ToString();
return RedirectToAction("Index", "admin");
}
else
{ {
ViewBag.Error = "Username and password are required.";
return View(); return View();
} }
var user = c.admins.FirstOrDefault(x => x.username == ad.username);
if (user == null)
{
ViewBag.Error = "Invalid username or password.";
return View();
}
if (user.login_lock_until.HasValue && user.login_lock_until.Value > DateTime.UtcNow)
{
ViewBag.Error = "Account temporarily locked. Try again later.";
return View();
}
if (!PasswordHasher.Verify(ad.password, user.password))
{
user.login_failed_count++;
if (user.login_failed_count >= MaxPasswordFailures)
{
user.login_lock_until = DateTime.UtcNow.AddMinutes(LockMinutes);
user.login_failed_count = 0;
}
c.SaveChanges();
ViewBag.Error = "Invalid username or password.";
return View();
}
user.login_failed_count = 0;
user.login_lock_until = null;
if (!PasswordHasher.IsHashed(user.password))
{
user.password = PasswordHasher.Hash(ad.password);
}
c.SaveChanges();
ClearPending2Fa();
if (user.two_factor_enabled && !string.IsNullOrWhiteSpace(user.two_factor_secret))
{
if (user.totp_lock_until.HasValue && user.totp_lock_until.Value > DateTime.UtcNow)
{
ViewBag.Error = "Too many failed 2FA attempts. Try again later.";
return View();
}
Session["Pending2FaUserId"] = user.id;
Session["Pending2FaUsername"] = user.username;
Session["Pending2FaExpiresUtc"] = DateTime.UtcNow.AddMinutes(10);
return RedirectToAction("Verify");
}
CompleteLogin(user.username);
return RedirectToAction("Index", "admin");
}
public ActionResult Verify()
{
if (!HasValidPending2Fa())
{
ClearPending2Fa();
return RedirectToAction("Index");
}
return View();
}
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Verify(string code)
{
if (!HasValidPending2Fa())
{
ClearPending2Fa();
return RedirectToAction("Index");
}
var pendingId = Convert.ToInt32(Session["Pending2FaUserId"]);
var pendingUsername = Session["Pending2FaUsername"].ToString();
var user = c.admins.FirstOrDefault(x => x.id == pendingId && x.username == pendingUsername);
if (user == null || !user.two_factor_enabled || string.IsNullOrWhiteSpace(user.two_factor_secret))
{
ClearPending2Fa();
return RedirectToAction("Index");
}
if (user.totp_lock_until.HasValue && user.totp_lock_until.Value > DateTime.UtcNow)
{
ViewBag.Error = "Too many failed attempts. Try again later.";
return View();
}
var secret = ResolveTotpSecret(user);
if (string.IsNullOrWhiteSpace(secret) || !TotpHelper.VerifyCode(secret, code))
{
user.totp_failed_count++;
if (user.totp_failed_count >= MaxTotpFailures)
{
user.totp_lock_until = DateTime.UtcNow.AddMinutes(LockMinutes);
user.totp_failed_count = 0;
ViewBag.Error = "Too many failed attempts. Try again later.";
}
else
{
ViewBag.Error = "Invalid authentication code.";
}
c.SaveChanges();
return View();
}
user.totp_failed_count = 0;
user.totp_lock_until = null;
c.SaveChanges();
ClearPending2Fa();
CompleteLogin(user.username);
return RedirectToAction("Index", "admin");
} }
public ActionResult logout() public ActionResult logout()
{ {
ClearPending2Fa();
Session.Remove("username");
Session.Abandon();
FormsAuthentication.SignOut(); FormsAuthentication.SignOut();
return RedirectToAction("index", "login"); return RedirectToAction("index", "login");
} }
private void CompleteLogin(string username)
{
FormsAuthentication.SetAuthCookie(username, false);
Session["username"] = username;
}
private bool HasValidPending2Fa()
{
if (Session["Pending2FaUserId"] == null || Session["Pending2FaUsername"] == null)
return false;
var expires = Session["Pending2FaExpiresUtc"] as DateTime?;
if (expires == null || expires.Value < DateTime.UtcNow)
return false;
return true;
}
private static string ResolveTotpSecret(admin user)
{
if (string.IsNullOrWhiteSpace(user.two_factor_secret))
return null;
var unprotected = SecretProtector.Unprotect(user.two_factor_secret);
if (!string.IsNullOrWhiteSpace(unprotected))
return unprotected;
return user.two_factor_secret;
}
private void ClearPending2Fa()
{
Session.Remove("Pending2FaUserId");
Session.Remove("Pending2FaUsername");
Session.Remove("Pending2FaSetupSecret");
Session.Remove("Pending2FaExpiresUtc");
}
} }
} }
+25 -1
View File
@@ -1,16 +1,40 @@
using System.Web.Mvc; using System.Linq;
using System.Web.Mvc;
using atakanozbancom; using atakanozbancom;
using atakanozbancom.Models.classes;
namespace atakanozbancom.Controllers namespace atakanozbancom.Controllers
{ {
public class MainController : languageController public class MainController : languageController
{ {
private readonly Context db = new Context();
[HttpGet] [HttpGet]
public ActionResult Index() public ActionResult Index()
{ {
return View(); return View();
} }
public PartialViewResult socialicons()
{
var icons = db.SocialIcons
.OrderBy(x => x.sort_order)
.ThenBy(x => x.id)
.ToList();
return PartialView(icons);
}
public PartialViewResult wallpaper()
{
var setting = db.SiteSettings.FirstOrDefault();
ViewBag.WallpaperUrl = !string.IsNullOrWhiteSpace(setting?.wallpaper)
? setting.wallpaper
: "/web_atakanozbancom/assets/img/wp.jpg";
return PartialView();
}
[HttpGet] [HttpGet]
public ActionResult ChangeLanguage(string lang, string returnUrl) public ActionResult ChangeLanguage(string lang, string returnUrl)
{ {
+64 -48
View File
@@ -17,64 +17,80 @@ namespace atakanozbancom.Controllers
public PartialViewResult projectposts() public PartialViewResult projectposts()
{ {
var cultureFull = System.Threading.Thread.CurrentThread.CurrentUICulture.Name; var cultureFull = Thread.CurrentThread.CurrentUICulture.Name;
var cultureShort = System.Threading.Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName; var cultureShort = Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName;
var isEnglish = cultureShort == "en"; var isEnglish = cultureShort == "en";
var model = c.MyProjects var projects = c.MyProjects
.Include(p => p.Translations) .Include(p => p.Translations)
.Select(p => new MyProjectsVM .ToList();
var ids = projects.Select(p => p.id).ToList();
var medias = c.projectmedia
.Where(m => ids.Contains(m.project_id))
.OrderBy(m => m.sort_order)
.ThenBy(m => m.id)
.ToList();
var mediaLookup = medias
.GroupBy(m => m.project_id)
.ToDictionary(g => g.Key, g => g.ToList());
var model = projects.Select(p =>
{
var title = !isEnglish
? p.Translations
.Where(t => t.culture == cultureFull || t.culture == cultureShort)
.Select(t => t.title)
.FirstOrDefault() ?? p.title
: p.title;
var description = !isEnglish
? p.Translations
.Where(t => t.culture == cultureFull || t.culture == cultureShort)
.Select(t => t.description)
.FirstOrDefault() ?? p.description
: p.description;
var vm = new MyProjectsVM
{ {
id = p.id, id = p.id,
title = title,
description = description,
image = p.image, image = p.image,
iframe = p.iframe, iframe = p.iframe
};
title = !isEnglish // NEW MEDIA TABLE
? p.Translations if (mediaLookup.TryGetValue(p.id, out var list))
.Where(t => t.culture == cultureFull || t.culture == cultureShort) {
.Select(t => t.title) vm.medias = list.Select(m => new ProjectMediaVM
.FirstOrDefault() {
?? p.title url = m.url,
: p.title, order = m.sort_order,
type =
m.media_type == MediaType.Image ? "image" :
m.media_type == MediaType.Iframe ? "iframe" :
// m.media_type == MediaType.Video ? "video" :
"document"
}).ToList();
}
description = !isEnglish // fallback legacy
? p.Translations if (vm.medias == null || vm.medias.Count == 0)
.Where(t => t.culture == cultureFull || t.culture == cultureShort) {
.Select(t => t.description) if (!string.IsNullOrWhiteSpace(p.iframe))
.FirstOrDefault() vm.medias.Add(new ProjectMediaVM { type = "iframe", url = p.iframe, order = 0 });
?? p.description
: p.description if (!string.IsNullOrWhiteSpace(p.image))
}) vm.medias.Add(new ProjectMediaVM { type = "image", url = p.image, order = 1 });
.ToList(); }
return vm;
}).ToList();
return PartialView(model); return PartialView(model);
} }
[HttpGet]
public ActionResult myprojectsget(int id)
{
var p = c.MyProjects
.Include(x => x.Translations)
.FirstOrDefault(x => x.id == id);
if (p == null) return HttpNotFound();
var tr = p.Translations?.FirstOrDefault(t => t.culture == "tr" || t.culture == "tr-TR");
var vm = new AdminMyProjectsEditVM
{
id = p.id,
image = p.image,
iframe = p.iframe,
TitleEN = p.title,
DescEN = p.description,
TitleTR = tr?.title ?? "",
DescTR = tr?.description ?? ""
};
return View("~/Views/admin/myprojectsget.cshtml", vm);
}
} }
} }
+68
View File
@@ -0,0 +1,68 @@
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Threading;
using System.Web;
using System.Web.Mvc;
using atakanozbancom;
using atakanozbancom.Models.classes;
namespace atakanozbancom.Controllers
{
public class SupportController : Controller
{
private readonly Context db = new Context();
// GET: /Support
[HttpGet]
public ActionResult Index()
{
var cultureFull = Thread.CurrentThread.CurrentUICulture.Name;
var cultureShort = Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName;
var isEnglish = cultureShort == "en";
var links = db.AffiliateLinks
.Include(x => x.Translations)
.OrderBy(x => x.sort_order)
.ThenBy(x => x.id)
.ToList();
var model = links.Select(a =>
{
var title = !isEnglish
? a.Translations
.Where(t => t.culture == cultureFull || t.culture == cultureShort)
.Select(t => t.title)
.FirstOrDefault() ?? a.title
: a.title;
var description = !isEnglish
? a.Translations
.Where(t => t.culture == cultureFull || t.culture == cultureShort)
.Select(t => t.description)
.FirstOrDefault() ?? a.description
: a.description;
return new AffiliateLinkVM
{
id = a.id,
title = title,
description = description,
url = a.url,
image = a.image
};
}).ToList();
return View(model);
}
// POST: /Support/ChangeLanguage
[HttpPost]
public ActionResult ChangeLanguage(string lang)
{
new LanguageTR().SetLanguage(lang);
return RedirectToAction("Index");
}
}
}
+41
View File
@@ -0,0 +1,41 @@
using System.ComponentModel.DataAnnotations;
using System.Web;
namespace atakanozbancom.Models.classes
{
public class AdminAffiliateLinkVM
{
public int id { get; set; }
[Display(Name = "Title (EN)")]
[Required(ErrorMessage = "Title is required.")]
[StringLength(200)]
public string TitleEN { get; set; }
[Display(Name = "Description (EN)")]
[StringLength(500)]
public string DescEN { get; set; }
[Display(Name = "Title (TR)")]
[StringLength(200)]
public string TitleTR { get; set; }
[Display(Name = "Description (TR)")]
[StringLength(500)]
public string DescTR { get; set; }
[Display(Name = "URL")]
[Required(ErrorMessage = "URL is required.")]
[StringLength(1000)]
public string url { get; set; }
[Display(Name = "Sort Order")]
public int sort_order { get; set; }
// Path of the already-uploaded logo (used when editing)
public string existingImage { get; set; }
// New logo file (required on create, optional on edit to replace it)
public HttpPostedFileBase logoFile { get; set; }
}
}
+8 -8
View File
@@ -1,16 +1,16 @@
namespace atakanozbancom.Models.classes using System.Collections.Generic;
namespace atakanozbancom.Models.classes
{ {
public class AdminMyProjectsEditVM public class AdminMyProjectsEditVM
{ {
public int id { get; set; } public int id { get; set; }
public string image { get; set; }
public string iframe { get; set; }
public string title { get; set; }
public string description { get; set; }
public string TitleEN { get; set; }
public string DescEN { get; set; }
public string TitleTR { get; set; } public string TitleTR { get; set; }
public string TitleEN { get; set; }
public string DescTR { get; set; } public string DescTR { get; set; }
public string DescEN { get; set; }
// NEW:
public List<projectmedia> medias { get; set; } = new List<projectmedia>();
} }
} }
+22
View File
@@ -0,0 +1,22 @@
using System.ComponentModel.DataAnnotations;
namespace atakanozbancom.Models.classes
{
public class AdminSocialIconVM
{
public int id { get; set; }
[Display(Name = "Icon (Font Awesome class)")]
[Required(ErrorMessage = "Icon class is required.")]
[StringLength(100)]
public string icon { get; set; }
[Display(Name = "URL")]
[Required(ErrorMessage = "URL is required.")]
[StringLength(500)]
public string url { get; set; }
[Display(Name = "Sort Order")]
public int sort_order { get; set; }
}
}
+11
View File
@@ -0,0 +1,11 @@
namespace atakanozbancom.Models.classes
{
public class AffiliateLinkVM
{
public int id { get; set; }
public string title { get; set; }
public string description { get; set; }
public string url { get; set; }
public string image { get; set; }
}
}
+5 -1
View File
@@ -13,7 +13,11 @@ namespace atakanozbancom.Models.classes
public DbSet<admin> admins { get; set; } public DbSet<admin> admins { get; set; }
public DbSet<myprojects> MyProjects { get; set; } public DbSet<myprojects> MyProjects { get; set; }
public DbSet<myprojectstranslation> myprojectstranslations { get; set; } public DbSet<myprojectstranslation> myprojectstranslations { get; set; }
public DbSet<projectmedia> projectmedias { get; set; } public DbSet<projectmedia> projectmedia { get; set; }
public DbSet<affiliatelink> AffiliateLinks { get; set; }
public DbSet<affiliatelinktranslation> affiliatelinktranslations { get; set; }
public DbSet<socialicon> SocialIcons { get; set; }
public DbSet<sitesetting> SiteSettings { get; set; }
} }
} }
+47
View File
@@ -0,0 +1,47 @@
using System.Text.RegularExpressions;
using System.Web;
namespace atakanozbancom.Models.classes
{
/// <summary>
/// Renders user-entered project/affiliate descriptions as safe HTML.
/// The whole input is HTML-encoded first (so no raw tags/scripts can ever
/// survive), then a very small Markdown-style link syntax is turned into
/// real anchor tags: [Link text](https://example.com)
/// Only http:// and https:// URLs are accepted; anything else is left as
/// plain (encoded) text.
/// </summary>
public static class DescriptionFormatter
{
// [label](https://url) - label can't contain "]", url must be http(s) and can't contain whitespace or ")"
private static readonly Regex LinkPattern = new Regex(
@"\[([^\]\r\n]{1,200})\]\((https?://[^\s)]{1,2000})\)",
RegexOptions.Compiled | RegexOptions.IgnoreCase);
public static string ToSafeHtml(string raw)
{
if (string.IsNullOrWhiteSpace(raw))
return string.Empty;
// 1) Neutralize everything (script/tags/attributes) up front.
var encoded = HttpUtility.HtmlEncode(raw);
// 2) Re-introduce ONLY safe <a> links for the [text](url) syntax.
// Both groups are already HTML-encoded, so this can't break out
// of the href attribute or inject new tags/attributes.
var withLinks = LinkPattern.Replace(encoded, m =>
{
var label = m.Groups[1].Value;
var url = m.Groups[2].Value;
return $"<a href=\"{url}\" class=\"text-secondary text-decoration-none\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">{label}</a>";
});
// 3) Preserve line breaks the admin typed in the textarea.
var withBreaks = withLinks
.Replace("\r\n", "\n")
.Replace("\n", "<br />");
return withBreaks;
}
}
}
+16 -1
View File
@@ -1,12 +1,27 @@
namespace atakanozbancom.Models.classes using System.Collections.Generic;
using System.Web.Mvc;
namespace atakanozbancom.Models.classes
{ {
public class MyProjectsVM public class MyProjectsVM
{ {
public int id { get; set; } public int id { get; set; }
public string title { get; set; } public string title { get; set; }
[AllowHtml]
public string description { get; set; } public string description { get; set; }
// legacy (şimdilik kalsın)
public string image { get; set; } public string image { get; set; }
public string iframe { get; set; } public string iframe { get; set; }
// NEW
public List<ProjectMediaVM> medias { get; set; } = new List<ProjectMediaVM>();
}
public class ProjectMediaVM
{
public string type { get; set; }
public string url { get; set; }
public int order { get; set; }
} }
} }
+104
View File
@@ -0,0 +1,104 @@
using System;
using System.Security.Cryptography;
using System.Text;
namespace atakanozbancom.Models.classes
{
public static class PasswordHasher
{
private const string Prefix = "pbkdf2";
private const int DefaultIterations = 100000;
private const int SaltSize = 16;
private const int HashSize = 32;
public static string Hash(string password)
{
if (password == null)
throw new ArgumentNullException("password");
var salt = new byte[SaltSize];
using (var rng = RandomNumberGenerator.Create())
{
rng.GetBytes(salt);
}
var hash = Pbkdf2(password, salt, DefaultIterations, HashSize);
return string.Format(
"{0}${1}${2}${3}",
Prefix,
DefaultIterations,
Convert.ToBase64String(salt),
Convert.ToBase64String(hash));
}
public static bool IsHashed(string stored)
{
return !string.IsNullOrWhiteSpace(stored)
&& stored.StartsWith(Prefix + "$", StringComparison.Ordinal);
}
public static bool Verify(string password, string stored)
{
if (string.IsNullOrEmpty(password) || string.IsNullOrEmpty(stored))
return false;
if (!IsHashed(stored))
return FixedTimeEquals(password, stored);
var parts = stored.Split('$');
if (parts.Length != 4 || !string.Equals(parts[0], Prefix, StringComparison.Ordinal))
return false;
int iterations;
if (!int.TryParse(parts[1], out iterations) || iterations < 1000)
return false;
byte[] salt;
byte[] expected;
try
{
salt = Convert.FromBase64String(parts[2]);
expected = Convert.FromBase64String(parts[3]);
}
catch
{
return false;
}
var actual = Pbkdf2(password, salt, iterations, expected.Length);
return FixedTimeEquals(actual, expected);
}
private static byte[] Pbkdf2(string password, byte[] salt, int iterations, int length)
{
using (var derive = new Rfc2898DeriveBytes(password, salt, iterations, HashAlgorithmName.SHA256))
{
return derive.GetBytes(length);
}
}
private static bool FixedTimeEquals(byte[] a, byte[] b)
{
if (a == null || b == null || a.Length != b.Length)
return false;
var diff = 0;
for (var i = 0; i < a.Length; i++)
diff |= a[i] ^ b[i];
return diff == 0;
}
private static bool FixedTimeEquals(string a, string b)
{
if (a == null || b == null || a.Length != b.Length)
return false;
var diff = 0;
for (var i = 0; i < a.Length; i++)
diff |= a[i] ^ b[i];
return diff == 0;
}
}
}
-15
View File
@@ -1,15 +0,0 @@
namespace atakanozbancom.Models.classes
{
public class ProjectMediaVM
{
public int id { get; set; }
public int projectid { get; set; }
public string mediatype { get; set; } // "image" or "iframe"
public string mediaurl { get; set; }
public int sortorder { get; set; }
}
}
+54
View File
@@ -0,0 +1,54 @@
using System;
using System.Text;
using System.Web.Security;
namespace atakanozbancom.Models.classes
{
public static class SecretProtector
{
private static readonly string[] Purposes = { "atakanozbancom.TotpSecret.v1" };
public static string Protect(string plaintext)
{
if (string.IsNullOrEmpty(plaintext))
return plaintext;
var bytes = Encoding.UTF8.GetBytes(plaintext);
var protectedBytes = MachineKey.Protect(bytes, Purposes);
return Convert.ToBase64String(protectedBytes);
}
public static string Unprotect(string protectedValue)
{
if (string.IsNullOrEmpty(protectedValue))
return protectedValue;
try
{
var protectedBytes = Convert.FromBase64String(protectedValue);
var bytes = MachineKey.Unprotect(protectedBytes, Purposes);
return bytes == null ? null : Encoding.UTF8.GetString(bytes);
}
catch
{
return null;
}
}
public static bool LooksProtected(string value)
{
if (string.IsNullOrWhiteSpace(value))
return false;
try
{
var bytes = Convert.FromBase64String(value);
return bytes.Length > 16;
}
catch
{
return false;
}
}
}
}
+176
View File
@@ -0,0 +1,176 @@
using System;
using System.Globalization;
using System.Security.Cryptography;
using System.Text;
using System.Web;
namespace atakanozbancom.Models.classes
{
public static class TotpHelper
{
private const string Base32Alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";
private static readonly DateTime UnixEpoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
public static string GenerateSecret(int byteLength = 20)
{
var bytes = new byte[byteLength];
using (var rng = RandomNumberGenerator.Create())
{
rng.GetBytes(bytes);
}
return ToBase32(bytes);
}
public static bool VerifyCode(string base32Secret, string code, int window = 1)
{
if (string.IsNullOrWhiteSpace(base32Secret) || string.IsNullOrWhiteSpace(code))
return false;
code = code.Trim().Replace(" ", "");
if (code.Length != 6)
return false;
long timestep;
try
{
timestep = GetCurrentTimeStep();
}
catch
{
return false;
}
for (var i = -window; i <= window; i++)
{
var expected = ComputeTotp(base32Secret, timestep + i);
if (FixedTimeEquals(expected, code))
return true;
}
return false;
}
public static string BuildOtpAuthUri(string issuer, string accountName, string base32Secret)
{
var label = HttpUtility.UrlEncode(issuer + ":" + accountName);
var issuerParam = HttpUtility.UrlEncode(issuer);
return string.Format(
CultureInfo.InvariantCulture,
"otpauth://totp/{0}?secret={1}&issuer={2}&digits=6&period=30",
label,
base32Secret,
issuerParam);
}
private static long GetCurrentTimeStep()
{
return (long)Math.Floor((DateTime.UtcNow - UnixEpoch).TotalSeconds / 30.0);
}
private static string ComputeTotp(string base32Secret, long timestep)
{
var key = FromBase32(base32Secret);
var counter = BitConverter.GetBytes(timestep);
if (BitConverter.IsLittleEndian)
Array.Reverse(counter);
byte[] hash;
using (var hmac = new HMACSHA1(key))
{
hash = hmac.ComputeHash(counter);
}
var offset = hash[hash.Length - 1] & 0x0F;
var binary =
((hash[offset] & 0x7F) << 24)
| ((hash[offset + 1] & 0xFF) << 16)
| ((hash[offset + 2] & 0xFF) << 8)
| (hash[offset + 3] & 0xFF);
var otp = binary % 1000000;
return otp.ToString("D6", CultureInfo.InvariantCulture);
}
private static string ToBase32(byte[] data)
{
if (data == null || data.Length == 0)
return string.Empty;
var sb = new StringBuilder((data.Length * 8 + 4) / 5);
int buffer = data[0];
var next = 1;
var bitsLeft = 8;
while (bitsLeft > 0 || next < data.Length)
{
if (bitsLeft < 5)
{
if (next < data.Length)
{
buffer <<= 8;
buffer |= data[next++] & 0xFF;
bitsLeft += 8;
}
else
{
var pad = 5 - bitsLeft;
buffer <<= pad;
bitsLeft += pad;
}
}
var index = (buffer >> (bitsLeft - 5)) & 0x1F;
bitsLeft -= 5;
sb.Append(Base32Alphabet[index]);
}
return sb.ToString();
}
private static byte[] FromBase32(string input)
{
var cleaned = input.Trim().Replace(" ", "").Replace("=", "").ToUpperInvariant();
var output = new byte[cleaned.Length * 5 / 8];
var bitBuffer = 0;
var bitsLeft = 0;
var index = 0;
foreach (var c in cleaned)
{
var val = Base32Alphabet.IndexOf(c);
if (val < 0)
throw new FormatException("Invalid Base32 character.");
bitBuffer = (bitBuffer << 5) | val;
bitsLeft += 5;
if (bitsLeft >= 8)
{
output[index++] = (byte)((bitBuffer >> (bitsLeft - 8)) & 0xFF);
bitsLeft -= 8;
}
}
if (index != output.Length)
{
var trimmed = new byte[index];
Array.Copy(output, trimmed, index);
return trimmed;
}
return output;
}
private static bool FixedTimeEquals(string a, string b)
{
if (a == null || b == null || a.Length != b.Length)
return false;
var diff = 0;
for (var i = 0; i < a.Length; i++)
diff |= a[i] ^ b[i];
return diff == 0;
}
}
}
+23 -1
View File
@@ -1,5 +1,7 @@
using System.Collections.Generic; using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace atakanozbancom.Models.classes namespace atakanozbancom.Models.classes
{ {
@@ -9,6 +11,26 @@ namespace atakanozbancom.Models.classes
public int id { get; set; } public int id { get; set; }
public string username { get; set; } public string username { get; set; }
public string password { get; set; } public string password { get; set; }
[Column("two_factor_enabled")]
public bool two_factor_enabled { get; set; }
[Column("two_factor_secret")]
[StringLength(512)]
public string two_factor_secret { get; set; }
[Column("login_failed_count")]
public int login_failed_count { get; set; }
[Column("login_lock_until")]
public DateTime? login_lock_until { get; set; }
[Column("totp_failed_count")]
public int totp_failed_count { get; set; }
[Column("totp_lock_until")]
public DateTime? totp_lock_until { get; set; }
public List<myprojects> MyProjects { get; set; } public List<myprojects> MyProjects { get; set; }
} }
} }
+34
View File
@@ -0,0 +1,34 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace atakanozbancom.Models.classes
{
[Table("affiliatelinks")]
public class affiliatelink
{
[Key]
public int id { get; set; }
[Required, StringLength(500)]
[Column("image")]
public string image { get; set; }
[Required, StringLength(200)]
[Column("title")]
public string title { get; set; }
[StringLength(500)]
[Column("description")]
public string description { get; set; }
[Required, StringLength(1000)]
[Column("url")]
public string url { get; set; }
[Column("sortorder")]
public int sort_order { get; set; } = 0;
public virtual ICollection<affiliatelinktranslation> Translations { get; set; }
}
}
@@ -0,0 +1,25 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace atakanozbancom.Models.classes
{
[Table("affiliatelinktranslations")]
public class affiliatelinktranslation
{
public int id { get; set; }
[Required]
public int affiliatelink_id { get; set; }
[Required, StringLength(10)]
public string culture { get; set; }
[StringLength(255)]
public string title { get; set; }
public string description { get; set; }
[ForeignKey("affiliatelink_id")]
public virtual affiliatelink AffiliateLink { get; set; }
}
}
-4
View File
@@ -13,10 +13,6 @@ namespace atakanozbancom.Models.classes
public string title { get; set; } public string title { get; set; }
[AllowHtml] [AllowHtml]
public string description { get; set; } public string description { get; set; }
public string TitleEN { get; set; }
public string DescEN { get; set; }
public string TitleTR { get; set; }
public string DescTR { get; set; }
public object admins { get; internal set; } public object admins { get; internal set; }
public virtual ICollection<myprojectstranslation> Translations { get; set; } public virtual ICollection<myprojectstranslation> Translations { get; set; }
+39
View File
@@ -0,0 +1,39 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace atakanozbancom.Models.classes
{
public enum MediaType
{
Image = 1,
Iframe = 2,
// Video = 0,
//Document = 3
}
[Table("projectmedia")]
public class projectmedia
{
[Key]
public int id { get; set; }
[Column("projectid")]
public int project_id { get; set; }
[ForeignKey(nameof(project_id))]
public virtual myprojects Project { get; set; }
[Column("mediatype")]
public MediaType media_type { get; set; }
[Required, StringLength(1000)]
[Column("mediaurl")]
public string url { get; set; }
[Column("sortorder")]
public int sort_order { get; set; } = 0;
// DB'de bu kolon yok → modelden kaldırıyoruz
// public string title { get; set; }
}
}
+17
View File
@@ -0,0 +1,17 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace atakanozbancom.Models.classes
{
[Table("sitesettings")]
public class sitesetting
{
[Key]
public int id { get; set; }
// Public URL of the current wallpaper. Null/empty falls back to the bundled default.
[StringLength(500)]
[Column("wallpaper")]
public string wallpaper { get; set; }
}
}
+24
View File
@@ -0,0 +1,24 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace atakanozbancom.Models.classes
{
[Table("socialicons")]
public class socialicon
{
[Key]
public int id { get; set; }
// Font Awesome class(es), e.g. "fa-brands fa-youtube"
[Required, StringLength(100)]
[Column("icon")]
public string icon { get; set; }
[Required, StringLength(500)]
[Column("url")]
public string url { get; set; }
[Column("sortorder")]
public int sort_order { get; set; } = 0;
}
}
+3
View File
@@ -0,0 +1,3 @@
@{
Layout = "~/Views/Shared/_PortfolioLayout.cshtml";
}
+127 -19
View File
@@ -5,34 +5,142 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html lang="en">
<head> <head>
<meta name="viewport" content="width=device-width" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>atakanozban.com Admin Panel</title> <title>atakanozban.com Admin Panel</title>
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css" />
<link rel="font-awesome" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" />
<style>
html, body {
height: 100%;
background-color: #212529;
}
.admin-sidebar {
width: 260px;
min-height: 100vh;
}
.admin-sidebar .nav-link {
color: rgba(255, 255, 255, .7);
border-radius: .5rem;
}
.admin-sidebar .nav-link i {
width: 1.25rem;
text-align: center;
}
.admin-sidebar .nav-link:hover {
color: #fff;
background-color: rgba(255, 255, 255, .08);
}
.admin-sidebar .nav-link.active {
color: #fff;
background-color: #0d6efd;
}
.admin-content {
flex: 1 1 auto;
min-width: 0;
}
.admin-user-toggle {
color: #fff;
text-decoration: none;
}
.admin-user-toggle:hover {
color: #fff;
}
</style>
</head> </head>
<body> <body>
<div class="w3-sidebar w3-bar-block bg-dark" style="width: 25%; color: #212529"> @{
<h3 class="w3-bar-item text-white">Menu</h3> var currentPath = (Request.Url != null ? Request.Url.AbsolutePath : "").ToLowerInvariant();
<a href="/myprojects/index" class="w3-bar-item text-decoration-none text-white" target="_blank">Go to site</a> Func<string, bool> isActive = path => currentPath.StartsWith(path.ToLowerInvariant());
<a href="/login/logout" class="w3-bar-item text-decoration-none text-white">Sign out</a> var isDashboard = currentPath == "/admin" || currentPath == "/admin/" || currentPath.StartsWith("/admin/index");
</div> }
<div class="d-flex">
<div class="admin-sidebar d-flex flex-column flex-shrink-0 p-3 text-bg-dark">
<a href="/admin" class="d-flex align-items-center mb-3 text-white text-decoration-none">
<i class="fa-solid fa-shield-halved fs-4 me-2"></i>
<span class="fs-4">Admin Panel</span>
</a>
<hr class="text-white-50" />
<!-- Page Content --> <ul class="nav nav-pills flex-column mb-auto">
<div style="margin-left: 25%"> <li class="nav-item">
<div class="w3-container w3-teal"> <a href="/admin" class="nav-link @(isDashboard ? "active" : "")">
<h1>atakanozban.com Admin Panel</h1> <i class="fa-solid fa-gauge me-2"></i>Dashboard
</a>
</li>
<li class="nav-item">
<a href="/admin/myprojects" class="nav-link @(isActive("/admin/myprojects") ? "active" : "")">
<i class="fa-solid fa-diagram-project me-2"></i>My Projects
</a>
</li>
<li class="nav-item">
<a href="/admin/affiliatelinks" class="nav-link @(isActive("/admin/affiliatelinks") ? "active" : "")">
<i class="fa-solid fa-link me-2"></i>Affiliate Links
</a>
</li>
<li class="nav-item">
<a href="/admin/socialicons" class="nav-link @(isActive("/admin/socialicons") || isActive("/admin/newsocialicon") || isActive("/admin/socialiconget") ? "active" : "")">
<i class="fa-solid fa-share-nodes me-2"></i>Social Icons
</a>
</li>
<li class="nav-item">
<a href="/admin/wallpaper" class="nav-link @(isActive("/admin/wallpaper") ? "active" : "")">
<i class="fa-solid fa-image me-2"></i>Wallpaper
</a>
</li>
</ul>
<hr class="text-white-50" />
<div class="dropdown">
<a href="#" class="admin-user-toggle d-flex align-items-center dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
<i class="fa-solid fa-circle-user fs-3 me-2"></i>
<strong>@(User?.Identity?.Name ?? "Admin")</strong>
</a>
<ul class="dropdown-menu dropdown-menu-dark text-small shadow">
<li><a class="dropdown-item" href="/admin/usersettings"><i class="fa-solid fa-user-gear me-2"></i>User Settings</a></li>
<li><a class="dropdown-item" href="/" target="_blank"><i class="fa-solid fa-arrow-up-right-from-square me-2"></i>Go to site</a></li>
<li><hr class="dropdown-divider" /></li>
<li><a class="dropdown-item" href="/login/logout"><i class="fa-solid fa-right-from-bracket me-2"></i>Sign out</a></li>
</ul>
</div>
</div> </div>
<div class="w3-container bg-dark">
<div class="admin-content p-4">
@RenderBody() @RenderBody()
</div> </div>
</div> </div>
<style>
body { <div class="modal fade" id="pasteImageModal" tabindex="-1" aria-hidden="true">
background-color: #212529; /* Bootstrap's dark bg color */ <div class="modal-dialog modal-dialog-centered">
} <div class="modal-content bg-dark text-white border border-secondary">
</style> <div class="modal-header border-secondary">
<h5 class="modal-title">Paste Image</h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body text-center">
<div id="pasteImageTarget" contenteditable="true" spellcheck="false"
class="border border-secondary rounded p-5 mb-3 text-white-50"
style="outline:none;cursor:text;min-height:120px;display:flex;align-items:center;justify-content:center;">
Click here, then press Ctrl+V to paste your image
</div>
<img id="pasteImageModalPreview" style="display:none;max-width:100%;max-height:220px;border-radius:6px;" />
</div>
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.bundle.min.js"></script>
<script src="@Url.Content("~/web_atakanozbancom/assets/js/paste-upload.js")"></script>
</body> </body>
</html> </html>
+9 -31
View File
@@ -1,6 +1,4 @@
@using Resources @{
@{
Layout = null; Layout = null;
} }
@@ -178,6 +176,8 @@
} }
</style> </style>
@Html.Action("wallpaper", "main")
<link href="~/web_atakanozbancom/assets/css/style.css" rel="stylesheet"> <link href="~/web_atakanozbancom/assets/css/style.css" rel="stylesheet">
</head> </head>
@@ -196,9 +196,10 @@
<div> <div>
<h3 class="float-md-start mb-0">Atakan</h3> <h3 class="float-md-start mb-0">Atakan</h3>
<nav class="nav nav-masthead justify-content-center float-md-end"> <nav class="nav nav-masthead justify-content-center float-md-end">
<a class="nav-link fw-bold py-1 px-0" asp-controller="Home" asp-action="ChangeLanguage" asp-route-lang="en" href="@Url.Action("index","main")">@Resource.NavHome</a> <a class="nav-link fw-bold py-1 px-0" asp-controller="main" asp-action="ChangeLanguage" asp-route-lang="en" href="@Url.Action("index","main")">@atakanozbancom.App_GlobalResources.Resource.NavHome</a>
<a class="nav-link fw-bold py-1 px-0" asp-controller="Home" asp-action="ChangeLanguage" asp-route-lang="en" aria-current="page" href="@Url.Action("index","about")">@Resource.NavAboutMe</a> <a class="nav-link fw-bold py-1 px-0" asp-controller="main" asp-action="ChangeLanguage" asp-route-lang="en" aria-current="page" href="@Url.Action("index","about")">@atakanozbancom.App_GlobalResources.Resource.NavAboutMe</a>
<a class="nav-link fw-bold py-1 px-0" asp-controller="Home" asp-action="ChangeLanguage" asp-route-lang="en" href="@Url.Action("index","myprojects")">@Resource.NavMyProjects</a> @{ <a class="nav-link fw-bold py-1 px-0" asp-controller="main" asp-action="ChangeLanguage" asp-route-lang="en" href="@Url.Action("index","myprojects")">@atakanozbancom.App_GlobalResources.Resource.NavMyProjects</a>
<a class="nav-link fw-bold py-1 px-0" asp-controller="main" asp-action="ChangeLanguage" asp-route-lang="en" href="@Url.Action("index","support")">@atakanozbancom.App_GlobalResources.Resource.NavAffiliateLinks</a> @{
var currentCulture = System.Threading.Thread.CurrentThread.CurrentUICulture.Name; var currentCulture = System.Threading.Thread.CurrentThread.CurrentUICulture.Name;
var back = Request.RawUrl; var back = Request.RawUrl;
} }
@@ -219,32 +220,9 @@
@RenderBody() @RenderBody()
<footer class="mt-auto text-white-50"> <footer class="mt-auto text-white-50">
<a class="text-decoration-underline text-white-50" href="https://link.atakanozban.com/status">@Resource.Server</a> <a class="text-decoration-underline text-white-50" href="https://link.atakanozban.com/status">@atakanozbancom.App_GlobalResources.Resource.Server</a>
<div class="icons mb-2 mt-2"> <div class="icons mb-2 mt-2">
<a href="https://link.atakanozban.com/youtube" class="text-decoration-none text-white-50"> @Html.Action("socialicons", "main")
<i class="fa-brands fa-youtube"></i>
</a>
<a href="https://link.atakanozban.com/odysee" class="text-decoration-none text-white-50">
<i class="fa-brands fa-odysee"></i>
</a>
<a href="https://link.atakanozban.com/dailymotion" class="text-decoration-none text-white-50">
<i class="fa-brands fa-dailymotion"></i>
</a>
<a href="https://link.atakanozban.com/spotify" class="text-decoration-none text-white-50">
<i class="fa-brands fa-spotify"></i>
</a>
<a href="https://link.atakanozban.com/instagram" class="text-decoration-none text-white-50">
<i class="fa-brands fa-instagram"></i>
</a>
<a href="https://link.atakanozban.com/facebook" class="text-decoration-none text-white-50">
<i class="fa-brands fa-facebook"></i>
</a>
<a href="https://link.atakanozban.com/github" class="text-decoration-none text-white-50">
<i class="fa-brands fa-github"></i>
</a>
<a href="https://link.atakanozban.com/stream" class="text-decoration-none text-white-50">
<i class="fa-solid fa-link"></i>
</a>
</div> </div>
</footer> </footer>
</div> </div>
+3
View File
@@ -0,0 +1,3 @@
@{
Layout = "~/Views/Shared/_PortfolioLayout.cshtml";
}
+6 -8
View File
@@ -1,20 +1,18 @@
@using Resources @{
@{
ViewBag.Title = "index"; ViewBag.Title = "index";
Layout = "~/Views/Shared/_PortfolioLayout.cshtml"; Layout = "~/Views/Shared/_PortfolioLayout.cshtml";
} }
<main class="px-3"> <main class="px-3">
<h1 class="mb-3">@Resource.AboutMeTitle</h1> <h1 class="mb-3">@atakanozbancom.App_GlobalResources.Resource.AboutMeTitle</h1>
<p class="mb-5 text-start"> <p class="mb-5 text-start">
@Resource.About1 @atakanozbancom.App_GlobalResources.Resource.About1
<br /> <br /> <br /> <br />
@Resource.About2 @atakanozbancom.App_GlobalResources.Resource.About2
<br /> <br /> <br /> <br />
@Resource.About3 @atakanozbancom.App_GlobalResources.Resource.About3
<br /> <br /> <br /> <br />
@Resource.About4 @atakanozbancom.App_GlobalResources.Resource.About4
</p> </p>
</main> </main>
+61
View File
@@ -0,0 +1,61 @@
@model atakanozbancom.Models.classes.AdminAffiliateLinkVM
@{
ViewBag.Title = "affiliatelinkget";
Layout = "~/Views/Shared/_AdminLayout.cshtml";
}
<h2 class="mt-3 text-white">Edit Affiliate Link</h2>
@if (TempData["ok"] != null)
{<div class="alert alert-success">@TempData["ok"]</div>}
<hr />
@using (Html.BeginForm("affiliatelinkget", "admin", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
@Html.AntiForgeryToken()
@Html.HiddenFor(m => m.id)
@Html.ValidationSummary(false, "", new { @class = "alert alert-danger" + (ViewData.ModelState.IsValid ? " d-none" : "") })
<div class="mb-3">
<label class="text-white">Current Logo</label><br />
<img id="logoPreview" src="@Model.existingImage" alt="@Model.TitleEN" style="@(string.IsNullOrWhiteSpace(Model.existingImage) ? "display:none;" : "")width:64px;height:64px;object-fit:contain;background:#fff;border-radius:6px;padding:4px;" />
<input id="logoFile" type="file" name="logoFile" class="form-control bg-dark text-white mt-2" accept="image/*" />
<button type="button" class="btn btn-outline-light btn-sm mt-2" onclick="PasteImageModal.open('#logoFile', '#logoPreview')">
<i class="fa-solid fa-paste me-1"></i>Paste image
</button>
<small class="text-muted d-block mt-1">Leave empty to keep the current logo.</small>
</div>
<div class="mb-3">
@Html.LabelFor(p => p.url, new { @class = "text-white" })
@Html.TextBoxFor(p => p.url, new { @class = "form-control bg-dark text-white" })
</div>
<div class="mb-3">
@Html.LabelFor(p => p.TitleEN, new { @class = "text-white" })
@Html.TextBoxFor(p => p.TitleEN, new { @class = "form-control bg-dark text-white" })
</div>
<div class="mb-3">
@Html.LabelFor(p => p.DescEN, new { @class = "text-white" })
@Html.TextAreaFor(p => p.DescEN, new { @class = "form-control bg-dark text-white", rows = 2 })
</div>
<h3 class="mt-3 text-white">Translation (TR)</h3>
<div class="mb-3">
@Html.LabelFor(m => m.TitleTR, new { @class = "text-white" })
@Html.TextBoxFor(m => m.TitleTR, new { @class = "form-control bg-dark text-white" })
</div>
<div class="mb-3">
@Html.LabelFor(m => m.DescTR, new { @class = "text-white" })
@Html.TextAreaFor(m => m.DescTR, new { @class = "form-control bg-dark text-white", rows = 2 })
</div>
<div class="mb-3">
@Html.LabelFor(p => p.sort_order, new { @class = "text-white" })
@Html.TextBoxFor(p => p.sort_order, new { @class = "form-control bg-dark text-white", type = "number" })
</div>
<button class="btn btn-success">Save</button>
}
+48
View File
@@ -0,0 +1,48 @@
@using atakanozbancom.Models.classes
@model List<affiliatelink>
@{
ViewBag.Title = "affiliatelinks";
Layout = "~/Views/Shared/_AdminLayout.cshtml";
}
<h2 class="text-white mt-3 mb-3">Affiliate Links</h2>
@if (TempData["ok"] != null)
{<div class="alert alert-success">@TempData["ok"]</div>}
<table class="table table-bordered mt-3">
<tr class="bg-dark text-white">
<th class="bg-dark text-white">Logo</th>
<th class="bg-dark text-white">Title</th>
<th class="bg-dark text-white">Description</th>
<th class="bg-dark text-white">URL</th>
<th class="bg-dark text-white">Order</th>
<th class="bg-dark text-white">Edit</th>
<th class="bg-dark text-white">Delete</th>
</tr>
@foreach (var x in Model)
{
<tr>
<td class="bg-dark text-white"><img src="@x.image" alt="@x.title" style="width:40px;height:40px;object-fit:contain;background:#fff;border-radius:4px;padding:2px;" /></td>
<td class="bg-dark text-white">@x.title</td>
<td class="bg-dark text-white">@x.description</td>
<td class="bg-dark text-white" style="word-break:break-all;">@x.url</td>
<td class="bg-dark text-white">@x.sort_order</td>
<td class="bg-dark text-white"><a href="/admin/affiliatelinkget/@x.id" class="btn btn-primary">Edit</a></td>
<td class="bg-dark text-white">
@using (Html.BeginForm("affiliatelinkdelete", "admin", new { id = x.id }, FormMethod.Post, new { onsubmit = "return confirm('Delete this affiliate link?');" }))
{
@Html.AntiForgeryToken()
<button type="submit" class="btn btn-danger">Delete</button>
}
</td>
</tr>
}
@if (!Model.Any())
{
<tr>
<td class="bg-dark text-white-50" colspan="7">No affiliate links yet.</td>
</tr>
}
</table>
<a href="/admin/newaffiliatepost" class="btn btn-primary">Create New Affiliate Link</a>
+33 -28
View File
@@ -1,33 +1,38 @@
@using atakanozbancom.Models.classes @{
@model List<myprojects>
@{
ViewBag.Title = "index"; ViewBag.Title = "index";
Layout = "~/Views/Shared/_AdminLayout.cshtml"; Layout = "~/Views/Shared/_AdminLayout.cshtml";
} }
<h2 class="text-white mt-3 mb-3">Posts</h2> <h2 class="text-white mt-3 mb-3">Dashboard</h2>
<p class="text-white-50">Welcome back! Choose a section from the menu on the left to get started.</p>
<table class="table table-bordered mt-3">
<tr class="bg-dark text-white">
<th class="bg-dark text-white">ID</th>
<th class="bg-dark text-white">Title</th>
<th class="bg-dark text-white">Description</th>
<th class="bg-dark text-white">Edit</th>
<th class="bg-dark text-white">Delete</th>
</tr>
@foreach (var x in Model)
{
<tr>
<td class="bg-dark text-white">@x.id</td>
<td class="bg-dark text-white">@x.title</td>
<td class="bg-dark text-white">@x.description</td>
<td class="bg-dark text-white"><a href="/admin/myprojectsget/@x.id" class="btn btn-primary">Edit</a></td>
<td class="bg-dark text-white"><a href="/admin/myprojectsdelete/@x.id " class="btn btn-danger">Delete</a></td>
</tr>
}
</table>
<a href="/admin/newmppost" class="btn btn-primary">Create New Post</a>
<div class="row mt-4">
<div class="col-md-6 mb-3">
<div class="bg-dark border border-secondary rounded p-4 text-white">
<h4>My Projects</h4>
<p class="text-white-50 mb-3">@ViewBag.MyProjectsCount post(s) published.</p>
<a href="/admin/myprojects" class="btn btn-primary">Manage My Projects</a>
</div>
</div>
<div class="col-md-6 mb-3">
<div class="bg-dark border border-secondary rounded p-4 text-white">
<h4>Affiliate Links</h4>
<p class="text-white-50 mb-3">@ViewBag.AffiliateLinksCount link(s) published.</p>
<a href="/admin/affiliatelinks" class="btn btn-primary">Manage Affiliate Links</a>
</div>
</div>
<div class="col-md-6 mb-3">
<div class="bg-dark border border-secondary rounded p-4 text-white">
<h4>Social Icons</h4>
<p class="text-white-50 mb-3">@ViewBag.SocialIconsCount icon(s) in the footer.</p>
<a href="/admin/socialicons" class="btn btn-primary">Manage Social Icons</a>
</div>
</div>
<div class="col-md-6 mb-3">
<div class="bg-dark border border-secondary rounded p-4 text-white">
<h4>Wallpaper</h4>
<p class="text-white-50 mb-3">Change the background image used across the site.</p>
<a href="/admin/wallpaper" class="btn btn-primary">Manage Wallpaper</a>
</div>
</div>
</div>
+38
View File
@@ -0,0 +1,38 @@
@using atakanozbancom.Models.classes
@model List<myprojects>
@{
ViewBag.Title = "myprojects";
Layout = "~/Views/Shared/_AdminLayout.cshtml";
}
<h2 class="text-white mt-3 mb-3">My Projects</h2>
<table class="table table-bordered mt-3">
<tr class="bg-dark text-white">
<th class="bg-dark text-white">ID</th>
<th class="bg-dark text-white">Title</th>
<th class="bg-dark text-white">Description</th>
<th class="bg-dark text-white">Edit</th>
<th class="bg-dark text-white">Delete</th>
</tr>
@foreach (var x in Model)
{
<tr>
<td class="bg-dark text-white">@x.id</td>
<td class="bg-dark text-white">@x.title</td>
<td class="bg-dark text-white">@x.description</td>
<td class="bg-dark text-white"><a href="/admin/myprojectsget/@x.id" class="btn btn-primary">Edit</a></td>
<td class="bg-dark text-white">
@using (Html.BeginForm("myprojectsdelete", "admin", new { id = x.id }, FormMethod.Post, new { onsubmit = "return confirm('Delete this project?');" }))
{
@Html.AntiForgeryToken()
<button type="submit" class="btn btn-danger">Delete</button>
}
</td>
</tr>
}
</table>
<a href="/admin/newmppost" class="btn btn-primary">Create New Post</a>
+122 -48
View File
@@ -6,64 +6,138 @@
} }
<h2 class="mt-3 text-white">My Projects Edit Post</h2> <h2 class="mt-3 text-white">My Projects Edit Post</h2>
@if (TempData["ok"] != null) @if (TempData["ok"] != null)
{ {<div class="alert alert-success">@TempData["ok"]</div>}
<div class="alert alert-success">@TempData["ok"]</div>
}
<hr /> <hr />
@using (Html.BeginForm("myprojectsget", "admin", FormMethod.Post, new { enctype = "multipart/form-data" })) @using (Html.BeginForm("myprojectsget", "admin", FormMethod.Post,
new { enctype = "multipart/form-data" }))
{ {
@Html.AntiForgeryToken() @Html.AntiForgeryToken()
@Html.HiddenFor(m => m.id) @Html.HiddenFor(m => m.id)
<div class="mb-3"> @Html.LabelFor(x => x.id, new { @class = "text-white" })
@Html.LabelFor(m => m.id, new { @class = "text-white" }) @Html.TextBoxFor(x => x.id, new { @class = "form-control bg-dark text-white", @readonly = "readonly" })
@Html.TextBoxFor(m => m.id, new { @class = "form-control bg-dark text-white", @readonly = "readonly" }) <br />
</div>
<div class="mb-3"> @Html.LabelFor(p => p.TitleEN, new { @class = "text-white" })
@Html.LabelFor(m => m.TitleEN, new { @class = "text-white" }) @Html.TextBoxFor(p => p.TitleEN, new { @class = "form-control bg-dark text-white required" })
@Html.TextBoxFor(m => m.TitleEN, new { @class = "form-control bg-dark text-white required" }) <br />
</div>
<div class="mb-3"> @Html.LabelFor(p => p.DescEN, new { @class = "text-white" })
@Html.LabelFor(m => m.DescEN, new { @class = "text-white" }) @Html.TextAreaFor(p => p.DescEN, new { @class = "form-control bg-dark text-white required" })
@Html.TextAreaFor(m => m.DescEN, new { @class = "form-control bg-dark text-white required", rows = "6" }) <small class="text-muted">To add a link, use: [Link text](https://example.com)</small>
</div> <br />
if (!string.IsNullOrEmpty(Model.image)) <h3 class="mt-3 text-white">Translation</h3>
{ @Html.LabelFor(m => m.TitleTR, new { @class = "text-white" })
<div class="mb-3"> @Html.TextBoxFor(m => m.TitleTR, new { @class = "form-control bg-dark text-white required" })
<label class="text-white">Current Image</label> <br />
<br /> @Html.LabelFor(m => m.DescTR, new { @class = "text-white" })
<img src="@Model.image" style="max-width:200px;" class="mb-2" /> @Html.TextAreaFor(m => m.DescTR, new { @class = "form-control bg-dark text-white required" })
</div> <small class="text-muted">To add a link, use: [Link text](https://example.com)</small>
} <br />
<div class="mb-3">
<label class="text-white">Change Image</label>
<input type="file" name="file" class="form-control bg-dark text-white" />
</div>
<div class="mb-3">
@Html.LabelFor(m => m.iframe, new { @class = "text-white" })
@Html.TextBoxFor(m => m.iframe, new { @class = "form-control bg-dark text-white" })
</div>
<h3 class="mt-3 text-white">Translation (TR)</h3>
<div class="mb-3">
@Html.LabelFor(m => m.TitleTR, new { @class = "text-white" })
@Html.TextBoxFor(m => m.TitleTR, new { @class = "form-control bg-dark text-white required" })
</div>
<div class="mb-3">
@Html.LabelFor(m => m.DescTR, new { @class = "text-white" })
@Html.TextAreaFor(m => m.DescTR, new { @class = "form-control bg-dark text-white required", rows = "6" })
</div>
<button class="btn btn-success">Save</button> <button class="btn btn-success">Save</button>
} }
<hr />
<h3 class="mt-3 text-white">Media Manager</h3>
@if (Model.medias != null && Model.medias.Count > 0)
{
<div class="bg-dark p-3 rounded">
@foreach (var m in Model.medias)
{
<div class="d-flex justify-content-between align-items-center mb-2">
<div class="text-white">
<b>@m.media_type</b>
<span class="text-muted"> (order: @m.sort_order)</span>
<div style="word-break:break-all;">@m.url</div>
@*@if (!string.IsNullOrWhiteSpace(m.title))
{
<div class="text-muted">@m.title</div>
}*@
</div>
@using (Html.BeginForm("deletemedia", "admin", new { id = m.id, projectId = Model.id }, FormMethod.Post, new { onsubmit = "return confirm('Delete this media?');" }))
{
@Html.AntiForgeryToken()
<button type="submit" class="btn btn-danger btn-sm">Delete</button>
}
</div>
<hr class="text-muted" />
}
</div>
}
else
{
<div class="text-muted">No media for this project.</div>
}
@using (Html.BeginForm("addmedia", "admin", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
@Html.AntiForgeryToken()
<input type="hidden" name="projectId" value="@Model.id" />
<div class="mb-2">
<label class="text-white">Type</label>
<select id="mediaType" name="mediaType" class="form-control bg-dark text-white">
<option value="1">Image</option>
<option value="2">Iframe</option>
@*<option value="3">Video</option>*@
@*<option value="4">Document</option>*@
</select>
</div>
<!-- IFRAME URL -->
<div id="urlWrap" class="mb-2" style="display:none;">
<label class="text-white">URL</label>
<input id="iframeUrl" name="iframeUrl" class="form-control bg-dark text-white" placeholder="https://..." />
<small class="text-muted">Only for iframe embed links.</small>
</div>
<!-- FILE UPLOAD -->
<div id="fileWrap" class="mb-2">
<label class="text-white">Upload</label>
<input id="mediaFile" type="file" name="mediaFile" class="form-control bg-dark text-white" />
<button type="button" class="btn btn-outline-light btn-sm mt-2" onclick="PasteImageModal.open('#mediaFile')">
<i class="fa-solid fa-paste me-1"></i>Paste image
</button>
<small class="text-muted d-block mt-1">Upload image/document files.</small>
</div>
<div class="mb-3">
<label class="text-white">Sort Order</label>
<input name="sortOrder" type="number" value="0" class="form-control bg-dark text-white" />
</div>
<button class="btn btn-primary">Add Media</button>
}
<script>
(function () {
var sel = document.getElementById("mediaType");
var urlWrap = document.getElementById("urlWrap");
var fileWrap = document.getElementById("fileWrap");
var iframeUrl = document.getElementById("iframeUrl");
var mediaFile = document.getElementById("mediaFile");
function sync() {
var isIframe = sel.value === "2"; // Iframe
urlWrap.style.display = isIframe ? "block" : "none";
fileWrap.style.display = isIframe ? "none" : "block";
// optional: clear the hidden field so server doesn't get junk
if (isIframe) {
if (mediaFile) mediaFile.value = "";
} else {
if (iframeUrl) iframeUrl.value = "";
}
}
sel.addEventListener("change", sync);
sync();
})();
</script>
+59
View File
@@ -0,0 +1,59 @@
@model atakanozbancom.Models.classes.AdminAffiliateLinkVM
@{
ViewBag.Title = "Add New Affiliate Link";
Layout = "~/Views/Shared/_AdminLayout.cshtml";
}
<h2 class="text-white mt-3">Add New Affiliate Link</h2>
<hr />
@using (Html.BeginForm("newaffiliatepost", "admin", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
@Html.AntiForgeryToken()
@Html.ValidationSummary(false, "", new { @class = "alert alert-danger" + (ViewData.ModelState.IsValid ? " d-none" : "") })
<div class="mb-3">
<label class="text-white">Logo</label>
<img id="logoPreview" style="display:none;width:64px;height:64px;object-fit:contain;background:#fff;border-radius:6px;padding:4px;" class="mb-2 d-block" />
<input id="logoFile" type="file" name="logoFile" class="form-control bg-dark text-white" accept="image/*" />
<button type="button" class="btn btn-outline-light btn-sm mt-2" onclick="PasteImageModal.open('#logoFile', '#logoPreview')">
<i class="fa-solid fa-paste me-1"></i>Paste image
</button>
<small class="text-muted d-block mt-1">PNG, JPG, WEBP or GIF.</small>
</div>
<div class="mb-3">
@Html.LabelFor(p => p.url, new { @class = "text-white" })
@Html.TextBoxFor(p => p.url, new { @class = "form-control bg-dark text-white", placeholder = "https://..." })
</div>
<div class="mb-3">
@Html.LabelFor(p => p.TitleEN, new { @class = "text-white" })
@Html.TextBoxFor(p => p.TitleEN, new { @class = "form-control bg-dark text-white", placeholder = "e.g. Hetzner" })
</div>
<div class="mb-3">
@Html.LabelFor(p => p.DescEN, new { @class = "text-white" })
@Html.TextAreaFor(p => p.DescEN, new { @class = "form-control bg-dark text-white", rows = 2, placeholder = "e.g. Get $20 free credit" })
</div>
<h3 class="mt-3 text-white">Translation (TR)</h3>
<div class="mb-3">
@Html.LabelFor(p => p.TitleTR, new { @class = "text-white" })
@Html.TextBoxFor(p => p.TitleTR, new { @class = "form-control bg-dark text-white" })
</div>
<div class="mb-3">
@Html.LabelFor(p => p.DescTR, new { @class = "text-white" })
@Html.TextAreaFor(p => p.DescTR, new { @class = "form-control bg-dark text-white", rows = 2 })
</div>
<div class="mb-3">
@Html.LabelFor(p => p.sort_order, new { @class = "text-white" })
@Html.TextBoxFor(p => p.sort_order, new { @class = "form-control bg-dark text-white", type = "number" })
<small class="text-muted">Lower numbers show first.</small>
</div>
<button class="btn btn-success">Save</button>
}
+101 -10
View File
@@ -22,16 +22,7 @@
<div class="mb-3"> <div class="mb-3">
@Html.LabelFor(p => p.DescEN, new { @class = "text-white" }) @Html.LabelFor(p => p.DescEN, new { @class = "text-white" })
@Html.TextAreaFor(p => p.DescEN, new { @class = "form-control bg-dark text-white" }) @Html.TextAreaFor(p => p.DescEN, new { @class = "form-control bg-dark text-white" })
</div> <small class="text-muted">To add a link, use: [Link text](https://example.com)</small>
<div class="mb-3">
<label class="text-white">Project Image</label>
<input type="file" name="file" class="form-control bg-dark text-white" />
</div>
<div class="mb-3">
@Html.LabelFor(p => p.iframe, new { @class = "text-white" })
@Html.TextBoxFor(p => p.iframe, new { @class = "form-control bg-dark text-white" })
</div> </div>
<h3 class="mt-3 text-white">Translation (TR)</h3> <h3 class="mt-3 text-white">Translation (TR)</h3>
@@ -44,7 +35,107 @@
<div class="mb-3"> <div class="mb-3">
@Html.LabelFor(p => p.DescTR, new { @class = "text-white" }) @Html.LabelFor(p => p.DescTR, new { @class = "text-white" })
@Html.TextAreaFor(p => p.DescTR, new { @class = "form-control bg-dark text-white" }) @Html.TextAreaFor(p => p.DescTR, new { @class = "form-control bg-dark text-white" })
<small class="text-muted">To add a link, use: [Link text](https://example.com)</small>
</div> </div>
<button class="btn btn-success">Save</button> <button class="btn btn-success">Save</button>
} }
<hr />
<h3 class="mt-3 text-white">Media Manager</h3>
@if (Model.medias != null && Model.medias.Count > 0)
{
<div class="bg-dark p-3 rounded">
@foreach (var m in Model.medias)
{
<div class="d-flex justify-content-between align-items-center mb-2">
<div class="text-white">
<b>@m.media_type</b>
<span class="text-muted"> (order: @m.sort_order)</span>
<div style="word-break:break-all;">@m.url</div>
@*@if (!string.IsNullOrWhiteSpace(m.title))
{
<div class="text-muted">@m.title</div>
}*@
</div>
@using (Html.BeginForm("deletemedia", "admin", new { id = m.id, projectId = Model.id }, FormMethod.Post, new { onsubmit = "return confirm('Delete this media?');" }))
{
@Html.AntiForgeryToken()
<button type="submit" class="btn btn-danger btn-sm">Delete</button>
}
</div>
<hr class="text-muted" />
}
</div>
}
else
{
<div class="text-muted">No media for this project.</div>
}
@using (Html.BeginForm("addmedia", "admin", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
@Html.AntiForgeryToken()
<input type="hidden" name="projectId" value="@Model.id" />
<div class="mb-2">
<label class="text-white">Type</label>
<select id="mediaType" name="mediaType" class="form-control bg-dark text-white">
<option value="1">Image</option>
<option value="2">Iframe</option>
@*<option value="3">Video</option>*@
@*<option value="4">Document</option>*@
</select>
</div>
<!-- IFRAME URL -->
<div id="urlWrap" class="mb-2" style="display:none;">
<label class="text-white">URL</label>
<input id="iframeUrl" name="iframeUrl" class="form-control bg-dark text-white" placeholder="https://..." />
<small class="text-muted">Only for iframe embed links.</small>
</div>
<!-- FILE UPLOAD -->
<div id="fileWrap" class="mb-2">
<label class="text-white">Upload</label>
<input id="mediaFile" type="file" name="mediaFile" class="form-control bg-dark text-white" />
<button type="button" class="btn btn-outline-light btn-sm mt-2" onclick="PasteImageModal.open('#mediaFile')">
<i class="fa-solid fa-paste me-1"></i>Paste image
</button>
<small class="text-muted d-block mt-1">Upload image/document files.</small>
</div>
<div class="mb-3">
<label class="text-white">Sort Order</label>
<input name="sortOrder" type="number" value="0" class="form-control bg-dark text-white" />
</div>
<button class="btn btn-primary">Add Media</button>
}
<script>(function () {
var sel = document.getElementById("mediaType");
var urlWrap = document.getElementById("urlWrap");
var fileWrap = document.getElementById("fileWrap");
var iframeUrl = document.getElementById("iframeUrl");
var mediaFile = document.getElementById("mediaFile");
function sync() {
var isIframe = sel.value === "2"; // Iframe
urlWrap.style.display = isIframe ? "block" : "none";
fileWrap.style.display = isIframe ? "none" : "block";
// optional: clear the hidden field so server doesn't get junk
if (isIframe) {
if (mediaFile) mediaFile.value = "";
} else {
if (iframeUrl) iframeUrl.value = "";
}
}
sel.addEventListener("change", sync);
sync();
})();
</script>
+48
View File
@@ -0,0 +1,48 @@
@model atakanozbancom.Models.classes.AdminSocialIconVM
@{
ViewBag.Title = "Add New Social Icon";
Layout = "~/Views/Shared/_AdminLayout.cshtml";
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" />
<h2 class="text-white mt-3">Add New Social Icon</h2>
<hr />
@using (Html.BeginForm("newsocialicon", "admin", FormMethod.Post))
{
@Html.AntiForgeryToken()
@Html.ValidationSummary(false, "", new { @class = "alert alert-danger" + (ViewData.ModelState.IsValid ? " d-none" : "") })
<div class="mb-3">
@Html.LabelFor(p => p.icon, new { @class = "text-white" })
<div class="input-group">
<span class="input-group-text bg-dark text-white fs-4" style="width:3rem;justify-content:center;">
<i id="icon-preview" class="@Model.icon"></i>
</span>
@Html.TextBoxFor(p => p.icon, new { @class = "form-control bg-dark text-white", placeholder = "e.g. fa-brands fa-youtube", id = "icon-input" })
</div>
<small class="text-muted">
Any <a href="https://fontawesome.com/search?ic=brands" target="_blank" rel="noopener" class="text-info">Font Awesome</a> class name, e.g. <code>fa-brands fa-youtube</code> or <code>fa-solid fa-link</code>.
</small>
</div>
<div class="mb-3">
@Html.LabelFor(p => p.url, new { @class = "text-white" })
@Html.TextBoxFor(p => p.url, new { @class = "form-control bg-dark text-white", placeholder = "https://..." })
</div>
<div class="mb-3">
@Html.LabelFor(p => p.sort_order, new { @class = "text-white" })
@Html.TextBoxFor(p => p.sort_order, new { @class = "form-control bg-dark text-white", type = "number" })
<small class="text-muted">Lower numbers show first.</small>
</div>
<button class="btn btn-success">Save</button>
}
<script>
document.getElementById('icon-input').addEventListener('input', function () {
document.getElementById('icon-preview').className = this.value;
});
</script>
+5
View File
@@ -0,0 +1,5 @@
@{
// Kept for old bookmarks; controller redirects to UserSettings.
Layout = null;
Response.Redirect(Url.Action("UserSettings", "admin"));
}
+50
View File
@@ -0,0 +1,50 @@
@model atakanozbancom.Models.classes.AdminSocialIconVM
@{
ViewBag.Title = "socialiconget";
Layout = "~/Views/Shared/_AdminLayout.cshtml";
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" />
<h2 class="mt-3 text-white">Edit Social Icon</h2>
@if (TempData["ok"] != null)
{<div class="alert alert-success">@TempData["ok"]</div>}
<hr />
@using (Html.BeginForm("socialiconget", "admin", FormMethod.Post))
{
@Html.AntiForgeryToken()
@Html.HiddenFor(m => m.id)
@Html.ValidationSummary(false, "", new { @class = "alert alert-danger" + (ViewData.ModelState.IsValid ? " d-none" : "") })
<div class="mb-3">
@Html.LabelFor(p => p.icon, new { @class = "text-white" })
<div class="input-group">
<span class="input-group-text bg-dark text-white fs-4" style="width:3rem;justify-content:center;">
<i id="icon-preview" class="@Model.icon"></i>
</span>
@Html.TextBoxFor(p => p.icon, new { @class = "form-control bg-dark text-white", id = "icon-input" })
</div>
<small class="text-muted">
Any <a href="https://fontawesome.com/search?ic=brands" target="_blank" rel="noopener" class="text-info">Font Awesome</a> class name, e.g. <code>fa-brands fa-youtube</code> or <code>fa-solid fa-link</code>.
</small>
</div>
<div class="mb-3">
@Html.LabelFor(p => p.url, new { @class = "text-white" })
@Html.TextBoxFor(p => p.url, new { @class = "form-control bg-dark text-white" })
</div>
<div class="mb-3">
@Html.LabelFor(p => p.sort_order, new { @class = "text-white" })
@Html.TextBoxFor(p => p.sort_order, new { @class = "form-control bg-dark text-white", type = "number" })
</div>
<button class="btn btn-success">Save</button>
}
<script>
document.getElementById('icon-input').addEventListener('input', function () {
document.getElementById('icon-preview').className = this.value;
});
</script>
+49
View File
@@ -0,0 +1,49 @@
@using atakanozbancom.Models.classes
@model List<socialicon>
@{
ViewBag.Title = "socialicons";
Layout = "~/Views/Shared/_AdminLayout.cshtml";
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" />
<h2 class="text-white mt-3 mb-3">Social Icons</h2>
<p class="text-white-50">These appear as the icon row at the bottom of every public page.</p>
@if (TempData["ok"] != null)
{<div class="alert alert-success">@TempData["ok"]</div>}
<table class="table table-bordered mt-3">
<tr class="bg-dark text-white">
<th class="bg-dark text-white">Icon</th>
<th class="bg-dark text-white">Class</th>
<th class="bg-dark text-white">URL</th>
<th class="bg-dark text-white">Order</th>
<th class="bg-dark text-white">Edit</th>
<th class="bg-dark text-white">Delete</th>
</tr>
@foreach (var x in Model)
{
<tr>
<td class="bg-dark text-white fs-4"><i class="@x.icon"></i></td>
<td class="bg-dark text-white">@x.icon</td>
<td class="bg-dark text-white" style="word-break:break-all;">@x.url</td>
<td class="bg-dark text-white">@x.sort_order</td>
<td class="bg-dark text-white"><a href="/admin/socialiconget/@x.id" class="btn btn-primary">Edit</a></td>
<td class="bg-dark text-white">
@using (Html.BeginForm("socialicondelete", "admin", new { id = x.id }, FormMethod.Post, new { onsubmit = "return confirm('Delete this icon?');" }))
{
@Html.AntiForgeryToken()
<button type="submit" class="btn btn-danger">Delete</button>
}
</td>
</tr>
}
@if (!Model.Any())
{
<tr>
<td class="bg-dark text-white-50" colspan="6">No social icons yet.</td>
</tr>
}
</table>
<a href="/admin/newsocialicon" class="btn btn-primary">Create New Icon</a>
+116
View File
@@ -0,0 +1,116 @@
@{
ViewBag.Title = "User Settings";
Layout = "~/Views/Shared/_AdminLayout.cshtml";
var enabled = ViewBag.TwoFactorEnabled == true;
}
<h2 class="text-white mt-3 mb-3">User Settings</h2>
<p class="text-white-50">Account: <strong class="text-white">@ViewBag.Username</strong></p>
<div class="row">
<div class="col-lg-6 mb-4">
<div class="bg-dark border border-secondary rounded p-4 text-white h-100">
<h4 class="mb-3">Change password</h4>
@if (TempData["pwdOk"] != null)
{
<div class="alert alert-success py-2">@TempData["pwdOk"]</div>
}
@if (TempData["pwdError"] != null)
{
<div class="alert alert-danger py-2">@TempData["pwdError"]</div>
}
@using (Html.BeginForm("ChangePassword", "admin", FormMethod.Post))
{
@Html.AntiForgeryToken()
<div class="mb-3">
<label class="form-label">Current password</label>
<input type="password" name="currentPassword" class="form-control bg-dark text-white" autocomplete="current-password" required />
</div>
<div class="mb-3">
<label class="form-label">New password</label>
<input type="password" name="newPassword" class="form-control bg-dark text-white" autocomplete="new-password" minlength="8" required />
<small class="text-muted">At least 8 characters.</small>
</div>
<div class="mb-3">
<label class="form-label">Confirm new password</label>
<input type="password" name="confirmPassword" class="form-control bg-dark text-white" autocomplete="new-password" minlength="8" required />
</div>
<button type="submit" class="btn btn-primary">Update password</button>
}
</div>
</div>
<div class="col-lg-6 mb-4">
<div class="bg-dark border border-secondary rounded p-4 text-white h-100">
<h4 class="mb-3">
Two-factor authentication
@if (enabled)
{
<span class="badge text-bg-success ms-2">Enabled</span>
}
else
{
<span class="badge text-bg-secondary ms-2">Disabled</span>
}
</h4>
@if (TempData["tfaOk"] != null)
{
<div class="alert alert-success py-2">@TempData["tfaOk"]</div>
}
@if (TempData["tfaError"] != null)
{
<div class="alert alert-danger py-2">@TempData["tfaError"]</div>
}
@if (enabled)
{
<p class="text-white-50">2FA is active. Enter a current authenticator code to disable it.</p>
using (Html.BeginForm("DisableTwoFactor", "admin", FormMethod.Post))
{
@Html.AntiForgeryToken()
<div class="mb-3">
<label class="form-label">Authenticator code</label>
<input type="text" name="code" class="form-control bg-dark text-white" maxlength="6" inputmode="numeric" pattern="[0-9]*" autocomplete="one-time-code" required />
</div>
<button type="submit" class="btn btn-danger" onclick="return confirm('Disable two-factor authentication?');">Disable 2FA</button>
}
}
else
{
<ol class="text-white-50">
<li>Open your authenticator app and scan the QR code below.</li>
<li>Or enter this secret manually: <code class="text-white">@ViewBag.SetupSecret</code></li>
<li>Enter the 6-digit code to confirm and enable 2FA.</li>
</ol>
<div class="text-center my-3">
<div id="totpQr" class="d-inline-block bg-white p-2 rounded"></div>
</div>
using (Html.BeginForm("EnableTwoFactor", "admin", FormMethod.Post))
{
@Html.AntiForgeryToken()
<div class="mb-3">
<label class="form-label">Authenticator code</label>
<input type="text" name="code" class="form-control bg-dark text-white" maxlength="6" inputmode="numeric" pattern="[0-9]*" autocomplete="one-time-code" required />
</div>
<button type="submit" class="btn btn-success">Enable 2FA</button>
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"></script>
<script>
(function () {
var uri = @Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject((string)ViewBag.OtpAuthUri));
var el = document.getElementById('totpQr');
if (el && uri && typeof QRCode !== 'undefined') {
new QRCode(el, { text: uri, width: 200, height: 200 });
}
})();
</script>
}
</div>
</div>
</div>
+37
View File
@@ -0,0 +1,37 @@
@{
ViewBag.Title = "wallpaper";
Layout = "~/Views/Shared/_AdminLayout.cshtml";
}
<h2 class="text-white mt-3 mb-3">Wallpaper</h2>
<p class="text-white-50">This image is used as the background on every public page.</p>
@if (TempData["ok"] != null)
{<div class="alert alert-success">@TempData["ok"]</div>}
<div class="mb-4">
<label class="text-white d-block mb-2">Current wallpaper</label>
<img src="@ViewBag.CurrentWallpaper" style="max-width:100%;max-height:300px;border-radius:8px;border:1px solid #444;" />
</div>
@using (Html.BeginForm("Wallpaper", "admin", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
@Html.AntiForgeryToken()
<div class="mb-3">
<label class="text-white">New wallpaper image</label>
<img id="wallpaperPreview" style="display:none;max-width:100%;max-height:300px;border-radius:8px;" class="mb-2 d-block" />
<input id="wallpaperFile" type="file" name="wallpaperFile" class="form-control bg-dark text-white" accept="image/*" />
<button type="button" class="btn btn-outline-light btn-sm mt-2" onclick="PasteImageModal.open('#wallpaperFile', '#wallpaperPreview')">
<i class="fa-solid fa-paste me-1"></i>Paste image
</button>
<small class="text-muted d-block mt-1">PNG, JPG, WEBP or GIF.</small>
</div>
<button class="btn btn-success">Upload New Wallpaper</button>
}
@using (Html.BeginForm("WallpaperReset", "admin", FormMethod.Post, new { onsubmit = "return confirm('Reset wallpaper to the default image?');" }))
{
@Html.AntiForgeryToken()
<button type="submit" class="btn btn-secondary mt-2">Reset to Default</button>
}
+10 -21
View File
@@ -1,19 +1,15 @@
@{
@{
Layout = null; Layout = null;
} }
<!doctype html> <!doctype html>
<html lang="en" data-bs-theme="dark"> <html lang="en" data-bs-theme="dark">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>Sign-in</title> <title>Sign-in</title>
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css" rel="stylesheet"> <link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
<style> <style>
.form-control { .form-control {
background-color: #212529 !important; background-color: #212529 !important;
@@ -30,16 +26,6 @@
box-shadow: 0 0 5px rgba(13, 110, 253, 0.5); box-shadow: 0 0 5px rgba(13, 110, 253, 0.5);
} }
.form-check-input {
background-color: #343a40 !important;
border-color: #6c757d !important;
}
.form-check-input:checked {
background-color: #0d6efd !important;
border-color: #0d6efd !important;
}
.btn-primary { .btn-primary {
background-color: #0d6efd !important; background-color: #0d6efd !important;
border-color: #0d6efd !important; border-color: #0d6efd !important;
@@ -51,28 +37,31 @@
} }
</style> </style>
</head> </head>
<body class="bg-dark d-flex align-items-center justify-content-center vh-100"> <body class="bg-dark d-flex align-items-center justify-content-center vh-100">
<main class="form-signin w-100" style="max-width: 400px;"> <main class="form-signin w-100" style="max-width: 400px;">
@using (Html.BeginForm("index", "login", FormMethod.Post)) @using (Html.BeginForm("index", "login", FormMethod.Post))
{ {
@Html.AntiForgeryToken()
<h1 class="h3 mb-3 fw-normal text-white text-center">Please sign in</h1> <h1 class="h3 mb-3 fw-normal text-white text-center">Please sign in</h1>
if (ViewBag.Error != null)
{
<div class="alert alert-danger py-2">@ViewBag.Error</div>
}
<div class="form-floating"> <div class="form-floating">
<input type="text" name="username" class="form-control" id="floatingInput" placeholder="Username"> <input type="text" name="username" class="form-control" id="floatingInput" placeholder="Username" autocomplete="username" required>
<label for="floatingInput">Username</label> <label for="floatingInput">Username</label>
</div> </div>
<div class="form-floating mt-2 mb-2"> <div class="form-floating mt-2 mb-3">
<input type="password" name="password" class="form-control" id="floatingPassword" placeholder="Password"> <input type="password" name="password" class="form-control" id="floatingPassword" placeholder="Password" autocomplete="current-password" required>
<label for="floatingPassword">Password</label> <label for="floatingPassword">Password</label>
</div> </div>
<button class="btn btn-primary w-100 py-2" type="submit">Sign in</button> <button class="btn btn-primary w-100 py-2" type="submit">Sign in</button>
} }
</main> </main>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.bundle.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.bundle.min.js"></script>
</body> </body>
</html> </html>
+50
View File
@@ -0,0 +1,50 @@
@{
Layout = null;
}
<!doctype html>
<html lang="en" data-bs-theme="dark">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Two-factor authentication</title>
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css" rel="stylesheet">
<style>
.form-control {
background-color: #212529 !important;
color: white !important;
border: 1px solid #6c757d;
letter-spacing: 0.35rem;
text-align: center;
font-size: 1.4rem;
}
.form-control:focus {
border-color: #0d6efd !important;
box-shadow: 0 0 5px rgba(13, 110, 253, 0.5);
}
</style>
</head>
<body class="bg-dark d-flex align-items-center justify-content-center vh-100">
<main class="w-100" style="max-width: 400px;">
@using (Html.BeginForm("Verify", "login", FormMethod.Post))
{
@Html.AntiForgeryToken()
<h1 class="h3 mb-2 fw-normal text-white text-center">Two-factor authentication</h1>
<p class="text-white-50 text-center mb-3">Enter the 6-digit code from your authenticator app.</p>
if (ViewBag.Error != null)
{
<div class="alert alert-danger py-2">@ViewBag.Error</div>
}
<div class="mb-3">
<input type="text" name="code" class="form-control" maxlength="6" inputmode="numeric" pattern="[0-9]*" autocomplete="one-time-code" autofocus required />
</div>
<button class="btn btn-primary w-100 py-2" type="submit">Verify</button>
<a href="@Url.Action("Index", "login")" class="btn btn-link text-white-50 w-100 mt-2">Back to sign in</a>
}
</main>
</body>
</html>
+3 -5
View File
@@ -1,13 +1,11 @@
@using Resources @{
@{
ViewBag.Title = "index"; ViewBag.Title = "index";
Layout = "~/Views/Shared/_PortfolioLayout.cshtml"; Layout = "~/Views/Shared/_PortfolioLayout.cshtml";
} }
<main class="px-3"> <main class="px-3">
<h1 class="index-title">@Resource.MainH1</h1> <h1 class="index-title">@atakanozbancom.App_GlobalResources.Resource.MainH1</h1>
<div class="wrapper fs-5"> <div class="wrapper fs-5">
@Resource.MainDiv @atakanozbancom.App_GlobalResources.Resource.MainDiv
</div> </div>
</main> </main>
+9
View File
@@ -0,0 +1,9 @@
@using atakanozbancom.Models.classes
@model List<socialicon>
@foreach (var x in Model)
{
<a href="@x.url" class="text-decoration-none text-white-50">
<i class="@x.icon"></i>
</a>
}
+5
View File
@@ -0,0 +1,5 @@
<style>
.background-image {
background-image: url('@ViewBag.WallpaperUrl');
}
</style>
+2 -3
View File
@@ -1,11 +1,10 @@
@using Resources @{
@{
ViewBag.Title = "index"; ViewBag.Title = "index";
Layout = "~/Views/Shared/_PortfolioLayout.cshtml"; Layout = "~/Views/Shared/_PortfolioLayout.cshtml";
} }
<link href="@Url.Content("~/assets/css/style.css")" rel="stylesheet" /> <link href="@Url.Content("~/assets/css/style.css")" rel="stylesheet" />
<main class="px-3"> <main class="px-3">
<h1 class="m-4 text-white">@Resource.MyProjectsTitle</h1> <h1 class="m-4 text-white">@atakanozbancom.App_GlobalResources.Resource.MyProjectsTitle</h1>
@Html.Action("projectposts", "myprojects") @Html.Action("projectposts", "myprojects")
</main> </main>
+323 -31
View File
@@ -1,12 +1,11 @@
@using Resources @model IEnumerable<atakanozbancom.Models.classes.MyProjectsVM>
@model IEnumerable<atakanozbancom.Models.classes.MyProjectVM>
<p class="text-center"> <p class="text-center">
@(Resource.MyProjectsP1) @(atakanozbancom.App_GlobalResources.Resource.MyProjectsP1)
<a href="https://link.atakanozban.com/github" style="text-decoration:none;color:darkgrey;" target="_blank"> <a href="https://git.atakanozban.com/gitea" style="text-decoration:none;color:darkgrey;" target="_blank">
@Resource.GitHub @atakanozbancom.App_GlobalResources.Resource.Gitea
</a> </a>
@Resource.MyProjectsP1_1 @atakanozbancom.App_GlobalResources.Resource.MyProjectsP1_1
</p> </p>
<style> <style>
@@ -38,6 +37,7 @@
width: 100%; width: 100%;
height: auto; height: auto;
object-fit: contain; object-fit: contain;
cursor: zoom-in;
} }
.media-arrow { .media-arrow {
@@ -58,22 +58,100 @@
.carousel-control-next { .carousel-control-next {
right: 1rem; right: 1rem;
} }
.carousel-indicators {
z-index: 6;
}
#projectLightboxModal .modal-dialog {
width: auto;
max-width: calc(100vw - 2rem);
margin: 0.5rem auto;
}
#projectLightboxModal .modal-content {
background: transparent;
width: fit-content;
max-width: 100%;
margin: 0 auto;
}
#projectLightboxModal .modal-body {
padding: 0;
}
#projectLightboxModal .lightbox-stage {
position: relative;
display: inline-block;
max-width: calc(100vw - 2rem);
line-height: 0;
background: #000;
border-radius: 0.35rem;
overflow: hidden;
}
#projectLightboxModal .lightbox-stage img {
display: block;
width: auto;
height: auto;
max-width: calc(100vw - 2rem);
max-height: 85vh;
object-fit: contain;
}
#projectLightboxModal .lightbox-arrow {
position: absolute;
top: 50%;
bottom: auto;
transform: translateY(-50%);
width: 3.5rem;
height: 3.5rem;
opacity: 0.9;
z-index: 2;
}
#projectLightboxModal .lightbox-arrow.carousel-control-prev {
left: 0;
}
#projectLightboxModal .lightbox-arrow.carousel-control-next {
right: 0;
}
#projectLightboxModal .lightbox-indicators {
position: absolute;
left: 0;
right: 0;
bottom: 0.75rem;
margin: 0;
z-index: 2;
}
#projectLightboxModal .lightbox-indicators button {
width: 10px;
height: 10px;
border-radius: 50%;
background-color: rgba(255, 255, 255, .5);
border: 0;
margin: 0 4px;
padding: 0;
}
#projectLightboxModal .lightbox-indicators button.active {
background-color: #fff;
}
#projectLightboxModal .lightbox-close {
position: absolute;
top: 0.6rem;
right: 0.6rem;
z-index: 3;
}
</style> </style>
@foreach (var p in Model) @foreach (var p in Model)
{ {
var media = new List<(string Type, string Url)>(); var media = p.medias ?? new List<atakanozbancom.Models.classes.ProjectMediaVM>();
if (!string.IsNullOrWhiteSpace(p.iframe))
{
media.Add(("iframe", p.iframe));
}
if (!string.IsNullOrWhiteSpace(p.image))
{
media.Add(("image", p.image));
}
var carouselId = $"projCarousel_{p.id}"; var carouselId = $"projCarousel_{p.id}";
var hasMultiple = media.Count > 1; var hasMultiple = media.Count > 1;
@@ -82,6 +160,22 @@
@if (media.Count > 0) @if (media.Count > 0)
{ {
<div id="@carouselId" class="carousel slide" data-bs-ride="carousel"> <div id="@carouselId" class="carousel slide" data-bs-ride="carousel">
@if (hasMultiple)
{
<div class="carousel-indicators">
@for (int i = 0; i < media.Count; i++)
{
<button type="button"
data-bs-target="#@carouselId"
data-bs-slide-to="@i"
class="@(i == 0 ? "active" : "")"
aria-current="@(i == 0 ? "true" : null)"
aria-label="Slide @(i + 1)"></button>
}
</div>
}
<div class="carousel-inner"> <div class="carousel-inner">
@for (int i = 0; i < media.Count; i++) @for (int i = 0; i < media.Count; i++)
@@ -89,16 +183,17 @@
var m = media[i]; var m = media[i];
<div class="carousel-item @(i == 0 ? "active" : "")" <div class="carousel-item @(i == 0 ? "active" : "")"
data-bs-interval="@(m.Type == "iframe" ? "false" : "5000")"> data-bs-interval="false">
@if (m.Type == "iframe") @if (m.type == "iframe")
{ {
<div class="carousel-media-iframe"> <div class="carousel-media-iframe">
<iframe src="@m.Url" <iframe src="@m.url"
loading="lazy" loading="lazy"
referrerpolicy="no-referrer-when-downgrade" allowfullscreen
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="no-referrer"
allowfullscreen></iframe> sandbox="allow-scripts allow-same-origin allow-popups allow-forms"></iframe>
@if (hasMultiple) @if (hasMultiple)
{ {
@@ -120,10 +215,14 @@
} }
</div> </div>
} }
else else if (m.type == "image")
{ {
<div class="carousel-media-image"> <div class="carousel-media-image">
<img src="@m.Url" alt="@p.title" /> <img src="@m.url"
alt="@p.title"
class="project-lightbox-trigger"
data-fullsrc="@m.url"
data-gallery="@carouselId" />
@if (hasMultiple) @if (hasMultiple)
{ {
@@ -131,20 +230,33 @@
type="button" type="button"
data-bs-target="#@carouselId" data-bs-target="#@carouselId"
data-bs-slide="prev"> data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span> <span class="carousel-control-prev-icon"></span>
<span class="visually-hidden">Previous</span>
</button> </button>
<button class="carousel-control-next media-arrow" <button class="carousel-control-next media-arrow"
type="button" type="button"
data-bs-target="#@carouselId" data-bs-target="#@carouselId"
data-bs-slide="next"> data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span> <span class="carousel-control-next-icon"></span>
<span class="visually-hidden">Next</span>
</button> </button>
} }
</div> </div>
} }
@*else if (m.type == "video")
{
<video class="d-block w-100" controls preload="metadata">
<source src="@m.url" type="video/mp4" />
</video>
}*@
@*else if (m.type == "document")
{
<div class="ratio ratio-4x3">
<iframe src="@m.url"></iframe>
</div>
<div class="text-center mt-2">
<a href="@m.url" target="_blank">Open document</a>
</div>
}*@
</div> </div>
} }
@@ -154,7 +266,187 @@
} }
<h3 class="mt-3 text-center">@p.title</h3> <h3 class="mt-3 text-center">@p.title</h3>
<p class="lead mb-5 text-center">@Html.Raw(p.description)</p> <p class="lead mb-5 text-center">@Html.Raw(atakanozbancom.Models.classes.DescriptionFormatter.ToSafeHtml(p.description))</p>
</div> </div>
} }
<div class="modal fade" id="projectLightboxModal" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content border-0 shadow-none">
<div class="modal-body">
<div class="lightbox-stage">
<button type="button" class="btn-close btn-close-white lightbox-close" data-bs-dismiss="modal" aria-label="Close"></button>
<img id="projectLightboxImg" src="" alt="" />
<button type="button" id="lightboxPrev" class="carousel-control-prev lightbox-arrow" aria-label="Previous">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
</button>
<button type="button" id="lightboxNext" class="carousel-control-next lightbox-arrow" aria-label="Next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
</button>
<div id="lightboxIndicators" class="carousel-indicators lightbox-indicators d-none"></div>
</div>
</div>
</div>
</div>
</div>
<script>
(function () {
var items = [];
var index = 0;
var modalEl = null;
var imgEl = null;
var stageEl = null;
var dialogEl = null;
var indicatorsEl = null;
var prevBtn = null;
var nextBtn = null;
function getEls() {
modalEl = document.getElementById('projectLightboxModal');
imgEl = document.getElementById('projectLightboxImg');
indicatorsEl = document.getElementById('lightboxIndicators');
prevBtn = document.getElementById('lightboxPrev');
nextBtn = document.getElementById('lightboxNext');
stageEl = modalEl ? modalEl.querySelector('.lightbox-stage') : null;
dialogEl = modalEl ? modalEl.querySelector('.modal-dialog') : null;
return modalEl && imgEl && indicatorsEl && prevBtn && nextBtn && stageEl && dialogEl;
}
function fitToImage() {
var maxW = Math.max(window.innerWidth - 32, 200);
var maxH = Math.max(window.innerHeight * 0.85, 200);
var nw = imgEl.naturalWidth || 0;
var nh = imgEl.naturalHeight || 0;
if (!nw || !nh) return;
var scale = Math.min(maxW / nw, maxH / nh, 1);
var w = Math.round(nw * scale);
var h = Math.round(nh * scale);
imgEl.style.width = w + 'px';
imgEl.style.height = h + 'px';
stageEl.style.width = w + 'px';
stageEl.style.height = h + 'px';
dialogEl.style.width = w + 'px';
dialogEl.style.maxWidth = w + 'px';
}
function showSlide(i) {
if (!items.length) return;
index = (i + items.length) % items.length;
var item = items[index];
imgEl.onload = fitToImage;
imgEl.src = item.src;
imgEl.alt = item.alt;
if (imgEl.complete && imgEl.naturalWidth) fitToImage();
var dots = indicatorsEl.querySelectorAll('button');
for (var d = 0; d < dots.length; d++) {
dots[d].classList.toggle('active', d === index);
if (d === index) dots[d].setAttribute('aria-current', 'true');
else dots[d].removeAttribute('aria-current');
}
}
function buildIndicators() {
indicatorsEl.innerHTML = '';
if (items.length < 2) {
indicatorsEl.classList.add('d-none');
prevBtn.classList.add('d-none');
nextBtn.classList.add('d-none');
return;
}
indicatorsEl.classList.remove('d-none');
prevBtn.classList.remove('d-none');
nextBtn.classList.remove('d-none');
for (var i = 0; i < items.length; i++) {
(function (slideIndex) {
var btn = document.createElement('button');
btn.type = 'button';
btn.setAttribute('aria-label', 'Slide ' + (slideIndex + 1));
if (slideIndex === index) {
btn.classList.add('active');
btn.setAttribute('aria-current', 'true');
}
btn.addEventListener('click', function () { showSlide(slideIndex); });
indicatorsEl.appendChild(btn);
})(i);
}
}
document.addEventListener('click', function (e) {
var trigger = e.target.closest('.project-lightbox-trigger');
if (!trigger) return;
if (typeof bootstrap === 'undefined') return;
if (!getEls()) return;
e.preventDefault();
var gallery = trigger.getAttribute('data-gallery');
var galleryImgs = gallery
? document.querySelectorAll('.project-lightbox-trigger[data-gallery="' + gallery + '"]')
: [trigger];
items = [];
index = 0;
for (var i = 0; i < galleryImgs.length; i++) {
var img = galleryImgs[i];
items.push({
src: img.getAttribute('data-fullsrc') || img.src,
alt: img.alt || ''
});
if (img === trigger) index = i;
}
buildIndicators();
showSlide(index);
bootstrap.Modal.getOrCreateInstance(modalEl).show();
});
document.addEventListener('click', function (e) {
if (e.target.closest('#lightboxPrev')) {
e.preventDefault();
showSlide(index - 1);
} else if (e.target.closest('#lightboxNext')) {
e.preventDefault();
showSlide(index + 1);
}
});
document.addEventListener('keydown', function (e) {
if (!modalEl || !modalEl.classList.contains('show')) return;
if (e.key === 'ArrowLeft') showSlide(index - 1);
if (e.key === 'ArrowRight') showSlide(index + 1);
});
window.addEventListener('resize', function () {
if (modalEl && modalEl.classList.contains('show')) fitToImage();
});
document.addEventListener('hidden.bs.modal', function (e) {
if (e.target.id !== 'projectLightboxModal') return;
if (!imgEl) getEls();
if (imgEl) {
imgEl.onload = null;
imgEl.removeAttribute('src');
imgEl.style.width = '';
imgEl.style.height = '';
}
if (stageEl) {
stageEl.style.width = '';
stageEl.style.height = '';
}
if (dialogEl) {
dialogEl.style.width = '';
dialogEl.style.maxWidth = '';
}
items = [];
index = 0;
});
})();
</script>
+35
View File
@@ -0,0 +1,35 @@
@model List<atakanozbancom.Models.classes.AffiliateLinkVM>
@{
ViewBag.Title = "index";
Layout = "~/Views/Shared/_PortfolioLayout.cshtml";
}
<main class="px-3">
<h1 class="mb-3">@atakanozbancom.App_GlobalResources.Resource.AffiliateLinksTitle</h1>
<p class="mb-4 text-white">@atakanozbancom.App_GlobalResources.Resource.AffiliateLinksIntro</p>
@if (Model != null && Model.Any())
{
<div class="affiliate-list mb-5">
@foreach (var link in Model)
{
<a class="affiliate-card" href="@link.url" target="_blank" rel="nofollow sponsored noopener">
<img class="affiliate-logo" src="@link.image" alt="@link.title" loading="lazy" />
<div class="affiliate-text">
<div class="affiliate-title">@link.title</div>
@if (!string.IsNullOrWhiteSpace(link.description))
{
<div class="affiliate-desc">@link.description</div>
}
</div>
</a>
}
</div>
}
else
{
<p class="mb-5 text-start">
@atakanozbancom.App_GlobalResources.Resource.AffiliateLinksComingSoon
</p>
}
</main>
+97 -77
View File
@@ -1,80 +1,100 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<configSections> <configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections> </configSections>
<appSettings>
<add key="webpages:Version" value="3.0.0.0" /> <appSettings>
<add key="webpages:Enabled" value="false" /> <add key="webpages:Version" value="3.0.0.0" />
<add key="ClientValidationEnabled" value="true" /> <add key="webpages:Enabled" value="false" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" /> <add key="ClientValidationEnabled" value="true" />
</appSettings> <add key="UnobtrusiveJavaScriptEnabled" value="true" />
<system.web> </appSettings>
<machineKey validationKey="317412946B993448C673500FE9A36F856519ABFC991E4476091AE530AA2DCE25BDFCF3E9251279FA95F898D84AAD6656B68127FC8EA62B1487EBD07D1B4A5653" decryptionKey="33D1829CBAA044E19E39B70253390BB66DBCB59FCC8946F3EA122F87A289EE85" validation="HMACSHA256" decryption="AES" />
<customErrors mode="Off" /> <system.web>
<compilation targetFramework="4.7.2" debug="true" /> <httpRuntime maxRequestLength="25600" executionTimeout="600" />
<httpRuntime targetFramework="4.7.2" /> <machineKey validationKey="317412946B993448C673500FE9A36F856519ABFC991E4476091AE530AA2DCE25BDFCF3E9251279FA95F898D84AAD6656B68127FC8EA62B1487EBD07D1B4A5653"
<authentication mode="Forms"> decryptionKey="33D1829CBAA044E19E39B70253390BB66DBCB59FCC8946F3EA122F87A289EE85"
<forms loginUrl="/login/index" /> validation="HMACSHA256"
</authentication> decryption="AES" />
</system.web> <customErrors mode="RemoteOnly" />
<runtime> <compilation targetFramework="4.7.2" debug="true" />
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly> <authentication mode="Forms">
<assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f" /> <forms loginUrl="/login/index" requireSSL="true" cookieless="UseCookies" timeout="60" slidingExpiration="true" />
<bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2" /> </authentication>
</dependentAssembly> <httpCookies httpOnlyCookies="true" requireSSL="true" />
<dependentAssembly> </system.web>
<assemblyIdentity name="Microsoft.Web.Infrastructure" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" /> <runtime>
</dependentAssembly> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" /> <assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f" />
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" /> <bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" /> <assemblyIdentity name="Microsoft.Web.Infrastructure" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" /> <bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" /> <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" />
<bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" /> <bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" /> <assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" /> <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> <bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" /> <assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="1.0.0.0-5.2.9.0" newVersion="5.2.9.0" /> <bindingRedirect oldVersion="0.0.0.0-4.0.4.0" newVersion="4.0.4.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.4.0" newVersion="4.0.4.0" /> <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" /> <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly> </dependentAssembly>
</assemblyBinding> <dependentAssembly>
</runtime> <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<system.codedom> <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
<compilers> </dependentAssembly>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" /> <dependentAssembly>
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+" /> <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
</compilers> <bindingRedirect oldVersion="1.0.0.0-5.2.9.0" newVersion="5.2.9.0" />
</system.codedom> </dependentAssembly>
<entityFramework> </assemblyBinding>
<providers> </runtime>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers> <system.codedom>
</entityFramework> <compilers>
<connectionStrings> <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" />
<add name="Context" connectionString="Data Source=DESKTOP-JT8FHO1\SQLEXPRESS; Initial Catalog=atakanozbancomdb; Integrated Security=true;" providerName="System.Data.SqlClient" /> <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+" />
<!--<add name="Context" connectionString="Data Source=.\MSSQLSERVER2022;Initial Catalog=atakanozbancomdb;User ID=atakan;Password=N_758ue8u" providerName="System.Data.SqlClient"/>--> </compilers>
</connectionStrings> </system.codedom>
<entityFramework>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
<connectionStrings>
<add name="Context" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=atakanozbancomdb;Integrated Security=true;" providerName="System.Data.SqlClient"/>
</connectionStrings>
<!-- IIS 413.1 FIX -->
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="26214400" />
</requestFiltering>
</security>
</system.webServer>
</configuration> </configuration>
+83 -139
View File
@@ -17,7 +17,7 @@
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<MvcBuildViews>false</MvcBuildViews> <MvcBuildViews>false</MvcBuildViews>
<UseIISExpress>true</UseIISExpress> <UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress /> <Use64BitIISExpress>false</Use64BitIISExpress>
<IISExpressSSLPort>44329</IISExpressSSLPort> <IISExpressSSLPort>44329</IISExpressSSLPort>
<IISExpressAnonymousAuthentication /> <IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication /> <IISExpressWindowsAuthentication />
@@ -45,6 +45,9 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f, processorArchitecture=MSIL">
<HintPath>packages\Antlr.3.5.0.2\lib\Antlr3.Runtime.dll</HintPath>
</Reference>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>packages\EntityFramework.6.5.1\lib\net45\EntityFramework.dll</HintPath> <HintPath>packages\EntityFramework.6.5.1\lib\net45\EntityFramework.dll</HintPath>
</Reference> </Reference>
@@ -73,6 +76,12 @@
<Reference Include="Microsoft.Net.Http.Headers, Version=2.3.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> <Reference Include="Microsoft.Net.Http.Headers, Version=2.3.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.Net.Http.Headers.2.3.0\lib\netstandard2.0\Microsoft.Net.Http.Headers.dll</HintPath> <HintPath>packages\Microsoft.Net.Http.Headers.2.3.0\lib\netstandard2.0\Microsoft.Net.Http.Headers.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.Web.Infrastructure, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.Web.Infrastructure.2.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.Buffers, Version=4.0.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>packages\System.Buffers.4.6.0\lib\net462\System.Buffers.dll</HintPath> <HintPath>packages\System.Buffers.4.6.0\lib\net462\System.Buffers.dll</HintPath>
@@ -98,6 +107,27 @@
<Reference Include="System.ComponentModel.DataAnnotations" /> <Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.AspNet.WebPages.3.2.9\lib\net45\System.Web.Helpers.dll</HintPath>
</Reference>
<Reference Include="System.Web.Mvc, Version=5.2.9.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.AspNet.Mvc.5.2.9\lib\net45\System.Web.Mvc.dll</HintPath>
</Reference>
<Reference Include="System.Web.Optimization, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.AspNet.Web.Optimization.1.1.3\lib\net40\System.Web.Optimization.dll</HintPath>
</Reference>
<Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.AspNet.Razor.3.2.9\lib\net45\System.Web.Razor.dll</HintPath>
</Reference>
<Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.AspNet.WebPages.3.2.9\lib\net45\System.Web.WebPages.dll</HintPath>
</Reference>
<Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.AspNet.WebPages.3.2.9\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
</Reference>
<Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.AspNet.WebPages.3.2.9\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Web" /> <Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" /> <Reference Include="System.Web.Extensions" />
@@ -107,52 +137,13 @@
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />
<Reference Include="System.Web.Services" /> <Reference Include="System.Web.Services" />
<Reference Include="System.EnterpriseServices" /> <Reference Include="System.EnterpriseServices" />
<Reference Include="Microsoft.Web.Infrastructure, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>packages\Microsoft.Web.Infrastructure.2.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http"> <Reference Include="System.Net.Http">
</Reference> </Reference>
<Reference Include="System.Net.Http.WebRequest"> <Reference Include="System.Net.Http.WebRequest">
</Reference> </Reference>
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <Reference Include="WebGrease, Version=1.6.5135.21930, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>packages\Microsoft.AspNet.WebPages.3.2.9\lib\net45\System.Web.Helpers.dll</HintPath>
</Reference>
<Reference Include="System.Web.Mvc, Version=5.2.9.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>packages\Microsoft.AspNet.Mvc.5.2.9\lib\net45\System.Web.Mvc.dll</HintPath>
</Reference>
<Reference Include="System.Web.Optimization">
<HintPath>packages\Microsoft.AspNet.Web.Optimization.1.1.3\lib\net40\System.Web.Optimization.dll</HintPath>
</Reference>
<Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>packages\Microsoft.AspNet.Razor.3.2.9\lib\net45\System.Web.Razor.dll</HintPath>
</Reference>
<Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>packages\Microsoft.AspNet.WebPages.3.2.9\lib\net45\System.Web.WebPages.dll</HintPath>
</Reference>
<Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>packages\Microsoft.AspNet.WebPages.3.2.9\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
</Reference>
<Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>packages\Microsoft.AspNet.WebPages.3.2.9\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="WebGrease">
<Private>True</Private>
<HintPath>packages\WebGrease.1.6.0\lib\WebGrease.dll</HintPath> <HintPath>packages\WebGrease.1.6.0\lib\WebGrease.dll</HintPath>
</Reference> </Reference>
<Reference Include="Antlr3.Runtime">
<Private>True</Private>
<HintPath>packages\Antlr.3.5.0.2\lib\Antlr3.Runtime.dll</HintPath>
</Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="App_GlobalResources\Resource.Designer.cs"> <Compile Include="App_GlobalResources\Resource.Designer.cs">
@@ -165,6 +156,7 @@
<Compile Include="App_Start\RouteConfig.cs" /> <Compile Include="App_Start\RouteConfig.cs" />
<Compile Include="Controllers\aboutController.cs" /> <Compile Include="Controllers\aboutController.cs" />
<Compile Include="Controllers\adminController.cs" /> <Compile Include="Controllers\adminController.cs" />
<Compile Include="Controllers\supportController.cs" />
<Compile Include="Controllers\loginController.cs" /> <Compile Include="Controllers\loginController.cs" />
<Compile Include="Controllers\mainController.cs" /> <Compile Include="Controllers\mainController.cs" />
<Compile Include="Controllers\languageController.cs" /> <Compile Include="Controllers\languageController.cs" />
@@ -179,23 +171,26 @@
<Compile Include="Migrations\Configuration.cs" /> <Compile Include="Migrations\Configuration.cs" />
<Compile Include="Models\classes\admin.cs" /> <Compile Include="Models\classes\admin.cs" />
<Compile Include="Models\classes\AdminMyProjectsEditVM.cs" /> <Compile Include="Models\classes\AdminMyProjectsEditVM.cs" />
<Compile Include="Models\classes\affiliatelink.cs" />
<Compile Include="Models\classes\affiliatelinktranslation.cs" />
<Compile Include="Models\classes\AdminAffiliateLinkVM.cs" />
<Compile Include="Models\classes\AffiliateLinkVM.cs" />
<Compile Include="Models\classes\AdminSocialIconVM.cs" />
<Compile Include="Models\classes\socialicon.cs" />
<Compile Include="Models\classes\sitesetting.cs" />
<Compile Include="Models\classes\DescriptionFormatter.cs" />
<Compile Include="Models\classes\TotpHelper.cs" />
<Compile Include="Models\classes\PasswordHasher.cs" />
<Compile Include="Models\classes\SecretProtector.cs" />
<Compile Include="Models\classes\Context.cs" /> <Compile Include="Models\classes\Context.cs" />
<Compile Include="Models\classes\LanguageTR.cs" /> <Compile Include="Models\classes\LanguageTR.cs" />
<Compile Include="Models\classes\myprojects.cs" /> <Compile Include="Models\classes\myprojects.cs" />
<Compile Include="Models\classes\myprojectstranslation.cs" /> <Compile Include="Models\classes\myprojectstranslation.cs" />
<Compile Include="Models\classes\MyProjectVM.cs" /> <Compile Include="Models\classes\MyProjectVM.cs" />
<Compile Include="Models\classes\ProjectMediaVM.cs" /> <Compile Include="Models\classes\projectmedia.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="web_atakanozbancom\about.html" />
<Content Include="web_atakanozbancom\assets\css\style.css" />
<Content Include="web_atakanozbancom\assets\img\wp.jpg" />
<Content Include="web_atakanozbancom\contact.html" />
<Content Include="web_atakanozbancom\index.html" />
<Content Include="web_panel\index.html" />
<Content Include="web_panel\style.css" />
<Content Include="web_atakanozbancom\projects.html" />
<Content Include="Content\bootstrap-grid.css" /> <Content Include="Content\bootstrap-grid.css" />
<Content Include="Content\bootstrap-grid.min.css" /> <Content Include="Content\bootstrap-grid.min.css" />
<Content Include="Content\bootstrap-grid.rtl.css" /> <Content Include="Content\bootstrap-grid.rtl.css" />
@@ -212,88 +207,12 @@
<Content Include="Content\bootstrap.min.css" /> <Content Include="Content\bootstrap.min.css" />
<Content Include="Content\bootstrap.rtl.css" /> <Content Include="Content\bootstrap.rtl.css" />
<Content Include="Content\bootstrap.rtl.min.css" /> <Content Include="Content\bootstrap.rtl.min.css" />
<Content Include="favicon.ico" />
<Content Include="Global.asax" />
<Content Include="Content\Site.css" />
<Content Include="Scripts\bootstrap.bundle.js" /> <Content Include="Scripts\bootstrap.bundle.js" />
<Content Include="Scripts\bootstrap.bundle.min.js" /> <Content Include="Scripts\bootstrap.bundle.min.js" />
<Content Include="Scripts\bootstrap.esm.js" /> <Content Include="Scripts\bootstrap.esm.js" />
<Content Include="Scripts\bootstrap.esm.min.js" /> <Content Include="Scripts\bootstrap.esm.min.js" />
<Content Include="Scripts\bootstrap.js" /> <Content Include="Scripts\bootstrap.js" />
<Content Include="Scripts\bootstrap.min.js" /> <Content Include="Scripts\bootstrap.min.js" />
<Content Include="web_atakanozbancom\phpmailer\.editorconfig" />
<Content Include="web_atakanozbancom\phpmailer\COMMITMENT" />
<Content Include="web_atakanozbancom\phpmailer\composer.json" />
<Content Include="web_atakanozbancom\phpmailer\form.php" />
<Content Include="web_atakanozbancom\phpmailer\get_oauth_token.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-af.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-ar.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-as.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-az.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-ba.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-be.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-bg.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-bn.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-ca.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-cs.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-da.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-de.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-el.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-eo.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-es.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-et.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-fa.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-fi.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-fo.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-fr.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-gl.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-he.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-hi.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-hr.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-hu.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-hy.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-id.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-it.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-ja.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-ka.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-ko.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-ku.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-lt.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-lv.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-mg.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-mn.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-ms.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-nb.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-nl.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-pl.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-pt.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-pt_br.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-ro.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-ru.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-si.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-sk.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-sl.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-sr.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-sr_latn.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-sv.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-tl.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-tr.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-uk.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-ur.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-vi.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-zh.php" />
<Content Include="web_atakanozbancom\phpmailer\language\phpmailer.lang-zh_cn.php" />
<Content Include="web_atakanozbancom\phpmailer\LICENSE" />
<Content Include="web_atakanozbancom\phpmailer\README.md" />
<Content Include="web_atakanozbancom\phpmailer\SECURITY.md" />
<Content Include="web_atakanozbancom\phpmailer\src\DSNConfigurator.php" />
<Content Include="web_atakanozbancom\phpmailer\src\Exception.php" />
<Content Include="web_atakanozbancom\phpmailer\src\OAuth.php" />
<Content Include="web_atakanozbancom\phpmailer\src\OAuthTokenProvider.php" />
<Content Include="web_atakanozbancom\phpmailer\src\PHPMailer.php" />
<Content Include="web_atakanozbancom\phpmailer\src\POP3.php" />
<Content Include="web_atakanozbancom\phpmailer\src\SMTP.php" />
<Content Include="web_atakanozbancom\phpmailer\VERSION" />
<None Include="Scripts\jquery-3.7.0.intellisense.js" /> <None Include="Scripts\jquery-3.7.0.intellisense.js" />
<Content Include="Scripts\jquery-3.7.0.js" /> <Content Include="Scripts\jquery-3.7.0.js" />
<Content Include="Scripts\jquery-3.7.0.min.js" /> <Content Include="Scripts\jquery-3.7.0.min.js" />
@@ -305,6 +224,18 @@
<Content Include="Scripts\jquery.validate.unobtrusive.js" /> <Content Include="Scripts\jquery.validate.unobtrusive.js" />
<Content Include="Scripts\jquery.validate.unobtrusive.min.js" /> <Content Include="Scripts\jquery.validate.unobtrusive.min.js" />
<Content Include="Scripts\modernizr-2.8.3.js" /> <Content Include="Scripts\modernizr-2.8.3.js" />
<Content Include="web_atakanozbancom\about.html" />
<Content Include="web_atakanozbancom\assets\css\style.css" />
<Content Include="web_atakanozbancom\assets\img\wp.jpg" />
<Content Include="web_atakanozbancom\assets\js\paste-upload.js" />
<Content Include="web_atakanozbancom\contact.html" />
<Content Include="web_atakanozbancom\index.html" />
<Content Include="web_panel\index.html" />
<Content Include="web_panel\style.css" />
<Content Include="web_atakanozbancom\projects.html" />
<Content Include="favicon.ico" />
<Content Include="Global.asax" />
<Content Include="Content\Site.css" />
<Content Include="Web.config" /> <Content Include="Web.config" />
<Content Include="Web.Debug.config"> <Content Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon> <DependentUpon>Web.config</DependentUpon>
@@ -314,23 +245,46 @@
</Content> </Content>
<Content Include="Views\Web.config" /> <Content Include="Views\Web.config" />
<Content Include="Views\Shared\Error.cshtml" /> <Content Include="Views\Shared\Error.cshtml" />
<Content Include="Views\Home\About.cshtml" />
<Content Include="Views\Home\Contact.cshtml" />
<Content Include="Views\Home\Index.cshtml" />
<Content Include="Views\myprojects\projectposts.cshtml" /> <Content Include="Views\myprojects\projectposts.cshtml" />
<Content Include="Views\Shared\_AdminLayout.cshtml" /> <Content Include="Views\Shared\_AdminLayout.cshtml" />
<Content Include="Views\admin\index.cshtml" /> <Content Include="Views\admin\index.cshtml" />
<Content Include="Views\admin\myprojects.cshtml" />
<Content Include="Views\admin\myprojectsget.cshtml" /> <Content Include="Views\admin\myprojectsget.cshtml" />
<Content Include="Views\admin\newmppost.cshtml" /> <Content Include="Views\admin\newmppost.cshtml" />
<Content Include="Views\admin\affiliatelinks.cshtml" />
<Content Include="Views\admin\newaffiliatepost.cshtml" />
<Content Include="Views\admin\affiliatelinkget.cshtml" />
<Content Include="Views\admin\socialicons.cshtml" />
<Content Include="Views\admin\newsocialicon.cshtml" />
<Content Include="Views\admin\socialiconget.cshtml" />
<Content Include="Views\admin\wallpaper.cshtml" />
<Content Include="Views\admin\usersettings.cshtml" />
<Content Include="Views\admin\security.cshtml" />
<Content Include="Views\login\index.cshtml" /> <Content Include="Views\login\index.cshtml" />
<Content Include="Views\login\verify.cshtml" />
<Content Include="Views\Shared\_PortfolioLayout.cshtml" /> <Content Include="Views\Shared\_PortfolioLayout.cshtml" />
<Content Include="Views\about\index.cshtml" /> <Content Include="Views\about\index.cshtml" />
<Content Include="Views\support\index.cshtml" />
<Content Include="Views\main\index.cshtml" /> <Content Include="Views\main\index.cshtml" />
<Content Include="Views\main\socialicons.cshtml" />
<Content Include="Views\main\wallpaper.cshtml" />
<Content Include="Views\myprojects\index.cshtml" /> <Content Include="Views\myprojects\index.cshtml" />
<Content Include="Views\_ViewStart.cshtml" />
<Content Include="Views\Shared\Index.cshtml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="App_Data\" /> <Folder Include="App_Data\" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Migrations\202504272001072_InitialCreate.resx">
<DependentUpon>202504272001072_InitialCreate.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="App_GlobalResources\Resource.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Resource.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="App_GlobalResources\Resource.tr-TR.resx" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="Content\bootstrap.rtl.min.css.map" /> <Content Include="Content\bootstrap.rtl.min.css.map" />
<Content Include="Content\bootstrap.rtl.css.map" /> <Content Include="Content\bootstrap.rtl.css.map" />
@@ -358,16 +312,6 @@
<Content Include="Scripts\jquery-3.7.0.slim.min.map" /> <Content Include="Scripts\jquery-3.7.0.slim.min.map" />
<Content Include="Scripts\jquery-3.7.0.min.map" /> <Content Include="Scripts\jquery-3.7.0.min.map" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Migrations\202504272001072_InitialCreate.resx">
<DependentUpon>202504272001072_InitialCreate.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="App_GlobalResources\Resource.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Resource.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="App_GlobalResources\Resource.tr-TR.resx" />
</ItemGroup>
<PropertyGroup> <PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion> <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
+8
View File
@@ -0,0 +1,8 @@
IF COL_LENGTH('dbo.admins', 'two_factor_enabled') IS NULL
BEGIN
ALTER TABLE dbo.admins ADD two_factor_enabled BIT NOT NULL CONSTRAINT DF_admins_two_factor_enabled DEFAULT(0);
END
IF COL_LENGTH('dbo.admins', 'two_factor_secret') IS NULL
BEGIN
ALTER TABLE dbo.admins ADD two_factor_secret NVARCHAR(64) NULL;
END
+24
View File
@@ -0,0 +1,24 @@
IF COL_LENGTH('dbo.admins', 'two_factor_secret') IS NOT NULL
BEGIN
ALTER TABLE dbo.admins ALTER COLUMN two_factor_secret NVARCHAR(512) NULL;
END
IF COL_LENGTH('dbo.admins', 'password') IS NOT NULL
BEGIN
ALTER TABLE dbo.admins ALTER COLUMN password NVARCHAR(255) NOT NULL;
END
IF COL_LENGTH('dbo.admins', 'login_failed_count') IS NULL
BEGIN
ALTER TABLE dbo.admins ADD login_failed_count INT NOT NULL CONSTRAINT DF_admins_login_failed_count DEFAULT(0);
END
IF COL_LENGTH('dbo.admins', 'login_lock_until') IS NULL
BEGIN
ALTER TABLE dbo.admins ADD login_lock_until DATETIME2 NULL;
END
IF COL_LENGTH('dbo.admins', 'totp_failed_count') IS NULL
BEGIN
ALTER TABLE dbo.admins ADD totp_failed_count INT NOT NULL CONSTRAINT DF_admins_totp_failed_count DEFAULT(0);
END
IF COL_LENGTH('dbo.admins', 'totp_lock_until') IS NULL
BEGIN
ALTER TABLE dbo.admins ADD totp_lock_until DATETIME2 NULL;
END
-27
View File
@@ -1,27 +0,0 @@
@model atakanozbancomtr.Models.classes.myprojects
@{
ViewBag.Title = "myprojectsget";
Layout = "~/Views/Shared/_AdminLayout.cshtml";
}
<h2 class="mt-3 text-white">My Projects Edit Post</h2>
@using (Html.BeginForm("myprojectsupdate", "admin", FormMethod.Post))
{
@Html.LabelFor(x => x.id, new { @class = "text-white" })
@Html.TextBoxFor(x => x.id, new { @class = "form-control bg-dark text-white", @readonly = "readonly" })
<br />
@Html.LabelFor(x => x.title, new { @class = "text-white" })
@Html.TextBoxFor(x => x.title, new { @class = "form-control bg-dark text-white required" })
<br />
@Html.LabelFor(x => x.description, new { @class = "text-white" })
@Html.TextAreaFor(x => x.description, new { @class = "form-control bg-dark text-white required" })
<br />
@Html.LabelFor(x => x.image, new { @class = "text-white" })
@Html.TextBoxFor(x => x.image, new { @class = "form-control bg-dark text-white required" })
<br />
@Html.LabelFor(x => x.iframe, new { @class = "text-white" })
@Html.TextBoxFor(x => x.iframe, new { @class = "form-control bg-dark text-white" })
<br />
<button class="btn btn-success">Save</button>
}
+59
View File
@@ -78,3 +78,62 @@ body {
.project-iframe { .project-iframe {
border: 0; border: 0;
} }
/*
* Affiliate links
*/
.affiliate-list {
display: flex;
flex-direction: column;
gap: 0.9rem;
}
.affiliate-card {
display: flex;
align-items: center;
gap: 1rem;
padding: 0.85rem 1.1rem;
border-radius: 0.75rem;
background-color: rgba(255, 255, 255, .05);
border: 1px solid rgba(255, 255, 255, .1);
text-decoration: none;
color: inherit;
text-align: left;
transition: transform .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.affiliate-card:hover,
.affiliate-card:focus {
background-color: rgba(255, 255, 255, .1);
border-color: rgba(255, 255, 255, .3);
transform: translateY(-3px);
box-shadow: 0 .5rem 1.25rem rgba(0, 0, 0, .3);
color: inherit;
text-decoration: none;
}
.affiliate-logo {
flex-shrink: 0;
width: 3rem;
height: 3rem;
object-fit: contain;
background: #fff;
border-radius: 0.5rem;
padding: 0.25rem;
}
.affiliate-text {
min-width: 0;
}
.affiliate-title {
font-weight: 700;
color: #fff;
}
.affiliate-desc {
color: rgba(255, 255, 255, .6);
font-size: 0.9rem;
margin-top: 0.1rem;
}
@@ -0,0 +1,75 @@
var PasteImageModal = (function () {
var bsModal, targetEl, previewEl, defaultText;
var currentInputSelector, currentPreviewSelector;
function init() {
var modalEl = document.getElementById('pasteImageModal');
if (!modalEl || typeof bootstrap === 'undefined') return false;
targetEl = document.getElementById('pasteImageTarget');
previewEl = document.getElementById('pasteImageModalPreview');
defaultText = targetEl.textContent;
bsModal = new bootstrap.Modal(modalEl);
modalEl.addEventListener('shown.bs.modal', function () {
targetEl.textContent = defaultText;
previewEl.style.display = 'none';
previewEl.removeAttribute('src');
targetEl.focus();
});
targetEl.addEventListener('paste', function (e) {
var clipboard = e.clipboardData || window.clipboardData;
var items = clipboard ? clipboard.items : null;
if (!items) return;
for (var i = 0; i < items.length; i++) {
var item = items[i];
if (item.kind === 'file' && item.type.indexOf('image/') === 0) {
e.preventDefault();
var blob = item.getAsFile();
if (!blob) continue;
var ext = (blob.type.split('/')[1] || 'png').toLowerCase();
var pastedFile = new File([blob], 'pasted-image-' + Date.now() + '.' + ext, { type: blob.type });
var input = document.querySelector(currentInputSelector);
if (input) {
var dt = new DataTransfer();
dt.items.add(pastedFile);
input.files = dt.files;
input.dispatchEvent(new Event('change', { bubbles: true }));
}
var url = URL.createObjectURL(pastedFile);
previewEl.src = url;
previewEl.style.display = '';
targetEl.textContent = 'Image pasted!';
if (currentPreviewSelector) {
var extPreview = document.querySelector(currentPreviewSelector);
if (extPreview) {
extPreview.src = url;
extPreview.style.display = '';
}
}
setTimeout(function () { bsModal.hide(); }, 400);
break;
}
}
});
return true;
}
function open(inputSelector, previewSelector) {
if (!bsModal && !init()) return;
currentInputSelector = inputSelector;
currentPreviewSelector = previewSelector || null;
bsModal.show();
}
return { open: open };
})();
@@ -1,15 +0,0 @@
root = true
[*]
charset = utf-8
indent_size = 4
indent_style = space
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false
[*.{yml,yaml}]
indent_size = 2
-46
View File
@@ -1,46 +0,0 @@
GPL Cooperation Commitment
Version 1.0
Before filing or continuing to prosecute any legal proceeding or claim
(other than a Defensive Action) arising from termination of a Covered
License, we commit to extend to the person or entity ('you') accused
of violating the Covered License the following provisions regarding
cure and reinstatement, taken from GPL version 3. As used here, the
term 'this License' refers to the specific Covered License being
enforced.
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly
and finally terminates your license, and (b) permanently, if the
copyright holder fails to notify you of the violation by some
reasonable means prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you
have received notice of violation of this License (for any work)
from that copyright holder, and you cure the violation prior to 30
days after your receipt of the notice.
We intend this Commitment to be irrevocable, and binding and
enforceable against us and assignees of or successors to our
copyrights.
Definitions
'Covered License' means the GNU General Public License, version 2
(GPLv2), the GNU Lesser General Public License, version 2.1
(LGPLv2.1), or the GNU Library General Public License, version 2
(LGPLv2), all as published by the Free Software Foundation.
'Defensive Action' means a legal proceeding or claim that We bring
against you in response to a prior proceeding or claim initiated by
you or your affiliate.
'We' means each contributor to this repository as of the date of
inclusion of this file, including subsidiaries of a corporate
contributor.
This work is available under a Creative Commons Attribution-ShareAlike
4.0 International license (https://creativecommons.org/licenses/by-sa/4.0/).
-502
View File
@@ -1,502 +0,0 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
-231
View File
@@ -1,231 +0,0 @@
[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://supportukrainenow.org/)
![PHPMailer](https://raw.github.com/PHPMailer/PHPMailer/master/examples/images/phpmailer.png)
# PHPMailer A full-featured email creation and transfer class for PHP
[![Test status](https://github.com/PHPMailer/PHPMailer/workflows/Tests/badge.svg)](https://github.com/PHPMailer/PHPMailer/actions)
[![codecov.io](https://codecov.io/gh/PHPMailer/PHPMailer/branch/master/graph/badge.svg?token=iORZpwmYmM)](https://codecov.io/gh/PHPMailer/PHPMailer)
[![Latest Stable Version](https://poser.pugx.org/phpmailer/phpmailer/v/stable.svg)](https://packagist.org/packages/phpmailer/phpmailer)
[![Total Downloads](https://poser.pugx.org/phpmailer/phpmailer/downloads)](https://packagist.org/packages/phpmailer/phpmailer)
[![License](https://poser.pugx.org/phpmailer/phpmailer/license.svg)](https://packagist.org/packages/phpmailer/phpmailer)
[![API Docs](https://github.com/phpmailer/phpmailer/workflows/Docs/badge.svg)](https://phpmailer.github.io/PHPMailer/)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/PHPMailer/PHPMailer/badge)](https://api.securityscorecards.dev/projects/github.com/PHPMailer/PHPMailer)
## Features
- Probably the world's most popular code for sending email from PHP!
- Used by many open-source projects: WordPress, Drupal, 1CRM, SugarCRM, Yii, Joomla! and many more
- Integrated SMTP support send without a local mail server
- Send emails with multiple To, CC, BCC, and Reply-to addresses
- Multipart/alternative emails for mail clients that do not read HTML email
- Add attachments, including inline
- Support for UTF-8 content and 8bit, base64, binary, and quoted-printable encodings
- SMTP authentication with LOGIN, PLAIN, CRAM-MD5, and XOAUTH2 mechanisms over SMTPS and SMTP+STARTTLS transports
- Validates email addresses automatically
- Protects against header injection attacks
- Error messages in over 50 languages!
- DKIM and S/MIME signing support
- Compatible with PHP 5.5 and later, including PHP 8.2
- Namespaced to prevent name clashes
- Much more!
## Why you might need it
Many PHP developers need to send email from their code. The only PHP function that supports this directly is [`mail()`](https://www.php.net/manual/en/function.mail.php). However, it does not provide any assistance for making use of popular features such as encryption, authentication, HTML messages, and attachments.
Formatting email correctly is surprisingly difficult. There are myriad overlapping (and conflicting) standards, requiring tight adherence to horribly complicated formatting and encoding rules the vast majority of code that you'll find online that uses the `mail()` function directly is just plain wrong, if not unsafe!
The PHP `mail()` function usually sends via a local mail server, typically fronted by a `sendmail` binary on Linux, BSD, and macOS platforms, however, Windows usually doesn't include a local mail server; PHPMailer's integrated SMTP client allows email sending on all platforms without needing a local mail server. Be aware though, that the `mail()` function should be avoided when possible; it's both faster and [safer](https://exploitbox.io/paper/Pwning-PHP-Mail-Function-For-Fun-And-RCE.html) to use SMTP to localhost.
*Please* don't be tempted to do it yourself if you don't use PHPMailer, there are many other excellent libraries that
you should look at before rolling your own. Try [SwiftMailer](https://swiftmailer.symfony.com/)
, [Laminas/Mail](https://docs.laminas.dev/laminas-mail/), [ZetaComponents](https://github.com/zetacomponents/Mail), etc.
## License
This software is distributed under the [LGPL 2.1](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html) license, along with the [GPL Cooperation Commitment](https://gplcc.github.io/gplcc/). Please read [LICENSE](https://github.com/PHPMailer/PHPMailer/blob/master/LICENSE) for information on the software availability and distribution.
## Installation & loading
PHPMailer is available on [Packagist](https://packagist.org/packages/phpmailer/phpmailer) (using semantic versioning), and installation via [Composer](https://getcomposer.org) is the recommended way to install PHPMailer. Just add this line to your `composer.json` file:
```json
"phpmailer/phpmailer": "^6.9.2"
```
or run
```sh
composer require phpmailer/phpmailer
```
Note that the `vendor` folder and the `vendor/autoload.php` script are generated by Composer; they are not part of PHPMailer.
If you want to use XOAUTH2 authentication, you will also need to add a dependency on the `league/oauth2-client` and appropriate service adapters package in your `composer.json`, or take a look at
by @decomplexity's [SendOauth2 wrapper](https://github.com/decomplexity/SendOauth2), especially if you're using Microsoft services.
Alternatively, if you're not using Composer, you
can [download PHPMailer as a zip file](https://github.com/PHPMailer/PHPMailer/archive/master.zip), (note that docs and examples are not included in the zip file), then copy the contents of the PHPMailer folder into one of the `include_path` directories specified in your PHP configuration and load each class file manually:
```php
<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require 'path/to/PHPMailer/src/Exception.php';
require 'path/to/PHPMailer/src/PHPMailer.php';
require 'path/to/PHPMailer/src/SMTP.php';
```
If you're not using the `SMTP` class explicitly (you're probably not), you don't need a `use` line for the SMTP class. Even if you're not using exceptions, you do still need to load the `Exception` class as it is used internally.
## Legacy versions
PHPMailer 5.2 (which is compatible with PHP 5.0 — 7.0) is no longer supported, even for security updates. You will find the latest version of 5.2 in the [5.2-stable branch](https://github.com/PHPMailer/PHPMailer/tree/5.2-stable). If you're using PHP 5.5 or later (which you should be), switch to the 6.x releases.
### Upgrading from 5.2
The biggest changes are that source files are now in the `src/` folder, and PHPMailer now declares the namespace `PHPMailer\PHPMailer`. This has several important effects [read the upgrade guide](https://github.com/PHPMailer/PHPMailer/tree/master/UPGRADING.md) for more details.
### Minimal installation
While installing the entire package manually or with Composer is simple, convenient, and reliable, you may want to include only vital files in your project. At the very least you will need [src/PHPMailer.php](https://github.com/PHPMailer/PHPMailer/tree/master/src/PHPMailer.php). If you're using SMTP, you'll need [src/SMTP.php](https://github.com/PHPMailer/PHPMailer/tree/master/src/SMTP.php), and if you're using POP-before SMTP (*very* unlikely!), you'll need [src/POP3.php](https://github.com/PHPMailer/PHPMailer/tree/master/src/POP3.php). You can skip the [language](https://github.com/PHPMailer/PHPMailer/tree/master/language/) folder if you're not showing errors to users and can make do with English-only errors. If you're using XOAUTH2 you will need [src/OAuth.php](https://github.com/PHPMailer/PHPMailer/tree/master/src/OAuth.php) as well as the Composer dependencies for the services you wish to authenticate with. Really, it's much easier to use Composer!
## A Simple Example
```php
<?php
//Import PHPMailer classes into the global namespace
//These must be at the top of your script, not inside a function
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;
//Load Composer's autoloader
require 'vendor/autoload.php';
//Create an instance; passing `true` enables exceptions
$mail = new PHPMailer(true);
try {
//Server settings
$mail->SMTPDebug = SMTP::DEBUG_SERVER; //Enable verbose debug output
$mail->isSMTP(); //Send using SMTP
$mail->Host = 'smtp.example.com'; //Set the SMTP server to send through
$mail->SMTPAuth = true; //Enable SMTP authentication
$mail->Username = 'user@example.com'; //SMTP username
$mail->Password = 'secret'; //SMTP password
$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; //Enable implicit TLS encryption
$mail->Port = 465; //TCP port to connect to; use 587 if you have set `SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS`
//Recipients
$mail->setFrom('from@example.com', 'Mailer');
$mail->addAddress('joe@example.net', 'Joe User'); //Add a recipient
$mail->addAddress('ellen@example.com'); //Name is optional
$mail->addReplyTo('info@example.com', 'Information');
$mail->addCC('cc@example.com');
$mail->addBCC('bcc@example.com');
//Attachments
$mail->addAttachment('/var/tmp/file.tar.gz'); //Add attachments
$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); //Optional name
//Content
$mail->isHTML(true); //Set email format to HTML
$mail->Subject = 'Here is the subject';
$mail->Body = 'This is the HTML message body <b>in bold!</b>';
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
$mail->send();
echo 'Message has been sent';
} catch (Exception $e) {
echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
}
```
You'll find plenty to play with in the [examples](https://github.com/PHPMailer/PHPMailer/tree/master/examples) folder, which covers many common scenarios including sending through Gmail, building contact forms, sending to mailing lists, and more.
If you are re-using the instance (e.g. when sending to a mailing list), you may need to clear the recipient list to avoid sending duplicate messages. See [the mailing list example](https://github.com/PHPMailer/PHPMailer/blob/master/examples/mailing_list.phps) for further guidance.
That's it. You should now be ready to use PHPMailer!
## Localization
PHPMailer defaults to English, but in the [language](https://github.com/PHPMailer/PHPMailer/tree/master/language/) folder, you'll find many translations for PHPMailer error messages that you may encounter. Their filenames contain [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) language code for the translations, for example `fr` for French. To specify a language, you need to tell PHPMailer which one to use, like this:
```php
//To load the French version
$mail->setLanguage('fr', '/optional/path/to/language/directory/');
```
We welcome corrections and new languages if you're looking for corrections, run the [Language/TranslationCompletenessTest.php](https://github.com/PHPMailer/PHPMailer/blob/master/test/Language/TranslationCompletenessTest.php) script in the tests folder and it will show any missing translations.
## Documentation
Start reading at the [GitHub wiki](https://github.com/PHPMailer/PHPMailer/wiki). If you're having trouble, head for [the troubleshooting guide](https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting) as it's frequently updated.
Examples of how to use PHPMailer for common scenarios can be found in the [examples](https://github.com/PHPMailer/PHPMailer/tree/master/examples) folder. If you're looking for a good starting point, we recommend you start with [the Gmail example](https://github.com/PHPMailer/PHPMailer/tree/master/examples/gmail.phps).
To reduce PHPMailer's deployed code footprint, examples are not included if you load PHPMailer via Composer or via [GitHub's zip file download](https://github.com/PHPMailer/PHPMailer/archive/master.zip), so you'll need to either clone the git repository or use the above links to get to the examples directly.
Complete generated API documentation is [available online](https://phpmailer.github.io/PHPMailer/).
You can generate complete API-level documentation by running `phpdoc` in the top-level folder, and documentation will appear in the `docs` folder, though you'll need to have [PHPDocumentor](https://www.phpdoc.org) installed. You may find [the unit tests](https://github.com/PHPMailer/PHPMailer/blob/master/test/PHPMailer/PHPMailerTest.php) a good reference for how to do various operations such as encryption.
If the documentation doesn't cover what you need, search the [many questions on Stack Overflow](https://stackoverflow.com/questions/tagged/phpmailer), and before you ask a question about "SMTP Error: Could not connect to SMTP host.", [read the troubleshooting guide](https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting).
## Tests
[PHPMailer tests](https://github.com/PHPMailer/PHPMailer/tree/master/test/) use PHPUnit 9, with [a polyfill](https://github.com/Yoast/PHPUnit-Polyfills) to let 9-style tests run on older PHPUnit and PHP versions.
[![Test status](https://github.com/PHPMailer/PHPMailer/workflows/Tests/badge.svg)](https://github.com/PHPMailer/PHPMailer/actions)
If this isn't passing, is there something you can do to help?
## Security
Please disclose any vulnerabilities found responsibly report security issues to the maintainers privately.
See [SECURITY](https://github.com/PHPMailer/PHPMailer/tree/master/SECURITY.md) and [PHPMailer's security advisories on GitHub](https://github.com/PHPMailer/PHPMailer/security).
## Contributing
Please submit bug reports, suggestions, and pull requests to the [GitHub issue tracker](https://github.com/PHPMailer/PHPMailer/issues).
We're particularly interested in fixing edge cases, expanding test coverage, and updating translations.
If you found a mistake in the docs, or want to add something, go ahead and amend the wiki anyone can edit it.
If you have git clones from prior to the move to the PHPMailer GitHub organisation, you'll need to update any remote URLs referencing the old GitHub location with a command like this from within your clone:
```sh
git remote set-url upstream https://github.com/PHPMailer/PHPMailer.git
```
Please *don't* use the SourceForge or Google Code projects any more; they are obsolete and no longer maintained.
## Sponsorship
Development time and resources for PHPMailer are provided by [Smartmessages.net](https://info.smartmessages.net/), the world's only privacy-first email marketing system.
<a href="https://info.smartmessages.net/"><img src="https://www.smartmessages.net/img/smartmessages-logo.svg" width="550" alt="Smartmessages.net privacy-first email marketing logo"></a>
Donations are very welcome, whether in beer 🍺, T-shirts 👕, or cold, hard cash 💰. Sponsorship through GitHub is a simple and convenient way to say "thank you" to PHPMailer's maintainers and contributors just click the "Sponsor" button [on the project page](https://github.com/PHPMailer/PHPMailer). If your company uses PHPMailer, consider taking part in Tidelift's enterprise support programme.
## PHPMailer For Enterprise
Available as part of the Tidelift Subscription.
The maintainers of PHPMailer and thousands of other packages are working with Tidelift to deliver commercial
support and maintenance for the open-source packages you use to build your applications. Save time, reduce risk, and
improve code health, while paying the maintainers of the exact packages you
use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-phpmailer-phpmailer?utm_source=packagist-phpmailer-phpmailer&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
## Changelog
See [changelog](changelog.md).
## History
- PHPMailer was originally written in 2001 by Brent R. Matzelle as a [SourceForge project](https://sourceforge.net/projects/phpmailer/).
- [Marcus Bointon](https://github.com/Synchro) (`coolbru` on SF) and Andy Prevost (`codeworxtech`) took over the project in 2004.
- Became an Apache incubator project on Google Code in 2010, managed by Jim Jagielski.
- Marcus created [his fork on GitHub](https://github.com/Synchro/PHPMailer) in 2008.
- Jim and Marcus decide to join forces and use GitHub as the canonical and official repo for PHPMailer in 2013.
- PHPMailer moves to [the PHPMailer organisation](https://github.com/PHPMailer) on GitHub in 2013.
### What's changed since moving from SourceForge?
- Official successor to the SourceForge and Google Code projects.
- Test suite.
- Continuous integration with GitHub Actions.
- Composer support.
- Public development.
- Additional languages and language strings.
- CRAM-MD5 authentication support.
- Preserves full repo history of authors, commits, and branches from the original SourceForge project.
-37
View File
@@ -1,37 +0,0 @@
# Security notices relating to PHPMailer
Please disclose any security issues or vulnerabilities found through [Tidelift's coordinated disclosure system](https://tidelift.com/security) or to the maintainers privately.
PHPMailer 6.4.1 and earlier contain a vulnerability that can result in untrusted code being called (if such code is injected into the host project's scope by other means). If the `$patternselect` parameter to `validateAddress()` is set to `'php'` (the default, defined by `PHPMailer::$validator`), and the global namespace contains a function called `php`, it will be called in preference to the built-in validator of the same name. Mitigated in PHPMailer 6.5.0 by denying the use of simple strings as validator function names. Recorded as [CVE-2021-3603](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-3603). Reported by [Vikrant Singh Chauhan](mailto:vi@hackberry.xyz) via [huntr.dev](https://www.huntr.dev/).
PHPMailer versions 6.4.1 and earlier contain a possible remote code execution vulnerability through the `$lang_path` parameter of the `setLanguage()` method. If the `$lang_path` parameter is passed unfiltered from user input, it can be set to [a UNC path](https://docs.microsoft.com/en-us/dotnet/standard/io/file-path-formats#unc-paths), and if an attacker is also able to persuade the server to load a file from that UNC path, a script file under their control may be executed. This vulnerability only applies to systems that resolve UNC paths, typically only Microsoft Windows.
PHPMailer 6.5.0 mitigates this by no longer treating translation files as PHP code, but by parsing their text content directly. This approach avoids the possibility of executing unknown code while retaining backward compatibility. This isn't ideal, so the current translation format is deprecated and will be replaced in the next major release. Recorded as [CVE-2021-34551](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-34551). Reported by [Jilin Diting Information Technology Co., Ltd](https://listensec.com) via Tidelift.
PHPMailer versions between 6.1.8 and 6.4.0 contain a regression of the earlier CVE-2018-19296 object injection vulnerability as a result of [a fix for Windows UNC paths in 6.1.8](https://github.com/PHPMailer/PHPMailer/commit/e2e07a355ee8ff36aba21d0242c5950c56e4c6f9). Recorded as [CVE-2020-36326](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2020-36326). Reported by Fariskhi Vidyan via Tidelift. 6.4.1 fixes this issue, and also enforces stricter checks for URL schemes in local path contexts.
PHPMailer versions 6.1.5 and earlier contain an output escaping bug that occurs in `Content-Type` and `Content-Disposition` when filenames passed into `addAttachment` and other methods that accept attachment names contain double quote characters, in contravention of RFC822 3.4.1. No specific vulnerability has been found relating to this, but it could allow file attachments to bypass attachment filters that are based on matching filename extensions. Recorded as [CVE-2020-13625](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2020-13625). Reported by Elar Lang of Clarified Security.
PHPMailer versions prior to 6.0.6 and 5.2.27 are vulnerable to an object injection attack by passing `phar://` paths into `addAttachment()` and other functions that may receive unfiltered local paths, possibly leading to RCE. Recorded as [CVE-2018-19296](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2018-19296). See [this article](https://knasmueller.net/5-answers-about-php-phar-exploitation) for more info on this type of vulnerability. Mitigated by blocking the use of paths containing URL-protocol style prefixes such as `phar://`. Reported by Sehun Oh of cyberone.kr.
PHPMailer versions prior to 5.2.24 (released July 26th 2017) have an XSS vulnerability in one of the code examples, [CVE-2017-11503](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-11503). The `code_generator.phps` example did not filter user input prior to output. This file is distributed with a `.phps` extension, so it is not normally executable unless it is explicitly renamed, and the file is not included when PHPMailer is loaded through composer, so it is safe by default. There was also an undisclosed potential XSS vulnerability in the default exception handler (unused by default). Patches for both issues kindly provided by Patrick Monnerat of the Fedora Project.
PHPMailer versions prior to 5.2.22 (released January 9th 2017) have a local file disclosure vulnerability, [CVE-2017-5223](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-5223). If content passed into `msgHTML()` is sourced from unfiltered user input, relative paths can map to absolute local file paths and added as attachments. Also note that `addAttachment` (just like `file_get_contents`, `passthru`, `unlink`, etc) should not be passed user-sourced params either! Reported by Yongxiang Li of Asiasecurity.
PHPMailer versions prior to 5.2.20 (released December 28th 2016) are vulnerable to [CVE-2016-10045](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-10045) a remote code execution vulnerability, responsibly reported by [Dawid Golunski](https://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10045-Vuln-Patch-Bypass.html), and patched by Paul Buonopane (@Zenexer).
PHPMailer versions prior to 5.2.18 (released December 2016) are vulnerable to [CVE-2016-10033](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-10033) a remote code execution vulnerability, responsibly reported by [Dawid Golunski](https://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10033-Vuln.html).
PHPMailer versions prior to 5.2.14 (released November 2015) are vulnerable to [CVE-2015-8476](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2015-8476) an SMTP CRLF injection bug permitting arbitrary message sending.
PHPMailer versions prior to 5.2.10 (released May 2015) are vulnerable to [CVE-2008-5619](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2008-5619), a remote code execution vulnerability in the bundled html2text library. This file was removed in 5.2.10, so if you are using a version prior to that and make use of the html2text function, it's vitally important that you upgrade and remove this file.
PHPMailer versions prior to 2.0.7 and 2.2.1 are vulnerable to [CVE-2012-0796](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-0796), an email header injection attack.
Joomla 1.6.0 uses PHPMailer in an unsafe way, allowing it to reveal local file paths, reported in [CVE-2011-3747](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2011-3747).
PHPMailer didn't sanitise the `$lang_path` parameter in `SetLanguage`. This wasn't a problem in itself, but some apps (PHPClassifieds, ATutor) also failed to sanitise user-provided parameters passed to it, permitting semi-arbitrary local file inclusion, reported in [CVE-2010-4914](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-4914), [CVE-2007-2021](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2007-2021) and [CVE-2006-5734](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2006-5734).
PHPMailer 1.7.2 and earlier contained a possible DDoS vulnerability reported in [CVE-2005-1807](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2005-1807).
PHPMailer 1.7 and earlier (June 2003) have a possible vulnerability in the `SendmailSend` method where shell commands may not be sanitised. Reported in [CVE-2007-3215](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2007-3215).
-1
View File
@@ -1 +0,0 @@
6.9.3
@@ -1,80 +0,0 @@
{
"name": "phpmailer/phpmailer",
"type": "library",
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
"authors": [
{
"name": "Marcus Bointon",
"email": "phpmailer@synchromedia.co.uk"
},
{
"name": "Jim Jagielski",
"email": "jimjag@gmail.com"
},
{
"name": "Andy Prevost",
"email": "codeworxtech@users.sourceforge.net"
},
{
"name": "Brent R. Matzelle"
}
],
"funding": [
{
"url": "https://github.com/Synchro",
"type": "github"
}
],
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
},
"lock": false
},
"require": {
"php": ">=5.5.0",
"ext-ctype": "*",
"ext-filter": "*",
"ext-hash": "*"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
"doctrine/annotations": "^1.2.6 || ^1.13.3",
"php-parallel-lint/php-console-highlighter": "^1.0.0",
"php-parallel-lint/php-parallel-lint": "^1.3.2",
"phpcompatibility/php-compatibility": "^9.3.5",
"roave/security-advisories": "dev-latest",
"squizlabs/php_codesniffer": "^3.7.2",
"yoast/phpunit-polyfills": "^1.0.4"
},
"suggest": {
"decomplexity/SendOauth2": "Adapter for using XOAUTH2 authentication",
"ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses",
"ext-openssl": "Needed for secure SMTP sending and DKIM signing",
"greew/oauth2-azure-provider": "Needed for Microsoft Azure XOAUTH2 authentication",
"hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication",
"league/oauth2-google": "Needed for Google XOAUTH2 authentication",
"psr/log": "For optional PSR-3 debug logging",
"thenetworg/oauth2-azure": "Needed for Microsoft XOAUTH2 authentication",
"symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)"
},
"autoload": {
"psr-4": {
"PHPMailer\\PHPMailer\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"PHPMailer\\Test\\": "test/"
}
},
"license": "LGPL-2.1-only",
"scripts": {
"check": "./vendor/bin/phpcs",
"test": "./vendor/bin/phpunit --no-coverage",
"coverage": "./vendor/bin/phpunit",
"lint": [
"@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . --show-deprecated -e php,phps --exclude vendor --exclude .git --exclude build"
]
}
}
-82
View File
@@ -1,82 +0,0 @@
<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require 'src/Exception.php';
require 'src/PHPMailer.php';
require 'src/SMTP.php';
$isim = isset($_POST['isim']) ? htmlspecialchars($_POST['isim']) : null;
$subject = isset($_POST['subject']) ? htmlspecialchars($_POST['subject']) : null;
$email = isset($_POST['email']) ? htmlspecialchars($_POST['email']) : null;
$content = isset($_POST['mesaj']) ? htmlspecialchars($_POST['mesaj']) : null;
// Giriş kontrolleri
if (!$isim) {
echo "Please fill your name-surname!";
exit;
}
if (!$email || !filter_var($email, FILTER_VALIDATE_EMAIL)) {
echo "Please enter a valid email address!";
exit;
}
if (!$subject) {
echo "Please enter a subject!";
exit;
}
if (!$content) {
echo "Please enter your message!";
exit;
}
$mail = new PHPMailer(true);
try {
$mail->SMTPDebug = 0;
$mail->isSMTP();
$mail->Host = 'smtp.gmail.com';
$mail->SMTPAuth = true;
$mail->Username = 'atakandoganozban@gmail.com';
$mail->Password = 'odxv setp ofgk sutp';
$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS;
$mail->Port = 465;
$mail->CharSet = 'UTF-8';
$mail->setFrom('atakandoganozban@gmail.com', 'Request Collector');
$mail->addAddress('ozbanatakan2@gmail.com', 'Request Recipient');
$mail->addReplyTo($email, $isim);
// Konu başlığı
$mail->Subject = "[atakanozban.com.tr] New Website Contact Request - " . $subject;
// Mesaj içeriği
$mail->isHTML(true);
$mail->Body = nl2br("
<p>This form was filled and sent by <strong>{$isim}</strong>.</p>
<p><strong>E-Mail address:</strong> {$email}</p>
<p><strong>Subject:</strong> {$subject}</p>
<p><strong>Message:</strong><br>{$content}</p>
");
// Dosya ekleme
if (isset($_FILES['attachment']) && $_FILES['attachment']['error'] == 0) {
$allowedTypes = ['image/jpeg', 'image/png', 'application/pdf'];
$fileType = $_FILES['attachment']['type'];
if (!in_array($fileType, $allowedTypes)) {
echo "Only these file formats can just upload: pdf, jpg and png!";
exit;
}
$mail->addAttachment($_FILES['attachment']['tmp_name'], $_FILES['attachment']['name']);
}
$mail->send();
echo "Your message sent, thanks!";
} catch (Exception $e) {
echo "Message can't send. Error: {$mail->ErrorInfo}";
}
?>
@@ -1,182 +0,0 @@
<?php
/**
* PHPMailer - PHP email creation and transport class.
* PHP Version 5.5
* @package PHPMailer
* @see https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
* @author Brent R. Matzelle (original founder)
* @copyright 2012 - 2020 Marcus Bointon
* @copyright 2010 - 2012 Jim Jagielski
* @copyright 2004 - 2009 Andy Prevost
* @license https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License
* @note This program is distributed in the hope that it will be useful - WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*/
/**
* Get an OAuth2 token from an OAuth2 provider.
* * Install this script on your server so that it's accessible
* as [https/http]://<yourdomain>/<folder>/get_oauth_token.php
* e.g.: http://localhost/phpmailer/get_oauth_token.php
* * Ensure dependencies are installed with 'composer install'
* * Set up an app in your Google/Yahoo/Microsoft account
* * Set the script address as the app's redirect URL
* If no refresh token is obtained when running this file,
* revoke access to your app and run the script again.
*/
namespace PHPMailer\PHPMailer;
/**
* Aliases for League Provider Classes
* Make sure you have added these to your composer.json and run `composer install`
* Plenty to choose from here:
* @see https://oauth2-client.thephpleague.com/providers/thirdparty/
*/
//@see https://github.com/thephpleague/oauth2-google
use League\OAuth2\Client\Provider\Google;
//@see https://packagist.org/packages/hayageek/oauth2-yahoo
use Hayageek\OAuth2\Client\Provider\Yahoo;
//@see https://github.com/stevenmaguire/oauth2-microsoft
use Stevenmaguire\OAuth2\Client\Provider\Microsoft;
//@see https://github.com/greew/oauth2-azure-provider
use Greew\OAuth2\Client\Provider\Azure;
if (!isset($_GET['code']) && !isset($_POST['provider'])) {
?>
<html>
<body>
<form method="post">
<h1>Select Provider</h1>
<input type="radio" name="provider" value="Google" id="providerGoogle">
<label for="providerGoogle">Google</label><br>
<input type="radio" name="provider" value="Yahoo" id="providerYahoo">
<label for="providerYahoo">Yahoo</label><br>
<input type="radio" name="provider" value="Microsoft" id="providerMicrosoft">
<label for="providerMicrosoft">Microsoft</label><br>
<input type="radio" name="provider" value="Azure" id="providerAzure">
<label for="providerAzure">Azure</label><br>
<h1>Enter id and secret</h1>
<p>These details are obtained by setting up an app in your provider's developer console.
</p>
<p>ClientId: <input type="text" name="clientId"><p>
<p>ClientSecret: <input type="text" name="clientSecret"></p>
<p>TenantID (only relevant for Azure): <input type="text" name="tenantId"></p>
<input type="submit" value="Continue">
</form>
</body>
</html>
<?php
exit;
}
require 'vendor/autoload.php';
session_start();
$providerName = '';
$clientId = '';
$clientSecret = '';
$tenantId = '';
if (array_key_exists('provider', $_POST)) {
$providerName = $_POST['provider'];
$clientId = $_POST['clientId'];
$clientSecret = $_POST['clientSecret'];
$tenantId = $_POST['tenantId'];
$_SESSION['provider'] = $providerName;
$_SESSION['clientId'] = $clientId;
$_SESSION['clientSecret'] = $clientSecret;
$_SESSION['tenantId'] = $tenantId;
} elseif (array_key_exists('provider', $_SESSION)) {
$providerName = $_SESSION['provider'];
$clientId = $_SESSION['clientId'];
$clientSecret = $_SESSION['clientSecret'];
$tenantId = $_SESSION['tenantId'];
}
//If you don't want to use the built-in form, set your client id and secret here
//$clientId = 'RANDOMCHARS-----duv1n2.apps.googleusercontent.com';
//$clientSecret = 'RANDOMCHARS-----lGyjPcRtvP';
//If this automatic URL doesn't work, set it yourself manually to the URL of this script
$redirectUri = (isset($_SERVER['HTTPS']) ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
//$redirectUri = 'http://localhost/PHPMailer/redirect';
$params = [
'clientId' => $clientId,
'clientSecret' => $clientSecret,
'redirectUri' => $redirectUri,
'accessType' => 'offline'
];
$options = [];
$provider = null;
switch ($providerName) {
case 'Google':
$provider = new Google($params);
$options = [
'scope' => [
'https://mail.google.com/'
]
];
break;
case 'Yahoo':
$provider = new Yahoo($params);
break;
case 'Microsoft':
$provider = new Microsoft($params);
$options = [
'scope' => [
'wl.imap',
'wl.offline_access'
]
];
break;
case 'Azure':
$params['tenantId'] = $tenantId;
$provider = new Azure($params);
$options = [
'scope' => [
'https://outlook.office.com/SMTP.Send',
'offline_access'
]
];
break;
}
if (null === $provider) {
exit('Provider missing');
}
if (!isset($_GET['code'])) {
//If we don't have an authorization code then get one
$authUrl = $provider->getAuthorizationUrl($options);
$_SESSION['oauth2state'] = $provider->getState();
header('Location: ' . $authUrl);
exit;
//Check given state against previously stored one to mitigate CSRF attack
} elseif (empty($_GET['state']) || ($_GET['state'] !== $_SESSION['oauth2state'])) {
unset($_SESSION['oauth2state']);
unset($_SESSION['provider']);
exit('Invalid state');
} else {
unset($_SESSION['provider']);
//Try to get an access token (using the authorization code grant)
$token = $provider->getAccessToken(
'authorization_code',
[
'code' => $_GET['code']
]
);
//Use this to interact with an API on the users behalf
//Use this to get a new access token if the old one expires
echo 'Refresh Token: ', htmlspecialchars($token->getRefreshToken());
}
@@ -1,26 +0,0 @@
<?php
/**
* Afrikaans PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP-fout: kon nie geverifieer word nie.';
$PHPMAILER_LANG['connect_host'] = 'SMTP-fout: kon nie aan SMTP-verbind nie.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP-fout: data nie aanvaar nie.';
$PHPMAILER_LANG['empty_message'] = 'Boodskapliggaam leeg.';
$PHPMAILER_LANG['encoding'] = 'Onbekende kodering: ';
$PHPMAILER_LANG['execute'] = 'Kon nie uitvoer nie: ';
$PHPMAILER_LANG['file_access'] = 'Kon nie lêer oopmaak nie: ';
$PHPMAILER_LANG['file_open'] = 'Lêerfout: Kon nie lêer oopmaak nie: ';
$PHPMAILER_LANG['from_failed'] = 'Die volgende Van adres misluk: ';
$PHPMAILER_LANG['instantiate'] = 'Kon nie posfunksie instansieer nie.';
$PHPMAILER_LANG['invalid_address'] = 'Ongeldige adres: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer word nie ondersteun nie.';
$PHPMAILER_LANG['provide_address'] = 'U moet ten minste een ontvanger e-pos adres verskaf.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP-fout: Die volgende ontvangers het misluk: ';
$PHPMAILER_LANG['signing'] = 'Ondertekening Fout: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP-verbinding () misluk.';
$PHPMAILER_LANG['smtp_error'] = 'SMTP-bediener fout: ';
$PHPMAILER_LANG['variable_set'] = 'Kan nie veranderlike instel of herstel nie: ';
$PHPMAILER_LANG['extension_missing'] = 'Uitbreiding ontbreek: ';
@@ -1,27 +0,0 @@
<?php
/**
* Arabic PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author bahjat al mostafa <bahjat983@hotmail.com>
*/
$PHPMAILER_LANG['authenticate'] = 'خطأ SMTP : لا يمكن تأكيد الهوية.';
$PHPMAILER_LANG['connect_host'] = 'خطأ SMTP: لا يمكن الاتصال بالخادم SMTP.';
$PHPMAILER_LANG['data_not_accepted'] = 'خطأ SMTP: لم يتم قبول المعلومات .';
$PHPMAILER_LANG['empty_message'] = 'نص الرسالة فارغ';
$PHPMAILER_LANG['encoding'] = 'ترميز غير معروف: ';
$PHPMAILER_LANG['execute'] = 'لا يمكن تنفيذ : ';
$PHPMAILER_LANG['file_access'] = 'لا يمكن الوصول للملف: ';
$PHPMAILER_LANG['file_open'] = 'خطأ في الملف: لا يمكن فتحه: ';
$PHPMAILER_LANG['from_failed'] = 'خطأ على مستوى عنوان المرسل : ';
$PHPMAILER_LANG['instantiate'] = 'لا يمكن توفير خدمة البريد.';
$PHPMAILER_LANG['invalid_address'] = 'الإرسال غير ممكن لأن عنوان البريد الإلكتروني غير صالح: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' برنامج الإرسال غير مدعوم.';
$PHPMAILER_LANG['provide_address'] = 'يجب توفير عنوان البريد الإلكتروني لمستلم واحد على الأقل.';
$PHPMAILER_LANG['recipients_failed'] = 'خطأ SMTP: الأخطاء التالية فشل في الارسال لكل من : ';
$PHPMAILER_LANG['signing'] = 'خطأ في التوقيع: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() غير ممكن.';
$PHPMAILER_LANG['smtp_error'] = 'خطأ على مستوى الخادم SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'لا يمكن تعيين أو إعادة تعيين متغير: ';
$PHPMAILER_LANG['extension_missing'] = 'الإضافة غير موجودة: ';
@@ -1,35 +0,0 @@
<?php
/**
* Assamese PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Manish Sarkar <manish.n.manish@gmail.com>
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP ত্ৰুটি: প্ৰমাণীকৰণ কৰিব নোৱাৰি';
$PHPMAILER_LANG['buggy_php'] = 'আপোনাৰ PHP সংস্কৰণ এটা বাগৰ দ্বাৰা প্ৰভাৱিত হয় যাৰ ফলত নষ্ট বাৰ্তা হব পাৰে । ইয়াক সমাধান কৰিবলে, প্ৰেৰণ কৰিবলে SMTP ব্যৱহাৰ কৰক, আপোনাৰ php.ini ত mail.add_x_header বিকল্প নিষ্ক্ৰিয় কৰক, MacOS বা Linux লৈ সলনি কৰক, বা আপোনাৰ PHP সংস্কৰণ 7.0.17+ বা 7.1.3+ লৈ সলনি কৰক ।';
$PHPMAILER_LANG['connect_host'] = 'SMTP ত্ৰুটি: SMTP চাৰ্ভাৰৰ সৈতে সংযোগ কৰিবলে অক্ষম';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP ত্ৰুটি: তথ্য গ্ৰহণ কৰা হোৱা নাই';
$PHPMAILER_LANG['empty_message'] = 'বাৰ্তাৰ মূখ্য অংশ খালী।';
$PHPMAILER_LANG['encoding'] = 'অজ্ঞাত এনকোডিং: ';
$PHPMAILER_LANG['execute'] = 'এক্সিকিউট কৰিব নোৱাৰি: ';
$PHPMAILER_LANG['extension_missing'] = 'সম্প্ৰসাৰণ নোহোৱা হৈছে: ';
$PHPMAILER_LANG['file_access'] = 'ফাইল অভিগম কৰিবলে অক্ষম: ';
$PHPMAILER_LANG['file_open'] = 'ফাইল ত্ৰুটি: ফাইল খোলিবলৈ অক্ষম: ';
$PHPMAILER_LANG['from_failed'] = 'নিম্নলিখিত প্ৰেৰকৰ ঠিকনা(সমূহ) ব্যৰ্থ: ';
$PHPMAILER_LANG['instantiate'] = 'মেইল ফাংচনৰ এটা উদাহৰণ সৃষ্টি কৰিবলে অক্ষম';
$PHPMAILER_LANG['invalid_address'] = 'প্ৰেৰণ কৰিব নোৱাৰি: অবৈধ ইমেইল ঠিকনা: ';
$PHPMAILER_LANG['invalid_header'] = 'অবৈধ হেডাৰৰ নাম বা মান';
$PHPMAILER_LANG['invalid_hostentry'] = 'অবৈধ হোষ্টেন্ট্ৰি: ';
$PHPMAILER_LANG['invalid_host'] = 'অবৈধ হস্ট:';
$PHPMAILER_LANG['mailer_not_supported'] = 'মেইলাৰ সমৰ্থিত নহয়।';
$PHPMAILER_LANG['provide_address'] = 'আপুনি অন্ততঃ এটা গন্তব্য ইমেইল ঠিকনা দিব লাগিব';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP ত্ৰুটি: নিম্নলিখিত গন্তব্যস্থানসমূহ ব্যৰ্থ: ';
$PHPMAILER_LANG['signing'] = 'স্বাক্ষৰ কৰাত ব্যৰ্থ: ';
$PHPMAILER_LANG['smtp_code'] = 'SMTP কড: ';
$PHPMAILER_LANG['smtp_code_ex'] = 'অতিৰিক্ত SMTP তথ্য: ';
$PHPMAILER_LANG['smtp_detail'] = 'বিৱৰণ:';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP সংযোগ() ব্যৰ্থ';
$PHPMAILER_LANG['smtp_error'] = 'SMTP চাৰ্ভাৰৰ ত্ৰুটি: ';
$PHPMAILER_LANG['variable_set'] = 'চলক নিৰ্ধাৰণ কৰিব পৰা নগল: ';
$PHPMAILER_LANG['extension_missing'] = 'অনুপস্থিত সম্প্ৰসাৰণ: ';
@@ -1,27 +0,0 @@
<?php
/**
* Azerbaijani PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author @mirjalal
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP xətası: Giriş uğursuz oldu.';
$PHPMAILER_LANG['connect_host'] = 'SMTP xətası: SMTP serverinə qoşulma uğursuz oldu.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP xətası: Verilənlər qəbul edilməyib.';
$PHPMAILER_LANG['empty_message'] = 'Boş mesaj göndərilə bilməz.';
$PHPMAILER_LANG['encoding'] = 'Qeyri-müəyyən kodlaşdırma: ';
$PHPMAILER_LANG['execute'] = 'Əmr yerinə yetirilmədi: ';
$PHPMAILER_LANG['file_access'] = 'Fayla giriş yoxdur: ';
$PHPMAILER_LANG['file_open'] = 'Fayl xətası: Fayl açıla bilmədi: ';
$PHPMAILER_LANG['from_failed'] = 'Göstərilən poçtlara göndərmə uğursuz oldu: ';
$PHPMAILER_LANG['instantiate'] = 'Mail funksiyası işə salına bilmədi.';
$PHPMAILER_LANG['invalid_address'] = 'Düzgün olmayan e-mail adresi: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' - e-mail kitabxanası dəstəklənmir.';
$PHPMAILER_LANG['provide_address'] = 'Ən azı bir e-mail adresi daxil edilməlidir.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP xətası: Aşağıdakı ünvanlar üzrə alıcılara göndərmə uğursuzdur: ';
$PHPMAILER_LANG['signing'] = 'İmzalama xətası: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP serverinə qoşulma uğursuz oldu.';
$PHPMAILER_LANG['smtp_error'] = 'SMTP serveri xətası: ';
$PHPMAILER_LANG['variable_set'] = 'Dəyişənin quraşdırılması uğursuz oldu: ';
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
@@ -1,27 +0,0 @@
<?php
/**
* Bosnian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Ermin Islamagić <ermin@islamagic.com>
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP Greška: Neuspjela prijava.';
$PHPMAILER_LANG['connect_host'] = 'SMTP Greška: Nije moguće spojiti se sa SMTP serverom.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Greška: Podatci nisu prihvaćeni.';
$PHPMAILER_LANG['empty_message'] = 'Sadržaj poruke je prazan.';
$PHPMAILER_LANG['encoding'] = 'Nepoznata kriptografija: ';
$PHPMAILER_LANG['execute'] = 'Nije moguće izvršiti naredbu: ';
$PHPMAILER_LANG['file_access'] = 'Nije moguće pristupiti datoteci: ';
$PHPMAILER_LANG['file_open'] = 'Nije moguće otvoriti datoteku: ';
$PHPMAILER_LANG['from_failed'] = 'SMTP Greška: Slanje sa navedenih e-mail adresa nije uspjelo: ';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Greška: Slanje na navedene e-mail adrese nije uspjelo: ';
$PHPMAILER_LANG['instantiate'] = 'Ne mogu pokrenuti mail funkcionalnost.';
$PHPMAILER_LANG['invalid_address'] = 'E-mail nije poslan. Neispravna e-mail adresa: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer nije podržan.';
$PHPMAILER_LANG['provide_address'] = 'Definišite barem jednu adresu primaoca.';
$PHPMAILER_LANG['signing'] = 'Greška prilikom prijave: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Spajanje na SMTP server nije uspjelo.';
$PHPMAILER_LANG['smtp_error'] = 'SMTP greška: ';
$PHPMAILER_LANG['variable_set'] = 'Nije moguće postaviti varijablu ili je vratiti nazad: ';
$PHPMAILER_LANG['extension_missing'] = 'Nedostaje ekstenzija: ';
@@ -1,27 +0,0 @@
<?php
/**
* Belarusian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Aleksander Maksymiuk <info@setpro.pl>
*/
$PHPMAILER_LANG['authenticate'] = 'Памылка SMTP: памылка ідэнтыфікацыі.';
$PHPMAILER_LANG['connect_host'] = 'Памылка SMTP: нельга ўстанавіць сувязь з SMTP-серверам.';
$PHPMAILER_LANG['data_not_accepted'] = 'Памылка SMTP: звесткі непрынятыя.';
$PHPMAILER_LANG['empty_message'] = 'Пустое паведамленне.';
$PHPMAILER_LANG['encoding'] = 'Невядомая кадыроўка тэксту: ';
$PHPMAILER_LANG['execute'] = 'Нельга выканаць каманду: ';
$PHPMAILER_LANG['file_access'] = 'Няма доступу да файла: ';
$PHPMAILER_LANG['file_open'] = 'Нельга адкрыць файл: ';
$PHPMAILER_LANG['from_failed'] = 'Няправільны адрас адпраўніка: ';
$PHPMAILER_LANG['instantiate'] = 'Нельга прымяніць функцыю mail().';
$PHPMAILER_LANG['invalid_address'] = 'Нельга даслаць паведамленне, няправільны email атрымальніка: ';
$PHPMAILER_LANG['provide_address'] = 'Запоўніце, калі ласка, правільны email атрымальніка.';
$PHPMAILER_LANG['mailer_not_supported'] = ' - паштовы сервер не падтрымліваецца.';
$PHPMAILER_LANG['recipients_failed'] = 'Памылка SMTP: няправільныя атрымальнікі: ';
$PHPMAILER_LANG['signing'] = 'Памылка подпісу паведамлення: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Памылка сувязі з SMTP-серверам.';
$PHPMAILER_LANG['smtp_error'] = 'Памылка SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Нельга ўстанавіць або перамяніць значэнне пераменнай: ';
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
@@ -1,27 +0,0 @@
<?php
/**
* Bulgarian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Mikhail Kyosev <mialygk@gmail.com>
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP грешка: Не може да се удостовери пред сървъра.';
$PHPMAILER_LANG['connect_host'] = 'SMTP грешка: Не може да се свърже с SMTP хоста.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP грешка: данните не са приети.';
$PHPMAILER_LANG['empty_message'] = 'Съдържанието на съобщението е празно';
$PHPMAILER_LANG['encoding'] = 'Неизвестно кодиране: ';
$PHPMAILER_LANG['execute'] = 'Не може да се изпълни: ';
$PHPMAILER_LANG['file_access'] = 'Няма достъп до файл: ';
$PHPMAILER_LANG['file_open'] = 'Файлова грешка: Не може да се отвори файл: ';
$PHPMAILER_LANG['from_failed'] = 'Следните адреси за подател са невалидни: ';
$PHPMAILER_LANG['instantiate'] = 'Не може да се инстанцира функцията mail.';
$PHPMAILER_LANG['invalid_address'] = 'Невалиден адрес: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' - пощенски сървър не се поддържа.';
$PHPMAILER_LANG['provide_address'] = 'Трябва да предоставите поне един email адрес за получател.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP грешка: Следните адреси за Получател са невалидни: ';
$PHPMAILER_LANG['signing'] = 'Грешка при подписване: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP провален connect().';
$PHPMAILER_LANG['smtp_error'] = 'SMTP сървърна грешка: ';
$PHPMAILER_LANG['variable_set'] = 'Не може да се установи или възстанови променлива: ';
$PHPMAILER_LANG['extension_missing'] = 'Липсва разширение: ';
@@ -1,35 +0,0 @@
<?php
/**
* Bengali PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Manish Sarkar <manish.n.manish@gmail.com>
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP ত্রুটি: প্রমাণীকরণ করতে অক্ষম৷';
$PHPMAILER_LANG['buggy_php'] = 'আপনার PHP সংস্করণ একটি বাগ দ্বারা প্রভাবিত হয় যার ফলে দূষিত বার্তা হতে পারে। এটি ঠিক করতে, পাঠাতে SMTP ব্যবহার করুন, আপনার php.ini এ mail.add_x_header বিকল্পটি নিষ্ক্রিয় করুন, MacOS বা Linux-এ স্যুইচ করুন, অথবা আপনার PHP সংস্করণকে 7.0.17+ বা 7.1.3+ এ পরিবর্তন করুন।';
$PHPMAILER_LANG['connect_host'] = 'SMTP ত্রুটি: SMTP সার্ভারের সাথে সংযোগ করতে অক্ষম৷';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP ত্রুটি: ডেটা গ্রহণ করা হয়নি৷';
$PHPMAILER_LANG['empty_message'] = 'বার্তার অংশটি খালি।';
$PHPMAILER_LANG['encoding'] = 'অজানা এনকোডিং: ';
$PHPMAILER_LANG['execute'] = 'নির্বাহ করতে অক্ষম: ';
$PHPMAILER_LANG['extension_missing'] = 'এক্সটেনশন অনুপস্থিত:';
$PHPMAILER_LANG['file_access'] = 'ফাইল অ্যাক্সেস করতে অক্ষম: ';
$PHPMAILER_LANG['file_open'] = 'ফাইল ত্রুটি: ফাইল খুলতে অক্ষম: ';
$PHPMAILER_LANG['from_failed'] = 'নিম্নলিখিত প্রেরকের ঠিকানা(গুলি) ব্যর্থ হয়েছে: ';
$PHPMAILER_LANG['instantiate'] = 'মেল ফাংশনের একটি উদাহরণ তৈরি করতে অক্ষম৷';
$PHPMAILER_LANG['invalid_address'] = 'পাঠাতে অক্ষম: অবৈধ ইমেল ঠিকানা: ';
$PHPMAILER_LANG['invalid_header'] = 'অবৈধ হেডার নাম বা মান';
$PHPMAILER_LANG['invalid_hostentry'] = 'অবৈধ হোস্টেন্ট্রি: ';
$PHPMAILER_LANG['invalid_host'] = 'অবৈধ হোস্ট:';
$PHPMAILER_LANG['mailer_not_supported'] = 'মেইলার সমর্থিত নয়।';
$PHPMAILER_LANG['provide_address'] = 'আপনাকে অবশ্যই অন্তত একটি গন্তব্য ইমেল ঠিকানা প্রদান করতে হবে৷';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP ত্রুটি: নিম্নলিখিত গন্তব্যগুলি ব্যর্থ হয়েছে: ';
$PHPMAILER_LANG['signing'] = 'স্বাক্ষর করতে ব্যর্থ হয়েছে: ';
$PHPMAILER_LANG['smtp_code'] = 'SMTP কোড: ';
$PHPMAILER_LANG['smtp_code_ex'] = 'অতিরিক্ত SMTP তথ্য:';
$PHPMAILER_LANG['smtp_detail'] = 'বর্ণনা: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP সংযোগ() ব্যর্থ হয়েছে৷';
$PHPMAILER_LANG['smtp_error'] = 'SMTP সার্ভার ত্রুটি: ';
$PHPMAILER_LANG['variable_set'] = 'পরিবর্তনশীল সেট করা যায়নি: ';
$PHPMAILER_LANG['extension_missing'] = 'অনুপস্থিত এক্সটেনশন: ';
@@ -1,27 +0,0 @@
<?php
/**
* Catalan PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Ivan <web AT microstudi DOT com>
*/
$PHPMAILER_LANG['authenticate'] = 'Error SMTP: No sha pogut autenticar.';
$PHPMAILER_LANG['connect_host'] = 'Error SMTP: No es pot connectar al servidor SMTP.';
$PHPMAILER_LANG['data_not_accepted'] = 'Error SMTP: Dades no acceptades.';
$PHPMAILER_LANG['empty_message'] = 'El cos del missatge està buit.';
$PHPMAILER_LANG['encoding'] = 'Codificació desconeguda: ';
$PHPMAILER_LANG['execute'] = 'No es pot executar: ';
$PHPMAILER_LANG['file_access'] = 'No es pot accedir a larxiu: ';
$PHPMAILER_LANG['file_open'] = 'Error dArxiu: No es pot obrir larxiu: ';
$PHPMAILER_LANG['from_failed'] = 'La(s) següent(s) adreces de remitent han fallat: ';
$PHPMAILER_LANG['instantiate'] = 'No sha pogut crear una instància de la funció Mail.';
$PHPMAILER_LANG['invalid_address'] = 'Adreça demail invalida: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer no està suportat';
$PHPMAILER_LANG['provide_address'] = 'Sha de proveir almenys una adreça demail com a destinatari.';
$PHPMAILER_LANG['recipients_failed'] = 'Error SMTP: Els següents destinataris han fallat: ';
$PHPMAILER_LANG['signing'] = 'Error al signar: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Ha fallat el SMTP Connect().';
$PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'No sha pogut establir o restablir la variable: ';
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
@@ -1,28 +0,0 @@
<?php
/**
* Czech PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
*/
$PHPMAILER_LANG['authenticate'] = 'Chyba SMTP: Autentizace selhala.';
$PHPMAILER_LANG['connect_host'] = 'Chyba SMTP: Nelze navázat spojení se SMTP serverem.';
$PHPMAILER_LANG['data_not_accepted'] = 'Chyba SMTP: Data nebyla přijata.';
$PHPMAILER_LANG['empty_message'] = 'Prázdné tělo zprávy';
$PHPMAILER_LANG['encoding'] = 'Neznámé kódování: ';
$PHPMAILER_LANG['execute'] = 'Nelze provést: ';
$PHPMAILER_LANG['file_access'] = 'Nelze získat přístup k souboru: ';
$PHPMAILER_LANG['file_open'] = 'Chyba souboru: Nelze otevřít soubor pro čtení: ';
$PHPMAILER_LANG['from_failed'] = 'Následující adresa odesílatele je nesprávná: ';
$PHPMAILER_LANG['instantiate'] = 'Nelze vytvořit instanci emailové funkce.';
$PHPMAILER_LANG['invalid_address'] = 'Neplatná adresa: ';
$PHPMAILER_LANG['invalid_hostentry'] = 'Záznam hostitele je nesprávný: ';
$PHPMAILER_LANG['invalid_host'] = 'Hostitel je nesprávný: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer není podporován.';
$PHPMAILER_LANG['provide_address'] = 'Musíte zadat alespoň jednu emailovou adresu příjemce.';
$PHPMAILER_LANG['recipients_failed'] = 'Chyba SMTP: Následující adresy příjemců nejsou správně: ';
$PHPMAILER_LANG['signing'] = 'Chyba přihlašování: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() selhal.';
$PHPMAILER_LANG['smtp_error'] = 'Chyba SMTP serveru: ';
$PHPMAILER_LANG['variable_set'] = 'Nelze nastavit nebo změnit proměnnou: ';
$PHPMAILER_LANG['extension_missing'] = 'Chybí rozšíření: ';
@@ -1,36 +0,0 @@
<?php
/**
* Danish PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author John Sebastian <jms@iwb.dk>
* Rewrite and extension of the work by Mikael Stokkebro <info@stokkebro.dk>
*
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP fejl: Login mislykkedes.';
$PHPMAILER_LANG['buggy_php'] = 'Din version af PHP er berørt af en fejl, som gør at dine beskeder muligvis vises forkert. For at rette dette kan du skifte til SMTP, slå mail.add_x_header headeren i din php.ini fil fra, skifte til MacOS eller Linux eller opgradere din version af PHP til 7.0.17+ eller 7.1.3+.';
$PHPMAILER_LANG['connect_host'] = 'SMTP fejl: Forbindelse til SMTP serveren kunne ikke oprettes.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP fejl: Data blev ikke accepteret.';
$PHPMAILER_LANG['empty_message'] = 'Meddelelsen er uden indhold';
$PHPMAILER_LANG['encoding'] = 'Ukendt encode-format: ';
$PHPMAILER_LANG['execute'] = 'Kunne ikke afvikle: ';
$PHPMAILER_LANG['extension_missing'] = 'Udvidelse mangler: ';
$PHPMAILER_LANG['file_access'] = 'Kunne ikke tilgå filen: ';
$PHPMAILER_LANG['file_open'] = 'Fil fejl: Kunne ikke åbne filen: ';
$PHPMAILER_LANG['from_failed'] = 'Følgende afsenderadresse er forkert: ';
$PHPMAILER_LANG['instantiate'] = 'Email funktionen kunne ikke initialiseres.';
$PHPMAILER_LANG['invalid_address'] = 'Udgyldig adresse: ';
$PHPMAILER_LANG['invalid_header'] = 'Ugyldig header navn eller værdi';
$PHPMAILER_LANG['invalid_hostentry'] = 'Ugyldig hostentry: ';
$PHPMAILER_LANG['invalid_host'] = 'Ugyldig vært: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer understøttes ikke.';
$PHPMAILER_LANG['provide_address'] = 'Indtast mindst en modtagers email adresse.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP fejl: Følgende modtagere fejlede: ';
$PHPMAILER_LANG['signing'] = 'Signeringsfejl: ';
$PHPMAILER_LANG['smtp_code'] = 'SMTP kode: ';
$PHPMAILER_LANG['smtp_code_ex'] = 'Yderligere SMTP info: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() fejlede.';
$PHPMAILER_LANG['smtp_detail'] = 'Detalje: ';
$PHPMAILER_LANG['smtp_error'] = 'SMTP server fejl: ';
$PHPMAILER_LANG['variable_set'] = 'Kunne ikke definere eller nulstille variablen: ';
@@ -1,28 +0,0 @@
<?php
/**
* German PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP-Fehler: Authentifizierung fehlgeschlagen.';
$PHPMAILER_LANG['connect_host'] = 'SMTP-Fehler: Konnte keine Verbindung zum SMTP-Host herstellen.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP-Fehler: Daten werden nicht akzeptiert.';
$PHPMAILER_LANG['empty_message'] = 'E-Mail-Inhalt ist leer.';
$PHPMAILER_LANG['encoding'] = 'Unbekannte Kodierung: ';
$PHPMAILER_LANG['execute'] = 'Konnte folgenden Befehl nicht ausführen: ';
$PHPMAILER_LANG['file_access'] = 'Zugriff auf folgende Datei fehlgeschlagen: ';
$PHPMAILER_LANG['file_open'] = 'Dateifehler: Konnte folgende Datei nicht öffnen: ';
$PHPMAILER_LANG['from_failed'] = 'Die folgende Absenderadresse ist nicht korrekt: ';
$PHPMAILER_LANG['instantiate'] = 'Mail-Funktion konnte nicht initialisiert werden.';
$PHPMAILER_LANG['invalid_address'] = 'Die Adresse ist ungültig: ';
$PHPMAILER_LANG['invalid_hostentry'] = 'Ungültiger Hosteintrag: ';
$PHPMAILER_LANG['invalid_host'] = 'Ungültiger Host: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer wird nicht unterstützt.';
$PHPMAILER_LANG['provide_address'] = 'Bitte geben Sie mindestens eine Empfängeradresse an.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP-Fehler: Die folgenden Empfänger sind nicht korrekt: ';
$PHPMAILER_LANG['signing'] = 'Fehler beim Signieren: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Verbindung zum SMTP-Server fehlgeschlagen.';
$PHPMAILER_LANG['smtp_error'] = 'Fehler vom SMTP-Server: ';
$PHPMAILER_LANG['variable_set'] = 'Kann Variable nicht setzen oder zurücksetzen: ';
$PHPMAILER_LANG['extension_missing'] = 'Fehlende Erweiterung: ';
@@ -1,33 +0,0 @@
<?php
/**
* Greek PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
*/
$PHPMAILER_LANG['authenticate'] = 'Σφάλμα SMTP: Αδυναμία πιστοποίησης.';
$PHPMAILER_LANG['buggy_php'] = 'Η έκδοση PHP που χρησιμοποιείτε παρουσιάζει σφάλμα που μπορεί να έχει ως αποτέλεσμα κατεστραμένα μηνύματα. Για να το διορθώσετε, αλλάξτε τον τρόπο αποστολής σε SMTP, απενεργοποιήστε την επιλογή mail.add_x_header στο αρχείο php.ini, αλλάξτε λειτουργικό σε MacOS ή Linux ή αναβαθμίστε την PHP σε έκδοση 7.0.17+ ή 7.1.3+.';
$PHPMAILER_LANG['connect_host'] = 'Σφάλμα SMTP: Αδυναμία σύνδεσης με τον φιλοξενητή SMTP.';
$PHPMAILER_LANG['data_not_accepted'] = 'Σφάλμα SMTP: Μη αποδεκτά δεδομένα.';
$PHPMAILER_LANG['empty_message'] = 'Η ηλεκτρονική επιστολή δεν έχει περιεχόμενο.';
$PHPMAILER_LANG['encoding'] = 'Άγνωστη μορφή κωδικοποίησης: ';
$PHPMAILER_LANG['execute'] = 'Αδυναμία εκτέλεσης: ';
$PHPMAILER_LANG['extension_missing'] = 'Απουσία επέκτασης: ';
$PHPMAILER_LANG['file_access'] = 'Αδυναμία πρόσβασης στο αρχείο: ';
$PHPMAILER_LANG['file_open'] = 'Σφάλμα Αρχείου: Αδυναμία ανοίγματος αρχείου: ';
$PHPMAILER_LANG['from_failed'] = 'Η ακόλουθη διεύθυνση αποστολέα δεν είναι σωστή: ';
$PHPMAILER_LANG['instantiate'] = 'Αδυναμία εκκίνησης συνάρτησης Mail.';
$PHPMAILER_LANG['invalid_address'] = 'Μη έγκυρη διεύθυνση: ';
$PHPMAILER_LANG['invalid_header'] = 'Μη έγκυρο όνομα κεφαλίδας ή τιμή';
$PHPMAILER_LANG['invalid_hostentry'] = 'Μη έγκυρη εισαγωγή φιλοξενητή: ';
$PHPMAILER_LANG['invalid_host'] = 'Μη έγκυρος φιλοξενητής: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer δεν υποστηρίζεται.';
$PHPMAILER_LANG['provide_address'] = 'Δώστε τουλάχιστον μια ηλεκτρονική διεύθυνση παραλήπτη.';
$PHPMAILER_LANG['recipients_failed'] = 'Σφάλμα SMTP: Οι παρακάτω διευθύνσεις παραλήπτη δεν είναι έγκυρες: ';
$PHPMAILER_LANG['signing'] = 'Σφάλμα υπογραφής: ';
$PHPMAILER_LANG['smtp_code'] = 'Κώδικάς SMTP: ';
$PHPMAILER_LANG['smtp_code_ex'] = 'Πρόσθετες πληροφορίες SMTP: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Αποτυχία σύνδεσης SMTP.';
$PHPMAILER_LANG['smtp_detail'] = 'Λεπτομέρεια: ';
$PHPMAILER_LANG['smtp_error'] = 'Σφάλμα με τον διακομιστή SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Αδυναμία ορισμού ή επαναφοράς μεταβλητής: ';
@@ -1,26 +0,0 @@
<?php
/**
* Esperanto PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
*/
$PHPMAILER_LANG['authenticate'] = 'Eraro de servilo SMTP : aŭtentigo malsukcesis.';
$PHPMAILER_LANG['connect_host'] = 'Eraro de servilo SMTP : konektado al servilo malsukcesis.';
$PHPMAILER_LANG['data_not_accepted'] = 'Eraro de servilo SMTP : neĝustaj datumoj.';
$PHPMAILER_LANG['empty_message'] = 'Teksto de mesaĝo mankas.';
$PHPMAILER_LANG['encoding'] = 'Nekonata kodoprezento: ';
$PHPMAILER_LANG['execute'] = 'Lanĉi rulumadon ne eblis: ';
$PHPMAILER_LANG['file_access'] = 'Aliro al dosiero ne sukcesis: ';
$PHPMAILER_LANG['file_open'] = 'Eraro de dosiero: malfermo neeblas: ';
$PHPMAILER_LANG['from_failed'] = 'Jena adreso de sendinto malsukcesis: ';
$PHPMAILER_LANG['instantiate'] = 'Genero de retmesaĝa funkcio neeblis.';
$PHPMAILER_LANG['invalid_address'] = 'Retadreso ne validas: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mesaĝilo ne subtenata.';
$PHPMAILER_LANG['provide_address'] = 'Vi devas tajpi almenaŭ unu recevontan retadreson.';
$PHPMAILER_LANG['recipients_failed'] = 'Eraro de servilo SMTP : la jenaj poŝtrecivuloj kaŭzis eraron: ';
$PHPMAILER_LANG['signing'] = 'Eraro de subskribo: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP konektado malsukcesis.';
$PHPMAILER_LANG['smtp_error'] = 'Eraro de servilo SMTP : ';
$PHPMAILER_LANG['variable_set'] = 'Variablo ne pravalorizeblas aŭ ne repravalorizeblas: ';
$PHPMAILER_LANG['extension_missing'] = 'Mankas etendo: ';
@@ -1,36 +0,0 @@
<?php
/**
* Spanish PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Matt Sturdy <matt.sturdy@gmail.com>
* @author Crystopher Glodzienski Cardoso <crystopher.glodzienski@gmail.com>
* @author Daniel Cruz <danicruz0415@gmail.com>
*/
$PHPMAILER_LANG['authenticate'] = 'Error SMTP: Imposible autentificar.';
$PHPMAILER_LANG['buggy_php'] = 'Tu versión de PHP está afectada por un bug que puede resultar en mensajes corruptos. Para arreglarlo, cambia a enviar usando SMTP, deshabilita la opción mail.add_x_header en tu php.ini, cambia a MacOS o Linux, o actualiza tu PHP a la versión 7.0.17+ o 7.1.3+.';
$PHPMAILER_LANG['connect_host'] = 'Error SMTP: Imposible conectar al servidor SMTP.';
$PHPMAILER_LANG['data_not_accepted'] = 'Error SMTP: Datos no aceptados.';
$PHPMAILER_LANG['empty_message'] = 'El cuerpo del mensaje está vacío.';
$PHPMAILER_LANG['encoding'] = 'Codificación desconocida: ';
$PHPMAILER_LANG['execute'] = 'Imposible ejecutar: ';
$PHPMAILER_LANG['extension_missing'] = 'Extensión faltante: ';
$PHPMAILER_LANG['file_access'] = 'Imposible acceder al archivo: ';
$PHPMAILER_LANG['file_open'] = 'Error de Archivo: Imposible abrir el archivo: ';
$PHPMAILER_LANG['from_failed'] = 'La(s) siguiente(s) direcciones de remitente fallaron: ';
$PHPMAILER_LANG['instantiate'] = 'Imposible crear una instancia de la función Mail.';
$PHPMAILER_LANG['invalid_address'] = 'Imposible enviar: dirección de email inválido: ';
$PHPMAILER_LANG['invalid_header'] = 'Nombre o valor de encabezado no válido';
$PHPMAILER_LANG['invalid_hostentry'] = 'Hostentry inválido: ';
$PHPMAILER_LANG['invalid_host'] = 'Host inválido: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer no está soportado.';
$PHPMAILER_LANG['provide_address'] = 'Debe proporcionar al menos una dirección de email de destino.';
$PHPMAILER_LANG['recipients_failed'] = 'Error SMTP: Los siguientes destinos fallaron: ';
$PHPMAILER_LANG['signing'] = 'Error al firmar: ';
$PHPMAILER_LANG['smtp_code'] = 'Código del servidor SMTP: ';
$PHPMAILER_LANG['smtp_code_ex'] = 'Información adicional del servidor SMTP: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falló.';
$PHPMAILER_LANG['smtp_detail'] = 'Detalle: ';
$PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'No se pudo configurar la variable: ';

Some files were not shown because too many files have changed in this diff Show More