ПРОБЛЕМА Не приходят отчисления админу

frigiec

Участник
Доброго времени суток товарищи. Проблема в том что вся сумма которую поплняет пользователь на сайте уходит напрямую на payeer кошелёк сайта.А вот админу прописанные в скрипте 10% не начисляются. Может кто силён в коде помогите пожалуйста.
Не знаю в каком точно файле искать ошибку.
PHP:
<?php
include('../conf.php');
include('../head.php');
if(!USER_LOGGED) { header ("Location: /login"); exit; }
?>
<!doctype html>
<html>
<head>
<title>Мои вклады</title>
<meta charset="utf-8">
<meta name="keywords" content="вклады" />
<meta name="description" content="Мои вклады" />
<link rel="shortcut icon" href="../images/favicon.ico">
<?php include('../conf_styles.php'); ?>
</head>
<body>
<?php include('../conf_navbar.php'); include('conf_menu.php'); ?>

<div class="container">
<div class="one_full">
<center>


<h2>Сделать вклад</h2>
На Вашем балансе: <?php echo $bal['bal']; ?> руб.<br /><br />
<input type="text" id="sum" value="<?php if ($bal['bal'] >= 50 && $bal['bal'] <= 15000) { echo floor($bal['bal']); } if ($bal['bal'] < 50) { echo '50'; } if ($bal['bal'] > 15000) { echo '15000'; } ?>" placeholder="Сумма вклада" style="padding-left:5px" />
<br /><br />
<a><input id="submit" type="submit" style="border: 1px solid #4682B4; min-width:181px; background:#4682B4;color: #fff;cursor:pointer" value="Вложить" class="input" /></a><br /><br />
Вы получите <font id="prib2"></font> руб. (+<font id="profit"></font>%)<br />
Минимальная сумма вклада - 50 рублей.
<div id="res1dfr78"></div>
<div class="ptable four">
<div class="row main">
<div class="date" style="width:100px;"></div>
<div class="date" style="width:200px;">Дата вклада</div>
<div class="date" style="width:200px;">Сумма вклада / %</div>
<div class="tarif" style="width:200px;">К зачислению</div>
<div class="stat" style="width:250px;">Статус</div>
</div>
<?php
$sd = "SELECT id,sum,sume,proc,st,dt FROM `t_dep` WHERE usr = '$u_id' ORDER BY id DESC";
$qd = mysqli_query($connect_db, $sd);
$hd = mysqli_num_rows($qd);
if ($hd > 0) {
while($row = mysqli_fetch_array($qd)) {
?>
<div class="row"><div class="date" style="width:100px;"></div>
<div class="date" style="width:200px;"><?php echo date("d.m.y H:i",$row['dt']); ?></div>
<div class="date" style="width:200px;"><?php echo $row["sum"]; ?> / <?php echo $row["proc"]; ?>%</div>
<div class="tarif" style="width:200px;"><?php echo $row["sume"]; ?></div>
<div class="stat" style="width:250px;"><?php if ($row["st"] == 0) { $cou = mysqli_fetch_assoc(mysqli_query($connect_db, "SELECT count(*) AS `c` FROM `t_dep` WHERE st = '0' AND id < '$row[id]'")); $coue = $cou['c']; echo 'Ожидание (Перед вами '.$coue.' чел.)'; } else { echo '<font color="green">Принято</font>'; } ?></div></div>
<?php } } else { echo '<div class="row"><div class="nachi" style="width:100%;">Нет вложений</div></div>'; } ?>
</center>
</div>
</div>
</div>
</div>

