// GetMd5FromString 算法略
// dengdagui
Action()
{
char md5_sign[60];
char temp[60];
char *source="register_platform";
char *uid=lr_eval_string("{uid}");
char *real_name=lr_eval_string("{real_name}");
char *cnum=lr_eval_string("{cnum}");
char *secret_key="736799cfa629f3847e669abecad2523d";
sprintf(temp,"%s%s%s%s%s",source,uid,real_name,cnum,secret_key);
GetMd5FromString(temp,md5_sign);
lr_save_string(md5_sign,"sign");
web_reg_find("Search=Body",
"SaveCount=count",
"Text={\"result\":\"failed\"}",
LAST);
web_reg_find("Search=Body",
"SaveCount=count1",
"Text={\"result\":\"succ\"}",
LAST);
web_reg_save_param("error",
"LB=",
"RB=",
"NotFound=ERROR",
"Search=Body",
LAST);
lr_start_transaction("regedit");
web_submit_data("default.aspx",
"Action=",
"Method=POST",
"RecContentType=application/json",
"Mode=HTML",
ITEMDATA,
"Name=source", "Value=register_platform", ENDITEM,
"Name=sign", "Value={sign}", ENDITEM,
"Name=secret_key", "Value=736799cfa629f3847e669abecad2523d", ENDITEM,
"Name=uid", "Value={uid}", ENDITEM,
"Name=ctype", "Value=1", ENDITEM,
"Name=cnum", "Value={cnum}", ENDITEM,
"Name=real_name", "Value={real_name}", ENDITEM,
"Name=stage", "Value={stage}", ENDITEM,
"Name=cip", "Value=127.0.0.1", ENDITEM,
"Name=sass", "Value={sass}", ENDITEM,
LAST );
if (atoi(lr_eval_string("{count}")) > 0||atoi(lr_eval_string("{count1}")) > 0){
lr_end_transaction("regedit", LR_PASS);
}
else{
lr_end_transaction("regedit", LR_FAIL);
lr_error_message("value=%s,source=%s,uid=%s,real_name=%s,cnum=%s",lr_eval_string("{error}"),source,uid,real_name,cnum);
return(0);
}
return 0;
}
阅读(1863) | 评论(0) | 转发(0) |