<link rel="stylesheet" type="text/css" href="style.css"> <div class='main_comment_container'> <?php if ($_GET['post_comment'] == 'posted_a_comment') { } else { if ($_GET['post_comment'] == 'live_check_new_message') { $Tblen = get_total_len_comment($_SESSION['plno']); if (!empty($Tblen) and $Tblen != 0) { #look have a comment if ($_SESSION['cTblens'] > $Tblen) { } else { if ($_SESSION['cTblens'] < $Tblen) { $total_new_comment = $Tblen - $_SESSION['cTblens']; $_SESSION['cTblens'] = $Tblen; $comment = get_new_comments($_SESSION['plno'], $total_new_comment); $comment_len = count($comment); } } } else { # look is empty } } else { if ($_GET['post_comment'] == 'sort') { if (!empty($_GET['sort_as'])) { unset($_SESSION['plcnos_sortings']); unset($_SESSION['showMoreCounter']); $_SESSION['plcnos_sortings'] = comments_sorted($st, $_GET['sort_as']); $showMore_start = 0; $showMore_stop = 10; } else {
$last_user_post = isset($user_article_stats['P']) ? $user_article_stats['P']['last_post'] : ''; $total_user_post = isset($user_article_stats['P']) ? $user_article_stats['P']['total'] : '0'; } unset($_GET['author_id']); // now get sitewide stats (if author rights allow) $all_article_stats = ''; $all_comment_stats = ''; if (empty($_SESSION[WW_SESS]['guest'])) { $all_article_stats = get_articles_stats(); if (!empty($all_article_stats)) { $first_site_post = isset($all_article_stats['P']) ? $all_article_stats['P']['first_post'] : ''; $last_site_post = isset($all_article_stats['P']) ? $all_article_stats['P']['last_post'] : ''; $total_site_post = isset($all_article_stats['P']) ? $all_article_stats['P']['total'] : ''; } $all_comment_stats = get_comments_stats(); $all_new_comments = get_new_comments(); } // output aside content // quick links $quicklinks = ' <ul> <li><a href="' . $_SERVER["PHP_SELF"] . '?page_name=categories">Manage Categories</a></li> <li><a href="' . $_SERVER["PHP_SELF"] . '?page_name=tags">Manage Tags</a></li> <li><a href="' . $_SERVER["PHP_SELF"] . '?page_name=authors">Manage Authors</a></li> </ul> '; // alternate quicklinks for contributors if (!empty($_SESSION[WW_SESS]['guest']) && $_SESSION[WW_SESS]['level'] != 'editor') { $quicklinks = ' <ul> <li><a href="' . $_SERVER["PHP_SELF"] . '?page_name=authors">Edit Your Details</a></li>
} elseif (isset($_GET['approved']) && empty($initial_content)) { $initial_content = empty($_GET['approved']) ? '<h4>Showing disapproved comments only</h4>' : '<h4>Showing approved comments only</h4>'; } else { $initial_content = '<h4>Showing all comments</h4>'; } } // grab whichever comments we need to list $comments = empty($is_contributor) ? get_comments() : get_comments($_SESSION[WW_SESS]['user_id']); $total_found = !empty($comments) ? $comments[0]['total_found'] : 0; $total_pages = !empty($comments) ? $comments[0]['total_pages'] : 0; // per page - same definition as get_comments() $per_page = !isset($_GET['per_page']) || empty($_GET['per_page']) ? 15 : (int) $_GET['per_page']; // get aside content // get list of comment stats and articles $comment_stats = empty($is_contributor) ? get_comments_stats() : get_comments_stats($_SESSION[WW_SESS]['user_id']); $new_comments = empty($is_contributor) ? get_new_comments() : get_new_comments($_SESSION[WW_SESS]['user_id']); // output main content - into $main_content variable $main_content = show_page_header('Comments', $right_text); $main_content .= isset($initial_content) ? $initial_content : ''; $main_content .= build_admin_comment_listing($comments); if ($total_found > $per_page) { $main_content .= show_admin_listing_nav($total_pages, $per_page); } // output aside content - into $aside_content variable $aside_content = ' <h4><a href="' . $_SERVER["PHP_SELF"] . '?page_name=comments&action=post">post a comment</a></h4> <h4>Filter comments</h4> <div class="snippet"> <ul> <li>