<!--index.htm
-----------------
-------------------------------------------------- ------------>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
" http://www.w3.org/TR/html4/loose.dtd ">
<html>
<tête>
<title>Document sans titre</title>
<méta http-equiv="Content-Type" content="text/html; charset=gb2312">
</tête>
<corps>
<table width="770" border="0" align="center" cellpadding="0" cellpacing="0">
<tr>
<td><form name="form1" method="post" action="send.asp">
<table width="100%" border="0" cellpadding="0" Cellpacing="0" bgcolor="#CCFFFF">
<tr>
<td height="20"><div align="center">发送消息</div></td>
</tr>
<tr>
<td><div align="center">
<textarea name="msg" cols="100" rows="6"></textarea>
</div></td>
</tr>
<tr>
<td><div align="center">
<input type="submit" name="Soumettre" value="Soumettre">
<input type="reset" name="Submit2" value="Reset">
</div></td>
</tr>
</table>
</form></td>
</tr>
</table>
</corps>
</html>
'//envoyer.asp
<%
function chan_time(shijian)'转换日期时间函数
s_year=année(shijian)
si len(s_year)=2 alors s_year="20"&s_year
s_mois = mois (shijian)
si s_mois <10 alors s_mois="0"&s_mois
s_day=jour(shijian)
si s_day<10 alors s_day="0"&s_day
s_hour=heure(shijian)
si s_hour<10 alors s_hour="0"&s_hour
s_minute=minute(shijian)
si s_minute<10 alors s_minute="0"&s_minute
chan_time=s_year & s_month & s_day & s_hour & s_minute
fonction de fin
fonction chan_data(shijian) '转换日期时间函数
s_year=année(shijian)
si len(s_year)=2 alors s_year="20"&s_year
s_mois = mois (shijian)
si s_mois <10 alors s_mois="0"&s_mois
s_day=jour(shijian)
si s_day<10 alors s_day="0"&s_day
chan_data=s_year & s_month & s_day
fonction de fin de fonction
chan_file(shijian)'转换日期时间函数
s_mois = mois (shijian)
si s_mois <10 alors s_mois="0"&s_mois
s_day=jour(shijian)
si s_day<10 alors s_day="0"&s_day
s_hour=heure(shijian)
si s_hour<10 alors s_hour="0"&s_hour
s_minute=minute(shijian)
si s_minute<10 alors s_minute="0"&s_minute
s_ss=seconde (shijian)
si s_ss<10 alors s_ss="0"&s_ss
chan_file = s_mois & s_day & s_hour & s_minute & s_ss
fonction de fin
top="<html><head><title>actualités</title></head><body>"
bas="</body></html>"
msg=request.Form("msg")
msg=remplacer(msg,vbcrlf,"")
msg=remplacer(msg,chr(9),"")
msg=remplacer(msg," "," ")
msg=remplacer(msg,"rn","<br>")
msg=remplacer(msg,"n","<br>")
msg=haut&msg&bas
Définir fs=Server.CreateObject("Scripting.FileSystemObject")
all_tree2=server.mappath("news")&""&chan_data(maintenant)
if (fs.FolderExists(all_tree2)) then'
autre
fs.CreateFolder(all_tree2)
finir si
pass=chan_file (maintenant)
randomiser '使用系统计时器来初始化乱数产生器
passe=rnd(passe)
passe=get_pass(passe)
pass=gauche(pass,10)
fichier1=pass
fichiers=fichier1&".txt"
filez=all_tree2&""&files
set ts = fs.createtextfile(filez,true) '写文件
pour z=1 à len(msg)
write_now=mid(msg,z,1)
ts.write(write_now)
suivant
'ts.writeline(all_msg)
ts.fermer
set ts=nothing '文件生成
if err.number<>0 ou err then%>
<langage de script="javascript">
alert("不能完成")
</script>
<%else%>
<langage de script="javascript">
alert("已完成")
histoire.back();
</script>
<%fin si
Définir MyFile = fs.GetFile(filez)
all_tree2=server.mappath("news")&""&chan_data(maintenant)
si (fs.FolderExists(all_tree2)) alors
autre
fs.CreateFolder(all_tree2)
finir si
MonFichier.nom= left(MonFichier.nom,len(MonFichier.nom)-4)&".htm"
définir MyFile = rien
définir fs = rien
définir fdir = rien
fonction get_pass(pass)
pass=cstr(pass)
pass=remplacer(pass," ","")
pass=remplacer(pass," ","")
passer=remplacer(passer,"-","")
pass=remplacer(pass," ","")
pass=remplacer(pass,":","")
pass=remplacer(pass,".","")
passer=remplacer(passer,"+","")
pass=remplacer(pass,"_","")
pass=remplacer(pass,"<","")
pass=remplacer(pass,">","")
passer=remplacer(passer,"!","")
pass=remplacer(pass,"@","")
pass=remplacer(pass,"#","")
pass=remplacer(pass,"$","")
pass=remplacer(pass,"%","")
pass=remplacer(pass,"^","")
passer=remplacer(passer,"&","")
pass=remplacer(pass,"*","")
pass=remplacer(passer,"(","")
passer=remplacer(passer,")","")
passer=remplacer(passer,"=","")
pass=remplacer(pass,"","")
pass=remplacer(pass,"/","")
passer=remplacer(passer,"|","")
get_pass=passer
la fonction de fin
%>
'//
把send.asp et index.htm 放到你的ASP目录下,然后再建一个news文件夹。打开浏览器,在地址栏里输入:http://你的机器名/你的ASP虚拟目录OK !且是以当前日期命名的。里面有你刚刚提交的Il s'agit d'une version HTML.