Files
17168ERP/web/admin/item/setting.aspx
2025-08-29 01:27:25 +08:00

295 lines
20 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<%@ Page Title="後端管理" Language="C#" MasterPageFile="~/admin/Templates/TBS5ADM001/MasterPage.master" AutoEventWireup="true" CodeFile="setting.aspx.cs" Inherits="admin_item_setting" %>
<%@ Register Src="~/admin/_uc/alert.ascx" TagPrefix="uc1" TagName="alert" %>
<asp:Content ID="Content1" ContentPlaceHolderID="footer_script" runat="Server">
<link href="../../App_Script/bootstrap_toggle/css/bootstrap-toggle.min.css" rel="stylesheet" />
<script src="../../App_Script/bootstrap_toggle/js/bootstrap-toggle.min.js"></script>
<script>
$(".scroll-nav a")
.each((i, t) => {
let v = $($(t).attr("href"));
console.log(i, t, v.length);
if (v.length==0) $(t).remove();
})
.click(function (e) {
$(".scroll-nav a").removeClass("active");
$(this).addClass("active");
console.log($(this));
});
</script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="page_nav" runat="Server">
<div class="scroll-nav nav nav-tabs mb-2 mb-sm-0 d-none d-sm-flex">
<a class="flex-sm-fill text-sm-center nav-link active" href="#sec1">1</a>
<a class="flex-sm-fill text-sm-center nav-link" href="#sec2">2</a>
<a class="flex-sm-fill text-sm-center nav-link" href="#sec3">3</a>
<a class="flex-sm-fill text-sm-center nav-link" href="#sec4">4</a>
</div>
<div class="">
<asp:LinkButton ID="mailsend" runat="server" OnClick="mailsend_Click"
CssClass="btn btn-outline-primary" >
<i class="mdi mdi-email-newsletter"></i>
儲存設定並測試發送信件
</asp:LinkButton>
</div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<uc1:alert runat="server" ID="L_msg" Text=""/>
<div id="content" class="container-fluid">
<div class="row">
<div class="col-lg-6">
<div class="card shadow-sm my-2" id="sec1">
<div class="card-header"><span class="badge rounded-pill bg-secondary me-1">1</span><span>網站資料設定</span></div>
<div class="card-body label-sm-right">
<div class="row mb-1">
<label class="col-sm-2 col-lg-3 col-form-label">* 公司名稱</label>
<div class="col-sm-10 col-lg-9">
<asp:TextBox ID="com_name" runat="server" CssClass="form-control" MaxLength="50"></asp:TextBox>
<asp:RequiredFieldValidator ID="RF1" ControlToValidate="com_name" runat="server" ErrorMessage="必填!" Display="Dynamic" SetFocusOnError="true"></asp:RequiredFieldValidator>
</div>
</div>
<div class="row mb-1">
<label class="col-sm-2 col-lg-3 col-form-label">* 公司信箱</label>
<div class="col-sm-10 col-lg-9">
<asp:TextBox ID="email" runat="server" CssClass="form-control"></asp:TextBox>
<asp:RequiredFieldValidator ControlToValidate="email" Display="Dynamic" SetFocusOnError="true" ErrorMessage="必填!" ID="v_email" runat="server" />
<asp:RegularExpressionValidator ControlToValidate="email" Display="Dynamic" SetFocusOnError="true" ErrorMessage="您所輸入的Email格式有誤" ID="RegularExpressionValidator1" runat="server" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" />
</div>
</div>
<div class="row mb-1">
<label class="col-sm-2 col-lg-3 col-form-label">BCC</label>
<div class="col-sm-10 col-lg-9">
<asp:TextBox ID="bcc_mail" TextMode="MultiLine" Height="100" runat="server" CssClass="form-control"></asp:TextBox>
<div class="form-text text-muted">說明設定密件請一行輸入一個E-mail。</div>
</div>
</div>
<div class="row mb-1">
<label class="col-sm-2 col-lg-3 col-form-label">* 目前網址</label>
<div class="col-sm-10 col-lg-9">
<asp:TextBox ID="pic_url" runat="server" CssClass="form-control" MaxLength="50"></asp:TextBox>
<asp:RequiredFieldValidator ID="RF2" ControlToValidate="pic_url" runat="server" ErrorMessage="請輸入目前網址(編輯器圖片路徑用)" Display="Dynamic" SetFocusOnError="true"></asp:RequiredFieldValidator>
<div class="form-text text-muted">編輯器圖片路徑用</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-6">
<div class="card shadow-sm my-2" id="sec2">
<div class="card-header"><span class="badge rounded-pill bg-secondary me-1">2</span>SMTP 設定</div>
<div class="card-body label-sm-right">
<div class="row mb-1">
<label class="col-sm-2 col-lg-3 col-xxl-2 mb-1 col-form-label">* 主機位址</label>
<div class="col-sm-10 col-lg-9 col-xxl-4">
<asp:TextBox ID="smtp_url" runat="server" CssClass="form-control" MaxLength="100"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="smtp_url" runat="server"
ErrorMessage="必填!" Display="Dynamic" SetFocusOnError="true"></asp:RequiredFieldValidator>
</div>
<label class="col-sm-2 col-lg-3 col-xxl-2 col-form-label">* Port</label>
<div class="col-sm-10 col-lg-9 col-xxl-4">
<asp:TextBox ID="smtp_port" runat="server" CssClass="form-control" MaxLength="10"
TextMode="Number" Min="0" Max="65535" Step="1"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" ControlToValidate="smtp_port" runat="server"
ErrorMessage="必填!" Display="Dynamic" SetFocusOnError="true"></asp:RequiredFieldValidator>
</div>
</div>
<div class="row mb-1">
<label class="col-sm-2 col-lg-3 col-xxl-2 col-form-label">帳號</label>
<div class="col-sm-10 col-lg-9 col-xxl-4">
<asp:TextBox ID="smtp_user" runat="server" CssClass="form-control inline" MaxLength="50"
placeholder="有需要才填"></asp:TextBox>
<asp:CheckBox ID="use_sender" runat="server" Text="用此帳號作為寄件者" />
</div>
<label class="col-sm-2 col-lg-3 col-xxl-2 col-form-label">密碼</label>
<div class="col-sm-10 col-lg-9 col-xxl-4">
<asp:TextBox ID="smtp_password" runat="server" CssClass="form-control inline" MaxLength="50"
TextMode="Password" placeholder="有需要才填"></asp:TextBox>
</div>
</div>
<div class="row mb-1">
<label class="col-sm-2 col-lg-3 col-xxl-2 col-form-label">SSL</label>
<div class="col-sm-10 col-lg-9 col-xxl-10">
<label class="col-form-control">
<input type="checkbox" id="smtp_ssl" runat="server"
data-toggle="toggle" data-on="啟用" data-off="未啟用" data-onstyle="success" />
<span class="form-text text-muted">(若啟用請確認您填的Port是否正確)</span>
</label>
</div>
</div>
<div class="row mb-1">
<label class="col-sm-2 col-lg-3 col-xxl-3 col-form-label">使用預設驗證</label>
<div class="col-sm-10 col-lg-9 col-xxl-9">
<asp:DropDownList ID="smtp_def" runat="server" CssClass="form-select">
<asp:ListItem Value="" Text="不設定(視SMTP主機設定調整)"></asp:ListItem>
<asp:ListItem Value="Y" Text="是"></asp:ListItem>
<asp:ListItem Value="N" Text="否"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
<div class="row mb-1 gy-2 gy-sm-3">
<div class="col-12">
<div>
<asp:Label ID="mailtest" runat="server" class="text-danger"></asp:Label>
</div>
<asp:UpdateProgress ID="UpdateProgress1" runat="server" DisplayAfter="500">
<ProgressTemplate>
<div class="text-success">測試中,請稍候…</div>
</ProgressTemplate>
</asp:UpdateProgress>
</div>
</div>
</div>
</div>
</div>
</div>
<asp:PlaceHolder ID="PlaceHolder2" runat="server" Visible="false">
<div class="card shadow-sm my-2" id="sec3">
<div class="card-header"><span class="badge rounded-pill bg-secondary me-1">3</span>後台模組設定 (僅設計師模式)</div>
<div class="card-body">
<div class="row mb-1 g-2">
<label class="col-sm-2 col-form-label">選單設定</label>
<div class="col-sm-10 col-md-2">
<label class="col-form-control">
<input type="checkbox" id="menu" runat="server" data-toggle="toggle" data-on="全部展開" data-off="點選展開" data-onstyle="success" data-offstyle="info" />
</label>
</div>
<label class="col-sm-2 col-form-label">登錄設定</label>
<div class="col-sm-10 col-md-2">
<label class="col-form-control">
<input type="checkbox" id="log_class" runat="server" data-toggle="toggle" data-on="使用Cookies" data-off="使用Session" data-onstyle="success" data-offstyle="info" />
</label>
</div>
</div>
<div class="row mb-1">
<label class="col-sm-2 col-form-label">後台首頁</label>
<div class="col-sm-10">
<asp:CheckBoxList CssClass="log_menu" ID="shop_kind1" runat="server"
RepeatColumns="1" RepeatDirection="Horizontal" RepeatLayout="Flow" >
<asp:ListItem Value="A">流量統計區塊 (需有「流量統計」及「會員管理」系統)</asp:ListItem>
<asp:ListItem Value="B">訂單資訊區塊 (需有「訂單管理」系統)</asp:ListItem>
<asp:ListItem Value="C">客服資訊區塊 (需有「客服管理」系統)</asp:ListItem>
<asp:ListItem Value="D">測試變數區塊 (開發人員測試登錄變數用,上線後,務必關閉此區塊)</asp:ListItem>
</asp:CheckBoxList>
</div>
</div>
<div class="row mb-1">
<label class="col-sm-2 col-form-label"></label>
<div class="col-sm-10">
<asp:Button ID="Button1" runat="server" Text="儲存設定" OnClick="Button1_Click"
CssClass="btn btn-outline-primary"></asp:Button>
</div>
</div>
</div>
</div>
</asp:PlaceHolder>
<asp:PlaceHolder ID="PlaceHolder1" runat="server" Visible="false">
<div class="card shadow-sm my-2" id="sec4">
<div class="card-header"><span class="badge rounded-pill bg-secondary me-1">4</span>執行SQL指令 (僅設計師模式)</div>
<asp:Panel ID="Panel1" runat="server" DefaultButton="sqlrun" role="form"
CssClass="card-body">
<asp:TextBox ID="sqltxt" runat="server" CssClass="form-control" Style="margin-bottom: 10px"></asp:TextBox>
<asp:Button ID="sqlrun" runat="server" Text="執行" OnClick="sqlrun_Click" CssClass="btn btn-outline-primary" />
</asp:Panel>
</div>
</asp:PlaceHolder>
</div>
<div id="content" class="container-fluid">
<div class="card shadow-sm my-3">
<div class="card-header">
示範區段標題
</div>
<div class="card-body">
<div class="row mb-1">
<label class="col-sm-2 col-form-label">* 欄位名稱</label>
<div class="col-sm-10">
<input type="type" name="name" value="" class="form-control" />
</div>
</div>
<div class="row mb-1">
<label class="col-sm-2 col-form-label">* 欄位名稱</label>
<div class="col-sm-10">
<input type="type" name="name" value="" class="form-control"/>
</div>
</div>
<div class="row mb-1 gy-2 gy-sm-3">
<label class="col-sm-2 col-form-label">* 欄位名稱</label>
<div class="col-sm-10 col-lg-4">
<input type="type" name="name" value="" class="form-control"/>
</div>
<label class="col-sm-2 col-form-label">* 欄位名稱</label>
<div class="col-sm-10 col-lg-4">
<input type="type" name="name" value="" class="form-control"/>
</div>
</div>
<div class="border-top p-2">
<button type="button" class="btn btn-primary">按鈕文字</button>
<button type="button" class="btn btn-secondary">按鈕文字</button>
<button type="button" class="btn btn-success">按鈕文字</button>
<button type="button" class="btn btn-danger">按鈕文字</button>
<button type="button" class="btn btn-warning">按鈕文字</button>
<button type="button" class="btn btn-info">按鈕文字</button>
<button type="button" class="btn btn-light">按鈕文字</button>
<button type="button" class="btn btn-dark">按鈕文字</button>
<button type="button" class="btn btn-link">按鈕文字</button>
</div>
<div class="border-top p-2">
<button type="button" class="btn btn-outline-primary">按鈕文字</button>
<button type="button" class="btn btn-outline-secondary">按鈕文字</button>
<button type="button" class="btn btn-outline-success">按鈕文字</button>
<button type="button" class="btn btn-outline-danger">按鈕文字</button>
<button type="button" class="btn btn-outline-warning">按鈕文字</button>
<button type="button" class="btn btn-outline-info">按鈕文字</button>
<button type="button" class="btn btn-outline-light">按鈕文字</button>
<button type="button" class="btn btn-outline-dark">按鈕文字</button>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<div class="card shadow-sm my-2" id="sec1">
<div class="card-header">Card Header</div>
<div class="card-body">
Card Body
</div>
</div>
</div>
<div class="col-sm-8">
<div class="card shadow-sm my-2" id="sec2">
<div class="card-header py-0">
<nav class="navbar py-0">
<div class="nav nav-tabs">
<button class="nav-link active" id="sec2-tab1" data-bs-toggle="tab" data-bs-target="#sec2-page1"
type="button" role="tab" aria-controls="home" aria-selected="true">頁籤一</button>
<button class="nav-link" id="sec2-tab2" data-bs-toggle="tab" data-bs-target="#sec2-page2"
type="button" role="tab" aria-controls="profile" aria-selected="false">頁籤二</button>
<button class="nav-link" id="sec2-tab3" data-bs-toggle="tab" data-bs-target="#sec2-page3"
type="button" role="tab" aria-controls="contact" aria-selected="false">頁籤三</button>
</div>
<div>
<a href="#" class="btn btn-primary btn-sm">OK</a>
</div>
</nav>
</div>
<div class="card-body">
<div class="tab-content" id="myTabContent">
<div class="tab-pane fade show active" id="sec2-page1" role="tabpanel" aria-labelledby="sec2-tab1">
<h4>Home</h4>
<p>is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
</div>
<div class="tab-pane fade" id="sec2-page2" role="tabpanel" aria-labelledby="sec2-tab2">
<h4>Profile</h4>
<p>is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
</div>
<div class="tab-pane fade" id="sec2-page3" role="tabpanel" aria-labelledby="sec2-tab3">
<h4>Contact</h4>
<p>is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</asp:Content>