<?php include('../conf_footer.php'); ?>
<script type="text/javascript">
$(document).ready(function () {
$('#sum').keyup(function() {
var $th = $(this);
$th.val( $th.val().replace(/[^0-9\.]/g, function(){ return ''; }) );
});
});
$(document).ready(function(){
"use strict";
var sums = parseInt($("#sum").val()),
plans = [];
plans[plans.length] = {
"min": 50,
"max": 1999,
"percent": 25,
};
plans[plans.length] = {
"min": 2000,           
"max": 15000,
"percent": 35,
};
$("#prib2").html(0);
for(var i = 0; i < plans.length; i+=1) {
if (sums >= plans[i].min && sums <= plans[i].max) {
var stprib2 = (sums / 100 * plans[i].percent) + sums;
var sprib2 = stprib2.toFixed(2);
$("#prib2").html(sprib2);
$("#profit").html(plans[i].percent);
}
}
});
$(document).ready(function(){
"use strict";
$('#sum').keyup(function () {
var sume = parseInt($("#sum").val()),
plans = [];
plans[plans.length] = {
"min": 50,
"max": 1999,
"percent": 25,
};
plans[plans.length] = {
"min": 2000,           
"max": 15000,
"percent": 35,
};
$("#prib2").html(0);
for(var i = 0; i < plans.length; i+=1) {
if (sume >= plans[i].min && sume <= plans[i].max) {
var tprib2 = (sume / 100 * plans[i].percent) + sume;
var prib2 = tprib2.toFixed(2);
$("#prib2").html(prib2);
$("#profit").html(plans[i].percent);
}
}
});
});
$(function() {
$('#submit').click(function(){
var sum = $('#sum').val();
$.ajax({
type: 'POST',
url: '../actions/new.php',
data: {'sum': sum},
cache: false,
success: function(result){
if (result == '0') {
new_notification('Вы не указали сумму вклада', 'error');
}
if (result == '1') {
new_notification('Успешно', 'success'); $(location).attr('href','/cabinet/deposits');
}
if (result == '2') {
new_notification('Минимальная сумма вклада - 50 рублей', 'error');
}
if (result == '3') {
new_notification('На балансе Вашего аккаунта не хватает средств', 'error');
}
if (result == '4') {
new_notification('Баланс Вашего аккаунта менее 50 рублей', 'error');
}
if (result == '5') {
new_notification('Вы не авторизованы', 'error');
}
if (result == '6') {
new_notification('Ошибка', 'error');
}
if (result == '7') {
new_notification('Максимальная сумма вклада - 15000 рублей', 'error');
}
}
});
});
});
</script>
</body>
</html>
PHP:
<?php
include('../conf.php');
include('../head.php');
if(!USER_LOGGED) { header ("Location: /login"); exit; }
?>
<!doctype html>
<html>
<head>
<title>Мои вклады</title>
<meta charset="utf-8">
<meta name="keywords" content="вклады" />
<meta name="description" content="Мои вклады" />
<link rel="shortcut icon" href="../images/favicon.ico">
<?php include('../conf_styles.php'); ?>
</head>
<body>
<?php include('../conf_navbar.php'); include('conf_menu.php'); ?>

<div class="container">
<div class="one_full">
<center>


<h2>Сделать вклад</h2>
На Вашем балансе: <?php echo $bal['bal']; ?> руб.<br /><br />
<input type="text" id="sum" value="<?php if ($bal['bal'] >= 50 && $bal['bal'] <= 15000) { echo floor($bal['bal']); } if ($bal['bal'] < 50) { echo '50'; } if ($bal['bal'] > 15000) { echo '15000'; } ?>" placeholder="Сумма вклада" style="padding-left:5px" />
<br /><br />
<a><input id="submit" type="submit" style="border: 1px solid #4682B4; min-width:181px; background:#4682B4;color: #fff;cursor:pointer" value="Вложить" class="input" /></a><br /><br />
Вы получите <font id="prib2"></font> руб. (+<font id="profit"></font>%)<br />
Минимальная сумма вклада - 50 рублей.
<div id="res1dfr78"></div>
<div class="ptable four">
<div class="row main">
<div class="date" style="width:100px;"></div>
<div class="date" style="width:200px;">Дата вклада</div>
<div class="date" style="width:200px;">Сумма вклада / %</div>
<div class="tarif" style="width:200px;">К зачислению</div>
<div class="stat" style="width:250px;">Статус</div>
</div>
<?php
$sd = "SELECT id,sum,sume,proc,st,dt FROM `t_dep` WHERE usr = '$u_id' ORDER BY id DESC";
$qd = mysqli_query($connect_db, $sd);
$hd = mysqli_num_rows($qd);
if ($hd > 0) {
while($row = mysqli_fetch_array($qd)) {
?>
<div class="row"><div class="date" style="width:100px;"></div>
<div class="date" style="width:200px;"><?php echo date("d.m.y H:i",$row['dt']); ?></div>
<div class="date" style="width:200px;"><?php echo $row["sum"]; ?> / <?php echo $row["proc"]; ?>%</div>
<div class="tarif" style="width:200px;"><?php echo $row["sume"]; ?></div>
<div class="stat" style="width:250px;"><?php if ($row["st"] == 0) { $cou = mysqli_fetch_assoc(mysqli_query($connect_db, "SELECT count(*) AS `c` FROM `t_dep` WHERE st = '0' AND id < '$row[id]'")); $coue = $cou['c']; echo 'Ожидание (Перед вами '.$coue.' чел.)'; } else { echo '<font color="green">Принято</font>'; } ?></div></div>
<?php } } else { echo '<div class="row"><div class="nachi" style="width:100%;">Нет вложений</div></div>'; } ?>
</center>
</div>
</div>
</div>
</div>

