コード例 #1
0
 /**
  * Tests for PMA_getHtmlForPrintViewFooter() method.
  *
  * @return void
  * @test
  */
 public function testPMAGetHtmlForPrintViewFooter()
 {
     $html = PMA_getHtmlForPrintViewFooter();
     $this->assertContains('<input type="button" class="button" id="print" value="Print" />', $html);
     $this->assertContains("PMA_disable_floating_menubar", $html);
 }
コード例 #2
0
require_once 'libraries/transformations.lib.php';
require_once 'libraries/Index.class.php';
require_once 'libraries/tbl_printview.lib.php';
$cfgRelation = PMA_getRelationsParam();
/**
 * Defines the url to return to in case of error in a sql statement
 */
if (mb_strlen($table)) {
    $err_url = 'tbl_sql.php?' . PMA_URL_getCommon(array('db' => $db, 'table' => $table));
} else {
    $err_url = 'db_sql.php' . PMA_URL_getCommon(array('db' => $db));
}
/**
 * Selects the database
 */
$GLOBALS['dbi']->selectDb($db);
/**
 * Multi-tables printview
 */
if (isset($_POST['selected_tbl']) && is_array($_POST['selected_tbl'])) {
    $the_tables = $_POST['selected_tbl'];
} elseif (mb_strlen($table)) {
    $the_tables[] = $table;
}
$response->addHTML(PMA_getHtmlForTablesInfo($the_tables));
$response->addHTML(PMA_getHtmlForTablesDetail($the_tables, $db, $cfg, $cfgRelation, $cell_align_left));
/**
 * Displays the footer
 */
$response->addHTML(PMA_getHtmlForPrintViewFooter());
exit;