function conn_info()
{
    global $db_driver, $db_server, $db_name, $db_user, $db_charset, $page_charset, $charset1, $charset2;
    $dbs = list_dbs();
    $db_name = $db_name;
    ?>
	<p>
		Driver: <b><?php 
    echo $db_driver;
    ?>
</b>
		&nbsp;-&nbsp;
		Server: <b><?php 
    echo $db_server;
    ?>
</b>
		&nbsp;-&nbsp;
		User: <b><?php 
    echo $db_user;
    ?>
</b>
		&nbsp;-&nbsp;
		<a class=blue href="<?php 
    echo $_SERVER['PHP_SELF'];
    ?>
?execute_sql=1">Execute SQL</a>
		( open in <a class=blue href="javascript:void(0)" onclick="popup('<?php 
    echo $_SERVER['PHP_SELF'];
    ?>
?execute_sql=1&popup=1')">Popup</a> )
		&nbsp;-&nbsp;
		Database: <select name="db_name" onchange="location='<?php 
    echo $_SERVER['PHP_SELF'];
    ?>
?db_name='+this.value"><?php 
    echo options($dbs, $db_name);
    ?>
</select>
		&nbsp;-&nbsp;
		Db charset: <select name="db_charset" onchange="location='<?php 
    echo $_SERVER['PHP_SELF'];
    ?>
?db_charset='+this.value+'&from=<?php 
    echo urlencode($_SERVER['REQUEST_URI']);
    ?>
'">
		<option value=""></option><?php 
    echo options($charset1, $db_charset);
    ?>
</select>
		&nbsp;-&nbsp;
		Page charset: <select name="page_charset" onchange="location='<?php 
    echo $_SERVER['PHP_SELF'];
    ?>
?page_charset='+this.value+'&from=<?php 
    echo urlencode($_SERVER['REQUEST_URI']);
    ?>
'">
		<option value=""></option><?php 
    echo options($charset2, $page_charset);
    ?>
</select>
		&nbsp;-&nbsp;
		<a class=blue href="<?php 
    echo $_SERVER['PHP_SELF'];
    ?>
?disconnect=1">Disconnect</a>
	</p>
	<?php 
}
예제 #2
0
function conn_info()
{
    // @conn_info
    // @connection
    // @info
    global $db_driver, $db_server, $db_name, $db_user, $db_charset, $page_charset, $charset1, $charset2;
    $dbs = list_dbs();
    $db_name = $db_name;
    ?>
	<p>
		<?php 
    if (SQLITE_USED) {
        ?>

			<?php 
        $db_file = realpath($db_server);
        $base = basename($db_file);
        $db_file = substr($db_file, 0, strlen($db_file) - strlen($base));
        $db_file = "<b style=\"cursor: help;\" title=\"Located in: {$db_file}\">{$base}</b>";
        ?>

			Database: <?php 
        echo $db_file;
        ?>
			&nbsp;-&nbsp;

			<!--
			<a class=blue href="<?php 
        echo $_SERVER['PHP_SELF'];
        ?>
?execute_sql=1">SQL Editor</a>
			&nbsp;-&nbsp;
			-->

			<a class=blue href="javascript:void(0)" onclick="popup('<?php 
        echo $_SERVER['PHP_SELF'];
        ?>
?execute_sql=1&popup=1')">SQL Editor</a>
			&nbsp;-&nbsp;

			<!--
			Charset: <b>UTF8</b>
			&nbsp;-&nbsp;
			-->

			<?php 
        if (defined("SQLITE_INSECURE")) {
            ?>
				User: <b>No authentication</b>
			<?php 
        } else {
            ?>
				User: <b><?php 
            echo $db_user;
            ?>
</b>
			<?php 
        }
        ?>



			<?php 
        if (!defined("SQLITE_INSECURE")) {
            ?>
				&nbsp;-&nbsp;
				<a class=blue href="<?php 
            echo $_SERVER['PHP_SELF'];
            ?>
?disconnect=1">Disconnect</a>
			<?php 
        }
        ?>

		<?php 
    } else {
        ?>

			Driver: <b><?php 
        echo $db_driver;
        ?>
</b>
			&nbsp;-&nbsp;

			Server: <b><?php 
        echo $db_server;
        ?>
</b>
			&nbsp;-&nbsp;

			User: <b><?php 
        echo $db_user;
        ?>
</b>
			&nbsp;-&nbsp;

			<!--
			<a class=blue href="<?php 
        echo $_SERVER['PHP_SELF'];
        ?>
?execute_sql=1">SQL Editor</a>
			&nbsp;-&nbsp;
			-->

			<a class=blue href="javascript:void(0)" onclick="popup('<?php 
        echo $_SERVER['PHP_SELF'];
        ?>
?execute_sql=1&popup=1')">SQL Editor</a>
			&nbsp;-&nbsp;

			Data<u>b</u>ase: <select accesskey=b id="db_name" name="db_name" onchange="location='<?php 
        echo $_SERVER['PHP_SELF'];
        ?>
?db_name='+this.value"><?php 
        echo options($dbs, $db_name);
        ?>
</select>
			&nbsp;-&nbsp;

			Db charset: <select name="db_charset" onchange="location='<?php 
        echo $_SERVER['PHP_SELF'];
        ?>
?db_charset='+this.value+'&from=<?php 
        echo urlencode($_SERVER['REQUEST_URI']);
        ?>
'">
			<option value=""></option><?php 
        echo options($charset1, $db_charset);
        ?>
</select>
			&nbsp;-&nbsp;

			Page charset: <select name="page_charset" onchange="location='<?php 
        echo $_SERVER['PHP_SELF'];
        ?>
?page_charset='+this.value+'&from=<?php 
        echo urlencode($_SERVER['REQUEST_URI']);
        ?>
'">
			<option value=""></option><?php 
        echo options($charset2, $page_charset);
        ?>
</select>
			&nbsp;-&nbsp;

			<a class=blue href="<?php 
        echo $_SERVER['PHP_SELF'];
        ?>
?disconnect=1">Disconnect</a>

		<?php 
    }
    ?>

		<!--
		<div style="position: absolute; top: 1em; right: 1.5em;">
		DBKiss version: <a title="Check for updates" href="javascript:void(0)" onclick="link_noreferer('http://www.gosu.pl/dbkiss/')"><?php 
    echo DBKISS_VERSION;
    ?>
</a>
		</div>
		-->

		<div style="position: absolute; top: 1em; right: 1.5em;">
			DBKiss version: <b><?php 
    echo DBKISS_VERSION;
    ?>
</b>
			&nbsp;
			<a class=special href="javascript:void(0)" onclick="link_noreferer('http://www.gosu.pl/dbkiss/')">Check for updates</a>
		</div>

	</p>
	<?php 
}