Забыть и выбросить. :(

This commit is contained in:
Igor Barkov (iwork) 2020-09-30 17:06:12 +03:00
parent 169e8be375
commit def01b331d

View File

@ -5,63 +5,64 @@ if (empty($_SESSION['uid'])) {
exit; exit;
} }
require_once "functions.php"; require_once "functions.php";
$user = new User($_SESSION['uid']); $user = $user ?? null;
if ($user->room == 403) { if ($user->room == 403) {
include "startpodzemel.php"; include "startpodzemel.php";
if ($user->battle != 0) { header('location: fbattle.php'); exit; } if ($user->battle != 0) {
header('location: fbattle.php');
exit;
}
if($_GET['act']=="cexit") if($_GET['act'] == "cexit") {
{ $das=mysql_query("select glava,glav_id from `labirint` where user_id='".$user['id']."'");
$das=mysql_query("select glava,glav_id from `labirint` where user_id='".$user['id']."'"); $rf=mysql_fetch_array($das);
$rf=mysql_fetch_array($das); $glav_id=$rf["glav_id"];
$glav_id=$rf["glav_id"]; $glava=$rf["glava"];
$glava=$rf["glava"]; if($glava==$user['login']) {
if($glava==$user['login']){//1 $des=mysql_query("select login,user_id from `labirint` where `glav_id`='$glav_id' and `login`!='$glava'");
$des=mysql_query("select login,user_id from `labirint` where `glav_id`='$glav_id' and `login`!='$glava'"); $r=0;
$r=0; while($raf=mysql_fetch_array($des)){
while($raf=mysql_fetch_array($des)){//2 $r++;
$r++; $log = $raf["login"];
$log = $raf["login"]; $id_us = $raf["user_id"];
$id_us = $raf["user_id"]; }
}//2 if($r>=1){
if($r>=1){ mysql_query("UPDATE labirint SET glav_id='$id_us',glava='$log' WHERE glav_id='".$user['id']."'");
mysql_query("UPDATE labirint SET glav_id='$id_us',glava='$log' WHERE glav_id='".$user['id']."'"); mysql_query("UPDATE podzem3 SET glava='$log' WHERE glava='".$user['login']."'");
mysql_query("UPDATE podzem3 SET glava='$log' WHERE glava='".$user['login']."'"); } else {
}else{ mysql_query("DELETE FROM labirint WHERE glav_id='".$user['id']."'");
mysql_query("DELETE FROM labirint WHERE glav_id='".$user['id']."'"); mysql_query("DELETE FROM podzem3 WHERE glava='".$user['login']."'");
mysql_query("DELETE FROM podzem3 WHERE glava='".$user['login']."'"); mysql_query("DELETE FROM podzem4 WHERE glava='".$user['login']."'");
mysql_query("DELETE FROM podzem4 WHERE glava='".$user['login']."'"); $items_to_delete = [
mysql_query("DELETE FROM `inventory` WHERE name='Подземное зелье жизни' and owner='".$user['id']."'"); 'Подземное зелье жизни',
mysql_query("DELETE FROM `inventory` WHERE name='Ключик №1' and owner='".$user['id']."'"); 'Ключик №1',
mysql_query("DELETE FROM `inventory` WHERE name='Ключик №2' and owner='".$user['id']."'"); 'Ключик №2',
mysql_query("DELETE FROM `inventory` WHERE name='Ключик №3' and owner='".$user['id']."'"); 'Ключик №3',
mysql_query("DELETE FROM `inventory` WHERE name='Ключик №4' and owner='".$user['id']."'"); 'Ключик №4',
mysql_query("DELETE FROM `inventory` WHERE name='Ключик №5' and owner='".$user['id']."'"); 'Ключик №5',
mysql_query("DELETE FROM `inventory` WHERE name='Ключик №6' and owner='".$user['id']."'"); 'Ключик №6',
mysql_query("DELETE FROM `inventory` WHERE name='Ключик №7' and owner='".$user['id']."'"); 'Ключик №7',
mysql_query("DELETE FROM `inventory` WHERE name='Ключик №8' and owner='".$user['id']."'"); 'Ключик №8',
mysql_query("DELETE FROM `inventory` WHERE name='Ключик №9' and owner='".$user['id']."'"); 'Ключик №9',
mysql_query("DELETE FROM `inventory` WHERE name='Ключик №10' and owner='".$user['id']."'"); 'Ключик №10'
} ];
}//1 db::c()->query('DELETE FROM inventory WHERE name IN ("?s") AND owner_id = ?i', implode(",", $items_to_delete), $user->id);
$e = mysql_query("DELETE FROM labirint WHERE user_id='".$user['id']."'"); }
mysql_query("UPDATE `users`,`online` SET `users`.`room` = '402',`online`.`room` = '402' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '".$user['id']."' ;"); }
print "<script>location.href='vxod.php'</script>"; exit(); $e = mysql_query("DELETE FROM labirint WHERE user_id='".$user['id']."'");
} mysql_query("UPDATE `users`,`online` SET `users`.`room` = '402',`online`.`room` = '402' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '".$user['id']."' ;");
print "<script>location.href='vxod.php'</script>"; exit();
}
function podzem_brat() { function podzem_brat() {
$frt=mysql_query("select user_id from `labirint` where glava='".$glava."'"); $frt=mysql_query("select user_id from `labirint` where glava='".$glava."'");
while($rbb=mysql_fetch_array($frt)){ while($rbb=mysql_fetch_array($frt)){
addchp ('<b>'.$user->login.'</b> поднял предмет "'.$mis.'". ','{[]}'.Nick::id($rbb["user_id"])->short().'{[]}'); addchp ('<b>'.$user->login.'</b> поднял предмет "'.$mis.'". ','{[]}'.Nick::id($rbb["user_id"])->short().'{[]}');
}
} }
} }
} Template::header('canalizaciya');
?> ?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Language" content="ru">
<link rel=stylesheet type="text/css" href="css/main.css">
<script> <script>
let Hint3Name = ''; let Hint3Name = '';
// Заголовок, название скрипта, имя поля с логином // Заголовок, название скрипта, имя поля с логином
@ -76,7 +77,6 @@ function findlogin(title, script, name){
Hint3Name = name; Hint3Name = name;
} }
function returned2(s){ function returned2(s){
if (top.oldlocation !== '') { top.frames['main'].navigate(top.oldlocation+'?'+s+'tmp='+Math.random()); top.oldlocation=''; } if (top.oldlocation !== '') { top.frames['main'].navigate(top.oldlocation+'?'+s+'tmp='+Math.random()); top.oldlocation=''; }
else { top.frames['main'].navigate('main.php?'+s+'tmp='+Math.random()) } else { top.frames['main'].navigate('main.php?'+s+'tmp='+Math.random()) }
@ -87,19 +87,7 @@ function closehint3(){
Hint3Name=''; Hint3Name='';
} }
</script> </script>
<body onLoad="top.setHP(<?=$user['hp']?>,<?=$user['maxhp']?>,<?if(!$user['battle']){echo"10";}else{echo"0";}?>);"> <?php
<script>
<!--document.ondragstart = test;-->
//запрет на перетаскивание
<!--document.onselectstart = test;-->
//запрет на выделение элементов страницы
<!--document.oncontextmenu = test;-->
//запрет на выведение контекстного меню
function test() {
return false
}
</script>
<?
$ros=mysql_query("SELECT * FROM `labirint` WHERE `user_id`='{$_SESSION['uid']}'"); $ros=mysql_query("SELECT * FROM `labirint` WHERE `user_id`='{$_SESSION['uid']}'");
$mir=mysql_fetch_array($ros); $mir=mysql_fetch_array($ros);
$mesto = $mir['location']; $mesto = $mir['location'];