-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwriteToGameDB.php
More file actions
50 lines (46 loc) · 1.74 KB
/
Copy pathwriteToGameDB.php
File metadata and controls
50 lines (46 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
require_once dirname(__FILE__) . "/include/dbconfig.php";
require_once dirname(__FILE__) . "/inc/connMySQL_pay.php";
if (strtoupper(Pay_Vender)=="ECPAY"){
if (isset($CheckMacValue)) {
if ($CheckMacValue != $_POST['CheckMacValue']) {
echo "0|ERROR";
die();
}
} else {
echo "0|ERROR";
die();
}
}
if (isset($TradeNo)) {
$sql_query1 = " select * from record where TradeNo='" . $TradeNo . "'";
}
if (isset($MerchantTradeNo)) {
$sql_query1 = " select * from record where MerchantTradeNo='" . $MerchantTradeNo . "'";
}
$result = $mysqli2->query($sql_query1);
$row = $result->fetch_array();
$_SESSION["server"] = $row["db_name"];
//新增 ezpay
require dirname(__FILE__) . "/inc/connMySQL.php";
$db_gamemoney = mysqli_real_escape_string($mysqli,$row["gamemoney"]);
$db_loginid = mysqli_real_escape_string($mysqli,$row["loginId"]);
$db_charname = mysqli_real_escape_string($mysqli,$row["char_name"]);
$pay_status = mysqli_real_escape_string($mysqli,$row["pay_status"]);
$sql_query = " INSERT INTO ezpay (ordernumber,amount,payname,state) VALUES (" . time() . " ,$db_gamemoney,'$db_loginid',1)";
$result1 = $mysqli->query($sql_query);
if ($result1 === true) {
//更新 人物 money_count
/* $sql_query = " update characters set money_count = money_count+$db_gamemoney where char_name='$db_charname' ";
$result2 = $mysqli->query($sql_query);
if ($result1 === true) {
//if ($mtrecall) echo "<script>window.close()</script>";
} else {
//if ($mtrecall) echo "<script>alert('失敗') window.close()</script>";
$returnCode = '0|ERROR';
}
*/
} else {
//if ($mtrecall) echo "<script>alert('失敗') window.close()</script>";
$returnCode = '0|ERROR';
}