Current Threads
connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "DELETE FROM vir_notify WHERE id = ?";
$stmt = $conn->prepare($sql);
$stmt->bind_param("i", $entryid);
// Execute the statement
$stmt->execute();
$stmt->close();
$conn->close();
}
// Create a connection
$conn = new mysqli($DB_SERVERNAME, $DB_USERNAME, $DB_PASSWORD, $DB_DATABASE);
// Check the connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT count(*) AS vir_count FROM vir_notify";
$stmt = $conn->prepare($sql);
// Execute the statement
$stmt->execute();
// Get the result
$result = $stmt->get_result();
$row = $result->fetch_assoc();
$num_of_entrys=$row["vir_count"];
$stmt->close();
$conn->close();
//now list of all the entrys => machineid, file, hash, action taken
// Create a connection
$conn = new mysqli($DB_SERVERNAME, $DB_USERNAME, $DB_PASSWORD, $DB_DATABASE);
// Check the connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$last_id=-1;
//create the table header
echo('
');
echo('');
echo('');
echo('| Entryid | Machineid | File | Hash | Action Taken | Delete | ');
echo('
');
echo('');
echo('');
while($num_of_entrys!=0){
$sql = "SELECT * FROM vir_notify where id > $last_id";
$stmt = $conn->prepare($sql);
// Execute the statement
$stmt->execute();
// Get the result
$result = $stmt->get_result();
$row = $result->fetch_assoc();
$last_id=$row["id"];
$machineid=$row["machine_id"];
$hash=$row["hash"];
$file=$row["path"];
$action=$row["action"];
echo('');
echo('| '.$last_id.' | ');
echo(''.$machineid.' | ');
echo(''.$file.' | ');
echo(''.$hash.' | ');
echo(''.$action.' | ');
echo('delete | ');
echo('
');
$stmt->close();
$num_of_entrys--;
}
echo('');
echo('
');
$conn->close();
?>