📄 user_photo.asp
字号:
<%@ LANGUAGE = VBScript.Encode %>
<!--#include file="inc/conn1.asp"-->
<%
if Request.Cookies("NC")="" or Request.Cookies("NC")="访客" then
Response.Write("对不起,您不是社区用户,请先注册!")
Response.End
end if
set rs=server.createobject("adodb.recordset")
set rs=conn.execute("Select * from HY Where NC='"&Request.Cookies("NC")&"'")
%>
<HTML>
<HEAD>
<TITLE>上传照片</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="JavaScript1.2">
<!--
var sIwidth=200
var sIheight=150
//-->
</script>
<style type="text/css">
<!--
.a1 { filter: Alpha(Opacity=50)}
.a2 { filter: Alpha(Opacity=90)}
BODY {
SCROLLBAR-FACE-COLOR: #dfdfdf; SCROLLBAR-HIGHLIGHT-COLOR: #dfdfdf; OVERFLOW: auto; CURSOR: default; SCROLLBAR-SHADOW-COLOR: #dfdfdf; SCROLLBAR-3DLIGHT-COLOR: #ffffff; SCROLLBAR-ARROW-COLOR: #000000; SCROLLBAR-TRACK-COLOR: #9A9A9A; SCROLLBAR-DARKSHADOW-COLOR: #6f6f6f
}
body,td { font-family: "Tahoma", "新宋体"; font-size: 9pt; font-style: normal}
.en { font-family: "Verdana", "Arial", "Helvetica", "sans-serif"; font-size: 8pt}
.drop
{FILTER: DropShadow(Color=#ffffff, OffX=1, OffY=1, Positive=1); WIDTH: 100; POSITION: relative}
.drop01
{FILTER: DropShadow(Color=#ffffff, OffX=1, OffY=1, Positive=1); width:100%;POSITION: relative}
.p105 { font-size: 10.5pt; font-family: Tahoma,宋体; line-height: 150% }
.p7 { font-size: 7pt; font-family: "Microsoft Sans Serif","MS Sans Serif";}
a:link { color: #000000; text-decoration: none }
a:visited { color: #000000; text-decoration: none }
a:active { color: #800000; text-decoration: none }
a:hover { color: #003399; text-decoration: underline }
.button { font-size: 9pt; background-color: #EEF7FF; position: relative; height: 20;
border-style: outset; border-width: 1 }
.ying
{position:absolute;filter:Glow(color=#ff0000,strength=1);}
.input { font-size: 9pt; }
-->
</style>
<Script language="javascript">
function mysubmit(theform)
{
if(theform.file.value=="")
{
alert("请点击浏览按钮,选择您要上传的jpg或gif文件!")
theform.file.focus;
return (false);
}
else
{
str= theform.file.value;
strs=str.toLowerCase();
lens=strs.length;
extname=strs.substring(lens-4,lens);
if(extname!=".jpg" && extname!=".gif")
{
alert("请选择jpg或gif文件!");
return (false);
}
}
return (true);
}
</script>
</HEAD>
<BODY bgcolor="#FFFFFF" background="images/bg.gif">
<br>
<table cellpadding="0" cellspacing="0" border="0" bgcolor="#84B6DE" width="97%" align="center">
<tr><td>
<table cellpadding="4" cellspacing="1" border="0" width="100%">
<tr><td bgcolor="#F9F9F9">
<TABLE WIDTH="100%" BORDER="0" align="center" CELLPADDING="0" CELLSPACING="1" bgcolor="#84B6DE">
<TR>
<TD HEIGHT="23" ALIGN="CENTER" background="images/1-11.gif"><B><font color=#21517B>上
传 照 片</font></B></TD>
</TR>
<TR>
<TD BGCOLOR="#FFFFFF" align=center>
<div id="Layer1" style="position:absolute; width:210px; height:160px; z-index:2; left: 220px; top: 155px">
<table width="210" border="0" height="160" bgcolor="#ff0000" cellspacing="1" cellpadding="0">
<tr bgcolor="#ACF3E5">
<td bgcolor="#FFFFFF">
<div align="center"> </div>
</td>
</tr>
</table>
</div>
<div id="Layer2" style="position:absolute; width:210px; height:160px; z-index:3; left: 220px; top: 155px" class="a2">
<table width="210" border="0" cellspacing="1" height="160" cellpadding="0">
<tr align="center">
<td width="210">
<% if rs("HavePhoto")=True then%><img src="user_photo_disp.asp?id=<%=Request.Cookies("NC")%>" width="200" height="150"><% else %><img src="images/nophoto.jpg" width="200" height="150"><% end if%>
</td>
</tr>
</table>
</div>
<div id="Layer3" style="position:absolute; width:210px; height:22px; z-index:6; left: 220px; top: 230px">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr bgcolor="#84B6DE" align="center">
<td nowrap class="a1" width="100%" height="22"><font color="#ffffff">要上传的图片请不要超出这个红框</font></td>
</tr>
</table>
</div>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td>
<table width="100%" border="0" cellspacing="1">
<form method="post" action="user_photo_add.asp" name="form" enctype="multipart/form-data" onsubmit="return mysubmit(this)">
<tr valign="top" bgcolor="#D3FCF4">
<td nowrap height="300" align="center" bgcolor="#FFFFFF">
<p>
<font color="#3965BF">
<script language="JavaScript">
<!--
document.write('<br> 图片可以是<font color="#ff0000">*.jpg</font>或<font color="#ff0000">*.gif</font>文件 (注意:文件最大不超过<font color="#ff0000">50KB</font>)否则系统提示错误!<br>')
document.write('文件大小请控制在<font color="#ff0000">'+sIwidth+'X'+sIheight+'</font>以内,即宽度不要超过<font color="#ff0000">'+sIwidth+'</font>像素、高度不要超过<font color="#ff0000">'+sIheight+'</font>像素。')
-->
</script>
<br>
否则会出现图片严重失真!建议使用PHOTOSHOP或ACDSEE将图片处理成合适大小!</font>
</td>
</tr>
<tr bgcolor="#eeeeee">
<td nowrap align="center" height="30"> 图片位置:<input type=FILE name="file" maxlength="120" class="input">
<input type=SUBMIT value=" 上传靓照 " name="SUBMIT" class="button">
<a href="user_photo_del.asp">[删除图片]</a> <a href="home.asp">[返 回]</a></td>
</tr>
</form>
</table>
</td></tr></table>
</TD>
</TR>
</TABLE>
</td>
</tr></table>
</td></tr></table>
<br>
</BODY>
</HTML>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -