<?php
require_once "config.php";

global $DB;

$data_t = $DB->selectPage($totalCount,"SELECT cli.balance,inter.* FROM internet AS inter
					LEFT JOIN clients AS cli ON (inter.client_id=cli.id)
					 WHERE active=1 ORDER BY id");
foreach($data_t as $data_k=>$data_v)
{
	if($data_v[balance]>=0)
	{
		echo "/sbin/ipfw -q table ".($data_v[packet_id]+26)." add ".$data_v[ip]." \n";
	}
}
?>