<?php include('../conf_footer.php'); ?>
<script type="text/javascript">
$(document).ready(function () {
$('#sum').keyup(function() {
var $th = $(this);
$th.val( $th.val().replace(/[^0-9\.]/g, function(){ return ''; }) );
});
});
$(document).ready(function(){
"use strict";
var sums = parseInt($("#sum").val()),
plans = [];
plans[plans.length] = {
"min": 50,
"max": 1999,
"percent": 25,
};
plans[plans.length] = {
"min": 2000,          
"max": 15000,
"percent": 35,
};
$("#prib2").html(0);
for(var i = 0; i < plans.length; i+=1) {
if (sums >= plans[i].min && sums <= plans[i].max) {
var stprib2 = (sums / 100 * plans[i].percent) + sums;
var sprib2 = stprib2.toFixed(2);
$("#prib2").html(sprib2);
$("#profit").html(plans[i].percent);
}
}
});
$(document).ready(function(){
"use strict";
$('#sum').keyup(function () {
var sume = parseInt($("#sum").val()),
plans = [];
plans[plans.length] = {
"min": 50,
"max": 1999,
"percent": 25,
};
plans[plans.length] = {
"min": 2000,          
"max": 15000,
"percent": 35,
};
$("#prib2").html(0);
for(var i = 0; i < plans.length; i+=1) {
if (sume >= plans[i].min && sume <= plans[i].max) {
var tprib2 = (sume / 100 * plans[i].percent) + sume;
var prib2 = tprib2.toFixed(2);
$("#prib2").html(prib2);
$("#profit").html(plans[i].percent);
}
}
});
});
$(function() {
$('#submit').click(function(){
var sum = $('#sum').val();
$.ajax({
type: 'POST',
url: '../actions/new.php',
data: {'sum': sum},
cache: false,
success: function(result){
if (result == '0') {
new_notification('Вы не указали сумму вклада', 'error');
}
if (result == '1') {
new_notification('Успешно', 'success'); $(location).attr('href','/cabinet/deposits');
}
if (result == '2') {
new_notification('Минимальная сумма вклада - 50 рублей', 'error');
}
if (result == '3') {
new_notification('На балансе Вашего аккаунта не хватает средств', 'error');
}
if (result == '4') {
new_notification('Баланс Вашего аккаунта менее 50 рублей', 'error');
}
if (result == '5') {
new_notification('Вы не авторизованы', 'error');
}
if (result == '6') {
new_notification('Ошибка', 'error');
}
if (result == '7') {
new_notification('Максимальная сумма вклада - 15000 рублей', 'error');
}
}
});
});
});
</script>
</body>
</html>
 
Последнее редактирование:

pligin

Команда форума
Администратор
И не там и не там...
Все начисления с платежей выполняются в момент проведения платежа, т.е. нужно смотреть обработчик платежа
 

frigiec

Участник
Наверное издесь
PHP:
<?php
include('../conf.php');
include('../head.php');
if(!USER_LOGGED) { header ("Location: /login"); exit; }
?>
<!doctype html>
<html>
<head>
<title>Пополнение баланса аккаунта</title>
<meta charset="utf-8">
<meta name="keywords" content="пополнить, баланс" />
<meta name="description" content="Пополнение баланса аккаунта" />
<link rel="shortcut icon" href="../images/favicon.ico">
<?php include('../conf_styles.php'); ?>
<style>
.imt span{
border-radius: 5px 5px 5px 5px;
visibility: hidden;
position: absolute;
margin-left: 10px;
background: #fff;
box-shadow: -2px 2px 10px -1px #333;
border-radius: 5px;
}
.imt:hover span{
visibility: visible;
}
</style>
</head>
<body>
<?php include('../conf_navbar.php'); include('conf_menu.php'); ?>

