u
This commit is contained in:
@@ -258,8 +258,8 @@ async function add_item(db,element_id1,field1,element_id2,field2){ //we have two
|
|||||||
echo '<tr>';
|
echo '<tr>';
|
||||||
echo '<td>' . $i . '</td>';
|
echo '<td>' . $i . '</td>';
|
||||||
echo '<td>' . basename($yara_files[$i]) . '</td>';
|
echo '<td>' . basename($yara_files[$i]) . '</td>';
|
||||||
echo '<td><a href="view_log.php?delete_yar='.$yara_files[$i].'&page=' . $current_page . '">delete</a></td>';
|
|
||||||
echo '<td><a href="'.str_replace("/var/www/html","",$yara_files[$i]).'" download>Download</a></td>';
|
echo '<td><a href="'.str_replace("/var/www/html","",$yara_files[$i]).'" download>Download</a></td>';
|
||||||
|
echo '<td><a href="view_log.php?delete_yar='.$yara_files[$i].'&page=' . $current_page . '">delete</a></td>';
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
@@ -274,7 +274,7 @@ async function add_item(db,element_id1,field1,element_id2,field2){ //we have two
|
|||||||
echo '<nav aria-label="Page navigation">';
|
echo '<nav aria-label="Page navigation">';
|
||||||
echo '<ul class="pagination justify-content-center">';
|
echo '<ul class="pagination justify-content-center">';
|
||||||
for ($i = 1; $i <= $total_pages; $i++) {
|
for ($i = 1; $i <= $total_pages; $i++) {
|
||||||
echo '<li class="page-item ' . ($i == $current_page ? 'active' : '') . '"><a class="page-link" href="view_log.php?page='.$i.'">' . $i . '</a></li>';
|
echo '<li class="page-item ' . ($i == $current_page ? 'active' : '') . '"><a class="page-link" href="database_settings.php?show=yara&page='.$i.'">' . $i . '</a></li>';
|
||||||
}
|
}
|
||||||
echo '</ul>';
|
echo '</ul>';
|
||||||
echo '</nav>';
|
echo '</nav>';
|
||||||
|
|||||||
@@ -71,11 +71,10 @@ function list_yara_files($dir) {
|
|||||||
$path = $dir . '/' . $entry;
|
$path = $dir . '/' . $entry;
|
||||||
// If the entry is a directory, call the function recursively
|
// If the entry is a directory, call the function recursively
|
||||||
if (is_dir($path)) {
|
if (is_dir($path)) {
|
||||||
$buf=list_yara_files($path);
|
$buf[]=list_yara_files($path);
|
||||||
foreach($buf as $newpath){
|
foreach($buf as $newpath){
|
||||||
$yar_files[]=$newpath;
|
$yar_files[]=$newpath;
|
||||||
}
|
}
|
||||||
//$yar_files = array_merge($yar_files, list_yara_files($path));
|
|
||||||
}
|
}
|
||||||
// If the entry is a file and ends with .yar extension, add it to the array
|
// If the entry is a file and ends with .yar extension, add it to the array
|
||||||
elseif (is_file($path) && pathinfo($path, PATHINFO_EXTENSION) === 'yar') {
|
elseif (is_file($path) && pathinfo($path, PATHINFO_EXTENSION) === 'yar') {
|
||||||
|
|||||||
Reference in New Issue
Block a user