当前位置:首页 > 代码 > 正文

asp超市代码(asp代码审计)

admin 发布:2022-12-19 12:56 123


今天给各位分享asp超市代码的知识,其中也会对asp代码审计进行解释,如果能碰巧解决你现在面临的问题,别忘了关注本站,现在开始吧!

本文目录一览:

求ASP代码?

1.

%

a=request("num")

if a mod 2=0 then

response.write "偶数"

else

response.write "奇数"

end if

%

2.

%

a=request("价钱")

if a100 then a=a+(a-100)*0.8

if a50 and a=100 then a=a* 0.9

response.write a

%

3.

%

if day(now)=25 then response.write "明天可能有病毒发作"

%

4.有点复杂

用到application 具体的可网上查下 很简单的 总访问人数用个fso可以实现了

5.你看下globa.asa说明

asp 购物车代码问题

tdinput type="button" onclick="javascript:document.form1.action='update.asp?rowcount=%=i%pid=%=rs(1)%pcount=%=rs(3)%';document.form1.submit();"value="确认修改"/td

改为

tdinput type="button" onclick="javascript:document.form1.action='update.asp?id=%=rs("Id")%rowcount=%=i%';document.form1.submit();"value="确认修改"/td

%

'这里需要注意在上个页面,有个i值,在这里就用到了,你要指明修改的是哪一行记录

......

response.redirect("mycar.asp")'执行完之后重新跳转到mycar.asp

%

改为

%

'只需商品id和修改后的数量值

dim id

id=request.querystring("id")

pcount=request.querystring("pcount")

sql="update buy set pcount ='"pcount"' where Id="id

conn.execute sql

conn.close

set conn=nothing

response.redirect("mycar.asp")'执行完之后重新跳转到mycar.asp

%

做了个asp.net C#应用程序里不知打印小票,或打印单据?谁有超市收银系统打印小票的代码呢?教下我啊谢谢

好像不行呀

页面输出 还是要选择打印机

他的功能不需要选择打印机

代码里需要用指令打印

超市里的用的都是指令打印,你查看小票机的指令集 、

再调用就可以了

前两天我回复给一个网友了 你找一下吧

谁有简单点的asp购物车的代码呀?谢谢拉!

%@ LANGUAGE="VBSCRIPT" %

!--#include file="util.asp" --

!--#include file="conn.asp" --

%

ProductList = Session("ProductList")

Products = Split(Request("cpbm"), ", ")

For I=0 To UBound(Products)

PutToShopBag Products(I), ProductList

Next

Session("ProductList") = ProductList

Head="以下是您所选购的物品清单"

ProductList = Session("ProductList")

If Len(ProductList) =0 Then

Response.Redirect "nothing.asp"

response.end

end if

If Request("MySelf") = "Yes" Then

ProductList = ""

Products = Split(Request("cpbm"), ", ")

For I=0 To UBound(Products)

PutToShopBag Products(I), ProductList

Next

Session("ProductList") = ProductList

End If

If Len(ProductList) = 0 Then

Response.Redirect "nothing.asp"

response.end

end if

set rs=server.createobject("adodb.recordset")

sql = "Select * From Product"

sql = sql " Where Product_Id In (" ProductList ")"

rs.open sql,conn,3,3

%

html

head

meta http-equiv="Content-Type" content="text/html; charset=gb2312"

title以下是您所选购的物品清单/title

href="style.css"

link rel="stylesheet" type="text/css" href="style.css"

/head

script language="Javascript"

//函数名:fucCheckNUM

//功能介绍:检查是否为数字

//参数说明:要检查的数字

//返回值:1为是数字,0为不是数字

function fucCheckNUM(NUM)

{

var i,j,strTemp;

strTemp="0123456789";

if ( NUM.length== 0)

return 0

for (i=0;iNUM.length;i++)

{

j=strTemp.indexOf(NUM.charAt(i));

if (j==-1)

{

//说明有字符不是数字

return 0;

}

}

//说明是数字

return 1;

}

function clean()

{

window.location.href="clear.asp"

}

/script

SCRIPT language=javascript id=clientEventHandlersJS

