AdminManger/AddAlbum.aspx.cs
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class Admin_AddAlbum : System.Web.UI.Page
{
public string sql, dID;
Alert al = new Alert();
SqlHelper data = new SqlHelper();
public string imgStr = "";
protected void Page_Load(object sender, EventArgs e)
{
if (Session["Admin"] == null)
{
Response.Write("<script language='javascript'>alert('您还没有登陆');location.href='login.aspx'</script>");
}
else
{
}
}
protected void Button3_Click(object sender, EventArgs e)
{
string res;
upload up = new upload();
res = up.Up(file1, "Upload/");
this.Label2.Visible = true;
this.Label2.Text = up.Resup[Convert.ToInt32(res)];
this.pic.Text = up.s;
//string path = AppDomain.CurrentDomain.BaseDirectory + "Upload/";
Image2.ImageUrl = "../Upload/" + pic.Text;
}
protected void Button1_Click(object sender, EventArgs e)
{
string file = pic.Text;
int index = file.IndexOf('.');
string name = file.Substring(0, index);
string imgpath = "Upload/" + file;
string sql = "insert into Album(imgtag, imgpath, UserId, CreateTime) values('" + name + "','" +
imgpath + "','" + Session["AdminId"] + "','" + DateTime.Now + "')";
data.RunSql(sql);
Alert js = new Alert();
js.Alertjs("添加成功");
Response.Redirect("AlbumList.aspx");
}
后面还有 1 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。