Error fixes
This commit is contained in:
parent
75ea601e67
commit
7864e993d4
|
@ -85,14 +85,14 @@ if ((isset ($_GET["update"])) OR ((isset ($_GET["create"])))) {
|
||||||
$recon_ports = get_parameter_post ("recon_ports", "");
|
$recon_ports = get_parameter_post ("recon_ports", "");
|
||||||
$id_os = get_parameter_post ("id_os", 10);
|
$id_os = get_parameter_post ("id_os", 10);
|
||||||
$snmp_community = get_parameter_post ("snmp_community", "public");
|
$snmp_community = get_parameter_post ("snmp_community", "public");
|
||||||
$id_recon_script = get_parameter ("id_recon_script", 'NULL');
|
$id_recon_script = get_parameter ("id_recon_script", 0);
|
||||||
$mode = get_parameter ("mode", "");
|
$mode = get_parameter ("mode", "");
|
||||||
$field1 = get_parameter ("field1", "");
|
$field1 = get_parameter ("field1", "");
|
||||||
$field2 = get_parameter ("field2", "");
|
$field2 = get_parameter ("field2", "");
|
||||||
$field3 = get_parameter ("field3", "");
|
$field3 = get_parameter ("field3", "");
|
||||||
$field4 = get_parameter ("field4", "");
|
$field4 = get_parameter ("field4", "");
|
||||||
if ($mode == "network_sweep")
|
if ($mode == "network_sweep")
|
||||||
$id_recon_script = 'NULL';
|
$id_recon_script = 0;
|
||||||
else
|
else
|
||||||
$id_network_profile = 0;
|
$id_network_profile = 0;
|
||||||
|
|
||||||
|
@ -149,9 +149,9 @@ if (isset($_GET["update"])) {
|
||||||
|
|
||||||
$reason = '';
|
$reason = '';
|
||||||
if ($name != "") {
|
if ($name != "") {
|
||||||
if (($id_recon_script == 'NULL') && preg_match("/[0-9]+.+[0-9]+.+[0-9]+.+[0-9]+\/+[0-9]/", $network))
|
if ((empty($id_recon_script)) && preg_match("/[0-9]+.+[0-9]+.+[0-9]+.+[0-9]+\/+[0-9]/", $network))
|
||||||
$result = db_process_sql_update('trecon_task', $values, $where);
|
$result = db_process_sql_update('trecon_task', $values, $where);
|
||||||
elseif ($id_recon_script != 'NULL')
|
elseif (!empty($id_recon_script))
|
||||||
$result = db_process_sql_update('trecon_task', $values, $where);
|
$result = db_process_sql_update('trecon_task', $values, $where);
|
||||||
else {
|
else {
|
||||||
if (!preg_match("/[0-9]+.+[0-9]+.+[0-9]+.+[0-9]+\/+[0-9]/", $network))
|
if (!preg_match("/[0-9]+.+[0-9]+.+[0-9]+.+[0-9]+\/+[0-9]/", $network))
|
||||||
|
@ -201,13 +201,13 @@ if (isset($_GET["create"])) {
|
||||||
|
|
||||||
$reason = "";
|
$reason = "";
|
||||||
if ($name != "") {
|
if ($name != "") {
|
||||||
if (($id_recon_script == 'NULL') && preg_match("/[0-9]+.+[0-9]+.+[0-9]+.+[0-9]+\/+[0-9]/", $network))
|
if (empty($id_recon_script) && preg_match("/[0-9]+.+[0-9]+.+[0-9]+.+[0-9]+\/+[0-9]/", $network))
|
||||||
{
|
{
|
||||||
$result = db_process_sql_insert('trecon_task', $values);
|
$result = db_process_sql_insert('trecon_task', $values);
|
||||||
|
|
||||||
$reason = __("Network provided is not correct");
|
$reason = __("Network provided is not correct");
|
||||||
}
|
}
|
||||||
elseif ($id_recon_script != 'NULL') {
|
elseif (!empty($id_recon_script)) {
|
||||||
$result = db_process_sql_insert('trecon_task', $values);
|
$result = db_process_sql_insert('trecon_task', $values);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue