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

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



//$komputery="/home/www/netsatmedia_portal/abonenci/www/komputery";
$czy_error_5=exec("cat $komputery |grep $REMOTE_ADDR");
//echo "$REMOTE_ADDR $czy_error_5 <br>" ;
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 S_HW like '%$dana1%' OR P_NAME like '%$dana1%' OR P_NAME like '%$dana1%' OR S_ADDRESS_STREET like '%$dana1%'  ORDER BY S_IP ;";
//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\n"; 
if(strstr($h->A_STATUS,NORMAL)) {} else echo " $h->A_STATUS *" ;
echo " $h->S_IP;";
echo " $h->P_NAME;";
echo " $h->S_HOST;";
echo "$h->P_PHONE ; $h->T_NETWORK_SERVER; $h->S_ADDRESS_STREET;";
echo "\n";
}
}
} else {
echo $error5 ;
}

?>

