PDA

View Full Version : [TLBB] Code đổi bạc tại sao bí lỗi ai biết (PHP) vào cứu tớ với



TS2GVN
05-11-15, 02:29 PM
Nó báo Giao dịch bất hợp pháp


<?php
//isLogIn();

if($_SERVER['REQUEST_METHOD'] == 'POST' && $_SERVER['<b><font color=red>[Chỉ có thành viên mới xem link được. <a href="register.php"> Nhấp đây để đăng ký thành viên......</a>]</font></b>']) {
$message = $dom = NULL;
$ip = getUserIp();
$date = dbDateTime(); // Thời gian để ghi vào DB
$time = displayDateTime(); // Thời gian để ghi vào File
$una = $_SESSION['una']; // User Name
$cap = trim($_POST['captcha']); // Captcha
$charId = checkValidInt(VTDecode($_POST['idChar']));
$amount = checkValidInt(VTDecode($_POST['num']));
if ($cap == $_SESSION['captcha'] && $charId && $amount ){
$oAc = $oChar = new oAccount();
if ($amount > $oAc->getUserInfo('point') || $oAc->getUserInfo('score') == 0 ){
//$message = "Giao dịch bất hợp pháp"; $dom = "notify_error";
} elseif ( !$oAc->costPoint($amount) ) {
$message = "Giao dịch thất bại"; $dom = "notify_error";
} else {
$oAc->insert('exchange',array($una,$charId,$amount,$date ),array('user','charguid','amount','time'));
unset($oAc);
$oChar = new oChar();
if (!$charInfo = $oChar->checkCharExist($charId)){
$message = "Nhân vật này không tồn tại"; $dom = "notify_error";
} else {
//$exchange = $oChar->setMenpaiPoint($charId, $charInfo['menpaipoint'] + $amount); // Điểm môn phái
$exchange = $oChar->setZengdian($charId, $charInfo['zengdian'] + $amount); // Điểm tặng
if ($exchange){
$message = "Quy đổi thành công! Nhận được {$amount} điểm tặng."; $dom = "notify_success";
$array = "Tài khoản: ".$una.", Nhân vật: ".$charId.", Số lượng: ".$amount.",Thời gian: ".$time.", IP: ".$ip ;
logFile("doi_bac_ok.log", $array);
} else {
$message = "Quy đổi thất bại!"; $dom = "notify_error";
$array = "Tài khoản: ".$una.", Nhân vật: ".$charId.", Số lượng: ".$amount.",Thời gian: ".$time.", IP: ".$ip ;
logFile("doi_bac_error.log", $array);
}
}
}


} else {
$message = "Mã xác nhận không đúng!"; $dom = "notify_warning";
}
}

?>


<!--Content-->
<div id="content_wrapper">
<div id="main_content" class="main_content">
<div id="content_main" >
<span>Đổi Bạc</span><div style="clear:both"></div>

<span class="<?php echo isset($dom) ? $dom : "notify_info"; ?>" ><?php echo isset($message) ? $message : "Vui lòng thoát Game 2 phút trước khi thao tác"; ?></span><div style="clear:both"></div>

<form id="formID" name="formID" action="" method="post" onsubmit="return checkInput();">

<table id="paymentTable" style="width: 100%; height: auto; padding: 10px 0 0 0;" cellspacing="0" cellpadding="0">
<tr><td colspan="3"></span></td></tr>
<!-- Chọn nhân vật -->
<tr>
<td class="l">► Chọn nhân vật</td>
<td >
<SELECT NAME="idChar" id="idChar" class="validate[required] option-field">
<OPTION VALUE="">Vui lòng chọn</OPTION>
<?php
//$charList = getCharList();
$oChar = new oChar();
$charList = $oChar->getCharList();
if ($charList){
foreach ($charList as $char) {
echo "<OPTION VALUE='".VTEncode($char['charguid'])."'";
echo ">Tên: ".$char['charname']." - Cấp:".$char['level']."</OPTION>";
}
}

