ona
18.1.1
About: OpenNetAdmin provides a database managed inventory of your IP network (with Web and CLI interface). Fossies Dox: ona-18.1.1.tar.gz ("inofficial" and yet experimental doxygen-generated source code documentation) 
|
Go to the documentation of this file. 8 $base = dirname(__FILE__).
"/../www/";
11 if (!is_dir(
$include)) { print
"ERROR => Couldn't find include folder {$include}!\n";
exit; }
12 require_once(
$base .
'/config/config.inc.php');
22 echo
"Found {$rows} PTR records with no domain.\n";
23 if (!$rows) echo
" Everything looks OK!\n";
25 foreach ($ptrs as $ptr) {
29 if (!$interface[
'ip_addr']) {
30 echo
"Possible orphan PTR record in dns table at ID: {$ptr['id']}. You should delete this record manually.\n";
34 $ipflip =
ip_mangle($interface[
'ip_addr'],
'flip');
35 $octets = explode(
".",$ipflip);
40 $_SESSION[
'ona'][
'auth'][
'user'][
'username'] =
'PTRFIX';
41 $_SESSION[
'ona'][
'auth'][
'perms'][
'advanced'] =
'Y';
42 $_SESSION[
'ona'][
'auth'][
'perms'][
'host_modify'] =
'Y';
44 if (!$ptrdomain[
'id']) {
45 echo
" {$interface['ip_addr_text']}: Unable to find a pointer domain for this IP! Creating the following DNS domain: {$octets[3]}.in-addr.arpa\n";
48 echo
"ERROR => {$output}\n";
55 echo
" Updating PTR for IP {$interface['ip_addr_text']} to domain {$ptrdomain['fqdn']}\n";
60 echo
"ERROR => SQL Query failed updating dns record: " .
$self[
'error'];
ona_find_domain($fqdn="", $returndefault=0)
ip_mangle($ip="", $format="default")
ona_get_interface_record($array='', $order='')
db_get_records($dbh=0, $table="", $where="", $order="", $rows=-1, $offset=-1)
db_update_record($dbh=0, $table="", $where="", $insert="")
run_module($module='', $options='', $transaction=1)