<div class="container">
<div class="one_full">
<center><h2>Пополнение баланса</h2>
<form id="in" action="../actions/in.php" method="POST">
<center>
<input id="sum" class="input_reg" type="text" name="sum" required="required" placeholder="Сумма к пополнению" autocomplete="off" style="padding-left:5px" /><br /><br />
<input style="border: 1px solid #4682B4; margin-left:-5px; width:180px;  height:33px; background:#4682B4; color: #fff; cursor:pointer;" type="submit" value="Пополнить баланс" />
</form>
</center>
<div id="res1dfr78"></div>
<div class="ptable four">
<div class="row main">
<div class="stat" style="width:400px;"></div>
<div class="date">Дата</div>
<div class="stat" style="width:200px;">Сумма</div>
</div>
<?php
$st = "SELECT * FROM `t_in` WHERE usr = '$u_id' AND st = '1' ORDER BY id DESC";
$qt = mysqli_query($connect_db, $st);
$ht = mysqli_num_rows($qt);
if ($ht > 0) {
while($row = mysqli_fetch_array($qt)) {
?>
<div class="row"><div class="stat" style="width:400px;"></div>
<div class="date"><?php echo date("d.m.y H:i",$row['dt']); ?></div>
<div class="stat" style="width:200px;"><?php echo $row["sum"]; ?> руб.</div></div>
<?php } } else { echo '<div class="row"><div class="nachi" style="width:100%;">История пополнений пуста</div></div>'; } ?>
</div>
</div>
</div>

<?php include('../conf_footer.php'); ?>
<script type='text/javascript'>
$(document).ready(function () {
$('#sum').keyup(function() {
var $th = $(this);
$th.val( $th.val().replace(/[^0-9\.]/g, function(){ return ''; }) );
});
});
</script>
</body>
</html>
...
 

pligin

Команда форума
Администратор
Наверное издесь
PHP:
<?php
include('../conf.php');
include('../head.php');
if(!USER_LOGGED) { header ("Location: /login"); exit; }
?>
<!doctype html>
<html>
<head>
<title>Пополнение баланса аккаунта</title>
<meta charset="utf-8">
<meta name="keywords" content="пополнить, баланс" />
<meta name="description" content="Пополнение баланса аккаунта" />
<link rel="shortcut icon" href="../images/favicon.ico">
<?php include('../conf_styles.php'); ?>
<style>
.imt span{
border-radius: 5px 5px 5px 5px;
visibility: hidden;
position: absolute;
margin-left: 10px;
background: #fff;
box-shadow: -2px 2px 10px -1px #333;
border-radius: 5px;
}
.imt:hover span{
visibility: visible;
}
</style>
</head>
<body>
<?php include('../conf_navbar.php'); include('conf_menu.php'); ?>

<div class="container">
<div class="one_full">
<center><h2>Пополнение баланса</h2>
<form id="in" action="../actions/in.php" method="POST">
<center>
<input id="sum" class="input_reg" type="text" name="sum" required="required" placeholder="Сумма к пополнению" autocomplete="off" style="padding-left:5px" /><br /><br />
<input style="border: 1px solid #4682B4; margin-left:-5px; width:180px;  height:33px; background:#4682B4; color: #fff; cursor:pointer;" type="submit" value="Пополнить баланс" />
</form>
</center>
<div id="res1dfr78"></div>
<div class="ptable four">
<div class="row main">
<div class="stat" style="width:400px;"></div>
<div class="date">Дата</div>
<div class="stat" style="width:200px;">Сумма</div>
</div>
<?php
$st = "SELECT * FROM `t_in` WHERE usr = '$u_id' AND st = '1' ORDER BY id DESC";
$qt = mysqli_query($connect_db, $st);
$ht = mysqli_num_rows($qt);
if ($ht > 0) {
while($row = mysqli_fetch_array($qt)) {
?>
<div class="row"><div class="stat" style="width:400px;"></div>
<div class="date"><?php echo date("d.m.y H:i",$row['dt']); ?></div>
<div class="stat" style="width:200px;"><?php echo $row["sum"]; ?> руб.</div></div>
<?php } } else { echo '<div class="row"><div class="nachi" style="width:100%;">История пополнений пуста</div></div>'; } ?>
</div>
</div>
</div>

