/** * Main function for the routines functionality * * @param string $type 'FUNCTION' for functions, * 'PROCEDURE' for procedures, * null for both * * @return void */ function PMA_RTN_main($type) { global $db; PMA_RTN_setGlobals(); /** * Process all requests */ PMA_RTN_handleEditor(); PMA_RTN_handleExecute(); PMA_RTN_handleExport(); /** * Display a list of available routines */ if (!PMA_isValid($type, array('FUNCTION', 'PROCEDURE'))) { $type = null; } $items = $GLOBALS['dbi']->getRoutines($db, $type); echo PMA_RTE_getList('routine', $items); /** * Display the form for adding a new routine, if the user has the privileges. */ echo PMA_RTN_getFooterLinks(); /** * Display a warning for users with PHP's old "mysql" extension. */ if (!PMA\libraries\DatabaseInterface::checkDbExtension('mysqli')) { trigger_error(__('You are using PHP\'s deprecated \'mysql\' extension, ' . 'which is not capable of handling multi queries. ' . '[strong]The execution of some stored routines may fail![/strong] ' . 'Please use the improved \'mysqli\' extension to ' . 'avoid any problems.'), E_USER_WARNING); } }
echo ' (', $mysql_charset_map['utf-8'], ')' . ' </span>' . ' </li>' . ' </ul>' . ' </div>'; } if ($GLOBALS['cfg']['ShowServerInfo'] || $GLOBALS['cfg']['ShowPhpInfo']) { echo '<div class="group">'; echo '<h2>', __('Web server'), '</h2>'; echo '<ul>'; if ($GLOBALS['cfg']['ShowServerInfo']) { PMA_printListItem($_SERVER['SERVER_SOFTWARE'], 'li_web_server_software'); if ($server > 0) { $client_version_str = $GLOBALS['dbi']->getClientInfo(); if (preg_match('#\\d+\\.\\d+\\.\\d+#', $client_version_str)) { $client_version_str = 'libmysql - ' . $client_version_str; } PMA_printListItem(__('Database client version:') . ' ' . $client_version_str, 'li_mysql_client_version'); $php_ext_string = __('PHP extension:') . ' '; if (PMA\libraries\DatabaseInterface::checkDbExtension('mysqli')) { $extension = 'mysqli'; } else { $extension = 'mysql'; } $php_ext_string .= $extension . ' ' . PMA\libraries\Util::showPHPDocu('book.' . $extension . '.php'); PMA_printListItem($php_ext_string, 'li_used_php_extension'); $php_version_string = __('PHP version:') . ' ' . phpversion(); PMA_printListItem($php_version_string, 'li_used_php_version'); } } if ($cfg['ShowPhpInfo']) { PMA_printListItem(__('Show PHP information'), 'li_phpinfo', 'phpinfo.php' . $common_url_query, null, '_blank'); } echo ' </ul>'; echo ' </div>';