Protect against php code input from user (bug #1530370).
[phpmyadmin/crack.git] / server_export.php
blobc4b47979dcdd64a5073df729ed40261ce53eb5f2
1 <?php
2 /* $Id$ */
3 // vim: expandtab sw=4 ts=4 sts=4:
5 /**
6 * Does the common work
7 */
8 require_once('./libraries/common.lib.php');
10 $js_to_run = 'functions.js';
12 /**
13 * Displays the links
15 require('./libraries/server_links.inc.php');
17 /**
18 * Gets the databases list - if it has not been built yet
20 if ($server > 0 && empty($dblist)) {
21 PMA_availableDatabases();
26 <!-- Dump of a server -->
27 <?php
28 $export_page_title = $strViewDumpDatabases . "\n";
29 $multi_values = '<div align="center"><select name="db_select[]" size="6" multiple="multiple">';
30 $multi_values .= "\n";
32 foreach ($dblist AS $current_db) {
33 if (!empty($selectall) || (isset($tmp_select) && strpos(' ' . $tmp_select, '|' . $current_db . '|'))) {
34 $is_selected = ' selected="selected"';
35 } else {
36 $is_selected = '';
38 $current_db = htmlspecialchars($current_db);
39 $multi_values .= ' <option value="' . $current_db . '"' . $is_selected . '>' . $current_db . '</option>' . "\n";
40 } // end while
41 $multi_values .= "\n";
42 $multi_values .= '</select></div>';
44 $checkall_url = 'server_export.php?'
45 . PMA_generate_common_url()
46 . '&amp;goto=db_details_export.php';
48 $multi_values .= '<br />
49 <a href="' . $checkall_url . '&amp;selectall=1" onclick="setSelectOptions(\'dump\', \'db_select[]\', true); return false;">' . $strSelectAll . '</a>
51 <a href="' . $checkall_url . '" onclick="setSelectOptions(\'dump\', \'db_select[]\', false); return false;">' . $strUnselectAll . '</a>
52 <br /><br />';
54 $export_type = 'server';
55 require_once('./libraries/display_export.lib.php');
58 /**
59 * Displays the footer
61 require_once('./libraries/footer.inc.php');