Exemplo n.º 1
0
                                <div class="cat">' . forumcat($dataf3["forumt_fid"]) . '</div>
                                <a href="/tema/' . $dataf3["forumt_id"] . '/' . bezd($dataf3["forumt_name"]) . ($stranatema > 1 ? "?strana=" . $stranatema : "") . '" title="' . $dataf3["forumt_name"] . '">' . trimlink($dataf3["forumt_name"], 60) . '</a>
                            </div>
                            <div class="col-sm-2 col-md-2">
                                <span class="infotema pull-right">
                                Autor: ' . username($dataf3["forumt_userid"], 1) . '<br/>
                                Príspevkov: ' . $odpovedi . 'x
                                </span>
                            </div>
                           <div class="col-sm-2 col-md-2">
                                <span class="infotema pull-right">
                                Autor: ' . username($dataf3["forumt_userid"], 1) . '<br/>
                                Príspevkov: ' . $odpovedi . 'x
                                </span>
                            </div>
                            <div class="col-lg-1 col-sm-2 col-md-1 hidden-xs"><a href="/tema/' . $dataf3["forumt_id"] . '/' . bezd($dataf3["forumt_name"]) . ($stranatema > 1 ? "?strana=" . $stranatema : "") . '" class="otvr ' . ($newp == "activityotvr" ? $newp : ($dataf3["forumt_fav"] == 1 ? "favotvr" : "")) . '" title="posledná aktivita ' . (forumtopic1post($dataf3["forumt_id"]) != ": " ? forumtopic1post($dataf3["forumt_id"]) : "") . '">Zobraziť</a></div>
                        </div>
                    </div>
                    ';
}
?>
                </div>
                </div>
            
            </div>
            </div>
            <?php 
