Web/Admin/online/view.aspx.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.IO;
using System.Text;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Xml;
using System.Data;
using Common;

namespace Web.Plugin.LineService.admin
{
    public partial class view : Web.UI.ManagePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                TreeBind(); //绑定模板
                ShowInfo();
            }
        }

        #region 绑定模板================================
        private void TreeBind()
        {
            DirectoryInfo dirInfo = new DirectoryInfo(Utils.GetMapPath("/plugins/lineservice/skin/"));
            foreach (DirectoryInfo dir in dirInfo.GetDirectories())
            {
                this.rblSkin.Items.Add(new ListItem(dir.Name, dir.Name));
            }
        }
        #endregion

        #region 赋值操作=================================
        private void ShowInfo()
        {
            string fullPath = Utils.GetMapPath("/plugins/lineservice/set.config");
            XmlDocument doc = new XmlDocument();
            doc.Load(fullPath);
            XmlNode phone = doc.SelectSingleNode(@"config/telephone");
            XmlNode status = doc.SelectSingleNode(@"config/status");
            XmlNode skin = doc.SelectSingleNode(@"config/skin");
            txtPhone.Text = phone.InnerText;
            rblStatus.SelectedValue = status.InnerText;
            rblSkin.SelectedValue = skin.InnerText;
        }
        #endregion

        //保存
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            string fullPath = Utils.GetMapPath("/plugins/lineservice/set.config");
            XmlHelper.UpdateNodeInnerText(fullPath, @"config/telephone", txtPhone.Text.Trim());
            XmlHelper.UpdateNodeInnerText(fullPath, @"config/status", rblStatus.SelectedValue);
            XmlHelper.UpdateNodeInnerText(fullPath, @"config/skin", rblSkin.SelectedValue);
            JscriptMsg("保存成功啦!", "view.aspx", "Success");
        }

后面还有 2 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。