game/modules_data/vip.php

228 lines
16 KiB
PHP

<?
echo "
<script language='JavaScript'>
var elem = document.getElementById('se-pre-con');
elem.parentNode.removeChild(elem);
</script>
";
if(!defined('GAME') || ($u->stats['bronze']<1 && $u->stats['silvers']<1 && $u->stats['gold']<1))
{
die();
}
if($u->error!='')
{
echo '<font color="red"><b>'.$u->error.'</b></font><br>';
}
$vt = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `uid` = "'.$u->info['id'].'" AND `delete` = "0" AND `data` LIKE "%account=%" LIMIT 1'));
if($u->stats['bronze']>0) $account = 'bronze'; //Bronze Premium Account
elseif($u->stats['silvers']>0) $account = 'silvers'; //Silver Premium Account
elseif($u->stats['gold']>0) $account = 'gold'; //Gold Premium Account
$vu = array(0,0,0,0,0,0,0);
//Àáèëêè $ability
$ability = array(
"bronze" => array(
//Ñâèòêè Bronze
array(1463,1,0,0,0,'tr_lvl=4|nohaos=1|onlyOne=1|oneType=24|musor=2|noremont=1|sudba='.$u->info['login'].'|srok=86400|nosale=1',5),
array(3101,1,0,0,0,'useOnLogin=1|onlyOne=1|oneType=33|tr_lvl=4|noremont=1|musor=1|sudba='.$u->info['login'].'|srok=86400|nosale=1',5),
array(4371,1,0,0,0,'onlyOne=1|oneType=36|tr_lvl=4|noremont=1|musor=1|sudba='.$u->info['login'].'|srok=86400|nosale=1',5),
array(2709,1,0,0,0,'tr_lvl=7|useOnLogin=1|musor=1|noremont=1|magic_hpNow=900|sudba='.$u->info['login'].'|srok=86400|nosale=1',5),
array(994,1,0,0,0, 'useOnLogin=1|onlyOne=1|oneType=44|tr_lvl=4|noremont=1|musor=1|sudba='.$u->info['login'].'|srok=86400|nosale=1',5),
array(1001,1,0,0,0,'useOnLogin=1|onlyOne=1|oneType=7|tr_lvl=7|noremont=1|musor=1|sudba='.$u->info['login'].'|srok=86400|nosale=1',5),
array(1461,1,0,0,0,'tr_lvl=2|nohaos=1|onlyOne=1|oneType=24|musor=2|noremont=1|sudba='.$u->info['login'].'|srok=86400|nosale=1',5),
array(1462,1,0,0,0,'tr_lvl=2|nohaos=1|onlyOne=1|oneType=24|musor=2|noremont=1|sudba='.$u->info['login'].'|srok=86400|nosale=1',5),
),
"silvers" => array(
//Ñâèòêè Silver
array(5239,1,0,0,0,'tr_lvl=4|nohaos=1|onlyOne=1|oneType=24|musor=2|noremont=1|sudba='.$u->info['login'].'|srok=86400|nosale=1',1),
//array(3101,1,0,0,0,'useOnLogin=1|onlyOne=1|oneType=33|tr_lvl=4|noremont=1|musor=1|sudba='.$u->info['login'].'|srok=86400|nosale=1',5),
//array(4371,1,0,0,0,'onlyOne=1|oneType=36|tr_lvl=4|noremont=1|musor=1|sudba='.$u->info['login'].'|srok=86400|nosale=1',1),
/*array(994,1,0,0,0, 'useOnLogin=1|onlyOne=1|oneType=44|tr_lvl=4|noremont=1|musor=1|sudba='.$u->info['login'].'|srok=86400|nosale=1',5),
array(1001,1,0,0,0,'useOnLogin=1|onlyOne=1|oneType=7|tr_lvl=7|noremont=1|musor=1|sudba='.$u->info['login'].'|srok=86400|nosale=1',5),
array(1461,1,0,0,0,'tr_lvl=2|nohaos=1|onlyOne=1|oneType=24|musor=2|noremont=1|sudba='.$u->info['login'].'|srok=86400|nosale=1',5),
array(1462,1,0,0,0,'tr_lvl=2|nohaos=1|onlyOne=1|oneType=24|musor=2|noremont=1|sudba='.$u->info['login'].'|srok=86400|nosale=1',5),
array(4926,1,0,0,0,'tr_lvl=7|onlyOne=1|musor=2|noremont=1|oneType=53|sudba='.$u->info['login'].'|srok=86400|nosale=1',5),
array(4927,1,0,0,0,'tr_lvl=7|onlyOne=1|musor=2|noremont=1|oneType=53|sudba='.$u->info['login'].'|srok=86400|nosale=1',5),
array(4928,1,0,0,0,'tr_lvl=7|onlyOne=1|musor=2|noremont=1|oneType=53|sudba='.$u->info['login'].'|srok=86400|nosale=1',5),
array(4929,1,0,0,0,'tr_lvl=7|onlyOne=1|musor=2|noremont=1|oneType=53|sudba='.$u->info['login'].'|srok=86400|nosale=1',5),
array(4930,1,0,0,0,'tr_lvl=7|onlyOne=1|musor=2|noremont=1|oneType=53|sudba='.$u->info['login'].'|srok=86400|nosale=1',5),*/
),
"gold" => array(
//Ñâèòêè Gold
array(2412,3,0,0,0,'tr_lvl=4|nohaos=1|oneType=24|musor=2|noremont=1|sudba='.$u->info['login'].'|srok=43200|nosale=1',1),
array(6455,2,0,0,0,'tr_lvl=4|nohaos=1|oneType=0|musor=2|noremont=1|sudba='.$u->info['login'].'|srok=43200|nosale=1',1),
//array(4758,1,0,0,0,'useOnLogin=1|onlyOne=1|oneType=33|tr_lvl=10|noremont=1|musor=1|sudba='.$u->info['login'].'|srok=86400|nosale=1',1),
//array(4943,1,0,0,0,'useOnLogin=1|onlyOne=1|oneType=33|tr_lvl=4|noremont=1|musor=1|sudba='.$u->info['login'].'|srok=86400|nosale=1',1),
//array(4371,1,0,0,0,'onlyOne=1|oneType=36|tr_lvl=4|noremont=1|musor=1|sudba='.$u->info['login'].'|srok=86400|nosale=1',1),
/*array(994,1,0,0,0, 'useOnLogin=1|onlyOne=1|oneType=44|tr_lvl=4|noremont=1|musor=1|sudba='.$u->info['login'].'|srok=86400|nosale=1',5),
array(1001,1,0,0,0,'useOnLogin=1|onlyOne=1|oneType=7|tr_lvl=7|noremont=1|musor=1|sudba='.$u->info['login'].'|srok=86400|nosale=1',5),
array(1461,1,0,0,0,'tr_lvl=2|nohaos=1|onlyOne=1|oneType=24|musor=2|noremont=1|sudba='.$u->info['login'].'|srok=86400|nosale=1',5),
array(1462,1,0,0,0,'tr_lvl=2|nohaos=1|onlyOne=1|oneType=24|musor=2|noremont=1|sudba='.$u->info['login'].'|srok=86400|nosale=1',5),
array(4926,1,0,0,0,'tr_lvl=7|onlyOne=1|musor=2|noremont=1|oneType=53|sudba='.$u->info['login'].'|srok=86400|nosale=1',5),
array(4927,1,0,0,0,'tr_lvl=7|onlyOne=1|musor=2|noremont=1|oneType=53|sudba='.$u->info['login'].'|srok=86400|nosale=1',5),
array(4928,1,0,0,0,'tr_lvl=7|onlyOne=1|musor=2|noremont=1|oneType=53|sudba='.$u->info['login'].'|srok=86400|nosale=1',5),
array(4929,1,0,0,0,'tr_lvl=7|onlyOne=1|musor=2|noremont=1|oneType=53|sudba='.$u->info['login'].'|srok=86400|nosale=1',5),
array(4930,1,0,0,0,'tr_lvl=7|onlyOne=1|musor=2|noremont=1|oneType=53|sudba='.$u->info['login'].'|srok=86400|nosale=1',5),
array(4936,1,0,0,0,'tr_lvl=7|onlyOne=1|musor=2|noremont=1|oneType=58|sudba='.$u->info['login'].'|srok=86400|nosale=1',5),
array(4937,1,0,0,0,'tr_lvl=7|onlyOne=1|musor=2|noremont=1|oneType=59|sudba='.$u->info['login'].'|srok=86400|nosale=1',5),*/
)
);
$vi = array(
);
?>
<table width="100%">
<tr>
<td width="150" align="right"><td style="width: 25%; vertical-align: top; text-align: right; ">
<td style="width: 25%; vertical-align: top; text-align: right; "><input class="btn" type='button' value='Îáíîâèòü' style='width: 100px' onclick='location=&quot;main.php?vip=1&quot;' />
&nbsp;
<input type="button" value="Âåðíóòüñÿ" style='width: 100px' class="btn" onclick='location=&quot;main.php&quot;' /></td>
<? if($account == 'bronze'){ ?>
<table width="100%" border="0" cellpadding="5" cellspacing="0" bgcolor="#E1E1E1">
<td style="border-bottom:1px solid #CCCCCC;">&bull; Âîññòàíîâëåíèå æèçíè è ìàííû +5%</td>
<td width="75" align="center" valign="middle" bgcolor="#DADADA" style="border-bottom:1px solid #CCCCCC;"><b>Âå÷íî</b></td>
<td style="border-bottom:1px solid #CCCCCC;"><font color=darkgreen><b>Çäðîðîâüå è ìàíà âîññòàíàâëèâàþòñÿ áûñòðåå.</b></font></td>
</tr>
<tr>
<td style="border-bottom:1px solid #CCCCCC;">&bull; Ïîëó÷àåìûé îïûò â áîþ +5%</td>
<td width="75" align="center" valign="middle" bgcolor="#DADADA" style="border-bottom:1px solid #CCCCCC;"><b>Âå÷íî</b></td>
<td style="border-bottom:1px solid #CCCCCC;"><font color=darkgreen><b>Ïîâûøåíèå óðîâíÿ ïåðñîíàæà ñòàíåò áûñòðåå.</b></font></td>
<tr>
<td style="border-bottom:1px solid #CCCCCC;">&bull; Ñêèäêà íà ðåìîíò +5%</td>
<td width="75" align="center" valign="middle" bgcolor="#DADADA" style="border-bottom:1px solid #CCCCCC;"><b>Âå÷íî</b></td>
<td style="border-bottom:1px solid #CCCCCC;"><font color=darkgreen><b>Âû ÷èíèòå ñâîè âåùè íà 5% äåøåâëå.</b></font></td>
</tr>
<tr>
<td style="border-bottom:1px solid #CCCCCC;">&bull; Óâåëè÷åíèå ðþêçàêà +10 </td>
<td width="75" align="center" valign="middle" bgcolor="#DADADA" style="border-bottom:1px solid #CCCCCC;"><b>Âå÷íî</b></td>
<td style="border-bottom:1px solid #CCCCCC;"><font color=darkgreen><b>Óâåëè÷èâàåò ðþêçàê íà 10+ åäèíèö.</b></font></td>
</tr>
<tr>
<td style="border-bottom:1px solid #CCCCCC;">&bull; Áîíóñ Æèçíè +1 </td>
<td width="75" align="center" valign="middle" bgcolor="#DADADA" style="border-bottom:1px solid #CCCCCC;"><b>Âå÷íî</b></td>
<td style="border-bottom:1px solid #CCCCCC;"><font color=darkgreen><b>1 Âûíîñëèâîñòü = 1 ÕÏ</b></font></td>
</tr>
<?}?>
<? if($account == 'silvers'){ ?>
<table width="100%" border="0" cellpadding="5" cellspacing="0" bgcolor="#E1E1E1">
<td style="border-bottom:1px solid #CCCCCC;">&bull; Âîññòàíîâëåíèå æèçíè è ìàííû +10%</td>
<td width="75" align="center" valign="middle" bgcolor="#DADADA" style="border-bottom:1px solid #CCCCCC;"><b>Âå÷íî</b></td>
<td style="border-bottom:1px solid #CCCCCC;"><font color=darkgreen><b>Çäðîðîâüå è ìàíà âîññòàíàâëèâàþòñÿ áûñòðåå.</b></font></td>
</tr>
<tr>
<td style="border-bottom:1px solid #CCCCCC;">&bull; Ïîëó÷àåìûé îïûò â áîþ +10%</td>
<td width="75" align="center" valign="middle" bgcolor="#DADADA" style="border-bottom:1px solid #CCCCCC;"><b>Âå÷íî</b></td>
<td style="border-bottom:1px solid #CCCCCC;"><font color=darkgreen><b>Ïîâûøåíèå óðîâíÿ ïåðñîíàæà ñòàíåò áûñòðåå.</b></font></td>
<tr>
<td style="border-bottom:1px solid #CCCCCC;">&bull; Ñêèäêà íà ðåìîíò +10%</td>
<td width="75" align="center" valign="middle" bgcolor="#DADADA" style="border-bottom:1px solid #CCCCCC;"><b>Âå÷íî</b></td>
<td style="border-bottom:1px solid #CCCCCC;"><font color=darkgreen><b>Âû ÷èíèòå ñâîè âåùè íà 10% äåøåâëå.</b></font></td>
</tr>
<tr>
<td style="border-bottom:1px solid #CCCCCC;">&bull; Óâåëè÷åíèå ðþêçàêà +20 </td>
<td width="75" align="center" valign="middle" bgcolor="#DADADA" style="border-bottom:1px solid #CCCCCC;"><b>Âå÷íî</b></td>
<td style="border-bottom:1px solid #CCCCCC;"><font color=darkgreen><b>Óâåëè÷èâàåò ðþêçàê íà 20+ åäèíèö.</b></font></td>
</tr>
<tr>
<td style="border-bottom:1px solid #CCCCCC;">&bull; Ñêîðîñòü ïåðåäâèæåíèÿ +5% </td>
<td width="75" align="center" valign="middle" bgcolor="#DADADA" style="border-bottom:1px solid #CCCCCC;"><b>Âå÷íî</b></td>
<td style="border-bottom:1px solid #CCCCCC;"><font color=darkgreen><b>Ïî ïîäçåìåëüÿì âû äâèãàåòåñü áûñòðåå</b></font></td>
</tr>
<tr>
<td style="border-bottom:1px solid #CCCCCC;">&bull; Áîíóñ Æèçíè +2 </td>
<td width="75" align="center" valign="middle" bgcolor="#DADADA" style="border-bottom:1px solid #CCCCCC;"><b>Âå÷íî</b></td>
<td style="border-bottom:1px solid #CCCCCC;"><font color=darkgreen><b>1 Âûíîñëèâîñòü = 2 ÕÏ</b></font></td>
</tr>
<?}?>
<? if($account == 'gold'){ ?>
<table width="100%" border="0" cellpadding="5" cellspacing="0" bgcolor="#E1E1E1">
<td style="border-bottom:1px solid #CCCCCC;">&bull; Âîññòàíîâëåíèå æèçíè è ìàííû +50%</td>
<td width="75" align="center" valign="middle" bgcolor="#DADADA" style="border-bottom:1px solid #CCCCCC;"><b>Íà âðåìÿ äåéñòâèÿ Áëàãîäàòè</b></td>
<td style="border-bottom:1px solid #CCCCCC;"><font color=darkgreen><b>Çäðîðîâüå è ìàíà âîññòàíàâëèâàþòñÿ áûñòðåå â äâà ðàçà.</b></font></td>
</tr>
<tr>
<td style="border-bottom:1px solid #CCCCCC;">&bull; Ñêèäêà íà ðåìîíò +50%</td>
<td width="75" align="center" valign="middle" bgcolor="#DADADA" style="border-bottom:1px solid #CCCCCC;"><b>Íà âðåìÿ äåéñòâèÿ Áëàãîäàòè</b></td>
<td style="border-bottom:1px solid #CCCCCC;"><font color=darkgreen><b>Âû ÷èíèòå ñâîè âåùè íà 50% äåøåâëå.</b></font></td>
</tr>
<tr>
<td style="border-bottom:1px solid #CCCCCC;">&bull; Ñêîðîñòü ïåðåäâèæåíèÿ +25% </td>
<td width="75" align="center" valign="middle" bgcolor="#DADADA" style="border-bottom:1px solid #CCCCCC;"><b>Íà âðåìÿ äåéñòâèÿ Áëàãîäàòè</b></td>
<td style="border-bottom:1px solid #CCCCCC;"><font color=darkgreen><b>Ïî ïîäçåìåëüÿì âû äâèãàåòåñü áûñòðåå</b></font></td>
</tr>
<tr>
<td style="border-bottom:1px solid #CCCCCC;">&bull; Áîíóñ Æèçíè +250</td>
<td width="75" align="center" valign="middle" bgcolor="#DADADA" style="border-bottom:1px solid #CCCCCC;"><b>Íà âðåìÿ äåéñòâèÿ Áëàãîäàòè</b></td>
<td style="border-bottom:1px solid #CCCCCC;"><font color=darkgreen><b>Óâåëè÷èâàåò âàø óðîâåíü æèçíè.</b></font></td>
</tr>
<tr>
<td style="border-bottom:1px solid #CCCCCC;">&bull; Ìîùíîñòü óðîíà è ìàãèè +15</td>
<td width="75" align="center" valign="middle" bgcolor="#DADADA" style="border-bottom:1px solid #CCCCCC;"><b>Íà âðåìÿ äåéñòâèÿ Áëàãîäàòè</b></td>
<td style="border-bottom:1px solid #CCCCCC;"><font color=darkgreen><b>Óâåëè÷èâàåò ìîùíîñòü óðîíà è ìàãèè íà 15 åäåíèö.</b></font></td>
</tr>
<tr>
<td style="border-bottom:1px solid #CCCCCC;">&bull; Çàùèòà îò óðîíà è ìàãèè +50</td>
<td width="75" align="center" valign="middle" bgcolor="#DADADA" style="border-bottom:1px solid #CCCCCC;"><b>Íà âðåìÿ äåéñòâèÿ Áëàãîäàòè</b></td>
<td style="border-bottom:1px solid #CCCCCC;"><font color=darkgreen><b>Óâåëè÷èâàåò çàùèòó îò óðîíà è ìàãèè íà 50 åäåíèö.</b></font></td>
</tr>
<?}?>
</table>
<fieldset><p><b>Äîñòóïíûå ïðåäìåòû:</b><br /><small>(×òîáû çàáðàòü ïðåäìåò ïðîñòî êëèêíèòå íà åãî èçîáðàæåíèå)</small></p>
<p>
<?
$i = 0; $seet = '';
$vnr = array(0 => 'íà ñåãîäíÿ',1 => ' âñåãî');
while($i < count($ability[$account])) {
if($ability[$account][$i][1]>0) {
$itm = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "'.$ability[$account][$i][0].'" LIMIT 1'));
if(isset($itm['id'])) {
$vix = 0;
if($ability[$account][$i][4] == 0) {
//çà ñåãîäíÿ
$vix = $u->testAction('`uid` = "'.$u->info['id'].'" AND `time`>='.strtotime('now 00:00:00').' AND `vars` = "vitm_'.$itm['id'].'"',2);
$vix = $vix[0];
}else{
//âñåãî çà äåéñòâèå ïðåìèóìà
$vix = $u->testAction('`uid` = "'.$u->info['id'].'" AND `time`>='.$vt['timeUse'].' AND `vars` = "vitm_'.$itm['id'].'" ',2);
$vix = $vix[0];
}
if($ability[$account][$i][1]-$vix > 0) {
if(isset($_GET['take_item_vip']) && $_GET['take_item_vip'] == $itm['id']) {
$nitm = $u->addItem($itm['id'],$u->info['id'],$ability[$account][$i][5]);
if($ability[$account][6]>0) {
}
$u->addAction(time(),'vitm_'.$itm['id'],'');
echo '<font color="red">Ïðåäìåò &quot;<b>'.$itm['name'].'</b>&quot; ïåðåìåùåí ê Âàì â èíâåíòàðü!</font><br><br>';
}
}
$seet0 = '';
//Âûâîä ïðåäìåòîâ âèï
$seet0 .= '<img '.$vix.' title="'.$itm['name'].'
(Îñòàëîñü '.$vnr[$ability[$i][4]].': '.($ability[$account][$i][1]-$vix).' øò.)" src="https://'.$c['img'].'/i/items/'.$itm['img'].'"> ';
if($ability[$account][$i][1]-$vix > 0) {
$seet0 = '<a href="main.php?vip=1&take_item_vip='.$itm['id'].'">'.$seet0.'</a>';
}else{
$seet0 = '<span style="filter: alpha(opacity=20); -moz-opacity: 0.20; -khtml-opacity: 0.20; opacity: 0.20;">'.$seet0.'</span>';
}
$seet .= $seet0;
}
}
$i++;
}
echo $seet;
?>
</p></td></fieldset>
</tr>
</table>