【php开源代码栏目提醒】:文章导读:在新的一年中,各位网友都进入紧张的学习或是工作阶段。网学会员整理了php开源代码-left.php的相关内容供大家参考,祝大家在新的一年里工作和学习顺利!
<?php
/* $Id: left.php,v 2.69.2.1 2006/02/22 15:33:35 cybot_tm Exp $ */
// vim: expandtab sw=4 ts=4 sts=4:
/**
* display db and table selection
*/
/**
* Gets a core script and starts output buffering work
*/
require_once('./libraries/common.lib.php');
// free the session file, for the other frames to be loaded
session_write_close();
require_once('./libraries/ob.lib.php');
if ($GLOBALS['cfg']['OBGzip']) {
$ob_mode = PMA_outBufferModeGet();
if ($ob_mode) {
PMA_outBufferPre($ob_mode);
}
}
require_once('./libraries/bookmark.lib.php');
require_once('./libraries/relation.lib.php');
$cfgRelation = PMA_getRelationsParam();
/**
* Get the list and number of available databases.
* Skipped if no server selected: in this case no database should be displayed
* before the user choose among available ones at the welcome screen.
*/
if ($server > 0) {
// this function is defined in "common.lib.php"
// it defines $num_dbs and $dblist
PMA_availableDatabases();
if ( ( ! isset($db) || ! strlen($db) ) && count( $dblist ) === 1 ) {
reset( $dblist );
$db = current( $dblist );
}
} else {
$num_dbs = 0;
}
$db = isset( $db ) ? $db : '';
$table = isset( $table ) ? $table : '';
$db_start = $db;
// garvin: For re-usability, moved http-headers
// to a seperate file. It can now be included by libraries/header.inc.php,
// querywindow.php.
require_once('./libraries/header_http.inc.php');
/**
* Displays the frame
*/
// remove vertical scroll bar bug in ie
echo '<?xml version="1.0" encoding="' . $GLOBALS['charset'] . '"?>';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD X
HTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"
xml:lang="<?php echo $available_languages[$lang][2]; ?>"
lang="<?php echo $available_languages[$lang][2]; ?>"
dir="<?php echo $text_dir; ?>">
<head>
<link rel="icon" href="./favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
<title>phpMyAdmin</title>
<meta http-equiv="Content-Type"
content="text/html; charset=<?php echo $charset; ?>" />
<base target="frame_content" />
<link rel="stylesheet" type="text/css"
href="./css/phpmyadmin.css.php?<?php echo PMA_generate_common_url( '', '' ); ?>&js_frame=left" />
<script type="text/javascript" language="javascript">
//<![CDATA[
function toggle( id, only_open ) {
var el = document.getElementById('subel' + id);
if ( ! el ) {
return false;
}
var img = document.getElementById('el' + id + 'Img');
if ( el.style.display == 'none' || only_open ) {
el.style.display = '';
if ( img ) {
img.src = '<?php echo $GLOBALS['pmaThemeImage']; ?>b_minus.png';
img.alt = '-';
}
} else {
el.style.display = 'none';
if ( img ) {
img.src = '<?php echo $GLOBALS['pmaThemeImage']; ?>b_plus.png';
img.alt = '+';
}
}
return true;
}
//]]>
</script>
</head>
<body id="body_leftFrame">
<?php
require './libraries/left_header.inc.php';
if ( $num_dbs === 0 ) {
// no database available, so we break here
echo '<p>' . $strNoDatabases . '</p></body></html>';
/**
* Close MySql connections
*/
if (isset($controllink) && $controllink) {
@PMA_DBI_close($controllink);
}
if (isset($userlink) && $userlink) {
@PMA_DBI_close($userlink);
}
/**
* Sends bufferized data
*/
if ( $GLOBALS['cfg']['OBGzip'] && isset( $ob_mode ) && $ob_mode ) {
PMA_outBufferPost( $ob_mode );
}
exit();
} elseif ( $GLOBALS['cfg']['LeftFrameLight'] && $num_dbs > 1 ) {
// more than one database available and LeftFrameLight is true
// display db selectbox
//
// Light mode -> beginning of the select combo for databases
// Note: When javascript is active, the frameset will be changed from
// within left.php. With no JS (<noscript>) the whole frameset will
// be rebuilt with the new target frame.
?>
<div id="databaseList">
<form method="post" action="index.php" target="_parent" id="left">
<label for="lightm_db"><?php echo $strDatabase; ?></label>
<?php
echo PMA_generate_common_hidden_inputs() . "\n";
echo PMA_getHtmlSelectDb( $db ) . "\n";
echo '<noscript>' . "\n"
.'<input type="submit" name="Go" value="' . $strGo . '" />' . "\n"
.'</noscript>' . "\n"
.'</form>' . "\n"
.'</div>' . "\n";
}
?>
<div id="left_tableList">
<?php
// Don't display expansible/collapsible database info if:
// 1. $server == 0 (no server selected)
// This is the case when there are multiple servers and
// '$GLOBALS['cfg'