Beispiel #1
0
    </tr>
';
if (isset($_GET["serdel"])) {
    dbquery("UPDATE bg_articles SET article_series='0' WHERE article_series='" . $_GET["serdel"] . "'");
    dbquery("DELETE FROM bg_articleseries WHERE as_id='" . $_GET["serdel"] . "'");
    redirect("serieclankov");
}
$result = dbquery("SELECT * FROM bg_articleseries");
$rows1 = dbrows($result);
if ($rows1 >= "1") {
    $result = dbquery("SELECT * FROM bg_articleseries ORDER BY as_name");
    while ($data = dbarray($result)) {
        dbquery("UPDATE bg_articleseries SET as_countarticles='" . dbcount("(article_id)", "bg_articles", "article_series='" . $data["as_id"] . "'") . "' WHERE as_id='" . $data["as_id"] . "'");
        echo '<tr>
		<td><span class="label label-default">' . $data["as_id"] . '</span></td>
		<td>' . seriename($data["as_id"]) . '</td>
		<td>' . dbcount("(article_id)", "bg_articles", "article_series='" . $data["as_id"] . "'") . '</td>
		<td align="right"><a href="?serieedit=' . $data["as_id"] . '" class="label label-primary">Upraviť</a> <a href="?serdel=' . $data["as_id"] . '" class="label label-danger" onclick="return confirm(\'Zmazať sériu?\');">Kôš</a></td>
		</tr>';
    }
    echo "</table>";
} else {
    echo "Žiadne serie k článkom.";
}
echo '</div>';
if (isset($_POST["seriesadd"])) {
    dbquery("INSERT INTO bg_articleseries(as_name)VALUES('" . strip_tags($_POST["newserie"]) . "')");
    redirect("serieclankov");
}
echo '
<div class="panel panel-default">
Beispiel #2
0
<?php

require "inc/settings.php";
$titlew = isset($_GET['seria']) ? "Séria: " . seriename($_GET['seria']) : "Série článkov";
require "inc/header.php";
?>

      <div class="bigtitlecenter">
        <div class="bigtitle">
            <h5><?php 
echo isset($_GET['seria']) ? "Séria: " . seriename($_GET['seria']) : "Série článkov";
?>
</h5>
           <?php 
echo isset($_GET['seria']) ? serietext($_GET['seria']) : "";
?>
        </div>
      </div>

<?php 
if (isset($_GET['seria'])) {
    // vypis clankov v serii
    if (!is_numeric($_GET['seria'])) {
        redirect("/");
    }
    $resultcat = dbquery("SELECT * FROM bg_articleseries WHERE as_id='" . $_GET["seria"] . "'");
    $datac = dbarray($resultcat);
    if (isset($_GET["n"]) && $_GET["n"] != bezd($datac["as_name"])) {
        redirect("/seria/" . $datac["as_id"] . "/" . bezd($datac["as_name"]));
    }
    $rowscat = dbrows($resultcat);