284 lines
9.6 KiB
PHP
284 lines
9.6 KiB
PHP
<?php
|
|
if(!defined('GAME'))die();
|
|
|
|
if(isset($file) && $file[0]=='nakova2.php'){
|
|
if(isset($_GET['back'])) {
|
|
mysql_query('UPDATE `stats` SET `x` = "3",`y` = "43",`s` = "3" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
|
header('location: main.php');
|
|
}
|
|
$test = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_nakova2_use" LIMIT 1'));
|
|
if(isset($test['id']) && $test['uid'] != $u->info['id']) {
|
|
mysql_query('UPDATE `stats` SET `x` = "3",`y` = "43",`s` = "3" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
|
header('location: main.php');
|
|
die();
|
|
}elseif(!isset($test['id'])) {
|
|
if( $u->info['sex'] == 0 ) {
|
|
$d->sys_chat('<b>'.$u->info['login'].'</b> âîñïîëüçîâàëñÿ "Íàêîâàëüíåé", äðóãèì äàííûé îáüåêò ñòàë íåäîñòóïåí');
|
|
}else{
|
|
$d->sys_chat('<b>'.$u->info['login'].'</b> âîñïîëüçîâàëàñü "Íàêîâàëüíåé", äðóãèì äàííûé îáüåêò ñòàë íåäîñòóïåí');
|
|
}
|
|
mysql_query('INSERT INTO `dungeon_actions` (`dn`,`uid`,`time`,`vars`) VALUES (
|
|
"'.$u->info['dnow'].'","'.$u->info['id'].'","'.time().'","obj_nakova2_use"
|
|
)');
|
|
}
|
|
if(!isset($_GET['otdel'])){
|
|
$_GET['otdel'] = 20;
|
|
}
|
|
|
|
$sid = 700;
|
|
|
|
$error = '';
|
|
|
|
if( isset($_GET['buy']) ) {
|
|
if( $u->newAct($_GET['sd4']) == true ){
|
|
$re = $u->buyItem($sid,(int)$_GET['buy'],(int)$_GET['x'],'sudba='.$u->info['login'].'|frompisher='.$d->info['id2'].'|nosale=1');
|
|
}else{
|
|
$re = 'Âû óâåðåíû ÷òî õîòèòå ïîëó÷èòü ýòîò ïðåäìåò?';
|
|
}
|
|
}
|
|
|
|
if($re!=''){ echo '<div align="right"><font color="red"><b>'.$re.'</b></font></div>'; } ?>
|
|
<script type="text/javascript">
|
|
function AddCount(name, txt){
|
|
document.getElementById("hint4").innerHTML = '<table border=0 width=100% cellspacing=1 cellpadding=0 bgcolor="#CCC3AA"><tr><td align=center><B>Êóïèòü íåñê. øòóê</td><td width=20 align=right valign=top style="cursor: pointer" onclick="closehint3();"><BIG><B>x</TD></tr><tr><td colspan=2>'+
|
|
'<form method=post><table border=0 width=100% cellspacing=0 cellpadding=0 bgcolor="#FFF6DD"><tr><INPUT TYPE="hidden" name="set" value="'+name+'"><td colspan=2 align=center><B><I>'+txt+'</td></tr><tr><td width=80% align=right>'+
|
|
'Êîëè÷åñòâî (øò.) <INPUT TYPE="text" NAME="count" id=count size=4></td><td width=20%> <INPUT TYPE="submit" value=" »» ">'+
|
|
'</TD></TR></form></TABLE></td></tr></table>';
|
|
document.getElementById("hint4").style.visibility = 'visible';
|
|
document.getElementById("hint4").style.left = '100px';
|
|
document.getElementById("hint4").style.top = '100px';
|
|
document.getElementById("count").focus();
|
|
}
|
|
function closehint3() {
|
|
document.getElementById('hint4').style.visibility='hidden';
|
|
Hint3Name='';
|
|
}
|
|
</script>
|
|
<style type="text/css">
|
|
.pH3 { COLOR: #8f0000; FONT-FAMILY: Arial; FONT-SIZE: 12pt; FONT-WEIGHT: bold; }
|
|
.class_ {
|
|
font-weight: bold;
|
|
color: #C5C5C5;
|
|
cursor:pointer;
|
|
}
|
|
.class_st {
|
|
font-weight: bold;
|
|
color: #659BA3;
|
|
cursor:pointer;
|
|
}
|
|
.class__ {
|
|
font-weight: bold;
|
|
color: #FFFFFF;
|
|
cursor:pointer;
|
|
background-color: #659BA3;
|
|
}
|
|
.class__st {
|
|
font-weight: bold;
|
|
color: #FFFFFF;
|
|
cursor:pointer;
|
|
background-color: #659BA3;
|
|
font-size: 10px;
|
|
}
|
|
.class_old {
|
|
font-weight: bold;
|
|
color: #919191;
|
|
cursor:pointer;
|
|
}
|
|
.class__old {
|
|
font-weight: bold;
|
|
color: #FFFFFF;
|
|
cursor:pointer;
|
|
background-color: #838383;
|
|
font-size: 10px;
|
|
}
|
|
</style>
|
|
<TABLE width="100%" cellspacing="0" cellpadding="0">
|
|
<tr>
|
|
<td valign="top">
|
|
<div align="center" class="pH3">Íàêîâàëüíÿ</div><?php
|
|
echo '<b style="color:red">'.$error.'</b>';
|
|
?><br />
|
|
<TABLE width="100%" cellspacing="0" cellpadding="4">
|
|
<TR>
|
|
<TD valign="top" align="left">
|
|
<form name="F1" method="post">
|
|
<!--Ìàãàçèí-->
|
|
<div id="hint3" style="visibility:hidden"></div>
|
|
<table width="100%" cellspacing="0" cellpadding="0" bgcolor="#a5a5a5">
|
|
<tr>
|
|
<td align="center" height="21">
|
|
<?php
|
|
/*íàçâàíèÿ ðàçäåëîâ (ñâåðõó)*/
|
|
$otdels_small_array = array (
|
|
//1 => '<b>Îòäåë "Ðàçíîå"</b>',
|
|
//2 => '<b>Îòäåë "Îðóæèå: êàñòåòû,íîæè"</b>',
|
|
//3 => '<b>Îòäåë "Îðóæèå: òîïîðû"</b>',
|
|
//4 => '<b>Îòäåë "Îðóæèå: äóáèíû,áóëàâû"</b>',
|
|
//5 => '<b>Îòäåë "Îðóæèå: ìå÷è"</b>',
|
|
//6 => '<b>Îòäåë "Îðóæèå: ìàãè÷åñêèå ïîñîõè"</b>',
|
|
//
|
|
//7 => '<b>Îòäåë Ðåñóðñû: ïåùåðíûå </b>',
|
|
//
|
|
//8 => '<b>Îòäåë "Îäåæäà: ïëàùè è íàêèäêè"</b>',
|
|
//9 => '<b>Îòäåë "Îäåæäà: ñàïîãè"</b>',
|
|
//10 => '<b>Îòäåë "Îäåæäà: ïåð÷àòêè"</b>',
|
|
//11 => '<b>Îòäåë "Îäåæäà: ðóáàõè"</b>',
|
|
//12 => '<b>Îòäåë "Îäåæäà: ëåãêàÿ áðîíÿ"</b>',
|
|
//13 => '<b>Îòäåë "Îäåæäà: òÿæåëàÿ áðîíÿ"</b>',
|
|
//14 => '<b>Îòäåë "Îäåæäà: øëåìû"</b>',
|
|
//15 => '<b>Îòäåë "Îäåæäà: íàðó÷è"</b>',
|
|
//16 => '<b>Îòäåë "Îäåæäà: ïîÿñà"</b>',
|
|
//17 => '<b>Îòäåë "Îäåæäà: ïîíîæè"</b>',
|
|
//
|
|
//18 => '<b>Îòäåë "Ùèòû"</b>',
|
|
//
|
|
19 => '<b>Îòäåë "Þâåëèðíûå òîâàðû: ñåðüãè"</b>',
|
|
20 => '<b>Îòäåë "Þâåëèðíûå òîâàðû: îæåðåëüÿ"</b>'
|
|
//21 => '<b>Îòäåë "Þâåëèðíûå òîâàðû: êîëüöà"</b>',
|
|
//
|
|
//22 => '<b>Îòäåë "Çàêëèíàíèÿ: íåéòðàëüíûå"</b>',
|
|
//23 => '<b>Îòäåë "Çàêëèíàíèÿ: áîåâûå è çàùèòíûå"</b>',
|
|
//24 => '<b>Îòäåë "Çàêëèíàíèÿ: ïèðîæêè"</b>',
|
|
//25 => '<b>Îòäåë "Çàêëèíàíèÿ: èñöåëÿþùèå"</b>',
|
|
//26 => '<b>Îòäåë "Çàêëèíàíèÿ: ìàíÿùèå"</b>',
|
|
//27 => '<b>Îòäåë "Çàêëèíàíèÿ: ñòðàòåãè÷åñêèå"</b>',
|
|
//28 => '<b>Îòäåë "Çàêëèíàíèÿ: òàêòè÷åñêèå"</b>',
|
|
//29 => '<b>Îòäåë "Çàêëèíàíèÿ: ñåðâèñíûå"</b>',
|
|
//
|
|
//30 => '<b>Îòäåë "Àìóíèöèÿ"</b>',
|
|
//31 => '<b>Îòäåë "Ýëèêñèðû"</b>',
|
|
//32 => '<b>Îòäåë "Ïîäàðêè"</b>',
|
|
//33 => '<b>Îòäåë "Ïîäàðêè: íåäîáðûå"</b>',
|
|
//34 => '<b>Îòäåë "Ïîäàðêè: óïàêîâêà"</b>',
|
|
//35 => '<b>Îòäåë "Ïîäàðêè: îòêðûòêè"</b>',
|
|
//36 => '<b>Îòäåë "Ïîäàðêè: ôåéåðâåðêè"</b>',
|
|
//37 => '<b>Îòäåë "Óñèëåíèå îðóæèÿ: çàòî÷êè"</b>',
|
|
//38 => '<b>Îòäåë "Íàñòàâíè÷åñòâî: îáðàçû"</b>'
|
|
|
|
);
|
|
if(isset($otdels_small_array[$_GET['otdel']])){
|
|
echo $otdels_small_array[$_GET['otdel']];
|
|
}
|
|
?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<!--Ðþêçàê / Ïðèëàâîê-->
|
|
<table width="100%" CELLSPACING="1" CELLPADDING="1" bgcolor="#a5a5a5"><?php
|
|
//Âûâîäèì âåùè â ìàãàçèíå äëÿ ïîêóïêè
|
|
$u->shopItems($sid);
|
|
?></TABLE>
|
|
</TD>
|
|
</TR>
|
|
</TABLE>
|
|
</FORM>
|
|
</TD>
|
|
</TR>
|
|
</TABLE>
|
|
</td>
|
|
<td width="280" valign="top">
|
|
<TABLE cellspacing="0" cellpadding="0">
|
|
<tr>
|
|
<TD width="100%"> </TD>
|
|
<TD>
|
|
<table border="0" cellpadding="0" cellspacing="0">
|
|
<tr align="right" valign="top">
|
|
<td>
|
|
<!-- -->
|
|
<? echo $goLis; ?>
|
|
<!-- -->
|
|
<table border="0" cellspacing="0" cellpadding="0">
|
|
<tr>
|
|
<td nowrap="nowrap">
|
|
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DEDEDE">
|
|
<tr>
|
|
<td bgcolor="#D3D3D3"><img src="https://img.new-combats.com/i/move/links.gif" width="9" height="7" /></td>
|
|
<td bgcolor="#D3D3D3" nowrap><a href="#" id="greyText" class="menutop" onclick="location='main.php?back=1&rnd=<?=$code?>';">Âåðíóòüñÿ íàçàä</a></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<div><br />
|
|
<div align="right">
|
|
<small>
|
|
Ìàññà: <?=$u->aves['now']?>/<?=$u->aves['max']?> <br />
|
|
Ó âàñ â íàëè÷èè: <b style="color:#339900;"><?php echo round($u->info['money'],2); ?> êð.</b>
|
|
</small>
|
|
</div>
|
|
<br />
|
|
<INPUT TYPE="button" value="Îáíîâèòü" onclick="location = '<? echo $_SERVER['REQUEST_URI']; ?>';"><BR>
|
|
</div>
|
|
<div style="background-color:#A5A5A5;padding:1"><center><B>Îòäåëû ìàãàçèíà</B></center></div>
|
|
<div style="line-height:17px;">
|
|
<?php
|
|
/*íàçâàíèÿ ðàçäåëîâ (ñïðàâà)*/
|
|
$otdels_array = array (
|
|
//2=>'Êàñòåòû è íîæè',
|
|
//3=>'Òîïîðû',
|
|
//4=>'Äóáèíû è áóëàâû',
|
|
//5=>'Ìå÷è',
|
|
//6=>'Ìàãè÷åñêèå ïîñîõè',
|
|
//7=>'Ðåñóðñû',
|
|
//8=>'Ïëàùè è íàêèäêè '
|
|
//9=>' Ñàïîãè',
|
|
//10=>'Ïåð÷àòêè',
|
|
//11=>'Ðóáàõè',
|
|
//12=>'Ëåãêàÿ áðîíÿ',
|
|
//13=>'Òÿæåëàÿ áðîíÿ',
|
|
//14=>'Øëåìû',
|
|
//15=>'Íàðó÷è',
|
|
//16=>'Ïîÿñà',
|
|
//17=>'Ïîíîæè',
|
|
//18=>'Ùèòû',
|
|
//19=>'Þâåëèðíûå òîâàðû: ñåðüãè',
|
|
20=>' Îæåðåëüÿ',
|
|
21=>' Êîëüöà'
|
|
|
|
//22=>'Çàêëèíàíèÿ',
|
|
//23=>'áîåâûå è çàùèòíûå',
|
|
//24=>'ïèðîæêè',
|
|
//25=>'èñöåëÿþùèå',
|
|
//26=>'ìàíÿùèå',
|
|
//27=>'ñòðàòåãè÷åñêèå',
|
|
//28=>'òàêòè÷åñêèå',
|
|
//29=>'ñåðâèñíûå',
|
|
//
|
|
//30=>'Àìóíèöèÿ',
|
|
//31=>'Ýëèêñèðû',
|
|
//32=>'Ïîäàðêè',
|
|
//33=>'íåäîáðûå',
|
|
//34=>'óïàêîâêà',
|
|
//35=>'îòêðûòêè',
|
|
//36=>'ôåéåðâåðêè',
|
|
//37=>'Óñèëåíèå îðóæèÿ: çàòî÷êè'
|
|
);
|
|
//$otdels_array = array (1=>'Þâåëèðíûå òîâàðû: îæåðåëüÿ',2=>' êîëüöà');
|
|
|
|
foreach($otdels_array as $key=>$val){
|
|
if(isset($key) && isset($val)){
|
|
if(isset($_GET['otdel']) && $_GET['otdel']==$key) {
|
|
$color = 'C7C7C7';
|
|
} else {
|
|
$color = 'e2e0e0';
|
|
}
|
|
echo '<A HREF="?otdel='.$key.'"><DIV style="background-color: #'.$color.'">'.$otdels_array[$key].'</DIV></A>';
|
|
}
|
|
}
|
|
?>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<br>
|
|
<div id="textgo" style="visibility:hidden;"></div>
|
|
<?
|
|
}
|
|
?>
|