国产高清在线免费观看-国产高清在线免费无码-国产高清在线男人的天堂-国产高清在线视频-国产高清在线视频精品视频-国产高清在线视频伊甸园

LOGO OA教程 ERP教程 模切知識交流 PMS教程 CRM教程 開發(fā)文檔 其他文檔  
 
網(wǎng)站管理員

無組件上傳圖片到數(shù)據(jù)庫中,最完整解決方案

admin
2010年7月24日 8:28 本文熱度 5632
up.htm
<!--#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; 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="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> 現(xiàn)在位置: ******班 - 管理中心 - 添加新聞
<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:14px">
</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:14px">
   <input type="reset" name="reset" value=" 重 寫 " style="border:1px double rgb(88,88,88);font:14px">
<tr><td colspan=2>
</tr></form>
</table>
</table>
</table>
<!--#include file="inc/footer.asp"-->
</body>
</html>

fupload.inc
<script runat=server language=vbscript>
'限制上傳圖片大小
dim uploadsizelimit
'********************************** 得到上傳數(shù)據(jù) **********************************
function getupload()
dim result
set result = nothing
if request.servervariables("request_method") = "post" then 'request method must be "post"
dim ct, posb, boundary, length, pose
ct = request.servervariables("http_content_type") 'reads content-type header
if lcase(left(ct, 19)) = "multipart/form-data" then 'content-type header must be "multipart/form-data"
'this is upload request.
'get the boundary and length from content-type header
posb = instr(lcase(ct), "boundary=") 'finds boundary
if posb > 0 then boundary = mid(ct, posb + 9) 'separetes boundary
length = clng(request.servervariables("http_content_length")) 'get content-length header
if "" & uploadsizelimit<>"" then
uploadsizelimit = clng(uploadsizelimit)
if length > uploadsizelimit then
' on error resume next 'clears the input buffer
' response.addheader "connection", "close"
' on error goto 0
request.binaryread(length)
err.raise 2, "getupload", "upload size " & formatnumber(length,0) & "b exceeds limit of " & formatnumber(uploadsizelimit,0) & "b"
exit function
end if
end if
if length > 0 and boundary <> "" then 'are there required informations about upload ?
boundary = "--" & boundary
dim head, binary
binary = request.binaryread(length) 'reads binary data from client
'retrieves the upload fields from binary data
set result = separatefields(binary, boundary)
binary = empty 'clear variables
else
err.raise 10, "getupload", "zero length request ."
end if
else
err.raise 11, "getupload", "no file sent."
end if
else
err.raise 1, "getupload", "bad request method."
end if
set getupload = result
end function

function separatefields(binary, boundary)
dim posopenboundary, poscloseboundary, posendofheader, islastboundary
dim fields
boundary = stringtobinary(boundary)
posopenboundary = instrb(binary, boundary)
poscloseboundary = instrb(posopenboundary + lenb(boundary), binary, boundary, 0)
set fields = createobject("scripting.dictionary")
do while (posopenboundary > 0 and poscloseboundary > 0 and not islastboundary)
'header and file/source field data
dim headercontent, fieldcontent
'header fields
dim content_disposition, formfieldname, sourcefilename, content_type
'helping variables
dim field, twocharsafterendboundary
'get end of header
posendofheader = instrb(posopenboundary + len(boundary), binary, stringtobinary(vbcrlf + vbcrlf))
'separates field header
headercontent = midb(binary, posopenboundary + lenb(boundary) + 2, posendofheader - posopenboundary - lenb(boundary) - 2)
'separates field content
fieldcontent = midb(binary, (posendofheader + 4), poscloseboundary - (posendofheader + 4) - 2)
'separates header fields from header

該文章在 2010/7/24 8:28:55 編輯過
關鍵字查詢
相關文章
正在查詢...
點晴ERP是一款針對中小制造業(yè)的專業(yè)生產(chǎn)管理軟件系統(tǒng),系統(tǒng)成熟度和易用性得到了國內(nèi)大量中小企業(yè)的青睞。
點晴PMS碼頭管理系統(tǒng)主要針對港口碼頭集裝箱與散貨日常運作、調度、堆場、車隊、財務費用、相關報表等業(yè)務管理,結合碼頭的業(yè)務特點,圍繞調度、堆場作業(yè)而開發(fā)的。集技術的先進性、管理的有效性于一體,是物流碼頭及其他港口類企業(yè)的高效ERP管理信息系統(tǒng)。
點晴WMS倉儲管理系統(tǒng)提供了貨物產(chǎn)品管理,銷售管理,采購管理,倉儲管理,倉庫管理,保質期管理,貨位管理,庫位管理,生產(chǎn)管理,WMS管理系統(tǒng),標簽打印,條形碼,二維碼管理,批號管理軟件。
點晴免費OA是一款軟件和通用服務都免費,不限功能、不限時間、不限用戶的免費OA協(xié)同辦公管理系統(tǒng)。
Copyright 2010-2025 ClickSun All Rights Reserved

主站蜘蛛池模板: 国产在线是视频有精品 | 麻豆人妻视频一区二区三区 | 天堂av无码大芭蕉伊人 | 国产三级精品三级在线专1 国产三级精品三级在线专 国产三级精品三级在线观看专 | 精品人妻少妇一区二区 | 2025四虎永久在线观看 | 97精品国产自在现线免费观看 | 久久久无码精品一区二区三区 | 在线观看av不卡网站永久 | 亚洲ⅴ国产v天堂a无码二区 | 在线精品无码字幕无码av | 三级电影在线观看 | 欧美黑人性暴力猛交喷水黑人巨大 | 亚洲精品国产第一区二区 | 久久夜色精品国产欧美乱 | 午夜成人理论福利片 | 自拍偷拍一区二区三区四区 | 中出少妇高跟激情视频在线播 | 一区二区精品久久 | 亚洲日本一区二区三区在线观看 | 午夜欧美艳情视频免费看 | 在线精品无码字幕无码av | 韩国日本三级在线观看 | 亚州激情视频 | 内射精品无码中文字幕 | 色综合视频一区二区三区 | 日韩精品系列产品 | 国产日韩欧美精品在线 | 亚洲欧美日韩久久一区二区 | 一本一道色欲综合网中文字幕 | 少妇高潮尖叫黑人激情在线 | 成人乱人乱一区二区三区 | 亚洲av中文无码乱人伦下载 | 2025国产成人综合精品 | 亚洲性人人天天夜夜摸福利 | 久久精品人妻无码一区二区三区盗 | 动漫精品中文字幕制服一区 | 日本精品无码久久久久三级国产 | 97超碰免费人妻中文 | 人妻体内射精一区二区三四 | 99国产精品久久人妻无码 |