<?php
$error5="error5 Przykro nam, serwis jest dostepny wylacznie dla
autoryzowanych uzytkownikow";

if(file_exists(".config.php")) include(".config.php");


require("$komputery_arr");
if(in_array("$REMOTE_ADDR",$KOMPUTERY))  $czy_error_5=1 ;


if($czy_error_5) {




$ADM_USER=$SQL_USER ;
$ADM_USER_PASS=$SQL_USER_PASS ;


if($test) echo "OK"; else {
     $conn=mysql_pconnect($INTERFACE_ADDR,$ADM_USER,$ADM_USER_PASS);
     if (!$conn) die("ERROR podczas tworzenia polaczenia do bazy $SQL_DATABASE !\n");
     mysql_select_db($SQL_DATABASE) or die("ERROR podczas wyboru bazy!");
     $zapSQL="SELECT * FROM $SQL_TABLE_USERS where (S_IP='$dana1' OR S_HOST='$dana1' OR P_NAME like '%$dana1%' OR S_ADDRESS_STREET like '$dana1%') AND (S_IP LIKE '10.%' OR S_IP LIKE '192%') ORDER BY S_ADDRESS_STREET LIMIT 0,100;";
//echo "$zapSQL";
     $result = mysql_query($zapSQL,$conn) or die("Blad zapytania!");
 //   $user=mysql_fetch_object($result);
 //    if ((mysql_num_rows($result)>0) && ($user->pass==$PHP_AUTH_PW))
while ($h=mysql_fetch_object($result))
{
echo "\n"; 
echo "$h->S_IP;";
if ($h->S_ADDRESS_STREET) echo "$h->S_ADDRESS_STREET;"; else echo "$h->S_IP-N/A;";

}
}
} else {
echo $error5 ;
}
//echo "\n";
?>

