无组件上传图片到数据库中,asp解决方案
作者:扬子 来源:动网 发布时间:2007-08-03 13:22:00
up.htm
'::::::: 此程序属扬子原创 ::::::::::::::::::
':::::: 在sql2000,2000s中测试通过::::::::
':::::::联系我:QQ:21112856,Email:yangzinet@hotmail.com:::::::::
'::::::: http://www.tingfo.net ::::::
<!--#include file="inc/domin.asp"-->
<!--#include file="conn.asp"-->
<html>
<head>
<title><% =webname %></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="main.css" type="text/css">
<style type="text/css">
<!--
.tx1 { height: 20px; width: 30px; font-size: 9pt; border: 1px solid; border-color: black black
#000000; color: #0000FF}
-->
</style>
<script language="JavaScript">
<!--
var bgc_on=new Array("#74D738","#FF9C17","#3278AB","#486177","#078C00","#007ECA")
var bgc_off=new Array("#4CAD12","FFB859","5F9FD0","577590","08A700","009FFF")
function turnon(obj1,id){
obj1.style.background=bgc_on[id];
}
function turnoff(obj1,id){
obj1.style.background=bgc_off[id];
}
//-->
</script>
<SCRIPT language=javascript>
function check_input()
{
if (Frm.pic.value=="")
{ alert("请选择要上传的图片");
return false;
}
if (Frm.type.value=="")
{ alert("请选择图片类型");
return false;
}
if (Frm.thetext.value=="")
{ alert("请输入照片说明");
return false;
}
return true;
}
</SCRIPT>
</head>
<body bgcolor="#555555" text="#000000" leftmargin="0" topmargin="0">
<table width=755 cellpadding=0 cellspacing=0 border=0 bgcolor=#ffffff align="center">
<tr>
<td height=100><img src="http://edu.chinaz.com/Get/Program/Asp/img/top.gif" align="top">
</table>
<!--#include file="inc/mulu.asp"-->
<table width=755 cellpadding=0 cellspacing=0 border=0 bgcolor=#ffffff align="center" bordercolor=#000000>
<tr>
<td height=400 width=180 bgcolor=#D1E9D5 style="border-right: 1px #0E801E solid">
<table width=100% height=100% cellpadding=0 cellspacing=0 border=0 align="center" bordercolor=#000000>
<tr><td height=30 align="center" class=L15><font color=#E96D08>欢迎你:<% =username %> 管理中心</font>
<tr><td height=23 align="center" class=L15 bgcolor=#4CAD12 style="border-top:0px #0E801E solid; border-bottom:1px #0E801E solid;"><font color=#C2F009 class=yinying>管 理 中 心</font>
<tr><td height=20 class=L13>
<!--#include file="inc/centermulu.asp"-->
<tr><td height=5>
<tr><td>
</table>
<td>
<%
set rs=server.createobject("adodb.recordset")
sql="select * from photo where author=’"&username&"’"
rs.open sql,conn,1,1
%>
<table cellpadding=0 cellspacing=0 border=0 width=100% height=100%>
<tr><td height=3>
<tr><td height=3 bgcolor=#ffffff background=img/bj3.gif>
<tr><td height=20 valign="bottom" bgcolor=#eeeeee> 现在位置: 98243班 - 管理中心 - 添加新闻
<tr><td height=3 bgcolor=#eeeeee style="border-bottom: 1px #cccccc solid"><p style="font-size:1pt">
<tr><td height=20 valign="bottom"> <font color=green><% =username %>:你一共上传了 <font color=red><% =rs.recordcount %></font> 张照片</font> <a href="adminphoto.asp"><font color=red><u>管理以前上传的照片</u></font></a>
<tr><td bgcolor=#ffffff valign=top>
<table cellpadding=0 cellspacing=0 border=0 width=95% height=100% align="center">
<form action=addphoto.asp method=post name=Frm onSubmit="return check_input()" enctype="multipart/form-data">
<tr><td height=20 colspan=2>
<tr><td height=25 width=15% align="right" class=L13>选择照片: <td> <input NAME="pic" TYPE="FILE" class="tx1" style="width:300"> <font color=red>拒绝 * 、写真图等</font>
<tr><td height=25 width=20% align="right" class=L13>照片分类: <td> <select name="type">
<option selected value="">选择类型</option>
<option value="班级合影">班级合影</option>
<option value="个人照片">个人照片</option>
<option value="恩师照片">恩师照片</option>
<option value="情人照片">情人照片</option>
<option value="友人照片">友人照片</option>
<option value="其他照片">其他照片</option>
</select>
<tr><td height=25 width=20% align="right" class=L13>照片说明: <td> <textarea name="thetext" cols="46" rows="7" style="border:1px double rgb(88,88,88);font:9pt">
</textarea> <font color=red>最多20个字符</font>
<tr><td height=5 colspan=2>
<tr><td height=25 colspan=2 align="center">
<input type="submit" name="Submit" value=" 提 交 " style="border:1px double rgb(88,88,88);font:9pt">
<input type="reset" name="Reset" value=" 重 写 " style="border:1px double rgb(88,88,88);font:9pt">
<tr><td colspan=2>
</tr></form>
</table>
</table>
</table>
<!--#include file="inc/footer.asp"-->
</body>
</html>
猜你喜欢
- 我要说的内容都是非常基础的内容,高手就免看了,如果看了欢迎给点意见啊。新手或者对低层还不是很了解的人可以看看,帮助理解与记忆。XMLHttp
- 1、前不久,friendfeed.com把主导航从上面,移到了右侧。现在,又改到了左侧。2、现在,twitter.com把页签(相当于二级导
- 我们在网页中使用CSS来设置网页、表格和字体大小,一般使用的是网络上较流行的9磅字:<STYLE type=TEXT/CSS
- 在工作中,作为一名开发者的你,也许偶尔需要从事维护数据库的工作。下面我们来介绍一下两个SQL服务器的维护技巧:轻松改变数据库拥有者、整理索引
- 【译者的话】 网页上的小广告(banner)已经成为一种宣传推广的重要形式,但这些小广告除了版面细小外,图象的表现还受到象素较低等其它因素影
- 内容摘要: Request和Response这两个对象是ASP所提供的内置对象中最常用的两个。在浏览器(或其他用户代理)和Web服
- 什么是F型浏览?2006年4月,美国长期研究网站可用性的著名网站设计师杰柯柏·尼尔森(Jakob Nielsen)发表了一项《眼球轨迹的研究
- AJAX:Asynchronous JavaScript And XML--------异步JavaScript和XML
- 某些情况下:我们希望在一个SQL Server下访问另一个sqlserver数据库上的数据,或者访问其他oracle数据库上的数据,要想完成
- 一、ASP中处在双引号中的可以是任意的字符、字符串,HTML代码1.<%response.write ("I&nb
- 之前写了一个ajax上传工具。但是只是客户端的工具是我写的,服务器端的那个程序,我是修改了一个网上流传的无组件上传类。因为当时我还不懂什么a
- Module Tabs(也称选项卡,后文中简称Tab,以便更符合中国设计师的日常叫法) 是一个常见的交互元素——将不同的内容重叠放置在某一布
- <script> Function.prototype.$bind=function(object) {  
- SQL的扩展的删除与恢复 删除 代码如下:use master exec spdropextendedproc “xpcmdshell“ e
- 由于众所周知的原因,ACCESS在大型站点应用中都靠不上边,主要问题就是数据量大了以后几乎无法索引。当ACCESS里数据过万后,明显可以感觉
- 适用环境: PHP5.2.x / mysql 5.0.xclass Mysql { priva
- 导航设计是结构层面设计中的主要工作之一,在软件中,导航设计的好坏,直接关系到用户使用是否能够流畅。面对较复杂的导航,我们第一反应是将其简化。
- 一.权限表mysql数据库中的3个权限表:user 、db、 host权限表的存取过程是:1)先从user表中的host、 user、 pa
- 比如有一个需求,通过sql语句,返回-5至5的随机整数.如果这一个放在PHP中,则非常简单直接用print rand(-5,5);?>
- 1、元旦之前受赵晨之邀作为讨论嘉宾参加了ACM组织的“人与信息社会巡讲”。2、去之前赵晨发给了我大致的讨论提纲。咣当了好几下~说实话,我是硬