Ejemplo n.º 1
0
            ?>
</span>
	 <div style="font-size:11px;">
	 date: <i><?php 
            echo date(OS_DATE_FORMAT, strtotime($row["date"]));
            ?>
</i> 
	  <a class="floatR padLeft" title="Link to profile" target="_blank" href="<?php 
            echo OS_HOME;
            ?>
?u=<?php 
            echo $row["name"];
            ?>
">link</a> 
	 <?php 
            $ip_part = OS_GetIpRange($row["ip"]);
            if (!empty($ip_part)) {
                ?>
	 <a class="floatR" title="Show IP Range" href="<?php 
                echo OS_HOME;
                ?>
adm/?bans&amp;ip_range=<?php 
                echo $ip_part;
                ?>
">ipr</a>
	 <?php 
            }
            ?>
	 </div>
	 </td>
	 <td width="64" class="font12">
Ejemplo n.º 2
0
 }
 $BannedTotal = 0;
 $CanBan = 0;
 if (isset($_POST["banlist"]) and isset($bantimedate)) {
     $sql = "";
     $sql .= "INSERT INTO " . OSDB_BANS . "(name, server, reason, ip, ip_part, admin, gamename, date, expiredate, country) VALUES";
     //UPDATE stats table too
     $sql2 = "UPDATE " . OSDB_STATS . " SET banned =  1 WHERE ";
     //GameOffenses
     $sql3 = "INSERT INTO " . OSDB_GO . "(player_name, reason, offence_time, offence_expire, pp, admin) VALUES";
     $offence_time = date("Y-m-d H:i:00", time());
     foreach ($_POST["banlist"] as $BannedPlayers) {
         $banned = strtolower($BannedPlayers["name"]);
         $ip = $BannedPlayers["ip"];
         $realm = $BannedPlayers["realm"];
         $ip_part = OS_GetIpRange($ip);
         $Letter = geoip_country_code_by_addr($GeoIPDatabase, $ip);
         $Country = geoip_country_name_by_addr($GeoIPDatabase, $ip);
         $time = date("Y-m-d H:i:00", time());
         $reason = "Left after " . $BannedPlayers["left"] . " min. (#" . $BannedPlayers["gameid"] . ")";
         if (!empty($banned)) {
             $sql .= " ('{$banned}', '{$realm}', '{$reason}',  '{$ip}', '{$ip_part}', '', '#" . $BannedPlayers["gameid"] . "', '{$time}', '{$bantimedate}', '{$Letter}'),";
             //PP
             $sql2 .= " player = '" . $banned . "' OR ";
             //GameOffenses
             $sql3 .= " ('{$banned}', '{$reason}', '{$offence_time}', '', '" . (int) $pp . "', '[system]'),";
             $CanBan = 1;
             $BannedTotal++;
         }
     }
     $sql = substr($sql, 0, -1);
Ejemplo n.º 3
0
    $SHOW_TOTALS = 1;
    include 'pagination.php';
    $sth = $db->prepare("SELECT * FROM oh_geoip WHERE code!='' {$sqlLetter} {$proxy} {$sql} LIMIT {$offset}, {$rowsperpage}");
    $result = $sth->execute();
    ?>
    
	<table>
    <tr>
	  <th width="95" class="padLeft">IP Start</th>
	  <th width="95">IP End</th>
	  <th width="64">Code</th>
	  <th>Country</th>
	</tr>
   <?php 
    while ($row = $sth->fetch(PDO::FETCH_ASSOC)) {
        $ip_part = OS_GetIpRange($row["ip_start"]) . ".";
        ?>
   <tr>
     <td><?php 
        echo $row["ip_start"];
        ?>
</td>
	 <td><?php 
        echo $row["ip_end"];
        ?>
</td>
	 <td><img src="<?php 
        echo OS_HOME;
        ?>
img/flags/<?php 
        echo $row["code"];
Ejemplo n.º 4
0
 $ip = $UserData[0]["ip"];
 $ip_part = OS_GetIpRange($ip);
 //Show all user IPs
 $sth = $db->prepare("SELECT gp.id, gp.ip, gp.name, g.gamename, g.datetime, gp.gameid \n\t\t\t FROM " . OSDB_GP . " as gp\n\t\t\t LEFT JOIN " . OSDB_GAMES . " as g on g.id = gp.gameid\n\t\t\t WHERE name = '" . $PlayerName . "' GROUP BY ip ORDER BY id DESC LIMIT 50");
 $result = $sth->execute();
 $UserIPAddr = array();
 $AllUserIPS = array();
 $c = 0;
 while ($row = $sth->fetch(PDO::FETCH_ASSOC)) {
     $UserIPAddr[$c]["id"] = $row["id"];
     $UserIPAddr[$c]["ip"] = $row["ip"];
     $UserIPAddr[$c]["name"] = $row["name"];
     $UserIPAddr[$c]["gameid"] = $row["gameid"];
     $UserIPAddr[$c]["gamename"] = $row["gamename"];
     $UserIPAddr[$c]["datetime"] = date(OS_DATE_FORMAT, strtotime($row["datetime"]));
     $AllUserIPS[] = OS_GetIpRange($row["ip"]);
     $c++;
 }
 $AllUserIPS = array_unique($AllUserIPS);
 $sql = "";
 if (count($AllUserIPS) > 1) {
     $sql = " OR (";
     foreach ($AllUserIPS as $UserIP) {
         $sql .= "  ip_part LIKE '" . $UserIP . "' OR ip LIKE (':" . $UserIP . "%') OR ";
     }
     $sql = substr($sql, 0, strlen($sql) - 3) . ")";
 }
 //Banned players on the same IP range
 $sth = $db->prepare("SELECT * FROM " . OSDB_BANS . " WHERE ip_part LIKE '" . $ip_part . "' {$sql} LIMIT 50");
 $result = $sth->execute();
 $UserIPRange = array();
Ejemplo n.º 5
0
        ?>
<img src="<?php 
        echo OS_HOME;
        ?>
img/flags/<?php 
        echo $Letter;
        ?>
.gif" class="imgvalign" title="<?php 
        echo $Country;
        ?>
" alt="" /><?php 
    }
    ?>
</span>
	 <?php 
    $ip_part = OS_GetIpRange($row["user_ip"]);
    if (!empty($ip_part)) {
        ?>
	 <a title="Show IP Range" href="<?php 
        echo OS_HOME;
        ?>
adm/?bans&amp;ip_range=<?php 
        echo $ip_part;
        ?>
&amp;show=all"><?php 
        echo $row["user_ip"];
        ?>
</a>
	 <?php 
    } else {
        echo $row["user_ip"];