<?php //Show all error, remove it once you finished you code. ini_set('display_errors', 1); $mysecretteststring = "my secret password"; include_once 'config/config.php'; //Include TrueWallet class. include_once('config/TrueWallet.php'); $con = new mysqli($servername,$server_user,$server_password,$mysql_dbname); $wallet = new TrueWallet(); //Login with your username and password. $username = $tw_email; $password = $tw_pass; ////////////// $t_id = $_POST['tw_id']; $nick = $_POST['nick']; ////////////// //Logout incase your previous session still exist, no need if you only use 1 user. $wallet->logout(); //Login into TrueWallet if($wallet->login($username,$password)){ if($transaction = $wallet->get_transactions()){ $sql_r = "SELECT * FROM history_wallet WHERE report='$t_id'"; $res_r = mysqli_query($con, $sql_r); if (mysqli_num_rows($res_r) > 0) { echo "<img src='img/truewallet/Sign-Error-icon.png' width='90' height='90'><br>"; echo "<font size='4'>ขออภัยรหัสอ้างถูกใช้งานไปแล้ว</font>"; } else { for ($i=1; $i <= 10; $i++) { //จำนวนที่ดึกมาเช็ค $report = $wallet->get_report($transaction[$i]->reportID); $ref_t = $report->section4->column2->cell1->value; $money = $report->section3->column1->cell1->value; if ($ref_t === $t_id) { echo "ทำรายการสำเร็จ"; break; } else { echo "รหัสอ้างอิงผิด"; break; } } } } //Logout $wallet->logout(); }else{ echo 'Login Failed!'; } ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง