game/modules_data/stats_inv.php
2022-12-30 21:03:50 +02:00

897 lines
39 KiB
PHP

<?php
if (!defined('GAME')) {
die();
}
if ($u->info['level'] > 0 && $u->info['inTurnir'] == 0 && $c['bonusonline'] && !isset($u->info['noreal'])) {
$bns = mysql_fetch_array(
mysql_query(
'SELECT `id`,`time` FROM `aaa_bonus` WHERE `uid` = "' . $u->info['id'] . '" AND `time` > ' . time(
) . ' LIMIT 1'
)
);
if (isset($_GET['takebns']) && $u->newAct($_GET['takebns']) && !isset($bns['id'])) {
$u->takeBonus();
$bns = mysql_fetch_array(
mysql_query(
'SELECT `id`,`time` FROM `aaa_bonus` WHERE `uid` = "' . $u->info['id'] . '" AND `time` > ' . time(
) . ' LIMIT 1'
)
);
}
}
$uShow = explode('|', $u->info['showmenu']);
if (isset($_GET['showmenu'])) {
$_GET['showmenu'] = round($_GET['showmenu']);
if ($_GET['showmenu'] >= 1 && $_GET['showmenu'] <= 8) {
if ($uShow[$_GET['showmenu'] - 1] == 0) {
$uShow[$_GET['showmenu'] - 1] = 1;
} else {
$uShow[$_GET['showmenu'] - 1] = 0;
}
$u->info['showmenu'] = implode('|', $uShow);
mysql_query('UPDATE `stats` SET `showmenu`="' . $u->info['showmenu'] . '" WHERE `id`="' . $u->info['id'] . '"');
}
}
?>
<style type="text/css">
.linestl1 {
background-color: #ececec;
font-size: 11px;
font-weight: bold;
border-radius: 2px;
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
padding-right: 4px;
padding-bottom: 1px;
}
</style>
<script>
function getLine(id, name, a, b, o, id2) {
var tss = '<td width="20"><img src="https://img.new-combats.com/i/minus.gif" style="display:block;cursor:pointer;margin-bottom:3px;" title="Ñêðûòü" class="btn-slide" onClick="location=\'main.php?inv=1&otdel=<?php echo $_GET['otdel']; ?>&showmenu=' + id2 + '&rnd=<?php echo $code; ?>\';"></td>';
if (o == 0) {
tss = '<td width="20"><img src="https://img.new-combats.com/i/plus.gif" style="display:block;cursor:pointer;margin-bottom:3px;" title="Ïîêàçàòü" class="btn-slide" onClick="location=\'main.php?inv=1&otdel=<?php echo $_GET['otdel']; ?>&showmenu=' + id2 + '&rnd=<?php echo $code; ?>\';"></td>';
}
var sts01 = '<a href="main.php?inv=1&otdel=<?php echo $_GET['otdel']; ?>&up=' + id + '&rnd=<?php echo $code; ?>"><img style="display:block;float:right; margin-bottom:3px;" src="https://img.new-combats.com/i/3.gif"></a>';
if (id == 0) {
sts01 = '<img style="display:block;float:right;margin-bottom:3px;" src="https://img.new-combats.com/i/4.gif">';
}
var sts02 = '<a href="main.php?inv=1&otdel=<?php echo $_GET['otdel']; ?>&down=' + id + '&rnd=<?php echo $code; ?>"><img style="display:block; margin-bottom:3px; float:right;" src="https://img.new-combats.com/i/1.gif"></a>';
if (id == 6) {
sts02 = '<img style="display:block;float:right;margin-bottom:3px;" src="https://img.new-combats.com/i/2.gif">';
}
var sts2 = '<td width="40"><div style="float:right;">' + sts01 + '' + sts02 + '</div></td>';
document.write('<table class="mroinv" width="100%" border="0" cellspacing="2" cellpadding="0">' +
'<tr>' + tss +
'<td style="font-size:9px;"><span class="linestl1">&nbsp;' + name + '</span></td>' + sts2 + '</tr>' +
'</table>');
}
function showDiv(id) {
var block = document.getElementById('block_' + id);
block.style.display = 'block';
}
function hiddenDiv(id) {
var block = document.getElementById('block_' + id);
block.style.display = 'none';
}
<?php
$rb = mysql_fetch_array(
mysql_query('SELECT COUNT(*) FROM `bank` WHERE `block` = 0 AND `uid` = "' . $u->info['id'] . '"')
);
?>
function bank_info() {
<?php if(!isset($u->bank['id']) && $rb[0] == 0){ ?>
alert('Ó Âàñ íåò àêòèâíûõ ñ÷åòîâ. \n\n Íà ïðàâàõ ðåêëàìû: Âû ìîæåòå îòêðûòü ñ÷¸ò â Áàíêå "<?php echo $c['title3']; ?>",' +
' íà Ñòðàøèëêèíîé óëèöå*\n\n* Ìåëêèì øðèôòîì: óñëóãà ïëàòíàÿ.');
<?php
}elseif($rb[0] > 0){
?>
var ddtpswBank = '<div><form action="main.php?inv=1&otdel=<?php echo $_GET['otdel']; ?>&rnd=<?php echo $code; ?>" method="post">' +
'<table style="border:1px solid #B1A996;" width="300" border="0" cellspacing="0" cellpadding="0"><tr><td bgcolor="#B1A996"><div align="center"><strong>Ñ÷¸ò â áàíêå</strong><a href="javascript:void(0)" onclick="document.getElementById(\'chpassbank\').style.display=\'none\'" title="Çàêðûòü îêíî" style="float:right;padding-right:5px;">x</a></div></td></tr><tr><td bgcolor="#DDD5C2" style="padding:5px;"><div align="center"><small>Âûáåðèòå ñ÷¸ò è ââåäèòå ïàðîëü<br />' +
'<select name="bank" id="bank">' +
<?php
$scet = mysql_query('SELECT `id` FROM `bank` WHERE `block` = "0" AND `uid` = "' . $u->info['id'] . '"');
while ($num_scet = mysql_fetch_array($scet)) {
echo "'<option>" . $u->getNum($num_scet['id']) . "</option>'+";
}
?>
'</select><input style="margin-left:5px;" type="password" name="bankpsw" id="bankpsw" /><label></label></small><input style="margin-left:3px;" type="submit" name="button" id="button" value=" ok " /></div></td></tr></table></form></div>';
var ddtpsBankDiv = document.getElementById('chpassbank');
if (ddtpsBankDiv != undefined) {
ddtpsBankDiv.style.display = '';
ddtpsBankDiv.innerHTML = ddtpswBank;
}
<?php
}
?>
}
function save_com_can() {
var ddtpsBankDiv = document.getElementById('chpassbank');
if (ddtpsBankDiv != undefined) {
ddtpsBankDiv.style.display = 'none';
ddtpsBankDiv.innerHTML = '';
}
}
function save_compl() {
var ddtpswBank = '<div><form action="main.php?inv=1&otdel=<?php echo $_GET['otdel']; ?>&rnd=<?php echo $code; ?>" method="post">' +
'<table style="border:1px solid #B1A996;" width="250" border="0" cellspacing="0" cellpadding="0"><tr><td bgcolor="#B1A996"><div align="center"><strong>Ñîõðàíèòü êîìïëåêò</strong></div></td></tr><tr><td bgcolor="#DDD5C2" style="padding:5px;"><div align="center"><small>Ââåäèòå íàçâàíèå áîåâîãî êîìïëåêòà:<br />' +
'<input style="width:90%;" type="text" name="compname" value="" id="compname" /><label></label></small><br><input style="margin-left:3px;cursor:pointer;" type="submit" name="button" id="button" value=" Ñîõðàíèòü " /><input style="margin-left:3px;cursor:pointer;" onClick="save_com_can();" type="button" value=" Îòìåíà " /></div></td></tr></table></form></div>';
var ddtpsBankDiv = document.getElementById('chpassbank');
if (ddtpsBankDiv != undefined) {
ddtpsBankDiv.style.display = '';
ddtpsBankDiv.innerHTML = ddtpswBank;
}
}
function za_block(id) {
if ($('#za_block_' + id).css('display') == 'none') {
$('#za_block_' + id).css('display', '');
} else {
$('#za_block_' + id).css('display', 'none');
}
}
</script>
<style>
.mroinv {
/*background-color:#e2e2e2;border-top:1px solid #eeeeee;border-left:1px solid #eeeeee;border-right:1px solid #a0a0a0;border-bottom:1px solid #a0a0a0;*/
background: url(https://img.new-combats.com/i/back.gif) 0 2px;
}
.mroinv img {
display: inline-block;
border: 0;
padding-top: 3px;
padding-left: 1px;
}
.dot {
display: block;
padding-bottom: 2px;
text-decoration: none; /* Óáèðàåì ïîä÷åðêèâàíèå */
border-bottom: 1px dotted #080808; /* Äîáàâëÿåì ñâîþ ëèíèþ */
cursor: pointer;
}
.dot:hover {
border-bottom: 1px dotted #080808; /* Äîáàâëÿåì ñâîþ ëèíèþ */
background-color: #BEBEBE;
}
</style>
<div id="chpassbank" style="display:none; position:absolute; top:50px; left:250px;"></div>
<?php
$rz0 = '';
$rz1 = '';
$rz2 = '';
$rz3 = '';
$rz4 = '';
$rz5 = '';
$expbase = number_format($u->stats['levels']['exp'], 0, ",", " ");
if ($expbase - 1 == $u->info['exp'] && $c['nolevel']) {
//Ïðîâåðÿåì áëîê îïûòà
$tlus = mysql_fetch_array(
mysql_query('SELECT COUNT(*) FROM `users` WHERE `real` = 1 AND `level` = "' . $u->info['level'] . '" LIMIT 1')
);
if ($tlus[0] < $u->info['level'] * 10) {
$expbase = '<strike>' . $expbase . '</strike>';
}
$expbase = '(<a href="https://new-combats.com/exp" target="_blank">' . $expbase . '</a>)';
if (((1 + $u->info['level'] * 10) - $tlus[0]) > 0) {
$expbase .= ' <u><a onMouseOver="top.hi(this,\'<b>Ïåðñîíàæè ' . $u->info['level'] . ' óðîâíÿ íå ïîëó÷àþò îïûò.</b><br>Äëÿ ðàçáëîêèðîâêè íå õâàòàåò <u>' . ((1 + $u->info['level'] * 10) - $tlus[0]) . ' ïåðñîíàæåé</u> äàííîãî óðîâíÿ.\',event,0,1,1,1,\'\');" onMouseOut="top.hic();" onMouseDown="top.hic();" style="cursor:help">[?]</a></u>';
}
} else {
$expbase = '(<a href="https://new-combats.com/exp" target="_blank">' . $expbase . '</a>)';
}
if ($u->info['exp'] == 12499 && $c['infinity5level']) {
$trks5 = '<div align="center"><hr><font color=red>Äëÿ ïîëó÷åíèÿ ñëåäóþùåãî óðîâíÿ âàì íåîáõîäèì <a target="_blank" href="https://new-combats.com/item/1204">Êðèñòàëë Âå÷íîñòè</a></font><hr></div>';
}
$repovo = $u->rep['rep3'] - $u->rep['rep3_buy'];
echo '
<table width="100%" border="0" cellspacing="3" cellpadding="0">
<tr><td>&nbsp;</td></tr>
<tr>
<td height="15">
<small style="font-size:12px;">
<div style="padding:5px 5px 0px 5px;">
Îïûò:&nbsp;<span style="float0:right"><a href="/exp" target="_blank">' . number_format(
$u->info['exp'], 0, ",", " "
) . '</a></span><br>' . $trks5 . '
';
if ($u->info['expstopu'] < 3 && $u->info['exp'] == $c['expstop']) {
echo '
Êâåñò <b>12</b>é:&nbsp;<span style="float0:right">
<a href="/quest" target="_blank"><b>' . ($u->info['expstopu'] + 1) . '/3 </b></a> ñòàòèÿ';
echo '<button style="width:224px;margin-top:5px;" class="btnnew" onclick="location.href=\'/main.php?inv&propusk=1\';">
Ñòîèìîñòü ïðîïóñêà 600 Åêð</button> <br>';
/*
takelevelplease
*/
}
echo '
Áîè:&nbsp;<span style="float0:right"><span title="Ïîáåä: ' . number_format(
$u->info['win'], 0, ",", " "
) . '"><b>' . number_format(
$u->info['win'], 0, ",", " "
) . ' <img width="7" height="7" title="Ïîáåä: ' . number_format($u->info['win'], 0, ",", " ") . '"
src="https://img.new-combats.com/i/ico/wins.gif" style="display:inline-block;" /></b></span> &nbsp; <span title="Ïîðàæåíèé: ' . number_format(
$u->info['lose'], 0, ",", " "
) . '"><b>' . number_format(
$u->info['lose'], 0, ",", " "
) . ' <img width="7" height="7" alt="Ïîðàæåíèé: ' . number_format($u->info['lose'], 0, ",", " ") . '"
src="https://img.new-combats.com/i/ico/looses.gif" style="display:inline-block;" /></b></span> &nbsp; <span title="Íè÷üèõ: ' . number_format(
$u->info['nich'], 0, ",", " "
) . '"><b>' . number_format(
$u->info['nich'], 0, ",", " "
) . ' <img width="7" height="7" alt="Íè÷üèõ: ' . number_format($u->info['nich'], 0, ",", " ") . '"
src="https://img.new-combats.com/i/ico/draw.gif" style="display:inline-block;" /></b></span></span><br />
<!--Ñåðèÿ ïîáåä:&nbsp;' . (0 + $u->info['swin']) . '<br>
Ñåðèÿ ïîðàæåíèé:&nbsp;' . (0 + $u->info['slose']) . '<br>-->
</div><div style="padding:0px 5px 5px 5px;">
Äåíüãè:&nbsp;<b>' . $u->info['money'] . ' êð.</b><br />
Äåíüãè:&nbsp;<b style="color:green">' . $u->info['money2'] . ' åêð.</b><br />
Âîèíñòâåííîñòü:&nbsp;<b style="color:green">' . $repovo . ' åä.</b><br />
';
echo 'Ðåëèêâèé:&nbsp;<b style="color:green">' . $u->info['relik']['relik'] . ' øò.</b><br />';
if ($u->stats['pbe'] > 0) {
echo '<a href="https://new-combats.com/news/268/" target="_blank">Áîíóñ ïîêóïàòåëÿ:&nbsp;' . $u->stats['pbe'] . '&nbsp;óðîâåíü</a>';
$nowby = mysql_fetch_array(
mysql_query(
'SELECT `good` FROM `pay_operation` WHERE `uid` = "' . $u->info['id'] . '" AND `good` > 0 ORDER BY `good` DESC LIMIT 1'
)
);
if ($u->stats['pbe'] > 0 && date('d.m.Y') != date('d.m.Y', $nowby['good'])) {
echo ' <font color="red"><br>(Ñîâåðøèòå ïîêóïêó ÅÊÐ ÷òîáû ñîõðàíèòü è óâåëè÷èòü áîíóñ ïîêóïàòåëÿ)</font>';
}
echo '<br>';
}
if ($u->info['level'] < 8 && $c['zuby'] == true) {
echo 'Çóáû:&nbsp;' . $u->zuby($u->info['money4']) . '<br>';
}
if ($u->info['ability'] > 0 || ($u->info['skills'] > 0 && $u->info['level'] > 0)) {
echo '&nbsp;<a href="main.php?skills=1&side=1">+ Ñïîñîáíîñòè</a><br>';
}
if ($_GET['propusk'] == 1) {
$usrdata = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'));
if ($usrdata['money2'] >= 600 && $u->info['level'] == 11) {
mysql_query('UPDATE `users` SET `money2` = `money2` - 600 WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
mysql_query(
'UPDATE `stats` SET `exp`= 150000000, `expstopu` = 3 WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'
);
$er8 = 'Âñå ïðîøëî óñïåøíî!!!';
die('<script>top.frames[\'main\'].location = "main.php";</script>');
} else {
$er8 = 'Íåäîñòàòî÷íî ñðåäñòâ!!!';
}
}
//Ïîëó÷åíèå óðîâíÿ çàäàíèÿ
if ($u->info['level'] >= 0 && $u->info['inTurnir'] == 0 && $c['bonuslevel'] == true && !isset($u->info['noreal']) && $c['bonussocial'] == true) {
/*
[1] Íóæíî äîêà÷àòüñÿ íà êëîíå äî 1 óðîâíÿ.
[2]-[3]-[4] Íóæíî ïîäòâåðäèòü e-mail ÷òîáû ïîëó÷èòü ñî 2 ïî 4 óðîâåíü íà âûáîð.
[5]-[6] Íóæíî ïîäòâåðäèòü ñòðàíèöó ÂÊîíòàêòå ÷òîáû ïîëó÷èòü 5 èëè 6 óðîâåíü íà âûáîð.
[7] Íóæíî ïðèâåñòè 1 äðóãà.
[8] Íóæíî ïðèâåñòè 3 äðóçåé è ïðîâåñòè 3 õàîòà.
[9] Íóæíî ïðèâåñòè 5 äðóçåé è ïðîâåñòè 50 õàîòîâ.
[10] Íóæíî ïðèâåñòè 7 äðóçåé è ïðîâåñòè 100 õàîòîâ.
*/
$mxlvl = mysql_fetch_array(
mysql_query(
'SELECT `id`,`level` FROM `users` WHERE `real` = 1 AND `admin` = 0 AND `banned` = 0 ORDER BY `level` DESC LIMIT 1'
)
);
if (isset($mxlvl['id']) && $mxlvl['level'] > $u->info['level'] + 1) {
$gd = 1;
$gb = 1;
$sl = $u->info['level'];
$ml = $u->info['level'] + 1;
//
if (isset($_GET['takelevelplease'])) {
$er8 = '';
//
if ($ml <= 1) {
$er8 = 'Êà÷àéòåñü íà êëîíå äî 1 óðîâíÿ.';
} elseif ($ml <= 4) {
$mcf = mysql_fetch_array(
mysql_query(
'SELECT * FROM `mini_actions` WHERE `uid` = "' . $u->info['id'] . '" AND `val` = "mailconfirm" AND `ok` > 0 LIMIT 1'
)
);
if (!isset($mcf['id'])) {
$er8 = 'Âû íå ïîäòâåðäèëè E-mail.';
} else {
if ($ml == 2) {
mysql_query('UPDATE `stats` SET `exp` = 420 WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
} elseif ($ml == 3) {
mysql_query('UPDATE `stats` SET `exp` = 1300 WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
} elseif ($ml == 4) {
mysql_query('UPDATE `stats` SET `exp` = 2500 WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
}
$er8 = 'Âû óñïåøíî ïîëó÷èëè ' . $ml . ' óðîâåíü!';
$u->info['level']++;
$ml++;
}
} elseif ($ml <= 6) {
$mcf = mysql_fetch_array(
mysql_query(
'SELECT * FROM `mini_actions` WHERE `uid` = "' . $u->info['id'] . '" AND (`val` = "vkauth" OR `val` = "fbauth" OR `val` = "okauth") LIMIT 1'
)
);
if (!isset($mcf['id'])) {
$er8 = 'Âû íå ïîäòâåðäèëè ñòðàíèöó â ñîöèàëüíîé ñåòè.';
} else {
$itmsv = mysql_fetch_array(
mysql_query(
'SELECT `id` FROM `items_users` WHERE `item_id` = 1204 AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 AND `uid` = "' . $u->info['id'] . '" LIMIT 1'
)
);
if ($ml == 5) {
mysql_query('UPDATE `stats` SET `exp` = 5000 WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
} elseif ($ml == 6) {
mysql_query('UPDATE `stats` SET `exp` = 12500 WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
}
if ($ml == 6 && !isset($itmsv['id']) && $c['infinity5level'] == true) {
$er8 = 'Òðåáóåòñÿ Êðèñòàëë Âå÷íîñòè!';
} else {
if ($ml == 6) {
mysql_query(
'INSERT INTO `mini_actions` (
`uid`,`time`,`val`,`var`
) VALUES (
"' . $u->info['id'] . '","' . time() . '","mbtnlvl6","0"
)'
);
}
$er8 = 'Âû óñïåøíî ïîëó÷èëè ' . $ml . ' óðîâåíü!';
$u->info['level']++;
$ml++;
}
}
} elseif ($ml <= 7) {
$tstlvl = mysql_fetch_array(
mysql_query(
'SELECT * FROM `mini_actions` WHERE `uid` = "' . $u->info['id'] . '" AND `val` = "mbtnlvl6" LIMIT 1'
)
);
$btls[0] = $u->info['win'];
if ($btls[0] >= 50) {
//
mysql_query('UPDATE `stats` SET `exp` = 30000 WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
//
mysql_query(
'INSERT INTO `mini_actions` (
`uid`,`time`,`val`,`var`
) VALUES (
"' . $u->info['id'] . '","' . time() . '","mbtnlvl7","0"
)'
);
$er8 = 'Âû óñïåøíî ïîëó÷èëè ' . $ml . ' óðîâåíü!';
$u->info['level']++;
$ml++;
} else {
$er8 = 'Âû íå ïðîâåëè íåñêîëüêî áîåâ (Îñòàëîñü ' . (50 - $btls[0]) . ' ïîáåä).';
}
} elseif ($ml <= 8) {
$tstlvl = mysql_fetch_array(
mysql_query(
'SELECT * FROM `mini_actions` WHERE `uid` = "' . $u->info['id'] . '" AND `val` = "mbtnlvl7" LIMIT 1'
)
);
$refs = mysql_fetch_array(
mysql_query(
'SELECT COUNT(*) FROM `users` WHERE `level` >= 5 AND `timereg` > "' . (0 + $tstlvl['time']) . '" AND `real` = 1 AND `host_reg` = "' . $u->info['id'] . '" LIMIT 1'
)
);
$btls = mysql_fetch_array(
mysql_query(
'SELECT COUNT(*) FROM `battle` WHERE `time_start` > "' . (0 + $tstlvl['time']) . '" AND `razdel` = 5 AND `id` IN (SELECT `battle_id` FROM `battle_last` WHERE `uid` = "' . $u->info['id'] . '" AND `time` > "' . (0 + $tstlvl['time']) . '") LIMIT 1'
)
);
//
if ($refs[0] < 3 || $btls[0] < 3) {
$er8 = 'Âû íå ïðèãëàñèëè ' . (0 + $refs[0]) . '/3 äðóçåé èëè íå ïðîâåëè ' . (0 + $btls[0]) . '/3 õàîòà.';
} else {
//
mysql_query('UPDATE `stats` SET `exp` = 300000 WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
//
mysql_query(
'INSERT INTO `mini_actions` (
`uid`,`time`,`val`,`var`
) VALUES (
"' . $u->info['id'] . '","' . time() . '","mbtnlvl8","0"
)'
);
$er8 = 'Âû óñïåøíî ïîëó÷èëè ' . $ml . ' óðîâåíü!';
$u->info['level']++;
$ml++;
}
} elseif ($ml <= 9) {
$er8 = 'Âû íå ïðèãëàñèëè 5 äðóçåé èëè íå ïðîâåëè 50 õàîòîâ.';
$er8 = 'Äîñòóï çàêðûò!';
} elseif ($ml <= 10) {
$er8 = 'Âû íå ïðèãëàñèëè 7 äðóçåé èëè íå ïðîâåëè 100 õàîòîâ.';
$er8 = 'Äîñòóï çàêðûò!';
} else {
$er8 = '×òî-òî òóò íå òàê...';
$er8 = 'Äîñòóï çàêðûò!';
}
//
if ($sl != $u->info['level']) {
die('<script>location.href="/main.php?inv";</script>');
}
if (isset($mxlvl['id']) && ($mxlvl['level'] > $ml + 1 || $u->info['admin'] > 0)) {
//
} else {
if ($sl != $u->info['level']) {
$gd = 0;
}
}
}
//
if ($ml <= 1) {
$zd = '<font color=red>Íóæíî äîêà÷àòüñÿ íà êëîíå äî 1 óðîâíÿ.</font>';
$gb = 1;
} elseif ($ml <= 4) {
$zd = 'Íóæíî ïîäòâåðäèòü E-mail, ÷òîáû ïîëó÷èòü 2-4 óðîâåíü.';
$gb = 1;
} elseif ($ml <= 6) {
$zd = 'Íóæíî ïîäòâåðäèòü ñòðàíèöó â ñîöèàëüíîé ñåòè, ÷òîáû ïîëó÷èòü 5-6 óðîâåíü.';
$gb = 1;
} elseif ($ml <= 7) {
$zd = 'Íóæíî <!--ïðèâåñòè îäíîãî äðóãà ïî ðåôåðàëüíîé ññûëêå è -->âûèãðàòü 50 áîåâ, ÷òîáû ïîëó÷èòü 7 óðîâåíü.';
$gb = 1;
} elseif ($ml <= 8) {
$zd = 'Íóæíî ïðèâåñòè 3 äðóçåé ïî ðåôåðàëüíîé ññûëêå è ïðîâåñòè 3 õàîòè÷íûõ ïîåäèíêà, ÷òîáû ïîëó÷èòü 8 óðîâåíü.';
$gb = 1;
} elseif ($ml <= 9) {
$zd = 'Íóæíî ïðèâåñòè 5 äðóçåé ïî ðåôåðàëüíîé ññûëêå è ïðîâåñòè 50 õàîòè÷íûõ ïîåäèíêîâ, ÷òîáû ïîëó÷èòü 9 óðîâåíü.';
$gb = 1;
} elseif ($ml <= 10) {
$zd = 'Íóæíî ïðèâåñòè 7 äðóçåé ïî ðåôåðàëüíîé ññûëêå è ïðîâåñòè 100 õàîòè÷íûõ ïîåäèíêîâ, ÷òîáû ïîëó÷èòü 10 óðîâåíü.';
$gb = 1;
} else {
$zd = '';
$gb = 0;
}
//
if ($gd == 1) {
//
if ($zd != '') {
echo '<hr><b><center>Íåîáõîäèìî âûïîëíèòü çàäàíèå:</center></b><div align="center" style="border:1px solid #aeaeae;background-color:#FFF;margin-top:3px;padding:4px;">' . $zd . '</div>';
} else {
echo '<hr>';
}
if ($er8 != '') {
echo '<div style="padding:3px;" align="center"><font color=red>' . $er8 . '</font></div>';
}
//
if ($gb == 1 && $ml > 1) {
//Ïîëó÷àåì
echo '<button style="width:224px;margin-top:5px;" class="btnnew" onclick="location.href=\'/main.php?inv&takelevelplease=1\';">Ïîëó÷èòü ' . ($u->info['level'] + 1) . ' óðîâåíü</button></div>';
}
//
}
}
}
//Áîíóñ çà ìûëî, êîíòàêò
if (!isset($u->info['noreal']) && $c['bonussocial'] == true) {
$mcf = mysql_fetch_array(
mysql_query(
'SELECT * FROM `mini_actions` WHERE `uid` = "' . $u->info['id'] . '" AND `val` = "mailconfirm" LIMIT 1'
)
);
if ((isset($mcf['id']) && $mcf['ok'] == 0) || !isset($mcf['id'])) {
if (isset($_GET['confmail'])) {
//
$gd = 0;
$zdml = 3600; //÷àñ
if (isset($mcf['id']) && $mcf['time'] > time() - $zdml) {
echo '<hr><center><font color="red">Íåëüçÿ ïîäòâåðæäàòü ýë.ïî÷òó òàê ÷àñòî. Îñòàëîñü ' . $u->timeOut(
$mcf['time'] + $zdml - time()
) . '</font></center>';
$gd = 1;
} elseif (!preg_match(
'#^[a-z0-9.!\#$%&\'*+-/=?^_`{|}~]+@([0-9.]+|([^\s]+\.+[a-z]{2,6}))$#si', $_GET['confmail']
)) {
echo '<hr><center><font color="red">Âû óêàçàëè ÿâíî îøèáî÷íûé E-mail.</font></center>';
$gd = 1;
}
if ($gd == 0) {
if (isset($mcf['id'])) {
mysql_query(
'UPDATE `mini_actions` SET `time` = "' . time() . '",`var` = "' . mysql_real_escape_string(
$_GET['confmail']
) . '" WHERE `id` = "' . $mcf['id'] . '" LIMIT 1'
);
} else {
mysql_query(
'INSERT INTO `mini_actions` (`uid`,`time`,`val`,`var`,`ok`) VALUES (
"' . $u->info['id'] . '","' . time() . '","mailconfirm","' . mysql_real_escape_string(
$_GET['confmail']
) . '","0"
)'
);
}
function sendmail($message, $keymd5, $mail)
{
global $u;
//
$md5mail = md5($keymd5 . '+' . $mail);
//
$msgtxt = 'Äëÿ ïîäòâåðæäåíèÿ âàøåãî E-mail ó ïåðñîíàæà <b>' . $u->info['login'] . '</b> ïåðåéäèòå ïî ññûëêå:';
$msgtxt .= ' <a href="https://new-combats.com/mail/key=' . $md5mail . '&mail=' . $mail . '">Íàæìèòå òóò</a> (https://new-combats.com/mail/key=' . $md5mail . '&mail=' . $mail . ')';
$msgtxt .= '<br>Ïåðåõîäÿ ïî ññûëêå, âû ïîäòâåðæäàåòå ñâîå æåëàíèå ïîëó÷àòü èãðîâûå íîâîñòè.';
$msgtxt .= '<br>Åñëè âû íå èìååòå îòíîøåíèÿ ê íàøåé èãðå è íå õîòèòå ïîëó÷àòü ïèñüìà, òîãäà ïåðåéäèòå ïî ýòîé ññûëêå: <a href="https://new-combats.com/mail/key=' . $md5mail . '&mail=' . $mail . '&cancel">Íàæìèòå òóò</a> (https://new-combats.com/mail/key=' . $md5mail . '&mail=' . $mail . '&cancel)<br><br>- - - - - - -<br><br>Ñ óâàæåíèåì,<br>Àäìèíèñòðàöèÿ Ëåãåíäàðíîãî Áîéöîâñêîãî Êëóáà';
//
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=windows-1251\r\n";
$headers .= "From: Ñòàðûé Áîéöîâñêèé Êëóá \r\n";
$to = $mail;
//
$subject = 'Áîéöîâñêèé Êëóá: ' . $u->info['login'] . ' - Ïîäòâåðæäåíèå âàøåé ýë.ïî÷òû';
//
if (mail($to, $subject, $msgtxt, $headers) == true) {
return true;
} else {
return false;
}
}
//
$mcf = mysql_fetch_array(
mysql_query(
'SELECT * FROM `mini_actions` WHERE `uid` = "' . $u->info['id'] . '" AND `val` = "mailconfirm" LIMIT 1'
)
);
//
sendmail('', 'mailconf*15', $mcf['var']);
//
echo '<hr><center><font color="red">Íà âàø E-mail îòïðàâëåíî ïèñüìî.</font></center>';
//
}
}
$mcff = 'Ïîäòâåðäèòü E-mail çà 1 åêð.';
if (isset($mcf['id'])) {
$mcff = '<b>' . $mcf['var'] . '</b><br><font color="grey"><small>(Íà ýòîò àäðåñ îòïðàâëåíî ïèñüìî)</small></font>';
}
echo '<div align="center"><button style="width:224px;margin-top:5px;" class="btnnew" onclick="top.mailConf();"><img src="https://img.new-combats.com/mini_mail.png" height="13" width="13"> ' . $mcff . '</button></div>';
}
$mcf = mysql_fetch_array(
mysql_query(
'SELECT * FROM `mini_actions` WHERE `uid` = "' . $u->info['id'] . '" AND (`val` = "vkauth" OR `val` = "fbauth" OR `val` = "okauth") LIMIT 1'
)
);
if (!isset($mcf['id'])) {
require_once('vk/VK.php');
require_once('vk/VKException.php');
$vk_config = [
'app_id' => '5145826',
'api_secret' => 'V90yIzlgSglfgrnHw7Ny',
'callback_url' => 'https://new-combats.com/social.php?vkconnect',
'api_settings' => 'offline,friends,email',
];
if (isset($_GET['vkconnect'])) {
echo '<hr>';
try {
$vk = new VK\VK($vk_config['app_id'], $vk_config['api_secret']);
if (!isset($_REQUEST['code'])) {
/**
* If you need switch the application in test mode,
* add another parameter "true". Default value "false".
* Ex. $vk->getAuthorizeURL($api_settings, $callback_url, true);
*/
$authorize_url = $vk->getAuthorizeURL(
$vk_config['api_settings'], $vk_config['callback_url']
);
} else {
$access_token = $vk->getAccessToken($_REQUEST['code'], $vk_config['callback_url']);
echo 'access token: ' . $access_token['access_token']
. '<br />expires: ' . $access_token['expires_in'] . ' sec.'
. '<br />user id: ' . $access_token['user_id'] . '<br /><br />';
}
} catch (VK\VKException $error) {
echo $error->getMessage();
}
echo '<hr>';
} else {
$vk = new VK\VK($vk_config['app_id'], $vk_config['api_secret']);
$authorize_url = $vk->getAuthorizeURL(
$vk_config['api_settings'], $vk_config['callback_url']
);
}
echo '<div align="center"><hr>';
echo 'Ïîäòâåðäèòå îäíó èç ñòðàíè÷åê â ñîöèàëüíûõ ñåòÿõ çà 1 åêð. è 150 êð.<br><br>';
echo '<button style="width:224px;margin-top:5px;" class="btnnew" onclick="window.open(\'' . $authorize_url . '\', \'opener\', \'width=660,height=450\');"><img src="https://img.new-combats.com/vk.png" height="13" width="13"> Ïîäòâåðäèòü ÂÊîíòàêòå &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;</button>';
echo '<br>èëè<br>';
echo '<button style="width:224px;margin-top:5px;" class="btnnew" onclick="window.open(\'https://new-combats.com/social.php?fbconnect\', \'opener\', \'width=660,height=450\');"><img src="https://img.new-combats.com/fb.png" height="13" width="13"> Ïîäòâåðäèòü Facebook &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</button>';
echo '</div>';
}
}
echo '</div>';
$prt = explode('|', $u->info['prmenu']);
if (isset($_GET['up'])) {
$i = 0;
if (isset($prt[$_GET['up']], $prt[$_GET['up'] - 1])) {
$prt1 = $prt[intval($_GET['up'])];
$prt[$_GET['up']] = $prt[$_GET['up'] - 1];
$prt[$_GET['up'] - 1] = $prt1;
$prtNew = implode('|', $prt);
$u->info['prmenu'] = $prtNew;
mysql_query(
'UPDATE `stats` SET `prmenu`="' . mysql_real_escape_string(
$u->info['prmenu']
) . '" WHERE `id`="' . $u->info['id'] . '" LIMIT 1'
);
$prt = explode('|', $u->info['prmenu']);
}
} elseif (isset($_GET['down'])) {
$i = 0;
if (isset($prt[$_GET['down']], $prt[$_GET['down'] + 1])) {
$prt1 = $prt[intval($_GET['down'])];
$prt[$_GET['down']] = $prt[$_GET['down'] + 1];
$prt[$_GET['down'] + 1] = $prt1;
$prtNew = implode('|', $prt);
$u->info['prmenu'] = $prtNew;
mysql_query(
'UPDATE `stats` SET `prmenu`="' . mysql_real_escape_string(
$u->info['prmenu']
) . '" WHERE `id`="' . $u->info['id'] . '" LIMIT 1'
);
$prt = explode('|', $u->info['prmenu']);
}
}
$i = 0;
while ($i < count($prt)) {
$prtpos[$prt[$i]] = $i;
$i++;
}
function intSpan($val)
{
$val = explode('>', $val);
$val = explode('<', $val[1]);
$val = $val[0];
return $val;
}
$rz0 = '<script>getLine(' . $prtpos[0] . ',"Õàðàêòåðèñòèêè ","0","0","' . $uShow[0] . '",1);</script>';
$rz0 .= '<font id="rz0">';
if ($uShow[0] == 1) {
$i = 1;
while ($i <= 10) {
$u->stats['s' . $i] = 0 + $u->stats['s' . $i];
$i++;
}
$rz0 .= '<div style="display:none" id="lnk0">
Ñèëà: <b>' . $u->stats['s1'] . '</b><br />
Ëîâêîñòü:&nbsp;<b>' . $u->stats['s2'] . '</b><br />
Èíòóèöèÿ:&nbsp;<b>' . $u->stats['s3'] . '</b><br />
Âûíîñëèâîñòü:&nbsp;<b>' . $u->stats['s4'] . '</b><br />
';
if ($u->info['level'] >= 4 || $u->stats['n5'] != 0) {
$rz0 .= '
Èíòåëëåêò:&nbsp;<b>' . $u->stats['s5'] . '</b><br />
';
}
if ($u->info['level'] >= 7 || (@isset($u->stats['n6']) && @$u->stats['n6'] > 0)) {
$rz0 .= '
Ìóäðîñòü:&nbsp;<b>' . @$u->stats['s6'] . '</b><br />
';
}
if ($u->info['level'] >= 10 || @$u->stats['s7'] > 0) {
$rz0 .= '
Äóõîâíîñòü:&nbsp;<b>' . @$u->stats['s7'] . '</b><br />
';
}
}
$rz0 .= '</font></div>';
$rz1 = '<script>getLine(' . $prtpos[1] . ',"Ìîäèôèêàòîðû ","0","0",' . $uShow[1] . ',2);</script>';
if ($uShow[1] == 1) {
//if( $u->info['admin'] > 0 ) {
$rz1 .= '<div style="display:none" id="lnk1">';
$rz1 .= 'Óðîí: ' . $u->inform('yrontest') . '';
$rz1 .= '<br><font color=maroon>Êðèò. óðîí: ' . $u->inform('yrontest-krit') . '</font>';
$rz1 .= '
<br>
<span>Ìô. êðèò. óäàðà: ' . $u->inform('m1') . '';
if (intSpan($u->inform('m3')) != 0) {
$rz1 .= '
</span><br>
<nobr>
<span>Ìô. ìîùíîñòè êðèò. óäàðà: ' . $u->inform('m3') . '';
}
if (intSpan($u->inform('antm3')) != 0) {
$rz1 .= '
</span><br>
<nobr>
<span>Ìô. ïðîòèâ ìîùíîñòè êðèòà: ' . $u->inform('antm3') . '';
}
$rz1 .= '
</span></nobr><br />
<span>Ìô. ïðîòèâ êðèò. óäàðà: ' . $u->inform('m2') . '';
$rz1 .= '</span><br />
<span>Ìô. óâåðòûâàíèÿ: ' . $u->inform('m4') . '';
$rz1 .= '</span><br>
<nobr><span>Ìô. ïðîòèâ óâåðòûâàíèÿ: ' . $u->inform('m5') . '';
$rz1 .= '</span></nobr><br>
<span>Ìô. ïðîáîÿ áðîíè: ' . $u->inform('m9') . '';
$rz1 .= '</span><br>
<span>Ìô. êîíòðóäàðà: ' . $u->inform('m6') . '';
if (intSpan($u->inform('m7')) != 0) {
$rz1 .= '
</span><br>
<span>Ìô. ïàðèðîâàíèÿ: ' . $u->inform('m7') . '';
}
if (intSpan($u->inform('m8')) != 0) {
$rz1 .= '</span><br />
<span>Ìô. áëîêà ùèòîì: ' . $u->inform('m8') . '';
}
if (intSpan($u->inform('za')) != 0) {
$rz1 .= '</span><br />
<span>Çàùèòà îò óðîíà: ' . $u->inform('za') . ' (' . round($u->zago($u->stats['za'])) . '%)';
}
if (intSpan($u->inform('zm')) != 0) {
$rz1 .= '</span><br />
<span>Çàùèòà îò ìàãèè: ' . $u->inform('zma') . ' (' . round($u->zago($u->stats['zma'])) . '%)';
}
if (intSpan($u->inform('zmproc')) != 0) {
$rz1 .= '</span><br />
<span>Áëîêèðîâêà Ìàãè÷åñêîãî Óðîíà: ' . $u->inform('zmproc') . '%';
}
if (intSpan($u->inform('zaproc')) != 0) {
$rz1 .= '</span><br />
<span>Áëîêèðîâêà Ôèçè÷åñêîãî Óðîíà: ' . $u->inform('zaproc') . '%';
}
$rz1 .= '</span>';
$rz1 .= '</nobr></div>';
}
$rz2 = '<script>getLine(' . $prtpos[2] . ',"Áðîíÿ ","0","0",' . $uShow[2] . ',3);</script>';
if ($uShow[2] == 1) {
$rz2 .= '<div style="display:none" id="lnk2">
Áðîíÿ ãîëîâû: ' . $u->stats['mib1'] . '-' . $u->stats['mab1'] . ' (' . ($u->stats['mib1']) . '+d' . ($u->stats['mab1'] - ($u->stats['mib1']) + 1) . ')<br />
Áðîíÿ ãðóäè: ' . $u->stats['mib2'] . '-' . $u->stats['mab2'] . ' (' . ($u->stats['mib2']) . '+d' . ($u->stats['mab2'] - ($u->stats['mib2']) + 1) . ')<br />
Áðîíÿ æèâîòà: ' . $u->stats['mib2'] . '-' . $u->stats['mab2'] . ' (' . ($u->stats['mib2']) . '+d' . ($u->stats['mab2'] - ($u->stats['mib2']) + 1) . ')<br />
Áðîíÿ ïîÿñà: ' . $u->stats['mib3'] . '-' . $u->stats['mab3'] . ' (' . ($u->stats['mib3']) . '+d' . ($u->stats['mab3'] - ($u->stats['mib3']) + 1) . ')<br />
Áðîíÿ íîã: ' . $u->stats['mib4'] . '-' . $u->stats['mab4'] . ' (' . ($u->stats['mib4']) . '+d' . ($u->stats['mab4'] - ($u->stats['mib4']) + 1) . ')<br /></div>';
}
$rz3 = '<script>getLine(' . $prtpos[3] . ',"Ìîùíîñòü ","0","0",' . $uShow[3] . ',4);</script>';
if ($uShow[3] == 1) {
$rz3 .= '<div style="display:none" id="lnk3">';
$i = 1;
$rz3 .= ucfirst(str_replace('Ìô. ìîùíîñòè', 'Ìîùíîñòü ', $u->is['m10'] . ': '));
if (intSpan($u->inform('m10')) > 0) {
$rz3 .= '+';
}
$rz3 .= $u->inform('m10') . '%<br>';
while ($i <= 4) {
if (intSpan($u->inform('pa' . $i)) != 0) {
$rz3 .= ucfirst(str_replace('Ìô. ìîùíîñòè', 'Ìîùíîñòü ', $u->is['pa' . $i] . ': '));
if (intSpan($u->inform('pa' . $i)) > 0) {
$rz3 .= '+';
}
$rz3 .= $u->inform('pa' . $i) . '%<br>';
}
$i++;
}
$i = 1;
while ($i <= 7) {
if (intSpan($u->inform('pm' . $i)) != 0) {
$rz3 .= ucfirst(str_replace('Ìô. ìîùíîñòè ', 'Ìîùíîñòü ', $u->is['pm' . $i] . ': '));
if (intSpan($u->inform('pm' . $i)) > 0) {
$rz3 .= '+';
}
$rz3 .= $u->inform('pm' . $i) . '%<br>';
}
$i++;
}
$rz3 .= '</div>';
}
$zi = [ //Ïðåäìåòû âëèÿþùèå íà çîíû
'n' => [
'', 'ãîëîâà', 'ãðóäü', 'æèâîò', 'ïîÿñ', 'íîãè',
],
1 => [1, 8, 9, 52], //ãîëîâà
2 => [4, 5, 6], //ãðóäü
3 => [2, 4, 5, 6, 13], //æèâîò
4 => [7, 16, 10, 11, 12], //ïîÿñ
5 => [17], //íîãè
];
$rz4 = '<script>getLine(' . $prtpos[4] . ',"Êíîïêè ","0","0",' . $uShow[4] . ',5);</script>';
if ($uShow[4] == 1) {
$rz4 .= '<div style="display:none" id="lnk4"><center style="padding:5px;">';
$rz4 .= '<input class="btn" style="padding:3px 15px 3px 15px;" type="button" name="snatvso" value="Ñíÿòü âñ¸" onclick="top.frames[\'main\'].location=\'main.php?inv=1&remitem&otdel=' . $_GET['otdel'] . '\';"
style="font-weight:bold;" />
&nbsp;';
$hgo = $u->testHome();
if (!isset($hgo['id'])) {
$rz4 .= '<input class="btn" style="padding:3px 15px 3px 15px;" type="button" value="Âîçâðàò" onclick="top.frames[\'main\'].location=\'main.php?homeworld&rnd=' . $code . '\';" style="font-weight:bold;width: 90px" />';
}
unset($hgo);
$rz4 .= '</center>';
$rz4 .= '</div>';
}
$rz5 = '<script>getLine(' . $prtpos[5] . ',"Êîìïëåêòû&nbsp;&nbsp;&nbsp;<a href=\"#\" onClick=\"save_compl();\">çàïîìíèòü</a>&nbsp;","0","0",' . $uShow[5] . ',6);</script>';
if ($uShow[5] == 1) {
$rz5 .= '<div style="display:none" id="lnk5">';
$sp = mysql_query('SELECT * FROM `save_com` WHERE `uid` = "' . $u->info['id'] . '" AND `delete` = "0" LIMIT 10');
while ($pl = mysql_fetch_array($sp)) {
$rz5 .= '<a href="?inv=1&delc1=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&rnd=' . $code . '"><img src="https://img.new-combats.com/i/close2.gif" title="Óäàëèòü êîìïëåêò" width="9" height="9"></a> <small><a href="?inv=1&usec1=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&rnd=' . $code . '">Íàäåòü &quot;' . $pl['name'] . '&quot;</a></small><br>';
}
$rz5 .= '</div>';
}
$rz6 = '<script>getLine(' . $prtpos[6] . ',"Ïðèåìû &nbsp; &nbsp;<a href=\"/main.php?skills=1&rz=4&rnd=' . $code . '\">íàñòðîèòü</a>&nbsp;","0","0",' . $uShow[6] . ',7);</script>';
if ($uShow[6] == 1) {
$rz6 .= '<div style="display:none" id="lnk6">'; //âîçìîæíî 5
$sp = mysql_query('SELECT * FROM `complects_priem` WHERE `uid` = "' . $u->info['id'] . '" LIMIT 10');
$rz6 .= '<small>';
while ($pl = mysql_fetch_array($sp)) {
$rz6 .= '<a onclick="if(confirm(\'Óäàëèòü íàáîð ?\')){location=\'main.php?inv=1&otdel=' . round(
(int)$_GET['otdel']
) . '&delcop=' . $pl['id'] . '\'}" href="javascript:void(0)"><img src="https://' . $c['img'] . '/i/close2.gif" width="9" height="9"></a> <a href="main.php?inv=1&otdel=' . round(
(int)$_GET['otdel']
) . '&usecopr=' . $pl['id'] . '">Èñïîëüçîâàòü &quot;' . $pl['name'] . '&quot;</a><br>';
}
$rz6 .= '</small>';
$rz6 .= '</div>'; //âîçìîæíî 5
}
$i = 0;
while ($i < count($prt)) {
if (isset(${'rz' . $prt[$i]})) {
echo ${'rz' . $prt[$i]};
}
$i++;
}
//
?>
<script>
<?php
$i = 0;
while ($i < count($uShow)) {
if (isset($uShow[$i]) && $uShow[$i] == 1) {
echo '$("#lnk' . $i . '").slideToggle();';
}
$i++;
}
?>
</script>
</td>
</tr>
</table>