Diff -- /var/www/vhosts/3dshawn.com/site1/table_locks.cgi
Diff
/var/www/vhosts/3dshawn.com/site1/table_locks.cgi
added on local at 2026-07-10 18:57:31
Added
+22
lines
Removed
-0
lines
Context
0
unchanged
Blobs
from
to 08456c3d4e92
to 08456c3d4e92
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 $cgi = CGI->new; 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 | ||
| 8 | my @rows = $db->db_readwrite_multiple($dbh, q~ | |
| 9 | SELECT l.locked_table_logs_id AS id, l.db_name, l.table_name, l.in_use, l.name_locked, | |
| 10 | l.date_time, s.server_name | |
| 11 | FROM LOCKED_TABLE_LOGS l LEFT JOIN SERVERS s ON s.server_id = l.server_id | |
| 12 | ORDER BY l.date_time DESC LIMIT 200 | |
| 13 | ~, __FILE__, __LINE__); | |
| 14 | my $total = scalar @rows; | |
| 15 | $db->db_disconnect($dbh); | |
| 16 | ||
| 17 | my @body = $tpl->template('table_locks.html', | |
| 18 | { rows => \@rows, has_rows => $total ? 1 : 0, total => $total }); | |
| 19 | MODS::PageWrapper->new->wrapper( | |
| 20 | page_title => 'Table locks', page_key => 'table_locks', | |
| 21 | body_html => join('', @body), userinfo => { display_name => 'Operator' }, | |
| 22 | ); |