<?PHP

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


require("$komputery_arr");

$CVERSION="2005-08-24";
$ADM_USER="$SQL_USER";
$SQL_DATABASE="$SQL_DATABASE";
$INTERFACE_ADDR="$INTERFACE_ADDR";
$ADM_USER_PASS="$SQL_USER_PASS";
$SQL_TABLE_USERS="USERS2";

$conn=mysql_pconnect($INTERFACE_ADDR,$ADM_USER,$ADM_USER_PASS);
if (!$conn) die("ERROR HTTP_ERROR503; podczas tworzenia polaczenia do bazy $SQL_DATABASE !\n");
mysql_select_db($SQL_DATABASE) or die("ERROR HTTP_ERROR503; podczas wyboru bazy!");
$zapSQLHIST="SELECT ID_BILLING_USERS,if(P_DEALNUMBER like '@biall.net.pl%',1,2) AS OPER FROM $SQL_TABLE_USERS WHERE S_IP='$ip'";
$result = mysql_query($zapSQLHIST,$conn) or die("Blad HTTP_ERROR503; zapytania2!");
if ($h=mysql_fetch_object($result))
{
	$ID_BILLING_USERS="$h->ID_BILLING_USERS";
	$OPER=$h->OPER;
} else {
	$ID_BILLING_USERS=0;
	$OPER=0;
}
echo '$id='.$ID_BILLING_USERS.';$oper='.$OPER.';';
?>

