📄 upphoto.asp
字号:
1、不是摄像头拍摄的照片<br>
2、内容要与学校同学相关,不允许将明星之类与同学无关的提交给学校相册。</TD>
</TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD>
<TD bgColor=#cccccc><IMG height=1 alt="" src="../image/stu.htm" width=1
name=""></TD>
<TD>
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center
bgColor=#ffffff border=0>
<TBODY>
<TR>
<TD height=8 bgColor=#f4f4f4></TD></TR>
<TR><TD>
<TABLE id=AutoNumber3 style="BORDER-COLLAPSE: collapse"
cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=top height=52>
<TABLE id=AutoNumber5 style="BORDER-COLLAPSE: collapse"
borderColor=#111111 cellSpacing=0 cellPadding=3 width="100%"
border=0>
<TBODY>
<TR>
<TD class=6 width=495 background=../image/type_bg.gif
height=30><IMG height=12 src="../image/type01.gif" width=12
align=absMiddle> 当前位置: <A
href="../image/stu.htm">网站首页 - </A><a href="../photo.asp">学校相册</a></TD>
<TD width=100 background=../image/type_bg.gif>
<DIV align=center><IMG
alt=更多教科研信息 src="../image/more.gif"
border=0></A></DIV></TD></TR>
<TR>
<TD colSpan=2>
<DIV align=center>
<%call show
sub show
dim upload,file,formName,formPath,iCount,name,filename,FileExp,photosize
filename=""
set upload=new upload_5xSoft ''建立上传对象
formPath="../upphoto/"
iCount=0
for each formName in upload.file ''列出所有上传了的文件
set file=upload.file(formName) ''生成一个文件对象
if file.FileSize>0 and file.FileSize<102400 then ''如果 FileSize > 0 说明有文件数据
FileExp=Right(file.FileName,Len(file.FileName)-InstrRev(file.FileName,".")+1)
if FileExp<>".gif" and FileExp<>".jpg" then
response.write "<br>请保持你的文件格式是JPG或者GIF,其它格式不允许上传"
exit sub
end if
filename=GetRndFileName&FileExp
file.SaveAs Server.mappath(formPath&filename) ''保存文件
name=FileName
FileExp2=Right(FileName,3)
if FileExp2<>"gif" or FileExp2<>"jpg" then
Dim objFSO,filepaths
filepaths=Server.mappath(formPath&filename)
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFile(filepaths)
response.write "你文件没有上传成功,因为你的目的不正当"
exit sub
end if
response.write "<font color=red>完成了第一步:上传照片!</font>"
photosize=file.FileSize\1024
iCount=iCount+1
else
response.write "<br>对不起,你的照片请别大于100k,宽度别大于500象素"
response.write "<br><a href='javascript:history.go(-1)'><font color=red size=4>请返回</font></a>"
exit sub
end if
set file=nothing
next
set upload=nothing ''删除此对象
%> <form name="form1" method="post" action="upphoto2.asp" onSubmit=submitonce(this)>
<table width="100%" border="0" bgcolor="#FFFFFF">
<tr>
<td colspan="2"><font color="red">第二步:>>>填写照片说明 :<br>
<br>
</font></td>
</tr>
<tr>
<TD width="26%" rowspan="8">
<script>
submitflag=false
function checkform(walkman_frm)
{
if (walkman_frm.title.value==""){
alert("请输入标题!");
walkman_frm.title.focus();
return false
}
if (walkman_frm.remark.value==""){
alert("请输入图片说明!");
walkman_frm.remark.focus();
return false
}
if(!submitflag){
walkman_frm.submit();
walkman_frm.Submit.disabled=true
submitflag=true
return true
}
else
{
alert("请不要重复提交");
return false;
}
}
</script>
</TD>
<TD width="74%">上传者:<font color="red"><%=session("wzname")%></font>
</TD> </tr>
<tr>
<TD>照片大小:<font color="red"><input name="photosize" type="text" value="<%=photosize%>" size="5" readonly="1">
</font>K</TD>
</tr>
<tr>
<TD>类别:
<select name="type1" size="1">
<option value="1">学校风景</option>
<option value="2" selected>同学照片</option>
<option value="3">其它经典</option>
</select>
(<font color="#FF0000">一定要选择啊</font>)</TD>
</tr>
<tr>
<TD>照片:
<input name="pic" type="text" value="<%=name%>" readonly="1"></TD>
</tr>
<tr>
<TD>标题:
<input name="title" type="text" size="25"></TD>
</tr> <tr>
<TD>
<input type="checkbox" name="type2" value="1">
班级相册
<input type="checkbox" name="type3" value="2">
学校相册 (<font color="#FF0000">选择图片存放位置</font>)</TD>
</tr>
<tr>
<TD>说明:<br>
<textarea name="remark" cols="40" rows="8" id="remark"></textarea></TD>
</tr>
<tr>
<TD>
<% If session("wzname")="" Then%>
<br>
<font color=red>只有登录才能发布!</font>
<%else%><input type="submit" name="Submit2" value="提交">
<input type="reset" name="Submit3" value="重置">
<%End If%></TD>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2"> 大家可能会觉得这样上传图片不如以前的那样来的简单,其实我也不想这样,<br>
但我觉得这样做是有必要的,因为以前上传图片,只能在下面留言,而不能在上<br> 传时就填上,那样会更烦的,你说呢?</td>
</tr>
</table>
</form>
<%end sub
Function GetRndFileName()
Dim tmpstr
randomize
tmpstr=Int(1000*rnd)
tmpstr="J_G"&year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)&tmpstr
GetRndFileName=tmpstr
End Function%> <p> </p>
</div></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<!--#include file="../bottom.asp"-->
<%
End If%> </BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -