Myadmin/ad_add.aspx.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Data;
using System.Data.OleDb;
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;
public partial class Myadmin_ad_add : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (HttpContext.Current.Request.Cookies["UserName"] == null)
{
Response.Redirect("UserLogin.aspx");
}
}
}
protected void Btn_ok_Click(object sender, EventArgs e)
{
if (input_img.PostedFile.FileName == "")
{
OleDbConnection con = DBcon.createcon();
con.Open();
OleDbCommand cmd = new OleDbCommand("insert into ad(link_addtime,link_title,link_image_path,link_website_address) values('" + DateTime.Now.ToShortDateString() + "','" + txb_name.Text.Replace("'", "") + "','default.gif','"+txb_link_address.Text.ToString().Trim()+"')", con);
//Response.Write("insert into product(name,price,[count],xinhao,ccs,pic_name,content,type) values('" + txb_name.Text.Replace("'", "") + "','" + txb_price.Text.Replace("'", "") + "','" + txb_count.Text.Replace("'", "") + "','" + txb_xinhao.Text.Replace("'", "") + "','" + txb_ccs.Text.Replace("'", "") + "','暂无照片','" + FCKeditor1.Value + "','" + ddl_type.SelectedItem.Text + "')");
try
{
cmd.ExecuteNonQuery();
Response.Write("<script language='javascript'>alert('您执行的操作成功!');location.href='photo_admin.aspx'</script>");
}
//catch
//{
// Response.Write("<script language='javascript'>alert('抱歉,发生异常错误!')</script>");
//}
finally
{
con.Close();
}
}
else
{
string pic_full_path = input_img.PostedFile.FileName;
string pic_type = pic_full_path.Substring(pic_full_path.LastIndexOf(".") + 1).ToLowerInvariant();
后面还有 35 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
