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)  

install.php File Reference

Go to the source code of this file.

Variables

global $base
 
global $conf
 
global $self
 
global $onadb
 
 $onainstalldir = dirname($base)
 
 $plugindir = str_replace($onainstalldir.'/www', '', dirname(__FILE__))
 
 $installfile = __FILE__
 
 $installdir = dirname(__FILE__)
 
 $stat = 0
 
if(!auth('advanced')) $plugin_name = 'ona_nmap_scans'
 
 $window ['title'] = "ONA Nmap Scans Install"
 
 $pmodules = array()
 
 $window ['js']
 
 EOL
 
 $window ['html'] = "<div style='max-height: 500px;max-width:750;overflow: auto;padding: 5px;'>"
 
if(!is_writable($conf['plugin_dir'])) if(count($pmodules) > 0) $sqlfile = dirname(__FILE__)."/{$plugin_name}.sql"
 
if(file_exists($sqlfile)) $window ['html'] = "<br><b>Checking required files:</b><br>"
 
 $reqfile = $onainstalldir.'/www/local/nmap_scans'
 
if(is_dir($reqfile)) else
 
 $window ['html'] = "&nbsp;&nbsp;&nbsp;&nbsp;<img src='{$images}/silk/error.png' border='0'> <font color=\"red\">ERROR=> Unable to find required file, try the following:</font><br>"
 
 $window ['html'] = "<font color=\"orange\">Execute shell command:<br>cp {$installdir}/nmap.xsl {$reqfile}</font><br><br>"
 
 $window ['html'] = "&nbsp;&nbsp;&nbsp;&nbsp;<img src='{$images}/silk/error.png' border='0'> <font color=\"red\">ERROR=> Unable to find required file, try the following:</font><br>"
 
 $window ['html'] = "<font color=\"orange\">Execute shell command:<br>ln -s {$installdir}/nmap_scan_cron {$reqfile}</font><br><br>"
 
 $window ['html'] = "&nbsp;&nbsp;&nbsp;&nbsp;<img src='{$images}/silk/error.png' border='0'> <font color=\"red\">ERROR=> Unable to find required file, try the following:</font><br>"
 
 $window ['html'] = "<font color=\"orange\">Please install <a href=\"http://opennetadmin.com/docs/utils/dcm.pl\">dcm.pl</a>:<br>Make a symlink or install into {$onainstalldir}/bin</font><br><br>"
 
 $window ['html'] = "<font color=\"orange\">Install nmap package or adjust {$installdir}/nmap_scan_cron to point to proper nmap locaiton</font><br><br>"
 
 $window ['html'] = "<br><b>Disabling install script:</b><br>"
 
 $window ['html'] = "<br><br><center><font color='green'>END OF INSTALL</font></center></div>"
 

Variable Documentation

◆ $base

global $base

Definition at line 4 of file install.php.

◆ $conf

global $conf

Definition at line 4 of file install.php.

◆ $installdir

$installdir = dirname(__FILE__)

Definition at line 10 of file install.php.

◆ $installfile

$installfile = __FILE__

Definition at line 9 of file install.php.

◆ $onadb

global $onadb

Definition at line 4 of file install.php.

◆ $onainstalldir

$onainstalldir = dirname($base)

Definition at line 7 of file install.php.

◆ $plugin_name

if (!auth( 'advanced')) $plugin_name = 'ona_nmap_scans'

Definition at line 23 of file install.php.

◆ $plugindir

$plugindir = str_replace($onainstalldir.'/www', '', dirname(__FILE__))

Definition at line 8 of file install.php.

◆ $pmodules

$pmodules = array()

Definition at line 38 of file install.php.

◆ $reqfile

$reqfile = $onainstalldir.'/www/local/nmap_scans'

Definition at line 169 of file install.php.

◆ $self

global $self

Definition at line 4 of file install.php.

◆ $sqlfile

if (!is_writable( $conf[ 'plugin_dir'])) if (count( $pmodules) > 0) $sqlfile = dirname(__FILE__)."/{$plugin_name}.sql"

Definition at line 103 of file install.php.

◆ $stat

$stat = 0

Definition at line 11 of file install.php.

Referenced by rpt_output_csv().

◆ $window [1/13]

$window[ 'html'] = "<div style='max-height: 500px;max-width:750;overflow: auto;padding: 5px;'>"

Definition at line 61 of file install.php.