?>
</SELECT>
<div class="clearboth"></div>
</td>
</tr>
<!-- Số lượng quy đổi -->
<tr>
<td class="l">► Số lượng đổi</td>
<td >
<SELECT NAME="num" id="num" class="validate[required] option-field" data-prompt-position="bottomRight:-70,3">
<OPTION VALUE="">0</OPTION>
<?php
$oAc = $oChar = new oAccount();
$p = $oAc->getUserInfo('point');
if ($p >= 10000){
for ($i=10000;$i<=$p && $i <= 200000;$i+=10000){
$n = $i/10000 ;
if ($n==1 || $n==2 || $n==6 || $n==12 || $n==20 )
echo "<option value='".VTEncode($i)."'>".$i." Bạc</option>";
}
}
?>
</SELECT>
<div class="clearboth"></div>
</td>
</tr>

<!-- Mã xác nhận -->
<tr><td colspan="3" ><span class="captcha_tit"></span></td></tr>

<tr>
<td class="l"></td>
<td class="captcha">
<img src="captcha.php" title="" alt="" />
<div class="clearboth"></div>
</td>
</tr>

<tr>
<td class="l"></td>
<td class="captcha">
<input id="captcha" name="captcha" type="text" class="validate[required,custom[onlyLetterNumber,minSize[6],maxSize[6] ] ] text-field" maxlength="6" placeholder="✩ Gồm 6 ký tự" autocomplete="off" data-prompt-position="bottomRight:-70,3" />
<div class="clearboth"></div>
</td>
</tr>


<tr><td colspan="3" style="padding: 10px 0px;"><hr></td></tr>

<tr>
<td colspan="3" width="100%" style="padding: 10px 0px;">
<input class="sub" type="submit" value="Đổi Bạc" id="submit" name="submit" />
<input class="dec" type="reset" name="reset" value="Nhập lại" />
</td>
</tr>

</table>
</form>

</div>

<?php include('modules/module-sider-login.php');?>
</div><!--END Content-->
</div>

thoigian07
06-11-15, 03:08 PM
Nó báo Giao dịch bất hợp pháp


<?php
//isLogIn();

if($_SERVER['REQUEST_METHOD'] == 'POST' && $_SERVER['<b><font color=red>[Chỉ có thành viên mới xem link được. <a href="register.php"> Nhấp đây để đăng ký thành viên......</a>]</font></b>']) {
$message = $dom = NULL;
$ip = getUserIp();
$date = dbDateTime(); // Thời gian để ghi vào DB
$time = displayDateTime(); // Thời gian để ghi vào File
$una = $_SESSION['una']; // User Name
$cap = trim($_POST['captcha']); // Captcha
$charId = checkValidInt(VTDecode($_POST['idChar']));
$amount = checkValidInt(VTDecode($_POST['num']));
if ($cap == $_SESSION['captcha'] && $charId && $amount ){
$oAc = $oChar = new oAccount();
if ($amount > $oAc->getUserInfo('point') || $oAc->getUserInfo('score') == 0 ){
//$message = "Giao dịch bất hợp pháp"; $dom = "notify_error";
} elseif ( !$oAc->costPoint($amount) ) {
$message = "Giao dịch thất bại"; $dom = "notify_error";
} else {
$oAc->insert('exchange',array($una,$charId,$amount,$date ),array('user','charguid','amount','time'));
unset($oAc);
$oChar = new oChar();
if (!$charInfo = $oChar->checkCharExist($charId)){
$message = "Nhân vật này không tồn tại"; $dom = "notify_error";
} else {
//$exchange = $oChar->setMenpaiPoint($charId, $charInfo['menpaipoint'] + $amount); // Điểm môn phái
$exchange = $oChar->setZengdian($charId, $charInfo['zengdian'] + $amount); // Điểm tặng
if ($exchange){
$message = "Quy đổi thành công! Nhận được {$amount} điểm tặng."; $dom = "notify_success";
$array = "Tài khoản: ".$una.", Nhân vật: ".$charId.", Số lượng: ".$amount.",Thời gian: ".$time.", IP: ".$ip ;
logFile("doi_bac_ok.log", $array);
} else {
$message = "Quy đổi thất bại!"; $dom = "notify_error";
$array = "Tài khoản: ".$una.", Nhân vật: ".$charId.", Số lượng: ".$amount.",Thời gian: ".$time.", IP: ".$ip ;
logFile("doi_bac_error.log", $array);
}
}
}


} else {
$message = "Mã xác nhận không đúng!"; $dom = "notify_warning";
}
}

