<!--#include file="../Include/Conn.asp" -->
<!--#include file="../Include/const.asp" -->
<!--#include file="../Include/function.asp" -->
<!--#include file="../Include/html.inc"-->
<html>
<head>
<title><%=site_info(0)%>——个人相片上传</title>
<link href=../Include/Style1.css rel=STYLESHEET type=text/css>
</head>

<body>
<!--#include FILE="upload_jiayuan.inc"--> 
<table width="770" border="0" align="center" bgcolor="#FFFFFF">
  <tr>
    <th height="270" scope="row"><div align="center">
        <%
set upload=new upload_5xsoft
set file=upload.file("file1")
if file.fileSize>0 then
    '自动生成文件名
    filename=date()
    filename=filename&time()
    filename=replace(filename,"-","")
    filename=replace(filename,":","")
    filename=replace(filename," ","")
    filename=filename+"."
    filenameend=file.filename
    filenameend=split(filenameend,".")
    if filenameend(1)="gif" or filenameend(1)="jpg" or filenameend(1)="jpeg" then
        filename=filename&filenameend(1)
        file.saveAs Server.mappath("uppic/"&filename)
        response.write "<p align=center>"
        response.write filename
        response.write "已成功上传至服务器中，请复制下面红色地址添加图片，<br><p align=center><a href=upload.asp>点击这里继续上传图片！</a>"
        response.write "</p>"
        response.write "<p align=center>"
        response.write "<font color=red>"
        response.write "uppic/"&filename
        response.write "</font></p>"
        response.write "<p align=center>"
        response.write "<a href='uppic/"&filename&"' target=_blank>点击这里查看上传的图片</a>"
        response.write "</p>"
        response.write "<p align=center><a href=javascript:window.close()>【关闭窗口】</a>"
    else
        response.write "文件格式不对→"
        response.write "<a href=upload.asp>返回"
    end if
    set file=nothing
else
    response.write "文件内容不能为空→"
    response.write "<a href=upload.asp>返回"
end if
set upload=nothing
response.write "<br>"
%>
    </div></th>
  </tr>
</table>
