你好
下列代码中 我想让product_id对应的charge通过下面的加密函数加密之后传到abs.asp,但是结果不是加密传的,而是直接post传的 <?php
switch($product_id){
case '20302000':
$charge = 1800;
break;
case '20301000':
$charge = 1000;
break;
}
$EncodingTxt = calling($product_id,$charge);
echo $EncodingTxt;exit;
function calling($product_id,$charge) {
$EncodingValue = "";
$EncodingValue = "product_id=". $product_id .";charge=". $charge; $EncodingTxt = Encoding($EncodingValue);
return $EncodingTxt;
}
function Encoding($EncodingValue){
$cmd = sprintf("jiami.exe W E \"%s\" ", $EncodingValue);
$EncodingTxt = exec($cmd);
return $EncodingTxt;
}
echo $EncodingTxt;exit;
?>
<html>
<head>
<title>*** </title>
<script type="text/javascript">
function testCount(){
var count1 = document.getElementById("txt_account").value;
var count2 = document.getElementById("txt_raccount").value;
if(count1!=count2){
alert("输入的账号不一致,请重新输入");
}else{
with(document.getElementById("form1")){
method="post";
action="http://***/abs.asp";
submit();
}
}
}
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onLoad="document.requestfrm.telnumber2.focus();SelCountry(document.requestfrm.area);">
<form id="form1">
<table width="374" height="415" border="0" align="center" cellpadding="0" cellspacing="1" style="border:1px solid #000000;"> <tr>
<td width="35%" align="center" height="50" valign="center"> <font size="2.5px" color="#008000">* 充值金额 </font> </td>
<td width="65%" valign="bottom" height="50"> <label>
<input type="radio" name="product_id" id="product_id" value="20302000" checked /> <font size="2.5px">网易一卡通18元100点(18元) </font> </label>
<br />
<label>
<input type="radio" name="product_id" id="product_id" value="20301000" />网易一卡通10元60点 </label>
<br /> <label> </td>
</tr> <tr>
<td width="35%" align="center" height="50"> <font size="2.5px" color="#008000"> * 需要充值的账户 </font> </td>
<td width="65%" align="center" height="50"> <input name="txt_account" id="txt_account" size="25" value="" /> </td>
</tr>
<tr> <td align="center"> <font size="2.5px" color="#008000">* 重复输入账户 </font> </td>
<td align="center"> <input name="txt_raccount" id="txt_raccount" size="25" value="" onpaste='return false' oncontextmenu='return fasle'
onkeypress="return!(event.ctrlKey&&(String.fromCharCode(event.charCode=='v')))"/> </font> </td>
</tr>
<tr>
<td height="50" colspan="2" align="center">
<input type="button" name="sb_next" class="paysubmit" value="发送" onclick='testCount()' /> </td>
<INPUT TYPE="hidden" NAME="request" VALUE=" <? echo($EncodingTxt) ?>">
</tr>
</table> 我想在这个页面上echo $EncodingTxt;exit; 但是没出来什么,因为直接运行本页面就输入账号,然后点击发送按钮的话就到了abs.asp页面,不会停留在当前页面
下列代码中 我想让product_id对应的charge通过下面的加密函数加密之后传到abs.asp,但是结果不是加密传的,而是直接post传的 <?php
switch($product_id){
case '20302000':
$charge = 1800;
break;
case '20301000':
$charge = 1000;
break;
}
$EncodingTxt = calling($product_id,$charge);
echo $EncodingTxt;exit;
function calling($product_id,$charge) {
$EncodingValue = "";
$EncodingValue = "product_id=". $product_id .";charge=". $charge; $EncodingTxt = Encoding($EncodingValue);
return $EncodingTxt;
}
function Encoding($EncodingValue){
$cmd = sprintf("jiami.exe W E \"%s\" ", $EncodingValue);
$EncodingTxt = exec($cmd);
return $EncodingTxt;
}
echo $EncodingTxt;exit;
?>
<html>
<head>
<title>*** </title>
<script type="text/javascript">
function testCount(){
var count1 = document.getElementById("txt_account").value;
var count2 = document.getElementById("txt_raccount").value;
if(count1!=count2){
alert("输入的账号不一致,请重新输入");
}else{
with(document.getElementById("form1")){
method="post";
action="http://***/abs.asp";
submit();
}
}
}
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onLoad="document.requestfrm.telnumber2.focus();SelCountry(document.requestfrm.area);">
<form id="form1">
<table width="374" height="415" border="0" align="center" cellpadding="0" cellspacing="1" style="border:1px solid #000000;"> <tr>
<td width="35%" align="center" height="50" valign="center"> <font size="2.5px" color="#008000">* 充值金额 </font> </td>
<td width="65%" valign="bottom" height="50"> <label>
<input type="radio" name="product_id" id="product_id" value="20302000" checked /> <font size="2.5px">网易一卡通18元100点(18元) </font> </label>
<br />
<label>
<input type="radio" name="product_id" id="product_id" value="20301000" />网易一卡通10元60点 </label>
<br /> <label> </td>
</tr> <tr>
<td width="35%" align="center" height="50"> <font size="2.5px" color="#008000"> * 需要充值的账户 </font> </td>
<td width="65%" align="center" height="50"> <input name="txt_account" id="txt_account" size="25" value="" /> </td>
</tr>
<tr> <td align="center"> <font size="2.5px" color="#008000">* 重复输入账户 </font> </td>
<td align="center"> <input name="txt_raccount" id="txt_raccount" size="25" value="" onpaste='return false' oncontextmenu='return fasle'
onkeypress="return!(event.ctrlKey&&(String.fromCharCode(event.charCode=='v')))"/> </font> </td>
</tr>
<tr>
<td height="50" colspan="2" align="center">
<input type="button" name="sb_next" class="paysubmit" value="发送" onclick='testCount()' /> </td>
<INPUT TYPE="hidden" NAME="request" VALUE=" <? echo($EncodingTxt) ?>">
</tr>
</table> 我想在这个页面上echo $EncodingTxt;exit; 但是没出来什么,因为直接运行本页面就输入账号,然后点击发送按钮的话就到了abs.asp页面,不会停留在当前页面
<input type="radio" name="product_id" id="product_id" value="20302000" checked /> <font size="2.5px">网易一卡通18元100点(18元) </font> </label>
<br />
<label>
<input type="radio" name="product_id" id="product_id" value="20301000" />网易一卡通10元60点 </label> 这里的product_id与最上面的switch($product_id){ 这里的 product_id 是否是表示一个,因为我要的是将 name="product_id" id="product_id 这个与$product_id是一样的,这样就能实现switch语句了