Myadmin/focus_ad_add.aspx.cs
(开头部分) 3KB这里只显示每个文件的开头 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.OleDb;
public partial class WebAdmin_focus_ad_add : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
//if (Session["ERICAdmin"] == null)
//{
// Response.Write("<script language='JavaScript'>" + "\n");
// Response.Write("parent.location='UserLogin.aspx?timeout=true';");
// Response.Write("</script>" + "\n");
//}
if (HttpContext.Current.Request.Cookies["UserName"] == null)
{
Response.Redirect("UserLogin.aspx");
}
else
{
txb_url.Text = "站内链接";
}
}
}
protected void Btn_ok_Click(object sender, EventArgs e)
{
string pic_full_path = input_img.PostedFile.FileName;
string pic_type = pic_full_path.Substring(pic_full_path.LastIndexOf(".") + 1);
if (pic_type == "bmp" || pic_type == "jpg" || pic_type == "gif" || pic_type == "png")
{
string appendStr = DateTime.Now.ToBinary().ToString().Replace("-", "");
this.input_img.PostedFile.SaveAs(Server.MapPath("../Files/ima/") + appendStr + "." + pic_type);
//OleDbConnection con = DBcon.createcon();
//con.Open();
//OleDbCommand cmd = new OleDbCommand("insert into focus_ad(title,pic,content,url,addtime,sort,type) values('" + txb_title.Text + "','" +appendStr + "." + pic_type + "','" + FCKeditor1.Value + "','" +txb_url.Text.ToString().Trim()+ "','" + DateTime.Now.ToShortDateString() + "','"+ddl_sort.SelectedValue+"','"+ddl_type.SelectedValue+"')", con);
OleDbConnection con = DBcon.createcon();
con.Open();
OleDbCommand cmd = new OleDbCommand("insert into focus_ad(title,pic,content,url,addtime,type) values('" + txb_title.Text + "','" + appendStr + "." + pic_type + "','" + FCKeditor1.Value + "','" + txb_url.Text.ToString().Trim() + "','" + DateTime.Now.ToShortDateString() + "','" + ddl_type.SelectedValue + "')", con);
try
{
cmd.ExecuteNonQuery();
Response.Write("<script language='javascript'>alert('您执行的操作成功!');location.href='focus_ad.aspx'</script>");
}
catch
后面还有 29 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
