main game error fixes

This commit is contained in:
lopar 2018-03-08 23:04:15 +02:00
parent a430cca4d1
commit 8326c6620e
4 changed files with 27 additions and 116 deletions

View File

@ -1,71 +0,0 @@
<?php
ini_set('display_errors', 'Off');
header("Content-Type: text/html; charset=utf-8");
session_start();
if ($_SESSION['uid'] == null) header("Location: index.php");
include "config.php";
$user = mysql_fetch_array(mysql_query("SELECT `blocknote` FROM `users` WHERE `id` = '{$_SESSION['uid']}' LIMIT 1;"));
$uss = mysql_fetch_array(mysql_query("SELECT `date_out` FROM `hellround_pohod` WHERE `owner` = '{$_SESSION['uid']}' ORDER BY id DESC LIMIT 1;"));
include "functions.php";
if ($user['battle'] != 0) { header('location: fbattle.php'); die(); }
#echo '<strong>Возможности</strong><BR/><BR/> ';
#echo 'Вход в Излом Хаоса - ';
if(time()-259200 > strtotime($uss['date_out'])) {
#echo "<strong>доступен</strong><br/>";
} else {
$timer=strtotime($uss['date_out'])-time()+259200;
echo 'до след. похода ' . $timer . ' сек <br/><br/>';
}
$uss2 = mysql_query("SELECT `id`, `datetime` FROM `turnament` ORDER BY `datetime` DESC LIMIT 1;");
$i=0;
while($val = mysql_fetch_array($uss2)) {
#echo 'Ближайший турнир в БС - ' . strftime('%d %b %Y, %H:%M', $val[++$i]) . '<br/>';
#echo '<br>';
#echo time();
}
?>
<?php
if(isset($_POST['edit'])) {
$text = htmlspecialchars($_POST['text'],ENT_QUOTES, "UTF-8");
mysql_query("UPDATE `users` SET `blocknote` = '{$text}' WHERE `id` = '{$_SESSION['uid']}' LIMIT 1;");
echo("
<script>
function cityg(){
location.href='blocknote.php';
}
setTimeout('cityg()', 1000);
</script>
<center><BR><BR><BR>
<i>Записываем... </i>
</center>
");
}
?>
<HTML><HEAD>
<link rel=stylesheet type="text/css" href="css/main.css">
<meta content="text/html; charset=utf-8" http-equiv=Content-type>
<META Http-Equiv=Cache-Control Content=no-cache>
<meta http-equiv=PRAGMA content=NO-CACHE>
<META http-equiv=Expires content=0><LINK href="css/main.css" type=text/css rel=stylesheet>
<META Http-Equiv=Expires Content=0>
</HEAD>
</HEAD>
<BODY bgcolor=e2e0e0>
<br>
<INPUT TYPE=button onclick="location.href='blocknote.php';" value=Обновить>
<p align=right><INPUT TYPE=button value="Вернуться" onclick="location.href='main.php?edit=0.467837356797105';"></p>
<center>
<strong>Блокнот ( 180 слов макс.)</strong>
<form method="POST"><table><tr><td>
<textarea name="text" cols="60" rows="10" maxlength="6144" class="zap"><?=strip_tags($user['blocknote'], '<i><tt><strong><a><img>');?></textarea>
<td><button name="edit" /><img src=./i/pencil.gif alt="Записать" title="Записать"></button>
<td></tr></table>
</form>
</center>
</BODY>
</HTML>

View File

@ -2623,8 +2623,8 @@ function showpersout($id, $pas = 0, $battle = 0, $me = 0)
<TR>
<TD colSpan=2>
<SMALL><?php
$online = mysql_fetch_array(mysql_query('SELECT u.* ,o.date,u.* ,o.real_time FROM `users` AS u, `online` AS o WHERE u.`id` = o.`id` AND u.`id` = \'' . $user['id'] . '\' LIMIT 1;'));
if ($invis) $invis = mysql_fetch_row(mysql_query("select `time` from effects where owner='$user1[id]' and type='1022'"));
$online = db::c()->query('SELECT u.* ,o.date,u.* ,o.real_time FROM `users` AS u, `online` AS o WHERE u.`id` = o.`id` AND u.`id` = ?i', $user['id'])->fetch_assoc();
if ($invis) $invis = db::c()->query('SELECT `time` FROM `effects` WHERE `owner` = ?i and `type` = 1022', $user1['id'])->fetch_assoc();
if ($invis > time()) {
$data['id'] = null;
$online['date'] -= 60 * 120 - ($invis - time());
@ -2692,12 +2692,11 @@ function showpersout($id, $pas = 0, $battle = 0, $me = 0)
echo $user['vinos'];
if ($param_bonus['vinos']) echo " <b><font color=green>(+" . $param_bonus['vinos'] . ")</font></b>";
?><BR>
Интеллект: <?=$user['intel']?><BR>
Мудрость: <?=$user['mudra']?><BR>
<?php
if ($user['level'] > 3) {
?>
Интеллект: <?= $user['intel'] ?><BR></small>
<?php
}
if (!$pas && (($user['stats'] > 0) || ($user['master'] > 0))) {
?>
@ -2705,64 +2704,50 @@ function showpersout($id, $pas = 0, $battle = 0, $me = 0)
<?
}
?>
echo "<hr>";
<HR>
<?php
if (!$pas) {
?>
Опыт: <b><?= $user['exp'] ?></b> <a href='exptable.html' target=_blank>(<?= $user['nextup'] ?>)</a>
Опыт: <b><?=$user['exp']?></b> (<?= $user['nextup'] ?>)
<BR></small>
<?
} ?>
Уровень: <?= $user['level'] ?><BR></small>
<? if ($user['id'] != 233 && $user['id'] != 234 && $user['id'] != 235) { ?>
Побед:&nbsp;<span title='Побед: <?= $user['win'] ?>'><?= $user['win'] ?></span><br>
Поражений:&nbsp;<span title='Поражений: <?= $user['lose'] ?>'><?= $user['lose'] ?></span><br>
Ничьих:&nbsp;<span title='Ничьих: <?= $user['nich'] ?>'><?= $user['nich'] ?></span><br>
<? } ?>
<?php
$my_inf = mysql_fetch_assoc(mysql_query("SELECT `align`,`deal` FROM `users` WHERE `id`='" . $_SESSION['uid'] . "'"));
if (!$pas || ($my_inf['align'] == '2.99' || $my_inf['deal'] == 1)) {
Уровень: <?=$user['level']?><BR></small>
Побед: <span title='Побед: <?= $user['win'] ?>'><?= $user['win'] ?></span><br>
Поражений: <span title='Поражений: <?= $user['lose'] ?>'><?= $user['lose'] ?></span><br>
Ничьих: <span title='Ничьих: <?= $user['nich'] ?>'><?= $user['nich'] ?></span><br>
<?
$ekr_bank = mysql_fetch_assoc(mysql_query("SELECT SUM(`ekr`) AS `bank_ekr`,SUM(`cr`) AS `bank_cr` FROM `bank` WHERE `owner`='" . $user['id'] . "'"));
if (!$pas) {
$ekr_bank = db::c()->query('SELECT SUM(`ekr`) AS `bank_ekr`,SUM(`cr`) AS `bank_cr` FROM `bank` WHERE `owner`= ?i', $user['id'])->fetch_assoc();
?>
Деньги: <b><?= $user['money'] ?></b> кр.<br/>
В банке: <b><?= $ekr_bank['bank_cr'] ?></b> кр. / <b><?= $ekr_bank['bank_ekr'] ?></b> eкр.</small><br>
Деньги: <b><?=$user['money']?></b> кр.<br/>
В банке: <b><?=$ekr_bank['bank_cr']?></b> кр. / <b><?=$ekr_bank['bank_ekr']?></b> eкр.<br>
<?
}
if ($user['klan'] && !$pas) {
echo "Клан: " . ClanImage($user['klan']) . "<BR></small>";
} elseif ($user['klan']) {
$clann = mysql_fetch_array(mysql_query("SELECT `name`,`short` FROM `clans` WHERE `id`='{$user['klan']}' LIMIT 1;"));
$clann = db::c()->query('SELECT `name`,`short` FROM `clans` WHERE `id`= ?i', $user['klan'])->fetch_assoc();
$clanname = $clann['name'];
$clannamesh = $clann['short'];
echo "<a href='encicl/index.php?section=99&page=clans1&clan=" . close_dangling_tags($clannamesh) . "' target=_blank>" . close_dangling_tags($clanname) . "</a> - " . close_dangling_tags($user['status']) . "</small><BR />";
} elseif ($user['align'] > 0) {
if (($user['align'] > 1) && ($user['align'] < 2)) echo "<b>Орден Паладинов</B> {$user['status']}<BR></small>";
if (($user['align'] == 3)) echo "<b>Темное братство</B><BR></small>";
if (($user['align'] == 2)) echo "<b>Нейтральное братство</B><BR></small>";
if (($user['align'] == 6)) echo "<b>Светлое братство</B><BR></small>";
}
if ($pas) {
$date1 = explode(" ", $user['borntime']);
$date2 = explode("-", $date1[0]);
$date3 = "" . $date2[2] . "-" . $date2[1] . "-" . $date2[0] . "";
if ($user['id'] >= 233 && $user['id'] <= 235) {
$date3 = '<b>До начала времён ...</b>';
}
?>
Место рождения: <b><?= $user['borncity'] ?></b><BR>
День рождения персонажа: <?= $date3 ?><br/></small>
День рождения персонажа: <?= $date3 ?><br/>
<?
echo("<hr>");
if ($user['palcom'] && $pas) {
echo "Сообщение от Паладинов о причине отправки в хаос/блокировке: <br /><font class=private>";
echo "{$user['palcom']}</font>";
echo "Сообщение от Паладинов о причине отправки в хаос/блокировке: <br>
<font class=private>{$user['palcom']}</font>";
}
$effect = db::c()->query('SELECT `time` FROM `effects` WHERE `owner` = ?i AND `type` = ?i', $user['id'], 4)->fetch_assoc();
if ($effect['time']) {
@ -2777,12 +2762,8 @@ function showpersout($id, $pas = 0, $battle = 0, $me = 0)
Ловкость: <?= $user['lovk'] ?><BR>
Интуиция: <?= $user['inta'] ?><BR>
Выносливость: <?= $user['vinos'] ?><BR>
<?php if ($user['level'] > 3): ?>
Интеллект: <?= $user['intel'] ?><BR>
<?php endif ?>
<?php if ($user['level'] > 6): ?>
Мудрость: <?= $user['mudra'] ?><BR>
<?php endif ?>
</td>
</tr></table>
<?
@ -5324,7 +5305,7 @@ function tele_check($to, $text)
function get_meshok()
{
global $user;
$d = mysql_fetch_array(mysql_query("SELECT SUM(`gmeshok`) FROM `inventory` WHERE `owner` = '{$user['id']}' AND `setsale` = 0 AND `gmeshok` > 0"));
$d = db::c()->query('SELECT SUM(`gmeshok`) FROM `inventory` WHERE `owner` = ?i AND `setsale` = 0 AND `gmeshok` > 0', $user['id'])->fetch_assoc();
return ($user['sila'] * 4 + $d[0]);
}

View File

@ -2773,7 +2773,9 @@ if ($_GET['goto'] == 'plo') {
if ($_GET['use']) {
usemagic($_GET['use'], $_POST['target']);
}
$online = mysql_query("SELECT * FROM `online` WHERE `real_time` >= " . (time() - 60) . ";");
$online = db::c()->query('SELECT 1 FROM `online` WHERE `real_time` >= ?i', (time()-60));
?>
<div id=hint3 class=ahint></div>
<table width="100%" cellspacing="0" cellpadding="0">

View File

@ -39,7 +39,6 @@
<div>
<ul>
<li><a href="/user_anketa.php" title="Анкета" target="main"><img src="http://placehold.it/32x32" /></a></li>
<li><a href="/blocknote.php" title="Блокнот" target="main"><img src="http://placehold.it/32x32" /></a></li>
<li><a href="/friend.php" title="Друзья" target="main"><img src="http://placehold.it/32x32" /></a></li>
<li><a href="/main.php?edit=1" title="Инвентарь" target="main"><img src="http://placehold.it/32x32" /></a></li>
<li><a href="/relikt.php?edit=1" title="Реликты" target="main"><img src="http://placehold.it/32x32" /></a></li>