PSR2 Cleanup: /html edition

Travis tests for code conformance. Ignore warnings for now.
Fixed all errors, left most warnings.
This commit is contained in:
Tony Murray
2016-08-18 20:28:22 -05:00
parent f0c82498b5
commit 8c639aa5a4
468 changed files with 6605 additions and 7629 deletions

View File

@@ -38,26 +38,25 @@ if ($_GET['query'] && $_GET['cmd']) {
$host = $_GET['query'];
if (Net_IPv6::checkIPv6($host) || Net_IPv4::validateip($host) || filter_var('http://'.$host, FILTER_VALIDATE_URL)) {
switch ($_GET['cmd']) {
case 'whois':
$cmd = $config['whois']." $host | grep -v \%";
break;
case 'whois':
$cmd = $config['whois']." $host | grep -v \%";
break;
case 'ping':
$cmd = $config['ping']." -c 5 $host";
break;
case 'ping':
$cmd = $config['ping']." -c 5 $host";
break;
case 'tracert':
$cmd = $config['mtr']." -r -c 5 $host";
break;
case 'tracert':
$cmd = $config['mtr']." -r -c 5 $host";
break;
case 'nmap':
if ($_SESSION['userlevel'] != '10') {
echo 'insufficient privileges';
}
else {
$cmd = $config['nmap']." $host";
}
break;
case 'nmap':
if ($_SESSION['userlevel'] != '10') {
echo 'insufficient privileges';
} else {
$cmd = $config['nmap']." $host";
}
break;
}//end switch
if (!empty($cmd)) {