if (MEMBER) {
    ?>
            <div class="forumlinks"><a href="/forum">Založiť novú tému</a><a href="#" id="oblubenetemy">Obľúbené témy</a><a href="#" id="mojetemyshow">Moje témy</a><a href="#" id="aktivnetemyshow">Posledná aktivita</a><a href="#" id="aktivnetemymyshow">Moja posledná aktivita</a></div>
            <?php 
Exemplo n.º 2
0
if (!MEMBER) {
    die;
}
$result_subheader4 = dbquery("SELECT forumt_name,forumt_newpost,forumt_reads,forumt_id,forumt_fid,forumt_fav,forumt_userid,forumt_time FROM bg_forumtopic WHERE forumt_fav='1' ORDER BY forumt_newpost DESC");
if (dbrows($result_subheader4) >= 1) {
    while ($dataf3 = dbarray($result_subheader4)) {
        $postcount = dbcount("(post_id)", "bg_forumtopicpost", " post_topicid='" . $dataf3["forumt_id"] . "'");
        $limitp = "15";
        $stranatema = ceil($postcount / $limitp);
        $odpovedi = dbcount("(post_id)", "bg_forumtopicpost", " post_topicid='" . $dataf3["forumt_id"] . "'") - 1;
        echo '
                    <div class="forumtema">
                        <div class="row">
                            <div class="col-xs-6 col-md-6 temainfo">
                                <div class="cat">' . forumcat($dataf3["forumt_fid"]) . '</div>
                                <a href="/tema/' . $dataf3["forumt_id"] . '/' . bezd($dataf3["forumt_name"]) . ($stranatema > 1 ? "?strana=" . $stranatema : "") . '" title="' . $dataf3["forumt_name"] . '">' . trimlink($dataf3["forumt_name"], 40) . '</a>
                            </div>
                            <div class="col-sm-4 col-md-4">
                                <span class="infotema pull-right">
                                Autor: ' . username($dataf3["forumt_userid"], 1) . '<br/>
                                Príspevkov: ' . $odpovedi . 'x
                                </span>
                            </div>
                            <div class="col-md-2 hidden-xs"><a href="/tema/' . $dataf3["forumt_id"] . '/' . bezd($dataf3["forumt_name"]) . ($stranatema > 1 ? "?strana=" . $stranatema : "") . '" class="otvr popovertoggle ' . ($dataf3["forumt_fav"] == 1 ? "favotvr " : "") . '" data-content="<div style=\'width:300px\'>posledná aktivita ' . (forumtopic1post($dataf3["forumt_id"]) != ": " ? forumtopic1post($dataf3["forumt_id"]) : "") . '</div>" data-placement="left" data-trigger="hover">Zobraziť</a></div>
                        </div>
                    </div>
                    ';
    }
} else {
    echo '<p style="font-size:12px;color:#888;">Žiadne založené témy.</p>';
}
Exemplo n.º 3
0
if (!defined('PERM')) {
    die;
}
?>

<div class="list-group">
    <a class="list-group-item active">Najčítanejšie články</a>
<?php 
$result_panel1 = dbquery("SELECT article_name,article_id,article_reads FROM bg_articles WHERE article_suggestion='0' ORDER BY article_reads DESC LIMIT 0,8");
while ($data = dbarray($result_panel1)) {
    echo '<a href="/clanok/' . $data["article_id"] . '/' . bezd($data["article_name"]) . '" class="list-group-item">' . $data["article_name"] . '</a>';
}
?>
</div>

<div class="list-group">
    <a class="list-group-item active">Podobné články</a>
<?php 
$target1 = trim($tags[0]);
$target2 = trim($tags[1]);
$result33 = dbquery("SELECT * FROM bg_articles WHERE article_suggestion='0' AND article_target LIKE '%" . StrToLower($target1) . "%' AND article_id<>'" . $datacla["article_id"] . "' OR article_target LIKE '%" . StrToLower($target2) . "%' AND article_id<>'" . $datacla["article_id"] . "' AND article_suggestion='0' ORDER BY article_date DESC LIMIT 0,8");
$rows2 = dbrows($result33);
if ($rows2 >= "1") {
    while ($data66 = dbarray($result33)) {
        echo '<a href="/clanok/' . $data66["article_id"] . '/' . bezd($data66["article_name"]) . '" class="list-group-item">' . $data66["article_name"] . '</a>';
    }
    echo '<div class="clearfix"></div>';
}
?>
</div>
Exemplo n.º 4
0
}
?>
	</ul>
</div>

    </div>
</div>

<div class="panel panel-default">

  <div class="panel-heading">Najnovšie témy (nezamknuté)</div>
  <ul class="list-group">
<?php 
$result = dbquery("SELECT * FROM bg_forumtopic WHERE forumt_locked='0' ORDER BY forumt_time DESC LIMIT 0,8");
$rows1 = dbrows($result);
if ($rows1 >= "1") {
    while ($data = dbarray($result)) {
        echo '<li class="list-group-item">
' . (useravatar($data["forumt_userid"]) != "/file/avatars/avatar.png" ? '<img src="' . useravatar($data["forumt_userid"]) . '" alt="" class="img-circle pull-left" style="width:20px;margin-right:5px">' : '<img src="' . useravatar($data["forumt_userid"]) . '" alt="" class="img-circle pull-left" style="width:20px;margin-right:5px">') . '
        <span class="badge">' . timeago($data["forumt_newpost"]) . '</span>
<a href="/tema/' . $data["forumt_id"] . '/' . bezd($data["forumt_name"]) . '" title="' . $data["forumt_name"] . '">' . $data["forumt_name"] . '</a>
		</li>';
    }
} else {
    echo "Žiadne témy.";
}
?>
	</ul>
