Diff -- /var/www/vhosts/3dshawn.com/site1/db_fails.cgi
Diff
/var/www/vhosts/3dshawn.com/site1/db_fails.cgi
added on local at 2026-07-10 18:57:29
Added
+20
lines
Removed
-0
lines
Context
0
unchanged
Blobs
from
to 917c9ce13fef
to 917c9ce13fef
Unified diff
Naive LCS-based line diff. Additions in emerald, deletions in rose. Both sides decompressed live from BLOB_STORE.| 1 | #!/usr/bin/perl | |
| 2 | use strict; use warnings; use CGI (); | |
| 3 | use MODS::Config; use MODS::DBConnect; use MODS::Template; use MODS::PageWrapper; | |
| 4 | my $db = MODS::DBConnect->new; my $tpl = MODS::Template->new; | |
| 5 | $|=1; print "Content-Type: text/html; charset=utf-8\nCache-Control: no-cache\n\n"; | |
| 6 | my $dbh = $db->db_connect or die "DB connect failed\n"; | |
| 7 | my @rows = $db->db_readwrite_multiple($dbh, q~ | |
| 8 | SELECT f.failed_scan_logs_id AS id, f.db_name, f.date_time, s.server_name | |
| 9 | FROM FAILED_SCAN_LOGS f LEFT JOIN SERVERS s ON s.server_id = f.server_id | |
| 10 | ORDER BY f.date_time DESC LIMIT 200 | |
| 11 | ~, __FILE__, __LINE__); | |
| 12 | my $total = scalar @rows; | |
| 13 | $db->db_disconnect($dbh); | |
| 14 | ||
| 15 | my @body = $tpl->template('db_fails.html', | |
| 16 | { rows => \@rows, has_rows => $total ? 1 : 0, total => $total }); | |
| 17 | MODS::PageWrapper->new->wrapper( | |
| 18 | page_title => 'DB scan failures', page_key => '', | |
| 19 | body_html => join('', @body), userinfo => { display_name => 'Operator' }, | |
| 20 | ); |