[求助] 从数据库提取图片问题

onlyme920 2004-05-08 03:24:42
http://www.nhroom.com/class/photoview.asp
如上,想请高手指教如何能使该页中的相片在显示的时候正常显示,不会发生变形,贴上源代码:
<table border="0" cellpadding="0" cellspacing="0" width="740">
<tr>
<td> </td>
</tr>
</table>
</center>
</div>
<div align="right">
<table border="0" cellpadding="0" cellspacing="0" width="740">
<tr>
<td width="520" valign="top">
<div align="center">

<table border="0" cellpadding="2" width="500">
<tr>
<td>你的位置>玛雅同学录>班级像册</td>

<td>
<p align="right"><a href="photoadd.asp">上传相片</a></td>
</tr>
</table>
</div>
<div align="center">
<center>

<table border="0" cellpadding="0" cellspacing="0" width="516" background="images/class_bg.gif">
<tr>
<td><img border="0" src="images/class3.gif" width="500" height="25"></td>
</tr>
<%
strsql="select * from photo where photoid="&photoid
set rs=conn.execute(strsql)
%>
<tr>
<td>

<div align="center">

<table width="509" border="0" cellspacing="1" cellpadding="2">
<tr>
<td width="503"><div align="center"><img src="<%=formPath%>/<%=rs("photoname")%>" alt="标题:<%=trim(rs("phototitle"))%> 说明:<%=trim(rs("photocomment"))%> 上传人:<%=trim(rs("photouser"))%> 上传时间:<%=trim(rs("phototime"))%>" width="341" height="479" border="0">
<%if rs("photouser")=session("username") or session("usergroup")=3 then%>
<a href="photoedit.asp?id=<%=photoid%>"><img src="images/edit.gif" alt="编辑" border="0"></a>
<a href='javascript:go("photodel.asp?method=del&id=<%=rs("photoid")%>","您确定要删除?")'><img src="images/del.gif" alt="删除" border="0"></a>
<%end if%>
</div></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td><img border="0" src="images/class_more.gif" width="500" height="20"></td>
</tr>
</table>
</center>
</div>
</td>
<td width="30" background="images/103.gif"> </td>

<td width="190" valign="top">
<!--#include file="right.asp" -->
</td>
</tr>
</table>
上传相片页的源代码如下:
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Content-Language" content="zh-cn">
<title>玛雅同学录</title>
<link href="css/class.css" type=text/css rel=stylesheet>
<script language="JavaScript">
<!--
function checkform(){
if (document.form1.phototitle.value.length==0){
alert("图片标题不能为空!");
document.form1.phototitle.focus();
return false;
}
if (document.form1.photo.value.length==0){
alert("图片地址不能为空!");
document.form1.photo.focus();
return false;
}
if (document.form1.photocomment.value.length>200) {
alert("您发表的留言大于所规定字数!");
document.form1.photocomment.focus();
return false;
}
return true
}
//-->
</script>
</head>

<body bgcolor="#808080" text="#808080" topmargin="0" leftmargin="0">
<div align="center">

<table border="0" cellpadding="0" cellspacing="0" width="760" bgcolor="#FFFFFF">
<tr>
<td>
<div align="center">
<!--#include file="top.asp" -->

<table border="0" cellpadding="0" cellspacing="0" width="740">
<tr>
<td> </td>
</tr>
</table>

</div>
<div align="right">
<table border="0" cellpadding="0" cellspacing="0" width="740">
<tr>
<td width="520" valign="top">
<div align="center">

<table border="0" cellpadding="2" width="500">
<tr>
<td>你的位置>玛雅同学录>班级像册</td>

<td>
<p align="right"> </td>
</tr>
</table>
</div>
<div align="center">

<table border="0" cellpadding="0" cellspacing="0" width="500" background="images/class_bg.gif">
<tr>
<td><img border="0" src="images/class3.gif" width="500" height="25"></td>
</tr>

<tr>
<td>

<div align="center">

<form action="photoupload.asp" method="post" enctype="multipart/form-data" name="form1" id="form1" onSubmit="return checkform()">
<table width="400" border="0" align="center" cellpadding="2" cellspacing="1">
<tr>
<td width="100">标题:</td>
<td width="288"><input name="phototitle" type="text"height="20" id="phototitle"></td>
</tr>
<tr>
<td>图片路径:</td>
<td><input name="photo" type="file" height="20"id="photo"></td>
</tr>
<tr>
<td height="60">说明:</td>
<td><textarea name="photocomment" cols="40" rows="8" id="photocomment"></textarea></td>
</tr>
<tr>
<td colspan="2"><div align="center">
<input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit2" value="重置">
</div></td>
</tr>
</table>
</form>
</div>
</td>
</tr>
<tr>
<td><img border="0" src="images/class_more.gif" width="500" height="20"></td>
</tr>
</table>

</div>
</td>
<td width="30" background="images/103.gif"> </td>

<td width="190" valign="top">
<!--#include file="right.asp" -->
</td>
</tr>
</table>
</div>
<!--#include file="foot.asp" -->
</table>
</div>
</body>

</html>
...全文
28 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