SiteAdmin/Aspx/LinkEdit.aspx.cs

(开头部分) 4KB

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

using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.IO;

    public partial class SiteAdmin_Aspx_LinkEdit : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.Cookies["roleid"] != null)
            {
                if (!IsPostBack)
                {
                    binddr();
                }
            }
            else
            {
                MessageBox.ShowAndRedirect(this.Page, "对不起!您还没有登录系统。", "../Logout.aspx");
            }
        }
        public void binddr()
        {
            try
            {
                Link myn = new Link();
                myn.GetModel(Convert.ToInt16(Request.QueryString["ID"].ToString()));
                TextBox_Name.Text = myn.name;
                TextBox_Url.Text = myn.url;
                if (myn.IShome==1)
                {
                    cbShow.Checked = true;
                }
                HiddID.Text = myn.Logourl;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        protected void LinkButton_Add_Click(object sender, EventArgs e)
        {
            string name = TextBox_Name.Text.Trim();
            string url = TextBox_Url.Text.Trim();
            string IShome = cbShow.Checked ? "1" : "0";
            try
            {

                if (FileUpload_image.HasFile)
                {
                    string FileExt = System.IO.Path.GetExtension(FileUpload_image.FileName).ToUpper();
                    if (FileExt != ".JPG" && FileExt != ".BMP" && FileExt != ".PNG" && FileExt != ".GIF")
                    {
                        ClientScript.RegisterStartupScript(this.GetType(), "", "<script type=\"text/javascript\">alert(\" 不支持的文件格式,请上图片文件\")</script>");
                    }
                    else
后面还有 44 行代码,购买后查看完整代码

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

AI 解读 AI

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

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