Пример #1
0
<?php

require_once 'include.php';
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
	<title>phpSQLiteAdmin</title>
	<meta http-equiv="expires" content="0">
	<script language="Javascript" src="javascript.txt" type="text/javascript"></script>
	<link href="phpsla.css" rel="stylesheet" type="text/css">
</head>
<body class=right>
<?php 
print_top_links($_GET['object']);
print "<h3>Table '{$_GET['object']}'</h3>\n";
print "<table border=1>\n";
print "<tr><th>Column</th><th>Type</th></tr>\n";
$userdbh->_setTableInfo($_GET['object']);
$cols = $userdbh->getColsType();
foreach ($cols as $key => $val) {
    print "<tr><td>{$key}</td><td>{$value}</td></tr>\n";
}
print "</table>\n";
print "<p>Rows in table: " . $userdbh->numRows($_GET['object']) . "</p>\n";
print "<h3>Indexes</h3>\n";
$userdbh->getIndexesInfo($_GET['object']);
$indexes = $userdbh->returnRows('assoc', true);
$nr_indexes = count($indexes);
/*
Пример #2
0
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
	<title>phpSQLiteAdmin</title>
	<meta http-equiv="expires" content="0">
	<script language="Javascript" src="javascript.txt" type="text/javascript"></script>
	<link href="phpsla.css" rel="stylesheet" type="text/css">
</head>
<body class="right">
<?php 
if ($_POST['object'] != '') {
    $current_table = $_POST['object'];
}
if ($_GET['object'] != '') {
    $current_table = $_GET['object'];
}
//$table = new table($current_table);
print_top_links($current_table);
if ($_POST['sql'] != '') {
    $show = trim($_POST['sql']);
} else {
    $show = "select * from {$current_table}";
}
?>

<form name=query method=post action="<?php 
echo $_SERVER['PHP_SELF'];
?>
">
<input type=hidden name=object value="<?php 
echo $current_table;
?>
">