|
login()
{
int b;
web_add_cookie(".ASPXANONYMOUS=RNvDxJbPxwEkAAAAZmNiNTAwMDYtOGJlYS00YmE1LWEyNWMtOWMzZGUyMDFhMDNkCv5zPNYbDmOlwUovH-Q1cxItUk81; DOMAIN=localhost");
web_add_cookie("eWebShop1_Cart=5B0BB1B0; DOMAIN=localhost");
web_url("Default.aspx",
"URL=http://localhost/eWebShop/Default.aspx",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t5.inf",
"Mode=HTML",
EXTRARES,
"URL=template/0003/files/mybg.gif", ENDITEM,
"URL=template/0003/files/23.gif", ENDITEM,
"URL=UploadFile/AD/0003_03.gif", ENDITEM,
"URL=template/0003/files/7.gif", ENDITEM,
"URL=template/0003/files/21.gif", ENDITEM,
"URL=template/0003/files/6.gif", ENDITEM,
"URL=UploadFile/Ad/0003_01.gif", ENDITEM,
"URL=UploadFile/Ad/0003_02.gif", ENDITEM,
"URL=template/0003/files/12.gif", ENDITEM,
"URL=template/0003/files/home13.gif", ENDITEM,
"URL=template/0003/files/14.gif", ENDITEM,
LAST);
b = web_reg_find("Text=查看我在网站上的所有订单,包括新订单和以前的老订单都可以查询到。",
"Search=All",
LAST);
lr_start_transaction("登录"); //事务开始
web_submit_form("Default.aspx_2",
"Snapshot=t6.inf",
ITEMDATA,
"Name=username", "Value={username}", ENDITEM,
"Name=userpwd", "Value={passwd}", ENDITEM,
"Name=imageField.x", "Value=57", ENDITEM,
"Name=imageField.y", "Value=9", ENDITEM,
EXTRARES,
"URL=template/0003/files/mybg.gif", "Referer=http://localhost/eWebShop/default.aspx?t=memberhome", ENDITEM,
"URL=template/0003/files/23.gif", "Referer=http://localhost/eWebShop/default.aspx?t=memberhome", ENDITEM,
"URL=UploadFile/AD/0003_03.gif", "Referer=http://localhost/eWebShop/default.aspx?t=memberhome", ENDITEM,
"URL=template/0003/files/6.gif", "Referer=http://localhost/eWebShop/default.aspx?t=memberhome", ENDITEM,
"URL=template/0003/files/7.gif", "Referer=http://localhost/eWebShop/default.aspx?t=memberhome", ENDITEM,
"URL=template/0003/files/21.gif", "Referer=http://localhost/eWebShop/default.aspx?t=memberhome", ENDITEM,
LAST);
if(b ==0)
lr_end_transaction("登录", LR_PASS); //事务结束
else
lr_end_transaction("登录", LR_FAIL); //事务结束
return 0;
} |
|