ALTER TABLE `tb_users` ADD `ref_percent` VARCHAR( 3 ) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT '0' NOT NULL AFTER `money`;
ALTER TABLE `tb_users` ADD `ref_per_all` VARCHAR( 3 ) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT '0' NOT NULL AFTER `ref_percent`;
if($level!='V.I.P.')
{
$sqlzdu = "SELECT * FROM tb_config WHERE item='referalclick' and howmany='1'";
}else{
$sqlzdu = "SELECT * FROM tb_config WHERE item='viprefclick' and howmany='1'";
}
$resultzdu = mysql_query($sqlzdu);
$myrowzdu = mysql_fetch_array($resultzdu);
$elprecio=$myrowzdu["price"];
/* Оплата за просмотр с реф процентами */
if ($myrowzd["ref_percent"] == "0")
{
$percent = $myrowzd["ref_per_all"];
} else {
$percent = $myrowzd["ref_percent"];
}
if ($percent == "0")
{
$ost = $elprecio;
} else {
$nas4et = ($elprecio/100) * $percent;
$ost = $elprecio - $nas4et;
}
$sqlexd = "UPDATE tb_users SET referalvisits='$juaze'+1, money='$billetes'+'$elprecio' WHERE username='$juaz'";
$resultexd = mysql_query($sqlexd);
Найденый кусок кода нам нужно заменить на этот:
$sqlexd = "UPDATE tb_users SET referalvisits='$juaze'+1, money='$billetes'+'$ost' WHERE username='$juaz'";
$resultexd = mysql_query($sqlexd);
if($level!='V.I.P.')
{
$sqlzdu = "SELECT * FROM tb_config WHERE item='click' and howmany='1'";
}else{
$sqlzdu = "SELECT * FROM tb_config WHERE item='vipclick' and howmany='1'";
}
$resultzdu = mysql_query($sqlzdu);
$myrowzdu = mysql_fetch_array($resultzdu);
$elprecio=$myrowzdu["price"];
$pluss = $nas4et + $elprecio;
$sqlexzz = "UPDATE tb_users SET visits='$visitas'+1, money='$dinero'+'$elprecio' WHERE username='$user'";
$resultexzz = mysql_query($sqlexzz);
$sqlexzz = "UPDATE tb_users SET visits='$visitas'+1, money='$dinero'+'$pluss' WHERE username='$user'";
$resultexzz = mysql_query($sqlexzz);
$joindate=date("d.m.Y");
echo " Поздравляем теперь вы $username. зарегистрированы. Пройдите по ссылке чтобы войти в ваш аккуант";
$check = mysql_query("SELECT ref_per_all FROM tb_users WHERE referer='$referer' LIMIT 1");
if ($check && mysql_num_rows($check) > 0)
{
$allper = mysql_result($check,0,0);
} else {
$allper = "0";
}
mysql_query("INSERT INTO tb_users (username, password, ip, pemail, referer, country, joindate, wmid, buying, ref_per_all) VALUES('$username','$password','$laip','$pemail','$referer','$country','$joindate','$wmid','$buying', '$allper')");
Коммерческие предложения доступны в нашем Telegram чате.
Отзывы