} else {
    $completed = clean($_GET["completed"], $mysqli);
}
foreach (completedInfo($completed, $mysqli) as $single) {
    $qId = $single["questId"];
    $uId = $single["playerId"];
    $status = $single["status"];
    $x = $single["coordinateX"];
    $y = $single["coordinateY"];
    $z = $single["coordinateZ"];
    if ($single["timeChecked"] == "" || isset($single["timeChecked"])) {
        $already = 1;
    }
}
$quest = array();
$quest = questInfo($qId, $mysqli);
foreach ($quest as $single) {
    $name = $single["questName"];
    $description = $single["questDescription"];
    $detailedDescription = $single["questDetailedDescription"];
    $materials = $single["recommendedMaterials"];
    $xp = $single["givenXp"];
}
if (isset($_GET["action"]) && $_GET["action"] == "accept") {
    accept($completed, $uId, $xp, $mysqli);
}
if (isset($_GET["action"]) && $_GET["action"] == "reject") {
    deny($completed, $mysqli);
}
if (isset($_GET["action"]) && $_GET["action"] == "delete") {
    delete($completed, $mysqli);
Esempio n. 2
0
    }
    if (true) {
        //#todo check if player has completed/submitted the quest for different button colors
        print "<div class='col-lg-6'><h4>" . $name . " - " . $quest["timeSent"] . "</h4><p>Tento quest splnil <strong>" . $nick . "</strong>.<br><strong>Popis questu: </strong>" . $description . "<br><br><a class=' btn-sm btn-primary ' href='admin-single.php?completed=" . $quest['id'] . "' role='button'>Zkontrolovat</a></p> </div>";
    } else {
        print "<p><a class='btn btn-lg btn-warning' href='#' role='button'>" . $single . "</a></p>";
    }
}
?>
        <?php 
$info = array();
$questList = array();
$questList = listAll($mysqli);
foreach ($questList as $quest) {
    $nick = playerDataSingle($quest["playerId"], "playerName", $mysqli);
    $info = questInfo($quest["questId"], $mysqli);
    foreach ($info as $single) {
        $name = $single["questName"];
        $description = $single["questDescription"];
        $detailedDescription = $single["questDetailedDescription"];
        $materials = $single["recommendedMaterials"];
    }
    if (true) {
        //#todo check if player has completed/submitted the quest for different button colors
        print "<div class='col-lg-6'><h4>" . $name . " - " . $quest["timeSent"] . "</h4><p>Tento quest splnil <strong>" . $nick . "</strong>.<br><strong>Popis questu: </strong>" . $description . "<br><br><a class=' btn-sm btn-info ' href='admin-single.php?completed=" . $quest['id'] . "' role='button'>Zobrazit</a></p> </div>";
    } else {
        print "<p><a class='btn btn-lg btn-warning' href='#' role='button'>" . $single . "</a></p>";
    }
}
?>
        <?php