?>


<!--Content-->
<div id="content_wrapper">
<div id="main_content" class="main_content">
<div id="content_main" >
<span>Đổi Bạc</span><div style="clear:both"></div>

<span class="<?php echo isset($dom) ? $dom : "notify_info"; ?>" ><?php echo isset($message) ? $message : "Vui lòng thoát Game 2 phút trước khi thao tác"; ?></span><div style="clear:both"></div>

<form id="formID" name="formID" action="" method="post" onsubmit="return checkInput();">

<table id="paymentTable" style="width: 100%; height: auto; padding: 10px 0 0 0;" cellspacing="0" cellpadding="0">
<tr><td colspan="3"></span></td></tr>
<!-- Chọn nhân vật -->
<tr>
<td class="l">► Chọn nhân vật</td>
<td >
<SELECT NAME="idChar" id="idChar" class="validate[required] option-field">
<OPTION VALUE="">Vui lòng chọn</OPTION>
<?php
//$charList = getCharList();
$oChar = new oChar();
$charList = $oChar->getCharList();
if ($charList){
foreach ($charList as $char) {
echo "<OPTION VALUE='".VTEncode($char['charguid'])."'";
echo ">Tên: ".$char['charname']." - Cấp:".$char['level']."</OPTION>";
}
}

?>
</SELECT>
<div class="clearboth"></div>
</td>
</tr>
<!-- Số lượng quy đổi -->
<tr>
<td class="l">► Số lượng đổi</td>
<td >
<SELECT NAME="num" id="num" class="validate[required] option-field" data-prompt-position="bottomRight:-70,3">
<OPTION VALUE="">0</OPTION>
<?php
$oAc = $oChar = new oAccount();
$p = $oAc->getUserInfo('point');
if ($p >= 10000){
for ($i=10000;$i<=$p && $i <= 200000;$i+=10000){
$n = $i/10000 ;
if ($n==1 || $n==2 || $n==6 || $n==12 || $n==20 )
echo "<option value='".VTEncode($i)."'>".$i." Bạc</option>";
}
}
?>
</SELECT>
<div class="clearboth"></div>
</td>
</tr>

<!-- Mã xác nhận -->
<tr><td colspan="3" ><span class="captcha_tit"></span></td></tr>

<tr>
<td class="l"></td>
<td class="captcha">
<img src="captcha.php" title="" alt="" />
<div class="clearboth"></div>
</td>
</tr>

<tr>
<td class="l"></td>
<td class="captcha">
<input id="captcha" name="captcha" type="text" class="validate[required,custom[onlyLetterNumber,minSize[6],maxSize[6] ] ] text-field" maxlength="6" placeholder="✩ Gồm 6 ký tự" autocomplete="off" data-prompt-position="bottomRight:-70,3" />
<div class="clearboth"></div>
</td>
</tr>


<tr><td colspan="3" style="padding: 10px 0px;"><hr></td></tr>

<tr>
<td colspan="3" width="100%" style="padding: 10px 0px;">
<input class="sub" type="submit" value="Đổi Bạc" id="submit" name="submit" />
<input class="dec" type="reset" name="reset" value="Nhập lại" />
</td>
</tr>

</table>
</form>

</div>

<?php include('modules/module-sider-login.php');?>
</div><!--END Content-->
</div>



bạn vào database cột "score" cho giá tri vào ,ko được để tróng

s2bac95
06-11-15, 09:29 PM
SCORE và POINT ở db web phải hợp lệ