<?php
/************************************************************************
- * MXChange v0.2.1 Start: 10/21/2009 *
- * =============== Last change: 10/21/2009 *
+ * Mailer v0.2.1-FINAL Start: 10/21/2009 *
+ * =================== Last change: 10/21/2009 *
* *
* -------------------------------------------------------------------- *
* File : other_functions.php *
* svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
// Displays all SQL queries with num rows, affected rows and timings
function displayDebugSqls () {
// Walk through all SQLs
- $OUT = ''; $SW = 2; $i = 1;
+ $OUT = ''; $i = 1;
foreach ($GLOBALS['debug_sqls'] as $content) {
// Translate/add some data
- $content['sw'] = $SW;
$content['i'] = $i;
- $content['num_rows'] = translateComma($content['num_rows']);
- $content['affected'] = translateComma($content['affected']);
- $content['sql_str'] = secureString($content['sql_str']);
$content['timing'] = translateComma($content['timing'] * 1000);
// Load row template
$OUT .= loadTemplate('admin_other_sqls_row', true, $content);
- // Switch color
- $SW = 3 - $SW; $i++;
+ // Count one up
+ $i++;
} // END - foreach
// Load main template
- loadTemplate('admin_other_sqls', false, $OUT);
+ $GLOBALS['page_footer'] .= loadTemplate('admin_other_sqls', true, $OUT);
+}
+
+// Filter for debugging SQLs
+function FILTER_DISPLAY_DEBUG_SQL () {
+ // Shall we display SQL queries?
+ if ((isAdmin()) && (isDisplayDebugSqlEnabled()) && (!isGetRequestParameterSet('frame')) && ($GLOBALS['header_sent'] == 2)) {
+ // Then display it here
+ displayDebugSqls();
+ } // END - if
}
// [EOF]