|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
专业性的服务。有的ASP商提供垂直型的应用服务,针对某一特定行业提供应用服务。源代码==================================================================================================
Case"Write"
==================================================================================================
宣布文章
%>
<TABLEalign=centerborder=0cellPadding=7cellSpacing=0width=650>
<TR>
<TDclass=menu>
<P><Ahref="/">飞林庄</A>-><Ahref="<%=ASP_FILE_NAME%>">履历交换</A></P>
<FORMaction="<%=ASP_FILE_NAME%>"id=FORM1method=postname=FORM1>
<INPUTtype=hiddenname=Jobvalue=Add>
账号:<INPUTid=UseridmaxLength=30name=Useridsize=30>
暗码:<INPUTid=Passwordname=Passwordtype=password><BR>
标题:<INPUTid=TitlemaxLength=80name=Titlesize=72><BR>
<TEXTAREAcols=80id=Contentname=Contentrows=20></TEXTAREA><BR>
<INPUTid=Mailmename=Mailmevalue=Yestype=checkboxstyle="BORDER-BOTTOM:#f0f0d0;BORDER-LEFT:#f0f0d0;BORDER-RIGHT:#f0f0d0;BORDER-TOP:#f0f0d0">有复兴时发邮件关照我
<INPUTtype=submitvalue="发表">
<INPUTtype=resetvalue="重写">
</FORM>
</TD>
</TR>
</TABLE>
<%
==================================================================================================
Case"Add","Reply"
==================================================================================================
把文章加进数据库
反省数据
Userid=Trim(Request("Userid"))
Password=Trim(Request("Password"))
Title=Trim(Request("Title"))
Content=RTrim(Request("Content"))
IfRequest("Mailme")="Yes"ThenMailme=1ElseMailme=0
WrongMsg=""
IfUserid=""ThenWrongMsg=WrongMsg+"<DD><LI>请输出你的账号。"
IfPassword=""ThenWrongMsg=WrongMsg+"<DD><LI>请输出你的暗码。"
IfTitle=""ThenWrongMsg=WrongMsg+"<DD><LI>请输出文章标题。"
IfContent=""ThenWrongMsg=WrongMsg+"<DD><LI>请输出内容。"
IfWrongMsg=""Then
Userid=SqlStr(Userid)
Password=SqlStr(Password)
Title=SqlStr(Title)
Content=SqlStr(Content)
审查账号与暗码
SQL="SELECTCOUNT(*)FROMbbsmemberWHERE[账号]="&Userid&"AND[暗码]="&Password&""
RecMember.OpenSQL,Con,1
IfRecMember.Fields(0).Value=0ThenMemberExist=TrueElseMemberExist=False
RecMember.Close
IfMemberExistThen
WrongMsg=WrongMsg+"<DD><LI>用户名不存在大概暗码不合错误。"
Else加进数据库
IfJob="Add"Then
SQL="INSERTINTObbs([作者],[标题],[内容],[邮件关照])VALUES("&_
SqlStr(Userid)&","&_
SqlStr(Title)&","&_
SqlStr(Content)&","&_
Mailme&")"
Else
复兴文章数加一
Con.Execute("UPDATEbbsSET[复兴]=[复兴]+1WHERE[序号]="&Session("BBS_Which"))
邮件关照原作者
SQL="SELECT[标题],[工夫],[邮件关照]FROMbbsWHERE[序号]="&Session("BBS_Which")
RecBBS.OpenSQL,Con,1
IfRecBBS.Fields("邮件关照")Then
FirstTitle=RecBBS.Fields("标题")
WriteTime=RecBBS.Fields("工夫")
获得原作者邮件地点
SQL="SELECT[邮件]FROMbbsmemberWHERE[账号]="&SqlStr(Userid)&""
RecMember.OpenSQL,Con,1
IfNotRecMember.EOFThen
Email=RecMember.Fields("邮件")
IfCheckEmail(Email)Then
收回关照邮件(邮件利用HTML)
邮件内容
EmailContent=""&_
"<HTML><HEAD><TITLE>复兴关照</TITLE></HEAD><BODYstyle=font-size:9pt>"&Chr(13)&_
"<PRE>"&Chr(13)&_
"亲爱的用户:"&Chr(13)&Chr(13)&_
"你于"&WriteTime&"在<Ahref=""http://asp.gbsource.net/asp/bbs/"&ASP_FILE_NAME&""">飞林庄“履历交换”</A>里宣布文章:"&_
FirstTitle&"。"&Chr(13)&Chr(13)&_
"用户"&Userid&"于<U>"&Now()&"</U>复兴你的文章。"&Chr(13)&Chr(13)&Chr(13)&Chr(13)&_
"_____________________________________________________________"&Chr(13)&Chr(13)&_
"复兴以下:"&Chr(13)&Chr(13)&_
</p>asp,jsp,php是web开发的三大技术,asp简单易用且有microsoft做靠山,jsp功能强大是因为有java支持,php则开源跨平台.在国内,asp应用范围最广,jsp发展势头最猛,php则处于劣势.这可能与公司的支持以及技术的培训有关. |
|