feat: 添加功能开关控制页面并迁移PHP实现到ASP.NET
添加新的ASP.NET页面用于功能开关控制,包含前端界面和后端逻辑 删除旧的PHP实现文件,完成技术栈迁移
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="E3_ycsys.aspx.cs" Inherits="E3_ycsys" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>功能开关控制</title>
|
||||
<style>
|
||||
body { font-family: Arial, sans-serif; margin: 0; padding: 15px; }
|
||||
.feature { display: flex; justify-content: space-between; align-items: center; padding: 10px; border-bottom: 1px solid #eee; }
|
||||
.feature-info { flex: 1; }
|
||||
.feature-name { font-weight: bold; margin-bottom: 5px; }
|
||||
.feature-desc { color: #666; font-size: 14px; }
|
||||
.toggle-btn { padding: 5px 10px; border-radius: 4px; border: none; color: white; cursor: pointer; }
|
||||
.enable { background-color: #4CAF50; }
|
||||
.disable { background-color: #f44336; }
|
||||
.status { margin-left: 10px; font-size: 14px; color: #666; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h2>功能开关控制</h2>
|
||||
<asp:Repeater ID="FeaturesRepeater" runat="server">
|
||||
<ItemTemplate>
|
||||
<div class="feature">
|
||||
<div class="feature-info">
|
||||
<div class="feature-name"><%# Eval("name") %></div>
|
||||
<div class="feature-desc"><%# Eval("description") %></div>
|
||||
</div>
|
||||
<div>
|
||||
<%# (int)Eval("status") == 1 ?
|
||||
"<a href='?action=disable&id=" + Eval("id") + "' class='toggle-btn disable'>关闭</a><span class='status'>(已启用)</span>" :
|
||||
"<a href='?action=enable&id=" + Eval("id") + "' class='toggle-btn enable'>开启</a><span class='status'>(已禁用)</span>" %>
|
||||
</div>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user