|
Server : Microsoft-IIS/10.0 System : Windows NT EBS-6136 10.0 build 17763 (Windows Server 2016) i586 User : jxgj ( 0) PHP Version : 7.0.33 Disable Function : passthru,exec,system,shell_exec,proc_open,popen,pcntl_exec,socket_bind,stream_socket_server Directory : D:/tmp_aspnet/root/a99112df/ca2a8923/ |
?#pragma checksum "D:\wwwroot\ldxynb\wwwroot\Back\info\guanggaowei_add.aspx.cs" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "8C478C4D0339F86BD6A64E292EA3998E"
#line 1 "D:\wwwroot\ldxynb\wwwroot\Back\info\guanggaowei_add.aspx.cs"
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.IO;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.OleDb;
using CoreClass;
using System.Data.SqlClient;
public partial class Back_Info_guanggaowei_add : System.Web.UI.Page
{
#region 域界说
CoreClass.DBCommon dbc = new DBCommon();
CoreClass.PublicFunction pubfun = new PublicFunction();
Zhongbiao bs = new Zhongbiao();
public int adminid;
public int channelid;
public string col = "info";
#endregion
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
if (Request["id"] != null && Request["id"].ToString() != "")
{
DataSet dt_img = new DataSet();
dt_img = bs.chaxun("select * from ggao where tp_id=" + Request["id"].ToString());
if (dt_img.Tables[0].Rows.Count>0)
{
this.Label1.Text = dt_img.Tables[0].Rows[0]["stye_id"].ToString();
this.Label2.Text = dt_img.Tables[0].Rows[0]["tp_bt"].ToString();
this.TextBox1.Text = dt_img.Tables[0].Rows[0]["tp_nr"].ToString();
Label3.Text = dt_img.Tables[0].Rows[0]["tp_url"].ToString();
}
}
}
}
//
protected void Button1_Click(object sender, EventArgs e)
{
//if (FileUpload2.PostedFile.ContentLength < 500000)//100000为100K
//{
string fileFullname = this.FileUpload2.FileName;
string dataName = DateTime.Now.ToString("yyyyMMddhhmmss");
string fileName = fileFullname.Substring(fileFullname.LastIndexOf("\\") + 1);
string type = fileFullname.Substring(fileFullname.LastIndexOf(".") + 1);
if (type == "bmp" || type == "jpg" || type == "gif" || type == "JPG" || type == "BMP" || type == "GIF" || type == "PNG" || type == "png")
{
this.FileUpload2.SaveAs(Server.MapPath("../../HaodeUpload/UploadedFiles") + "\\" + dataName + "." + type);
Label3.Text = "HaodeUpload/UploadedFiles/" + dataName + "." + type;
}
else
{
Response.Write("<script language='javascript'>alert('请选择体式是:|jpg|gif|bmp|的文件');</script>");
}
//}
//else
//{
// Response.Write("<script language='javascript'>alert('你的图片已经超过500K的大。');</script>");
//}
}
//批改
protected void Button2_Click(object sender, EventArgs e)
{
if (Session["AdminPassport"] != null && Session["AdminPassport"].ToString() != "")
{
bs.user("update ggao set tp_nr='" + this.TextBox1.Text.Replace("'", "") + "',tp_url='" + Label3.Text + "',tp_time='" + System.DateTime.Now.ToString() + "' where tp_id=" + Request["id"].ToString());
bs.user("insert into rizhi(rz_bt,rz_nr,rz_czr,rz_time) values('批改告白信息','批改地位'+'" + Label1.Text + "','" + Session["AdminPassport"].ToString() + "','" + System.DateTime.Now.ToString() + "' )");
bs.java("批改成功", "guanggaowei.aspx");
}
}
}
#line default
#line hidden