Server IP : 127.0.0.2 / Your IP : 18.222.25.95 Web Server : Apache/2.4.18 (Ubuntu) System : User : www-data ( ) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/phpmyadmin/libraries/ |
Upload File : |
<?php /* vim: set expandtab sw=4 ts=4 sts=4: */ /** * Ensure the database and the table exist (else move to the "parent" script) * and display headers * * @package PhpMyAdmin */ if (! defined('PHPMYADMIN')) { exit; } /** @var PMA_String $pmaString */ $pmaString = $GLOBALS['PMA_String']; if (empty($is_db)) { if (/*overload*/mb_strlen($db)) { $is_db = @$GLOBALS['dbi']->selectDb($db); } else { $is_db = false; } if (! $is_db) { // not a valid db name -> back to the welcome page if (! defined('IS_TRANSFORMATION_WRAPPER')) { $response = PMA_Response::getInstance(); if ($response->isAjax()) { $response->isSuccess(false); $response->addJSON( 'message', PMA_Message::error(__('No databases selected.')) ); } else { $url_params = array('reload' => 1); if (isset($message)) { $url_params['message'] = $message; } if (! empty($sql_query)) { $url_params['sql_query'] = $sql_query; } if (isset($show_as_php)) { $url_params['show_as_php'] = $show_as_php; } PMA_sendHeaderLocation( $cfg['PmaAbsoluteUri'] . 'index.php' . PMA_URL_getCommon($url_params, 'text') ); } exit; } } } // end if (ensures db exists) if (empty($is_table) && !defined('PMA_SUBMIT_MULT') && !defined('TABLE_MAY_BE_ABSENT') ) { // Not a valid table name -> back to the db_sql.php if (/*overload*/mb_strlen($table)) { $is_table = $GLOBALS['dbi']->getCachedTableContent(array($db, $table), false); if (! $is_table) { $_result = $GLOBALS['dbi']->tryQuery( 'SHOW TABLES LIKE \'' . PMA_Util::sqlAddSlashes($table, true) . '\';', null, PMA_DatabaseInterface::QUERY_STORE ); $is_table = @$GLOBALS['dbi']->numRows($_result); $GLOBALS['dbi']->freeResult($_result); } } else { $is_table = false; } if (! $is_table) { if (!defined('IS_TRANSFORMATION_WRAPPER')) { if (/*overload*/mb_strlen($table)) { // SHOW TABLES doesn't show temporary tables, so try select // (as it can happen just in case temporary table, it should be // fast): /** * @todo should this check really * only happen if IS_TRANSFORMATION_WRAPPER? */ $_result = $GLOBALS['dbi']->tryQuery( 'SELECT COUNT(*) FROM ' . PMA_Util::backquote($table) . ';', null, PMA_DatabaseInterface::QUERY_STORE ); $is_table = ($_result && @$GLOBALS['dbi']->numRows($_result)); $GLOBALS['dbi']->freeResult($_result); } if (! $is_table) { include './db_sql.php'; exit; } } if (! $is_table) { exit; } } } // end if (ensures table exists)