cms.debug.php 1.1 KB

12345678910111213141516171819202122232425262728
  1. <script>
  2. $(document).ready(function() {
  3. $('#checkIsSubmit').on('change', function() {
  4. window.location.href = '/submit.php?from=parametres-debug&target=submit&actif=' + $('#checkIsSubmit').prop('checked');
  5. });
  6. $('#checkIsSql').on('change', function() {
  7. window.location.href = '/submit.php?from=parametres-debug&target=sql&actif=' + $('#checkIsSql').prop('checked');
  8. });
  9. $('#checkIsEmail').on('change', function() {
  10. window.location.href = '/submit.php?from=parametres-debug&target=email&actif=' + $('#checkIsEmail').prop('checked');
  11. });
  12. $('.toggle-logs').click(function() {
  13. $('#debugger-logs').slideToggle();
  14. });
  15. // Apply syntax highlighting to log entries
  16. $('.log-entry').each(function() {
  17. var html = $(this).html();
  18. html = html.replace(/(\\$\\w+)/g, '<span class=\"variable\">$1</span>');
  19. html = html.replace(/(\\bfunction\\b)/g, '<span class=\"function\">$1</span>');
  20. $(this).html(html);
  21. });
  22. });
  23. </script>