mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-04-30 11:19:22 +02:00
Admin - executed SQL queries overlay
Allow admins to see executed SQL queries overlay Useful for testing and optimizing query usage on website
This commit is contained in:
parent
9e790a71f6
commit
8f5487db2b
@ -673,6 +673,9 @@
|
|||||||
'firstaccountName',
|
'firstaccountName',
|
||||||
'secondaccountName',
|
'secondaccountName',
|
||||||
);
|
);
|
||||||
|
// Allow admins to see executed SQL queries overlay
|
||||||
|
// Useful for testing and optimizing query usage on website
|
||||||
|
$config['admin_show_queries'] = true;
|
||||||
|
|
||||||
// Built-in FORUM
|
// Built-in FORUM
|
||||||
// Enable forum, enable guildboards, level to create threads/post in them
|
// Enable forum, enable guildboards, level to create threads/post in them
|
||||||
|
@ -14,10 +14,57 @@
|
|||||||
<!--
|
<!--
|
||||||
Designed By <a href="https://otland.net/members/snavy.155163/" target="_blank">Snavy</a>
|
Designed By <a href="https://otland.net/members/snavy.155163/" target="_blank">Snavy</a>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|
||||||
</footer>
|
</footer>
|
||||||
</div><!-- Main container END -->
|
</div><!-- Main container END -->
|
||||||
|
|
||||||
|
<?php
|
||||||
|
// If you are logged in as an admin, display SQL queries admin overlay
|
||||||
|
if ($config['admin_show_queries'] && user_logged_in() && is_admin($user_data)): ?>
|
||||||
|
<div id="admin-queries">
|
||||||
|
<label for="admin-toggle">Admin: Toggle Queries</label>
|
||||||
|
<input id="admin-toggle" name="admin-toggle" type="checkbox">
|
||||||
|
<div id="admin-show-queries">
|
||||||
|
<?php data_dump($accQueriesData, false, "Logged in as Admin: Showing executed SQL queries:"); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<style type="text/css">
|
||||||
|
#admin-queries {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 9999;
|
||||||
|
background-color: rgb(30,33,40);
|
||||||
|
opacity: 0.94;
|
||||||
|
max-width: 95%;
|
||||||
|
max-height: 950px;
|
||||||
|
border: 1px solid #d1a233;
|
||||||
|
overflow: overlay;
|
||||||
|
}
|
||||||
|
#admin-queries pre {
|
||||||
|
margin: 0;
|
||||||
|
padding-right: 10px;
|
||||||
|
padding-bottom: 5px;
|
||||||
|
}
|
||||||
|
#admin-queries label {
|
||||||
|
user-select: none;
|
||||||
|
display: inline-block;
|
||||||
|
padding: 5px;
|
||||||
|
color: #b39062;
|
||||||
|
}
|
||||||
|
#admin-queries label:hover {
|
||||||
|
color: #e79424;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
#admin-queries input,
|
||||||
|
#admin-queries #admin-show-queries,
|
||||||
|
#admin-queries br:last-of-type {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
#admin-queries input:checked + #admin-show-queries {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<?php endif; ?>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
<!--
|
<!--
|
||||||
|
Loading…
x
Reference in New Issue
Block a user