updates session function
parent
387ecd0b7d
commit
06ae6ffe5a
|
|
@ -0,0 +1,78 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Web;
|
||||||
|
using System.Runtime.Serialization.Json;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
|
using System.Web.Services.Protocols;
|
||||||
|
using System.Security.Cryptography;
|
||||||
|
using System.Text;
|
||||||
|
using System.Web.SessionState;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.SqlClient;
|
||||||
|
using Dapper;
|
||||||
|
using Dapper.Contrib.Extensions;
|
||||||
|
|
||||||
|
public class authToken
|
||||||
|
{
|
||||||
|
|
||||||
|
public string user_uid { get; set; }
|
||||||
|
public string user_id { get; set; }
|
||||||
|
public string user_name { get; set; }
|
||||||
|
public string user_perm { get; set; }
|
||||||
|
public Boolean user_isLogin { get; set; }
|
||||||
|
public string error_msg { get; set; }
|
||||||
|
public HttpRequest myRequest { get; set; }
|
||||||
|
|
||||||
|
SqlConnection conn = new SqlConnection(globalClass.appsettings("DBConnectionString"));
|
||||||
|
|
||||||
|
public authToken() {
|
||||||
|
conn.Execute("delete token where token_expireddate <= @token_expireddate", new { token_expireddate = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss") });
|
||||||
|
|
||||||
|
HttpCookie tokenCookie = (HttpContext.Current.Request.Cookies["token"] == null) ? null : HttpContext.Current.Request.Cookies["token"];
|
||||||
|
HttpCookie idCookie = (HttpContext.Current.Request.Cookies["id"] == null) ? null : HttpContext.Current.Request.Cookies["id"];
|
||||||
|
|
||||||
|
if (tokenCookie == null)
|
||||||
|
{
|
||||||
|
user_isLogin = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
string token = tokenCookie["token"];
|
||||||
|
string id = tokenCookie["uid"];
|
||||||
|
|
||||||
|
string tokenStr = string.Format("select * from token where token_key = '{0}' and user_uid = '{1}'", token, id);
|
||||||
|
|
||||||
|
token loginToken = conn.QueryFirstOrDefault<token>(tokenStr);
|
||||||
|
|
||||||
|
if (loginToken == null)
|
||||||
|
{
|
||||||
|
tokenCookie.Expires = DateTime.Now.AddDays(-10);
|
||||||
|
tokenCookie.Values.Clear();
|
||||||
|
HttpContext.Current.Response.Cookies.Set(tokenCookie);
|
||||||
|
HttpContext.Current.Response.Cookies.Add(new HttpCookie("token", ""));
|
||||||
|
user_isLogin = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
idCookie.Expires = DateTime.Now.AddMinutes(60);
|
||||||
|
tokenCookie.Expires = DateTime.Now.AddDays(10);
|
||||||
|
|
||||||
|
|
||||||
|
HttpContext.Current.Response.Cookies.Add(tokenCookie);
|
||||||
|
HttpContext.Current.Response.Cookies.Add(idCookie);
|
||||||
|
}
|
||||||
|
|
||||||
|
loginToken.token_expireddate = DateTime.Now.AddMinutes(60);
|
||||||
|
|
||||||
|
conn.Update<token>(loginToken);
|
||||||
|
|
||||||
|
user_id = "admin";
|
||||||
|
user_uid = "admin";
|
||||||
|
user_name = "系統管理者";
|
||||||
|
user_perm = "admin";
|
||||||
|
user_isLogin = true;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
|
||||||
|
using Dapper.Contrib.Extensions;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Web;
|
||||||
|
|
||||||
|
[Table("login")]
|
||||||
|
public class login
|
||||||
|
{
|
||||||
|
[Key]
|
||||||
|
public string login_id { get; set; } = "";
|
||||||
|
public string login_pwd { get; set; } = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
[Table("token")]
|
||||||
|
public class token
|
||||||
|
{
|
||||||
|
[JsonIgnore]
|
||||||
|
[Key]
|
||||||
|
public int token_sn { get; set; } = 0;
|
||||||
|
public string token_key { get; set; } = "";
|
||||||
|
public string user_uid { get; set; } = "";
|
||||||
|
public string user_id { get; set; } = "";
|
||||||
|
public string token_isremember { get; set; } = "";
|
||||||
|
public DateTime token_createdate { get; set; } = DateTime.Now;
|
||||||
|
public DateTime token_expireddate { get; set; } = DateTime.Now;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,63 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Web;
|
||||||
|
using System.Runtime.Serialization.Json;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
|
using System.Web.Services.Protocols;
|
||||||
|
using System.Security.Cryptography;
|
||||||
|
using System.Text;
|
||||||
|
using System.Web.SessionState;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing.Imaging;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.IO;
|
||||||
|
using System.Data.SqlClient;
|
||||||
|
using System.Configuration;
|
||||||
|
|
||||||
|
public static class globalClass
|
||||||
|
{
|
||||||
|
public static string CreateRandomCode(int Number)
|
||||||
|
{
|
||||||
|
string allChar = "0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z";
|
||||||
|
string[] allCharArray = allChar.Split(',');
|
||||||
|
string randomCode = "";
|
||||||
|
|
||||||
|
Random rand = new Random(Guid.NewGuid().GetHashCode());
|
||||||
|
for (int i = 0; i <= Number - 1; i++)
|
||||||
|
{
|
||||||
|
int t = rand.Next(allCharArray.Length);
|
||||||
|
randomCode += allCharArray[t];
|
||||||
|
}
|
||||||
|
return randomCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string appsettings(string key)
|
||||||
|
{
|
||||||
|
|
||||||
|
return ConfigurationManager.ConnectionStrings[key].ConnectionString;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string SHA256_Encode(string value)
|
||||||
|
{
|
||||||
|
byte[] bytValue = System.Text.Encoding.UTF8.GetBytes(value);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
SHA256 sha256 = new SHA256CryptoServiceProvider();
|
||||||
|
byte[] retVal = sha256.ComputeHash(bytValue);
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
for (int i = 0; i < retVal.Length; i++)
|
||||||
|
{
|
||||||
|
sb.Append(retVal[i].ToString("x2"));
|
||||||
|
}
|
||||||
|
return sb.ToString();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Exception("GetSHA256HashFromString() fail,error:" + ex.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,26 @@
|
||||||
<%@ Page Title="" Language="C#" MasterPageFile="~/BackEnd/Main.Master" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="abbott_2024_event.BackEnd.Index" %>
|
<%@ Page Title="" Language="C#" MasterPageFile="~/BackEnd/Main.Master" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="abbott_2024_event.BackEnd.Index" %>
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
|
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
|
||||||
|
<!-- .page-inner -->
|
||||||
|
<div class="page-inner">
|
||||||
|
<!-- .page-title-bar -->
|
||||||
|
<header class="page-title-bar">
|
||||||
|
<!-- page title stuff goes here -->
|
||||||
|
<h1 class="page-title" id="page_title">Page title </h1>
|
||||||
|
</header>
|
||||||
|
<!-- /.page-title-bar -->
|
||||||
|
<!-- .page-section -->
|
||||||
|
<div class="page-section">
|
||||||
|
<!-- .section-block -->
|
||||||
|
<div class="section-block">
|
||||||
|
<!-- page content goes here -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- /.section-block -->
|
||||||
|
</div>
|
||||||
|
<!-- /.page-section -->
|
||||||
|
</div>
|
||||||
|
<!-- /.page-inner -->
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <自動產生>
|
||||||
// 這段程式碼是由工具產生的。
|
// 這段程式碼是由工具產生的。
|
||||||
//
|
//
|
||||||
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
|
// 變更這個檔案可能會導致不正確的行為,而且如果已重新產生
|
||||||
// 變更將會遺失。
|
// 程式碼,則會遺失變更。
|
||||||
// </auto-generated>
|
// </自動產生>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace abbott_2024_event.BackEnd
|
namespace abbott_2024_event.BackEnd
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,97 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<!-- Required meta tags -->
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><!-- End Required meta tags -->
|
||||||
|
<!-- Begin SEO tag -->
|
||||||
|
<title> 後台登入 </title>
|
||||||
|
<!-- End SEO tag -->
|
||||||
|
<!-- Favicons -->
|
||||||
|
<link rel="apple-touch-icon" sizes="144x144" href="assets/favicon.png">
|
||||||
|
<link rel="shortcut icon" href="assets/favicon.ico">
|
||||||
|
<meta name="theme-color" content="#3063A0"><!-- Google font -->
|
||||||
|
<link href="https://fonts.googleapis.com/css?family=Fira+Sans:400,500,600" rel="stylesheet"><!-- End Google font -->
|
||||||
|
<!-- BEGIN PLUGINS STYLES -->
|
||||||
|
<link rel="stylesheet" href="assets/vendor/@fortawesome/fontawesome-free/css/all.min.css"><!-- END PLUGINS STYLES -->
|
||||||
|
<!-- BEGIN THEME STYLES -->
|
||||||
|
<link rel="stylesheet" href="assets/stylesheets/theme.min.css" data-skin="default">
|
||||||
|
<link rel="stylesheet" href="assets/stylesheets/theme-dark.min.css" data-skin="dark">
|
||||||
|
<link rel="stylesheet" href="assets/stylesheets/custom.css">
|
||||||
|
<script>
|
||||||
|
var skin = localStorage.getItem('skin') || 'default';
|
||||||
|
var isCompact = JSON.parse(localStorage.getItem('hasCompactMenu'));
|
||||||
|
var disabledSkinStylesheet = document.querySelector('link[data-skin]:not([data-skin="' + skin + '"])');
|
||||||
|
// Disable unused skin immediately
|
||||||
|
disabledSkinStylesheet.setAttribute('rel', '');
|
||||||
|
disabledSkinStylesheet.setAttribute('disabled', true);
|
||||||
|
// add flag class to html immediately
|
||||||
|
if (isCompact == true) document.querySelector('html').classList.add('preparing-compact-menu');
|
||||||
|
</script><!-- END THEME STYLES -->
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!--[if lt IE 10]>
|
||||||
|
<div class="page-message" role="alert">You are using an <strong>outdated</strong> browser. Please <a class="alert-link" href="http://browsehappy.com/">upgrade your browser</a> to improve your experience and security.</div>
|
||||||
|
<![endif]-->
|
||||||
|
<!-- .auth -->
|
||||||
|
<main class="auth">
|
||||||
|
<header id="auth-header" class="auth-header" style="background-image: url(assets/images/illustration/img-1.png);">
|
||||||
|
<h1>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="64" viewbox="0 0 351 100">
|
||||||
|
<defs>
|
||||||
|
<path id="a" d="M156.538 45.644v1.04a6.347 6.347 0 0 1-1.847 3.98L127.708 77.67a6.338 6.338 0 0 1-3.862 1.839h-1.272a6.34 6.34 0 0 1-3.862-1.839L91.728 50.664a6.353 6.353 0 0 1 0-9l9.11-9.117-2.136-2.138a3.171 3.171 0 0 0-4.498 0L80.711 43.913a3.177 3.177 0 0 0-.043 4.453l-.002.003.048.047 24.733 24.754-4.497 4.5a6.339 6.339 0 0 1-3.863 1.84h-1.27a6.337 6.337 0 0 1-3.863-1.84L64.971 50.665a6.353 6.353 0 0 1 0-9l26.983-27.008a6.336 6.336 0 0 1 4.498-1.869c1.626 0 3.252.622 4.498 1.87l26.986 27.006a6.353 6.353 0 0 1 0 9l-9.11 9.117 2.136 2.138a3.171 3.171 0 0 0 4.498 0l13.49-13.504a3.177 3.177 0 0 0 .046-4.453l.002-.002-.047-.048-24.737-24.754 4.498-4.5a6.344 6.344 0 0 1 8.996 0l26.983 27.006a6.347 6.347 0 0 1 1.847 3.98zm-46.707-4.095l-2.362 2.364a3.178 3.178 0 0 0 0 4.501l2.362 2.364 2.361-2.364a3.178 3.178 0 0 0 0-4.501l-2.361-2.364z"></path>
|
||||||
|
</defs>
|
||||||
|
<g fill="none" fill-rule="evenodd">
|
||||||
|
<path fill="currentColor" fill-rule="nonzero" d="M39.252 80.385c-13.817 0-21.06-8.915-21.06-22.955V13.862H.81V.936h33.762V58.1c0 6.797 4.346 9.026 9.026 9.026 2.563 0 5.237-.446 8.58-1.783l3.677 12.034c-5.794 1.894-9.694 3.009-16.603 3.009zM164.213 99.55V23.78h13.372l1.225 5.571h.335c4.457-4.011 10.585-6.908 16.491-6.908 13.817 0 22.174 11.031 22.174 28.08 0 18.943-11.588 29.863-23.957 29.863-4.903 0-9.694-2.117-13.594-6.017h-.446l.78 9.025V99.55h-16.38zm25.852-32.537c6.128 0 10.92-4.903 10.92-16.268 0-9.917-3.232-14.932-10.14-14.932-3.566 0-6.797 1.56-10.252 5.126v22.397c3.12 2.674 6.686 3.677 9.472 3.677zm69.643 13.372c-17.272 0-30.643-10.586-30.643-28.972 0-18.163 13.928-28.971 28.748-28.971 17.049 0 26.075 11.477 26.075 26.52 0 3.008-.558 6.017-.78 7.354h-37.663c1.56 8.023 7.465 11.589 16.491 11.589 5.014 0 9.36-1.337 14.263-3.9l5.46 9.917c-6.351 4.011-14.597 6.463-21.951 6.463zm-1.338-45.463c-6.462 0-11.031 3.454-12.702 10.363h23.622c-.78-6.797-4.568-10.363-10.92-10.363zm44.238 44.126V23.779h13.371l1.337 12.034h.334c5.46-9.025 13.595-13.371 22.398-13.371 4.902 0 7.465.78 10.697 2.228l-3.343 13.706c-3.454-1.003-5.683-1.56-9.806-1.56-6.797 0-13.928 3.566-18.608 13.483v28.749h-16.38z"></path>
|
||||||
|
<use class="fill-warning" xlink:href="#a"></use>
|
||||||
|
</g>
|
||||||
|
</svg> <span class="sr-only">Sign In</span>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
</header><!-- form -->
|
||||||
|
<form class="auth-form">
|
||||||
|
<!-- .form-group -->
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="form-label-group">
|
||||||
|
<input type="text" id="login_id" class="form-control" placeholder="帳號" autofocus=""> <label for="login_id">帳號</label>
|
||||||
|
</div>
|
||||||
|
</div><!-- /.form-group -->
|
||||||
|
<!-- .form-group -->
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="form-label-group">
|
||||||
|
<input type="password" id="login_pwd" class="form-control" placeholder="密碼"> <label for="login_pwd">密碼</label>
|
||||||
|
</div>
|
||||||
|
</div><!-- /.form-group -->
|
||||||
|
<!-- .form-group -->
|
||||||
|
<div class="form-group">
|
||||||
|
<button id="login_btn" class="btn btn-lg btn-primary btn-block" type="button">登入</button>
|
||||||
|
</div><!-- /.form-group -->
|
||||||
|
|
||||||
|
</form><!-- /.auth-form -->
|
||||||
|
|
||||||
|
</main><!-- /.auth -->
|
||||||
|
<!-- BEGIN BASE JS -->
|
||||||
|
<script src="assets/vendor/jquery/jquery.min.js"></script>
|
||||||
|
<script src="assets/vendor/jquery.cookie/jquery.cookie.js"></script>
|
||||||
|
<script src="assets/vendor/popper.js/umd/popper.min.js"></script>
|
||||||
|
<script src="assets/vendor/bootstrap/js/bootstrap.min.js"></script>
|
||||||
|
<script src="assets/javascript/sha256.js"></script>
|
||||||
|
<script src="assets/javascript/custom/globalJS.js"></script>
|
||||||
|
<script src="assets/javascript/custom/Login.js?v=2" ></script>
|
||||||
|
<!-- END BASE JS -->
|
||||||
|
<!-- BEGIN PLUGINS JS -->
|
||||||
|
<script src="assets/vendor/particles.js/particles.js"></script>
|
||||||
|
<script>
|
||||||
|
/**
|
||||||
|
* Keep in mind that your scripts may not always be executed after the theme is completely ready,
|
||||||
|
* you might need to observe the `theme:load` event to make sure your scripts are executed after the theme is ready.
|
||||||
|
*/
|
||||||
|
$(document).on('theme:init', () => {
|
||||||
|
/* particlesJS.load(@dom-id, @path-json, @callback (optional)); */
|
||||||
|
particlesJS.load('auth-header', 'assets/javascript/pages/particles.json');
|
||||||
|
})
|
||||||
|
</script> <!-- END PLUGINS JS -->
|
||||||
|
<!-- BEGIN THEME JS -->
|
||||||
|
<script src="assets/javascript/theme.js"></script> <!-- END THEME JS -->
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -137,22 +137,8 @@
|
||||||
<!-- .page -->
|
<!-- .page -->
|
||||||
<div class="page">
|
<div class="page">
|
||||||
<!-- .page-inner -->
|
<!-- .page-inner -->
|
||||||
<div class="page-inner">
|
|
||||||
<!-- .page-title-bar -->
|
|
||||||
<header class="page-title-bar">
|
|
||||||
<!-- page title stuff goes here -->
|
|
||||||
<h1 class="page-title"> Page title </h1>
|
|
||||||
</header><!-- /.page-title-bar -->
|
|
||||||
<!-- .page-section -->
|
|
||||||
<div class="page-section">
|
|
||||||
<!-- .section-block -->
|
|
||||||
<div class="section-block">
|
|
||||||
<!-- page content goes here -->
|
|
||||||
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
|
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
|
||||||
</asp:ContentPlaceHolder>
|
</asp:ContentPlaceHolder><!-- /.page-inner -->
|
||||||
</div><!-- /.section-block -->
|
|
||||||
</div><!-- /.page-section -->
|
|
||||||
</div><!-- /.page-inner -->
|
|
||||||
</div><!-- /.page -->
|
</div><!-- /.page -->
|
||||||
</div><!-- /.wrapper -->
|
</div><!-- /.wrapper -->
|
||||||
</main><!-- /.app-main -->
|
</main><!-- /.app-main -->
|
||||||
|
|
|
||||||
|
|
@ -7,11 +7,34 @@ using System.Web.UI.WebControls;
|
||||||
|
|
||||||
namespace abbott_2024_event.BackEnd
|
namespace abbott_2024_event.BackEnd
|
||||||
{
|
{
|
||||||
|
|
||||||
public partial class Main : System.Web.UI.MasterPage
|
public partial class Main : System.Web.UI.MasterPage
|
||||||
{
|
{
|
||||||
|
public authToken authToken;
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
authToken = new authToken();
|
||||||
|
|
||||||
|
if (authToken.user_isLogin == false) {
|
||||||
|
HttpCookie tokenCookie = (HttpContext.Current.Request.Cookies["token"] == null) ? null : HttpContext.Current.Request.Cookies["token"];
|
||||||
|
HttpCookie idCookie = (HttpContext.Current.Request.Cookies["id"] == null) ? null : HttpContext.Current.Request.Cookies["id"];
|
||||||
|
|
||||||
|
HttpContext.Current.Response.Cookies["token"].Expires = DateTime.Now.AddDays(-1);
|
||||||
|
|
||||||
|
if (tokenCookie != null) {
|
||||||
|
tokenCookie.Expires = DateTime.Now.AddDays(-10);
|
||||||
|
tokenCookie.Values.Clear();
|
||||||
|
|
||||||
|
HttpContext.Current.Response.Cookies.Set(tokenCookie);
|
||||||
|
|
||||||
|
HttpContext.Current.Response.Cookies.Add(new HttpCookie("token", ""));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Response.Redirect("Login.html?isLogout=true");
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
<%@ WebHandler Language="C#" CodeBehind="signin.ashx.cs" Class="abbott_2024_event.BackEnd.api.signin" %>
|
||||||
|
|
@ -0,0 +1,86 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data.SqlClient;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Runtime.Serialization.Json;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.SessionState;
|
||||||
|
using Dapper;
|
||||||
|
using Dapper.Contrib.Extensions;
|
||||||
|
|
||||||
|
|
||||||
|
namespace abbott_2024_event.BackEnd.api
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// signin 的摘要描述
|
||||||
|
/// </summary>
|
||||||
|
public class signin : IHttpHandler, IReadOnlySessionState
|
||||||
|
{
|
||||||
|
SqlConnection conn = new SqlConnection(globalClass.appsettings("DBConnectionString"));
|
||||||
|
|
||||||
|
public void ProcessRequest(HttpContext context)
|
||||||
|
{
|
||||||
|
result objRet = new result();
|
||||||
|
DataContractJsonSerializer json = new DataContractJsonSerializer(objRet.GetType());
|
||||||
|
context.Response.ContentType = "application/json;charset=utf-8";
|
||||||
|
|
||||||
|
string id = (context.Request["id"] == null) ? "" : context.Request["id"].ToString();
|
||||||
|
string pwd = (context.Request["pwd"] == null) ? "" : context.Request["pwd"].ToString();
|
||||||
|
|
||||||
|
login login = conn.QueryFirstOrDefault<login>("select * from login where login_id = @login_id and login_pwd = @login_pwd", new { login_id = id, login_pwd = pwd });
|
||||||
|
|
||||||
|
if (login == null)
|
||||||
|
{
|
||||||
|
objRet.ret = "no";
|
||||||
|
objRet.err_code = "0001";
|
||||||
|
objRet.message = "帳號或密碼錯誤";
|
||||||
|
json.WriteObject(context.Response.OutputStream, objRet);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
string token_key = globalClass.CreateRandomCode(32);
|
||||||
|
string user_uid = id;
|
||||||
|
|
||||||
|
token newToken = new token();
|
||||||
|
newToken.user_uid = user_uid;
|
||||||
|
newToken.user_id = id;
|
||||||
|
newToken.token_key = token_key;
|
||||||
|
newToken.token_isremember = "N";
|
||||||
|
newToken.token_expireddate = DateTime.Now.AddMinutes(60);
|
||||||
|
newToken.token_createdate = DateTime.Now;
|
||||||
|
|
||||||
|
HttpCookie tokenCookie = new HttpCookie("token");
|
||||||
|
HttpCookie idCookie = new HttpCookie("id");
|
||||||
|
tokenCookie["token"] = token_key;
|
||||||
|
tokenCookie["uid"] = user_uid;
|
||||||
|
idCookie["id"] = id;
|
||||||
|
|
||||||
|
tokenCookie.Expires = DateTime.Now.AddMinutes(60);
|
||||||
|
idCookie.Expires = DateTime.Now.AddDays(31);
|
||||||
|
|
||||||
|
conn.Insert<token>(newToken);
|
||||||
|
|
||||||
|
context.Response.Cookies.Add(tokenCookie);
|
||||||
|
context.Response.Cookies.Add(idCookie);
|
||||||
|
|
||||||
|
objRet.ret = "yes";
|
||||||
|
json.WriteObject(context.Response.OutputStream, objRet);
|
||||||
|
}
|
||||||
|
|
||||||
|
public class result
|
||||||
|
{
|
||||||
|
public string ret = "no";
|
||||||
|
public string err_code = "0000";
|
||||||
|
public string message = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public bool IsReusable
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
|
||||||
|
$(document).ready(function () {
|
||||||
|
if ($.UrlParam("isLogout") != "true") {
|
||||||
|
if ($.cookie("token_key") != null) {
|
||||||
|
if ($.cookie("token_key") != "") {
|
||||||
|
location.href = "/BackEnd/Index.aspx";
|
||||||
|
//alert("has token_key value :" + $.cookie("token_key"));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#login_btn').on('click', function () {
|
||||||
|
var id = $("#login_id").val();
|
||||||
|
var pwd = $("#login_pwd").val();
|
||||||
|
|
||||||
|
var err_msg = "";
|
||||||
|
|
||||||
|
if (id === "") {
|
||||||
|
err_msg += "請輸入帳號!\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pwd === "") {
|
||||||
|
err_msg += "請輸入密碼!\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (err_msg !== "") {
|
||||||
|
alert(err_msg);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
pwd = sha256_digest(pwd);
|
||||||
|
|
||||||
|
var formData = {
|
||||||
|
id: id,
|
||||||
|
pwd: pwd
|
||||||
|
}
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url: "api/signin.ashx",
|
||||||
|
type: "POST",
|
||||||
|
data: formData,
|
||||||
|
success: function (data, textStatus, jqXHR) {
|
||||||
|
if (data.ret == "yes") {
|
||||||
|
location.href = "Index.aspx";
|
||||||
|
} else {
|
||||||
|
alert(data.message);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function (jqXHR, textStatus, errorThrown) {
|
||||||
|
alert('网絡或伺服器发生错误,请稍后重试!');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
@ -0,0 +1,359 @@
|
||||||
|
//const zhTw = require("../../vendor/fullcalendar/locale/zh-tw");
|
||||||
|
|
||||||
|
(function ($, document) {
|
||||||
|
(function ($) {
|
||||||
|
$.UrlParam = function (name) {
|
||||||
|
//宣告正規表達式
|
||||||
|
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
|
||||||
|
/*
|
||||||
|
* window.location.search 獲取URL ?之後的參數(包含問號)
|
||||||
|
* substr(1) 獲取第一個字以後的字串(就是去除掉?號)
|
||||||
|
* match(reg) 用正規表達式檢查是否符合要查詢的參數
|
||||||
|
*/
|
||||||
|
var r = window.location.search.substr(1).match(reg);
|
||||||
|
//如果取出的參數存在則取出參數的值否則回穿null
|
||||||
|
if (r != null) return unescape(r[2]); return null;
|
||||||
|
}
|
||||||
|
})(jQuery);
|
||||||
|
|
||||||
|
if ($.cookie) {
|
||||||
|
$.cookieKey = function (CookieName, KeyName, Value, Options) {
|
||||||
|
var reg = new RegExp("(?:([^=]+)=([^&]*)&?)", "ig"),
|
||||||
|
match = null,
|
||||||
|
matches = [];
|
||||||
|
var cookieVal = $.cookie(CookieName);
|
||||||
|
while (match = reg.exec(cookieVal)) {
|
||||||
|
if (KeyName.toLowerCase() == match[1].toLowerCase()) {
|
||||||
|
if (Value) { //we are updating, collect all values
|
||||||
|
matches.push([match[1], Value]);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return match[2]; //we are getting, sub key found just return it
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (Value) { //we are updating, collect all values
|
||||||
|
matches.push([match[1], match[2]]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Value) { //we are updating, update values
|
||||||
|
updatedValue = "",
|
||||||
|
sep = "";
|
||||||
|
for (i = 0; i < matches; i++) {
|
||||||
|
updatedValue += sep + matches[i][0] + "=" + matches[i][1];
|
||||||
|
sep = "&"
|
||||||
|
}
|
||||||
|
$.cookie(CookieName, updatedValue, Options);
|
||||||
|
}
|
||||||
|
else return null;//we are getting, value not found
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})(jQuery, document);
|
||||||
|
|
||||||
|
// 對Date的擴充套件,將 Date 轉化為指定格式的String
|
||||||
|
// 月(M)、日(d)、小時(h)、分(m)、秒(s)、季度(q) 可以用 1-2 個佔位符,
|
||||||
|
// 年(y)可以用 1-4 個佔位符,毫秒(S)只能用 1 個佔位符(是 1-3 位的數字)
|
||||||
|
// 例子:
|
||||||
|
// (new Date()).format("yyyy-MM-dd hh:mm:ss.S") ==> 2006-07-02 08:09:04.423
|
||||||
|
// (new Date()).format("yyyy-M-d hⓜ️s.S") ==> 2006-7-2 8:9:4.18
|
||||||
|
Date.prototype.format = function (fmt) {
|
||||||
|
var o = {
|
||||||
|
"M+": this.getMonth() + 1, //月份
|
||||||
|
"d+": this.getDate(), //日
|
||||||
|
"h+": this.getHours(), //小時
|
||||||
|
"m+": this.getMinutes(), //分
|
||||||
|
"s+": this.getSeconds(), //秒
|
||||||
|
"q+": Math.floor((this.getMonth() + 3) / 3), //季度
|
||||||
|
"S": this.getMilliseconds() //毫秒
|
||||||
|
};
|
||||||
|
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
|
||||||
|
for (var k in o)
|
||||||
|
if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
|
||||||
|
return fmt;
|
||||||
|
}
|
||||||
|
|
||||||
|
Date.prototype.addSeconds = function (seconds) {
|
||||||
|
this.setSeconds(this.getSeconds() + seconds);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
Date.prototype.addMinutes = function (minutes) {
|
||||||
|
this.setMinutes(this.getMinutes() + minutes);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
Date.prototype.addHours = function (hours) {
|
||||||
|
this.setHours(this.getHours() + hours);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
Date.prototype.addDays = function (days) {
|
||||||
|
this.setDate(this.getDate() + days);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
Date.prototype.addMonths = function (months) {
|
||||||
|
this.setMonth(this.getMonth() + months);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
Date.prototype.addYears = function (years) {
|
||||||
|
this.setFullYear(this.getFullYear() + years);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
function diffSeconds(milliseconds) {
|
||||||
|
return Math.floor(milliseconds / 1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
function diffMinutes(milliseconds) {
|
||||||
|
return Math.floor(milliseconds / 1000 / 60);
|
||||||
|
}
|
||||||
|
|
||||||
|
function diffHours(milliseconds) {
|
||||||
|
return Math.floor(milliseconds / 1000 / 60 / 60);
|
||||||
|
}
|
||||||
|
|
||||||
|
function diffDays(milliseconds) {
|
||||||
|
return Math.floor(milliseconds / 1000 / 60 / 60 / 24);
|
||||||
|
}
|
||||||
|
|
||||||
|
function padding(num, length) {
|
||||||
|
for (var len = (num + "").length; len < length; len = num.length) {
|
||||||
|
num = "0" + num;
|
||||||
|
}
|
||||||
|
return num;
|
||||||
|
}
|
||||||
|
|
||||||
|
function clearChildren(element) {
|
||||||
|
for (var i = 0; i < element.childNodes.length; i++) {
|
||||||
|
var e = element.childNodes[i];
|
||||||
|
if (e.tagName) switch (e.tagName.toLowerCase()) {
|
||||||
|
case 'input':
|
||||||
|
switch (e.type) {
|
||||||
|
case "radio":
|
||||||
|
case "checkbox": break;
|
||||||
|
case "hidden": e.value = ''; break;
|
||||||
|
case "button":
|
||||||
|
case "submit":
|
||||||
|
case "text": e.value = ''; break;
|
||||||
|
case "image": break;
|
||||||
|
default: if (e.type != "checkbox") { e.value = ''; }; break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'select': e.selectedIndex = 0; break;
|
||||||
|
case 'textarea': e.innerHTML = ''; break;
|
||||||
|
default: clearChildren(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$(element).children().find('textarea').each(function () {
|
||||||
|
$(this).val('');
|
||||||
|
});
|
||||||
|
|
||||||
|
$(element).children().find('select').each(function () {
|
||||||
|
$(this).prop('selectedIndex', 0);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$(document).ready(function () {
|
||||||
|
$('.modal').on("hidden.bs.modal", function (e) {
|
||||||
|
clearChildren(this);
|
||||||
|
if ($('.modal:visible').length) {
|
||||||
|
$('.modal-backdrop').first().css('z-index', parseInt($('.modal:visible').last().css('z-index')) - 10);
|
||||||
|
$('body').addClass('modal-open');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}).on("show.bs.modal", function (e) {
|
||||||
|
if ($('.modal:visible').length) {
|
||||||
|
$('.modal-backdrop.in').first().css('z-index', parseInt($('.modal:visible').last().css('z-index')) + 10);
|
||||||
|
$(this).css('z-index', parseInt($('.modal-backdrop.in').first().css('z-index')) + 10);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
(function ($) {
|
||||||
|
$.UrlParam = function (name) {
|
||||||
|
//宣告正規表達式
|
||||||
|
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
|
||||||
|
/*
|
||||||
|
* window.location.search 獲取URL ?之後的參數(包含問號)
|
||||||
|
* substr(1) 獲取第一個字以後的字串(就是去除掉?號)
|
||||||
|
* match(reg) 用正規表達式檢查是否符合要查詢的參數
|
||||||
|
*/
|
||||||
|
var r = window.location.search.substr(1).match(reg);
|
||||||
|
//如果取出的參數存在則取出參數的值否則回穿null
|
||||||
|
if (r != null) return unescape(r[2]); return null;
|
||||||
|
}
|
||||||
|
})(jQuery);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
function logout() {
|
||||||
|
|
||||||
|
if (confirm('確認要登出系統?')) {
|
||||||
|
$.ajax({
|
||||||
|
url: "/AuthApi/logout",
|
||||||
|
type: "POST",
|
||||||
|
data: null,
|
||||||
|
success: function (data, textStatus, jqXHR) {
|
||||||
|
if (data.ret == "yes") {
|
||||||
|
location.href = "/Home/Login";
|
||||||
|
//location.href = "/BackEnd/nounsList";
|
||||||
|
|
||||||
|
} else {
|
||||||
|
alert(data.message);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function (jqXHR, textStatus, errorThrown) {
|
||||||
|
alert('網路或伺服器發生錯誤,請稍後重試!');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
String.prototype.isDate = function () {
|
||||||
|
var p;
|
||||||
|
var re1 = /(\d{4})[年./-](\d{1,2})[月./-](\d{1,2})[日]?$/;
|
||||||
|
var re2 = /(\d{1,2})[月./-](\d{1,2})[日./-](\d{2})[年]?$/;
|
||||||
|
var re3 = /(\d{1,2})[月./-](\d{1,2})[日./-](\d{4})[年]?$/;
|
||||||
|
if (re1.test(this)) {
|
||||||
|
p = re1.exec(this);
|
||||||
|
return new Date(p[1], p[2], p[3]);
|
||||||
|
}
|
||||||
|
if (re2.test(this)) {
|
||||||
|
p = re2.exec(this);
|
||||||
|
return new Date(p[3], p[1], p[2]);
|
||||||
|
}
|
||||||
|
if (re3.test(this)) {
|
||||||
|
p = re3.exec(this);
|
||||||
|
return new Date(p[3], p[1], p[2]);
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
String.prototype.isDigit = function () {
|
||||||
|
var s = this.Trim();
|
||||||
|
return (s.replace(/\d/g, "").length == 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*** 檢查是否由數字字母和下劃線組成 ***/
|
||||||
|
String.prototype.isAlpha = function () {
|
||||||
|
return (this.replace(/\w/g, "").length == 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*** 檢查是否為數 ***/
|
||||||
|
String.prototype.isNumber = function () {
|
||||||
|
var s = this.Trim();
|
||||||
|
return (s.search(/^[+-]?[0-9.]*$/) >= 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*** 返回字節數 ***/
|
||||||
|
String.prototype.lenb = function () {
|
||||||
|
return this.replace(/[^\x00-\xff]/g, "**").length;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*** 檢查是否包含漢字 ***/
|
||||||
|
String.prototype.isInChinese = function () {
|
||||||
|
return (this.length != this.replace(/[^\x00-\xff]/g, "**").length);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*** 刪除首尾空格 ***/
|
||||||
|
String.prototype.Trim = function () {
|
||||||
|
return this.replace(/(^\s*)|(\s*$)/g, "");
|
||||||
|
}
|
||||||
|
const apiUrl = '' /*** 有值的話需要斜線結尾喔 **/
|
||||||
|
|
||||||
|
/*** 簡單的email檢查 ***/
|
||||||
|
String.prototype.isEmail = function () {
|
||||||
|
var strr;
|
||||||
|
var mail = this;
|
||||||
|
var re = /(\w+@\w+\.\w+)(\.{0,1}\w*)(\.{0,1}\w*)/i;
|
||||||
|
re.exec(mail);
|
||||||
|
if (RegExp.$3 != "" && RegExp.$3 != "." && RegExp.$2 != ".")
|
||||||
|
strr = RegExp.$1 + RegExp.$2 + RegExp.$3;
|
||||||
|
else
|
||||||
|
if (RegExp.$2 != "" && RegExp.$2 != ".")
|
||||||
|
strr = RegExp.$1 + RegExp.$2;
|
||||||
|
else
|
||||||
|
strr = RegExp.$1;
|
||||||
|
return (strr == mail);
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkUrl(url) {
|
||||||
|
var pattern = new RegExp('^(https?:\\/\\/)?' + // protocol
|
||||||
|
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name
|
||||||
|
'((\\d{1,3}\\.){3}\\d{1,3}))' + // OR ip (v4) address
|
||||||
|
'(\\:\\d+)?(\\/[-a-z\\d@%_.~+]*)*' + // port and path
|
||||||
|
'(\\?[;&a-z\\d@%_.~+=-]*)?' + // query string
|
||||||
|
'(\\#[-a-z\\d@_]*)?$', 'i'); // fragment locator
|
||||||
|
return !!pattern.test(url);
|
||||||
|
}
|
||||||
|
|
||||||
|
//數字處理為有千分位
|
||||||
|
function AppendComma(number) {
|
||||||
|
var parts = number.toString().split(".");
|
||||||
|
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||||
|
return parts.join(".");
|
||||||
|
}
|
||||||
|
function AppendComma2(n) {
|
||||||
|
if (!/^((-*\d+)|(0))$/.test(n)) {
|
||||||
|
var newValue = /^((-*\d+)|(0))$/.exec(n);
|
||||||
|
if (newValue != null) {
|
||||||
|
if (parseFloat(newValue, 10)) {
|
||||||
|
n = newValue;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
n = '0';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
n = '0';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (parseFloat(n, 10) == 0) {
|
||||||
|
n = '0';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
n = parseFloat(n, 10).toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
n += '';
|
||||||
|
var arr = n.split('.');
|
||||||
|
var re = /(\d{1,3})(?=(\d{3})+$)/g;
|
||||||
|
return arr[0].replace(re, '$1,') + (arr.length == 2 ? '.' + arr[1] : '');
|
||||||
|
}
|
||||||
|
//將有千分位的數值轉為一般數字
|
||||||
|
function RemoveComma(n) {
|
||||||
|
return n.replace(/[,]+/g, '');
|
||||||
|
}
|
||||||
|
//調整千分位
|
||||||
|
function AdjustComma(item, length) {
|
||||||
|
var originalValue = $.trim($(item).val()).length > length
|
||||||
|
? $.trim($(item).val()).substr(0, length)
|
||||||
|
: $.trim($(item).val());
|
||||||
|
|
||||||
|
$(item).val(AppendComma(originalValue));
|
||||||
|
}
|
||||||
|
//動態調整輸入欄位的長度
|
||||||
|
function TextAreaLength(item, length) {
|
||||||
|
if (item.value.length > length) {
|
||||||
|
item.value = item.value.substring(0, length);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function thousands(value) {
|
||||||
|
if (value) {
|
||||||
|
value += "";
|
||||||
|
var arr = value.split(".");
|
||||||
|
var re = /(\d{1,3})(?=(\d{3})+$)/g;
|
||||||
|
|
||||||
|
return arr[0].replace(re, "$1,") + (arr.length == 2 ? "." + arr[1] : "");
|
||||||
|
} else {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,250 @@
|
||||||
|
/*
|
||||||
|
* A JavaScript implementation of the SHA256 hash function.
|
||||||
|
*
|
||||||
|
* FILE: sha256.js
|
||||||
|
* VERSION: 0.8
|
||||||
|
* AUTHOR: Christoph Bichlmeier <informatik@zombiearena.de>
|
||||||
|
*
|
||||||
|
* NOTE: This version is not tested thoroughly!
|
||||||
|
*
|
||||||
|
* Copyright (c) 2003, Christoph Bichlmeier
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
* 1. Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* 3. Neither the name of the copyright holder nor the names of contributors
|
||||||
|
* may be used to endorse or promote products derived from this software
|
||||||
|
* without specific prior written permission.
|
||||||
|
*
|
||||||
|
* ======================================================================
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS
|
||||||
|
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
||||||
|
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||||
|
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||||
|
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||||
|
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* SHA256 logical functions */
|
||||||
|
function rotateRight(n,x) {
|
||||||
|
return ((x >>> n) | (x << (32 - n)));
|
||||||
|
}
|
||||||
|
function choice(x,y,z) {
|
||||||
|
return ((x & y) ^ (~x & z));
|
||||||
|
}
|
||||||
|
function majority(x,y,z) {
|
||||||
|
return ((x & y) ^ (x & z) ^ (y & z));
|
||||||
|
}
|
||||||
|
function sha256_Sigma0(x) {
|
||||||
|
return (rotateRight(2, x) ^ rotateRight(13, x) ^ rotateRight(22, x));
|
||||||
|
}
|
||||||
|
function sha256_Sigma1(x) {
|
||||||
|
return (rotateRight(6, x) ^ rotateRight(11, x) ^ rotateRight(25, x));
|
||||||
|
}
|
||||||
|
function sha256_sigma0(x) {
|
||||||
|
return (rotateRight(7, x) ^ rotateRight(18, x) ^ (x >>> 3));
|
||||||
|
}
|
||||||
|
function sha256_sigma1(x) {
|
||||||
|
return (rotateRight(17, x) ^ rotateRight(19, x) ^ (x >>> 10));
|
||||||
|
}
|
||||||
|
function sha256_expand(W, j) {
|
||||||
|
return (W[j&0x0f] += sha256_sigma1(W[(j+14)&0x0f]) + W[(j+9)&0x0f] +
|
||||||
|
sha256_sigma0(W[(j+1)&0x0f]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Hash constant words K: */
|
||||||
|
var K256 = new Array(
|
||||||
|
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
|
||||||
|
0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
|
||||||
|
0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
|
||||||
|
0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
|
||||||
|
0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,
|
||||||
|
0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
|
||||||
|
0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,
|
||||||
|
0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
|
||||||
|
0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
|
||||||
|
0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
|
||||||
|
0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,
|
||||||
|
0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
|
||||||
|
0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,
|
||||||
|
0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
|
||||||
|
0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
|
||||||
|
0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
|
||||||
|
);
|
||||||
|
|
||||||
|
/* global arrays */
|
||||||
|
var ihash, count, buffer;
|
||||||
|
var sha256_hex_digits = "0123456789abcdef";
|
||||||
|
|
||||||
|
/* Add 32-bit integers with 16-bit operations (bug in some JS-interpreters:
|
||||||
|
overflow) */
|
||||||
|
function safe_add(x, y)
|
||||||
|
{
|
||||||
|
var lsw = (x & 0xffff) + (y & 0xffff);
|
||||||
|
var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
|
||||||
|
return (msw << 16) | (lsw & 0xffff);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Initialise the SHA256 computation */
|
||||||
|
function sha256_init() {
|
||||||
|
ihash = new Array(8);
|
||||||
|
count = new Array(2);
|
||||||
|
buffer = new Array(64);
|
||||||
|
count[0] = count[1] = 0;
|
||||||
|
ihash[0] = 0x6a09e667;
|
||||||
|
ihash[1] = 0xbb67ae85;
|
||||||
|
ihash[2] = 0x3c6ef372;
|
||||||
|
ihash[3] = 0xa54ff53a;
|
||||||
|
ihash[4] = 0x510e527f;
|
||||||
|
ihash[5] = 0x9b05688c;
|
||||||
|
ihash[6] = 0x1f83d9ab;
|
||||||
|
ihash[7] = 0x5be0cd19;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Transform a 512-bit message block */
|
||||||
|
function sha256_transform() {
|
||||||
|
var a, b, c, d, e, f, g, h, T1, T2;
|
||||||
|
var W = new Array(16);
|
||||||
|
|
||||||
|
/* Initialize registers with the previous intermediate value */
|
||||||
|
a = ihash[0];
|
||||||
|
b = ihash[1];
|
||||||
|
c = ihash[2];
|
||||||
|
d = ihash[3];
|
||||||
|
e = ihash[4];
|
||||||
|
f = ihash[5];
|
||||||
|
g = ihash[6];
|
||||||
|
h = ihash[7];
|
||||||
|
|
||||||
|
/* make 32-bit words */
|
||||||
|
for(var i=0; i<16; i++)
|
||||||
|
W[i] = ((buffer[(i<<2)+3]) | (buffer[(i<<2)+2] << 8) | (buffer[(i<<2)+1]
|
||||||
|
<< 16) | (buffer[i<<2] << 24));
|
||||||
|
|
||||||
|
for(var j=0; j<64; j++) {
|
||||||
|
T1 = h + sha256_Sigma1(e) + choice(e, f, g) + K256[j];
|
||||||
|
if(j < 16) T1 += W[j];
|
||||||
|
else T1 += sha256_expand(W, j);
|
||||||
|
T2 = sha256_Sigma0(a) + majority(a, b, c);
|
||||||
|
h = g;
|
||||||
|
g = f;
|
||||||
|
f = e;
|
||||||
|
e = safe_add(d, T1);
|
||||||
|
d = c;
|
||||||
|
c = b;
|
||||||
|
b = a;
|
||||||
|
a = safe_add(T1, T2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Compute the current intermediate hash value */
|
||||||
|
ihash[0] += a;
|
||||||
|
ihash[1] += b;
|
||||||
|
ihash[2] += c;
|
||||||
|
ihash[3] += d;
|
||||||
|
ihash[4] += e;
|
||||||
|
ihash[5] += f;
|
||||||
|
ihash[6] += g;
|
||||||
|
ihash[7] += h;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Read the next chunk of data and update the SHA256 computation */
|
||||||
|
function sha256_update(data, inputLen) {
|
||||||
|
var i, index, curpos = 0;
|
||||||
|
/* Compute number of bytes mod 64 */
|
||||||
|
index = ((count[0] >> 3) & 0x3f);
|
||||||
|
var remainder = (inputLen & 0x3f);
|
||||||
|
|
||||||
|
/* Update number of bits */
|
||||||
|
if ((count[0] += (inputLen << 3)) < (inputLen << 3)) count[1]++;
|
||||||
|
count[1] += (inputLen >> 29);
|
||||||
|
|
||||||
|
/* Transform as many times as possible */
|
||||||
|
for(i=0; i+63<inputLen; i+=64) {
|
||||||
|
for(var j=index; j<64; j++)
|
||||||
|
buffer[j] = data.charCodeAt(curpos++);
|
||||||
|
sha256_transform();
|
||||||
|
index = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Buffer remaining input */
|
||||||
|
for(var j=0; j<remainder; j++)
|
||||||
|
buffer[j] = data.charCodeAt(curpos++);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Finish the computation by operations such as padding */
|
||||||
|
function sha256_final() {
|
||||||
|
var index = ((count[0] >> 3) & 0x3f);
|
||||||
|
buffer[index++] = 0x80;
|
||||||
|
if(index <= 56) {
|
||||||
|
for(var i=index; i<56; i++)
|
||||||
|
buffer[i] = 0;
|
||||||
|
} else {
|
||||||
|
for(var i=index; i<64; i++)
|
||||||
|
buffer[i] = 0;
|
||||||
|
sha256_transform();
|
||||||
|
for(var i=0; i<56; i++)
|
||||||
|
buffer[i] = 0;
|
||||||
|
}
|
||||||
|
buffer[56] = (count[1] >>> 24) & 0xff;
|
||||||
|
buffer[57] = (count[1] >>> 16) & 0xff;
|
||||||
|
buffer[58] = (count[1] >>> 8) & 0xff;
|
||||||
|
buffer[59] = count[1] & 0xff;
|
||||||
|
buffer[60] = (count[0] >>> 24) & 0xff;
|
||||||
|
buffer[61] = (count[0] >>> 16) & 0xff;
|
||||||
|
buffer[62] = (count[0] >>> 8) & 0xff;
|
||||||
|
buffer[63] = count[0] & 0xff;
|
||||||
|
sha256_transform();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Split the internal hash values into an array of bytes */
|
||||||
|
function sha256_encode_bytes() {
|
||||||
|
var j=0;
|
||||||
|
var output = new Array(32);
|
||||||
|
for(var i=0; i<8; i++) {
|
||||||
|
output[j++] = ((ihash[i] >>> 24) & 0xff);
|
||||||
|
output[j++] = ((ihash[i] >>> 16) & 0xff);
|
||||||
|
output[j++] = ((ihash[i] >>> 8) & 0xff);
|
||||||
|
output[j++] = (ihash[i] & 0xff);
|
||||||
|
}
|
||||||
|
return output;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Get the internal hash as a hex string */
|
||||||
|
function sha256_encode_hex() {
|
||||||
|
var output = new String();
|
||||||
|
for(var i=0; i<8; i++) {
|
||||||
|
for(var j=28; j>=0; j-=4)
|
||||||
|
output += sha256_hex_digits.charAt((ihash[i] >>> j) & 0x0f);
|
||||||
|
}
|
||||||
|
return output;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Main function: returns a hex string representing the SHA256 value of the
|
||||||
|
given data */
|
||||||
|
function sha256_digest(data) {
|
||||||
|
sha256_init();
|
||||||
|
sha256_update(data, data.length);
|
||||||
|
sha256_final();
|
||||||
|
return sha256_encode_hex();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* test if the JS-interpreter is working properly */
|
||||||
|
function sha256_self_test()
|
||||||
|
{
|
||||||
|
return sha256_digest("message digest") ==
|
||||||
|
"f7846f55cf23e14eebeab5b4e1550cad5b509e3348fbc4efa3a1413d393cb650";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,117 @@
|
||||||
|
/*!
|
||||||
|
* jQuery Cookie Plugin v1.4.1
|
||||||
|
* https://github.com/carhartl/jquery-cookie
|
||||||
|
*
|
||||||
|
* Copyright 2013 Klaus Hartl
|
||||||
|
* Released under the MIT license
|
||||||
|
*/
|
||||||
|
(function (factory) {
|
||||||
|
if (typeof define === 'function' && define.amd) {
|
||||||
|
// AMD
|
||||||
|
define(['jquery'], factory);
|
||||||
|
} else if (typeof exports === 'object') {
|
||||||
|
// CommonJS
|
||||||
|
factory(require('jquery'));
|
||||||
|
} else {
|
||||||
|
// Browser globals
|
||||||
|
factory(jQuery);
|
||||||
|
}
|
||||||
|
}(function ($) {
|
||||||
|
|
||||||
|
var pluses = /\+/g;
|
||||||
|
|
||||||
|
function encode(s) {
|
||||||
|
return config.raw ? s : encodeURIComponent(s);
|
||||||
|
}
|
||||||
|
|
||||||
|
function decode(s) {
|
||||||
|
return config.raw ? s : decodeURIComponent(s);
|
||||||
|
}
|
||||||
|
|
||||||
|
function stringifyCookieValue(value) {
|
||||||
|
return encode(config.json ? JSON.stringify(value) : String(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseCookieValue(s) {
|
||||||
|
if (s.indexOf('"') === 0) {
|
||||||
|
// This is a quoted cookie as according to RFC2068, unescape...
|
||||||
|
s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
// Replace server-side written pluses with spaces.
|
||||||
|
// If we can't decode the cookie, ignore it, it's unusable.
|
||||||
|
// If we can't parse the cookie, ignore it, it's unusable.
|
||||||
|
s = decodeURIComponent(s.replace(pluses, ' '));
|
||||||
|
return config.json ? JSON.parse(s) : s;
|
||||||
|
} catch(e) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
function read(s, converter) {
|
||||||
|
var value = config.raw ? s : parseCookieValue(s);
|
||||||
|
return $.isFunction(converter) ? converter(value) : value;
|
||||||
|
}
|
||||||
|
|
||||||
|
var config = $.cookie = function (key, value, options) {
|
||||||
|
|
||||||
|
// Write
|
||||||
|
|
||||||
|
if (value !== undefined && !$.isFunction(value)) {
|
||||||
|
options = $.extend({}, config.defaults, options);
|
||||||
|
|
||||||
|
if (typeof options.expires === 'number') {
|
||||||
|
var days = options.expires, t = options.expires = new Date();
|
||||||
|
t.setTime(+t + days * 864e+5);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (document.cookie = [
|
||||||
|
encode(key), '=', stringifyCookieValue(value),
|
||||||
|
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
|
||||||
|
options.path ? '; path=' + options.path : '',
|
||||||
|
options.domain ? '; domain=' + options.domain : '',
|
||||||
|
options.secure ? '; secure' : ''
|
||||||
|
].join(''));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Read
|
||||||
|
|
||||||
|
var result = key ? undefined : {};
|
||||||
|
|
||||||
|
// To prevent the for loop in the first place assign an empty array
|
||||||
|
// in case there are no cookies at all. Also prevents odd result when
|
||||||
|
// calling $.cookie().
|
||||||
|
var cookies = document.cookie ? document.cookie.split('; ') : [];
|
||||||
|
|
||||||
|
for (var i = 0, l = cookies.length; i < l; i++) {
|
||||||
|
var parts = cookies[i].split('=');
|
||||||
|
var name = decode(parts.shift());
|
||||||
|
var cookie = parts.join('=');
|
||||||
|
|
||||||
|
if (key && key === name) {
|
||||||
|
// If second argument (value) is a function it's a converter...
|
||||||
|
result = read(cookie, value);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Prevent storing a cookie that we couldn't decode.
|
||||||
|
if (!key && (cookie = read(cookie)) !== undefined) {
|
||||||
|
result[name] = cookie;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
};
|
||||||
|
|
||||||
|
config.defaults = {};
|
||||||
|
|
||||||
|
$.removeCookie = function (key, options) {
|
||||||
|
if ($.cookie(key) === undefined) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Must not alter options, thus extending a fresh object...
|
||||||
|
$.cookie(key, '', $.extend({}, options, { expires: -1 }));
|
||||||
|
return !$.cookie(key);
|
||||||
|
};
|
||||||
|
|
||||||
|
}));
|
||||||
59
Web.config
59
Web.config
|
|
@ -4,38 +4,43 @@
|
||||||
https://go.microsoft.com/fwlink/?LinkId=169433
|
https://go.microsoft.com/fwlink/?LinkId=169433
|
||||||
-->
|
-->
|
||||||
<configuration>
|
<configuration>
|
||||||
|
<connectionStrings>
|
||||||
|
<add name="DBConnectionString" connectionString="Data Source=sql.bremen.com.tw;Initial Catalog=abbott-2024-event;User ID=abbott-2024-event;Password=h2Wqh84^2;Max Pool Size=256;Connection Lifetime=3;" providerName="System.Data.SqlClient" />
|
||||||
|
</connectionStrings>
|
||||||
<system.web>
|
<system.web>
|
||||||
<compilation debug="true" targetFramework="4.8" strict="false" explicit="true" />
|
<compilation debug="true" targetFramework="4.8" strict="false" explicit="true" />
|
||||||
<httpRuntime targetFramework="4.8" requestValidationMode="2.0" maxRequestLength="81920"/>
|
<httpRuntime targetFramework="4.8" requestValidationMode="2.0" maxRequestLength="81920" />
|
||||||
<customErrors mode="Off"/>
|
<customErrors mode="Off" />
|
||||||
<pages enableViewStateMac="false" enableEventValidation="false" viewStateEncryptionMode="Never" controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
|
<pages enableViewStateMac="false" enableEventValidation="false" viewStateEncryptionMode="Never" controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
|
||||||
<namespaces>
|
<namespaces>
|
||||||
<clear/>
|
<clear />
|
||||||
|
|
||||||
<add namespace="System"/>
|
<add namespace="System" />
|
||||||
<add namespace="System.Collections"/>
|
<add namespace="System.Collections" />
|
||||||
<add namespace="System.Collections.Generic"/>
|
<add namespace="System.Collections.Generic" />
|
||||||
<add namespace="System.Collections.Specialized"/>
|
<add namespace="System.Collections.Specialized" />
|
||||||
<add namespace="System.Configuration"/>
|
<add namespace="System.Configuration" />
|
||||||
<add namespace="System.Text"/>
|
<add namespace="System.Text" />
|
||||||
<add namespace="System.Text.RegularExpressions"/>
|
<add namespace="System.Text.RegularExpressions" />
|
||||||
<add namespace="System.Linq"/>
|
<add namespace="System.Linq" />
|
||||||
<add namespace="System.Xml.Linq"/>
|
<add namespace="System.Xml.Linq" />
|
||||||
<add namespace="System.Web"/>
|
<add namespace="System.Web" />
|
||||||
<add namespace="System.Web.Caching"/>
|
<add namespace="System.Web.Caching" />
|
||||||
<add namespace="System.Web.SessionState"/>
|
<add namespace="System.Web.SessionState" />
|
||||||
<add namespace="System.Web.Security"/>
|
<add namespace="System.Web.Security" />
|
||||||
<add namespace="System.Web.Profile"/>
|
<add namespace="System.Web.Profile" />
|
||||||
<add namespace="System.Web.UI"/>
|
<add namespace="System.Web.UI" />
|
||||||
<add namespace="System.Web.UI.WebControls"/>
|
<add namespace="System.Web.UI.WebControls" />
|
||||||
<add namespace="System.Web.UI.WebControls.WebParts"/>
|
<add namespace="System.Web.UI.WebControls.WebParts" />
|
||||||
<add namespace="System.Web.UI.HtmlControls"/>
|
<add namespace="System.Web.UI.HtmlControls" />
|
||||||
<add namespace="System.Data"/>
|
<add namespace="System.Data" />
|
||||||
<add namespace="System.Runtime.Serialization.Json"/>
|
<add namespace="System.Runtime.Serialization.Json" />
|
||||||
<add namespace="System.IO.Compression"/>
|
<add namespace="System.IO.Compression" />
|
||||||
<add namespace="System.Threading"/>
|
<add namespace="System.Threading" />
|
||||||
<add namespace="System.IO"/>
|
<add namespace="System.IO" />
|
||||||
<add namespace="System.Collections.Generic"/>
|
<add namespace="System.Collections.Generic" />
|
||||||
|
<add namespace="Dapper.Contrib"/>
|
||||||
|
<add namespace="Dapper.Contrib.Extensions"/>
|
||||||
</namespaces>
|
</namespaces>
|
||||||
</pages>
|
</pages>
|
||||||
</system.web>
|
</system.web>
|
||||||
|
|
|
||||||
|
|
@ -113,6 +113,7 @@
|
||||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
<HintPath>packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
<Reference Include="System.Security" />
|
<Reference Include="System.Security" />
|
||||||
<Reference Include="System.Security.Cryptography.Pkcs, Version=8.0.0.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Security.Cryptography.Pkcs, Version=8.0.0.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>packages\System.Security.Cryptography.Pkcs.8.0.1\lib\net462\System.Security.Cryptography.Pkcs.dll</HintPath>
|
<HintPath>packages\System.Security.Cryptography.Pkcs.8.0.1\lib\net462\System.Security.Cryptography.Pkcs.dll</HintPath>
|
||||||
|
|
@ -394,6 +395,8 @@
|
||||||
<Content Include="BackEnd\assets\images\logo\stripe.svg" />
|
<Content Include="BackEnd\assets\images\logo\stripe.svg" />
|
||||||
<Content Include="BackEnd\assets\javascript\._theme.js" />
|
<Content Include="BackEnd\assets\javascript\._theme.js" />
|
||||||
<Content Include="BackEnd\assets\javascript\._theme.min.js" />
|
<Content Include="BackEnd\assets\javascript\._theme.min.js" />
|
||||||
|
<Content Include="BackEnd\assets\javascript\custom\globalJS.js" />
|
||||||
|
<Content Include="BackEnd\assets\javascript\custom\Login.js" />
|
||||||
<Content Include="BackEnd\assets\javascript\pages\._ace-demo.js" />
|
<Content Include="BackEnd\assets\javascript\pages\._ace-demo.js" />
|
||||||
<Content Include="BackEnd\assets\javascript\pages\._ace-demo.min.js" />
|
<Content Include="BackEnd\assets\javascript\pages\._ace-demo.min.js" />
|
||||||
<Content Include="BackEnd\assets\javascript\pages\._atwho-demo.js" />
|
<Content Include="BackEnd\assets\javascript\pages\._atwho-demo.js" />
|
||||||
|
|
@ -562,6 +565,7 @@
|
||||||
<Content Include="BackEnd\assets\javascript\pages\uploader-demo.min.js" />
|
<Content Include="BackEnd\assets\javascript\pages\uploader-demo.min.js" />
|
||||||
<Content Include="BackEnd\assets\javascript\pages\user-settings-demo.js" />
|
<Content Include="BackEnd\assets\javascript\pages\user-settings-demo.js" />
|
||||||
<Content Include="BackEnd\assets\javascript\pages\user-settings-demo.min.js" />
|
<Content Include="BackEnd\assets\javascript\pages\user-settings-demo.min.js" />
|
||||||
|
<Content Include="BackEnd\assets\javascript\sha256.js" />
|
||||||
<Content Include="BackEnd\assets\javascript\theme.js" />
|
<Content Include="BackEnd\assets\javascript\theme.js" />
|
||||||
<Content Include="BackEnd\assets\javascript\theme.min.js" />
|
<Content Include="BackEnd\assets\javascript\theme.min.js" />
|
||||||
<Content Include="BackEnd\assets\stylesheets\._custom-dark.css" />
|
<Content Include="BackEnd\assets\stylesheets\._custom-dark.css" />
|
||||||
|
|
@ -8701,6 +8705,7 @@
|
||||||
<Content Include="BackEnd\assets\vendor\jquery-sparkline\jquery.sparkline.min.js" />
|
<Content Include="BackEnd\assets\vendor\jquery-sparkline\jquery.sparkline.min.js" />
|
||||||
<Content Include="BackEnd\assets\vendor\jquery.caret\._jquery.caret.min.js" />
|
<Content Include="BackEnd\assets\vendor\jquery.caret\._jquery.caret.min.js" />
|
||||||
<Content Include="BackEnd\assets\vendor\jquery.caret\jquery.caret.min.js" />
|
<Content Include="BackEnd\assets\vendor\jquery.caret\jquery.caret.min.js" />
|
||||||
|
<Content Include="BackEnd\assets\vendor\jquery.cookie\jquery.cookie.js" />
|
||||||
<Content Include="BackEnd\assets\vendor\jquery\._core.js" />
|
<Content Include="BackEnd\assets\vendor\jquery\._core.js" />
|
||||||
<Content Include="BackEnd\assets\vendor\jquery\._jquery.min.js" />
|
<Content Include="BackEnd\assets\vendor\jquery\._jquery.min.js" />
|
||||||
<Content Include="BackEnd\assets\vendor\jquery\._jquery.slim.min.js" />
|
<Content Include="BackEnd\assets\vendor\jquery\._jquery.slim.min.js" />
|
||||||
|
|
@ -13148,11 +13153,18 @@
|
||||||
<Content Include="BackEnd\assets\vendor\zxcvbn\._zxcvbn.js" />
|
<Content Include="BackEnd\assets\vendor\zxcvbn\._zxcvbn.js" />
|
||||||
<Content Include="BackEnd\assets\vendor\zxcvbn\zxcvbn.js" />
|
<Content Include="BackEnd\assets\vendor\zxcvbn\zxcvbn.js" />
|
||||||
<Content Include="BackEnd\Index.aspx" />
|
<Content Include="BackEnd\Index.aspx" />
|
||||||
|
<Content Include="BackEnd\Login.html" />
|
||||||
<Content Include="Default.aspx" />
|
<Content Include="Default.aspx" />
|
||||||
<Content Include="favicon.ico" />
|
<Content Include="favicon.ico" />
|
||||||
<Content Include="Web.config" />
|
<Content Include="Web.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Compile Include="App_Code\authToken.cs" />
|
||||||
|
<Compile Include="App_Code\globalClass.cs" />
|
||||||
|
<Compile Include="App_Code\dbClass.cs" />
|
||||||
|
<Compile Include="BackEnd\api\signin.ashx.cs">
|
||||||
|
<DependentUpon>signin.ashx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="BackEnd\Index.aspx.cs">
|
<Compile Include="BackEnd\Index.aspx.cs">
|
||||||
<DependentUpon>Index.aspx</DependentUpon>
|
<DependentUpon>Index.aspx</DependentUpon>
|
||||||
<SubType>ASPXCodeBehind</SubType>
|
<SubType>ASPXCodeBehind</SubType>
|
||||||
|
|
@ -13162,6 +13174,7 @@
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="BackEnd\Main.Master.cs">
|
<Compile Include="BackEnd\Main.Master.cs">
|
||||||
<DependentUpon>Main.Master</DependentUpon>
|
<DependentUpon>Main.Master</DependentUpon>
|
||||||
|
<SubType>ASPXCodeBehind</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="BackEnd\Main.Master.designer.cs">
|
<Compile Include="BackEnd\Main.Master.designer.cs">
|
||||||
<DependentUpon>Main.Master</DependentUpon>
|
<DependentUpon>Main.Master</DependentUpon>
|
||||||
|
|
@ -13177,6 +13190,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="App_Data\" />
|
<Folder Include="App_Data\" />
|
||||||
|
<Folder Include="BackEnd\assets\BackEndApi\" />
|
||||||
<Folder Include="BackEnd\assets\vendor\%40fortawesome\fontawesome-free\less\" />
|
<Folder Include="BackEnd\assets\vendor\%40fortawesome\fontawesome-free\less\" />
|
||||||
<Folder Include="BackEnd\assets\vendor\%40fortawesome\fontawesome-free\metadata\" />
|
<Folder Include="BackEnd\assets\vendor\%40fortawesome\fontawesome-free\metadata\" />
|
||||||
<Folder Include="BackEnd\assets\vendor\%40fortawesome\fontawesome-free\scss\" />
|
<Folder Include="BackEnd\assets\vendor\%40fortawesome\fontawesome-free\scss\" />
|
||||||
|
|
@ -17638,6 +17652,8 @@
|
||||||
<Content Include="BackEnd\assets\vendor\zxcvbn\._zxcvbn.js.map" />
|
<Content Include="BackEnd\assets\vendor\zxcvbn\._zxcvbn.js.map" />
|
||||||
<Content Include="BackEnd\assets\vendor\zxcvbn\zxcvbn.js.map" />
|
<Content Include="BackEnd\assets\vendor\zxcvbn\zxcvbn.js.map" />
|
||||||
<Content Include="BackEnd\Main.Master" />
|
<Content Include="BackEnd\Main.Master" />
|
||||||
|
<Content Include="BackEnd\api\signin.ashx" />
|
||||||
|
<None Include="packages.config" />
|
||||||
<None Include="Web.Debug.config">
|
<None Include="Web.Debug.config">
|
||||||
<DependentUpon>Web.config</DependentUpon>
|
<DependentUpon>Web.config</DependentUpon>
|
||||||
</None>
|
</None>
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -4,38 +4,43 @@
|
||||||
https://go.microsoft.com/fwlink/?LinkId=169433
|
https://go.microsoft.com/fwlink/?LinkId=169433
|
||||||
-->
|
-->
|
||||||
<configuration>
|
<configuration>
|
||||||
|
<connectionStrings>
|
||||||
|
<add name="DBConnectionString" connectionString="Data Source=sql.bremen.com.tw;Initial Catalog=abbott-2024-event;User ID=abbott-2024-event;Password=h2Wqh84^2;Max Pool Size=256;Connection Lifetime=3;" providerName="System.Data.SqlClient" />
|
||||||
|
</connectionStrings>
|
||||||
<system.web>
|
<system.web>
|
||||||
<compilation debug="true" targetFramework="4.8" strict="false" explicit="true" />
|
<compilation debug="true" targetFramework="4.8" strict="false" explicit="true" />
|
||||||
<httpRuntime targetFramework="4.8" requestValidationMode="2.0" maxRequestLength="81920"/>
|
<httpRuntime targetFramework="4.8" requestValidationMode="2.0" maxRequestLength="81920" />
|
||||||
<customErrors mode="Off"/>
|
<customErrors mode="Off" />
|
||||||
<pages enableViewStateMac="false" enableEventValidation="false" viewStateEncryptionMode="Never" controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
|
<pages enableViewStateMac="false" enableEventValidation="false" viewStateEncryptionMode="Never" controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
|
||||||
<namespaces>
|
<namespaces>
|
||||||
<clear/>
|
<clear />
|
||||||
|
|
||||||
<add namespace="System"/>
|
<add namespace="System" />
|
||||||
<add namespace="System.Collections"/>
|
<add namespace="System.Collections" />
|
||||||
<add namespace="System.Collections.Generic"/>
|
<add namespace="System.Collections.Generic" />
|
||||||
<add namespace="System.Collections.Specialized"/>
|
<add namespace="System.Collections.Specialized" />
|
||||||
<add namespace="System.Configuration"/>
|
<add namespace="System.Configuration" />
|
||||||
<add namespace="System.Text"/>
|
<add namespace="System.Text" />
|
||||||
<add namespace="System.Text.RegularExpressions"/>
|
<add namespace="System.Text.RegularExpressions" />
|
||||||
<add namespace="System.Linq"/>
|
<add namespace="System.Linq" />
|
||||||
<add namespace="System.Xml.Linq"/>
|
<add namespace="System.Xml.Linq" />
|
||||||
<add namespace="System.Web"/>
|
<add namespace="System.Web" />
|
||||||
<add namespace="System.Web.Caching"/>
|
<add namespace="System.Web.Caching" />
|
||||||
<add namespace="System.Web.SessionState"/>
|
<add namespace="System.Web.SessionState" />
|
||||||
<add namespace="System.Web.Security"/>
|
<add namespace="System.Web.Security" />
|
||||||
<add namespace="System.Web.Profile"/>
|
<add namespace="System.Web.Profile" />
|
||||||
<add namespace="System.Web.UI"/>
|
<add namespace="System.Web.UI" />
|
||||||
<add namespace="System.Web.UI.WebControls"/>
|
<add namespace="System.Web.UI.WebControls" />
|
||||||
<add namespace="System.Web.UI.WebControls.WebParts"/>
|
<add namespace="System.Web.UI.WebControls.WebParts" />
|
||||||
<add namespace="System.Web.UI.HtmlControls"/>
|
<add namespace="System.Web.UI.HtmlControls" />
|
||||||
<add namespace="System.Data"/>
|
<add namespace="System.Data" />
|
||||||
<add namespace="System.Runtime.Serialization.Json"/>
|
<add namespace="System.Runtime.Serialization.Json" />
|
||||||
<add namespace="System.IO.Compression"/>
|
<add namespace="System.IO.Compression" />
|
||||||
<add namespace="System.Threading"/>
|
<add namespace="System.Threading" />
|
||||||
<add namespace="System.IO"/>
|
<add namespace="System.IO" />
|
||||||
<add namespace="System.Collections.Generic"/>
|
<add namespace="System.Collections.Generic" />
|
||||||
|
<add namespace="Dapper.Contrib"/>
|
||||||
|
<add namespace="Dapper.Contrib.Extensions"/>
|
||||||
</namespaces>
|
</namespaces>
|
||||||
</pages>
|
</pages>
|
||||||
</system.web>
|
</system.web>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="System.Runtime.Serialization.Json" version="4.3.0" targetFramework="net48" />
|
||||||
|
</packages>
|
||||||
Loading…
Reference in New Issue