Ejemplo n.º 1
0
    $user_name = urldecode($_GET["un"]);
}
if (isset($_GET["vote"])) {
    $filter_vote = $_GET["vote"];
}
if ($_POST["gdsr_filter"] == __("Filter", "gd-star-rating")) {
    $filter_vote = $_POST["gdsr_vote"];
    $page_id = 1;
}
if ($_POST["gdsr_update"] == __("Update", "gd-star-rating")) {
    $ips = $_POST["gdsr_item"];
    if (count($ips) > 0) {
        $filter_vote = 0;
        $page_id = 1;
        if (isset($_POST["gdsr_ip_ban"])) {
            $all_banned = GDSRDatabase::get_all_banned_ips();
            $banned_ips = array();
            foreach ($all_banned as $ip) {
                $banned_ips[] = $ip->ip;
            }
            foreach ($ips as $ip) {
                if (!in_array($ip, $banned_ips)) {
                    GDSRDatabase::ban_ip($ip);
                }
            }
        }
    }
}
if ($filter_vote > 0) {
    $url .= "&vote=" . $filter_vote;
}
Ejemplo n.º 2
0
_e("Record Id", "gd-star-rating");
?>
</th>
            <th scope="col"><?php 
_e("Type", "gd-star-rating");
?>
</th>
            <th scope="col"><?php 
_e("IP", "gd-star-rating");
?>
</th>
        </tr>
    </thead>
    <tbody>
<?php 
$rows = GDSRDatabase::get_all_banned_ips(($page_id - 1) * $posts_per_page, $posts_per_page);
$tr_class = "";
foreach ($rows as $row) {
    echo '<tr id="post-' . $row->id . '" class="' . $tr_class . ' author-self status-publish" valign="top">';
    echo '<th scope="row" class="check-column"><input name="gdsr_item[]" value="' . $row->id . '" type="checkbox"></th>';
    echo '<td>' . $row->id . '</td>';
    echo '<td><strong>';
    switch ($row->mode) {
        case "S":
            echo "Single";
            break;
        case "M":
            echo "Masked";
            break;
        case "R":
            echo "Range";