</div>
<?php 
require "inc/footer.php";
Exemplo n.º 5
0
function articleurl($id, $text, $com = 0, $li = 0)
{
    $pp = dbquery("SELECT * FROM bg_articles WHERE article_id='" . $id . "'");
    $id = dbarray($pp);
    if ($li == 0) {
        return "<a href='/clanok/" . $id["article_id"] . "/" . bezd($id["article_name"]) . "" . ($com ? "#komentare" : "") . "' title='" . $id["article_name"] . "' class='linkcbox'>" . $text . "</a>";
    } else {
        return "/clanok/" . $id["article_id"] . "/" . bezd($id["article_name"]) . "" . ($com ? "#komentare" : "");
    }
}
Exemplo n.º 6
0
';
while ($datap = dbarray($result_comments)) {
    if ($datap["comment_type"] == "A") {
        $type = articleurl($datap["comment_pageid"], trimlink(articlename($datap["comment_pageid"]), 22), 1, 1);
        $name = articlename($datap["comment_pageid"]);
    } else {
        if ($datap["comment_type"] == "P") {
            $type = projekturl($datap["comment_pageid"], trimlink(projektname($datap["comment_pageid"]), 22), 1, 1);
            $name = projektname($datap["comment_pageid"]);
        }
    }
    echo '<a href="' . $type . '" class="list-group-item">' . $name . '<br/><small>' . trimlink(bbcoderemove(badwords($datap["comment_text"])), 70) . '</small> <span class="badge">' . timeago($datap["comment_time"]) . '</span></a>';
}
echo '
    </div>
    
  </div>
  <div class="tab-pane fade" id="forum">
  
    <div class="list-group" style="margin-top:15px;">
';
while ($datap = dbarray($result_forumt)) {
    echo '<a href="/tema/' . $datap["forumt_id"] . '/' . bezd($datap["forumt_name"]) . '" class="list-group-item">' . $datap["forumt_name"] . ' <span class="badge">' . timeago($datap["forumt_time"]) . '</span></a>';
}
echo '
    </div>
    
  </div>
</div>
</div>
';
Exemplo n.º 7
0
        }
        echo '<div class="row">';
        while ($data = dbarray($result)) {
            $clanokprvy_result = dbquery("SELECT * FROM bg_articles WHERE article_suggestion='0' AND article_series='" . $data["as_id"] . "' ORDER BY article_date DESC");
            $clanokp = dbarray($clanokprvy_result);
            echo '
    <div class="col-sm-6 col-md-4">
        <div class="articleview-box">
            <div class="img-responsive">    
                <img src="http://data.desart.sk/articles/' . ($clanokp["article_img"] != "none" ? $clanokp["article_img"] : "noneimage.jpg") . '" alt="' . $data["as_name"] . '">
                <div class="date">' . date("j", $clanokp["article_date"]) . '<small>' . $mesiac[date("n", $clanokp["article_date"])] . ', ' . date("Y", $clanokp["article_date"]) . '</small></div>
                 
            </div>
            <div class="info">
                <small>' . articlecat($clanokp["article_cat"], 1, 1) . '</small>
                <h4><a href="/seria/' . $data["as_id"] . '/' . bezd($data["as_name"]) . '">' . $data["as_name"] . '</a></h4>
                ' . strip_tags(trimlink($data["as_mtext"], 160)) . '
                <div class="infin">
                    <span><i class="fa fa-comments"></i> Počet článkov: <a>' . dbrows($clanokprvy_result) . '</a></span>
                </div>
                
            </div>
        </div>
    </div>
';
        }
        echo '</div>';
        pagination($rows1, $limit, $pocet_stran, $strana);
    } else {
        echo "<p style='text-align:center;'>Žiadne série.</p>";
    }
Exemplo n.º 8
0
            }
            $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>
                
            </div>
        </div>
';
    echo '
      <div class="articleview">   
      ' . $datacla["article_txt"];
    echo '</div>';
