white screen

This commit is contained in:
lopar 2020-08-30 04:09:52 +03:00
parent 666376b4e6
commit 713f426328
2 changed files with 27 additions and 18 deletions

View File

@ -526,7 +526,7 @@ if ($edit) {
<td style="vertical-align: top; width: 350px"> <td style="vertical-align: top; width: 350px">
<?php $showUser->showUserDoll(0, 1); ?> <!-- Первый столбец --> <?php $showUser->showUserDoll(0, 1); ?> <!-- Первый столбец -->
<div align="center"> <div align="center">
<a href='main.php?edit=1&undress=all'>Снять все</a><BR> <a href='main.php?edit=1&undress=all' class="button">Снять все</a><BR>
<div class="effectList" style="padding-top: 15px; max-height: 150px; width: 220px;"> <div class="effectList" style="padding-top: 15px; max-height: 150px; width: 220px;">
<?= show_eff_inf($user->id, 2) ?> <?= show_eff_inf($user->id, 2) ?>
</div> </div>

View File

@ -1,18 +1,23 @@
<? <?php
session_start(); session_start();
if (!isset($_SESSION['uid'])) { if (empty($_SESSION['uid'])) {
header('Location'); header('Location: /index.php');
exit();
} }
include('config.php');
include('functions.php'); require_once 'functions.php';
include('classes/quests_class.php'); include('classes/quests_class.php');
$qEndNow = filter_input(INPUT_GET, 'end_qst_now'); $qEndNow = $_GET['end_qst_now'] ?? null;
$qEnd = filter_input(INPUT_GET, 'end_qst'); $qEnd = $_GET['end_qst'] ?? null;
if ($qEndNow) $q->endq((int)$_GET['end_qst_now'], 'end', $user); if ($qEndNow) {
$q->endq((int)$_GET['end_qst_now'], 'end', $user);
}
if ($qEnd) $q->winqst((int)$_GET['end_qst'], $user); if ($qEnd) {
$q->winqst((int)$_GET['end_qst'], $user);
}
$qsee = ''; $qsee = '';
$qx = 0; $qx = 0;
@ -20,9 +25,9 @@ $error = '';
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html lang="ru">
<head> <head>
<title>404</title> <title></title>
<meta charset="utf-8"> <meta charset="utf-8">
<link rel="stylesheet" href="css/hostel.css"/> <link rel="stylesheet" href="css/hostel.css"/>
<style> <style>
@ -83,16 +88,20 @@ $error = '';
</head> </head>
<body> <body>
<?php <?php
$sp = db::c()->query('SELECT `vars` FROM `actions` WHERE `vars` LIKE "?S" AND `vals` = "?s" AND `uid` = ?i LIMIT 100', "%start_quest%", "go", $user['id']); $sp = db::c()->query('SELECT `vars` FROM `actions` WHERE `vars` LIKE "?S" AND `vals` = "?s" AND `uid` = ?i LIMIT 100', "%start_quest%", "go", $user->id);
while ($pl = $sp->fetch_assoc()) { while ($pl = $sp->fetch_assoc()) {
$questId = str_replace('start_quest', '', $pl['vars']); $questId = str_replace('start_quest', '', $pl['vars']);
$pq = db::c()->query('SELECT `id`,`name`,`info` FROM `quests` WHERE `id` = ?i', $questId)->fetch_assoc(); $pq = db::c()->query('SELECT `id`,`name`,`info` FROM `quests` WHERE `id` = ?i', $questId)->fetch_assoc();
$qsee .= sprintf('<a href="?end_qst_now=%s"><img src="/i/clear.gif" title="Отказаться от задания"></a> <b>%s</b><span style="float: right;"><a href="?end_qst=%s">Выполнить</a></span><div style="padding-left: 15px; padding-bottom: 5px; border-bottom: 1px solid grey;"><small>%s<br>$s</small></div><br>', $pq['id'], $pq['name'], $pq['id'], $pq['info'], $q->info($pq, $user['id'])); $qsee .= sprintf('<a href="?end_qst_now=%s"><img src="/i/clear.gif" title="Отказаться от задания"></a> <b>%s</b><span style="float: right;"><a href="?end_qst=%s">Выполнить</a></span><div style="padding-left: 15px; padding-bottom: 5px; border-bottom: 1px solid grey;"><small>%s<br>$s</small></div><br>', $pq['id'], $pq['name'], $pq['id'], $pq['info'], $q->info($pq, $user->id));
$qx++; $qx++;
} }
if (!$qsee) $qsee = 'У вас нет заданий.'; if (!$qsee) {
if ($q->error) $error = $q->error; $qsee = 'У вас нет заданий.';
}
if ($q->error) {
$error = $q->error;
}
?> ?>
<div class="contentContainer"> <div class="contentContainer">
@ -102,9 +111,9 @@ if ($q->error) $error = $q->error;
<input type="button" class="btns button-route" value="Вернуться" onclick="location.href='main.php';"/> <input type="button" class="btns button-route" value="Вернуться" onclick="location.href='main.php';"/>
<input type="button" class="btns button-route" value="Обновить" onclick="location.href='module_quest.php';"/> <input type="button" class="btns button-route" value="Обновить" onclick="location.href='module_quest.php';"/>
</div> </div>
<?php if ($error) err($error); ?> <?php if ($error) {err($error);} ?>
<div class="quest_target_container" style="padding-top: 15px;"> <div class="quest_target_container" style="padding-top: 15px;">
<?php echo $qsee; ?> <?= $qsee ?>
</div> </div>
</div> </div>
</body> </body>