".__('Deleted successfully').""; else echo "

".__('Not deleted. Error deleting data')."

"; } if ((isset($_GET["update"])) OR ((isset($_GET["create"])))){ $name = entrada_limpia($_POST["name"]); $network = entrada_limpia($_POST["network"]); $description = entrada_limpia($_POST["description"]); $id_recon_server = entrada_limpia($_POST["id_recon_server"]); $interval = entrada_limpia($_POST["interval"]); $id_group = entrada_limpia($_POST["id_group"]); $create_incident = entrada_limpia($_POST["create_incident"]); $id_network_profile = entrada_limpia($_POST["id_network_profile"]); $id_os = get_parameter ("id_os", 10); } // -------------------------------- // UPDATE A RECON TASK // -------------------------------- if (isset($_GET["update"])) { $id = entrada_limpia($_GET["update"]); $sql = "UPDATE trecon_task SET id_os = $id_os, name = '$name', subnet = '$network', description='$description', id_recon_server = $id_recon_server, create_incident = $create_incident, id_group = $id_group, interval_sweep = $interval, id_network_profile = $id_network_profile WHERE id_rt = $id"; $result=mysql_query($sql); if ($result) echo "

".__('Updated successfully')."

"; else echo "

".__('Not updated. Error updating data')."

"; } // -------------------------------- // CREATE A RECON TASK // -------------------------------- if (isset($_GET["create"])) { $sql = "INSERT INTO trecon_task (name, subnet, description, id_recon_server, create_incident, id_group, id_network_profile, interval_sweep, id_os) VALUES ( '$name', '$network', '$description', $id_recon_server, $create_incident, $id_group, $id_network_profile, $interval, $id_os)"; $result=mysql_query($sql); if ($result) echo "

".__('Created successfully')."

"; else echo "

".__('Not created. Error inserting data')."

"; } // -------------------------------- // SHOW TABLE WITH ALL RECON TASKs // -------------------------------- echo "

".__('Pandora servers')." > "; echo __('Manage recontask')."

"; $query="SELECT * FROM trecon_task"; $result=mysql_query($query); $color=1; if (mysql_num_rows($result)){ echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } while ($row=mysql_fetch_array($result)){ $id_rt = $row["id_rt"]; $name = $row["name"]; $network = $row["subnet"]; $description = $row["description"]; // $id_server = $row["server"]; $type = $row["type"]; $id_recon_server = $row["id_recon_server"]; $interval = $row["interval_sweep"]; $id_group = $row["id_group"]; $create_incident = $row["create_incident"]; $id_network_profile = $row["id_network_profile"]; $id_os = $row["id_os"]; if ($color == 1){ $tdcolor = "datos"; $color = 0; } else { $tdcolor = "datos2"; $color = 1; } echo ""; echo ""; } echo "
".__('Name')."".__('Type')."".__('Network')."".__('Network profile')."".__('Group')."".__('Incident')."".__('OS')."".__('Interval')."".__('Action')."
"; echo "$name"; echo ""; if ($type ==1) echo "ICMP"; // Network echo ""; echo $network; // Network profile name echo ""; echo "".give_network_profile_name($id_network_profile).""; // GROUP echo ""; echo ""; // INCIDENT echo ""; if ($create_incident == 1) echo __('Yes'); else echo __('No'); // OS echo ""; if ($id_os > 0){ $icon = get_db_sql ("SELECT icon_name FROM tconfig_os WHERE id_os = $id_os"); echo ""; } // INTERVAL echo ""; echo human_time_description_raw($interval); // ACTION echo ""; echo "  "; echo ""; echo "
"; if (!mysql_num_rows($result)){ echo "
".__('There are no recon task configured')."
"; } echo ""; echo "
"; echo "
"; echo ""; echo "
"; ?>