Exemplo n.º 9
0
      ' . ((MEMBER and $dataf2["forum_id"] != 8) ? "<a href='/forum/novatema-" . $dataf2["forum_id"] . "' class='btn btn-success btn-block' style='margin-bottom:5px'>Vytvoriť novú tému</a>" : "") . '
    ';
    $resultf3 = dbquery("SELECT * FROM bg_forumtopic WHERE forumt_fid='" . $dataf2["forum_id"] . "'");
    if (dbrows($resultf3) >= 1) {
        if (isset($_GET['strana'])) {
            $strana = (int) $_GET['strana'];
            if (!ctype_digit($_GET['strana'])) {
                redirect("/");
            }
        } else {
            $strana = 1;
        }
        $limit = "18";
        $celkovy_pocet = dbrows($resultf3);
        $pocet_stran = ceil($celkovy_pocet / $limit);
        $pociatok = $strana * $limit - $limit;
        $resultf3 = dbquery("SELECT * FROM bg_forumtopic WHERE forumt_fid='" . $dataf2["forum_id"] . "' ORDER BY forumt_fav DESC,forumt_time DESC LIMIT {$pociatok}, {$limit}");
        echo '<div class="list-group">';
        while ($dataf3 = dbarray($resultf3)) {
            $postcount = dbcount("(post_id)", "bg_forumtopicpost", " post_topicid='" . $dataf3["forumt_id"] . "'");
            $limitp = "15";
            $stranatema = ceil($postcount / $limitp);
            echo '<a href="/tema/' . $dataf3["forumt_id"] . "/" . bezd($dataf3["forumt_name"]) . ($stranatema > 1 ? "?strana=" . $stranatema : "") . '" class="list-group-item">' . ($dataf3["forumt_fav"] == 1 ? '<i class="fa fa-star" style="color:#d9534f;"></i> ' : '') . $dataf3["forumt_name"] . ' <small>(' . timeago($dataf3["forumt_time"]) . ' od ' . username($dataf3["forumt_userid"]) . ')</small><span class="badge"> ' . (dbcount("(post_id)", "bg_forumtopicpost", " post_topicid='" . $dataf3["forumt_id"] . "'") - 1) . '</span> ' . ($dataf3["forumt_locked"] == 1 ? '<span class="label label-warning" style="font-family:Arial;font-size:10px;">Zamknuté</span>' : '') . '</a>';
        }
        echo '</div>';
        pagination($celkovy_pocet, $limit, $pocet_stran, $strana);
    } else {
        echo '<div class="alert alert-warning" role="alert">V tejto kategórií sa zaťiaľ nenachádza žiadna téma. Späť na <a href="/forum">fórum</a></div>';
    }
}
require "../inc/footer.php";
Exemplo n.º 10
0
    while ($data = dbarray($result)) {
        echo '<tr>
		<td><span class="label label-default">' . $data["articlec_id"] . '</span></td>
		<td>' . articlecat($data["articlec_id"], 1) . '</td>
		<td>' . $data["articlec_color"] . '</td>
		<td>' . dbcount("(article_id)", "bg_articles", "article_cat='" . $data["articlec_id"] . "'") . '</td>
		<td align="right"><a href="?catedit=' . $data["articlec_id"] . '" class="label label-primary">Upraviť</a> <a href="?catdel=' . $data["articlec_id"] . '" class="label label-danger" onclick="return confirm(\'Zmazať kategóriu?\');">Kôš</a></td>
		</tr>';
    }
    echo "</table>";
} else {
    echo "Žiadne kategorie k článkom.";
}
echo '</div>';
if (isset($_POST["catadd"])) {
    dbquery("INSERT INTO bg_articlecats(articlec_name,articlec_seoname)VALUES('" . strip_tags($_POST["newcat"]) . "','" . bezd(strip_tags($_POST["newcat"])) . "')");
    redirect("kategorie");
}
echo '
<div class="panel panel-default">
    <div class="panel-heading">Pridať kategóriu</div>
    <div class="panel-body">
<form class="form-horizontal" method="post" action="">
  <div class="form-group">
    <label for="newcat" class="col-sm-3 control-label">Názov kategórie</label>
    <div class="col-sm-9">
      <input type="text" class="form-control" id="newcat" name="newcat">
    </div>
  </div>
  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
