Exemplo n.º 1
0
 /**
  * Test for PMA_messagesShowHtml
  *
  * @return void
  */
 public function testPMAMessagesShowHTML()
 {
     $_SESSION['messages'] = array('type' => array(array('title' => 'foo', 'message' => '123', 'fresh' => false), array('title' => 'bar', 'message' => '321', 'fresh' => true)));
     ob_start();
     PMA_messagesShowHtml();
     $result = ob_get_clean();
     $this->assertContains('<div class="type" id="0"><h4>foo</h4>123</div>', $result);
     $this->assertContains('<div class="type" id="1"><h4>bar</h4>321</div>', $result);
     $this->assertContains('<script type="text/javascript">', $result);
     $this->assertContains("hiddenMessages.push('0');", $result);
     $this->assertContains("</script>", $result);
 }
Exemplo n.º 2
0
}
echo '</select>';
echo '</form>';
// Check for done action info and set notice message if present
switch ($action_done) {
    case 'config_saved':
        /* Use uniqid to display this message every time configuration is saved */
        PMA_messagesSet('notice', uniqid('config_saved'), __('Configuration saved.'), PMA_sanitize(__('Configuration saved to file config/config.inc.php in phpMyAdmin ' . 'top level directory, copy it to top level one and delete ' . 'directory config to use it.')));
        break;
    default:
        break;
}
echo '<h2>' . __('Overview') . '</h2>';
// message handling
PMA_messagesEnd();
PMA_messagesShowHtml();
echo '<a href="#" id="show_hidden_messages" style="display:none">';
echo __('Show hidden messages (#MSG_COUNT)');
echo '</a>';
echo '<fieldset class="simple"><legend>';
echo __('Servers');
echo '</legend>';
//
// Display server list
//
echo PMA_displayFormTop('index.php', 'get', array('page' => 'servers', 'mode' => 'add'));
echo '<div class="form">';
if ($cf->getServerCount() > 0) {
    echo '<table cellspacing="0" class="datatable" style="table-layout: fixed">';
    echo '<tr>';
    echo '<th>#</th>';