action=FormatSQL(SafeRequest("action",0))?什么意思?

dinner1984 2004-11-29 09:13:41
最近在学购物车程序,这里是注册reg.asp里面的一条语句。
但是,我不能够理解formatsql是什么意思?请指教,谢谢!
其中saferequest()是一个函数


...全文
150 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
hhjjhjhj 2004-11-29
  • 打赏
  • 举报
回复
应该也是一个函数
<!--#include file="conn.asp"--> <!--#include file="config.asp"--> <!--#include file="include/header.asp"--> <title><%=webname%>--新闻快讯</title> <% Dim Intcatid,strOrder,strcat,strcategory Intcatid = 0 Intcatid=SafeRequest("catid",1) strcat = "<a href=chknews.asp><FONT COLOR="&bgclr4&">综合新闻</font></a>" set rs=server.CreateObject("adodb.recordset") If Intcatid <> 0 Then rs.open "select category from category where categoryid="&Intcatid&" ",conn,1,1 strcategory = trim(rs("category")) rs.close strcat = strcat &"-><a href=chknews.asp?catid="&Intcatid&" target=_blank>"& strcategory &"</a> " Else End If %> <TABLE WIDTH="780" BORDER="0" CELLSPACING="0" CELLPADDING="0" class=table-zuoyou align="center" BGCOLOR=<%=bgclr2%> background="<% = webimg16 %>"> <TR><TD HEIGHT="30" bgcolor="<% = bgclr1 %>" width="75" class=table-xia><FONT color="#ffffff">&nbsp;<b><FONT COLOR=<%=bgclr4%>>您的位置:</b></FONT></TD> <td class=table-xia>&nbsp;<a href="index.asp"><FONT COLOR=<%=bgclr4%>><%=webname%></font></a><font color="#ffffff">-&gt;</font><a href="chknews.asp"><FONT COLOR=<%=bgclr4%>><% = strcat %></font></a></td></TR></table> <% Const MaxPerPage=20 dim totalPut dim CurrentPage dim TotalPages dim j dim sql if Not isempty(SafeRequest("page",1)) then currentPage=Cint(SafeRequest("page",1)) else currentPage=1 end if If Intcatid = 0 Then rs.open "select newsid,newsname,newscontent,addname,adddate from news Order By adddate desc",conn,1,1 Else rs.open "select newsid,newsname,newscontent,addname,adddate from news Where categoryid = "& Intcatid &" Order By adddate desc ",conn,1,1 End If if rs.eof And rs.bof then Response.Write "<p align='center' class='contents'> 您还没有添加新闻!</p>" else totalPut=rs.recordcount if currentpage<1 then currentpage=1 end if if (currentpage-1)*MaxPerPage>totalput then if (totalPut mod MaxPer

28,408

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