Файл: Скрипт/pages/account/_insert_payeer.php
Строк: 95
<div class="prof">
<div class="myfarm-menu-left">
<?PHP include("inc/_menu-left.php"); ?>
</div>
<div class="prof-content">
<div class="layer3">
<h3>
<center><img src="/img/payeer.png"></center>
</h3>
<center>
<?PHP
$_OPTIMIZATION["title"] = "Пополнить баланс";
$usid = $_SESSION["user_id"];
$usname = $_SESSION["user"];
$db->Query("SELECT * FROM db_config WHERE id = '1' LIMIT 1");
$sonfig_site = $db->FetchArray();
/*
if($_SESSION["user_id"] != 1){
echo "<center><b><font color = red>Технические работы</font></b></center>";
return;
}
*/
?>
<?
/// db_payeer_insert
if(isset($_POST["sum"])){
$sum = round(floatval($_POST["sum"]),2);
# Заносим в БД
$db->Query("INSERT INTO db_payeer_insert (user_id, user, sum, date_add) VALUES ('".$_SESSION["user_id"]."','".$_SESSION["user"]."','$sum','".time()."')");
$desc = base64_encode($_SERVER["HTTP_HOST"]." - USER ".$_SESSION["user"]);
$m_shop = $config->shopID;
$m_orderid = $db->LastInsert();
$m_amount = number_format($sum, 2, ".", "");
$m_curr = "RUB";
$m_desc = $desc;
$m_key = $config->secretW;
$arHash = array(
$m_shop,
$m_orderid,
$m_amount,
$m_curr,
$m_desc,
$m_key
);
$sign = strtoupper(hash('sha256', implode(":", $arHash)));
?>
<form method="GET" action="//payeer.com/api/merchant/m.php">
<input type="hidden" name="m_shop" value="<?=$config->shopID; ?>">
<input type="hidden" name="m_orderid" value="<?=$m_orderid; ?>">
<input type="hidden" name="m_amount" value="<?=number_format($sum, 2, ".", "")?>">
<input type="hidden" name="m_curr" value="RUB">
<input type="hidden" name="m_desc" value="<?=$desc; ?>">
<input type="hidden" name="m_sign" value="<?=$sign; ?>">
<input type="submit" name="m_process" value="Оплатить" class="button" />
</form>
</div>
</div>
<div class="myfarm-menu-right">
<?PHP include("inc/_menu-right.php"); ?>
</div>
</div>
<?PHP include("pages/account/_chat.php"); ?>
<?PHP
return;
}
?>
<script type="text/javascript">
var min = 0.01;
var ser_pr = 100;
function calculate(st_q) {
var sum_insert = parseFloat(st_q);
$('#res_sum').html( (sum_insert * ser_pr).toFixed(0) );
}
</script>
<center>
<div id="error3"></div>
<form method="POST" action="">
<input type="hidden" name="m" value="<?=$fk_merchant_id?>">
Сумма рублей: <input type="text" value="100" name="sum" size="7" class="box" style="margin:0px; height:40px; width:170px;" id="psevdo" onchange="calculate(this.value)" onkeyup="calculate(this.value)" onfocusout="calculate(this.value)" onactivate="calculate(this.value)" ondeactivate="calculate(this.value)">
<br><br>
<input type="submit" id="submit" value="Пополнить баланс" class="button">
</form>
<script type="text/javascript">
calculate(100);
</script>
</center>
</center>
</div>
</div>
<div class="myfarm-menu-right">
<?PHP include("inc/_menu-right.php"); ?>
</div>
</div>
<?PHP include("pages/account/_chat.php"); ?>