<!--#include virtual="/inc/conn.asp"-->
<!--#include virtual="/inc/chkuser.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

<%
'已停用
response.End()

Function download(File) 
      temp = Split(File, "\") 
      filename = temp(UBound(temp)) 
      Set s = CreateObject("adodb.stream") 
      s.mode = 3 
      s.Type = 1 
      s.Open 
      s.loadfromfile(File) 
      data = s.Read 
      If IsNull(data) Then 
          response.Write "空" 
      Else 
          response.Clear 
          Response.ContentType = "application/octet-stream" 
          Response.AddHeader "Content-Disposition", "attachment; filename=" & filename 
          response.binarywrite(data) 
      End If 
      Set s = Nothing 
End Function

Function RndNumber(Min,Max) 
Randomize 
RndNumber=Int((Max - Min + 1) * Rnd() + Min) 
End Function 

today=Date
suiji=Year(today)&Right("0" & Month(today),2)&Right("0" & Day(today),2)&RndNumber(1000000,9999999)	
a1=RndNumber(10,99)
a2=RndNumber(10,99)
a3=RndNumber(10,99)
a4=RndNumber(10,99)
a5=RndNumber(10,99)
a6=RndNumber(10,99)
a7=RndNumber(10,99)
b1=RndNumber(10,99)
b2=RndNumber(10,99)
b3=RndNumber(10,99)
b4=RndNumber(10,99)
b5=RndNumber(10,99)
b6=RndNumber(10,99)
b7=RndNumber(10,99)
c1=RndNumber(10,99)
c2=RndNumber(10,99)
c3=RndNumber(10,99)
c4=RndNumber(10,99)
c5=RndNumber(10,99)
c6=RndNumber(10,99)
c7=RndNumber(10,99)
d1=RndNumber(10,99)
d2=RndNumber(10,99)
d3=RndNumber(10,99)
d4=RndNumber(10,99)
d5=RndNumber(10,99)
d6=RndNumber(10,99)
d7=RndNumber(10,99)
e1=RndNumber(10,99)
e2=RndNumber(10,99)
e3=RndNumber(10,99)
e4=RndNumber(10,99)
e5=RndNumber(10,99)
e6=RndNumber(10,99)
e7=RndNumber(10,99)
f1=RndNumber(10,99)
f2=RndNumber(10,99)
f3=RndNumber(10,99)
f4=RndNumber(10,99)
f5=RndNumber(10,99)
f6=RndNumber(10,99)
f7=RndNumber(10,99)
g1=RndNumber(10,99)
g2=RndNumber(10,99)
g3=RndNumber(10,99)
g4=RndNumber(10,99)
g5=RndNumber(10,99)
g6=RndNumber(10,99)
g7=RndNumber(10,99)

sql="select * from aymibao"
rs.open sql,conn,1,3
rs.addnew
rs("aymibaoka")=suiji
rs("a1")=md5(a1)
rs("a2")=md5(a2)
rs("a3")=md5(a3)
rs("a4")=md5(a4)
rs("a5")=md5(a5)
rs("a6")=md5(a6)
rs("a7")=md5(a7)
rs("b1")=md5(b1)
rs("b2")=md5(b2)
rs("b3")=md5(b3)
rs("b4")=md5(b4)
rs("b5")=md5(b5)
rs("b6")=md5(b6)
rs("b7")=md5(b7)
rs("c1")=md5(c1)
rs("c2")=md5(c2)
rs("c3")=md5(c3)
rs("c4")=md5(c4)
rs("c5")=md5(c5)
rs("c6")=md5(c6)
rs("c7")=md5(c7)
rs("d1")=md5(d1)
rs("d2")=md5(d2)
rs("d3")=md5(d3)
rs("d4")=md5(d4)
rs("d5")=md5(d5)
rs("d6")=md5(d6)
rs("d7")=md5(d7)
rs("e1")=md5(e1)
rs("e2")=md5(e2)
rs("e3")=md5(e3)
rs("e4")=md5(e4)
rs("e5")=md5(e5)
rs("e6")=md5(e6)
rs("e7")=md5(e7)
rs("f1")=md5(f1)
rs("f2")=md5(f2)
rs("f3")=md5(f3)
rs("f4")=md5(f4)
rs("f5")=md5(f5)
rs("f6")=md5(f6)
rs("f7")=md5(f7)
rs("g1")=md5(g1)
rs("g2")=md5(g2)
rs("g3")=md5(g3)
rs("g4")=md5(g4)
rs("g5")=md5(g5)
rs("g6")=md5(g6)
rs("g7")=md5(g7)
rs.update
rs.close

Set Jpeg = Server.CreateObject("Persits.Jpeg")
Jpeg.Open Server.MapPath("/updata/mibao/bak/ikpay.jpg")

'开始写文字
Jpeg.Canvas.Font.Color = &000000'' red 颜色
Jpeg.Canvas.Font.Family = "宋体" '字体
jpeg.canvas.font.size=  20
Jpeg.Canvas.Font.Bold = false    '是否加粗 
'Jpeg.Canvas.Font.ShadowXoffset = 2  '水印文字阴影向右偏移的像素值，输入负值则向左偏移
'jpeg.canvas.font.size=  56          ' 字号
'Jpeg.Canvas.Font.ShadowColor = &hFFFFFF    '阴影
Jpeg.Canvas.Font.Quality = 4     '清晰度
Jpeg.Canvas.Print 128,130,suiji
Jpeg.Canvas.Print 68,185,a1
Jpeg.Canvas.Print 106,185,a2
Jpeg.Canvas.Print 146,185,a3
Jpeg.Canvas.Print 186,185,a4
Jpeg.Canvas.Print 226,185,a5
Jpeg.Canvas.Print 266,185,a6
Jpeg.Canvas.Print 306,185,a7  'x+40  y+33
Jpeg.Canvas.Print 68,218,b1
Jpeg.Canvas.Print 106,218,b2
Jpeg.Canvas.Print 146,218,b3
Jpeg.Canvas.Print 186,218,b4
Jpeg.Canvas.Print 226,218,b5
Jpeg.Canvas.Print 266,218,b6
Jpeg.Canvas.Print 305,218,b7
Jpeg.Canvas.Print 68,251,c1  'x+40  y+33
Jpeg.Canvas.Print 106,251,c2
Jpeg.Canvas.Print 146,251,c3
Jpeg.Canvas.Print 186,251,c4
Jpeg.Canvas.Print 226,251,c5
Jpeg.Canvas.Print 266,251,c6
Jpeg.Canvas.Print 306,251,c7
Jpeg.Canvas.Print 68,284,d1  'x+40  y+33
Jpeg.Canvas.Print 106,284,d2 
Jpeg.Canvas.Print 146,284,d3
Jpeg.Canvas.Print 186,284,d4 
Jpeg.Canvas.Print 226,284,d5
Jpeg.Canvas.Print 266,284,d6 
Jpeg.Canvas.Print 306,284,d7
Jpeg.Canvas.Print 68,317,e1  'x+40  y+33
Jpeg.Canvas.Print 106,317,e2
Jpeg.Canvas.Print 146,317,e3
Jpeg.Canvas.Print 186,317,e4
Jpeg.Canvas.Print 226,317,e5
Jpeg.Canvas.Print 266,317,e6
Jpeg.Canvas.Print 306,317,e7
Jpeg.Canvas.Print 68,350,f1 'x+40  y+33
Jpeg.Canvas.Print 106,350,f2 
Jpeg.Canvas.Print 146,350,f3
Jpeg.Canvas.Print 186,350,f4
Jpeg.Canvas.Print 226,350,f5
Jpeg.Canvas.Print 266,350,f6
Jpeg.Canvas.Print 306,350,f7
Jpeg.Canvas.Print 68,383,g1 'x+40  y+33
Jpeg.Canvas.Print 106,383,g2
Jpeg.Canvas.Print 146,383,g3
Jpeg.Canvas.Print 186,383,g4
Jpeg.Canvas.Print 226,383,g5
Jpeg.Canvas.Print 266,383,g6
Jpeg.Canvas.Print 306,383,g7
'打印坐标x 打印坐标y 需要打印的字符

'以下是对图片进行边框处理

Jpeg.Canvas.Pen.Color = &H000000
Jpeg.Canvas.Pen.Width = 1 
Jpeg.Canvas.Brush.Solid = False
Jpeg.Canvas.Bar 1, 1, Jpeg.Width, Jpeg.Height
Jpeg.Save Server.MapPath("/updata/mibao/"&suiji&".jpg") 


call download(server.mappath("/updata/mibao/"&suiji&".jpg")) 
%> 



<%
conn.close 
set conn=nothing%>
