', '>', $stripped_sql_query); include("./header.inc.php3"); echo $strDoYouReally.$stripped_sql_query."?
"; ?>
"> "> "> "> ">
left frame should be reloaded if (!empty($reload) && eregi("^CREATE TABLE (.*)", $sql_query)) $reload = 'true'; if(isset($sessionMaxRows)) $cfgMaxRows = $sessionMaxRows; $sql_limit = (isset($pos) && eregi("^SELECT", $sql_query) && !eregi("LIMIT[ 0-9,]+$", $sql_query)) ? " LIMIT $pos, $cfgMaxRows" : ''; mysql_select_db($db); $result = @mysql_query($sql_query.$sql_order.$sql_limit); // Count the total number of rows for the same 'SELECT' query without the // 'LIMIT' clause that may have been programatically added if (empty($sql_limit)) { $SelectNumRows = @mysql_num_rows($result); } else if (eregi("^SELECT", $sql_query)) { $array = split(' from | FROM ',$sql_query,2); //read only the from-part of the query if (!empty($array[1])) { $count_query = "select count(*) as count from $array[1]"; //and make a count(*) to count the entries $OPresult = mysql_query($count_query); if ($OPresult) { $SelectNumRows = mysql_result($OPresult, 0, 'count'); } } else { $SelectNumRows = 0; } } // end rows total count if(!$result) { $error = mysql_error(); include("./header.inc.php3"); mysql_die($error); } $num_rows = @mysql_num_rows($result); if($num_rows < 1) { if(file_exists("./$goto")) { if(isset($zero_rows) && !empty($zero_rows)) $message = $zero_rows; else $message = $strEmptyResultSet; $goto = preg_replace('/\.\.*/', '.', $goto); if ($goto != "main.php3") { include("./header.inc.php3"); } include('./' . $goto); } else { $message = $zero_rows; Header("Location: $goto"); } exit; } else { // Displays the headers if (isset($show_query)) { unset($show_query); } include("./header.inc.php3"); // Define the display mode if it wasn't passed by url if (!isset($display)) { $display = eregi('^((SHOW (VARIABLES|PROCESSLIST|STATUS))|((CHECK|ANALYZE|REPAIR|OPTIMIZE) TABLE ))', $sql_query, $which); if (!empty($which[2]) && !empty($which[3])) { $display = 'simple'; } else if (!empty($which[4]) && !empty($which[5])) { $display = 'bkmOnly'; } } display_table($result, ($display == 'simple' || $display == 'bkmOnly')); if ($display != 'simple') { if ($display != 'bkmOnly') { echo "

$strInsertNewRow

"; } // Bookmark Support // if($cfgBookmark['db'] && $cfgBookmark['table'] && $db!=$cfgBookmark['db'] && empty($id_bookmark)) if($cfgBookmark['db'] && $cfgBookmark['table'] && empty($id_bookmark)) { echo "
\n"; if ($display != 'bkmOnly') { echo "$strOr"; } echo "

\n"; echo $strBookmarkLabel.":\n"; $goto="sql.php3?server=$server&lang=$lang&db=$db&table=$table&pos=$pos&id_bookmark=1&sql_query=".urlencode($sql_query); ?> ">
"; } } } //ne drop query require("./footer.inc.php3"); ?>