!--

function form1_onsubmit()

{

newprice="Q_" rs("Product_Id")

if ((fucCheckNUM(document.FORM1.newprice.value)==0) )

{ alert ("会员价有非法字符,请填写正确会员价。");

document.FORM1.newprice.focus();

return false;

}

//--

}

/SCRIPT

body topmargin="5"

center

div align="center"

center

table width="80%" border="0" cellspacing="0"

tr

td width="80%" valign="top"p align="center"

/p

p align="center"

font color="#FF0000" %=Head%/font/p

!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --script Language="JavaScript"!--

function FrontPage_Form1_Validator(theForm)

{

var checkOK = "0123456789-";

var checkStr = theForm.%="Q_" rs("Product_Id")%.value;

var allValid = true;

var decPoints = 0;

var allNum = "";

for (i = 0; i checkStr.length; i++)

{

ch = checkStr.charAt(i);

for (j = 0; j checkOK.length; j++)

if (ch == checkOK.charAt(j))

break;

if (j == checkOK.length)

{

allValid = false;

break;

}

allNum += ch;

}

if (!allValid)

{

alert("在 请输入正确的商品数量! 域中,只能输入 数字 个字符。");

theForm.%="Q_" rs("Product_Id")%.focus();

return (false);

}

return (true);

}

//--/script!--webbot BOT="GeneratedScript" endspan --form Action="eshop.asp" Method="POST" onsubmit="return FrontPage_Form1_Validator(this)" name="FrontPage_Form1"

input type="hidden" name="MySelf" value="Yes"

div align="center"center

table border="0" cellspacing="1" width="550" class=main bgcolor="#000000"

tr bgcolor="#006699"

td align="center" width="82" height="22" bgcolor="#006699"font color="#EEEEEE"商品编号/font/td

td align="center" width="170" height="22" bgcolor="#006699"font color="#EEEEEE"商品名称/font/td

td align="center" width="76" height="22" bgcolor="#006699"font color="#EEEEEE"商品价格/font/td

td align="center" width="76" height="22" bgcolor="#006699"font color="#EEEEEE"商品数量/font/td

td align="center" width="60" height="22" bgcolor="#006699"font color="#EEEEEE"购买/font/td

td align="center" width="72" height="22" bgcolor="#006699"font color="#EEEEEE"总价/font/td

/tr

%

Sum = 0

While Not rs.EOF

Quatity = CInt( Request( "Q_" rs("Product_Id")) )

If Quatity = 0 Then

Quatity = CInt( Session(rs("Product_Id")) )

If Quatity = 0 Then Quatity = 1

End If

Session(rs("Product_Id")) = Quatity

Sum = Sum + ccur(rs("P_NewPrice")) * Quatity

%

tr

td align="center" width="82" bgcolor="#EEEEEE"%=rs("Product_ID")%

/td

td align="center" width="170" bgcolor="#EEEEEE"%=rs("Product_Name")%

/td

td align="center" width="76" bgcolor="#EEEEEE"%=rs("P_NewPrice")%

/td

td align="center" width="76" bgcolor="#EEEEEE"!--webbot

bot="Validation" S-Display-Name="请输入正确的商品数量!"

S-Data-Type="Integer" S-Number-Separators="x" --input Name="%="Q_" rs("Product_Id")%" Value="%=Quatity%" Size="3"/td

td Align="center" width="60" bgcolor="#EEEEEE"input Type="CheckBox" Name="cpbm" Value="%=rs("Product_Id")%" Checked

/td

td Align="center" width="72" bgcolor="#EEEEEE"%=ccur(rs("P_NewPrice"))*Quatity%.00元

/td

/tr

%

rs.MoveNext

Wend

%

asp超市代码的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于asp代码审计、asp超市代码的信息别忘了在本站进行查找喔。

版权说明:如非注明,本站文章均为 AH站长 原创,转载请注明出处和附带本文链接;

本文地址:http://www.ahzz.com.cn/post/8441.html


取消回复欢迎 发表评论:

分享到

温馨提示

下载成功了么?或者链接失效了?

联系我们反馈

立即下载