易截截图软件、单文件、免安装、纯绿色、仅160KB

ASP中十大常用程序代码.:第六节〈我的心得〉

用ASP实现支持附件的EMail系统(1)
  
  大家经常探讨使用asp,而不使用其他组建能否实现文件的上传,从而开发出支持邮件附件的邮件系统,答案是可以的。
  以下是发送邮件的页面,邮件的帐号是员工号,假设是5位的数字,sendmail.asp当然是在合法登陆后才能够看到的
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="/css/FORUM.CSS">
<style type=text/css>
<!--
input { font-size: 9pt; color: #0011dd; background-color: #e9e9f9; padding-top: 0px}
select { font-size: 9pt; color: #0011dd; background-color: #e9e9f9; padding-top: 0px}
textarea { font-size: 9pt; color: #0011dd; background-color: #e9e9f9; padding-top: 0px}
-->
</style>
<title>邮件系统</title></head>
<body bgcolor="#FEF7ED">
<script language="javascript">
<%
if session("myid")="" or len(session("myid"))<>5 then
response.write "window.open('nolog.asp',target='_top');"
end if
%>
function check(theform)
{
if (theform.geterempl.value=='')
{
alert('请输入收件人!');
theform.geterempl.focus();
return false;
}
if (theform.emailtitle.value=='')
{
alert('请输入主题!');
theform.emailtitle.focus();
return false;
}
if (theform.emailtitle.value.length>200)
{
alert('主题请少于200字节');
theform.emailtitle.focus();
return false;
}
if (theform.body.value.length>15*1024)
{
alert('正文请少于16K');
theform.body.focus();
return false;
}
if (theform.emailshowname.value.length>1024)
{
alert('签名请少于1K');
theform.emailshowname.focus();
return false;
}
}
</script>
<%
meth=request.querystring("meth")
if meth=1 then
geterempl=trim(request.querystring("geterempl"))
emailtitle=trim(request.querystring("emailtitle"))
elseif meth=2 then
mailid=trim(request.querystring("mailid"))
set conn=server.createobject("adodb.connection")
conn.open "DSN=;UID=;PWD="
dsnpath="DSN=;UID=;PWD="
set rs=server.createobject("adodb.recordset")
selectnew="select * from t_mail where ((get


相关文档:

ASP VB.NET 下载服务器文件到客户端


      Try
            Dim Path As String = Server.MapPath("~/Download/") '文件路径
            Path = Path & "file.txt" '文件的名称
     ......

ASP验证码代码

将以下代码放到一个单独的页面checkcode.asp
<%
Option Explicit
Response.buffer=true
Call Com_CreatValidCode("validateCode")
Sub Com_CreatValidCode(pSN)
' 禁止缓存
Response.Expires = -9999
Response.AddHeader "Pragma","no-cache"
Response.AddHeader "cache-ctrol","no-cache"
Response.ContentTy ......

ASP中十大常用程序代码.:第一节〈我的心得〉

第一节:注册系统
 
       注册几乎是每个网站都要使用的,去论坛要注册,聊天要注册,几乎无处不注册,所以注册是所有ASP应用程序中最常见的。
                     & ......

ASP中十大常用程序代码.:第二节〈我的心得〉

用ASP制作张扬个性的调查系统(1)
  
  随着网络的普及,网上调查往往能达到较好的效果。在自己的个人站点上放一个趣味问题调查板,着实能为网站添色不少;况且通过调查结果你能更多更准确了解网友对自己站点的看法。作为Webmaster,如果你的网站也需要就某个主题进行调查,而你又讨厌使用别人免费提供的调查 ......

ASP中十大常用程序代码.:第四节〈我的心得〉

用ASP设计网站在线人数统计程序
  
  在浏览网页的时侯,常常可以看见一些“当前网站上的人数是XXX人”的在线人数同计。如何用ASP来做一个呢?首先,分析一下它的做法,一般来说,这些线上人数统计都是指一个时段内的访客人数统计。比如(5分钟内,10分钟内)而这个时间的长短,是由设计者设定 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号