хоть немного приведём в порядок, чтобы не ругался

This commit is contained in:
lopar 2018-03-23 23:30:05 +02:00
parent 35d0653bee
commit 4af1784f06

View File

@ -1,16 +1,18 @@
<? <?
session_start(); session_start();
if(!isset($_SESSION['uid'])) { header('Location'); } if (!isset($_SESSION['uid'])) {
header('Location');
}
include('config.php'); include('config.php');
include('functions.php'); include('functions.php');
include('classes/quests_class.php'); include('classes/quests_class.php');
if($_GET['end_qst_now']) { if ($_GET['end_qst_now']) {
echo $q->endq((int)$_GET['end_qst_now'], 'end', $user); echo $q->endq((int)$_GET['end_qst_now'], 'end', $user);
} }
if($_GET['end_qst']) { if ($_GET['end_qst']) {
echo $q->winqst((int)$_GET['end_qst'], $user); echo $q->winqst((int)$_GET['end_qst'], $user);
} }
$qsee = ''; $qsee = '';
@ -20,103 +22,90 @@ $qx = 0;
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>404</title> <title>404</title>
<meta charset="utf-8"> <meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="css/hostel.css" /> <link rel="stylesheet" type="text/css" href="css/hostel.css"/>
<style> <style>
div.ctContainerA, div.ctContainerB { div.ctContainerA, div.ctContainerB {
position: relative; position: relative;
margin-bottom: 5px; margin-bottom: 5px;
padding: 5px; padding: 5px;
-moz-border-radius: 5px 5px 5px 5px; box-shadow: 3px 3px 5px 0 #323232;
-webkit-border-radius: 5px 5px 5px 5px; }
-khtml-border-radius: 5px 5px 5px 5px;
-webkit-box-shadow: 3px 3px 5px 0px rgba(50, 50, 50, 0.75);
-moz-box-shadow: 3px 3px 5px 0px rgba(50, 50, 50, 0.75);
box-shadow: 3px 3px 5px 0px rgba(50, 50, 50, 0.75);
}
div.ctContainerA { div.ctContainerA {
border: 2px groove threedface; border: 2px groove threedface;
} }
div.ctTitle { div.ctTitle {
margin-bottom: 3px; margin-bottom: 3px;
border-bottom: 2px groove threedface; border-bottom: 2px groove threedface;
font-weight: bold; font-weight: bold;
color: #bf0000; color: #bf0000;
} }
div.ctContent { div.ctContent {
overflow: hidden; overflow: hidden;
position: relative; position: relative;
width: 100%; width: 100%;
} }
div.quest_target_item div.ctTitle a.action-start { div.quest_target_item div.ctTitle a.action-start {
float: right; float: right;
} }
div.quest_target_item[forever='1'] div.ctContent .available { div.quest_target_item[forever='1'] div.ctContent .available {
color: #800; color: #800;
} }
div.quest_target_item[forever='0'][available='0'] div.ctContent .available { div.quest_target_item[forever='0'][available='0'] div.ctContent .available {
color: blue; color: blue;
} }
div.quest_target_item div.ctContent .available { div.quest_target_item div.ctContent .available {
font-size: small; font-size: small;
} }
div.quest_target_item div.ctContent img.icon { div.quest_target_item div.ctContent img.icon {
width:60px; width: 60px;
height: 60px; height: 60px;
float: left; float: left;
margin: 2px; margin: 2px;
} }
div.qriContainer { div.qriContainer {
position: relative; position: relative;
display: inline; display: inline;
font-size: 80%; font-size: 80%;
} }
</style> </style>
</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 = mysql_query('SELECT * FROM `actions` WHERE `vars` LIKE "%start_quest%" AND `vals` = "go" AND `uid` = "'.$user['id'].'" LIMIT 100'); while ($pl = $sp->fetch_assoc()) {
while($pl = mysql_fetch_array($sp)) { $questId = str_replace('start_quest', '', $pl['vars']);
$pq = mysql_fetch_array(mysql_query('SELECT * FROM `quests` WHERE `id` = "'.str_replace('start_quest', '', $pl['vars']).'" LIMIT 1')); $pq = db::c()->query('SELECT `id`,`name`,`info` FROM `quests` WHERE `id` = ?i', $questId)->fetch_assoc();
$qsee .= '<a href="?end_qst_now='.$pq['id'].'"><img src="/i/clear.gif" title="Отказаться от задания"></a> <b>'.$pq['name'].'</b><span style=\'float: right;\'><a href=\'?end_qst='.$pq['id'].'\'>Выполнить</a></span><div style="padding-left: 15px; padding-bottom: 5px; border-bottom: 1px solid grey;"><small>'.$pq['info'].'<br />'.$q->info($pq, $user['id']).'</small></div><br />'; $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 == '') { if (!$qsee) $qsee = 'У вас нет заданий.';
$qsee = '<center>К сожалению у вас нет ни одного задания</center>'; if ($q->error) $error = $q->error;
}
if($q->error != '') {
$error = $q->error;
}
?> ?>
<div class="contentContainer"> <div class="contentContainer">
<div style="text-align: center; padding-top: 3px;"><span class="hs">Состояние персонажа, <?=$user['login'];?></span></div> <div style="text-align: center; padding-top: 3px;"><span
<div class="buttonContainer"> class="hs">Состояние персонажа, <?= $user['login']; ?></span></div>
<input type="button" class="btns button-route" value="Вернуться" onclick="location.href='main.php';" /> <div class="buttonContainer">
<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='main.php';"/>
</div> <input type="button" class="btns button-route" value="Обновить" onclick="location.href='module_quest.php';"/>
<? if($error != '') { echo '<center><b style=\'color: Red;\'>'.$error.'</b></center>'; } ?> </div>
<div class="quest_target_container" style="padding-top: 15px;"> <?php if ($error) err($error); ?>
<? echo $qsee; ?> <div class="quest_target_container" style="padding-top: 15px;">
</div> <?php echo $qsee; ?>
</div>
</div> </div>
</body> </body>
<script type="text/javascript" src="http://capitalcity.old-dark.ru/js/jquery-1.7.2.min.js"></script>
</html> </html>