<?php include('../conf_footer.php'); ?>
<script type='text/javascript'>
$(document).ready(function () {
$('#sum').keyup(function() {
var $th = $(this);
$th.val( $th.val().replace(/[^0-9\.]/g, function(){ return ''; }) );
});
});
</script>
</body>
</html>
...
Я просил обработчик, а не страницу пополнения
 

frigiec

Участник
PHP:
<?php
include('../conf.php');
if (!in_array($_SERVER['REMOTE_ADDR'], array('185.71.65.92', '185.71.65.189', '149.202.17.210'))) die('ERROR IP');
if (isset($_POST['m_operation_id']) && isset($_POST['m_sign']))
{
$pa = mysqli_fetch_assoc(mysqli_query($connect_db, "SELECT ke FROM t_data LIMIT 1"));
$m_key = $pa['ke'];
$arHash = array($_POST['m_operation_id'],
$_POST['m_operation_ps'],
$_POST['m_operation_date'],
$_POST['m_operation_pay_date'],
$_POST['m_shop'],
$_POST['m_orderid'],
$_POST['m_amount'],
$_POST['m_curr'],
$_POST['m_desc'],
$_POST['m_status'],
$m_key);
$sign_hash = strtoupper(hash('sha256', implode(':', $arHash)));
if ($_POST['m_sign'] == $sign_hash && $_POST['m_status'] == 'success')
{
$dt = time();
$pa = mysqli_fetch_assoc(mysqli_query($connect_db, "SELECT id,usr FROM t_in WHERE ba = '$_POST[m_orderid]' AND st = '0' LIMIT 1"));
$usr = $pa['usr'];
$m_amount = number_format(floatval($_POST["m_amount"]), 2, ".", "");
if ($usr > 0) {
mysqli_query($connect_db, "UPDATE `t_users` SET `bal` = `bal`+'$m_amount' WHERE uid = '$usr'");
mysqli_query($connect_db, "UPDATE `t_in` SET `st` = '1' WHERE ba = '$_POST[m_orderid]' LIMIT 1");
}
echo $_POST['m_orderid'].'|success';
exit;
}
echo $_POST['m_orderid'].'|error';
}
?>
 

pligin

Команда форума
Администратор
PHP:
<?php
include('../conf.php');
if (!in_array($_SERVER['REMOTE_ADDR'], array('185.71.65.92', '185.71.65.189', '149.202.17.210'))) die('ERROR IP');
if (isset($_POST['m_operation_id']) && isset($_POST['m_sign']))
{
$pa = mysqli_fetch_assoc(mysqli_query($connect_db, "SELECT ke FROM t_data LIMIT 1"));
$m_key = $pa['ke'];
$arHash = array($_POST['m_operation_id'],
$_POST['m_operation_ps'],
$_POST['m_operation_date'],
$_POST['m_operation_pay_date'],
$_POST['m_shop'],
$_POST['m_orderid'],
$_POST['m_amount'],
$_POST['m_curr'],
$_POST['m_desc'],
$_POST['m_status'],
$m_key);
$sign_hash = strtoupper(hash('sha256', implode(':', $arHash)));
if ($_POST['m_sign'] == $sign_hash && $_POST['m_status'] == 'success')
{
$dt = time();
$pa = mysqli_fetch_assoc(mysqli_query($connect_db, "SELECT id,usr FROM t_in WHERE ba = '$_POST[m_orderid]' AND st = '0' LIMIT 1"));
$usr = $pa['usr'];
$m_amount = number_format(floatval($_POST["m_amount"]), 2, ".", "");
if ($usr > 0) {
mysqli_query($connect_db, "UPDATE `t_users` SET `bal` = `bal`+'$m_amount' WHERE uid = '$usr'");
mysqli_query($connect_db, "UPDATE `t_in` SET `st` = '1' WHERE ba = '$_POST[m_orderid]' LIMIT 1");
}
echo $_POST['m_orderid'].'|success';
exit;
}
echo $_POST['m_orderid'].'|error';
}
?>
Тут нет отчислений администратору.
 

pligin

Команда форума
Администратор
Могу сбросить скрипт -мне не жалко...
Я могу в этот дизайн запихнуть свой инвестиционный скрипт.
Сбрось через диск Яндекса и я посмотрю - может там как-то иначе придумано начисление администратору. Кидай в лс
 
Верх