Exemple #1
0
        redirect("/clanok/" . $datacla["article_id"] . "/" . bezd($datacla["article_name"]));
    }
    if ($datacla["article_series"] != 0) {
        if (dbcount("(article_id)", "bg_articles", " article_series='" . $datacla["article_series"] . "'") >= 2) {
            $clanokprvy_result = dbquery("SELECT * FROM bg_articles WHERE article_suggestion='0' AND article_series='" . $datacla["article_series"] . "' ORDER BY article_date ASC");
            $datacc = array();
            while ($row = dbarray($clanokprvy_result)) {
                $datacc[] = $row["article_id"];
            }
            $najdiclanok = array_search($datacla["article_id"], $datacc);
            $najdiclanok0 = isset($datacc[$najdiclanok - 1]) ? $datacc[$najdiclanok - 1] : "hide";
            $najdiclanok1 = isset($datacc[$najdiclanok + 1]) ? $datacc[$najdiclanok + 1] : "hide";
            echo '
<ul class="pager">
  ' . ($najdiclanok0 != "hide" ? '<li class="previous"><a href="/clanok/' . $najdiclanok0 . '/' . bezd(articlename($najdiclanok0)) . '">&larr; ' . ($najdiclanok1 == "hide" ? articlename($najdiclanok0) : 'Predchadzajúci článok') . '</a></li>' : '') . '
  ' . ($najdiclanok1 != "hide" ? '<li class="next"><a href="/clanok/' . $najdiclanok1 . '/' . bezd(articlename($najdiclanok1)) . '">' . articlename($najdiclanok1) . ' &rarr;</a></li>' : '') . '
</ul>
';
        }
    }
    echo '
        <div class="articleview-inside">
            <div class="info">
                <h4><a href="/clanok/' . $datacla["article_id"] . '/' . bezd($datacla["article_name"]) . '">' . $datacla["article_name"] . '</a></h4>
                <div class="infin">
                    <span><i class="fa fa-user"></i> Autor: ' . username($datacla["article_author"], 1) . '</span>
                    <span><i class="fa fa-time"></i> Dátum: <a>' . date("j. n. Y", $datacla["article_date"]) . '</a></span>
                    <span><i class="fa fa-th-list"></i> Kategória: ' . articlecat($datacla["article_cat"], 1) . '</span>
                    <span><i class="fa fa-eye"></i> Prečítané: <a>' . $datacla["article_reads"] . '</a>×</span>
                    
                </div>
Exemple #2
0
<div class="panel panel-default">
  <div class="panel-heading">OS používané užívateľmi</div>
    <div id="chart_div2"></div>
</div>

<div class="panel panel-default">

  <div class="panel-heading">Posledné komentáre</div>
  <ul class="list-group">
<?php 
$result = dbquery("SELECT * FROM bg_comments WHERE comment_delete='0' ORDER BY comment_id DESC LIMIT 0,8");
$rows1 = dbrows($result);
if ($rows1 >= "1") {
    while ($data = dbarray($result)) {
        $type = articleurl($data["comment_pageid"], trimlink(articlename($data["comment_pageid"]), 22), 1, 1);
        $tname = articlename($data["comment_pageid"]);
        echo '<li class="list-group-item">
' . (useravatar($data["comment_userid"]) != "/file/avatars/avatar.png" ? '<img src="' . useravatar($data["comment_userid"]) . '" alt="" class="img-circle pull-left" style="width:40px;margin-right:5px">' : '<img src="' . useravatar($data["comment_userid"]) . '" alt="" class="img-circle pull-left" style="width:40px;margin-right:5px">') . '
        <span class="badge">' . timeago($data["comment_time"]) . '</span>
' . username($data["comment_userid"], 1) . ' > <a href="' . $type . '" style="font-size:9px">' . trimlink($tname, 32) . '</a><br>
<small>' . trimlink(bbcoderemove(badwords($data["comment_text"])), 100) . '</small><br>
		</li>';
    }
} else {
    echo "Žiadne komentáre k článkom.";
}
?>
	</ul>
</div>

    </div>
Exemple #3
0
            redirect("/");
        }
    } else {
        $strana = 1;
    }
    $limit = "40";
    $celkovy_pocet = $rows1;
    $pocet_stran = ceil($celkovy_pocet / $limit);
    $pociatok = $strana * $limit - $limit;
    $result = dbquery("SELECT * FROM bg_comments ORDER BY comment_id DESC LIMIT {$pociatok}, {$limit}");
    if ($strana > $pocet_stran) {
        redirect("/");
    }
    while ($data = dbarray($result)) {
        $nameexist = $data["comment_type"] == "A" ? articlename($data["comment_pageid"]) : projektname($data["comment_pageid"]);
        $name = $data["comment_type"] == "A" ? articleurl($data["comment_pageid"], articlename($data["comment_pageid"])) : projekturl($data["comment_pageid"], projektname($data["comment_pageid"]), 0, 0);
        echo '<tr id="article' . $data["comment_id"] . '" class="' . ($data["comment_delete"] == 1 ? "danger" : ($nameexist == "" ? "warning" : "")) . '">
		<td><span class="label label-default">' . $data["comment_id"] . '</span></td>
		<td>' . ($nameexist == "" ? "Článok alebo projekt neexistuje" : $name) . '</td>
		<td>' . date("j. n. Y", $data["comment_time"]) . '</td>
		<td>' . username($data["comment_userid"], 0) . '</td>
		<td align="right"><a href="?cdel=' . $data["comment_id"] . '" class="label label-danger">Kôš</a> <span class="label label-default articleinf" data-toggle="popover" data-placement="right" data-trigger="hover" data-html="true" data-content="<div style=\'width:160px\'>' . str_replace("\"", "'", bbcode(badwords(smiley($data["comment_text"])))) . '</div>">Obsah</span></td>
		</tr>';
    }
    echo '</table>';
    pagination($rows1, $limit, $pocet_stran, $strana);
} else {
    echo "Žiadní užívatelia.<br/>";
}
?>
</div>
Exemple #4
0
<?php 
}
?>

<div class="colorline"></div>
<div class="subfooter">
    <div class="container">
    <div class="row">
        <div class="col-md-4 komentarefooter">
            <h4>Posledné <strong>komentáre</strong></h4>
<?php 
$result = dbquery("SELECT * FROM bg_comments WHERE comment_delete='0' AND comment_type='A' ORDER BY comment_id DESC LIMIT 0,4");
$rows1 = dbrows($result);
if ($rows1 >= "1") {
    while ($data = dbarray($result)) {
        $type = articleurl($data["comment_pageid"], trimlink(articlename($data["comment_pageid"]), 22), 1, 1);
        echo '<div class="link">
        <span class="user">' . username($data["comment_userid"], 1) . '</span>
        ' . trimlink(bbcoderemove(badwords($data["comment_text"])), 100) . '
        <a class="time" href="' . $type . '">' . timeago($data["comment_time"]) . ' <i class="fa fa-angle-double-right"></i></a></div>';
    }
} else {
    echo "Žiadne komentáre k článkom.<br/>";
}
?>
        </div>
        <div class="col-md-4 sfpadd">
            <h4>Komunita na <strong>Facebooku</strong></h4>
            <iframe src="//www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2FDesart.sk&amp;width&amp;height=258&amp;colorscheme=dark&amp;show_faces=true&amp;header=false&amp;stream=false&amp;show_border=false"  style="border:none; overflow:hidden; height:200px;width:100%"></iframe>
        </div>
        <div class="col-md-4 sfpadd">