Exemplo n.º 1
0
     } elseif (function_exists('mysql_get_client_info')) {
         $defaults['extension'] = 'mysql';
     } else {
         message('warning', 'Could not load either mysql or mysqli extension, you might not be able to use phpMyAdmin! Check your PHP configuration.');
     }
     if (isset($defaults['extension'])) {
         message('notice', 'Autodetected MySQL extension to use: ' . $defaults['extension']);
     }
     // Display form
     show_server_form($defaults);
     break;
 case 'editserver':
     if (!isset($_POST['server'])) {
         footer();
     }
     show_server_form($_SESSION['configuration']['Servers'][$_POST['server']], $_POST['server']);
     break;
 case 'deleteserver':
     if (!isset($_POST['server'])) {
         footer();
     }
     message('notice', 'Deleted server ' . get_server_name($_SESSION['configuration']['Servers'][$_POST['server']], $_POST['server']));
     unset($_SESSION['configuration']['Servers'][$_POST['server']]);
     compress_servers($_SESSION['configuration']);
     $show_info = TRUE;
     break;
 case 'servers':
     if (count($_SESSION['configuration']['Servers']) == 0) {
         message('notice', 'No servers defined, so none can be shown');
     } else {
         foreach ($_SESSION['configuration']['Servers'] as $i => $srv) {
Exemplo n.º 2
0
     } elseif (function_exists('mysql_get_client_info')) {
         $defaults['extension'] = 'mysql';
     } else {
         message('warning', 'Could not load either mysql or mysqli extension, you might not be able to use phpMyAdmin! Check your PHP configuration.');
     }
     if (isset($defaults['extension'])) {
         message('notice', 'Autodetected MySQL extension to use: ' . $defaults['extension']);
     }
     // Display form
     show_server_form($defaults);
     break;
 case 'editserver':
     if (!isset($_POST['server'])) {
         footer();
     }
     show_server_form($configuration['Servers'][$_POST['server']], $_POST['server']);
     break;
 case 'deleteserver':
     if (!isset($_POST['server'])) {
         footer();
     }
     message('notice', 'Deleted server ' . get_server_name($configuration['Servers'][$_POST['server']], $_POST['server']));
     unset($configuration['Servers'][$_POST['server']]);
     compress_servers($configuration);
     $show_info = TRUE;
     break;
 case 'servers':
     if (count($configuration['Servers']) == 0) {
         message('notice', 'No servers defined, so none can be shown');
     } else {
         foreach ($configuration['Servers'] as $i => $srv) {