From f1242cf79de2892ad2b31710cf80ed400447aa40 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc=20Chapeaux?= ' . "\n";
+ if (!empty($the_query)) {
+ $edit_link = '' . $GLOBALS['strEdit'] . '';
+ echo ' ' . $GLOBALS['strSQLQuery'] . ' : [' . $edit_link . ']' . htmlspecialchars($the_query) . '
' . "\n";
+ }
+ echo '
' . "\n"; + echo ' ' . $GLOBALS['strMySQLSaid'] . ' ' . htmlspecialchars($error_message) . "\n"; + echo '
' . "\n"; + echo '' . $GLOBALS['strBack'] . ''; + + include('./footer.inc.php3'); + exit(); + } // end of the 'mysql_die()' function + + /** * Use mysql_connect() or mysql_pconnect()? */ @@ -157,7 +196,7 @@ if (!defined('__LIB_INC__')){ $dblist[] = $cfgServer['only_db']; } - // Advanced authentification is required + // Advanced authentication is required if ($cfgServer['adv_auth']) { // Grabs the $PHP_AUTH_USER variable whatever are the values of the // 'register_globals' and the 'variables_order' directives @@ -197,7 +236,7 @@ if (!defined('__LIB_INC__')){ $old_usr = $HTTP_GET_VARS['old_usr']; } - // First load -> checks if authentification is required + // First load -> checks if authentication is required if (!isset($old_usr)) { if (empty($PHP_AUTH_USER)) { $do_auth = TRUE; @@ -215,7 +254,7 @@ if (!defined('__LIB_INC__')){ } } - // Calls the authentification window or validates user's login + // Calls the authentication window or validates user's login if ($do_auth) { auth(); } else { @@ -305,7 +344,7 @@ if (!defined('__LIB_INC__')){ // Validation achived -> store user's login/password $cfgServer['user'] = $PHP_AUTH_USER; $cfgServer['password'] = $PHP_AUTH_PW; - } // end Advanced authentification + } // end Advanced authentication // Do connect to the user's database if (empty($cfgServer['port'])) { @@ -322,6 +361,7 @@ if (!defined('__LIB_INC__')){ echo $strHostEmpty; } + /** * Gets constants that defines the PHP, MySQL... releases. * This include must be located physically before any code that @@ -438,40 +478,6 @@ if (!defined('__LIB_INC__')){ } // end of the 'count_records()' function - /** - * Displays a MySQL error message in the right frame. - * - * @param string the error mesage - * @param string the sql query that failed - */ - function mysql_die($error_message = '', $the_query = '') - { - global $sql_query; - - if (empty($error_message)) { - $error_message = mysql_error(); - } - if (empty($the_query)) { - $the_query = $GLOBALS['sql_query']; - } - - echo ''. $GLOBALS['strError'] . '' . "\n"; - echo '' . "\n"; - if (!empty($the_query)) { - $edit_link = '' . $GLOBALS['strEdit'] . ''; - echo ' ' . $GLOBALS['strSQLQuery'] . ' : [' . $edit_link . ']
' . htmlspecialchars($the_query) . '' . "\n"; - } - echo '' . "\n"; - echo '
' . "\n"; - echo ' ' . $GLOBALS['strMySQLSaid'] . ' ' . htmlspecialchars($error_message) . "\n"; - echo '
' . "\n"; - echo '' . $GLOBALS['strBack'] . ''; - - include('./footer.inc.php3'); - exit(); - } // end of the 'mysql_die()' function - - /** * Displays a message at the top of the "main" (right) frame * @@ -1454,7 +1460,7 @@ var errorMsg2 = ' no bookmark table + $cfgBookmark = FALSE; + $cfgBookmark = ''; + + // No server selected -> no bookmark table if ($server == 0) { return ''; - } - - $cfgBookmark['user']=$cfgServer['user']; - $cfgBookmark['db']=$cfgServer['bookmarkdb']; - $cfgBookmark['table']=$cfgServer['bookmarktable']; + } + + $cfgBookmark['user'] = $cfgServer['user']; + $cfgBookmark['db'] = $cfgServer['bookmarkdb']; + $cfgBookmark['table'] = $cfgServer['bookmarktable']; return $cfgBookmark; } // end of the 'get_bookmarks_param()' function @@ -1585,38 +1590,32 @@ var errorMsg2 = ' store them - if($result>0 && mysql_num_rows($result)>0) - { + if ($result > 0 && mysql_num_rows($result) > 0) { $flag = 1; - while($row = mysql_fetch_row($result)) - { - $bookmark_list["$flag - ".$row[0]] = $row[1]; + while ($row = mysql_fetch_row($result)) { + $bookmark_list[$flag . ' - ' . $row[0]] = $row[1]; $flag++; - } - - return $bookmark_list; + } // end while + return $bookmark_list; } // No bookmarks for the current database else { - return false; + return FALSE; } } // end of the 'list_bookmarks()' function @@ -1627,58 +1626,43 @@ var errorMsg2 = '