无组件上传图片到数据库中,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>
猜你喜欢
- mysql_query("set autocommit=0"); $list_one = $db->fetch_f
- 更详细的信息可以去查msdn或者Navigator 2.0以后的说明文档,这里我们之做个简单的说明 包括一下几大属性: appCodeNam
- 官方文档介绍链接:append方法介绍DataFrame.append(other, ignore_index=False, verify_
- HTML与CSS在Flash中的应用:不小心看到同事Den在弄个小东西:在Flash里使用HTML和CSS,代码是这样:var m
- 如果我有一个数据集,他的某个列名下面的value很长,我们需要筛选出,所有列名中value值字符串大于20的数据集。其实比较简单啦,一句代码
- go redis 集合操作--saddredis的go语言包,我们使用官方推荐的redigo,https://github.com/gary
- 1、函数实现# -*- coding: utf-8 -*-def tail(filename, n=10): with open
- 有时候,我们在某一重要的时间段需要监控某张表的变化情况,包含插入、更新、删除。举例来说,当我们把数据导出到外部的系统时,我们希望导出的是全部
- 之前看到好友在发各种"群发"来检验对方是不是把自己删除了,好吧,其实那个没啥用处.所以决定自己动手做一个百度了一下,检测
- python 判断三个数字中的最大值,具体代码如下所示:#判断三个数中最大值n1= int(input('please enter
- 众所周知,想要在python程序中执行SQL语句需要使用第三方模块:pymysql。下面,我将为大家简述一下pymysql第三方库的安装到使
- 别人复制你网站的文章时自动加上注释,这个功能你在很多网站应该都有体会过,当我们复制一段内容时,就自动在文章后面加上了网站的一些
- 在python用import或者from...import来导入相应的模块。模块其实就是一些函数和类的集合文件,它能实现一些相应的功能,当我
- 目录1. 现实背景2. 约定3. 配置 master3.1. 配置启动参数3.2. 重启服务使参数生效3.3. 以 root 身份登录,创建
- 1:php地址 http://127.0.0.6/?c=json2:java 输出的结果是[{"i
- 在Python项目中,我们通常需要使用许多第三方库来提供额外的功能和工具。但是,直接将这些库上传到Git仓库并不是一种好的做法,因为这会使得
- asp ajax json教程首先用ACCESS建json.mdb的库,然后建一个表t_jsontable,字段如下:jt_id,jt_na
- 日常维护中,经常会碰到线程被阻塞,导致数据库响应非常慢,下面就看看如何获取是哪个线程导致了阻塞的。1. 环境说明RHEL 6.4 x86_6
- 在开始使用Go进行编码时,Defer是要关注的一个很重要的特性。它非常简单:在任何函数中,给其他函数的调用加上前缀 defer以确保该函数在
- 前言具有名字的插槽slot使用 中的 "name" 属性绑定元素注意:1,如果没有匹配到 则放到匿名的插槽中2,具名插槽