mirror of
https://github.com/kuhyx/WUT_Computer_Science.git
synced 2026-11-22 07:12:23 +01:00
feat
This commit is contained in:
parent
406cb6ae6f
commit
c5514854bf
@ -1,10 +1,38 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Net;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Web;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using System.Text.Encodings.Web;
|
using System.Text.Encodings.Web;
|
||||||
|
|
||||||
namespace lab2.Controllers
|
namespace FormEncode.Controllers
|
||||||
{
|
{
|
||||||
public class RegisterController : Controller
|
public class RegisterController : Controller
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
[ActionName("Complex")]
|
||||||
|
public IActionResult PostComplex(string id, string blogid, string blogTitle, string mail, string password)
|
||||||
|
{
|
||||||
|
if(id != null && blogid != null && blogTitle != null && mail != null & password != null)
|
||||||
|
{
|
||||||
|
// Convert any HTML markup in the status text.
|
||||||
|
id = HttpUtility.HtmlEncode(id);
|
||||||
|
blogid = HttpUtility.HtmlEncode(blogid);
|
||||||
|
blogTitle = HttpUtility.HtmlEncode(blogTitle);
|
||||||
|
mail = HttpUtility.HtmlEncode(mail);
|
||||||
|
password = HttpUtility.HtmlEncode(password);
|
||||||
|
ViewData["userid"] = "userid: " + id;
|
||||||
|
ViewData["email"] = "email: " + mail;
|
||||||
|
ViewData["password"] = "password: " + password;
|
||||||
|
ViewData["blogid"] = "blogid: " + blogid;
|
||||||
|
ViewData["blogtitle"] = "blogtitle: " + blogTitle;
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
else return View();
|
||||||
|
}
|
||||||
//
|
//
|
||||||
// GET: /Register/
|
// GET: /Register/
|
||||||
|
|
||||||
@ -16,12 +44,13 @@ namespace lab2.Controllers
|
|||||||
//
|
//
|
||||||
// GET: /Register/RegisterUser/?userid=Rick&email=4&password=test&blogid=blogtest
|
// GET: /Register/RegisterUser/?userid=Rick&email=4&password=test&blogid=blogtest
|
||||||
|
|
||||||
public IActionResult RegisterUser(string userid, string email, string password, string blogid)
|
public IActionResult RegisterUser(string userid, string email, string password, string blogid, string blogtitle)
|
||||||
{
|
{
|
||||||
ViewData["userid"] = "userid: " + userid;
|
ViewData["userid"] = "userid: " + userid;
|
||||||
ViewData["email"] = "email: " + email;
|
ViewData["email"] = "email: " + email;
|
||||||
ViewData["password"] = "password: " + password;
|
ViewData["password"] = "password: " + password;
|
||||||
ViewData["blogid"] = "blogid: " + blogid;
|
ViewData["blogid"] = "blogid: " + blogid;
|
||||||
|
ViewData["blogtitle"] = "blogtitle: " + blogtitle;
|
||||||
return View();
|
return View();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,41 @@
|
|||||||
ViewData["Title"] = "Register";
|
ViewData["Title"] = "Register";
|
||||||
}
|
}
|
||||||
|
|
||||||
<h2>Register</h2>
|
<h1>Register</h1>
|
||||||
|
<form id="form1" method="post" action="Register/PostComplex"
|
||||||
|
enctype="application/x-www-form-urlencoded">
|
||||||
|
<div>
|
||||||
|
<label for="ID">ID</label>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<input name="ID" type="ID" />
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label for="BlogID">BlogID</label>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<input name="BlogID" type="BlogID" />
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label for="BlogTitle">Blog Title</label>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<input name="BlogTitle" type="BlogTitle" />
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label for="Mail">Mail</label>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<input name="Mail" type="Mail" />
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label for="Password">Password</label>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<input name="Password" type="Password" />
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<input type="submit" value="Register" />
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
<p>Hello from our Register Template!</p>
|
|
||||||
|
|||||||
@ -9,4 +9,5 @@
|
|||||||
<li>@ViewData["email"]</li>
|
<li>@ViewData["email"]</li>
|
||||||
<li>@ViewData["password"]</li>
|
<li>@ViewData["password"]</li>
|
||||||
<li>@ViewData["blogid"]</li>
|
<li>@ViewData["blogid"]</li>
|
||||||
|
<li>@ViewData["blogtitle"]</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -23,7 +23,10 @@
|
|||||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Index">Home</a>
|
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Index">Home</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
|
<a class="nav-link text-dark" asp-area="" asp-controller="Register" asp-action="">Register</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link text-dark" asp-area="" asp-controller="Login" asp-action="">Login</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
|||||||
70b71697a5ec415c0ebed0daa8e14dda5e094eb8
|
393e1f8b6bf5d7d5fba35fe38d449ed26c8ed933
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -75,7 +75,7 @@
|
|||||||
"privateAssets": "all"
|
"privateAssets": "all"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/6.0.202/RuntimeIdentifierGraph.json"
|
"runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/6.0.300/RuntimeIdentifierGraph.json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/home/kuchy/.nuget/packages/</NuGetPackageRoot>
|
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/home/kuchy/.nuget/packages/</NuGetPackageRoot>
|
||||||
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/home/kuchy/.nuget/packages/</NuGetPackageFolders>
|
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/home/kuchy/.nuget/packages/</NuGetPackageFolders>
|
||||||
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
|
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
|
||||||
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.1.0</NuGetToolVersion>
|
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.2.0</NuGetToolVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||||
<SourceRoot Include="/home/kuchy/.nuget/packages/" />
|
<SourceRoot Include="/home/kuchy/.nuget/packages/" />
|
||||||
|
|||||||
@ -9889,7 +9889,7 @@
|
|||||||
"privateAssets": "all"
|
"privateAssets": "all"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/6.0.202/RuntimeIdentifierGraph.json"
|
"runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/6.0.300/RuntimeIdentifierGraph.json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"version": 2,
|
"version": 2,
|
||||||
"dgSpecHash": "1632gBteYOY/wuKfaB4Ze7rFUdvN/1i4RIiSUg56/e/EDauVmdxXWnHWizQYK4cFCwsNnU/EL37tlxJobl42WQ==",
|
"dgSpecHash": "eyEvKzMudpqP82Z+w6bg2nOaLduaGey2m4CAR19Eah9o8DIOSuc+ucHN9H/hvyyzQRWe2p/O2oPHE4qMnzW5+Q==",
|
||||||
"success": true,
|
"success": true,
|
||||||
"projectFilePath": "/home/kuchy/Zlew/Studia/NieNotatki/Projekty/nie_inzynierka/Programowanie/EGUI/egui_lab1_krzysztof_rudnicki/lab2/lab2/lab2.csproj",
|
"projectFilePath": "/home/kuchy/Zlew/Studia/NieNotatki/Projekty/nie_inzynierka/Programowanie/EGUI/egui_lab1_krzysztof_rudnicki/lab2/lab2/lab2.csproj",
|
||||||
"expectedPackageFiles": [
|
"expectedPackageFiles": [
|
||||||
|
|||||||
@ -31,3 +31,8 @@
|
|||||||
2.0
|
2.0
|
||||||
2.0
|
2.0
|
||||||
2.0
|
2.0
|
||||||
|
2.0
|
||||||
|
2.0
|
||||||
|
2.0
|
||||||
|
2.0
|
||||||
|
2.0
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user