Ejemplo n.º 1
0
echo '';
?>
    <?php 
echo sprintf('<a href="./post.php?action=edit&amp;post=%s">%s</a> <a href="%s" target="_blank">[view]</a>', $id, gdsrAdmDB::get_post_title($id), get_permalink($id));
?>
</strong></p>
<?php 
if (isset($id)) {
    $url .= "&amp;gdsr=comments";
    $page_id = 1;
    if (isset($_GET["pg"])) {
        $page_id = $_GET["pg"];
    }
    $options = $gdsr->o;
    $posts_per_page = $options["admin_rows"];
    $number_posts = GDSRDatabase::get_comments_count($id);
    $max_page = floor($number_posts / $posts_per_page);
    if ($max_page * $posts_per_page != $number_posts) {
        $max_page++;
    }
    $pager = $max_page > 1 ? gdFunctionsGDSR::draw_pager($max_page, $page_id, $url, "pg") : "";
    ?>

<div class="tablenav">
    <div class="alignleft">
    </div>
    <div class="tablenav-pages">
        <?php 
    echo $pager;
    ?>
    </div>
Ejemplo n.º 2
0
$tr_class = "";
foreach ($rows as $row) {
    $row = GDSRDB::convert_row($row);
    $moderate_articles = GDSRDatabase::get_moderation_count($row->pid);
    $moderate_comments = GDSRDatabase::get_moderation_count_joined($row->pid);
    if ($moderate_articles == 0) {
        $moderate_articles = "[ <strong>0</strong> ] ";
    } else {
        $moderate_articles = sprintf('[<a href="./admin.php?page=gd-star-rating-stats&gdsr=moderation&pid=%s&vt=article"> <strong style="color: red;">%s</strong> </a>] ', $row->pid, $moderate_articles);
    }
    if ($moderate_comments == 0) {
        $moderate_comments = "[ <strong>0</strong> ] ";
    } else {
        $moderate_comments = sprintf('[<a href="./admin.php?page=gd-star-rating-stats&gdsr=moderation&pid=%s&vt=post"> <strong style="color: red;">%s</strong> </a>] ', $row->pid, $moderate_comments);
    }
    $comment_count = GDSRDatabase::get_comments_count($row->pid);
    if ($comment_count == 0) {
        $comment_count = '<a class="post-com-count" title="0"><span class="comment-count">0</span></a>';
    } else {
        $comment_count = sprintf('<a class="post-com-count" title="%s" href="./admin.php?page=gd-star-rating-stats&gdsr=comments&postid=%s"><span class="comment-count">%s</span></a>', $comment_count, $row->pid, $comment_count);
    }
    $timer_info = "";
    if ($options["timer_active"] == 1) {
        if ($row->expiry_type == "D") {
            $timer_info = '<strong><span style="color: red">' . __("date limit", "gd-star-rating") . '</span></strong><br />';
            $timer_info .= $row->expiry_value;
        } else {
            if ($row->expiry_type == "T") {
                $timer_info = '<strong><span style="color: red">' . __("countdown", "gd-star-rating") . '</span></strong><br />';
                $timer_info .= substr($row->expiry_value, 1) . " ";
                switch (substr($row->expiry_value, 0, 1)) {