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
相关文档:
网页制作中,为了方便日后修改或协作开发,常常要对页面进行相应的注释,你网页结构清晰,可读性增强。以下介绍几种常用的注释方法:
一、HTML的注释方法
<!-- html注释:START -->
内容
<!-- html注释:END -->
二、CSS的注释方法
<style type="text/css">
/* css注释*/
</style>
在单独 ......
用ASP制作张扬个性的调查系统(1)
随着网络的普及,网上调查往往能达到较好的效果。在自己的个人站点上放一个趣味问题调查板,着实能为网站添色不少;况且通过调查结果你能更多更准确了解网友对自己站点的看法。作为Webmaster,如果你的网站也需要就某个主题进行调查,而你又讨厌使用别人免费提供的调查 ......
利用ASP打造网站论坛DIY(3)
2、构建文章显示模块
前面说过,一片具体的文章是分属在看板和主体之下的。因此显示文章也要经过看板列表和主体列表这两页面后,才能得到特定主题下文章的列表。
(1)板列表的显示页面:
< html>
< head>
< title>看板列表< /title>
< meta htt ......