Зачем-то инкапсуляция...
This commit is contained in:
+6
-3
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
|
||||
use Battles\Template;
|
||||
|
||||
session_start();
|
||||
if (empty($_SESSION['uid'])) {
|
||||
header('Location: /index.php');
|
||||
@@ -23,15 +26,15 @@ $qsee = '';
|
||||
$qx = 0;
|
||||
$error = '';
|
||||
|
||||
\Battles\Template::header('module_quest');
|
||||
Template::header('module_quest');
|
||||
?>
|
||||
<link rel="stylesheet" href="css/hostel.css"/>
|
||||
<?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->getId());
|
||||
while ($pl = $sp->fetch_assoc()) {
|
||||
$questId = str_replace('start_quest', '', $pl['vars']);
|
||||
$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->getId()));
|
||||
$qx++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user