Exemplo n.º 11
0
if (!MEMBER) {
    die;
}
$result_subheader4 = dbquery("SELECT forumt_name,forumt_newpost,forumt_reads,forumt_id,forumt_fid,forumt_fav,forumt_userid,forumt_time FROM bg_forumtopic WHERE forumt_userid='" . $userinfo["user_id"] . "' ORDER BY forumt_newpost DESC");
if (dbrows($result_subheader4) >= 1) {
    while ($dataf3 = dbarray($result_subheader4)) {
        $postcount = dbcount("(post_id)", "bg_forumtopicpost", " post_topicid='" . $dataf3["forumt_id"] . "'");
        $limitp = "15";
        $stranatema = ceil($postcount / $limitp);
        $odpovedi = dbcount("(post_id)", "bg_forumtopicpost", " post_topicid='" . $dataf3["forumt_id"] . "'") - 1;
        echo '
                    <div class="forumtema">
                        <div class="row">
                            <div class="col-xs-6 col-md-6 temainfo">
                                <div class="cat">' . forumcat($dataf3["forumt_fid"]) . '</div>
                                <a href="/tema/' . $dataf3["forumt_id"] . '/' . bezd($dataf3["forumt_name"]) . ($stranatema > 1 ? "?strana=" . $stranatema : "") . '" title="' . $dataf3["forumt_name"] . '">' . trimlink($dataf3["forumt_name"], 37) . '</a>
                            </div>
                            <div class="col-sm-4 col-md-4">
                                <span class="infotema pull-right">
                                Autor:  ' . username($dataf3["forumt_userid"], 1) . '<br/>
                                Príspevkov: ' . $odpovedi . 'x
                                </span>
                            </div>
                            <div class="col-md-2 hidden-xs"><a href="/tema/' . $dataf3["forumt_id"] . '/' . bezd($dataf3["forumt_name"]) . ($stranatema > 1 ? "?strana=" . $stranatema : "") . '" class="otvr" title="posledná aktivita ' . (forumtopic1post($dataf3["forumt_id"]) != ": " ? forumtopic1post($dataf3["forumt_id"]) : "") . '">Zobraziť</a></div>
                        </div>
                    </div>
                    ';
    }
} else {
    echo '<p style="font-size:12px;color:#888;">Žiadne založené témy.</p>';
}
Exemplo n.º 12
0
    </div></div>';
    }
    echo '</div>';
    pagination($rows1, $limit, $pocet_stran, $strana);
} else {
    echo "<p style='text-align:center;'>Žiadne súbory.</p>";
}
if (isset($_GET["suborid"])) {
    if (!ctype_digit($_GET['suborid'])) {
        redirect("/");
    }
    $resultsubor = dbquery("SELECT * FROM bg_downloads WHERE down_id='" . $_GET['suborid'] . "' LIMIT 0,1");
    $datas = dbarray($resultsubor);
    $hodnotilox = dbcount("(rate_pageid)", "bg_ratestar", "rate_pageid='" . $datas["down_id"] . "' AND rate_type='S'");
    if (isset($_GET["sn"]) && $_GET["sn"] != bezd($datas["down_name"])) {
        redirect("/subory/subor/" . $datas["down_id"] . "/" . bezd($datas["down_name"]));
    }
    echo '
<div class="modal fade bs-example-modal-lg" id="subormodal">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
        <h4 class="modal-title">' . $datas["down_name"] . '</h4>
      </div>
      <div class="modal-body">
            <a href="' . $datas["down_imgview"] . '"><img src="' . $datas["down_imgview"] . '" alt="nahlad" class="img-thumbnail" style="width:100%;"/></a>
            
<table class="table table-bordered" style="margin-top:10px;">
  <tr><td>Popis:</td><td>' . $datas["down_txt"] . '</td></tr>
  <tr><td>Typ súboru:</td><td>' . $datas["down_filetype"] . '</td></tr>
Exemplo n.º 13
0
<?php 
    $result = dbquery("SELECT * FROM bg_projects ORDER BY pr_id DESC LIMIT 0,3");
    while ($data = dbarray($result)) {
        echo '

            <div class="col-md-4">

                <div class="panel previewwebsite">
                    <div class="row">
                            <div class="col-sm-2 col-xs-3 col-md-3">
                                <img src="http://fimg-resp.seznam.cz/?spec=ft280x130&amp;url=http://' . urlvalid($data["pr_web"], 0, 0) . '" alt="' . $data["pr_name"] . '" class="img-responsive">
                            </div>
                            <div class="col-sm-10 col-xs-8 col-md-9">
                                <div class="infoweb"><span>' . $data["pr_name"] . '</span><small>' . trimlink($data["pr_type"], 30) . '</small></div>
                            </div>
                        <a href="/prezentacia/' . $data["pr_id"] . '/' . bezd($data["pr_name"]) . '" class="webarrow"><i class="fa fa-chevron-right"></i></a>
                    </div>
                </div>

            </div>

                 ';
    }
    ?>

      </div>
    </div>
</div>
<?php 
}
?>
Exemplo n.º 14
0
<?php

