コード例 #1
0
ファイル: users_log.php プロジェクト: TheReaCompany/pooplog
    _e("Comment Author", "gd-star-rating");
    ?>
</th>
            <th scope="col"><?php 
    _e("Comment Excerpt", "gd-star-rating");
    ?>
</th>
            <?php 
}
?>
        </tr>
    </thead>
    <tbody>

<?php 
$log = gdsrAdmDB::get_user_log($user_id, $vote_type, $filter_vote, ($page_id - 1) * $posts_per_page, $posts_per_page);
$ips = array();
$idx = array();
foreach ($log as $l) {
    if (!in_array($l->ip, $ips)) {
        $ips[] = $l->ip;
        $idx[] = 1;
    } else {
        $idx[count($idx) - 1]++;
    }
}
$counter = 0;
$tr_class = "";
for ($i = 0; $i < count($idx); $i++) {
    for ($j = 0; $j < $idx[$i]; $j++) {
        echo '<tr id="post-' . $log[$counter]->record_id . '" class="' . $tr_class . ' author-self status-publish" valign="top">';