$('#import_form_status').css('display', 'inline'); $('#import_form_status').html('<img src="<?php echo $GLOBALS['pmaThemeImage']; ?> ajax_clock_small.gif" alt="ajax clock" /> <?php echo PMA_jsFormat(__('The file is being processed, please be patient.'), false); ?> '); $('#import_form_status').load('import_status.php?message=true&<?php echo PMA_generate_common_url(); ?> '); // loads the message, either success or mysql error <?php // reload the left sidebar when the import is finished $GLOBALS['reload'] = true; PMA_reloadNavigation(true); ?> } // if finished else { window.setTimeout(perform_upload, 1000); } } ); } window.setTimeout(perform_upload, 1000); <?php } else {
$selected_usr = array($old_username . '&#27;' . $old_hostname); } else { $selected_usr = $_REQUEST['selected_usr']; $queries = array(); } foreach ($selected_usr as $each_user) { list($this_user, $this_host) = explode('&#27;', $each_user); $queries[] = '# ' . sprintf(__('Deleting %s'), '\'' . $this_user . '\'@\'' . $this_host . '\'') . ' ...'; $queries[] = 'DROP USER \'' . PMA_sqlAddSlashes($this_user) . '\'@\'' . PMA_sqlAddSlashes($this_host) . '\';'; if (isset($_REQUEST['drop_users_db'])) { $queries[] = 'DROP DATABASE IF EXISTS ' . PMA_backquote($this_user) . ';'; $GLOBALS['reload'] = true; if ($GLOBALS['is_ajax_request'] != true) { PMA_reloadNavigation(); } } } if (empty($_REQUEST['change_copy'])) { if (empty($queries)) { $message = PMA_Message::error(__('No users selected for deleting!')); } else { if ($_REQUEST['mode'] == 3) { $queries[] = '# ' . __('Reloading the privileges') . ' ...'; $queries[] = 'FLUSH PRIVILEGES;'; } $drop_user_error = ''; foreach ($queries as $sql_query) { if ($sql_query{0} != '#') { if (! PMA_DBI_try_query($sql_query, $GLOBALS['userlink'])) {
/** * other output tests */ public function testWriteReloadNavigation() { $GLOBALS['reload'] = true; $GLOBALS['db'] = 'test_db'; $url = './navigation.php?'.PMA_generate_common_url($GLOBALS['db'], '', '&'); $write = PHP_EOL . '<script type="text/javascript">' . PHP_EOL . '//<![CDATA[' . PHP_EOL . 'if (typeof(window.parent) != \'undefined\'' . PHP_EOL . ' && typeof(window.parent.frame_navigation) != \'undefined\'' . PHP_EOL . ' && window.parent.goTo) {' . PHP_EOL . ' window.parent.goTo(\'' . $url . '\');' . PHP_EOL . '}' . PHP_EOL . '//]]>' . PHP_EOL . '</script>' . PHP_EOL; $this->expectOutputString($write); PMA_reloadNavigation(); $this->assertFalse(isset($GLOBALS['reload'])); unset($GLOBALS['db']); }