include "settings.php";
header('content-type: application/json; charset=utf-8');
$sth = dbquery("SELECT * FROM bg_articles WHERE article_suggestion='0' ORDER BY article_date DESC LIMIT 0,6");
$jsonarray = array();
while ($articleinfo = dbarray($sth, MYSQL_ASSOC)) {
    $row_array["title"] = $articleinfo["article_name"];
    $row_array["url"] = "http://desart.sk/clanok/" . $articleinfo["article_id"] . "/" . bezd($articleinfo["article_name"]);
    $row_array["description"] = $articleinfo["article_minitxt"];
    $row_array["author"] = username($articleinfo["article_author"], 0);
    $row_array["date"] = $articleinfo["article_date"];
    $row_array["reads"] = $articleinfo["article_reads"];
    $row_array["comments"] = dbcount("(comment_id)", "bg_comments", "comment_pageid='" . $articleinfo["article_id"] . "' AND comment_type='A'");
    array_push($jsonarray, $row_array);
}
print json_encode($jsonarray);
Exemplo n.º 15
0
                    $newp = "";
                } else {
                    $newp = "activityotvr";
                }
            } else {
                $newp = "";
            }
        } else {
            $newp = "";
        }
        echo '
                    <div class="forumtema">
                        <div class="row">
                            <div class="col-xs-6 col-md-6 temainfo">
                                <div class="cat">' . forumcat(forumcatid($dataf3["post_topicid"])) . '</div>
                                <a href="/tema/' . $dataf3["post_topicid"] . '/' . bezd(forumtopicname($dataf3["post_topicid"])) . ($stranatema > 1 ? "?strana=" . $stranatema : "") . '" title="' . forumtopicname($dataf3["post_topicid"]) . '">' . trimlink(forumtopicname($dataf3["post_topicid"]), 37) . '</a>
                            </div>
                            <div class="col-sm-4 col-md-4">
                                <span class="infotema pull-right">
                                Moje príspevky:  ' . $myodpovedi . 'x<br/>
                                Príspevkov: ' . $odpovedi . 'x
                                </span>
                            </div>
                            <div class="col-md-2 hidden-xs"><a href="/tema/' . $dataf3["post_topicid"] . '/' . bezd(forumtopicname($dataf3["post_topicid"])) . ($stranatema > 1 ? "?strana=" . $stranatema : "") . '" class="otvr ' . ($newp == "activityotvr" ? $newp : "") . '" title="posledná aktivita ' . (forumtopic1post($dataf3["post_topicid"]) != ": " ? forumtopic1post($dataf3["post_topicid"]) : "") . '" title="posledná aktivita ' . (forumtopic1post($dataf3["post_topicid"]) != ": " ? forumtopic1post($dataf3["post_topicid"]) : "") . '">Zobraziť</a></div>
                        </div>
                    </div>
                    ';
    }
} else {
    echo '<p style="font-size:12px;color:#888;">Žiadne založené témy.</p>';
}
Exemplo n.º 16
0
            dbquery("DELETE FROM bg_forumtopic WHERE forumt_id='" . $dataf2["forumt_id"] . "'");
            dbquery("DELETE FROM bg_forumtopicpost WHERE post_topicid='" . $dataf2["forumt_id"] . "'");
            dbquery("DELETE FROM bg_forumtopicread WHERE forumr_tid='" . $dataf2["forumt_id"] . "'");
            redirect("/forum");
        }
        if ($_POST["modset"] == 4) {
            dbquery("UPDATE bg_forumtopic SET forumt_fav='1' WHERE forumt_id='" . $dataf2["forumt_id"] . "'");
            redirect("/forum");
        }
        if ($_POST["modset"] == 5) {
            dbquery("UPDATE bg_forumtopic SET forumt_fav='0' WHERE forumt_id='" . $dataf2["forumt_id"] . "'");
            redirect("/forum");
        }
        if ($_POST["modset"] == 6) {
            dbquery("UPDATE bg_forumtopic SET forumt_fid='" . $_POST["changeforum"] . "' WHERE forumt_id='" . $dataf2["forumt_id"] . "'");
            redirect("/tema/" . $dataf2["forumt_id"] . "/" . bezd($dataf2["forumt_name"]));
        }
    }
    echo '<div class="list-group"><a class="list-group-item active">Moderátorské menu</a><div class="list-group-item">';
    echo '<form action="" method="POST">