◆ $window [2/13]

if (file_exists( $sqlfile)) $window[ 'html'] = "<br><b>Checking required files:</b><br>"

Definition at line 167 of file install.php.

◆ $window [3/13]

$window[ 'html'] = "&nbsp;&nbsp;&nbsp;&nbsp;<img src='{$images}/silk/error.png' border='0'> <font color=\"red\">ERROR=> Unable to find required file, try the following:</font><br>"

Definition at line 191 of file install.php.

◆ $window [4/13]

$window[ 'html'] = "<font color=\"orange\">Execute shell command:<br>cp {$installdir}/nmap.xsl {$reqfile}</font><br><br>"

Definition at line 193 of file install.php.

◆ $window [5/13]

$window[ 'html'] = "&nbsp;&nbsp;&nbsp;&nbsp;<img src='{$images}/silk/error.png' border='0'> <font color=\"red\">ERROR=> Unable to find required file, try the following:</font><br>"

Definition at line 201 of file install.php.

◆ $window [6/13]

$window[ 'html'] = "<font color=\"orange\">Execute shell command:<br>ln -s {$installdir}/nmap_scan_cron {$reqfile}</font><br><br>"

Definition at line 203 of file install.php.

◆ $window [7/13]

$window[ 'html'] = "&nbsp;&nbsp;&nbsp;&nbsp;<img src='{$images}/silk/error.png' border='0'> <font color=\"red\">ERROR=> Unable to find required file, try the following:</font><br>"

Definition at line 211 of file install.php.

◆ $window [8/13]

$window[ 'html'] = "<font color=\"orange\">Please install <a href=\"http://opennetadmin.com/docs/utils/dcm.pl\">dcm.pl</a>:<br>Make a symlink or install into {$onainstalldir}/bin</font><br><br>"

Definition at line 213 of file install.php.

◆ $window [9/13]

$window[ 'html'] = "<font color=\"orange\">Install nmap package or adjust {$installdir}/nmap_scan_cron to point to proper nmap locaiton</font><br><br>"

Definition at line 223 of file install.php.

◆ $window [10/13]

$window[ 'html'] = "<br><b>Disabling install script:</b><br>"

Definition at line 226 of file install.php.

◆ $window [11/13]

$window[ 'html'] = "<br><br><center><font color='green'>END OF INSTALL</font></center></div>"

Definition at line 235 of file install.php.

◆ $window [12/13]

$window[ 'js']
Initial value:
= <<<EOL
el('{$window_name}_title_r').innerHTML =
'&nbsp;<a onClick="toggle_window(\'{$window_name}\');" title="Minimize window" style="cursor: pointer;"><img src="{$images}/icon_minimize.gif" border="0" /></a>' +
el('{$window_name}_title_r').innerHTML

Definition at line 48 of file install.php.

◆ $window [13/13]

$window[ 'title'] = "ONA Nmap Scans Install"

◆ else

if (! $stat) else
Initial value:
{
if (@mkdir($reqfile)) {
$window['html'] .= "&nbsp;&nbsp;&nbsp;&nbsp;<img src='{$images}/silk/accept.png' border='0'> {$reqfile}<br>";
@mkdir($reqfile.'/subnets');
} else {
$stat++;
$window['html'] .= "&nbsp;&nbsp;&nbsp;&nbsp;<img src='{$images}/silk/error.png' border='0'> <font color=\"red\">ERROR=> Unable to make required directory, try the following:</font><br>";
$window['html'] .= "<font color=\"orange\">Execute shell command:<br>mkdir {$onainstalldir}/www/local/nmap_scans</font><br><br>";
$window['html'] .= "<font color=\"orange\">Execute shell command:<br>mkdir {$onainstalldir}/www/local/nmap_scans/subnets</font><br><br>";
}
}
$reqfile = $onainstalldir.'/www/local/nmap_scans/subnets/nmap.xsl'

Definition at line 172 of file install.php.

◆ EOL

EOL

Definition at line 59 of file install.php.

$onainstalldir
$onainstalldir
Definition: install.php:7
$window
$window['title']
Definition: install.php:26
$stat
$stat
Definition: install.php:11
EOL
< a style="text-decoration: none;" href="/">< input class='edit' type="button" value="I don't like free stuff?" onclick=""/></a ></center ></div > EOL
Definition: install.php:40
$reqfile
$reqfile
Definition: install.php:169