diff --git a/pandora_console/include/db/mysql.php b/pandora_console/include/db/mysql.php index b0c6de08bd..cac4eeee85 100644 --- a/pandora_console/include/db/mysql.php +++ b/pandora_console/include/db/mysql.php @@ -1081,4 +1081,10 @@ function mysql_db_get_table_count($sql, $search_history_db = false) { return $count; } + +function mysql_get_fields($table) { + global $config; + + return db_get_all_rows_sql("SHOW COLUMNS FROM " . $table); +} ?> \ No newline at end of file diff --git a/pandora_console/include/functions_db.php b/pandora_console/include/functions_db.php index 8281264f65..7f7fc7dc2d 100644 --- a/pandora_console/include/functions_db.php +++ b/pandora_console/include/functions_db.php @@ -1171,4 +1171,20 @@ function db_get_table_count($table, $search_history_db = false) { break; } } + +function db_get_fields($table) { + global $config; + + switch ($config["dbtype"]) { + case "mysql": + return mysql_get_fields($table); + break; + case "postgresql": + //return postgresql_get_fields($table); + break; + case "oracle": + //return oracle_get_fields($table); + break; + } +} ?> \ No newline at end of file diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 62a43605a1..bedbdefdca 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -1634,7 +1634,9 @@ function html_print_checkbox ($name, $value, $checked = false, $return = false, * * @return string HTML code if return parameter is true. */ -function html_print_image ($src, $return = false, $options = false, $return_src = false, $relative = false) { +function html_print_image ($src, $return = false, $options = false, + $return_src = false, $relative = false) { + global $config; // If metaconsole is in use then don't use skins