<select name="modset" id="select1" class="form-control">
<option value="1">Zamknúť tému</option>
<option value="2">Odomknúť tému</option>
<option value="3">Odstrániť tému</option>
<option value="4">Obľúbiť tému</option>
<option value="5">Neobľúbiť tému</option>
<option value="6">Presunúť tému</option>
</select>
</div>
<div class="list-group-item list-group-item-warning" id="hide1modf" style="display:none;">
<select name="changeforum" class="form-control">';
Exemplo n.º 17
0
        <div class="bigtitle">
            <h5>Vytvoriť novú tému</h5>
            Pred vytvorením témy si prečítajte <a href="/stranky/pravidla">pravidlá</a>
        </div>
      </div>
';
if (isset($_POST["new"]) && $_POST["name"] != "" && $_POST["forumnew"] != "") {
    if (dbcount("(forumt_id)", "bg_forumtopic", "forumt_userid='" . $userinfo["user_id"] . "' AND forumt_time > " . strtotime("-5 minutes") . "") == 0) {
        $name = mysql_real_escape_string(htmlspecialchars($_POST["name"]));
        $text = trim(htmlspecialchars($_POST["forumnew"], ENT_QUOTES, "UTF-8"));
        if (dbcount("(forumt_id)", "bg_forumtopic", " forumt_name='" . $name . "'") != 1) {
            dbquery("INSERT INTO bg_forumtopic(forumt_name, forumt_userid, forumt_time, forumt_fid, forumt_newpost)\n                               VALUES('" . $name . "','" . $userinfo["user_id"] . "','" . time() . "','" . $_GET["forumfid"] . "','" . time() . "')");
            $idforumt = mysqli_insert_id();
            dbquery("INSERT INTO bg_forumtopicpost(post_userid, post_text, post_time, post_topicid, post_ip)\n                               VALUES('" . $userinfo["user_id"] . "','" . $text . "','" . time() . "','" . $idforumt . "','" . $_SERVER["REMOTE_ADDR"] . "')");
            $idpost = mysqli_insert_id();
            redirect("/tema/" . $idforumt . "/" . bezd($name) . "#p" . $idpost);
        } else {
            echo '<div class="alert alert-danger" role="alert">Použi iný názov tento názov už existuje.</div>';
        }
    } else {
        echo '<div class="alert alert-danger" role="alert">Pre vytvorenie novej témy musíš počkať 5 minút ...</div>';
    }
}
if (isset($_POST["view"])) {
    echo '
<div class="forumpost list-group" id="p">
    
    <div class="list-group-item" style="background:#5cb85c;border-color:#5cb85c;">Téma: ' . htmlspecialchars($_POST["name"]) . '</div>

	<div class="list-group-item">
        <a href="#p0" class="idf">#0</a><strong>' . username($userinfo["user_id"], 1) . '</strong> - ' . $adminprava[$userinfo["user_perm"]] . '<span class="pull-right">' . date("j. n. Y H:i:s", $dataf3["post_time"]) . '</span>
Exemplo n.º 18
0
  <div class="panel-heading">Nahrané obrázky</div>
  <ul class="list-group">
';
    for ($i = 0; $i < count($_FILES['file']['name']); $i++) {
        $tmpFilePath = $_FILES['file']['tmp_name'][$i];
        if ($tmpFilePath != "") {
            if (in_array($_FILES['file']['type'][$i], $suborkoncovky)) {
                $rand = rand(100, 999);
                $koncovka = $suborkoncovkycheck[$_FILES['file']['type'][$i]];
                if (isset($_POST["randomizename"]) && $_POST["randomizename"] == "1") {
                    $name1 = random();
                } else {
                    if (isset($_POST["randomizename"]) && $_POST["randomizename"] == "2") {
                        $name1 = basename($_FILES['file']['name'][$i], $koncovka);
                    } else {
                        $name1 = $rand . bezd(trim(basename($_FILES['file']['name'][$i], $koncovka)));
                    }
                }
                $name = $name1 . $koncovka;
                $saveurl = $_POST["filedir"] . $name;
                $podmienka_exist = $_POST["randomizename"] == "2" ? 1 : (!file_exists($saveurl) ? 1 : 0);
                if ($podmienka_exist) {
                    if ($_POST["filedir"] == "../../data.desart.sk/articles/") {
                        $img = @file_get_contents($weburl . "inc/func/resize.php?i=" . $_FILES["file"]["tmp_name"][$i] . "&w=340&h=200");
                        if ($img) {
                            file_put_contents($saveurl, $img);
                            echo '
    <li class="list-group-item list-group-item-success">
    <div class="input-group">
      <input type="text" class="form-control"  value="' . $weburl . 'file/articles/' . $name . '">
      <span class="input-group-btn">
Exemplo n.º 19
0
</div>
                ';
            }
            echo '</div>';
        } else {
            echo '<div class="alert alert-info">Žiadne výsledky v článkoch.</div>';
        }
        $result33 = dbquery("SELECT post_topicid,post_text,post_time FROM bg_forumtopicpost WHERE post_text LIKE '%" . $search . "%' GROUP BY post_topicid");
        $rows2 = dbrows($result33);
        if ($rows2 >= "1") {
            echo '<div class="list-group">
            <a class="list-group-item active">Nájdené výsledky vo fóre</a>
            ';
            while ($data66 = dbarray($result33)) {
                echo '
<div class="list-group-item">
  <span class="label label-warning">' . forumcat(forumcatid($data66["post_topicid"])) . '</span>
<a href="/tema/' . $data66["post_topicid"] . '/' . bezd(forumtopicname($data66["post_topicid"])) . '">' . forumtopicname($data66["post_topicid"]) . '</a>
<span class="badge">' . timeago($data66["post_time"]) . '</span>
</div>
                ';
            }
            echo '</div>';
        } else {
            echo '<div class="alert alert-info">Žiadne výsledky v fóre.</div>';
        }
    } else {
        echo '<div class="alert alert-info">Výsledok musí obsahovať viacej než 3 písmená</div>';
    }
}
require "inc/footer.php";